/*
 * Affitto Spiegato – foglio di stile unico.
 * Linguaggio grafico "pop milanese": colori pieni, contorni d'inchiostro, ombre nette, forme geometriche.
 * Mobile-first, un solo font self-hosted (Archivo variabile, licenza OFL), nessuna dipendenza esterna.
 * Contrasti verificati AA: testo inchiostro su tutti i colori pieni, testo bianco solo su blu e inchiostro.
 */

/* ---------- Font ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}
/* font di riserva con metriche adattate: il passaggio al font vero non sposta il testo */
@font-face {
  font-family: "Archivo Riserva";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 98.6%;
  ascent-override: 89%;
  descent-override: 21.3%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Archivo Titoli Riserva";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Liberation Sans Bold");
  size-adjust: 118%;
  ascent-override: 74.4%;
  descent-override: 17.8%;
  line-gap-override: 0%;
}

/* ---------- Gettoni ---------- */
:root {
  color-scheme: light;
  --ink: #121019;
  --ink-2: #3d3a4b;
  --ink-3: #5a5668;
  --carta: #ffffff;
  --nebbia: #f5f4fa;
  --riga: #e3e1ec;

  --blu: #2b44ff;
  --blu-scuro: #1a2dcc;
  --giallo: #ffd43b;
  --rosa: #ff6eb4;
  --menta: #3ddc97;
  --arancio: #ff7a2f;
  --lilla: #b8a8ff;
  --azzurro: #6fd3ff;

  --blu-50: #e8ebff;
  --giallo-50: #fff6cc;
  --rosa-50: #ffe6f2;
  --menta-50: #dcf8ec;
  --arancio-50: #ffeadd;
  --lilla-50: #efebff;
  --azzurro-50: #e2f6ff;

  --errore: #b0124f;
  --ok: #0f7a4f;

  --bd: 2.5px solid var(--ink);
  --bd-sottile: 2px solid var(--ink);
  --ombra: 5px 5px 0 var(--ink);
  --ombra-sm: 3px 3px 0 var(--ink);
  --ombra-lg: 8px 8px 0 var(--ink);
  --r: 18px;
  --r-sm: 12px;

  --wrap: 1180px;
  --lettura: 720px;
  --font: "Archivo", "Archivo Riserva", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-titoli: "Archivo", "Archivo Titoli Riserva", "Arial Black", system-ui, sans-serif;

  /* colore di sezione: lo impostano le classi .c-* */
  --c: var(--giallo);
  --c-50: var(--giallo-50);
  --c-txt: var(--ink);
}
.c-giallo { --c: var(--giallo); --c-50: var(--giallo-50); --c-txt: var(--ink); }
.c-rosa { --c: var(--rosa); --c-50: var(--rosa-50); --c-txt: var(--ink); }
.c-menta { --c: var(--menta); --c-50: var(--menta-50); --c-txt: var(--ink); }
.c-arancio { --c: var(--arancio); --c-50: var(--arancio-50); --c-txt: var(--ink); }
.c-lilla { --c: var(--lilla); --c-50: var(--lilla-50); --c-txt: var(--ink); }
.c-azzurro { --c: var(--azzurro); --c-50: var(--azzurro-50); --c-txt: var(--ink); }
.c-blu { --c: var(--blu); --c-50: var(--blu-50); --c-txt: #fff; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--ink);
  background: var(--carta);
  overflow-wrap: break-word;
  font-kerning: normal;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--blu); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { color: var(--blu-scuro); text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--blu); outline-offset: 3px; border-radius: 4px; }
.page-head.c-blu :focus-visible, .tile.c-blu:focus-visible, .site-footer :focus-visible, .ticker :focus-visible { outline-color: var(--giallo); }
h1, h2, h3, h4 { font-family: var(--font-titoli); line-height: 1.15; margin: 1.6em 0 0.55em; font-weight: 800; }
h3 { font-size: 1.22rem; font-stretch: 105%; letter-spacing: -0.01em; }
p, ul, ol, table, figure { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }
small { font-size: 0.875rem; }
strong { font-weight: 700; }
abbr[title] { text-decoration: underline dotted; }
hr { border: 0; border-top: var(--bd); margin: 2.5rem 0; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.7rem 1.1rem; z-index: 20; font-weight: 700; }
.skip-link:focus { left: 0.6rem; top: 0.6rem; color: #fff; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 700px) { .wrap { padding: 0 1.5rem; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icona { width: 1em; height: 1em; flex: none; }

/* ---------- Testata ---------- */
.site-header { background: var(--carta); border-bottom: var(--bd); position: relative; z-index: 5; }
.site-header::before {
  content: ""; display: block; height: 8px;
  background: linear-gradient(90deg, var(--blu) 0 20%, var(--giallo) 20% 40%, var(--rosa) 40% 60%, var(--menta) 60% 80%, var(--arancio) 80% 100%);
  border-bottom: 2px solid var(--ink);
}
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand .logo { width: 46px; height: 46px; transition: transform 0.25s ease; }
.brand:hover .logo { transform: rotate(-8deg) scale(1.05); }
.brand-name { font: 900 1.38rem/1 var(--font-titoli); font-stretch: 118%; letter-spacing: -0.03em; }
.brand-name span { color: var(--blu); }
.nav-main { width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0.15rem 1rem 0.35rem; }
.nav-main::-webkit-scrollbar { display: none; }
.nav-main ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.5rem; }
.nav-main li { margin: 0; }
.nav-main a {
  display: block; padding: 0.42rem 0.95rem; border: var(--bd-sottile); border-radius: 999px;
  font-weight: 700; font-stretch: 104%; font-size: 0.97rem; text-decoration: none; color: var(--ink); background: var(--carta); white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.nav-main a:hover { background: var(--giallo-50); transform: translate(-1px, -1px); box-shadow: var(--ombra-sm); }
.nav-main a[aria-current="page"], .nav-main a.is-section { background: var(--giallo); box-shadow: var(--ombra-sm); }
@media (min-width: 1020px) {
  .header-inner { flex-wrap: nowrap; }
  .nav-main { width: auto; overflow: visible; margin: 0; padding: 0; }
}

/* ---------- Barra di lettura (aggiunta dallo script) ---------- */
.progresso { position: fixed; left: 0; top: 0; width: 100%; height: 6px; z-index: 30; pointer-events: none; }
.progresso span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--blu), var(--rosa) 50%, var(--giallo)); }

/* ---------- Testata di pagina ---------- */
.page-head { background: var(--c); color: var(--c-txt); border-bottom: var(--bd); position: relative; overflow: hidden; }
.page-head-inner { position: relative; z-index: 1; padding-top: 1.1rem; padding-bottom: 2.1rem; }
.page-head h1 {
  font-size: clamp(1.95rem, 1.25rem + 3vw, 3.5rem); line-height: 1.04; font-stretch: 112%; letter-spacing: -0.03em;
  margin: 0.75rem 0 1.3rem; max-width: 19em;
}
@media (min-width: 900px) { .page-head h1 { max-width: 15em; } }
.deco { display: none; position: absolute; z-index: 0; pointer-events: none; }
@media (min-width: 760px) { .deco { display: block; right: -40px; bottom: -50px; width: 330px; opacity: 0.35; } }
@media (min-width: 1100px) {
  .deco { right: calc((100vw - var(--wrap)) / 2 - 30px); width: 360px; bottom: -30px; opacity: 1; }
  .page-head-inner > * { max-width: 780px; }
}

.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; font-size: 0.86rem; font-weight: 600; }
.breadcrumb li { margin: 0; display: inline-flex; align-items: center; gap: 0.35rem; }
.breadcrumb li + li::before { content: ""; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); margin-right: 0.2rem; }
.breadcrumb a, .breadcrumb span { display: inline-block; padding: 0.12rem 0.65rem; border-radius: 999px; background: var(--carta); border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; }
.breadcrumb a:hover { background: var(--giallo-50); }
.breadcrumb span[aria-current] { background: transparent; border-color: transparent; padding-left: 0.2rem; color: inherit; }

.tag {
  display: inline-flex; align-items: center; gap: 0.45rem; margin: 0.9rem 0 0;
  background: var(--carta); color: var(--ink); border: var(--bd-sottile); border-radius: 999px; padding: 0.22rem 0.85rem 0.22rem 0.3rem;
  font-weight: 800; font-size: 0.84rem; font-stretch: 108%; letter-spacing: 0.01em; transform: rotate(-2deg); box-shadow: var(--ombra-sm);
}
.tag .icona { width: 28px; height: 28px; }

/* Firma */
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.3rem; }
.byline-autore {
  display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); background: var(--carta);
  border: var(--bd-sottile); border-radius: 999px; padding: 0.28rem 1.05rem 0.28rem 0.28rem; box-shadow: var(--ombra-sm); line-height: 1.25;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.byline-autore:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.byline-autore strong { display: block; font-size: 0.95rem; }
.byline-autore small { display: block; font-size: 0.78rem; color: var(--ink-2); }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--lilla); border: var(--bd-sottile); font: 900 0.95rem/1 var(--font-titoli); font-stretch: 115%; color: var(--ink);
}
img.avatar { object-fit: cover; padding: 0; }
.byline-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin: 0; padding: 0; font-size: 0.9rem; font-weight: 600; }
.byline-meta li { margin: 0; display: inline-flex; align-items: center; gap: 0.4rem; }
.byline-meta .icona { width: 20px; height: 20px; }
.data-pagina { margin: 0; font-size: 0.92rem; font-weight: 600; }

/* ---------- Impaginazione ---------- */
.layout { display: block; padding: 2.2rem 0 1rem; }
.content { max-width: var(--lettura); min-width: 0; }
.sidebar { display: none; }
@media (min-width: 1080px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 4rem; align-items: start; }
  .content { max-width: none; }
  .sidebar { display: block; }
  .layout--single { display: block; }
  .layout--single .content { max-width: var(--lettura); }
}

/* ---------- Testo ---------- */
.prose { font-size: 1.0625rem; }
@media (min-width: 900px) { .prose { font-size: 1.1rem; } }
.prose > :first-child { margin-top: 0; }
.prose h2 {
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem); font-stretch: 110%; letter-spacing: -0.025em; line-height: 1.12;
  margin: 2.3em 0 0.7em; padding-top: 1.05rem; position: relative;
}
.prose h2::before { content: ""; position: absolute; left: 0; top: 0; width: 54px; height: 11px; border-radius: 999px; background: var(--h2c, var(--giallo)); border: var(--bd-sottile); }
.prose h2:nth-of-type(5n+2) { --h2c: var(--rosa); }
.prose h2:nth-of-type(5n+3) { --h2c: var(--menta); }
.prose h2:nth-of-type(5n+4) { --h2c: var(--azzurro); }
.prose h2:nth-of-type(5n+5) { --h2c: var(--lilla); }
.prose h3 { margin-top: 1.7em; }
.prose a:not([class]):hover { background: var(--giallo-50); }
.prose ul:not([class]) { list-style: none; padding-left: 1.6em; }
.prose ul:not([class]) > li { position: relative; }
.prose ul:not([class]) > li::before {
  content: ""; position: absolute; left: -1.35em; top: 0.55em; width: 0.62em; height: 0.62em;
  background: var(--li, var(--rosa)); border: 2px solid var(--ink); border-radius: 3px; transform: rotate(45deg);
}
.prose ul:not([class]) > li:nth-child(3n+2) { --li: var(--azzurro); }
.prose ul:not([class]) > li:nth-child(3n+3) { --li: var(--giallo); }
.prose ol:not([class]) > li::marker { font-weight: 800; color: var(--blu); }
.lead { font-size: 1.2rem; line-height: 1.6; font-weight: 500; color: var(--ink); }
@media (min-width: 900px) { .lead { font-size: 1.3rem; } }

/* Riquadri */
.box { position: relative; border: var(--bd); border-radius: var(--r); padding: 1.6rem 1.25rem 1.15rem; margin: 2.4rem 0 1.8rem; background: var(--carta); box-shadow: var(--ombra); }
.box > :last-child { margin-bottom: 0; }
.box-title {
  position: absolute; top: -1rem; left: 1rem; display: inline-block; max-width: calc(100% - 2rem);
  background: var(--ink); color: #fff; border: var(--bd-sottile); border-radius: 999px; padding: 0.2rem 0.85rem;
  font-weight: 800; font-size: 0.9rem; font-stretch: 106%; line-height: 1.35; transform: rotate(-1.5deg);
}
.box-esempio { background: var(--giallo-50); }
.box-esempio .box-title { background: var(--giallo); color: var(--ink); }
.box-nota { background: var(--blu-50); }
.box-nota .box-title { background: var(--blu); color: #fff; }
.box-attenzione { background: var(--rosa-50); }
.box-attenzione .box-title { background: var(--rosa); color: var(--ink); }
.box ul { margin-bottom: 0.4em; }

/* Definizione del glossario */
.term-def { font-size: 1.22rem; line-height: 1.55; font-weight: 600; background: var(--lilla-50); border: var(--bd); border-radius: var(--r); padding: 1.1rem 1.3rem; box-shadow: var(--ombra); margin-bottom: 1.8rem; }

/* Tabelle */
.table-wrap { overflow-x: auto; margin: 1.6rem 0 1.8rem; border: var(--bd); border-radius: 16px; background: var(--carta); -webkit-overflow-scrolling: touch; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.95rem; margin: 0; }
caption { text-align: left; font-weight: 800; padding: 0.75rem 0.9rem 0.6rem; font-stretch: 105%; }
th, td { padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--riga); }
thead th { background: var(--ink); color: #fff; font-weight: 700; border-bottom: 0; }
tbody tr:nth-child(even) > * { background: var(--nebbia); }
tbody tr:last-child > * { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td, tfoot th { font-weight: 800; border-top: var(--bd-sottile); border-bottom: 0; background: var(--giallo-50); }
tr.riga-migliore > * { background: var(--menta-50) !important; font-weight: 700; }
tbody th { font-weight: 600; }

/* Indice della pagina */
.toc { border: var(--bd); border-radius: var(--r); padding: 1.1rem 1.2rem 0.8rem; margin: 1.8rem 0 2.2rem; background: var(--carta); box-shadow: var(--ombra-sm); font-size: 0.97rem; }
.toc h2 { font-size: 0.95rem; margin: 0 0 0.6rem; padding: 0; font-stretch: 106%; letter-spacing: 0; }
.toc h2::before { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
@media (min-width: 700px) { .toc ol { columns: 2; column-gap: 2rem; } }
.toc li { counter-increment: toc; position: relative; padding-left: 2.1rem; margin-bottom: 0.45rem; break-inside: avoid; line-height: 1.4; min-height: 1.7rem; padding-top: 0.08rem; }
.toc li::before {
  content: counter(toc); position: absolute; left: 0; top: 0; width: 1.55rem; height: 1.55rem; border-radius: 6px;
  display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; background: var(--giallo); border: 2px solid var(--ink);
}
.toc li:nth-child(4n+2)::before { background: var(--rosa); }
.toc li:nth-child(4n+3)::before { background: var(--menta); }
.toc li:nth-child(4n+4)::before { background: var(--azzurro); }
.toc a { color: var(--ink); text-decoration: none; font-weight: 600; }
.toc a:hover { color: var(--blu); text-decoration: underline; }

/* ---------- Schede ---------- */
.cards { list-style: none; padding: 0; display: grid; gap: 1.2rem; grid-template-columns: 1fr; margin: 1.4rem 0 2.4rem; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.cards > li { margin: 0; }
.cards > li::before { display: none; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 0.45rem; height: 100%;
  border: var(--bd); border-radius: var(--r); padding: 1.1rem 1.15rem 3.1rem; text-decoration: none; color: var(--ink); background: var(--carta);
  box-shadow: var(--ombra); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { color: var(--ink); transform: translate(-3px, -3px); box-shadow: var(--ombra-lg); background: var(--carta); }
.card strong { font: 800 1.15rem/1.2 var(--font-titoli); font-stretch: 106%; letter-spacing: -0.01em; }
.card > span:not(.card-tag):not(.freccia) { color: var(--ink-2); font-size: 0.96rem; line-height: 1.5; }
.card-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.35rem; background: var(--c); color: var(--c-txt); border: 2px solid var(--ink); border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.78rem; font-weight: 800; }
.freccia {
  position: absolute; right: 0.9rem; bottom: 0.85rem; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); border: 2px solid var(--ink); transition: transform 0.2s ease;
}
.freccia .icona { width: 20px; height: 20px; }
.card:hover .freccia { transform: rotate(-35deg); }

/* Griglia dei calcolatori */
.bento { list-style: none; padding: 0; margin: 1.4rem 0 2.4rem; display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
.bento > li { margin: 0; }
.bento > li::before { display: none; }
@media (min-width: 640px) { .bento { grid-template-columns: 1fr 1fr; } .bento > li:first-child { grid-column: 1 / -1; } }
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(190px, auto); }
  .bento > li:first-child { grid-column: span 2; grid-row: span 2; }
}
/* dentro una colonna di testo (con barra laterale) la griglia resta a due colonne */
@media (min-width: 1000px) {
  .content .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .content .bento > li:first-child { grid-column: 1 / -1; grid-row: auto; }
}
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; height: 100%;
  background: var(--c); color: var(--ink); border: var(--bd); border-radius: 22px; padding: 1.15rem 1.15rem 1.2rem; text-decoration: none;
  box-shadow: var(--ombra); transition: transform 0.15s ease, box-shadow 0.15s ease; overflow: hidden;
}
.tile:hover { color: var(--ink); transform: translate(-3px, -3px); box-shadow: var(--ombra-lg); }
.tile > .icona { width: 58px; height: 58px; }
.tile strong { display: block; font: 800 1.2rem/1.15 var(--font-titoli); font-stretch: 108%; letter-spacing: -0.015em; }
.tile span.tile-txt { display: block; font-size: 0.95rem; line-height: 1.45; margin-top: 0.35rem; }
.tile .tile-cta { display: inline-flex; align-items: center; gap: 0.4rem; align-self: flex-start; background: var(--carta); border: 2px solid var(--ink); border-radius: 999px; padding: 0.3rem 0.85rem; font-weight: 800; font-size: 0.9rem; }
.tile .tile-cta .icona { width: 18px; height: 18px; }
.bento > li:first-child .tile > .icona { width: 84px; height: 84px; }
.bento > li:first-child .tile strong { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem); font-stretch: 118%; }
.bento > li:first-child .tile span.tile-txt { font-size: 1.05rem; max-width: 30em; }
.tile::after { content: ""; position: absolute; z-index: 0; right: -36px; top: -36px; width: 120px; height: 120px; border-radius: 50%; border: var(--bd); background: rgba(255, 255, 255, 0.45); }
.tile > * { position: relative; z-index: 1; }
.bento > li:first-child .tile::after { width: 220px; height: 220px; right: -60px; top: -60px; }

/* ---------- Calcolatore ---------- */
.tool-area { max-width: 860px; padding: 2rem 0 0.5rem; }
.tool-area > .lead { max-width: var(--lettura); }
.calc {
  position: relative; background: var(--carta); border: var(--bd); border-radius: 22px; padding: 1.3rem 1.15rem 1.4rem; margin: 1.6rem 0 1.8rem;
  box-shadow: var(--ombra-lg);
}
@media (min-width: 700px) { .calc { padding: 1.7rem 1.8rem 1.8rem; } }
.calc > h2:first-child, .calc > .calc-titolo:first-child {
  display: inline-block; margin: -2.55rem 0 1.1rem -0.2rem; padding: 0.3rem 1rem; background: var(--c, var(--giallo)); color: var(--c-txt, var(--ink));
  border: var(--bd); border-radius: 999px; font-size: 1.15rem; font-stretch: 110%; transform: rotate(-1.5deg); box-shadow: var(--ombra-sm);
}
@media (min-width: 700px) { .calc > h2:first-child, .calc > .calc-titolo:first-child { margin-top: -2.95rem; } }
.calc > .calc-titolo:first-child { font: 800 1.15rem/1.15 var(--font-titoli); }
.calc fieldset { border: 0; padding: 0; margin: 0 0 1.15rem; min-width: 0; }
.calc legend, .field-label { display: block; font-weight: 700; padding: 0; margin-bottom: 0.45rem; }
.field { margin-bottom: 1.15rem; }
.field > label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.hint { display: block; font-size: 0.88rem; color: var(--ink-3); margin-top: 0.35rem; line-height: 1.45; }
.grid-2 { display: grid; gap: 0 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; font: inherit; font-size: 1.04rem; padding: 0.7rem 0.9rem; min-height: 52px;
  border: var(--bd-sottile); border-radius: var(--r-sm); background: var(--carta); color: var(--ink);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
input::placeholder, textarea::placeholder { color: #75707f; }
input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus { outline: none; border-color: var(--blu); box-shadow: 0 0 0 4px var(--blu-50), 3px 3px 0 var(--blu); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.6rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23121019' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 18px;
}
input.num { font-variant-numeric: tabular-nums; }
.input-euro, .input-pct { position: relative; }
.input-euro input, .input-pct input { padding-right: 2.4rem; }
.input-euro::after, .input-pct::after { position: absolute; right: 0.95rem; top: 50%; transform: translateY(-50%); font-weight: 800; pointer-events: none; }
.input-euro::after { content: "€"; }
.input-pct::after { content: "%"; }
[aria-invalid="true"] { border-color: var(--errore) !important; box-shadow: 0 0 0 4px var(--rosa-50) !important; }
.field-error { display: block; color: var(--errore); font-size: 0.9rem; margin-top: 0.35rem; font-weight: 700; }
.field-error:empty { display: none; }

/* scelte a pillola (radio) */
.choice { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.choice label {
  display: inline-flex; align-items: center; gap: 0.55rem; background: var(--carta); border: var(--bd-sottile); border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 0.65rem; font-weight: 600; cursor: pointer; min-height: 46px; line-height: 1.25;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.choice label:hover { background: var(--giallo-50); }
.choice input[type="radio"] {
  appearance: none; -webkit-appearance: none; margin: 0; width: 1.2rem; height: 1.2rem; flex: none;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--carta); display: grid; place-content: center; cursor: pointer;
}
.choice input[type="radio"]::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform 0.12s ease; }
.choice input[type="radio"]:checked::before { transform: scale(1); }
.choice input[type="radio"]:focus-visible { outline: none; }
.choice label:has(input:checked) { background: var(--giallo); box-shadow: var(--ombra-sm); transform: translate(-1px, -1px); }
.choice label:has(input:focus-visible) { outline: 3px solid var(--blu); outline-offset: 3px; }

/* caselle di spunta */
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 600; cursor: pointer; line-height: 1.45; }
.check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0.05rem 0 0; width: 1.45rem; height: 1.45rem;
  border: 2px solid var(--ink); border-radius: 6px; background: var(--carta); display: grid; place-content: center; cursor: pointer;
}
.check input[type="checkbox"]::before { content: ""; width: 0.42rem; height: 0.8rem; border: solid var(--ink); border-width: 0 3px 3px 0; transform: translateY(-1px) rotate(45deg) scale(0); transition: transform 0.12s ease; }
.check input[type="checkbox"]:checked { background: var(--menta); }
.check input[type="checkbox"]:checked::before { transform: translateY(-1px) rotate(45deg) scale(1); }

/* pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: 800 1.02rem/1.15 var(--font); font-stretch: 106%;
  padding: 0.8rem 1.45rem; min-height: 52px; border: var(--bd); border-radius: 999px; background: var(--giallo); color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink); cursor: pointer; text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn .icona { width: 20px; height: 20px; }
.btn-secondary { background: var(--carta); }
.btn-blu { background: var(--blu); color: #fff; }
.btn-blu:hover { color: #fff; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.6rem; }
.form-status { margin: 0.9rem 0 0; font-weight: 700; color: var(--errore); }
.form-status:empty { display: none; }
.noscript-msg { background: var(--giallo-50); border: var(--bd-sottile); padding: 0.8rem 1rem; border-radius: var(--r-sm); }

/* risultato */
.result { border: var(--bd); border-radius: 22px; padding: 1.3rem 1.15rem; margin: 2rem 0; background: var(--carta); box-shadow: 8px 8px 0 var(--c, var(--menta)), 8px 8px 0 2.5px var(--ink); }
@media (min-width: 700px) { .result { padding: 1.7rem 1.8rem; } }
.result[hidden] { display: none; }
.result h2 { margin-top: 0; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); font-stretch: 110%; letter-spacing: -0.02em; }
.result h3 { font-size: 1.1rem; }
.result-main { display: grid; gap: 0.9rem; grid-template-columns: 1fr; margin: 0.9rem 0 1.4rem; }
@media (min-width: 560px) { .result-main { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.kpi { background: var(--carta); border: var(--bd-sottile); border-radius: 16px; padding: 0.85rem 1rem; }
.kpi:first-child { background: var(--giallo); box-shadow: var(--ombra-sm); }
.kpi .kpi-label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.kpi:first-child .kpi-label { color: var(--ink); }
.kpi .kpi-value { display: block; font: 800 clamp(1.45rem, 1.15rem + 1.2vw, 2rem)/1.2 var(--font-titoli); font-stretch: 112%; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi.kpi-neutral { background: var(--nebbia); box-shadow: none; }
.passaggi { counter-reset: step; list-style: none; padding: 0; margin: 0 0 1.2rem; }
.passaggi li { position: relative; padding-left: 2.6rem; margin-bottom: 0.75rem; }
.passaggi li::before {
  counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 1.85rem; height: 1.85rem; border-radius: 50%;
  background: var(--giallo); border: 2px solid var(--ink); font-size: 0.85rem; font-weight: 800; display: grid; place-items: center;
}
.passaggi li:nth-child(4n+2)::before { background: var(--rosa); }
.passaggi li:nth-child(4n+3)::before { background: var(--menta); }
.passaggi li:nth-child(4n+4)::before { background: var(--azzurro); }
.formula { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.93rem; background: var(--lilla-50); border: 1.5px solid var(--lilla); padding: 0.05rem 0.4rem; border-radius: 6px; white-space: normal; }
.result-note { font-size: 0.92rem; color: var(--ink-2); }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-top: 1.3rem; padding-top: 1.2rem; border-top: 2px dashed var(--ink); }
.result-actions .btn { min-height: 46px; padding: 0.55rem 1.1rem; font-size: 0.95rem; }
.copy-status { font-size: 0.92rem; font-weight: 700; color: var(--ok); }
.rounding { font-size: 0.9rem; color: var(--ink-2); }

/* ---------- Annunci: spazio riservato, nessuno spostamento del layout ---------- */
.ad-slot { margin: 3rem 0; padding: 0.55rem 0.55rem 0.7rem; text-align: center; background: var(--nebbia); border-radius: 14px; }
.ad-label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.35rem; }
.ad-slot ins { display: block; width: 100%; height: 280px; background: transparent; }
.ad-slot--sidebar { margin: 0 0 2rem; }
.ad-slot--sidebar ins { display: inline-block; width: 300px; height: 600px; }
.ad-after-result { margin-top: 3rem; }
.ad-slot:has(> ins[data-ad-status="unfilled"]) { display: none; }

/* ---------- Colonna laterale ---------- */
.side-box { border: var(--bd); border-radius: var(--r); margin-bottom: 1.8rem; background: var(--carta); box-shadow: var(--ombra-sm); overflow: hidden; font-size: 0.95rem; }
.side-box h2 { font-size: 1rem; margin: 0; padding: 0.7rem 1rem; background: var(--c, var(--giallo)); color: var(--c-txt, var(--ink)); border-bottom: var(--bd-sottile); font-stretch: 108%; }
.side-box ul { list-style: none; padding: 0.7rem 1rem 0.8rem; margin: 0; }
.side-box li { margin-bottom: 0.5rem; line-height: 1.35; }
.side-box li:last-child { margin-bottom: 0; }
.side-box a { color: var(--ink); text-decoration: none; font-weight: 600; display: inline-flex; gap: 0.55rem; align-items: flex-start; }
.side-box a:hover { color: var(--blu); text-decoration: underline; }
.side-box .icona { width: 26px; height: 26px; margin-top: -0.1rem; }

/* ---------- FAQ, fonti, correlati, CTA ---------- */
.faq { margin-top: 3rem; }
.faq-item { border: var(--bd); border-radius: var(--r); background: var(--carta); margin: 0 0 0.95rem; box-shadow: var(--ombra-sm); }
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.95rem 1.1rem; cursor: pointer; border-radius: var(--r); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 1.07rem; font-stretch: 103%; line-height: 1.35; }
.faq-item summary::after {
  content: ""; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); transition: transform 0.2s ease;
  background: linear-gradient(var(--ink), var(--ink)) center / 13px 2.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2.5px 13px no-repeat, var(--giallo);
}
.faq-item[open] summary::after { transform: rotate(45deg); background-color: var(--rosa); }
.faq-item summary:hover { background: var(--giallo-50); }
.faq-risposta { padding: 0 1.15rem 0.9rem; }
.faq-risposta > :last-child { margin-bottom: 0.3rem; }
.fonti { margin-top: 3rem; font-size: 0.95rem; }
.fonti ol { padding-left: 1.5em; }
.fonti li::marker { font-weight: 800; }
.fonti-nota { color: var(--ink-2); font-size: 0.9rem; }
.related { margin-top: 3rem; padding-top: 0.5rem; }
.related h2 { font-size: 1.35rem; }
.related-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .related-list { grid-template-columns: 1fr 1fr; } }
.related-list > li { margin: 0; }
.related-list > li::before { display: none; }
.related-card {
  display: flex; flex-direction: column; gap: 0.4rem; height: 100%; padding: 0.85rem 1rem; text-decoration: none; color: var(--ink);
  background: var(--c-50); border: var(--bd-sottile); border-radius: 14px; transition: transform 0.15s ease, box-shadow 0.15s ease; line-height: 1.3;
}
.related-card:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: var(--ombra-sm); background: var(--c-50); }
.related-card .card-tag { font-size: 0.72rem; }
.related-card strong { font-size: 1rem; }
.cta-studio { display: flex; gap: 1rem; align-items: flex-start; border: var(--bd); border-radius: var(--r); padding: 1.2rem 1.2rem 1rem; margin: 3rem 0 2rem; background: var(--azzurro-50); }
.cta-studio .icona { width: 46px; height: 46px; }
.cta-studio p { margin-bottom: 0.6rem; }
.cta-studio p:last-child { margin-bottom: 0; }
.cta-studio .cta-title { font: 800 1.12rem/1.25 var(--font-titoli); font-stretch: 106%; }
.cta-studio a { font-weight: 800; }

/* In breve: i punti chiave della guida */
.in-breve { position: relative; margin: 2.2rem 0 1.6rem; padding: 1.5rem 1.2rem 0.9rem; background: var(--c-50); border: var(--bd); border-radius: var(--r); }
.in-breve-titolo {
  position: absolute; top: -1rem; left: 1rem; margin: 0; padding: 0.15rem 0.85rem; background: var(--c); color: var(--c-txt);
  border: var(--bd-sottile); border-radius: 999px; font: 800 0.92rem/1.35 var(--font-titoli); font-stretch: 108%; transform: rotate(-1.5deg);
}
.in-breve ul { list-style: none; margin: 0; padding: 0; }
.in-breve li { position: relative; padding-left: 2rem; margin-bottom: 0.6rem; font-weight: 600; line-height: 1.5; }
.in-breve li::before { content: ""; position: absolute; left: 0.1rem; top: 0.2rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 2px solid var(--ink); background: var(--carta); }
.in-breve li::after { content: ""; position: absolute; left: 0.47rem; top: 0.38rem; width: 0.32rem; height: 0.6rem; border: solid var(--ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* Strumenti collegati dentro le guide */
.strumento {
  display: flex; align-items: center; gap: 0.9rem; margin: 1.6rem 0 2rem; padding: 0.85rem 1rem; text-decoration: none; color: var(--ink);
  background: var(--c); border: var(--bd); border-radius: var(--r); box-shadow: var(--ombra); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.strumento:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.strumento .icona { width: 50px; height: 50px; }
.strumento small { display: block; font-weight: 700; font-size: 0.8rem; }
.strumento strong { display: block; font: 800 1.08rem/1.2 var(--font-titoli); font-stretch: 106%; }
.strumenti-collegati { list-style: none; padding: 0; margin: 0; }
.strumenti-collegati > li::before { display: none; }

/* ---------- Glossario ---------- */
.lettere { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: 1.3rem; }
.lettere > li { margin: 0; display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: start; }
.lettere > li::before { display: none; }
.lettera-iniziale {
  display: grid; place-items: center; width: 64px; height: 64px; border: var(--bd); border-radius: 16px; background: var(--lilla);
  font: 900 2rem/1 var(--font-titoli); font-stretch: 120%; box-shadow: var(--ombra-sm);
}
.lettere > li:nth-child(4n+2) .lettera-iniziale { background: var(--giallo); }
.lettere > li:nth-child(4n+3) .lettera-iniziale { background: var(--menta); }
.lettere > li:nth-child(4n+4) .lettera-iniziale { background: var(--rosa); }
.termini { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.termini > li { margin: 0; }
.termini > li::before { display: none; }
.termini a { display: block; padding: 0.7rem 0.9rem; border: var(--bd-sottile); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--carta); line-height: 1.4; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.termini a:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: var(--ombra-sm); }
.termini a strong { display: block; font-size: 1.05rem; }
.termini a span { color: var(--ink-2); font-size: 0.93rem; }
.chips { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chips > li { margin: 0; }
.chips > li::before { display: none; }
.chips a { display: inline-block; padding: 0.35rem 0.9rem; border: var(--bd-sottile); border-radius: 999px; background: var(--carta); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.93rem; transition: transform 0.15s ease, background-color 0.15s ease; }
.chips a:hover { color: var(--ink); background: var(--lilla); transform: rotate(-2deg); }

/* ---------- Modelli di lettera ---------- */
.modello-tool { margin: 2.4rem 0 1rem; }
/* nei modelli il testo resta alla larghezza di lettura, lo strumento usa tutta la pagina */
.t-modello .content > :not(.modello-tool) { max-width: var(--lettura); }
@media (min-width: 1080px) { .t-modello .layout--single .content { max-width: none; } }
.modello-tool > h2 { margin-top: 0; }
.modello-grid { display: grid; gap: 1.6rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .modello-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } .lettera-wrap { position: sticky; top: 1rem; } }
.modello-form { margin-top: 1.2rem; }
.modello-form .field { margin-bottom: 0.95rem; }
.facoltativo { font-weight: 500; color: var(--ink-3); font-size: 0.88rem; }
.lettera {
  position: relative; background: var(--carta); border: var(--bd); border-radius: 6px 30px 6px 6px; padding: 1.6rem 1.3rem; margin-top: 1.2rem;
  box-shadow: 8px 8px 0 var(--arancio), 8px 8px 0 2.5px var(--ink); font-size: 0.98rem; line-height: 1.6;
}
@media (min-width: 700px) { .lettera { padding: 2.1rem 2.2rem; } }
.lettera p { margin-bottom: 0.9em; }
.lettera [data-campo] { background: var(--giallo-50); border-bottom: 2px dashed var(--arancio); border-radius: 3px; padding: 0 0.12em; }
.lettera [data-campo].compilato { background: var(--menta-50); border-bottom-color: var(--menta); }
.lettera [data-campo="motivi"] { white-space: pre-line; }
.lettera-azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-top: 1.6rem; }
.lettera-azioni .btn { min-height: 46px; padding: 0.55rem 1.1rem; font-size: 0.95rem; }

/* ---------- Dati ISTAT ---------- */
.ultimo-dato { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.8rem 0 2rem; }
@media (min-width: 640px) { .ultimo-dato { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ultimo-dato > div { border: var(--bd); border-radius: var(--r); padding: 0.9rem 1rem; background: var(--carta); box-shadow: var(--ombra-sm); }
.ultimo-dato > div:first-child { background: var(--rosa); transform: rotate(-1.5deg); }
.ultimo-dato > div:nth-child(2) { background: var(--giallo); transform: rotate(1deg); }
.ultimo-dato > div:nth-child(3) { background: var(--azzurro); transform: rotate(-0.5deg); }
.ultimo-dato span { display: block; font-weight: 700; font-size: 0.9rem; }
.ultimo-dato strong { display: block; white-space: nowrap; font: 900 clamp(1.6rem, 1.15rem + 1.5vw, 2.3rem)/1.05 var(--font-titoli); font-stretch: 112%; letter-spacing: -0.03em; margin: 0.25rem 0; }
.grafico { border: var(--bd); border-radius: var(--r); background: var(--carta); padding: 1rem 0.6rem 0.4rem; margin: 1.6rem 0 2rem; overflow-x: auto; }
.grafico figcaption { font-weight: 800; font-stretch: 105%; padding: 0 0.5rem 0.6rem; }
.grafico svg { display: block; min-width: 620px; width: 100%; height: auto; }
.grafico .barra { fill: var(--rosa); stroke: var(--ink); stroke-width: 2; }
.grafico .barra.neg { fill: var(--azzurro); }
.grafico .barra.ultima { fill: var(--giallo); }
.grafico .asse { stroke: var(--ink); stroke-width: 2.5; }
.grafico .griglia { stroke: var(--riga); stroke-width: 1.5; }
.grafico text { font-family: var(--font); font-size: 13px; fill: var(--ink); }
.grafico .val { font-weight: 800; font-size: 12px; }

/* ---------- Home ---------- */
.hero { position: relative; overflow: hidden; background: var(--giallo); border-bottom: var(--bd); }
.hero-inner { position: relative; z-index: 1; display: grid; gap: 2.4rem; padding-top: 2.4rem; padding-bottom: 3rem; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); align-items: center; padding-top: 3.6rem; padding-bottom: 4.2rem; } }
.hero h1 { font-size: clamp(2.2rem, 1.15rem + 5.4vw, 5.35rem); font-weight: 900; font-stretch: 125%; line-height: 0.98; letter-spacing: -0.045em; margin: 0 0 1.3rem; }
.hero h1 em { font-style: normal; display: inline-block; background: var(--carta); border: var(--bd); border-radius: 0.2em; padding: 0 0.12em; box-shadow: var(--ombra); transform: rotate(-2deg); }
.hero .lead { max-width: 34em; margin-bottom: 1.7rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-firma { display: flex; align-items: center; gap: 0.6rem; margin: 1.6rem 0 0; font-size: 0.92rem; font-weight: 600; }
.hero-firma .avatar { width: 38px; height: 38px; font-size: 0.85rem; }
.stickers { list-style: none; margin: 0; padding: 0.5rem 0.5rem 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.stickers > li { margin: 0; }
.stickers > li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: min(100%, 300px); }
.sticker {
  --rot: -3deg; display: block; height: 100%; text-decoration: none; color: var(--ink); background: var(--c); border: var(--bd); border-radius: 20px;
  padding: 0.85rem 1rem 0.9rem; box-shadow: var(--ombra); transform: rotate(var(--rot)); transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: pop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.stickers > li:nth-child(2) .sticker { --rot: 3deg; animation-delay: 0.08s; }
.stickers > li:nth-child(3) .sticker { --rot: 2deg; animation-delay: 0.16s; }
.stickers > li:nth-child(4) .sticker { --rot: -4deg; animation-delay: 0.24s; }
.stickers > li:nth-child(5) .sticker { --rot: -1.5deg; animation-delay: 0.32s; }
.sticker:hover { color: var(--ink); transform: rotate(0deg) scale(1.04); box-shadow: var(--ombra-lg); }
.sticker-num { display: block; white-space: nowrap; font: 900 clamp(1.9rem, 1.35rem + 2vw, 2.9rem)/1 var(--font-titoli); font-stretch: 115%; letter-spacing: -0.04em; }
.sticker-lab { display: block; font-weight: 700; font-size: 0.92rem; line-height: 1.3; margin-top: 0.35rem; }
@keyframes pop { from { opacity: 0; transform: rotate(var(--rot)) scale(0.7); } to { opacity: 1; transform: rotate(var(--rot)) scale(1); } }

.ticker { background: var(--ink); color: #fff; border-bottom: var(--bd); overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: scorri 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { list-style: none; margin: 0; padding: 0.8rem 0; display: flex; }
.ticker li { margin: 0; display: inline-flex; align-items: center; gap: 0.6rem; padding: 0 1.6rem; white-space: nowrap; font-weight: 700; font-stretch: 108%; }
.ticker li::after { content: ""; width: 12px; height: 12px; background: var(--giallo); transform: rotate(45deg); margin-left: 1.6rem; }
.ticker li:nth-child(3n+2)::after { background: var(--rosa); }
.ticker li:nth-child(3n+3)::after { background: var(--menta); }
.ticker b { color: var(--giallo); font-weight: 900; }
@keyframes scorri { to { transform: translateX(-50%); } }

.sezione { padding: 3.4rem 0 3rem; }
.sezione + .sezione { border-top: var(--bd); }
.sezione--rosa { background: var(--rosa-50); }
.sezione--menta { background: var(--menta-50); }
.sezione--lilla { background: var(--lilla-50); }
.sezione--azzurro { background: var(--azzurro-50); }
.sezione-titolo { font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3rem); font-weight: 900; font-stretch: 122%; letter-spacing: -0.04em; line-height: 1.02; margin: 0 0 0.6rem; }
.sezione-titolo mark { background: linear-gradient(transparent 58%, var(--c, var(--giallo)) 58%); color: inherit; padding: 0 0.05em; }
.sezione-intro { max-width: 40em; font-size: 1.08rem; margin-bottom: 1.6rem; }
.sezione-nota { margin-top: 1.6rem; margin-bottom: 0; }
.sezione-titolo + ul, .sezione-titolo + div { margin-top: 1.5rem; }

.per-chi { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .per-chi { grid-template-columns: 1fr 1fr; } }
.per-chi > div { border: var(--bd); border-radius: 24px; padding: 1.5rem 1.3rem 1.4rem; background: var(--c); box-shadow: var(--ombra-lg); }
.per-chi h3 { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 1rem; font-size: 1.55rem; font-stretch: 115%; letter-spacing: -0.02em; }
.per-chi h3 .icona { width: 54px; height: 54px; }
.per-chi ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.per-chi li { margin: 0; }
.per-chi li::before { display: none; }
.per-chi a { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.65rem 0.85rem; background: var(--carta); border: var(--bd-sottile); border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.3; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.per-chi a:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: var(--ombra-sm); }
.per-chi a .icona { width: 22px; height: 22px; }

.hub-cols { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hub-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hub-col { border: var(--bd); border-radius: 22px; background: var(--carta); box-shadow: var(--ombra); overflow: hidden; display: flex; flex-direction: column; }
.hub-col-head { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.1rem; background: var(--c); border-bottom: var(--bd); text-decoration: none; color: var(--ink); }
.hub-col-head:hover { color: var(--ink); }
.hub-col-head .icona { width: 48px; height: 48px; }
.hub-col-head strong { font: 900 1.3rem/1.1 var(--font-titoli); font-stretch: 115%; letter-spacing: -0.02em; }
.hub-col ul { list-style: none; margin: 0; padding: 0.9rem 1.1rem 0.4rem; flex: 1; }
.hub-col li { margin: 0 0 0.6rem; line-height: 1.35; }
.hub-col li::before { display: none; }
.hub-col li a { color: var(--ink); font-weight: 600; text-decoration-color: var(--c); text-decoration-thickness: 3px; }
.hub-col li a:hover { color: var(--blu); }
.hub-col .tutti { display: block; margin: 0.3rem 1.1rem 1.1rem; font-weight: 800; }

.dati-mini { display: grid; gap: 1.4rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .dati-mini { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mesi { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .mesi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mesi > li { margin: 0; border: var(--bd-sottile); border-radius: 14px; background: var(--carta); padding: 0.55rem 0.8rem; line-height: 1.25; }
.mesi > li::before { display: none; }
.mesi span { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.mesi strong { display: block; font: 900 1.45rem/1.15 var(--font-titoli); font-stretch: 118%; }
.mesi > li:first-child { background: var(--rosa); box-shadow: var(--ombra-sm); }
.mesi > li:first-child span { color: var(--ink); }

.autore-box { display: grid; gap: 1.3rem; grid-template-columns: 1fr; align-items: center; border: var(--bd); border-radius: 24px; background: var(--carta); padding: 1.4rem; box-shadow: var(--ombra-lg); }
@media (min-width: 820px) { .autore-box { grid-template-columns: auto 1fr; padding: 1.8rem 2rem; } }
.autore-box .avatar { width: 112px; height: 112px; font-size: 2.2rem; box-shadow: var(--ombra); background: var(--lilla); }
.autore-box h3 { margin: 0 0 0.4rem; font-size: 1.5rem; font-stretch: 112%; }
.badges { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.badges > li { margin: 0; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.85rem 0.35rem 0.4rem; border: var(--bd-sottile); border-radius: 999px; font-weight: 700; font-size: 0.9rem; background: var(--menta-50); }
.badges > li::before { display: none; }
.badges .icona { width: 24px; height: 24px; }

.domande { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .domande { grid-template-columns: 1fr 1fr; } }
.domande > li { margin: 0; }
.domande > li::before { display: none; }
.domande a { display: block; height: 100%; padding: 0.9rem 1rem; border: var(--bd-sottile); border-radius: 16px; background: var(--carta); color: var(--ink); text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.domande a:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: var(--ombra-sm); }
.domande strong { display: block; font-size: 1.02rem; line-height: 1.35; margin-bottom: 0.25rem; }
.domande span { color: var(--blu); font-weight: 700; font-size: 0.93rem; }

/* ---------- Piè di pagina ---------- */
.site-footer { background: var(--ink); color: #ecebf4; font-size: 0.95rem; padding: 3rem 0 2.6rem; margin-top: 4rem; }
.t-home .site-footer { margin-top: 0; }
.site-footer a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.45); }
.site-footer a:hover { color: var(--giallo); text-decoration-color: var(--giallo); }
.footer-brand { display: block; font: 900 clamp(2.4rem, 1rem + 6.4vw, 6.4rem)/0.92 var(--font-titoli); font-stretch: 125%; letter-spacing: -0.05em; margin: 0 0 2rem; color: #fff; }
.footer-brand span { color: var(--giallo); }
.footer-cols { display: grid; gap: 1.8rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-cols { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.site-footer h2 { font-size: 0.98rem; margin: 0 0 0.7rem; color: var(--giallo); font-stretch: 110%; }
.footer-cols > div:nth-child(3) h2 { color: var(--rosa); }
.footer-cols > div:nth-child(4) h2 { color: var(--menta); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.22); margin-top: 2.2rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.3rem; align-items: center; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.45); cursor: pointer; }
.linklike:hover { color: var(--giallo); }

/* ---------- Contatti ---------- */
.contact-form textarea { min-height: 170px; }
.hp-field { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 404 ---------- */
.errore-404 { font: 900 clamp(5rem, 3rem + 10vw, 10rem)/0.9 var(--font-titoli); font-stretch: 125%; letter-spacing: -0.06em; margin: 0 0 1rem; }

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .ticker-track { animation: none; }
  .ticker { overflow-x: auto; }
}

/* ---------- Stampa ---------- */
@media print {
  @page { margin: 16mm 14mm; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .site-header, .breadcrumb, .tag, .deco, .sidebar, .ad-slot, .site-footer, .cta-studio, .result-actions, .form-actions, .toc, .skip-link, .related, .no-print, .progresso, .ticker, .lettera-azioni { display: none !important; }
  .page-head { background: #fff !important; color: #000; border: 0; }
  .page-head-inner { padding: 0; }
  .layout { display: block; padding: 0; }
  .calc, .result, .box, .card, .kpi, .table-wrap, .faq-item, .term-def { box-shadow: none !important; border: 1px solid #999; background: #fff !important; }
  .faq-item summary::after { display: none; }
  a { color: #000; text-decoration: none; }
  h2, h3 { break-after: avoid; }
  .result, .box, .faq-item { break-inside: avoid; }
  .print-only { display: block !important; }
  body.stampa-lettera * { visibility: hidden; }
  body.stampa-lettera #lettera, body.stampa-lettera #lettera * { visibility: visible; }
  body.stampa-lettera #lettera { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; padding: 0; margin: 0; }
  body.stampa-lettera #lettera [data-campo] { background: none; border: 0; }
}
.print-only { display: none; }
