/* Previsioni: presentazione approvata, lettura progressiva e storico navigabile. */
.fc-upper { display:contents; }
.fc-hero { background:linear-gradient(150deg,color-mix(in srgb,var(--accent) 6%,var(--surface)),var(--surface) 65%); border:1px solid var(--border); border-radius:24px; padding:24px 24px 0; overflow:hidden; box-shadow:var(--shadow); }
.fc-hero-head { display:flex; justify-content:space-between; align-items:center; gap:10px; color:var(--ink-2); font-size:14px; }
.fc-status { font-size:11px; letter-spacing:.07em; text-transform:uppercase; font-weight:500; padding:5px 9px; border:1px solid color-mix(in srgb,var(--accent) 30%,var(--surface)); border-radius:8px; color:var(--accent); }
.fc-kicker { color:var(--ink-2); font-size:14px; margin:22px 0 2px; }
.fc-main-number { font-size:64px; font-weight:550; font-variant-numeric:tabular-nums; letter-spacing:-.065em; line-height:1.1; display:flex; align-items:baseline; gap:10px; white-space:nowrap; }
.fc-currency { font-size:32px; letter-spacing:-.03em; font-weight:400; color:var(--muted); }
.fc-uncertainty { color:var(--ink-2); font-size:13px; margin:12px 0 22px; display:flex; align-items:center; gap:7px; }
.fc-uncertainty svg { width:15px; height:15px; color:var(--accent); flex-shrink:0; }
.fc-progress { display:flex; gap:3px; height:5px; margin:0 0 13px; }
.fc-progress i { display:block; border-radius:3px; background:var(--accent); }
.fc-progress i:last-child { background:repeating-linear-gradient(120deg,color-mix(in srgb,var(--accent) 30%,var(--surface)),color-mix(in srgb,var(--accent) 30%,var(--surface)) 3px,var(--surface) 3px,var(--surface) 5px); }
.fc-two-values { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:24px; }
.fc-two-values span { display:block; font-size:12px; color:var(--ink-2); margin-bottom:3px; }
.fc-two-values b { font-weight:500; font-variant-numeric:tabular-nums; font-size:21px; letter-spacing:-.03em; }
.fc-next { margin:0 -24px; border-top:1px solid var(--border); background:color-mix(in srgb,var(--surface-2) 30%,var(--surface)); padding:16px 16px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
.fc-next button { border:0; border-radius:12px; padding:7px 4px; background:transparent; text-align:center; }
.fc-next button[aria-pressed="true"] { background:var(--accent-soft); color:var(--accent); }
.fc-next span { display:block; font-size:12px; color:var(--ink-2); }
.fc-next b { display:block; font-size:20px; margin-top:5px; font-weight:550; font-variant-numeric:tabular-nums; letter-spacing:-.04em; }
.fc-next small { font-size:11px; color:var(--muted); }
.fc-back { display:inline-flex; gap:6px; align-items:center; margin:0 0 14px; color:var(--accent) !important; font-size:12px !important; border:0; padding:0; background:transparent; }
.fc-story { margin-top:32px; padding:0 2px; }
.fc-section-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px; }
.fc-section-head h2 { font-size:20px; font-weight:550; letter-spacing:-.035em; line-height:1.2; margin:0; }
.fc-controls { display:flex; gap:2px; padding:3px; background:var(--surface-2); border-radius:10px; }
.fc-controls button { border:0; background:transparent; border-radius:7px; padding:6px 8px; font-size:12px; min-height:32px; color:var(--ink-2); }
.fc-controls button[aria-pressed="true"] { background:var(--surface); box-shadow:var(--shadow); color:var(--ink); }
.fc-chart-caption { font-size:12px; color:var(--ink-2); margin:7px 0 16px; }
.fc-readout { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin:16px 0 3px; }
.fc-readout span { font-size:13px; color:var(--ink-2); }
.fc-readout strong { font-size:21px; font-weight:550; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.fc-chart { display:block; width:100%; height:auto; overflow:visible; touch-action:pan-y; }
.fc-chart text { fill:var(--muted); font-size:11px; font-family:var(--font); }
.fc-grid-line { stroke:var(--grid); stroke-width:1; stroke-dasharray:3 5; }
.fc-line { fill:none; stroke:var(--accent); stroke-width:2.7; stroke-linecap:round; stroke-linejoin:round; }
.fc-chart-dot { fill:var(--surface); stroke:var(--accent); stroke-width:2; }
.fc-selected-dot { fill:var(--accent); stroke:var(--page); stroke-width:3; }
.fc-selection-stem { stroke:color-mix(in srgb,var(--accent) 35%,var(--page)); stroke-width:1; stroke-dasharray:3 4; }
.fc-window-head { display:flex; align-items:center; justify-content:space-between; font-size:12px; color:var(--ink-2); margin:10px 0 8px; }
.fc-window-head button { min-width:44px; min-height:44px; border:1px solid var(--border); border-radius:10px; background:var(--surface); display:grid; place-items:center; }
.fc-window-head button svg { width:14px; height:14px; }
.fc-window-head button:disabled { opacity:.3; cursor:default; }
.fc-minimap { position:relative; background:var(--surface-2); border-radius:10px; height:58px; overflow:hidden; }
.fc-minimap svg { width:100%; height:100%; display:block; }
.fc-minimap input { position:absolute; inset:0; margin:0; width:100%; height:100%; opacity:0; cursor:ew-resize; touch-action:pan-y; }
.fc-minimap:focus-within { outline:2px solid var(--accent); outline-offset:3px; }
.fc-minimap-years { display:flex; justify-content:space-between; font-size:10px; color:var(--muted); margin-top:6px; }
.fc-gesture { font-size:11px; color:var(--muted); margin:10px 0 0; text-align:center; }
.fc-drill { margin-top:30px; border-top:1px solid var(--border); }
.fc-detail { border-bottom:1px solid var(--border); }
.fc-detail summary { display:flex; align-items:center; justify-content:space-between; gap:12px; list-style:none; cursor:pointer; padding:18px 0; min-height:64px; }
.fc-detail summary::-webkit-details-marker { display:none; }
.fc-summary-copy { display:block; }
.fc-summary-copy b { display:block; font-weight:500; font-size:14px; letter-spacing:-.02em; }
.fc-summary-copy small { display:block; color:var(--ink-2); font-size:12px; margin-top:3px; }
.fc-detail summary > svg { width:18px; height:18px; flex-shrink:0; color:var(--muted); transition:transform .15s ease; }
.fc-detail[open] > summary > svg { transform:rotate(90deg); }
.fc-detail-content { padding:0 0 20px; font-size:14px; line-height:1.55; color:var(--ink-2); }
.fc-detail-row { display:flex; justify-content:space-between; gap:16px; padding:10px 0; font-size:13px; }
.fc-detail-row strong { color:var(--ink); font-weight:500; font-variant-numeric:tabular-nums; }
.fc-component-bar { height:8px; display:flex; gap:3px; border-radius:4px; overflow:hidden; margin:10px 0; }
.fc-component-bar i { background:var(--accent); }
.fc-component-bar i:nth-child(2) { opacity:.55; }
.fc-component-bar i:nth-child(3) { opacity:.25; }
.fc-personal-note { margin:18px 0 0; border:1px solid var(--border); border-radius:16px; padding:16px 20px; display:flex; justify-content:space-between; gap:20px; align-items:center; background:var(--surface); }
.fc-personal-note span { font-size:13px; color:var(--ink-2); }
.fc-personal-note strong { font-size:25px; font-weight:550; letter-spacing:-.04em; white-space:nowrap; }
.fc-negative { color:var(--bad-ink) !important; }
.fc-forecast-chart .fc-chart { height:150px; }
.fc-forecast-chart .fc-line { stroke-dasharray:5 5; }
.fc-b .fc-hero { padding-bottom:2px; }
.fc-b .fc-two-values { padding-bottom:0; margin-top:15px; }

.fc-demo { min-width:0; }
.fc-demo * { box-sizing:border-box; }
.fc-demo button { font:inherit; color:inherit; cursor:pointer; }
.fc-demo .fc-hero { margin:0; padding:24px 24px 0; }
.fc-demo .fc-context { color:var(--ink-2); font-size:14px; line-height:1.5; margin:0 0 24px; }
.fc-demo .fc-main-number { font-size:64px; }
.fc-demo .fc-section-head h2 { margin:0; font-size:20px; }
.fc-controls { flex-wrap:wrap; flex-shrink:0; }
.fc-controls button { min-height:36px; padding:6px 8px; font-size:12px; }
.fc-demo .fc-chart text { fill:var(--ink-2); font-size:12px; }
.fc-demo .fc-chart { overflow:visible; }
.fc-chart circle[role="button"] { cursor:pointer; }
.fc-window-head button { min-width:44px; min-height:44px; }
.fc-window-head .icon { width:16px; height:16px; }
.fc-minimap input { padding:0; border:0; max-width:none; appearance:auto; }
.fc-demo .fc-minimap-years,.fc-demo .fc-gesture { font-size:12px; color:var(--ink-2); }
.fc-range-mark { width:15px; height:7px; border-left:1px solid var(--accent); border-right:1px solid var(--accent); position:relative; flex-shrink:0; }
.fc-range-mark::after { content:""; height:1px; background:var(--accent); position:absolute; left:0; right:0; top:3px; }
.fc-demo .fc-detail { margin:0; background:transparent; border-radius:0; padding:0; }
.fc-demo .fc-detail summary { padding:20px 0; }
.fc-demo .fc-detail summary > svg { width:18px; height:18px; flex-shrink:0; }
.fc-demo .fc-detail-content { font-size:14px; color:var(--ink-2); line-height:1.6; }
.fc-detail-content h3 { color:var(--ink); font-size:15px; margin:24px 0 8px; }
.fc-detail-month { margin-top:0; color:var(--ink); font-weight:500; }
.fc-detail-row,.fc-detail-total { align-items:baseline; }
.fc-detail-row span { min-width:0; }
.fc-detail-row strong,.fc-detail-total strong { white-space:nowrap; font-variant-numeric:tabular-nums; }
.fc-detail-total { display:flex; justify-content:space-between; gap:16px; padding:14px 0; border-top:1px solid var(--border); color:var(--ink); }
.fc-personal-note small { display:block; margin-top:3px; }
.fc-saving-detail { border-top:1px solid var(--border) !important; margin-top:20px !important; }
.fc-saving-detail .card { background:transparent; margin:0; padding:0; border:0; box-shadow:none; }
.fc-saving-detail h2 { font-size:20px; margin:0; }
.fc-saving-values { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:24px 0; }
.fc-saving-values strong { display:block; font-size:28px; margin-top:8px; font-variant-numeric:tabular-nums; }
.fc-flow { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; border-top:1px solid var(--border); padding:20px 0; }
.fc-flow > b { grid-column:1/-1; color:var(--ink); }
.fc-flow span { display:block; color:var(--ink-2); font-size:13px; }
.fc-flow strong { display:block; margin-top:4px; color:var(--ink); font-variant-numeric:tabular-nums; }
.fc-preview { max-height:420px; overflow:hidden; filter:blur(4px); pointer-events:none; user-select:none; margin-top:16px; }
.fc-demo :is(button,summary,input,[role="button"]):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.fc-demo .fc-next button,.fc-demo .fc-back { transition:background .2s cubic-bezier(.22,1,.36,1),color .2s cubic-bezier(.22,1,.36,1); }
@media (hover:hover) {
  .fc-next button:hover { background:var(--accent-soft); }
  .fc-detail summary:hover b { color:var(--accent); }
}
@media (min-width:1200px) {
  .fc-upper { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.15fr); gap:32px; align-items:start; }
  .fc-demo .fc-hero { padding:28px 28px 0; }
  .fc-demo .fc-main-number { font-size:68px; }
  .fc-hero-head { font-size:15px; }
  .fc-kicker { margin-top:30px; }
  .fc-next { margin:0 -28px; padding:19px 16px; }
  .fc-two-values { margin-bottom:30px; }
  .fc-uncertainty { margin-bottom:28px; }
  .fc-story { margin:0; padding:6px 0 0; }
  .fc-chart-caption { margin-bottom:24px; }
  .fc-story .fc-readout { margin-top:27px; }
  .fc-minimap { height:66px; }
  .fc-window-head { margin-top:15px; }
  .fc-drill { margin-top:38px; padding-top:12px; }
  .fc-method-wrap { max-width:760px; margin:0 auto; }
  .fc-demo .fc-detail summary { min-height:80px; }
  .fc-personal-note { max-width:45%; }
  .fc-flow { grid-template-columns:1.1fr repeat(4,minmax(0,1fr)); align-items:center; }
  .fc-flow > b { grid-column:auto; }
}
@media (max-width:380px) {
  .fc-section-head { flex-wrap:wrap; align-items:flex-start; gap:12px; }
  .fc-demo .fc-hero { padding-left:18px; padding-right:18px; }
  .fc-next { margin-left:-18px; margin-right:-18px; padding-left:8px; padding-right:8px; }
  .fc-two-values { gap:10px; }
  .fc-two-values span { font-size:11px; }
  .fc-next b { font-size:18px; }
  .fc-demo .fc-main-number { font-size:clamp(42px,16vw,60px); }
}
@media (prefers-reduced-motion:reduce) { .fc-demo * { transition:none!important; animation:none!important; scroll-behavior:auto!important; } }

/* Approfondimenti: superfici leggere, cifre dominanti, nessuna nuova palette. */
.fc-recipe { min-width:0; }
.fc-recipe .fc-detail-month { font-size:14px; margin:0 0 18px; }
.fc-calc-parts { display:grid; gap:18px; }
.fc-calc-tile { position:relative; isolation:isolate; min-width:0; overflow:hidden; border:1px solid var(--border); border-radius:18px; padding:16px 18px 18px; background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 7%,var(--surface)),color-mix(in srgb,var(--surface) 88%,transparent)); box-shadow:var(--shadow); }
.fc-calc-heading { display:flex; align-items:center; gap:10px; min-height:34px; color:var(--ink-2); font-size:13px; line-height:1.4; position:relative; z-index:1; }
.fc-calc-icon { display:grid; place-items:center; width:30px; height:30px; flex-shrink:0; border-radius:10px; background:var(--accent-soft); color:var(--accent); }
.fc-calc-icon svg { width:17px; height:17px; }
.fc-calc-tile > strong { position:relative; z-index:1; display:block; margin:12px 0 16px; font-size:32px; font-weight:550; letter-spacing:-.04em; line-height:1.15; font-variant-numeric:tabular-nums; color:var(--ink); white-space:nowrap; }
.fc-calc-watermark { position:absolute; z-index:-1; right:12px; bottom:7px; color:var(--accent); opacity:.09; pointer-events:none; }
.fc-calc-watermark svg { width:86px; height:86px; stroke-width:1; }
.fc-calc-plus { position:absolute; right:14px; top:14px; color:var(--ink-2); opacity:.5; font-size:18px; line-height:1; }
.fc-calc-heading { padding-right:12px; }
.fc-calc-meter { height:4px; border-radius:4px; background:color-mix(in srgb,var(--accent) 11%,var(--surface)); overflow:hidden; }
.fc-calc-meter i { display:block; height:100%; border-radius:inherit; background:var(--accent); }
.fc-calc-ordinary .fc-calc-meter i { opacity:.6; }
.fc-calc-irregular .fc-calc-meter i { background:repeating-linear-gradient(120deg,var(--accent),var(--accent) 2px,var(--accent-soft) 2px,var(--accent-soft) 4px); }
.fc-calc-total { position:relative; isolation:isolate; overflow:hidden; border:1px solid color-mix(in srgb,var(--accent) 32%,var(--border)); border-radius:18px; margin-top:18px; padding:22px; background:radial-gradient(ellipse at 100% 100%,color-mix(in srgb,var(--accent) 19%,transparent),transparent 80%),var(--surface); box-shadow:var(--shadow); }
.fc-calc-total span { display:block; font-size:14px; color:var(--ink-2); }
.fc-calc-total strong { display:block; margin-top:8px; color:var(--accent); font-size:42px; letter-spacing:-.045em; font-weight:550; line-height:1.15; font-variant-numeric:tabular-nums; white-space:nowrap; }
.fc-calc-explanation { margin:18px 0 4px; font-size:13px; line-height:1.6; color:var(--ink-2); }
.fc-savings .fc-saving-values { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; margin:24px 0 18px; }
.fc-saving-card { --fc-tone:var(--accent); position:relative; isolation:isolate; overflow:hidden; min-width:0; border:1px solid color-mix(in srgb,var(--fc-tone) 27%,var(--border)); border-radius:24px; padding:24px; background:radial-gradient(ellipse at 100% 100%,color-mix(in srgb,var(--fc-tone) 16%,transparent),transparent 75%),color-mix(in srgb,var(--surface) 92%,transparent); box-shadow:var(--shadow); }
.fc-saving-card.fc-loss,.fc-flow-balance.fc-loss { --fc-tone:var(--bad-ink); }
.fc-saving-period { display:block; position:relative; z-index:1; font-size:14px; line-height:1.45; color:var(--ink-2); }
.fc-saving-card p { position:relative; z-index:1; margin:10px 0 0; color:var(--ink-2); font-size:13px; }
.fc-savings .fc-saving-card > strong { display:block; position:relative; z-index:1; color:var(--fc-tone); font-size:46px; font-weight:550; letter-spacing:-.045em; line-height:1.1; margin:14px 0 0; font-variant-numeric:tabular-nums; white-space:nowrap; }
.fc-saving-icon { position:absolute; right:10px; bottom:-12px; color:var(--fc-tone); opacity:.08; z-index:-1; }
.fc-saving-icon svg { width:120px; height:120px; stroke-width:1; }
.fc-saving-total { padding-bottom:88px; }
.fc-savings-backdrop { position:absolute; left:0; bottom:0; width:100%; height:82px; color:var(--fc-tone); pointer-events:none; }
.fc-savings-area { fill:currentColor; opacity:.07; }
.fc-savings-trend { fill:none; stroke:currentColor; stroke-width:1.5; stroke-dasharray:4 4; opacity:.35; }
.fc-savings-explanation { font-size:13px; color:var(--ink-2); line-height:1.6; margin:16px 0; }
.fc-savings .fc-monthly { border:1px solid var(--border); border-radius:18px; padding:0 18px; background:color-mix(in srgb,var(--surface) 70%,transparent); margin:22px 0; }
.fc-savings .fc-monthly > summary { display:flex; justify-content:space-between; align-items:center; gap:14px; list-style:none; min-height:60px; padding:16px 0; cursor:pointer; color:var(--ink); font-size:14px; font-weight:500; }
.fc-monthly > summary::-webkit-details-marker { display:none; }
.fc-monthly > summary svg { width:18px; height:18px; flex-shrink:0; transition:transform .2s cubic-bezier(.22,1,.36,1); }
.fc-monthly[open] > summary svg { transform:rotate(90deg); }
.fc-flow-list { display:grid; gap:14px; padding-bottom:18px; }
.fc-flow-card { border:1px solid var(--border); border-radius:16px; padding:18px; background:color-mix(in srgb,var(--surface) 88%,transparent); min-width:0; }
.fc-flow-card header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:16px; margin-bottom:12px; border-bottom:1px solid var(--border); }
.fc-flow-card header > b { color:var(--ink); font-size:15px; font-weight:500; }
.fc-flow-balance { --fc-tone:var(--accent); text-align:right; }
.fc-flow-balance span { display:block; font-size:11px; color:var(--ink-2); }
.fc-flow-balance strong { display:block; font-size:25px; font-weight:550; letter-spacing:-.035em; color:var(--fc-tone); white-space:nowrap; font-variant-numeric:tabular-nums; }
.fc-flow-card dl { display:grid; gap:10px; margin:0; }
.fc-flow-card dl > div { display:flex; justify-content:space-between; align-items:baseline; gap:14px; }
.fc-flow-card dt { font-size:13px; color:var(--ink-2); }
.fc-flow-card dd { margin:0; color:var(--ink); font-size:14px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.fc-savings :is(summary,button):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@supports (backdrop-filter:blur(8px)) { .fc-calc-tile,.fc-saving-card { backdrop-filter:blur(8px); } }
@media (hover:hover) {
  .fc-calc-tile { transition:border-color .25s cubic-bezier(.22,1,.36,1),box-shadow .25s cubic-bezier(.22,1,.36,1); }
  .fc-calc-tile:hover { border-color:color-mix(in srgb,var(--accent) 40%,var(--border)); }
}
@media (min-width:735px) {
  .fc-calc-parts { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
  .fc-calc-tile > strong { font-size:clamp(23px,2.3vw,32px); }
  .fc-calc-heading { align-items:flex-start; min-height:44px; }
  .fc-calc-total { display:flex; justify-content:space-between; align-items:center; gap:20px; }
  .fc-calc-total strong { margin:0; }
  .fc-savings .fc-saving-values { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .fc-flow-card dl { grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
  .fc-flow-card dl > div { display:block; }
  .fc-flow-card dd { margin-top:5px; font-size:18px; }
}
@media (max-width:380px) {
  .fc-calc-tile { padding:14px 16px 16px; }
  .fc-calc-total { padding:20px; }
  .fc-calc-total strong { font-size:36px; }
  .fc-saving-card { padding:20px; }
  .fc-saving-total { padding-bottom:82px; }
  .fc-savings .fc-saving-card > strong { font-size:42px; }
  .fc-flow-card { padding:14px; }
  .fc-flow-card header { align-items:flex-start; gap:10px; }
}
@media (prefers-reduced-motion:reduce) { .fc-savings * { transition:none!important; animation:none!important; } }

.fc-savings > h2 { color:var(--ink); font-size:20px; font-weight:550; }

/* Categorie: torta + elenco */
.fc-cat-split { display:grid; grid-template-columns:minmax(0,1fr); gap:18px; align-items:center; margin:6px 0 4px; }
.fc-pie { margin:0 auto; width:min(220px,72%); }
.fc-pie svg { display:block; width:100%; height:auto; overflow:visible; }
.fc-pie :is(path,circle) { stroke:var(--surface); stroke-width:2; stroke-linejoin:round; }
.fc-cat-list .fc-detail-row > span:first-child { display:flex; align-items:center; gap:9px; flex:1; }
.fc-dot { width:10px; height:10px; border-radius:3px; flex:none; }
.fc-pct { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; min-width:36px; text-align:right; }
@media (min-width:735px) { .fc-cat-split { grid-template-columns:minmax(170px,230px) minmax(0,1fr); gap:34px; max-width:780px; } .fc-pie { width:100%; } }
.fc-method-wrap { margin-top:0; }
