/* Guide di QuantoCasa. Layout: testata scura su carta millimetrata; sotto, i numeri chiave disegnati come
   le stanze di una planimetria; poi colonna di lettura a sinistra e riquadro fisso verso il calcolatore a destra. */
:root {
  --bg: #F3EDE0; --surface: #FFFBF3; --field: #FAF4E7; --ink: #26211B; --muted: #695F52; --line: #E3D8C3; --edge: #8F816D; --soft: #EFE5D0;
  --accent: #24614A; --accent-ink: #FFFFFF; --cta: #E8B04A; --cta-ink: #2A1E05; --cost: #A63D2B;
  --hero-bg: #1F4A3A; --hero-soft: #183A2D; --hero-fg: #F6F0E2; --hero-muted: #BFD3C6; --hero-line: #2C5E4A;
  --shadow: rgba(45, 35, 20, 0.3);
  --c1: #E8B04A; --c2: #EDB7A6; --c3: #FBEFE0; --c4: #E28C5C; --c5: #F3D78E; --c6: #D98C7C;
  --shut: #2E6347; --glass: #4A2A22; --glass-lit: #4A2A22; --roof: #2C1612; --shade: #2A1F1A; --sign: #A63D2B;
  --k-tax: #A8452F; --k-pro: #B8851C; --k-loan: #187A58; --k-oth: #87559F; --k-net: #187A58; --k-debt: #3A76B5; --s1: #187A58; --s2: #B8851C;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131614; --surface: #1C211D; --field: #161A17; --ink: #EEEBE2; --muted: #A5A89C; --line: #323A34; --soft: #263029;
    --accent: #92B0A5; --accent-ink: #10201A; --cost: #EB957F;
    --hero-bg: #173A2D; --hero-soft: #112C22; --hero-fg: #F6F0E2; --hero-muted: #B5CABD; --hero-line: #24503F;
    --shadow: rgba(0, 0, 0, 0.6); --edge: #6F7A70;
    --k-tax: #B04E3C; --k-pro: #BF861C; --k-loan: #2C9A74; --k-oth: #A678C4; --k-net: #2C9A74; --k-debt: #5590D0; --s1: #2C9A74; --s2: #BF861C;
    --c1: #C2923F; --c2: #C4978A; --c3: #D8CCBD; --c4: #BC744C; --c5: #C9B274; --c6: #B37467; --glass-lit: #F6CB6A;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.65; }
h1, h2, h3, p, ul, figure { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }

/* Testata */
.hero { position: relative; overflow: hidden; background: var(--hero-bg); color: var(--hero-fg); padding-block: 22px 112px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
  mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
}
.hero .wrap { position: relative; display: flex; flex-direction: column; gap: 14px; }
.nav { display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; margin-bottom: 36px; }
.nav .logo { margin-right: auto; }
.navlink { color: var(--hero-muted); font-weight: 600; font-size: 15px; text-decoration: none; padding-block: 4px; }
.navlink:hover { color: var(--hero-fg); }
.kicker a { color: var(--hero-fg); }
.hero.plain { padding-block: 22px 52px; }
.hero-art { display: none; position: absolute; right: 20px; bottom: -40px; width: 300px; height: auto; }
.hero.plain .hero-art { bottom: -52px; }
.hero-art text { font-family: var(--body); }
.hero-art .lit { fill: var(--glass-lit); }
.hero-art .sl, .hero-art .sr { animation: shut-l 0.8s cubic-bezier(0.3, 0.7, 0.3, 1) both; animation-delay: var(--d, 0ms); }
.hero-art .sr { animation-name: shut-r; }
@keyframes shut-l { from { transform: translateX(5.5px); } to { transform: none; } }
@keyframes shut-r { from { transform: translateX(-5.5px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-art .sl, .hero-art .sr { animation: none; } }
@media (min-width: 1000px) {
  .hero-art { display: block; }
  .hero.art h1, .hero.art .lead, .hero.art .kicker { max-width: calc(100% - 350px); }
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; color: var(--hero-fg); text-decoration: none; }
.mark { width: 30px; height: 30px; flex: none; }
.kicker { font-size: 14px; font-weight: 500; color: var(--hero-muted); }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5.2vw, 3.3rem); line-height: 1.04; letter-spacing: -0.025em; max-width: 18em; text-wrap: balance; }
.lead { font-size: 1.15rem; line-height: 1.55; color: var(--hero-muted); max-width: 62ch; }
.hero a:focus-visible { outline-color: var(--hero-fg); }

.btn {
  display: inline-block; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.3; text-decoration: none;
}
.btn.ghost { background: transparent; border-color: var(--hero-line); color: var(--hero-fg); }
.btn.ghost:hover { border-color: var(--hero-fg); }
.btn.primary { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); font-size: 16px; padding: 13px 20px; }

/* I numeri chiave come stanze di una planimetria: muri spessi, porte con l'arco di apertura, una finestra, la quota sotto. */
.pianta-box { position: relative; margin-top: -72px; }
.pianta {
  list-style: none; padding: 0; position: relative;
  display: grid; grid-template-columns: 1.25fr 1fr 1fr;
  background: var(--surface); border: 4px solid var(--ink); box-shadow: 0 22px 44px -26px var(--shadow);
}
.pianta::before {
  content: ""; position: absolute; top: -4px; right: 44%; width: 92px; height: 4px;
  background: var(--surface); box-shadow: inset 0 1px 0 var(--ink), inset 0 -1px 0 var(--ink);
}
.pianta li { position: relative; min-width: 0; padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 6px; }
.pianta li + li { border-left: 4px solid var(--ink); padding-left: 44px; }
.pianta li + li::before { content: ""; position: absolute; left: -4px; bottom: 18px; width: 4px; height: 30px; background: var(--surface); }
.pianta li + li::after {
  content: ""; position: absolute; left: 0; bottom: 18px; width: 30px; height: 30px;
  border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  border-top-right-radius: 100%;
}
.pianta strong { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.05; letter-spacing: -0.02em; white-space: nowrap; }
.pianta span { font-size: 14px; line-height: 1.4; color: var(--muted); }
.quota { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.quota::before, .quota::after { content: ""; flex: 1; height: 9px; background: linear-gradient(var(--muted), var(--muted)) center / 100% 1px no-repeat; }
.quota::before { border-left: 1px solid var(--muted); }
.quota::after { border-right: 1px solid var(--muted); }
.quota span { text-align: center; }

/* Corpo */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; padding-block: 44px 72px; }
.article { display: flex; flex-direction: column; gap: 18px; min-width: 0; max-width: 690px; }
.article h2 { font-family: var(--display); font-weight: 500; font-size: 1.6rem; line-height: 1.2; margin-top: 22px; text-wrap: balance; }
.article > h2:first-child { margin-top: 0; }
.article ul { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.distinta { margin-block: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.distinta figcaption { background: var(--hero-bg); color: var(--hero-fg); padding: 12px 20px; font-weight: 600; font-size: 15px; }
.distinta table { width: 100%; border-collapse: collapse; font-size: 15px; }
.distinta th, .distinta td { padding: 10px 20px; text-align: left; font-weight: 400; vertical-align: top; border-bottom: 1px dotted var(--line); }
.distinta td { text-align: right; white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.distinta td.neg { color: var(--cost); }
.distinta tr.sum th, .distinta tr.sum td { font-weight: 600; border-top: 1px solid var(--ink); }
.distinta tr.final th, .distinta tr.final td { font-weight: 600; font-size: 16px; border-top: 2px solid var(--ink); border-bottom: 0; }
.distinta tr.final td { color: var(--accent); }
.cta-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding: 20px; background: var(--soft); border-radius: 14px; }
.cta-box span { font-size: 14px; color: var(--muted); }
.faq { display: flex; flex-direction: column; margin-top: 22px; }
.faq h2 { margin-top: 0; margin-bottom: 6px; }
.q { padding-block: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.q h3 { font-family: var(--display); font-weight: 500; font-size: 1.15rem; line-height: 1.3; }
.sources { margin-top: 14px; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.sources h2 { font-family: var(--body); font-weight: 600; font-size: 14px; margin: 0; }
.sources ul { gap: 4px; }

/* Colonna laterale */
.side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.side-cta { background: var(--hero-bg); color: var(--hero-fg); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.side-cta h2 { font-family: var(--display); font-weight: 500; font-size: 1.3rem; line-height: 1.2; }
.side-cta p { font-size: 14px; line-height: 1.5; color: var(--hero-muted); }
.side-cta .btn { text-align: center; }
.side-more h2 { font-family: var(--body); font-weight: 600; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.side-more ul { list-style: none; padding: 0; display: flex; flex-direction: column; }
.side-more a { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; line-height: 1.35; }
.side-more a:hover { color: var(--accent); }

/* Piede */
.site-foot { background: var(--hero-bg); color: var(--hero-muted); padding-block: 32px 40px; }
.site-foot .wrap { display: flex; flex-direction: column; gap: 14px; }
.site-foot p { font-size: 13px; max-width: 78ch; }
.site-foot .wrap { gap: 22px; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px 28px; }
.foot-cols nav { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.foot-cols h3 { margin: 0 0 6px; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--hero-muted); }
.foot-cols a { padding-block: 4px; color: var(--hero-fg); font-size: 15px; font-weight: 500; text-decoration: none; }
.foot-cols a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-nav a { color: var(--hero-fg); font-weight: 600; font-size: 15px; text-decoration: none; padding-block: 4px; }
.foot-nav a:hover { text-decoration: underline; }
.site-foot a:focus-visible { outline-color: var(--hero-fg); }
.layout.single { grid-template-columns: minmax(0, 1fr); }
.lc { position: relative; min-width: 0; }
.lc svg { display: block; max-width: 100%; }
.lc text { font: 11px var(--body); fill: var(--muted); font-variant-numeric: tabular-nums; }
.lc-g { stroke: var(--line); stroke-width: 1; }
.lc-x { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.lc-l { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lc-d { stroke: var(--surface); stroke-width: 2; }
path.l1 { stroke: var(--s1); } path.l2 { stroke: var(--s2); } circle.l1 { fill: var(--s1); } circle.l2 { fill: var(--s2); }
.lc-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.lc-key span { display: inline-flex; align-items: center; gap: 7px; }
.lc-sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
i.l1 { background: var(--s1); } i.l2 { background: var(--s2); }
.lc-tip { position: absolute; top: 0; z-index: 2; pointer-events: none; min-width: 190px; padding: 10px 12px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.lc-tip b { font-weight: 600; }
.lc-tip span { display: flex; align-items: center; gap: 7px; }
.lc-tip em { margin-left: auto; font: 500 12px var(--mono); font-style: normal; }
.lc-scroll { overflow-x: auto; margin-top: 10px; }
.lc-table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 13px; }
.lc-table th, .lc-table td { padding: 6px 8px; text-align: right; border-bottom: 1px dotted var(--line); font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lc-table th { font-family: var(--body); font-weight: 600; color: var(--muted); }
.lc-table th:first-child, .lc-table td:first-child { text-align: left; }
.tool-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.tool-more span { font-size: 14px; font-weight: 600; color: var(--muted); margin-right: 6px; }
.tool-more a { padding: 8px 13px; border: 1px solid var(--edge); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.tool-more a:hover { border-color: var(--accent); }
.article h2 { scroll-margin-top: 16px; }
.toc { max-height: calc(100vh - 40px); overflow-y: auto; }
.toc.dense .side-more a { padding: 7px 0; font-size: 14px; }
@media (max-width: 900px) { .toc { display: none; } }
.gbar { margin: 6px 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 14px; }
.gbar figcaption { font-weight: 600; font-size: 15px; }
.gbar-track { display: flex; gap: 2px; height: 16px; border-radius: 4px; overflow: hidden; }
.gbar-track i { flex: 0 1 0; min-width: 3px; }
.article .gbar-key { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px 28px; font-size: 14px; }
.article.wide { max-width: none; }
.tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 24px; align-items: start; }
.tool-form { display: flex; flex-direction: column; gap: 16px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.article .tool-form h2 { margin: 0; font-size: 1.4rem; }
.tool-intro { font-size: 14px; color: var(--muted); margin-top: -8px; }
.frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > label, .fld > .lab { font-weight: 600; font-size: 14px; line-height: 1.4; }
.fld small { font-size: 13px; line-height: 1.45; color: var(--muted); }
.inp { display: flex; align-items: center; border: 1px solid var(--edge); border-radius: 10px; background: var(--field); }
.inp:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft); }
.inp input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); padding: 12px; font: 500 16px var(--mono); font-variant-numeric: tabular-nums; }
.inp span { padding-right: 12px; color: var(--muted); font: 14px var(--mono); white-space: nowrap; }
.fld select { width: 100%; padding: 12px; border: 1px solid var(--edge); border-radius: 10px; background: var(--field); color: var(--ink); font: 15px var(--body); }
.fld select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt { display: flex; flex-wrap: wrap; gap: 8px; }
.opt label { cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: block; padding: 10px 14px; border: 1px solid var(--edge); border-radius: 10px; background: var(--field); font-size: 14px; font-weight: 500; line-height: 1.4; }
.opt input:checked + span { background: var(--soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chk { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.tool-res { position: sticky; top: 20px; margin: 0; }
.tool.narrow { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tool.narrow .tool-res { position: static; }
.tool-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tool-side .tool-res { position: static; }
.frow3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.article .tool-form h2.fsec { margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.fld small a { color: var(--accent); }
.distinta td.neg, .distinta tr.final td.neg { color: var(--cost); }
.tool-res figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chip { font: 500 11px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--cta); color: var(--cta-ink); }
.tool-note { padding: 12px 20px 16px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.tool-text { display: flex; flex-direction: column; gap: 18px; max-width: 690px; margin-top: 10px; }
@media (max-width: 860px) { .tool { grid-template-columns: minmax(0, 1fr); } .tool-res, .tool-side { position: static; } }
@media (max-width: 520px) { .frow, .frow3 { grid-template-columns: minmax(0, 1fr); } .tool-form { padding: 18px 16px; } }
.gbar-key li { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.gbar-key span { margin-right: auto; }
.gbar-key b { font: 500 14px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gbar-key em { font-style: normal; font-size: 12px; color: var(--muted); min-width: 4ch; text-align: right; }
.kdot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; }
.k-tax { background: var(--k-tax); } .k-pro { background: var(--k-pro); } .k-loan { background: var(--k-loan); } .k-oth { background: var(--k-oth); }
.k-net { background: var(--k-net); } .k-debt { background: var(--k-debt); }
.k-f1 { background: color-mix(in srgb, var(--k-tax) 40%, var(--surface)); } .k-f2 { background: color-mix(in srgb, var(--k-tax) 68%, var(--surface)); } .k-f3 { background: var(--k-tax); }
.article ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
kbd { font: 500 0.85em var(--mono); padding: 2px 6px; border: 1px solid var(--edge); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }
.bm-box { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; padding: 22px; border: 2px dashed var(--edge); border-radius: 14px; background: var(--surface); }
.bm-box .btn { cursor: grab; }
.bm-box span { font-size: 15px; color: var(--muted); }
.bm-msg { font-size: 15px; color: var(--muted); min-height: 1.6em; }
.bm-code { width: 100%; padding: 10px 12px; border: 1px solid var(--edge); border-radius: 10px; background: var(--field); color: var(--ink); font: 12px/1.5 var(--mono); resize: vertical; margin-top: 8px; }
button.btn { cursor: pointer; font-family: inherit; border-color: var(--edge); }
.term { color: inherit; text-decoration: underline dotted var(--muted); text-underline-offset: 4px; }
.term:hover { color: var(--accent); text-decoration-style: solid; }
.gloss { display: flex; flex-direction: column; margin: 0; }
.gloss > div { padding: 18px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 16px; }
.gloss > div:target { background: var(--soft); padding-inline: 16px; border-radius: 12px; border-top-color: transparent; }
.gloss dt { font-family: var(--display); font-weight: 500; font-size: 1.25rem; line-height: 1.3; }
.gloss dd { margin: 0; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 20px 18px; }
.share-row .btn { flex: 1 1 auto; text-align: center; font-size: 14px; padding: 9px 12px; }
.share-msg { flex-basis: 100%; margin: 0; min-height: 1.2em; font-size: 13px; color: var(--accent); }
.sched-actions + .tool-note + .share-row, .sched-actions ~ .share-row { padding-top: 0; }
#sheet, #sheet-data { display: none; }
@media print {
  body.printing .hero, body.printing .site-foot, body.printing .tool-form, body.printing .tool-text, body.printing .tool-more,
  body.printing .cta-box, body.printing .vote, body.printing .toc, body.printing .share-row, body.printing .sched-actions,
  body.printing #o-msg, body.printing .rbar, body.printing .side, body.printing .payc-key { display: none !important; }
  body.printing { background: #fff; }
  body.printing #sheet, body.printing #sheet-data { display: block; margin-bottom: 14px; }
  body.printing .chip { display: none !important; }
  body.printing .distinta th, body.printing .distinta td { padding: 5px 14px; font-size: 12px; }
  body.printing .distinta figcaption { padding: 8px 14px; font-size: 13px; }
  body.printing .res-big { padding: 0 14px 10px; } body.printing .res-big strong { font-size: 28px; }
  body.printing .tool-note { padding: 8px 14px; font-size: 11px; }
  body.printing .payc svg { height: 90px; }
  body.printing .layout, body.printing .tool, body.printing .tool-side { display: block; }
  body.printing .tool-res, body.printing .gbar, body.printing .stress, body.printing #sheet-data figure, body.printing .sched li { break-inside: avoid; margin: 0 0 12px; position: static; }
  body.printing * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sh-top { display: flex; justify-content: space-between; font-size: 12px; color: #555; border-bottom: 2px solid #1F4A3A; padding-bottom: 6px; }
  .sh-top strong { color: #1F4A3A; font-size: 15px; }
  #sheet h1 { font-size: 22px; color: #111; margin: 12px 0; max-width: none; }
  .sh-link { font-size: 11px; color: #555; margin: 4px 0 0; word-break: break-all; }
  .sh-link a { color: #1F4A3A; }
}
.res-big { background: var(--hero-bg); color: var(--hero-fg); padding: 0 20px 18px; display: flex; flex-direction: column; gap: 2px; }
.res-big span { font-size: 13px; color: var(--hero-muted); }
.res-big strong { font: 700 clamp(2rem, 3.6vw, 2.6rem)/1.1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.res-big.neg strong { color: #F2A28F; }
.has-big figcaption { padding-bottom: 8px; }
.payc { padding: 16px 20px 6px; }
.payc svg { display: block; width: 100%; height: 120px; }
.payc .bn { fill: var(--k-tax); } .payc .bp { fill: var(--k-net); } .payc .z { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.payc-x { display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--muted); margin-top: 4px; }
.payc-key { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.payc-key span { display: inline-flex; align-items: center; gap: 6px; }
.sbar { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; max-width: 260px; }
.sbar i { display: block; height: 100%; border-radius: 3px; }
.hero-art .badge text, .hero-art .scaff { font-family: var(--body); }
.stress { margin-top: 18px; }
.stress thead th { font: 500 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: 12px; padding-bottom: 8px; }
.stress thead th + th { text-align: right; }
@media (max-width: 520px) { .stress th, .stress td { padding-left: 14px; padding-right: 14px; font-size: 14px; } }
.rbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; }
.rbar button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; cursor: pointer; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--hero-bg); color: var(--hero-fg); font: 600 13px var(--body); text-align: left; box-shadow: 0 -8px 20px -12px var(--shade); }
.rbar strong { font: 600 18px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--cta); }
.rbar.neg strong { color: #F2A28F; }
@media print { .rbar { display: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tool-sub { display: flex; flex-direction: column; gap: 16px; }
.fld input.date { width: 100%; padding: 11px 12px; border: 1px solid var(--edge); border-radius: 10px; background: var(--field); color: var(--ink); font: 500 15px var(--mono); color-scheme: light dark; }
.fld input.date:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sched-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 20px 0; }
.sched-actions .btn { flex: 1 1 auto; text-align: center; }
.sched-actions .btn:disabled { opacity: .5; cursor: not-allowed; }
.sched { margin-top: 28px; max-width: 820px; }
.sched h3 { font-family: var(--display); font-weight: 500; font-size: 1.3rem; margin: 22px 0 4px; }
.article .sched ol { list-style: none; padding: 0; margin: 0; display: block; }
.sched li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.sched time { font: 600 15px var(--mono); color: var(--accent); font-variant-numeric: tabular-nums; display: flex; flex-direction: column; gap: 2px; }
.sched time small { font: 400 12px var(--body); color: var(--muted); }
.sched li b { display: block; font-weight: 600; line-height: 1.4; }
.sched li span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--muted); }
@media (max-width: 520px) { .sched li { grid-template-columns: 74px minmax(0, 1fr); gap: 4px 12px; } }
@media print { #sc-form, .sched-actions, #o-msg, .tool-more, .vote { display: none !important; } .tool { grid-template-columns: 1fr; } }
.vote { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 22px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.vote-q { font-weight: 600; margin-right: auto; }
.vote-b { display: flex; gap: 8px; }
.vote button.btn { cursor: pointer; font-family: inherit; border-color: var(--edge); }
.vote button.btn:hover { border-color: var(--accent); }
.vote button.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vote-more { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.vote-more label { font-size: 15px; }
.vote-more textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--edge); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; font-size: 15px; resize: vertical; }
.vote-more textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.vote-done { flex-basis: 100%; font-size: 15px; color: var(--muted); }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-block: 36px 56px; }
  .side { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-block: 18px 96px; }
  .nav { margin-bottom: 26px; gap: 6px 20px; }
  .nav .btn.ghost { display: none; }
  .nav .logo { flex-basis: 100%; }
  .pianta { grid-template-columns: minmax(0, 1fr); }
  .pianta li { padding: 20px 20px 22px; }
  .pianta li + li { border-left: 0; border-top: 4px solid var(--ink); padding-left: 20px; }
  .pianta li + li::before { left: auto; right: 22px; top: -4px; bottom: auto; width: 30px; height: 4px; }
  .pianta li + li::after {
    left: auto; right: 22px; top: 0; bottom: auto;
    border-top: 0; border-left: 1.5px solid var(--muted); border-top-right-radius: 0; border-bottom-left-radius: 100%;
  }
  .pianta::before { right: 16%; width: 70px; }
  .pianta strong { white-space: normal; }
  .distinta th, .distinta td { padding: 9px 14px; }
  .distinta figcaption { padding: 12px 14px; }
}
.intro { font-size: 1.12rem; line-height: 1.6; }
details.q { display: block; padding-block: 0; }
details.q > summary { list-style: none; cursor: pointer; padding-block: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
details.q > summary::-webkit-details-marker { display: none; }
details.q > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
details.q[open] > summary::after { transform: rotate(-135deg); }
details.q > p { padding-bottom: 18px; }
details.q > summary:focus-visible, details.sources > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
details.sources { display: block; }
details.sources > summary { cursor: pointer; font-weight: 600; }
details.sources ul { margin-top: 8px; }
/* Tema "Planimetria": carta millimetrata, inchiostro verde scuro, quote di misura, angoli vivi; pulsanti ocra, verde e mattone. */
:root {
  --bg: #F6F4EE; --surface: #FBFAF6; --field: #FFFEFA; --ink: #1F3B33; --muted: #5E6E66; --line: #CFC9B9; --edge: #1F3B33; --soft: #EFEADF;
  --brand: #24614A; --brand-ink: #F6F4EE; --accent: #24614A; --accent-ink: #F6F4EE;
  --hero-bg: #FBFAF6; --hero-soft: #FBFAF6; --hero-fg: #1F3B33; --hero-muted: #45574F; --hero-line: #1F3B33;
  --cta: #E8B04A; --cta-ink: #1F2A24; --cost: #A8432C; --rule: #1F3B33; --brick: #A63D2B; --brick-ink: #FBF3EC;
  --tab-on: #1F3B33; --tab-on-ink: #F6F4EE; --grid: #E6E2D7; --ico: #A8432C;
  --paper-a: #E6E2D7; --paper-b: #DAD5C6; --door-line: #D29A2E; --bar-num: #E8B04A;
  --display: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101714; --surface: #16201C; --field: #121A17; --ink: #E6E2D7; --muted: #9DAAA3; --line: #34423C; --edge: #8FA198; --soft: #1D2925;
    --brand: #4FA884; --brand-ink: #0D1512; --accent: #6CC39F; --accent-ink: #0D1512;
    --hero-bg: #16201C; --hero-soft: #16201C; --hero-fg: #E6E2D7; --hero-muted: #B4BFB9; --hero-line: #8FA198;
    --cta: #E8B04A; --cta-ink: #1A1408; --cost: #EC9580; --rule: #8FA198; --brick: #B8503C; --brick-ink: #FFF4EE;
    --tab-on: #E6E2D7; --tab-on-ink: #101714; --grid: #1E2A26; --ico: #EC9580;
    --paper-a: #18231F; --paper-b: #1F2D28; --door-line: #E8B04A; --bar-num: #7A4E00;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101714; --surface: #16201C; --field: #121A17; --ink: #E6E2D7; --muted: #9DAAA3; --line: #34423C; --edge: #8FA198; --soft: #1D2925;
  --brand: #4FA884; --brand-ink: #0D1512; --accent: #6CC39F; --accent-ink: #0D1512;
  --hero-bg: #16201C; --hero-soft: #16201C; --hero-fg: #E6E2D7; --hero-muted: #B4BFB9; --hero-line: #8FA198;
  --cta: #E8B04A; --cta-ink: #1A1408; --cost: #EC9580; --rule: #8FA198; --brick: #B8503C; --brick-ink: #FFF4EE;
  --tab-on: #E6E2D7; --tab-on-ink: #101714; --grid: #1E2A26; --ico: #EC9580;
  --paper-a: #18231F; --paper-b: #1F2D28; --door-line: #E8B04A; --bar-num: #7A4E00;
  color-scheme: dark;
}
body {
  background-color: var(--bg);
  background-image: linear-gradient(var(--paper-a) 1px, transparent 1px), linear-gradient(90deg, var(--paper-a) 1px, transparent 1px),
    linear-gradient(var(--paper-b) 1px, transparent 1px), linear-gradient(90deg, var(--paper-b) 1px, transparent 1px);
  background-size: 12px 12px, 12px 12px, 96px 96px, 96px 96px;
}

h1, h2, .t-name, .g-num, .how strong { letter-spacing: -0.025em; }
h1 { font-weight: 700; }
.hero::before { display: none !important; }
.hero { background: transparent !important; color: var(--ink); }
.page > .hero { border: 1.5px solid var(--rule); background: var(--surface) !important; }
header.hero { border-bottom: 1.5px solid var(--rule); }
header.hero.art:not(.plain) { border-bottom: 0; }
header.hero.art:not(.plain)::after { display: none; }
.kicker, .doors-lab, .tag, .g-cap, .chip, .foot-cols h3, .distinta figcaption, .gbar figcaption { font-family: var(--mono); }
.kicker { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.card, .statement, .distinta, .tool-form, .gbar, .guides a, .vote, .cta-box, .side-cta, .bm-box, .tabs, .tool-more a, .how li::before {
  border: 1.5px solid var(--rule) !important; box-shadow: none !important;
}
.guides a, .tool-more a { background: var(--surface); }
.guides a:hover, .tool-more a:hover { background: var(--field); border-color: var(--rule) !important; }
.distinta figcaption, .gbar figcaption { background: var(--soft) !important; color: var(--ink) !important; border-bottom: 1.5px solid var(--rule); font-size: 12px !important; font-weight: 600 !important; letter-spacing: .08em; text-transform: uppercase; }
.gbar figcaption { border-bottom: 0; background: transparent !important; }
.distinta figcaption .chip { font-size: 10px; }
.st-head, .res-big { background: var(--surface) !important; color: var(--ink) !important; border-bottom: 1.5px solid var(--rule); }
.res-big span, .st-head .st-lab { color: var(--muted) !important; }
.res-big.neg strong { color: var(--cost) !important; }
.site-foot { background: var(--surface) !important; border-top: 1.5px solid var(--rule); color: var(--muted) !important; }
.tabs { background: var(--surface) !important; padding: 0 !important; gap: 0 !important; }
.tab { border-right: 1.5px solid var(--rule) !important; }
.tab:last-child { border-right: 0 !important; }
.btn, button.btn { border: 1.5px solid var(--rule) !important; }
.btn.primary, .btn.cta { background: var(--cta) !important; color: var(--cta-ink) !important; }
.btn.ghost { background: var(--surface) !important; color: var(--ink) !important; }
.door { border: 1.5px solid var(--rule) !important; font-weight: 700 !important; }
.door:first-of-type { background: var(--cta) !important; color: var(--cta-ink) !important; }
a.door:nth-of-type(2) { background: var(--brand) !important; color: var(--brand-ink) !important; }
a.door:nth-of-type(3) { background: var(--brick) !important; color: var(--brick-ink) !important; }
.door .ic, .door:first-of-type .ic { stroke: currentColor !important; color: inherit !important; }
.door:hover { filter: brightness(1.07); }
.money, .inp, .fld select, .fld input.date, .seg span, .opt span, .check span, .color input { border-width: 1.5px !important; border-color: var(--edge) !important; }
.money:focus-within, .inp:focus-within { box-shadow: 0 0 0 3px var(--soft) !important; }
.rbar button, .bar { background: var(--ink) !important; color: var(--bg) !important; box-shadow: none !important; }
.rbar strong, .bar strong { color: var(--bar-num) !important; }
.tool-res .share-row .btn { background: var(--surface) !important; }
.tool-res .share-row .btn:first-child { background: var(--brand) !important; color: var(--brand-ink) !important; }
.sbar { border: 1px solid var(--rule); background: var(--surface) !important; }
.how li::before { background: var(--cta) !important; color: var(--cta-ink) !important; }
.plan .w { stroke: var(--ink); } .plan .wi { stroke: var(--ink); } .plan .dr { stroke: var(--door-line); }
.plan .dim { stroke: var(--muted); } .plan .room { fill: var(--soft); } .plan .lbl { fill: var(--muted); font-family: var(--mono); }
.plan .nm { fill: var(--ink); font-family: var(--body); } .plan .val { fill: var(--cost); font-family: var(--mono); } .plan .mask { fill: var(--surface); }
@media (min-width: 1000px) {
  .hero.art { min-height: 372px; }
  .hero-art.plan { top: 96px; bottom: auto !important; right: max(20px, calc((100% - 1120px) / 2 + 20px)); width: 300px; }
  .hero.art h1, .hero.art .lead, .hero.art .kicker { max-width: calc(100% - 340px); }
}

/* Effetti: la pianta si disegna da sola, i riquadri si sollevano come fogli, il risultato pulsa quando cambia. */
@keyframes qc-draw { to { stroke-dashoffset: 0; } }
@keyframes qc-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes qc-pulse { 0% { transform: scale(1.045); color: var(--cost); } 100% { transform: none; } }
@keyframes qc-sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.plan .w, .plan .wi, .plan .dr, .plan .dim { stroke-dasharray: 1700; stroke-dashoffset: 1700; animation: qc-draw 1.6s cubic-bezier(.6,.1,.3,1) forwards; }
.plan .wi { animation-delay: .35s; animation-duration: 1.2s; }
.plan .dr { animation-delay: .9s; animation-duration: .9s; }
.plan .dim { animation-delay: 1.1s; animation-duration: .8s; }
.plan .room { opacity: 0; animation: qc-in .6s 1s ease forwards; }
@keyframes qc-fade { from { opacity: 0; } to { opacity: 1; } }
.plan text, .plan .mask { opacity: 0; animation: qc-fade .5s 1.3s ease forwards; }
.plan .costs text { animation-delay: 1.6s; }
.plan .val text { animation-delay: 1.8s; }
.guides a, .tool-more a, .door, .btn, .share-row .btn, a.cta-box .btn {
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, filter .16s ease;
}
.guides a:hover, .tool-more a:hover, .door:hover, .btn:hover {
  transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--rule) !important;
}
.guides a:active, .tool-more a:active, .door:active, .btn:active { transform: none; box-shadow: none !important; }
.res-big strong { display: inline-block; transform-origin: left center; }
.res-big strong.flash, .st-head .flash { animation: qc-pulse .5s ease; }
header.hero, .page > .hero { position: relative; }
header.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 1.5px; background: var(--door-line); transform-origin: left; animation: qc-sweep 1.4s .2s cubic-bezier(.6,.1,.3,1) both; }
.tab { transition: background-color .2s ease, color .2s ease; }
@media (prefers-reduced-motion: reduce) {
  .plan .w, .plan .wi, .plan .dr, .plan .dim, .plan .room, .plan text, .plan .mask, header.hero::after { animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; transform: none !important; }
  .guides a, .tool-more a, .door, .btn { transition: none; }
  .guides a:hover, .tool-more a:hover, .door:hover, .btn:hover { transform: none; }
  .res-big strong.flash { animation: none; }
}
@media print { .plan * { animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; } }

/* Angoli ammorbiditi e altri effetti */
:root { --r-card: 16px; --r-btn: 11px; --r-in: 9px; }
.card, .tool-form, .gbar, .vote, .cta-box, .bm-box, .brandbox { border-radius: var(--r-card) !important; }
.distinta, .side-cta, .page > .hero, .stress, #sheet figure { border-radius: var(--r-card) !important; overflow: hidden; }
.statement { border-radius: var(--r-card) !important; }
.guides a, .tool-more a { border-radius: 13px !important; }
.btn, button.btn, .door, .share-row .btn, .sched-actions .btn { border-radius: var(--r-btn) !important; }
.money, .inp, .fld select, .fld input.date, .seg span, .opt span, .check span, .color input, .infobtn { border-radius: var(--r-in) !important; }
.tabs { border-radius: 14px !important; overflow: hidden; }
.tab { border-radius: 0 !important; }
.chip { border-radius: 999px !important; }
.rbar button { border-radius: 16px 16px 0 0 !important; }
.how li::before { border-radius: 50% !important; }
.sbar, .sbar i, .gbar-track, .split, .flow { border-radius: 5px !important; }
.kdot { border-radius: 3px !important; }
.statement .distinta, .card .distinta { border-radius: 12px !important; }
@keyframes qc-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.guides li { animation: qc-up .5s cubic-bezier(.2,.7,.3,1) both; }
.guides li:nth-child(2) { animation-delay: .06s; } .guides li:nth-child(3) { animation-delay: .12s; } .guides li:nth-child(4) { animation-delay: .18s; }
.guides li:nth-child(5) { animation-delay: .24s; } .guides li:nth-child(6) { animation-delay: .3s; } .guides li:nth-child(n+7) { animation-delay: .36s; }
.tool-res, .tool-form, .statement { animation: qc-up .55s .1s cubic-bezier(.2,.7,.3,1) both; }
.navlink, .nav a:not(.logo):not(.btn), .foot-cols a { background-image: linear-gradient(var(--door-line), var(--door-line)); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s ease, color .2s ease; }
.navlink:hover, .nav a:not(.logo):not(.btn):hover, .foot-cols a:hover { background-size: 100% 2px; text-decoration: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2.5px solid var(--door-line) !important; outline-offset: 2px; }
.t-name::after, .g-title::after { display: inline-block; transition: transform .2s ease; }
.guides a:hover .t-name::after, .guides a:hover .g-title::after { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
  .guides li, .tool-res, .tool-form, .statement { animation: none !important; }
  .navlink, .nav a, .foot-cols a, .t-name::after, .g-title::after { transition: none !important; }
}

.side-cta .guide-pdf { background: var(--surface); }
@media print {
  body.printing-guide { background: #fff; }
  body.printing-guide .nav, body.printing-guide .hero-art, body.printing-guide .side, body.printing-guide .site-foot, body.printing-guide .cta-box,
  body.printing-guide .vote, body.printing-guide .rbar, body.printing-guide header.hero::after { display: none !important; }
  body.printing-guide .layout { display: block; }
  body.printing-guide .sources { display: block; } body.printing-guide .sources[open], body.printing-guide details { display: block; }
  body.printing-guide .gbar, body.printing-guide .pianta-box, body.printing-guide figure { break-inside: avoid; }
  body.printing-guide * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.printing-guide .plan * { animation: none !important; }
}


/* Tema "Accogliente" (ottobre 2026): fondo caldo, niente carta millimetrata, bordi tenui, angoli morbidi, pulsanti a pillola, ombre leggere. Si somma ai temi precedenti e li sovrascrive. */
:root {
  --bg: #FBF8F3; --surface: #FFFFFF; --field: #FFFFFF; --ink: #1E2F29; --muted: #6A645C; --line: #EEE6DA; --edge: #D8CDBB; --soft: #F4EEE4;
  --brand: #1F5C47; --brand-ink: #FFFFFF; --accent: #1F5C47; --accent-ink: #FFFFFF;
  --hero-bg: #FBF8F3; --hero-soft: #FBF8F3; --hero-fg: #1E2F29; --hero-muted: #6A645C; --hero-line: #E7DECF;
  --rule: #ECE3D4; --tab-on: #1F5C47; --tab-on-ink: #FFFFFF; --paper-a: transparent; --paper-b: transparent;
  --sand: #F4EEE4; --sun: #F6D9A0; --sun-ink: #7A4E00; --blue: #2B5A8C; --blue-soft: #EAF1F7; --brick-soft: #F8ECE5; --green-soft: #E3EFE8;
  --shadow: 0 18px 40px -30px rgba(80, 60, 30, .45); --shadow-hover: 0 14px 28px -18px rgba(80, 60, 30, .45);
  --r-card: 24px; --r-btn: 999px; --r-in: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141A17; --surface: #1B2320; --field: #18201C; --ink: #ECE7DD; --muted: #ABA598; --line: #2D3833; --edge: #4C5951; --soft: #232D29;
    --brand: #5DB38F; --brand-ink: #0D1512; --accent: #7CCBA8; --accent-ink: #0D1512;
    --hero-bg: #141A17; --hero-soft: #141A17; --hero-fg: #ECE7DD; --hero-muted: #B9B3A6; --hero-line: #2D3833;
    --rule: #2F3A35; --tab-on: #5DB38F; --tab-on-ink: #0D1512;
    --sand: #1F2724; --sun: #5A4416; --sun-ink: #F6D9A0; --blue: #8DB6E0; --blue-soft: #1C2733; --brick-soft: #2E211D; --green-soft: #1C2C25;
    --shadow: 0 18px 40px -28px rgba(0, 0, 0, .75); --shadow-hover: 0 14px 28px -16px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  --bg: #141A17; --surface: #1B2320; --field: #18201C; --ink: #ECE7DD; --muted: #ABA598; --line: #2D3833; --edge: #4C5951; --soft: #232D29;
  --brand: #5DB38F; --brand-ink: #0D1512; --accent: #7CCBA8; --accent-ink: #0D1512;
  --hero-bg: #141A17; --hero-soft: #141A17; --hero-fg: #ECE7DD; --hero-muted: #B9B3A6; --hero-line: #2D3833;
  --rule: #2F3A35; --tab-on: #5DB38F; --tab-on-ink: #0D1512;
  --sand: #1F2724; --sun: #5A4416; --sun-ink: #F6D9A0; --blue: #8DB6E0; --blue-soft: #1C2733; --brick-soft: #2E211D; --green-soft: #1C2C25;
  --shadow: 0 18px 40px -28px rgba(0, 0, 0, .75); --shadow-hover: 0 14px 28px -16px rgba(0, 0, 0, .8);
}
body { background-image: none !important; background-color: var(--bg) !important; }
.card, .statement, .distinta, .tool-form, .gbar, .vote, .cta-box, .side-cta, .bm-box, .brandbox { border: 1px solid var(--rule) !important; box-shadow: var(--shadow) !important; }
.statement .distinta, .card .distinta { box-shadow: none !important; }
.tabs { border: 1px solid var(--rule) !important; box-shadow: none !important; }
.guides a, .tool-more a { border: 1px solid var(--rule) !important; box-shadow: none !important; border-radius: 18px !important; background: var(--surface); }
.guides a:hover, .tool-more a:hover, .door:hover, .btn:hover { transform: translateY(-2px) !important; box-shadow: var(--shadow-hover) !important; filter: none; }
.page > .hero { border: 0 !important; background: transparent !important; }
header.hero { border-bottom: 1px solid var(--rule) !important; }
header.hero::after { display: none !important; }
.st-head, .res-big { border-bottom: 1px solid var(--rule) !important; }
.distinta figcaption, .gbar figcaption { border-bottom: 1px solid var(--rule) !important; background: var(--sand) !important; font-family: var(--body) !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; }
.gbar figcaption { background: transparent !important; border-bottom: 0 !important; }
.site-foot { border-top: 1px solid var(--rule) !important; background: var(--bg) !important; }
.tabs { padding: 4px !important; gap: 4px !important; border-radius: 999px !important; background: var(--surface) !important; }
.tab, .tab:last-child { border: 0 !important; border-radius: 999px !important; }
.btn, button.btn { border: 1px solid var(--edge) !important; }
.btn.primary, .btn.cta { border-color: transparent !important; }
.door { border: 0 !important; }
.money, .inp, .fld select, .fld input.date, .seg span, .opt span, .check span, .color input { border-width: 1px !important; border-color: var(--edge) !important; }
.seg span, .opt span { border-radius: 999px !important; }
.money:focus-within, .inp:focus-within { border-color: var(--brand) !important; box-shadow: 0 0 0 3px var(--green-soft) !important; }
.kicker { font-family: var(--body) !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 14px !important; font-weight: 600 !important; color: var(--brand) !important; }
.how li::before { background: var(--sun) !important; color: var(--sun-ink) !important; }
.chip { font-family: var(--body) !important; }
.plan .room { fill: var(--sand); }
.plan .mask { fill: var(--bg); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2.5px solid var(--brand) !important; outline-offset: 2px; }
.navlink, .nav a:not(.logo):not(.btn), .foot-cols a { background-image: linear-gradient(var(--brand), var(--brand)); }
.qc-side { border-right: 1px solid var(--rule) !important; background: var(--surface) !important; }
.qs-top { border-bottom: 1px solid var(--rule) !important; }
.qs-foot { border-top: 1px solid var(--rule) !important; }
.qs-link { border-radius: 12px !important; }
.qs-close, .menu-btn { border: 1px solid var(--edge) !important; border-radius: 999px !important; }
/* Conto guidato */
.wiz { border: 0 !important; border-radius: 28px !important; box-shadow: var(--shadow) !important; }
.wiz-opt { border: 1.5px solid var(--line) !important; border-radius: 18px !important; background: var(--bg) !important; }
.wiz-opt:hover, .wiz-opt:focus-visible { transform: none !important; box-shadow: none !important; border-color: var(--brand) !important; background: var(--green-soft) !important; }
.wiz-in { border: 1.5px solid var(--edge) !important; border-radius: 16px !important; }
.wiz-go { border: 0 !important; border-radius: 999px !important; box-shadow: none !important; }
.wiz-go:hover { filter: brightness(1.05); }
.wiz-again, .wiz-x { border-radius: 999px !important; border: 1px solid var(--edge) !important; }
.wiz-prog { height: 8px !important; }
.next-steps { border: 0 !important; background: var(--sand) !important; border-radius: 18px !important; }
.next-steps li::before { background: var(--sun) !important; color: var(--sun-ink) !important; }
@media (max-width: 760px) {
  .tabs { border: 0 !important; padding: 0 !important; background: transparent !important; }
  .tabs .tab, .tabs .tab:last-child { border: 1px solid var(--edge) !important; }
}
@media (max-width: 600px) { .wiz { box-shadow: var(--shadow) !important; } }
@media print { body { background: #fff !important; } .card, .statement, .distinta { box-shadow: none !important; } }
/* Home: saluto, rassicurazioni, le tre aree */
.hello { display: inline-flex; align-self: flex-start; margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--sun); color: var(--sun-ink); font-size: 14px; font-weight: 600; }
.page > .hero .lead { max-width: 54ch !important; font-size: 1.12rem !important; line-height: 1.55; }
.trust { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.trust li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); }
.trust svg { width: 16px; height: 16px; fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.areas { display: flex; flex-direction: column; gap: 16px; }
.areas > h2 { margin: 0; font-family: var(--display); font-size: 1.45rem; font-weight: 700; }
.areas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.area { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 28px; }
.area h3 { margin: 0; font-family: var(--display); font-size: 1.5rem; line-height: 1.2; font-weight: 700; }
.area p { margin: 0; font-size: 15.5px; line-height: 1.55; }
.area ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.area li a { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid; font-size: 15.5px; font-weight: 600; text-decoration: none; color: inherit; }
.area li a span { transition: transform .2s ease; }
.area li a:hover span { transform: translateX(4px); }
/* Lista non-cliccabile nella home (solo testo preview) */
.area-hints { gap: 0; }
.area-hints li { padding: 9px 0; border-top: 1px solid; font-size: 15px; font-weight: 500; opacity: .85; }
.area-hints li::before { content: '✓  '; font-size: 13px; opacity: .7; }
.area-privati .area-hints li { border-color: rgba(255,255,255,.16); }
.area-investitori .area-hints li { border-color: color-mix(in srgb, var(--blue) 22%, transparent); }
.area-professionisti .area-hints li { border-color: color-mix(in srgb, #A63D2B 22%, transparent); }
.area-ic { display: inline-flex; width: 52px; height: 52px; border-radius: 16px; align-items: center; justify-content: center; }
.area-ic svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.area-go { margin-top: auto; display: inline-flex; justify-content: center; align-items: center; min-height: 52px; border-radius: 999px; font-weight: 700; font-size: 16.5px; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.area-go:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.area-badge { display: inline-flex; align-self: flex-start; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; }
.area-privati .area-badge { background: rgba(255,255,255,.18); color: #F6D9A0; }
.area-privati { background: #1F5C47; color: #FFFFFF; box-shadow: 0 18px 40px -26px rgba(31, 92, 71, .6); }
.area-privati p { color: #DCEBE4; } .area-privati li a { border-color: rgba(255, 255, 255, .16); }
.area-privati .area-ic { background: rgba(255, 255, 255, .12); color: #F6D9A0; }
.area-privati .area-go { background: #E8B04A; color: #2A1E05; }
.area-investitori { background: var(--blue-soft); color: var(--ink); }
.area-investitori p { color: var(--muted); } .area-investitori li a { border-color: color-mix(in srgb, var(--blue) 22%, transparent); }
.area-investitori .area-ic { background: var(--surface); color: var(--blue); }
.area-investitori .area-go { background: #2B5A8C; color: #FFFFFF; }
.area-professionisti { background: var(--brick-soft); color: var(--ink); }
.area-professionisti p { color: var(--muted); } .area-professionisti li a { border-color: color-mix(in srgb, #A63D2B 22%, transparent); }
.area-professionisti .area-ic { background: var(--surface); color: #A63D2B; }
.area-professionisti .area-go { background: #A63D2B; color: #FFFFFF; }
.calc-head { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 14px; }
.calc-head h2 { margin: 0; font-family: var(--display); font-size: 1.45rem; font-weight: 700; }
.calc-head p { margin: 0; color: var(--muted); font-size: 15px; }
.how li { background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; padding: 18px 18px 18px 64px !important; }
.how li::before { left: 18px !important; top: 18px !important; }
/* Pagine delle aree */
.hub-hero .kicker { display: inline-flex; width: fit-content; align-self: flex-start; padding: 5px 13px; border-radius: 999px; color: #FFFFFF !important; }
.hub-hero-privati .kicker { background: #1F5C47; }
.hub-hero-investitori .kicker { background: #2B5A8C; }
.hub-hero-professionisti .kicker { background: #A63D2B; }
/* Card percorso grandi per hub privati */
.hub-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 4px 0 36px; }
.hub-path { display: flex; flex-direction: column; gap: 6px; padding: 28px 26px 24px; border-radius: 26px; background: var(--surface); border: 1.5px solid var(--rule); color: var(--ink); text-decoration: none !important; transition: transform .16s ease, box-shadow .16s ease; }
.hub-path:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--brand); }
.hub-path-ic { display: inline-flex; width: 52px; height: 52px; border-radius: 16px; align-items: center; justify-content: center; background: var(--green-soft); color: var(--brand); margin-bottom: 6px; }
.hub-path-ic svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hub-path-t { font-weight: 700; font-size: 20px; line-height: 1.2; }
.hub-path-d { font-size: 15px; line-height: 1.5; color: var(--muted); flex: 1; }
.hub-path-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 700; font-size: 15px; color: var(--brand); }
.hub-path-go svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.hub-path:hover .hub-path-go svg { transform: translateX(4px); }
.hub-privati-extra { margin-top: 0; }
.hub-privati-extra .hub-ic { background: var(--green-soft); color: var(--brand); }
.hub-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin: 8px 0 34px; }
.hub-card { display: flex; flex-direction: column; gap: 4px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--rule); color: var(--ink); text-decoration: none !important; transition: transform .16s ease, box-shadow .16s ease; }
.hub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.hub-ic { display: inline-flex; width: 44px; height: 44px; border-radius: 14px; align-items: center; justify-content: center; margin-bottom: 8px; }
.hub-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hub-privati .hub-ic { background: var(--green-soft); color: var(--brand); }
.hub-investitori .hub-ic { background: var(--blue-soft); color: var(--blue); }
.hub-professionisti .hub-ic { background: var(--brick-soft); color: #A63D2B; }
.hub-t { font-weight: 700; font-size: 17px; }
.hub-d { font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.hub-h { margin: 0 0 12px; font-size: 1.35rem; }
.hub-guides { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.hub-guides a { display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--rule); color: var(--ink); font-weight: 600; text-decoration: none !important; }
.hub-guides a span { color: var(--brand); }
.hub-other { color: var(--muted); font-size: 15px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .area-privati { background: #1F5C47; } }
/* Briciole di pane */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.crumbs span[aria-hidden] { opacity: .6; }
.crumbs span[aria-current] { color: var(--ink); font-weight: 600; max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
