/* Polimania — design system in stile shadcn/ui (token + componenti), senza build. */
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --muted: #f4f4f5;
  --muted-foreground: #6b6b74;
  --border: #e4e4e7;
  --input: #d9d9de;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --accent: #f4f4f5;
  --destructive: #d03b3b;
  --ring: #a1a1aa;
  --brand: #256abf;
  --brand-soft: #eaf2fd;
  --page: #fafafa;
  --good: #0a7d0a;
  --good-soft: #e9f6e9;
  --warn: #9a6300;
  --warn-soft: #fdf3dc;
  --bad-soft: #fbeaea;
  /* grafici */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --track: #eeeef0;
  --grid: #e4e4e7;
  --radius: 0.625rem;
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.05);
  --shadow: 0 1px 3px rgba(9, 9, 11, 0.08), 0 1px 2px -1px rgba(9, 9, 11, 0.08);
  --shadow-lg: 0 12px 32px -8px rgba(9, 9, 11, 0.16), 0 4px 10px -4px rgba(9, 9, 11, 0.08);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #09090b; --foreground: #fafafa; --card: #111113; --card-foreground: #fafafa;
    --muted: #1f1f23; --muted-foreground: #a1a1aa; --border: #27272a; --input: #33333a;
    --primary: #fafafa; --primary-foreground: #18181b; --secondary: #1f1f23; --secondary-foreground: #fafafa;
    --accent: #1f1f23; --destructive: #e66767; --ring: #71717a; --brand: #5b9ef0; --brand-soft: #132338;
    --page: #09090b; --good: #3fbf3f; --good-soft: #10260f; --warn: #f0b23c; --warn-soft: #2b2110; --bad-soft: #2d1414;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --track: #1f1f23; --grid: #27272a;
    --shadow-sm: none; --shadow: 0 0 0 1px rgba(255,255,255,0.03); --shadow-lg: 0 16px 40px -12px rgba(0,0,0,0.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #09090b; --foreground: #fafafa; --card: #111113; --card-foreground: #fafafa;
  --muted: #1f1f23; --muted-foreground: #a1a1aa; --border: #27272a; --input: #33333a;
  --primary: #fafafa; --primary-foreground: #18181b; --secondary: #1f1f23; --secondary-foreground: #fafafa;
  --accent: #1f1f23; --destructive: #e66767; --ring: #71717a; --brand: #5b9ef0; --brand-soft: #132338;
  --page: #09090b; --good: #3fbf3f; --good-soft: #10260f; --warn: #f0b23c; --warn-soft: #2b2110; --bad-soft: #2d1414;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --track: #1f1f23; --grid: #27272a;
  --shadow-sm: none; --shadow: 0 0 0 1px rgba(255,255,255,0.03); --shadow-lg: 0 16px 40px -12px rgba(0,0,0,0.7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6;
  color: var(--foreground); background: var(--background);
  -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11";
}
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand); color: #fff; }
.icona { width: 1em; height: 1em; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.contenitore { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.stretto { max-width: 760px; }
.pila { display: flex; flex-direction: column; }
.riga { display: flex; align-items: center; }
.tra { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.avvolgi { flex-wrap: wrap; }
.cresce { flex: 1 1 0; min-width: 0; }
.griglia { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-lato { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.centro { text-align: center; }
.tenue { color: var(--muted-foreground); }
.piccolo { font-size: 13px; }
.mini { font-size: 12px; }
.forte { font-weight: 600; }
.nowrap { white-space: nowrap; }
@media (max-width: 900px) {
  .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-lato { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .contenitore { padding: 0 16px; }
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid transparent; border-radius: calc(var(--radius) - 2px); background: var(--primary); color: var(--primary-foreground);
  font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: background-color .15s, border-color .15s, opacity .15s, transform .05s;
}
.btn:hover { opacity: .9; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-contorno { background: var(--background); color: var(--foreground); border-color: var(--input); }
.btn-contorno:hover { background: var(--accent); opacity: 1; }
.btn-secondario { background: var(--secondary); color: var(--secondary-foreground); box-shadow: none; }
.btn-secondario:hover { background: var(--border); opacity: 1; }
.btn-fantasma { background: transparent; color: var(--foreground); box-shadow: none; }
.btn-fantasma:hover { background: var(--accent); opacity: 1; }
.btn-pericolo { background: var(--destructive); color: #fff; }
.btn-marca { background: var(--brand); color: #fff; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; border-radius: var(--radius); }
.btn-icona { width: 36px; padding: 0; }
.btn-blocco { width: 100%; }

/* ---------- Schede ---------- */
.scheda { background: var(--card); color: var(--card-foreground); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow-sm); }
.scheda-testa { padding: 20px 22px 0; display: flex; flex-direction: column; gap: 4px; }
.scheda-titolo { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.scheda-descrizione { font-size: 13.5px; color: var(--muted-foreground); line-height: 1.5; }
.scheda-corpo { padding: 20px 22px; }
.scheda-piede { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.scheda-piana { box-shadow: none; }
.scheda-evidenza { border-color: var(--foreground); box-shadow: var(--shadow-lg); }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--background); color: var(--foreground); font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.badge-pieno { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }
.badge-tenue { background: var(--secondary); border-color: transparent; }
.badge-marca { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.badge-ok { background: var(--good-soft); color: var(--good); border-color: transparent; }
.badge-attenzione { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-errore { background: var(--bad-soft); color: var(--destructive); border-color: transparent; }

/* ---------- Moduli ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; }
.etichetta { font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.aiuto { font-size: 12.5px; color: var(--muted-foreground); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px);
  background: var(--background); font-size: 14px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 84px; padding: 9px 12px; line-height: 1.5; resize: vertical; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input::placeholder, .textarea::placeholder { color: var(--muted-foreground); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 28%, transparent); }
.input-lg { height: 52px; font-size: 16px; padding: 0 16px 0 46px; border-radius: var(--radius); }
.spunta { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.spunta input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--primary); flex: none; }

/* ---------- Avvisi ---------- */
.avviso { display: flex; gap: 12px; padding: 13px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); font-size: 14px; line-height: 1.5; }
.avviso .icona { width: 16px; height: 16px; margin-top: 3px; }
.avviso-titolo { font-weight: 600; }
.avviso-ok { border-color: color-mix(in srgb, var(--good) 35%, var(--border)); background: var(--good-soft); }
.avviso-errore { border-color: color-mix(in srgb, var(--destructive) 40%, var(--border)); background: var(--bad-soft); }
.avviso-attenzione { border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); background: var(--warn-soft); }
.avviso-info { background: var(--muted); border-color: transparent; }

/* ---------- Tabelle ---------- */
.tabella-avvolgi { overflow-x: auto; }
.tabella { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabella th { text-align: left; font-weight: 500; color: var(--muted-foreground); font-size: 12.5px; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tabella td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabella tr:last-child td { border-bottom: 0; }
.tabella tbody tr:hover td { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.tabella .destra { text-align: right; }

/* ---------- Schede a linguette / separatori ---------- */
.linguette { display: inline-flex; padding: 3px; gap: 2px; background: var(--muted); border-radius: var(--radius); }
.linguette a, .linguette button { height: 30px; padding: 0 12px; border: 0; background: transparent; border-radius: calc(var(--radius) - 3px); font-size: 13.5px; font-weight: 500; color: var(--muted-foreground); display: inline-flex; align-items: center; cursor: pointer; }
.linguette .attiva { background: var(--background); color: var(--foreground); box-shadow: var(--shadow); }
.separatore { height: 1px; background: var(--border); border: 0; margin: 0; }
.vuoto { padding: 36px 20px; text-align: center; color: var(--muted-foreground); border: 1px dashed var(--border); border-radius: var(--radius); font-size: 14px; }
.vuoto .icona { width: 22px; height: 22px; margin: 0 auto 10px; }

/* ---------- Intestazione sito ---------- */
.testata { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--background) 82%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border); }
.testata-in { height: 60px; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 17px; letter-spacing: -0.03em; }
.logo-segno { width: 26px; height: 26px; border-radius: 8px; background: var(--foreground); color: var(--background); display: grid; place-items: center; }
.logo-segno svg { width: 15px; height: 15px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { height: 32px; padding: 0 10px; border-radius: 7px; font-size: 14px; color: var(--muted-foreground); display: inline-flex; align-items: center; transition: color .15s, background-color .15s; }
.nav a:hover, .nav a.attiva { color: var(--foreground); background: var(--accent); }
.testata .azioni { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.solo-chiaro { display: block; } .solo-scuro { display: none; }
:root[data-theme="dark"] .solo-chiaro { display: none; } :root[data-theme="dark"] .solo-scuro { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .solo-chiaro { display: none; } :root:not([data-theme="light"]) .solo-scuro { display: block; } }
.menu-mobile { display: none; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px 16px 16px; background: var(--background); border-bottom: 1px solid var(--border); }
  .nav.aperta { display: flex; }
  .nav a { height: 42px; font-size: 15px; }
  .menu-mobile { display: inline-flex; }
  .nascondi-mobile { display: none !important; }
}

/* ---------- Hero ---------- */
.eroe { position: relative; padding: 72px 0 64px; overflow: hidden; }
.eroe::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0); background-size: 26px 26px; mask-image: radial-gradient(ellipse 70% 62% at 50% 0%, #000 30%, transparent 78%); -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 0%, #000 30%, transparent 78%); pointer-events: none; }
.eroe-griglia { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.eroe h1 { font-size: clamp(38px, 5.4vw, 62px); letter-spacing: -0.045em; line-height: 1.02; font-weight: 650; }
.eroe h1 em { font-style: normal; color: var(--brand); }
.eroe .sotto { font-size: 18px; color: var(--muted-foreground); max-width: 34em; margin-top: 20px; line-height: 1.55; }
@media (max-width: 900px) { .eroe { padding: 44px 0 40px; } .eroe-griglia { grid-template-columns: minmax(0, 1fr); gap: 36px; } .eroe .sotto { font-size: 16.5px; } }

/* Ricerca Comune */
.ricerca { position: relative; max-width: 520px; margin-top: 30px; }
.ricerca > .icona { position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; color: var(--muted-foreground); pointer-events: none; }
.ricerca-esiti { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 5px; max-height: 340px; overflow: auto; display: none; }
.ricerca-esiti.aperta { display: block; }
.ricerca-esiti a, .ricerca-esiti button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: transparent; text-align: left; border-radius: 7px; font-size: 14.5px; cursor: pointer; }
.ricerca-esiti a:hover, .ricerca-esiti .attivo, .ricerca-esiti button:hover { background: var(--accent); }
.ricerca-esiti .dettaglio { margin-left: auto; font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; }
.ricerca-esiti .nessuno { padding: 12px; font-size: 14px; color: var(--muted-foreground); }
.garanzie-mini { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 13px; color: var(--muted-foreground); }
.garanzie-mini span { display: inline-flex; align-items: center; gap: 6px; }
.garanzie-mini .icona { color: var(--good); }

/* ---------- Sezioni ---------- */
.sezione { padding: 72px 0; }
.sezione-tenue { background: var(--page); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sopratitolo { font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: .01em; }
.sezione h2 { font-size: clamp(27px, 3.4vw, 38px); letter-spacing: -0.035em; margin-top: 8px; }
.sezione .intro { color: var(--muted-foreground); font-size: 16.5px; max-width: 42em; margin-top: 12px; }
@media (max-width: 620px) { .sezione { padding: 48px 0; } }
.passo-num { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border); display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--background); }
.icona-riquadro { width: 38px; height: 38px; border-radius: 10px; background: var(--muted); display: grid; place-items: center; }
.icona-riquadro .icona { width: 18px; height: 18px; }
.elenco-spunte li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; padding: 5px 0; }
.elenco-spunte .icona { width: 15px; height: 15px; margin-top: 4px; color: var(--good); }
.prezzo { font-size: 34px; font-weight: 650; letter-spacing: -0.04em; line-height: 1; }
.prezzo small { font-size: 14px; font-weight: 400; color: var(--muted-foreground); letter-spacing: 0; }
.prosa { font-size: 15.5px; line-height: 1.7; }
.prosa h2 { font-size: 22px; margin: 36px 0 10px; letter-spacing: -0.02em; }
.prosa h3 { font-size: 16.5px; margin: 24px 0 6px; }
.prosa p + p { margin-top: 12px; }
.prosa ul { list-style: disc; padding-left: 20px; margin: 10px 0; }
.prosa li { margin: 5px 0; }
.prosa a { text-decoration: underline; text-underline-offset: 3px; }
.piede { border-top: 1px solid var(--border); padding: 40px 0 48px; font-size: 13.5px; color: var(--muted-foreground); }
.piede a:hover { color: var(--foreground); }

/* ---------- Grafici ---------- */
.statistica .valore { font-size: 28px; font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; }
.statistica .nome { font-size: 13px; color: var(--muted-foreground); }
.barre { display: flex; flex-direction: column; gap: 13px; }
.barra { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; align-items: baseline; font-size: 14px; }
.barra .nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra .valore { font-weight: 600; font-variant-numeric: tabular-nums; }
.barra .traccia { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.barra .riempi { display: block; height: 100%; min-width: 2px; border-radius: 4px; background: var(--series-1); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.barra:hover .nome { color: var(--foreground); }
.barra .riempi.due { background: var(--series-2); }
.scala { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--card); }
.scala span { display: block; height: 100%; min-width: 0; }
.scala .s1 { background: #d03b3b; } .scala .s2 { background: #ec9a86; } .scala .s3 { background: var(--grid); } .scala .s4 { background: #86b6ef; } .scala .s5 { background: #2a78d6; }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted-foreground); }
.legenda i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.grado { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.grado b { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 12px; font-weight: 650; background: var(--muted); }
.grado.E1 b { background: var(--brand-soft); color: var(--brand); }
.grado.E2 b { background: var(--good-soft); color: var(--good); }
.grado.E0 b { background: var(--warn-soft); color: var(--warn); }
.progresso { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; }
.progresso span { display: block; height: 100%; background: var(--foreground); border-radius: 4px; }
.linee { width: 100%; height: auto; overflow: visible; }
.linee text { font-family: var(--font); font-size: 11px; fill: var(--muted-foreground); }
.suggerimento { position: absolute; z-index: 50; pointer-events: none; background: var(--foreground); color: var(--background); font-size: 12.5px; line-height: 1.45; padding: 7px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); white-space: nowrap; display: none; }
.demo-nastro { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); padding: 4px 9px; border-radius: 6px; }

/* ---------- Scheda civica ---------- */
.domanda { padding: 22px 0; border-bottom: 1px solid var(--border); }
.domanda:last-child { border-bottom: 0; }
.domanda legend, .domanda .titolo { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; padding: 0; line-height: 1.35; }
.domanda fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.scelte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
@media (max-width: 620px) { .scelte { grid-template-columns: minmax(0, 1fr); } }
.scelta { position: relative; }
.scelta input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.scelta span { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px); font-size: 14px; line-height: 1.3; transition: border-color .12s, background-color .12s; }
.scelta span::before { content: ""; width: 16px; height: 16px; flex: none; border: 1.5px solid var(--ring); border-radius: 5px; background: var(--background); transition: all .12s; }
.scelta input[type="radio"] + span::before { border-radius: 50%; }
.scelta input:hover + span { border-color: var(--ring); }
.scelta input:checked + span { border-color: var(--foreground); background: var(--accent); }
.scelta input:checked + span::before { border-color: var(--foreground); background: var(--foreground); box-shadow: inset 0 0 0 3px var(--background); }
.scelta input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }
.scelta input:disabled + span { opacity: .45; }
.voti { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.voti .scelta span { justify-content: center; min-width: 46px; padding: 8px 10px; }
.voti .scelta span::before { display: none; }
.voti .scelta input:checked + span { background: var(--foreground); color: var(--background); }
.voti-estremi { display: flex; justify-content: space-between; max-width: 286px; font-size: 12px; color: var(--muted-foreground); margin-top: 6px; }
.ricevuta { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 24px; letter-spacing: .12em; font-weight: 600; padding: 16px 20px; border: 1px dashed var(--ring); border-radius: var(--radius); text-align: center; background: var(--muted); overflow-wrap: anywhere; }

/* ---------- Area riservata ---------- */
.guscio { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: var(--page); }
.laterale { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; border-right: 1px solid var(--border); background: var(--background); overflow-y: auto; }
.laterale .logo { padding: 6px 8px 14px; }
.laterale .gruppo { font-size: 11.5px; font-weight: 600; color: var(--muted-foreground); padding: 14px 10px 6px; letter-spacing: .02em; }
.laterale a.voce { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; font-size: 14px; color: var(--muted-foreground); }
.laterale a.voce:hover { background: var(--accent); color: var(--foreground); }
.laterale a.voce.attiva { background: var(--accent); color: var(--foreground); font-weight: 500; }
.laterale a.voce .icona { width: 16px; height: 16px; }
.laterale .conto { margin-left: auto; font-size: 11.5px; background: var(--foreground); color: var(--background); border-radius: 999px; padding: 1px 7px; font-weight: 600; }
.laterale .fondo { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.profilo { display: flex; align-items: center; gap: 10px; padding: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--foreground); color: var(--background); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.principale { min-width: 0; }
.barra-alta { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--background) 85%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 30; }
.briciole { font-size: 14px; color: var(--muted-foreground); display: flex; align-items: center; gap: 6px; min-width: 0; }
.briciole b { color: var(--foreground); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pagina { padding: 28px; max-width: 1240px; }
.pagina-testa { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pagina-testa h1 { font-size: 26px; letter-spacing: -0.03em; }
.pagina-testa p { color: var(--muted-foreground); font-size: 14.5px; margin-top: 5px; }
.pannello-etichetta { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-foreground); margin: 30px 0 12px; }
.pannello-etichetta::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.bloccato { position: relative; overflow: hidden; }
.bloccato .sfocato { filter: blur(7px); opacity: .55; pointer-events: none; user-select: none; }
.bloccato .velo { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; }
.notizia { display: flex; flex-direction: column; gap: 3px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.notizia:last-child { border-bottom: 0; }
.notizia a:hover { text-decoration: underline; text-underline-offset: 3px; }
.passi-stato { display: flex; flex-wrap: wrap; gap: 6px; }
.passi-stato span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; border: 1px solid var(--border); color: var(--muted-foreground); }
.passi-stato .fatto { background: var(--good-soft); color: var(--good); border-color: transparent; }
.passi-stato .ora { background: var(--foreground); color: var(--background); border-color: transparent; font-weight: 500; }
.menu-area { display: none; }
@media (max-width: 960px) {
  .guscio { grid-template-columns: minmax(0, 1fr); }
  .laterale { position: fixed; z-index: 60; left: 0; top: 0; width: 264px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .laterale.aperta { transform: none; }
  .menu-area { display: inline-flex; }
  .barra-alta { padding: 0 16px; }
  .pagina { padding: 20px 16px; }
}

/* ---------- Pagine di accesso ---------- */
.accesso { min-height: calc(100vh - 61px); display: grid; place-items: center; padding: 40px 16px; background: var(--page); }
.accesso .scheda { width: 100%; max-width: 420px; }
