/* Il mio bando: sito pubblico.
   Stessi token dell'app (bando-facile/frontend/src/styles/tokens.css) così sito e prodotto si riconoscono.
   Elemento firma: il testo del bando evidenziato e annotato a margine (.doc). Tutto il resto resta quieto. */

@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #F7F6F3;
  --surface: #FFFFFF;
  --sunken: #EFEDE8;
  --line: #DDD9D0;
  --line-strong: #8C857A;
  --ink: #1C1B19;
  --muted: #57534B;
  --subtle: #6E695F;
  --petrol: #0E5A64;
  --petrol-hover: #0A4750;
  --petrol-deep: #0B3A41;
  --petrol-soft: #E2EFF0;
  --on-petrol: #FFFFFF;
  --mark: #FBE27C;          /* evidenziatore sul testo del bando */
  --mark-soft: #FDF1B8;
  --pass-fg: #166534; --pass-bg: #DCFCE7;
  --fail-fg: #991B1B; --fail-bg: #FEE2E2;
  --unk-fg: #3F3F46;  --unk-bg: #F1F1F3;
  --risk-fg: #92400E; --risk-bg: #FEF3C7;
  --ai-fg: #5B21B6;   --ai-bg: #EDE9FE;
  --open-fg: #166534; --open-bg: #DCFCE7;
  --soon-fg: #1E40AF; --soon-bg: #DBEAFE;

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1.03rem, 1rem + 0.15vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.35vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.7vw, 1.85rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.4vw, 2.6rem);
  --step-4: clamp(2.2rem, 1.7rem + 2.4vw, 3.6rem);

  --r-chip: 4px;
  --r-panel: 10px;
  --r-frame: 14px;
  --shadow-sheet: 0 1px 0 rgba(28, 27, 25, .04), 0 18px 40px -22px rgba(11, 58, 65, .35);
  --gutter: 20px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: var(--step-0); line-height: 1.55;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--petrol-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; border-radius: 3px; }
.bg-deep :focus-visible, .cta-band :focus-visible { outline-color: #fff; }
::selection { background: var(--mark); color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.012em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: var(--step-4); letter-spacing: -0.022em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }
h4 { font-size: var(--step-0); font-family: var(--sans); font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
li { text-wrap: pretty; }
.lead { font-size: var(--step-1); line-height: 1.45; color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: 42rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--petrol); color: #fff; padding: 10px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.25em; border-radius: 8px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--petrol); color: var(--on-petrol); }
.btn-primary:hover { background: var(--petrol-hover); color: var(--on-petrol); }
.btn-secondary { background: var(--surface); color: var(--petrol); border-color: var(--petrol); }
.btn-secondary:hover { background: var(--petrol-soft); color: var(--petrol-hover); }
.btn-light { background: #fff; color: var(--petrol-deep); }
.btn-light:hover { background: var(--petrol-soft); color: var(--petrol-deep); }
.btn-ghost-light { color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-sm { min-height: 40px; padding: .45em .95em; font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions-note { margin-top: 12px; font-size: var(--step--1); color: var(--muted); }

/* ---------- testata ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 246, 243, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand svg { width: 30px; height: 30px; }
.brand span { font: 600 1.3rem/1 var(--serif); letter-spacing: -0.015em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a, .nav-group > summary { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 500; cursor: pointer; list-style: none; }
.nav > a:hover, .nav-group > summary:hover { background: var(--sunken); color: var(--ink); }
.nav > a[aria-current="page"], .nav-group.is-current > summary { color: var(--petrol); box-shadow: inset 0 -2px 0 var(--petrol); border-radius: 0; }
.nav-group { position: relative; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 4px; }
.nav-panel { position: absolute; top: calc(100% + 8px); left: -8px; width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow-sheet); padding: 8px; }
.nav-panel a { display: block; padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.nav-panel a strong { display: block; font-weight: 600; }
.nav-panel a span { display: block; color: var(--muted); font-size: var(--step--1); line-height: 1.35; }
.nav-panel a:hover { background: var(--petrol-soft); color: var(--ink); }
.header-cta { display: flex; align-items: center; gap: 8px; }
.header-cta .login { color: var(--ink); font-weight: 500; text-decoration: none; padding: 0 10px; min-height: 44px; display: inline-flex; align-items: center; }
.menu-toggle { display: none; }

@media (max-width: 1020px) {
  .nav, .header-cta .login, .header-cta .btn-secondary { display: none; }
  .header-cta { margin-left: auto; }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
  .menu-toggle { display: block; }
  .menu-toggle > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; background: var(--surface); }
  .menu-toggle > summary::-webkit-details-marker { display: none; }
  .menu-toggle > summary svg { width: 22px; height: 22px; }
  .mobile-menu { position: fixed; top: 69px; left: 0; right: 0; height: calc(100dvh - 69px); background: var(--paper); overflow-y: auto; overscroll-behavior: contain; padding: 8px var(--gutter) 40px; border-top: 1px solid var(--line); z-index: 60; }
  .mobile-menu .menu-label { font: 700 var(--step--1)/1 var(--sans); color: var(--muted); margin: 22px 0 6px; }
  .mobile-menu a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 1.08rem; }
  .mobile-menu .actions { margin-top: 24px; }
  .mobile-menu .actions .btn { flex: 1 1 100%; }
}
@media (max-width: 420px) { .site-header .wrap { gap: 10px; } .header-cta .btn-primary { padding-inline: .75em; font-size: .9rem; } .brand span { font-size: 1.12rem; } .brand svg { width: 26px; height: 26px; } }

/* ---------- sezioni ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-tight { padding-block: clamp(40px, 5vw, 64px); }
.bg-surface { background: var(--surface); border-block: 1px solid var(--line); }
.bg-sunken { background: var(--sunken); }
.bg-deep { background: var(--petrol-deep); color: #E8F1F2; }
.bg-deep h2, .bg-deep h3 { color: #fff; }
.bg-deep a:not(.btn) { color: #BFE3E7; }
.bg-deep .muted { color: #CFE4E7; }
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.45; }
.bg-deep .section-head p { color: #DCECEE; }

/* ---------- hero con documento annotato ---------- */
.hero { padding-block: clamp(36px, 6vw, 80px) clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 13.5em; }
.hero .lead { margin-bottom: 28px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--step--1); }
.hero-proof li { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof svg { width: 18px; height: 18px; color: var(--petrol); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.page-hero { padding-block: clamp(32px, 5vw, 64px) clamp(36px, 5vw, 64px); }
.page-hero h1 { max-width: 18em; }
.page-hero .lead { margin-bottom: 26px; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .page-hero-grid { grid-template-columns: 1fr; } }

/* Il foglio del bando */
.doc {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 3px;
  box-shadow: var(--shadow-sheet); padding: 26px 26px 22px; font-family: var(--serif); color: #2A2925; margin: 0;
}
.doc::before { /* bordo del foglio sottostante: la pila del bando */
  content: ""; position: absolute; inset: 10px -10px -10px 10px; background: #FBFAF7; border: 1px solid var(--line); border-radius: 3px; z-index: -1;
}
.doc-head { display: flex; justify-content: space-between; gap: 12px; font-family: var(--sans); font-size: .8rem; color: var(--subtle); border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.doc-title { font-size: 1.02rem; font-weight: 700; margin: 0 0 10px; line-height: 1.3; }
.doc p { font-size: .97rem; line-height: 1.6; margin: 0 0 .8em; }
.doc .art { font-weight: 700; }
.doc mark {
  background: linear-gradient(transparent 8%, var(--mark) 8%, var(--mark) 92%, transparent 92%) no-repeat 0 0 / 100% 100%;
  color: inherit; padding: 0 2px; border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.doc mark[data-n]::after { content: attr(data-n); font: 700 .66rem/1 var(--sans); vertical-align: super; color: var(--petrol); margin-left: 2px; }
.doc-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; }
.doc-notes { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px dashed var(--line-strong); display: grid; gap: 12px; align-content: start; font-family: var(--sans); }
@media (max-width: 640px) { .doc-body { grid-template-columns: 1fr; } .doc-notes { border-left: 0; padding: 14px 0 0; border-top: 1px dashed var(--line-strong); } .doc { padding: 20px 18px 18px; } .doc::before { inset: 8px -6px -8px 8px; } }
.doc-notes li { display: grid; grid-template-columns: 22px 1fr; gap: 4px 10px; align-items: start; font-size: .9rem; line-height: 1.4; }
.doc-notes .n { font-weight: 700; color: var(--petrol); font-size: .8rem; padding-top: 3px; }
.doc-notes .why { grid-column: 2; color: var(--muted); font-size: .84rem; }
.doc-notes .cite { grid-column: 2; color: var(--subtle); font-size: .8rem; }

/* Verdetti: testo + simbolo, mai solo colore */
.v { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 2px 8px 2px 6px; border-radius: var(--r-chip); font: 600 .84rem/1.4 var(--sans); white-space: nowrap; }
.v::before { font-weight: 800; }
.v-pass { background: var(--pass-bg); color: var(--pass-fg); } .v-pass::before { content: "✓"; }
.v-fail { background: var(--fail-bg); color: var(--fail-fg); } .v-fail::before { content: "✗"; }
.v-unk { background: var(--unk-bg); color: var(--unk-fg); } .v-unk::before { content: "?"; }
.v-risk { background: var(--risk-bg); color: var(--risk-fg); } .v-risk::before { content: "!"; }
.v-ai { background: var(--ai-bg); color: var(--ai-fg); } .v-ai::before { content: "✎"; }
.st { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--r-chip); font: 600 .8rem/1.4 var(--sans); white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-open { background: var(--open-bg); color: var(--open-fg); }
.st-soon { background: var(--soon-bg); color: var(--soon-fg); }
.st-closing { background: var(--risk-bg); color: var(--risk-fg); }
.st-check { background: #FEF9C3; color: #854D0E; }

/* Animazione d'ingresso, una sola: l'evidenziatore passa sul bando, poi compaiono le note */
@media (prefers-reduced-motion: no-preference) {
  .js .doc-anim mark { background-size: 0% 100%; animation: sweep .55s cubic-bezier(.3,.7,.3,1) forwards; }
  .js .doc-anim mark:nth-of-type(1) { animation-delay: .35s; }
  .js .doc-anim mark:nth-of-type(2) { animation-delay: .8s; }
  .js .doc-anim mark:nth-of-type(3) { animation-delay: 1.25s; }
  .js .doc-anim mark:nth-of-type(4) { animation-delay: 1.7s; }
  .js .doc-anim .doc-notes li { opacity: 0; transform: translateY(4px); animation: noteIn .4s ease-out forwards; }
  .js .doc-anim .doc-notes li:nth-child(1) { animation-delay: .7s; }
  .js .doc-anim .doc-notes li:nth-child(2) { animation-delay: 1.15s; }
  .js .doc-anim .doc-notes li:nth-child(3) { animation-delay: 1.6s; }
  .js .doc-anim .doc-notes li:nth-child(4) { animation-delay: 2.05s; }
  .js .doc-anim .doc-verdict { opacity: 0; animation: noteIn .45s ease-out 2.5s forwards; }
}
@keyframes sweep { to { background-size: 100% 100%; } }
@keyframes noteIn { to { opacity: 1; transform: none; } }

.doc-verdict { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; background: var(--petrol-soft); border-radius: 6px; font-family: var(--sans); font-size: .9rem; }
.doc-verdict strong { font-size: .98rem; }

/* ---------- il percorso (sequenza vera: numeri ammessi) ---------- */
.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: p; border-top: 2px solid var(--ink); }
.path li { counter-increment: p; padding: 22px 22px 8px 0; position: relative; }
.path li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.path li:nth-child(4n+1) { padding-left: 0; border-left: 0; }
.path li:nth-child(n+5) { border-top: 1px solid var(--line); }
.path li::before { content: counter(p); display: block; font: 600 var(--step-3)/1 var(--serif); color: var(--petrol); margin-bottom: 14px; }
.path h3 { font-size: var(--step-1); }
.path p { color: var(--muted); font-size: .98rem; }
.path a { font-weight: 600; }
@media (max-width: 900px) { .path { grid-template-columns: 1fr 1fr; } .path li:nth-child(n) { padding-left: 22px; border-left: 1px solid var(--line); border-top: 0; } .path li:nth-child(odd) { padding-left: 0; border-left: 0; } .path li:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .path { grid-template-columns: 1fr; } .path li:nth-child(n) { padding-left: 0; border-left: 0; } .path li:nth-child(n+2) { border-top: 1px solid var(--line); } }

/* ---------- problema: elenco di frasi vere, non card ---------- */
.pains { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.pain-list { list-style: none; margin: 0; padding: 0; }
.pain-list li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr; gap: 4px; }
.pain-list li:first-child { border-top: 1px solid var(--line); }
.pain-list q { font: 500 var(--step-1)/1.35 var(--serif); quotes: "«" "»"; }
.pain-list span { color: var(--muted); font-size: .98rem; }
@media (max-width: 860px) { .pains { grid-template-columns: 1fr; } }

/* ---------- righe funzionalità: testo + schermata ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.feature + .feature { margin-top: clamp(64px, 9vw, 120px); }
.feature.flip > :first-child { order: 2; }
.feature h3 { font-size: var(--step-2); }
.feature .more { font-weight: 600; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--petrol); border-bottom: 2px solid var(--petrol); transform: rotate(-45deg); }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; } .feature.flip > :first-child { order: 0; } }

/* ---------- finestra dell'app (mockup in HTML, non immagini) ---------- */
.app {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-frame); box-shadow: var(--shadow-sheet);
  overflow: hidden; font-family: var(--sans); font-size: .9rem; color: var(--ink);
}
.app-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FBFAF8; }
.app-bar .brand-mini { width: 20px; height: 20px; flex: none; }
.app-bar .search { flex: 1; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; color: var(--subtle); font-size: .84rem; background: #fff; min-width: 0; overflow: hidden; white-space: nowrap; }
.app-body { padding: 16px; }
.app-title { font: 600 1.05rem/1.25 var(--serif); margin: 0 0 4px; }
.app-sub { color: var(--muted); font-size: .82rem; margin: 0 0 12px; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.row:first-of-type { border-top: 0; }
.row .t { font-weight: 600; line-height: 1.3; }
.row .m { color: var(--muted); font-size: .8rem; grid-column: 1; }
.row .r { grid-row: 1 / span 2; grid-column: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: .78rem; color: var(--muted); background: #fff; }
.chip.on { border-color: var(--petrol); color: var(--petrol); background: var(--petrol-soft); font-weight: 600; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--petrol); }
.toggle i { width: 30px; height: 18px; border-radius: 9px; background: var(--petrol); position: relative; }
.toggle i::after { content: ""; position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.check-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.check-row .m { color: var(--muted); font-size: .78rem; }
.tag { font-size: .74rem; font-weight: 600; padding: 1px 7px; border-radius: var(--r-chip); background: var(--sunken); color: var(--muted); white-space: nowrap; }
.tag-ai { background: var(--ai-bg); color: var(--ai-fg); }
.tag-ok { background: var(--pass-bg); color: var(--pass-fg); }
.tag-warn { background: var(--risk-bg); color: var(--risk-fg); }
.score { margin: 6px 0 4px; }
.score-bar { position: relative; height: 12px; border-radius: 6px; background: var(--sunken); }
.score-bar .range { position: absolute; top: 0; bottom: 0; background: #7FB1B8; border-radius: 6px; }
.score-bar .thr { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink); }
.score-legend { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); margin-top: 6px; }
.lever { margin-top: 12px; padding: 10px 12px; background: var(--petrol-soft); border-radius: 6px; font-size: .84rem; }
.editor { border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-family: var(--serif); font-size: .9rem; line-height: 1.55; color: #2A2925; }
.counter { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); margin-top: 8px; }
.cal { display: grid; gap: 0; }
.cal-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.cal-row:first-child { border-top: 0; }
.cal-date { text-align: center; line-height: 1.05; font-family: var(--serif); }
.cal-date b { display: block; font-size: 1.35rem; }
.cal-date small { font-family: var(--sans); font-size: .7rem; color: var(--muted); }
.cal-row .m { color: var(--muted); font-size: .78rem; }

/* ---------- contrasto onesto ---------- */
.honest { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); overflow: hidden; }
.honest > div { padding: clamp(22px, 3vw, 36px); }
.honest > div + div { border-left: 1px solid var(--line); background: #FBFAF8; }
.honest h3 { display: flex; align-items: center; gap: 10px; }
.honest ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
@media (max-width: 760px) { .honest { grid-template-columns: 1fr; } .honest > div + div { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- confronto (tabella) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
table.cmp { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .96rem; }
.cmp caption { text-align: left; padding: 14px 16px; font-weight: 600; }
.cmp th, .cmp td { text-align: left; padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.cmp thead th { background: var(--sunken); border-top: 0; font-size: .9rem; }
.cmp tbody th { font-weight: 500; color: var(--muted); }
.cmp .us { background: var(--petrol-soft); }
.cmp thead .us { background: var(--petrol); color: #fff; }
.yes { color: var(--pass-fg); font-weight: 700; }
.no { color: var(--fail-fg); font-weight: 700; }
.part { color: var(--risk-fg); font-weight: 700; }

/* ---------- prezzi ---------- */
.billing { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; background: var(--surface); margin-bottom: 28px; }
.billing button { border: 0; background: transparent; font: 600 .95rem/1 var(--sans); padding: 10px 16px; border-radius: 999px; cursor: pointer; color: var(--muted); min-height: 40px; }
.billing button[aria-pressed="true"] { background: var(--petrol); color: #fff; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 28px 24px 24px; }
.plan.featured { border: 2px solid var(--petrol); box-shadow: var(--shadow-sheet); }
.plan .ribbon { position: absolute; top: -13px; left: 22px; background: var(--petrol); color: #fff; font: 700 .8rem/1 var(--sans); padding: 6px 10px; border-radius: 999px; }
.plan h3 { font-size: var(--step-2); margin-bottom: 4px; }
.plan .for { color: var(--muted); min-height: 3em; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 2px; }
.price b { font: 600 var(--step-4)/1 var(--serif); letter-spacing: -0.02em; }
.price span { color: var(--muted); }
.price-note { color: var(--subtle); font-size: var(--step--1); min-height: 1.4em; margin-bottom: 18px; }
.plan .btn { width: 100%; margin-bottom: 20px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .97rem; }
.plan li { padding-left: 26px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 3px; top: .45em; width: 11px; height: 6px; border-left: 2px solid var(--petrol); border-bottom: 2px solid var(--petrol); transform: rotate(-45deg); }
.plan li.off { color: var(--subtle); }
.plan li.off::before { border: 0; height: 2px; width: 10px; background: var(--line-strong); transform: none; top: .7em; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; max-width: 520px; } }
.plan-wide { margin-top: 20px; display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-panel); padding: 22px 24px; }
.plan-wide h3 { margin-bottom: 4px; }
@media (max-width: 700px) { .plan-wide { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--line); max-width: 52rem; }
details.faq { border-bottom: 1px solid var(--line); }
details.faq > summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font: 600 var(--step-1)/1.35 var(--serif); }
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after { content: "+"; position: absolute; right: 8px; top: 16px; font: 400 1.7rem/1 var(--sans); color: var(--petrol); }
details.faq[open] > summary::after { content: "−"; }
details.faq > div { padding: 0 0 20px; color: var(--ink); max-width: 68ch; }
details.faq > div p:last-child { margin-bottom: 0; }

/* ---------- banda CTA finale ---------- */
.cta-band { background: var(--petrol-deep); color: #E8F1F2; padding-block: clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.cta-band .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.cta-band h2 { color: #fff; max-width: 15em; margin-bottom: .35em; }
.cta-band p { color: #DCECEE; font-size: var(--step-1); line-height: 1.45; max-width: 34em; margin: 0; }
.cta-band .actions { justify-content: flex-end; }
.cta-band .actions-note { color: #CFE4E7; text-align: right; width: 100%; margin-top: 4px; }
@media (max-width: 860px) { .cta-band .wrap { grid-template-columns: 1fr; } .cta-band .actions { justify-content: flex-start; } .cta-band .actions-note { text-align: left; } }

/* ---------- schede (griglie leggere, non card identiche) ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.item h3 { font-size: var(--step-1); margin-bottom: .35em; }
.item p { color: var(--muted); margin: 0; }
.item { border-top: 2px solid var(--ink); padding-top: 16px; }
.bg-deep .item { border-top-color: rgba(255,255,255,.6); }
.bg-deep .item p { color: #DCECEE; }
.link-card { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 22px; transition: border-color .15s ease; }
.link-card:hover { border-color: var(--petrol); color: var(--ink); }
.link-card h3 { margin-bottom: .3em; color: var(--petrol); }
.link-card p { color: var(--muted); margin: 0; font-size: .98rem; }
.link-card .meta { display: block; color: var(--subtle); font-size: var(--step--1); margin-top: 12px; }

/* ---------- briciole ---------- */
.crumbs { font-size: var(--step--1); color: var(--muted); margin-bottom: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }

/* ---------- guide (articoli): corpo serif, misura stretta ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.prose { font-family: var(--serif); font-size: clamp(1.08rem, 1.03rem + .2vw, 1.18rem); line-height: 1.68; max-width: 40rem; }
.prose h2 { font-size: var(--step-2); margin-top: 1.9em; scroll-margin-top: 96px; }
.prose h3 { font-size: var(--step-1); margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .95rem; margin: 1.2em 0 1.6em; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
.prose thead th { background: var(--sunken); }
.prose blockquote { margin: 1.4em 0; padding: 0 0 0 1.4em; font-style: italic; color: var(--muted); }
.prose .cta-inline { font-family: var(--sans); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: var(--step--1); margin-bottom: 28px; }
.keybox { font-family: var(--sans); background: var(--petrol-soft); border-radius: var(--r-panel); padding: 18px 22px; margin: 0 0 2em; font-size: 1.02rem; line-height: 1.55; }
.keybox h2 { font: 700 1rem/1.3 var(--sans); margin: 0 0 8px; letter-spacing: 0; }
.keybox ul { margin: 0; padding-left: 1.2em; }
.note { font-family: var(--sans); background: var(--sunken); max-width: 68ch; border-radius: 8px; padding: 14px 18px; font-size: .98rem; margin: 1.4em 0; }
.cta-inline { font-family: var(--sans); background: var(--petrol-soft); border-radius: var(--r-panel); padding: 22px 24px; margin: 2em 0; }
.cta-inline h2, .cta-inline h3 { font-family: var(--serif); font-size: var(--step-1); margin: 0 0 6px; }
.cta-inline p { margin: 0 0 14px; color: var(--ink); font-size: 1rem; }
.toc { position: sticky; top: 92px; font-size: .95rem; }
.toc h2 { font: 700 .9rem/1.3 var(--sans); color: var(--muted); margin: 0 0 10px; letter-spacing: 0; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc ol a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc ol a:hover { color: var(--petrol); text-decoration: underline; }
.toc .toc-cta { margin-top: 22px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.toc .toc-cta p { margin: 0 0 10px; font-size: .92rem; }
.toc .toc-cta .btn { width: 100%; }
.sources { font-family: var(--sans); font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 2.4em; padding-top: 1em; }
.sources ul { padding-left: 1.1em; }

/* ---------- glossario ---------- */
.glossary dt { font: 600 var(--step-1)/1.3 var(--serif); margin-top: 1.4em; scroll-margin-top: 96px; }
.glossary dd { margin: .3em 0 0; color: var(--ink); }

/* ---------- moduli ---------- */
.form { display: grid; gap: 16px; max-width: 36rem; }
.form label { font-weight: 600; display: grid; gap: 6px; }
.form input, .form select, .form textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); min-height: 48px; }
.form textarea { min-height: 140px; resize: vertical; }
.form .hint { font-weight: 400; color: var(--muted); font-size: var(--step--1); }

/* ---------- piè di pagina ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 56px 32px; font-size: .96rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer-grid h2 { font: 700 .92rem/1.3 var(--sans); margin: 0 0 12px; letter-spacing: 0; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--petrol); text-decoration: underline; }
.footer-about p { color: var(--muted); max-width: 22rem; margin-top: 12px; }
.footer-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--subtle); font-size: var(--step--1); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------- utilità ---------- */
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.badge-new { display: inline-block; font: 700 .76rem/1 var(--sans); padding: 4px 8px; border-radius: 999px; background: var(--soon-bg); color: var(--soon-fg); vertical-align: middle; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .cta-band, .toc { display: none; } body { background: #fff; } }

/* icone (sprite /assets/icons.svg) */
.i { width: 1.2em; height: 1.2em; flex: none; display: inline-block; vertical-align: -0.2em; }
.icon-lg { width: 28px; height: 28px; color: var(--petrol); margin-bottom: 12px; }

@media (min-width: 600px) { .btn { white-space: nowrap; } }

/* revisione: misura, ritmo, varianti */
.section .wrap > p, .section-tight .wrap > p { max-width: 70ch; }
.feature p + h3, .feature ul + h3 { margin-top: 1.6em; }
@media (min-width: 861px) { .pains > :first-child { position: sticky; top: 100px; align-self: start; } }
.path.path-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.path.path-3 li:nth-child(n) { padding-left: 22px; border-left: 1px solid var(--line); border-top: 0; }
.path.path-3 li:nth-child(3n+1) { padding-left: 0; border-left: 0; }
.path.path-3 li:nth-child(n+4) { border-top: 1px solid var(--line); }
@media (max-width: 900px) { .path.path-3 { grid-template-columns: 1fr 1fr; } .path.path-3 li:nth-child(n) { padding-left: 22px; border-left: 1px solid var(--line); border-top: 0; } .path.path-3 li:nth-child(odd) { padding-left: 0; border-left: 0; } .path.path-3 li:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .path.path-3 { grid-template-columns: 1fr; } .path.path-3 li:nth-child(n) { padding-left: 0; border-left: 0; } .path.path-3 li:nth-child(n+2) { border-top: 1px solid var(--line); } }
.doc mark[data-n]::after { display: inline-flex; align-items: center; justify-content: center; width: 1.25em; height: 1.25em; border-radius: 50%; background: var(--petrol); color: #fff; font-size: .62rem; vertical-align: .35em; margin-left: 3px; }
.doc-notes .n { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--petrol); color: #fff; font-size: .72rem; padding: 0; }
.company { color: var(--subtle); font-size: var(--step--1); }
.tour { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tour li { padding: 12px 0; border-top: 1px solid var(--line); }
.cta-band a:not(.btn) { color: #BFE3E7; }
.cta-band a:not(.btn):hover { color: #fff; }
.keybox p, .keybox li, .cta-inline p, .note p { max-width: 60ch; }
.sources ul, .sources p { max-width: 64ch; }
.keybox, .cta-inline, .note { font-size: 1.06rem; }
.page-hero .wrap p, .hero .wrap p { max-width: 70ch; }

/* ---------- home: la notte dei bandi (scena 3D allo scroll, assets/js/notte.js) ----------
   Un blocco scuro con la scena fissa dietro e cinque tappe che scorrono sopra. Senza WebGL o senza JS resta
   il fondo sfumato e il testo si legge uguale. */
:root { --night: #061A1F; --night-2: #0B3A41; --night-ink: #F3F1EA; --night-muted: #B7C6C4; --night-line: rgba(243, 241, 234, .16); }
.night-top .site-header { background: rgba(6, 26, 31, .62); border-bottom-color: rgba(243, 241, 234, .1); }
.night-top .site-header .brand, .night-top .site-header .brand:hover, .night-top .nav > a, .night-top .nav-group > summary, .night-top .header-cta .login, .night-top .menu-toggle summary { color: var(--night-ink); }
.night-top .nav > a:hover, .night-top .nav-group > summary:hover { background: rgba(243, 241, 234, .1); color: #fff; }
.night-top .header-cta .btn-primary { background: var(--night-ink); color: var(--petrol-deep); }
.night-top .header-cta .btn-primary:hover { background: #fff; }
.night-top :is(.night, .pnight, .site-header:not(.is-paper)) :focus-visible { outline-color: var(--mark); }
.night-top .site-header:not(.is-paper) :is(.nav > a[aria-current="page"], .nav-group.is-current > summary) { color: #fff; box-shadow: inset 0 -2px 0 var(--mark); }
.night-top .site-header.is-paper { background: rgba(247, 246, 243, .94); border-bottom-color: var(--line); }
.night-top .site-header.is-paper :is(.brand, .nav > a, .nav-group > summary, .login, .menu-toggle summary) { color: var(--ink); }
.night-top .site-header.is-paper .nav > a:hover, .night-top .site-header.is-paper .nav-group > summary:hover { background: var(--sunken); color: var(--ink); }
.night-top .site-header.is-paper .header-cta .btn-primary { background: var(--petrol); color: #fff; }
.night-top .site-header.is-paper :focus-visible { outline-color: var(--petrol); }

.night {
  position: relative; margin-top: -69px; color: var(--night-ink); isolation: isolate;
  background: radial-gradient(120% 80% at 70% 20%, var(--night-2) 0%, var(--night) 62%) fixed, var(--night);
}
.night ::selection { background: var(--mark); color: var(--ink); }
.night-track { position: absolute; inset: 0; z-index: -1; }
.night-stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: clip; }
.night-canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s cubic-bezier(.16, 1, .3, 1); }
.night-canvas.is-ready { opacity: 1; }
/* velo a sinistra: il testo resta leggibile anche quando i fogli gli passano dietro */
.night-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 26, 31, .94) 0%, rgba(6, 26, 31, .78) 36%, rgba(6, 26, 31, 0) 60%),
              linear-gradient(0deg, rgba(6, 26, 31, .7) 0%, rgba(6, 26, 31, 0) 22%); }

.night-step { min-height: 112vh; display: flex; align-items: center; padding: 120px 0 80px; }
.night-hero { min-height: 100vh; min-height: 100svh; padding-top: 140px; position: relative; }
.night-step .wrap { position: relative; }
.night-panel { max-width: 31rem; }
.night-hero .night-panel { max-width: 36rem; }
.night h1 { font-size: clamp(2.3rem, 1.6rem + 2.9vw, 4.1rem); line-height: 1.04; letter-spacing: -0.028em; color: #fff; }
.night h2 { font-size: clamp(1.9rem, 1.5rem + 1.7vw, 3rem); line-height: 1.08; letter-spacing: -0.022em; color: #fff; }
.night p, .night li { color: var(--night-muted); }
.night .lead { color: var(--night-ink); opacity: .86; }
.night a:not(.btn) { color: var(--night-ink); text-decoration-color: rgba(243, 241, 234, .45); }
.night a:not(.btn):hover { color: #fff; text-decoration-color: var(--mark); }
.night .actions-note { color: var(--night-muted); }
.night .hero-proof { color: var(--night-muted); }
.night .hero-proof svg { color: var(--mark); }
.night .ticks li::before { border-color: var(--mark); }
.night .more { display: inline-block; margin-top: .4em; font-weight: 600; }
.night-cue { position: absolute; left: var(--gutter); bottom: -14vh; margin: 0; font-size: var(--step--1); color: var(--night-muted); display: flex; align-items: center; gap: 12px; }
.night-cue::before { content: ""; width: 1px; height: 44px; background: linear-gradient(var(--night-ink), transparent); }
@media (prefers-reduced-motion: no-preference) {
  .night-cue::before { animation: cue 2.4s cubic-bezier(.65, 0, .35, 1) infinite; transform-origin: top; }
  @keyframes cue { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
}

/* numero della tappa: la sequenza è reale (Trova, Verifica, Prepara, Presenta) */
.step-n { display: block; font: 600 clamp(4rem, 3rem + 4vw, 7rem)/.8 var(--serif); letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1px rgba(243, 241, 234, .38); margin: 0 0 18px -4px; font-variant-numeric: lining-nums; }

.verdicts { list-style: none; margin: 20px 0 14px; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--night-line); }
.verdicts li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 2px 14px; padding: 11px 0; border-bottom: 1px solid var(--night-line); font-size: .95rem; }
.verdicts .v { grid-row: span 2; align-self: start; }
.verdicts .why { color: var(--night-ink); }
.verdicts .cite { color: var(--night-muted); font-size: .82rem; }
.verdict-line { color: var(--night-ink) !important; }
.docs-list { list-style: none; margin: 20px 0 16px; padding: 0; border-top: 1px solid var(--night-line); }
.docs-list li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--night-line); color: var(--night-ink); font-size: .95rem; }
.night-who { margin-top: 1.6em; font-size: var(--step--1); }

@media (max-width: 860px) {
  .night-stage::after { background: linear-gradient(0deg, rgba(6, 26, 31, .96) 0%, rgba(6, 26, 31, .82) 48%, rgba(6, 26, 31, .15) 78%, rgba(6, 26, 31, .35) 100%); }
  .night-step { align-items: flex-end; min-height: 130vh; padding: 46vh 0 40px; }
  .night-hero { align-items: center; min-height: 100svh; padding: 120px 0 60px; }
  .night-hero .night-panel { background: none; }
  .night-panel { max-width: none; }
  .night-cue { display: none; }
  .verdicts li { grid-template-columns: 1fr; }
  .verdicts .v { grid-row: auto; }
}
.night-top .site-header:not(.is-paper) .menu-toggle > summary { background: transparent; border-color: rgba(243, 241, 234, .3); }
@media (max-width: 860px) {
  /* sul telefono il testo passa sopra la scena: gli serve un fondo suo */
  .night-step:not(.night-hero) .night-panel { background: rgba(6, 26, 31, .86); margin-inline: calc(var(--gutter) * -1); padding: 26px var(--gutter) 30px; border-top: 1px solid var(--night-line); }
}

/* ---------- pagine interne: testata scura con la scena 3D (assets/js/pagina.js, meta "scene") ----------
   Percorso e prima sezione stanno in .pnight; il canvas copre il blocco. Il testo resta a sinistra su un velo,
   le figure di esempio (.doc, .app) restano chiare e ci galleggiano sopra. Senza WebGL resta il fondo sfumato. */
.pnight {
  position: relative; margin-top: -69px; padding-top: 69px; color: var(--night-ink); isolation: isolate; overflow: clip;
  background: radial-gradient(110% 90% at 78% 18%, var(--night-2) 0%, var(--night) 64%), var(--night);
  min-height: min(100svh, 920px); display: flex; flex-direction: column;
}
.pnight ::selection { background: var(--mark); color: var(--ink); }
.pnight-stage { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.pnight-stage::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6, 26, 31, .9) 0%, rgba(6, 26, 31, .62) 38%, rgba(6, 26, 31, 0) 62%),
              linear-gradient(0deg, rgba(6, 26, 31, .8) 0%, rgba(6, 26, 31, 0) 26%); }
.pnight .crumbs, .pnight .crumbs a { color: var(--night-muted); }
.pnight .crumbs li + li::before { color: rgba(243, 241, 234, .3); }
.pnight .page-hero { flex: 1; display: flex; align-items: center; padding-block: clamp(36px, 6vw, 88px) clamp(56px, 8vw, 120px); }
.pnight .page-hero > .wrap { position: relative; }
.pnight .page-hero > .wrap:not(.page-hero-grid) > *, .pnight .page-hero-grid > div:first-child { max-width: 40rem; }
.pnight .page-hero h1 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.6rem); line-height: 1.06; letter-spacing: -0.026em; color: #fff; max-width: 15em; }
.pnight .page-hero-grid h1 { font-size: clamp(2rem, 1.5rem + 1.8vw, 3.1rem); }
.pnight :is(.page-hero > .wrap:not(.page-hero-grid), .page-hero-grid > div:first-child) :is(p, li) { color: var(--night-muted); }
.pnight .page-hero .lead { color: var(--night-ink); opacity: .88; }
.pnight :is(.page-hero > .wrap:not(.page-hero-grid), .page-hero-grid > div:first-child) a:not(.btn) { color: var(--night-ink); }
.pnight .page-hero .btn-primary { background: #fff; color: var(--petrol-deep); }
.pnight .page-hero .btn-primary:hover { background: var(--petrol-soft); color: var(--petrol-deep); }
.pnight .page-hero .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.pnight .page-hero .btn-secondary:hover { background: rgba(255, 255, 255, .1); color: #fff; }
/* le figure di esempio galleggiano sulla scena e si inclinano un poco allo scroll (--tilt da pagina.js) */
.pnight :is(.doc, .app) { box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgba(243, 241, 234, .08); transform: perspective(1400px) rotateX(calc(var(--tilt, 0) * 6deg)) rotateY(calc(-9deg + var(--tilt, 0) * 5deg)) translateY(calc(var(--tilt, 0) * -26px)); transform-origin: 50% 40%; }
@media (max-width: 900px) { .pnight :is(.doc, .app) { transform: none; } }
@media (max-width: 860px) {
  .pnight { min-height: 0; }
  .pnight-stage::after { background: linear-gradient(0deg, rgba(6, 26, 31, .92) 0%, rgba(6, 26, 31, .7) 55%, rgba(6, 26, 31, .25) 100%); }
  .pnight .page-hero { padding-top: 34vh; }
  .pnight .page-hero:has(.page-hero-grid) { padding-top: 40px; }
}

/* comparsa allo scroll delle sezioni sotto la testata (pagina.js aggiunge .rv; senza JS è tutto visibile) */
@media (prefers-reduced-motion: no-preference) {
  .rv { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1) var(--rv-d, 0s), transform .9s cubic-bezier(.16, 1, .3, 1) var(--rv-d, 0s); }
  .rv.is-in { opacity: 1; transform: none; }
}

/* Cookie banner */
.cb { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9000; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 24px -8px rgba(11, 58, 65, .18); }
.cb-inner { padding-block: 14px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cb-text { flex: 1 1 300px; }
.cb-text p { margin: 0; font-size: var(--step--1); line-height: 1.5; }
.cb-text strong { font-weight: 700; }
.cb-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex-shrink: 0; }
.cb-customize { background: none; border: none; padding: 0; font: inherit; font-size: var(--step--1); color: var(--petrol); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cb-customize:hover { color: var(--petrol-hover); }
.cb-details { border-top: 1px solid var(--line); background: var(--paper); }
.cb-option { display: flex; gap: 10px; align-items: flex-start; padding-block: 8px; cursor: pointer; font-size: var(--step--1); line-height: 1.5; }
.cb-option input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.cb-check { flex-shrink: 0; margin-top: 2px; width: 18px; height: 18px; border: 2px solid var(--line-strong); border-radius: 4px; background: var(--surface); display: flex; align-items: center; justify-content: center; transition: border-color .15s, background .15s; }
.cb-option input:checked + .cb-check { background: var(--petrol); border-color: var(--petrol); }
.cb-option input:checked + .cb-check::after { content: ''; display: block; width: 5px; height: 9px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(42deg) translateY(-1px); }
.cb-option:hover .cb-check { border-color: var(--petrol); }
.cb-option--disabled { cursor: default; opacity: .65; }
.cb-check--on { background: var(--petrol); border-color: var(--petrol); }
.cb-check--on::after { content: ''; display: block; width: 5px; height: 9px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(42deg) translateY(-1px); }
fieldset { border: none; margin: 0; padding: 0; }
@media (max-width: 600px) { .cb-inner { flex-direction: column; align-items: flex-start; } }
