/* Pagina pubblica di Mandato (/ senza sessione), con lo stesso design system della console: Aurora «Light & Air»
   (Interfaccia/Aurora Design System.pdf, mandato/static/style.css). Fondo chiaro con sfere aurora, pannelli di vetro,
   gradiente indigo-600 → purple-600 per le azioni principali, caratteri di sistema, titoli leggeri.
   Le animazioni (landing.js, GSAP locale) accendono i contenuti ma non li nascondono mai. */

:root {
  color-scheme: light;
  /* Palette Aurora (uguale a style.css) */
  --indigo-50: #eef2ff; --indigo-100: #e0e7ff; --indigo-200: #c7d2fe; --indigo-500: #6366f1; --indigo-600: #4f46e5; --indigo-700: #4338ca;
  --purple-500: #a855f7; --purple-600: #9333ea;
  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0; --slate-300: #cbd5e1; --slate-400: #94a3b8;
  --slate-500: #64748b; --slate-600: #475569; --slate-700: #334155; --slate-800: #1e293b; --slate-900: #0f172a;
  --emerald-50: #ecfdf5; --emerald-100: #d1fae5; --emerald-200: #a7f3d0; --emerald-600: #059669; --emerald-700: #047857;
  --amber-50: #fffbeb; --amber-100: #fef3c7; --amber-200: #fde68a; --amber-500: #f59e0b; --amber-600: #d97706; --amber-800: #92400e;
  --rose-50: #fff1f2; --rose-100: #ffe4e6; --rose-200: #fecdd3; --rose-600: #e11d48; --rose-700: #be123c;
  --violet-100: #f3e8ff; --violet-700: #7e22ce;

  /* Ruoli */
  --bg: var(--slate-50);
  --ink: rgba(255, 255, 255, .42);               /* fascia alterna delle sezioni */
  --surface: rgba(255, 255, 255, .7);
  --surface-2: rgba(255, 255, 255, .9);
  --line: rgba(226, 232, 240, .9);
  --line-strong: var(--slate-200);
  --text: var(--slate-900);
  --muted: var(--slate-600);
  --faint: var(--slate-500);
  --primary: var(--indigo-600);
  --primary-soft: var(--indigo-50);
  --gradient: linear-gradient(90deg, var(--indigo-600), var(--purple-600));
  --gradient-hover: linear-gradient(90deg, var(--indigo-700), #7e22ce);
  --allow: var(--emerald-600);
  --ask: var(--amber-600);
  --deny: var(--rose-600);
  --glass: rgba(255, 255, 255, .7);
  --glass-hover: rgba(255, 255, 255, .85);
  --glass-line: rgba(255, 255, 255, .6);
  --blur: blur(22px);
  --shadow-card: 0 20px 40px -10px rgba(15, 23, 42, .07), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-hover: 0 30px 60px -15px rgba(15, 23, 42, .12), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-float: 0 20px 50px rgba(15, 23, 42, .12);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1200px;
  --r: 24px;
  --r-md: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--indigo-200); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 12px; z-index: 80; padding: 10px 14px; border-radius: 10px; background: #fff; color: var(--text); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-float); }
.skip:focus { left: 12px; }

/* Sfondo aurora: sfere sfumate fisse dietro il contenuto (ferme: sotto il vetro un fondo in movimento costa a ogni fotogramma) */
.aurora-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora-bg::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .3); }
.orb { position: absolute; border-radius: 50%; }
.orb-1 { top: -18%; left: -12%; width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; background: radial-gradient(closest-side, rgba(216, 180, 254, .55), rgba(216, 180, 254, 0)); }
.orb-2 { top: 12%; right: -14%; width: 52vw; height: 52vw; max-width: 800px; max-height: 800px; background: radial-gradient(closest-side, rgba(103, 232, 249, .45), rgba(103, 232, 249, 0)); }
.orb-3 { bottom: -28%; left: 18%; width: 66vw; height: 66vw; max-width: 1000px; max-height: 1000px; background: radial-gradient(closest-side, rgba(253, 230, 138, .5), rgba(253, 230, 138, 0)); }

/* Vetro */
.glass, .glow, .gate, .console, .stage, .card-s, .login-card, .vs-row, .faq details, form, .tab, .marquee, .nav .wrap {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-line);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .glow, .gate, .console, .stage, .card-s, .login-card, .vs-row, .faq details, form, .tab, .marquee, .nav .wrap { background: var(--surface-2); }
}

.band { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: var(--wrap); margin: 0 auto; }
.section { padding-block: clamp(72px, 10vw, 124px); position: relative; }
.label { display: inline-flex; align-items: center; gap: 10px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--indigo-600); }
.label::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--gradient); }
h1, h2, h3 { margin: 0; text-wrap: balance; color: var(--text); }
h1 { font-size: clamp(2.6rem, 6vw, 4.9rem); font-weight: 300; line-height: 1.02; letter-spacing: -.035em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 300; line-height: 1.08; letter-spacing: -.03em; }
h1 em, h2 em { font-style: normal; font-weight: 500; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
h3 { font-size: 1.1rem; font-weight: 650; line-height: 1.3; letter-spacing: -.01em; }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 60ch; margin: 0; }
.head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.head.center { margin-inline: auto; text-align: center; justify-items: center; }
.mono { font-family: var(--mono); }
.note { font: .72rem/1.4 var(--mono); color: var(--faint); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 14px; font: 600 .98rem/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid var(--slate-200); background: #fff; color: var(--slate-700); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(15, 23, 42, .2); }
.btn-primary { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -8px rgba(99, 102, 241, .55); }
.btn-primary:hover { background: var(--gradient-hover); color: #fff; box-shadow: 0 16px 30px -10px rgba(99, 102, 241, .65); }
.btn-ghost { background: rgba(255, 255, 255, .75); border-color: var(--slate-200); color: var(--slate-700); }
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.textlink { color: var(--indigo-600); font-weight: 600; text-underline-offset: 5px; }
.textlink:hover { color: var(--indigo-700); }

/* Marchio, come nella console */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand b { font-size: 1.05rem; font-weight: 650; letter-spacing: -.015em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--gradient); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px -4px rgba(99, 102, 241, .5); flex: none; }
.brand-mark svg { width: 18px; height: 18px; }

/* Avanzamento e barra in alto a pillola, come la topbar della console */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 70; background: var(--gradient); transform-origin: left; transform: scaleX(0); }
.nav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 14px); z-index: 50; margin-top: 14px; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 10px 8px 16px; border-radius: 999px; box-shadow: var(--shadow-card); }
.nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav ul a { display: block; text-decoration: none; color: var(--slate-600); font-size: .9rem; font-weight: 550; padding: 8px 14px; border-radius: 999px; transition: color .2s, background-color .2s; }
.nav ul a:hover { color: var(--slate-900); background: rgba(255, 255, 255, .8); }
.nav ul a.on { color: var(--indigo-700); background: #fff; box-shadow: 0 6px 16px -8px rgba(15, 23, 42, .25); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: .9rem; border-radius: 999px; }
@media (max-width: 1040px) { .nav ul { display: none; } }
@media (max-width: 480px) { .nav-demo { display: none; } }

/* --- Apertura --- */
.hero { position: relative; padding-block: clamp(40px, 6vw, 80px) clamp(56px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(32px, 4vw, 56px); align-items: center; }
.hero-copy { display: grid; gap: 24px; min-width: 0; }
.hero h1 .line { display: block; }
.cta-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid var(--slate-200); color: var(--slate-700); }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.legend b { font: 600 .8rem/1 var(--mono); color: var(--slate-900); font-variant-numeric: tabular-nums; min-width: 2.5ch; text-align: right; }
@media (max-width: 1000px) { .hero .wrap { grid-template-columns: 1fr; } }

.gate { position: relative; min-width: 0; height: clamp(360px, 42vw, 500px); border-radius: 28px; box-shadow: var(--shadow-float); overflow: hidden; }
.gate::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 45% 60% at 50% 50%, rgba(99, 102, 241, .08), transparent 70%); pointer-events: none; }
.gate canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gate .tagline { position: absolute; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-500); pointer-events: none; }
.gate .t-agents { left: 18px; top: 16px; }
.gate .t-systems { right: 18px; top: 16px; text-align: right; }
.gate .t-person { left: 62%; top: 7%; color: var(--amber-600); }
.gate .t-ledger { left: 18px; bottom: 14px; color: var(--amber-600); }
.gate .t-gate { left: 50%; top: 16px; transform: translateX(-50%); color: var(--indigo-600); }
.gate .sim { position: absolute; right: 18px; bottom: 14px; }
@media (max-width: 1000px) { .gate { height: 380px; } }
@media (max-width: 520px) { .gate { height: 330px; } .gate .t-person { left: 58%; } .gate .t-systems { display: none; } }

/* --- Nastro dei riconoscimenti --- */
.marquee { overflow: hidden; border-radius: 0; border-left: 0; border-right: 0; }
.marquee-track { display: flex; gap: 56px; width: max-content; padding-block: 16px; animation: slide 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--slate-600); font-size: .94rem; }
.marquee span b { color: var(--slate-900); font-weight: 650; }
.marquee span::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--gradient); }
@keyframes slide { to { transform: translateX(-50%); } }

/* --- Frase che si accende --- */
.kinetic { font-size: clamp(1.8rem, 4vw, 3.1rem); font-weight: 300; line-height: 1.2; letter-spacing: -.025em; max-width: 980px; margin: 0 auto; text-align: center; text-wrap: balance; color: var(--text); }
.kinetic .w { transition: color .3s; }
.kinetic .hl { font-weight: 500; color: var(--indigo-600); }
.js-motion .kinetic .w { color: var(--slate-300); }
.js-motion .kinetic .w.lit { color: var(--slate-900); }
.js-motion .kinetic .w.lit.hl { color: var(--indigo-600); }

/* --- Schede con bagliore --- */
.glow { position: relative; border-radius: var(--r); box-shadow: var(--shadow-card); overflow: hidden; isolation: isolate; transition: box-shadow .3s, transform .35s var(--ease), background-color .3s; }
.glow::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(99, 102, 241, .12), transparent 60%); }
.glow:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); background: var(--glass-hover); }
.glow:hover::before { opacity: 1; }
.fronts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.front { padding: 26px 22px 24px; display: grid; gap: 12px; align-content: start; text-decoration: none; color: var(--text); }
.front .num { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-400); }
.front .ico, .tab .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--indigo-50); color: var(--indigo-600); }
.front .ico svg { width: 22px; height: 22px; }
.front p { margin: 0; color: var(--muted); font-size: .95rem; }
.front .go { font-size: .84rem; font-weight: 600; color: var(--indigo-600); }
.asks { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 10px 28px; padding: 22px; border-radius: var(--r); border: 1px dashed var(--slate-300); background: rgba(255, 255, 255, .45); }
.asks span { font-size: .82rem; color: var(--faint); }
.asks b { font-size: clamp(1.2rem, 2.2vw, 1.55rem); font-weight: 400; letter-spacing: -.02em; color: var(--slate-900); }
@media (max-width: 980px) { .fronts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .fronts { grid-template-columns: 1fr; } }

/* --- Caso reale guidato dallo scorrimento --- */
.story { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: s; }
.steps li { position: relative; padding: 16px 16px 16px 58px; border-radius: 18px; border: 1px solid transparent; transition: background-color .3s, border-color .3s, box-shadow .3s; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 14px; top: 15px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--indigo-600); background: var(--indigo-50); }
.steps b { display: block; font-size: 1.03rem; }
.steps span { color: var(--muted); font-size: .94rem; }
.steps li.on { background: var(--glass-hover); border-color: var(--glass-line); box-shadow: var(--shadow-card); }
.steps li.on::before { background: var(--gradient); color: #fff; }
.console { border-radius: var(--r); box-shadow: var(--shadow-float); overflow: hidden; min-width: 0; }
.c-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: .84rem; color: var(--muted); flex-wrap: wrap; }
.dots { display: inline-flex; gap: 6px; margin-right: 8px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--slate-200); }
.c-body { padding: 18px; display: grid; gap: 14px; }
.c-row small { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-500); margin-bottom: 7px; }
.c-quote { margin: 0; font-size: 1.12rem; font-style: italic; color: var(--slate-800); }
.c-cmd, .act code { font-family: var(--mono); background: rgba(241, 245, 249, .9); border: 1px solid var(--slate-200); border-radius: 12px; color: var(--slate-800); }
.c-cmd { position: relative; font-size: .9rem; line-height: 1.6; padding: 10px 12px; overflow-x: auto; white-space: nowrap; }
.c-cmd b { color: var(--rose-600); font-weight: 600; }
.c-cmd span { color: var(--slate-500); }
.c-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.c-checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--rose-100); border-radius: 12px; background: rgba(255, 241, 242, .7); font-size: .92rem; }
.c-checks svg { width: 18px; height: 18px; color: var(--rose-600); margin-top: 3px; }
.c-checks em { font: normal 700 .68rem/1.8 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--rose-700); white-space: nowrap; }
.c-verdict { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; background: rgba(255, 228, 230, .9); border: 1px solid var(--rose-200); }
.c-verdict b { font-size: 1.1rem; font-weight: 800; color: var(--rose-700); letter-spacing: .08em; text-transform: uppercase; }
.c-verdict span { font-size: .9rem; color: var(--slate-700); }
.c-ledger { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: .76rem var(--mono); color: var(--slate-500); }
.c-ledger .blk { width: 16px; height: 16px; border-radius: 5px; background: var(--amber-100); border: 1px solid var(--amber-200); }
.c-ledger .blk.new { background: var(--amber-500); border-color: var(--amber-500); box-shadow: 0 0 12px rgba(245, 158, 11, .6); }
.c-ledger i { font-style: normal; color: var(--indigo-600); }
@media (max-width: 940px) { .story { grid-template-columns: 1fr; } }

/* --- Lettore degli scenari --- */
.player { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; }
.tabs { display: grid; gap: 8px; align-content: start; }
.tab { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; position: relative; overflow: hidden;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-line); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: background-color .25s, box-shadow .25s; }
.tab .ico svg { width: 20px; height: 20px; }
.tab > span:last-child { display: block; min-width: 0; }
.tab b { display: block; font-size: .96rem; color: var(--slate-600); transition: color .25s; }
.tab b + span { display: block; font-size: .8rem; color: var(--slate-500); }
.tab::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--gradient); transform-origin: left; transform: scaleX(0); }
.tab[aria-selected="true"] { background: #fff; box-shadow: var(--shadow-card); }
.tab[aria-selected="true"] b { color: var(--slate-900); }
.tab[aria-selected="true"] .ico { background: var(--gradient); color: #fff; }
.tab[aria-selected="true"]::after { animation: fill var(--cycle, 9s) linear forwards; }
.player.paused .tab::after { animation: none; transform: scaleX(0); }
@keyframes fill { to { transform: scaleX(1); } }
.tab:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 2px; }
.stage { border-radius: 28px; box-shadow: var(--shadow-float); min-height: 440px; position: relative; overflow: hidden; min-width: 0; }
.panel { padding: clamp(20px, 3vw, 32px); display: grid; gap: 20px; align-content: start; }
.panel[hidden] { display: none !important; }
.panel-head { display: grid; gap: 8px; }
.panel-head h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); font-weight: 300; letter-spacing: -.025em; line-height: 1.15; }
.panel-head p { margin: 0; color: var(--muted); max-width: 62ch; }
.scene { border-radius: 20px; border: 1px solid var(--slate-200); background: rgba(255, 255, 255, .8); padding: 18px; min-width: 0; }
.scene-cap { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-500); }
.replay { all: unset; cursor: pointer; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--indigo-600); }
.replay:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 3px; border-radius: 4px; }
.outs { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.outs li { font-size: .84rem; color: var(--slate-700); padding: 6px 12px; border-radius: 999px; background: var(--indigo-50); }
@media (max-width: 900px) { .player { grid-template-columns: 1fr; } .tabs { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; } .tab { scroll-snap-align: start; } .tab b + span { display: none; } }

/* Scena: azioni degli agenti */
.acts { display: grid; gap: 10px; }
.act { display: grid; grid-template-columns: minmax(0, 1.3fr) 28px minmax(0, 1fr); gap: 10px; align-items: center; }
.act code { font-size: .85rem; line-height: 1.4; padding: 10px 12px; overflow-wrap: anywhere; }
.act .arr { height: 2px; background: linear-gradient(90deg, var(--slate-200), var(--indigo-500)); border-radius: 2px; }
.pill { justify-self: start; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 6px 11px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.pill.allow { background: rgba(209, 250, 229, .85); color: var(--emerald-700); border-color: var(--emerald-200); }
.pill.ask { background: rgba(254, 243, 199, .85); color: var(--amber-800); border-color: var(--amber-200); }
.pill.deny { background: rgba(255, 228, 230, .85); color: var(--rose-700); border-color: var(--rose-200); }
.act .why { grid-column: 1 / -1; font-size: .82rem; color: var(--slate-500); margin-top: -4px; padding-left: 2px; }
@media (max-width: 560px) { .act { grid-template-columns: minmax(0, 1fr) auto; } .act .arr { display: none; } }

/* Scena: dati nel chatbot */
.typed { font-size: 1rem; line-height: 1.85; overflow-wrap: anywhere; }
.typed .ent { border-radius: 6px; padding: 1px 5px; background: var(--amber-100); box-shadow: inset 0 -2px 0 var(--amber-500); color: var(--amber-800); }
.sent { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--slate-300); font-size: 1rem; line-height: 1.85; overflow-wrap: anywhere; }
.sent .tok { font: 600 .82em/1 var(--mono); color: var(--indigo-700); background: var(--indigo-50); border: 1px solid var(--indigo-200); border-radius: 7px; padding: 3px 6px; white-space: nowrap; display: inline-block; }
.who { display: flex; justify-content: space-between; gap: 10px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.who .a { color: var(--amber-600); } .who .b { color: var(--indigo-600); }

/* Scena: modello in esercizio */
.chart { width: 100%; height: auto; display: block; }
.chart .band { fill: rgba(99, 102, 241, .07); }
.chart .grid { stroke: var(--slate-200); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--indigo-600); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chart .over { fill: none; stroke: var(--rose-600); stroke-width: 2.6; stroke-linecap: round; }
.chart .lim { stroke: rgba(225, 29, 72, .5); stroke-dasharray: 5 5; stroke-width: 1.2; }
.chart text { fill: var(--slate-500); font: 11px var(--mono); }
.chart .dot { fill: var(--rose-600); }
.alert { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.alert .badge { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; color: var(--rose-700); border: 1px solid var(--rose-200); background: rgba(255, 228, 230, .9); }
.alert .human { display: inline-flex; gap: 6px; align-items: center; font-size: .86rem; color: var(--muted); }
.alert .human i { font-style: normal; font-size: .78rem; font-weight: 600; padding: 7px 11px; border-radius: 10px; border: 1px solid var(--slate-200); background: #fff; color: var(--slate-800); }

/* Scena: inventario */
.quiz { display: grid; gap: 8px; }
.qa { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--slate-200); background: #fff; font-size: .9rem; }
.qa svg { width: 18px; height: 18px; color: var(--emerald-600); }
.qa em { font-style: normal; font-weight: 700; font-size: .8rem; color: var(--slate-900); }
.verdict-card { margin-top: 12px; display: grid; gap: 8px; padding: 16px; border-radius: 16px; border: 1px solid var(--violet-100); background: rgba(243, 232, 255, .75); }
.verdict-card b { font-size: 1.05rem; font-weight: 700; color: var(--violet-700); }
.verdict-card span { font-size: .86rem; color: var(--slate-600); }
.docs { display: flex; flex-wrap: wrap; gap: 8px; }
.docs i { font-style: normal; font-size: .78rem; padding: 6px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--slate-200); color: var(--slate-700); }

/* Scena: sorveglianza */
.track { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding-top: 30px; }
.track::before { content: ""; position: absolute; left: 6%; right: 6%; top: 11px; height: 3px; border-radius: 3px; background: var(--slate-200); }
.track .fillbar { position: absolute; left: 6%; right: 6%; top: 11px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--rose-600), var(--amber-500), var(--emerald-600)); transform-origin: left; }
.node { position: relative; display: grid; gap: 6px; justify-items: center; text-align: center; font-size: .82rem; color: var(--muted); }
.node::before { content: ""; position: absolute; top: -26px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--indigo-500); }
.node b { font-size: .86rem; color: var(--text); }
.clock { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; }
.clock div { flex: 1 1 140px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--slate-200); background: #fff; }
.clock b { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--slate-800); }
.clock span { font-size: .8rem; color: var(--muted); }
@media (max-width: 560px) { .track { grid-template-columns: 1fr; padding-top: 0; gap: 12px; } .track::before, .track .fillbar { display: none; } .node { justify-items: start; text-align: left; padding-left: 26px; } .node::before { top: 2px; left: 0; } }

/* Animazioni delle scene: solo con .anim (altrimenti stato finale, leggibile) */
.anim .act { animation: actIn 9s var(--ease) infinite both; }
.anim .act:nth-child(2) { animation-delay: .35s; } .anim .act:nth-child(3) { animation-delay: .7s; } .anim .act:nth-child(4) { animation-delay: 1.05s; }
.anim .act .pill { animation: pop 9s var(--ease) infinite both; animation-delay: inherit; }
@keyframes actIn { 0% { opacity: .25; transform: translateX(-10px); } 8%, 92% { opacity: 1; transform: none; } 100% { opacity: .25; } }
@keyframes pop { 0%, 10% { opacity: 0; transform: scale(.7); } 16%, 92% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.anim .typed .ent { animation: mark 9s var(--ease) infinite both; }
.anim .typed .ent:nth-of-type(2) { animation-delay: .25s; } .anim .typed .ent:nth-of-type(3) { animation-delay: .5s; } .anim .typed .ent:nth-of-type(4) { animation-delay: .75s; } .anim .typed .ent:nth-of-type(5) { animation-delay: 1s; }
@keyframes mark { 0%, 6% { background: transparent; box-shadow: none; color: var(--slate-900); } 14%, 94% { background: var(--amber-100); box-shadow: inset 0 -2px 0 var(--amber-500); color: var(--amber-800); } }
.anim .sent .tok { animation: tokIn 9s var(--ease) infinite both; }
.anim .sent .tok:nth-of-type(2) { animation-delay: .2s; } .anim .sent .tok:nth-of-type(3) { animation-delay: .4s; } .anim .sent .tok:nth-of-type(4) { animation-delay: .6s; } .anim .sent .tok:nth-of-type(5) { animation-delay: .8s; }
@keyframes tokIn { 0%, 22% { opacity: .15; transform: translateY(6px); filter: blur(3px); } 30%, 94% { opacity: 1; transform: none; filter: none; } 100% { opacity: .15; } }
.anim .chart .line { stroke-dasharray: 900; animation: draw 9s linear infinite both; }
.anim .chart .over { stroke-dasharray: 200; animation: drawOver 9s linear infinite both; }
.anim .chart .dot { animation: blink 9s linear infinite both; }
.anim .alert { animation: alertIn 9s var(--ease) infinite both; }
@keyframes draw { 0% { stroke-dashoffset: 900; } 45%, 100% { stroke-dashoffset: 0; } }
@keyframes drawOver { 0%, 45% { stroke-dashoffset: 200; } 60%, 100% { stroke-dashoffset: 0; } }
@keyframes blink { 0%, 58% { opacity: 0; } 62%, 95% { opacity: 1; } 100% { opacity: 0; } }
@keyframes alertIn { 0%, 60% { opacity: .2; transform: translateY(8px); } 68%, 95% { opacity: 1; transform: none; } 100% { opacity: .2; } }
.anim .qa { animation: actIn 9s var(--ease) infinite both; }
.anim .qa:nth-child(2) { animation-delay: .5s; } .anim .qa:nth-child(3) { animation-delay: 1s; }
.anim .verdict-card { animation: alertIn 9s var(--ease) infinite both; }
.anim .track .fillbar { animation: grow 9s var(--ease) infinite both; }
.anim .node { animation: actIn 9s var(--ease) infinite both; }
.anim .node:nth-child(3) { animation-delay: .6s; } .anim .node:nth-child(4) { animation-delay: 1.2s; } .anim .node:nth-child(5) { animation-delay: 1.8s; } .anim .node:nth-child(6) { animation-delay: 2.4s; }
@keyframes grow { 0% { transform: scaleX(0); } 55%, 95% { transform: scaleX(1); } 100% { transform: scaleX(0); } }

/* --- Senza / con --- */
.vs { display: grid; gap: 10px; }
.vs-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.25fr); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.vs-row > * { padding: 16px 18px; font-size: .95rem; }
.vs-row h3 { font-size: .97rem; }
.vs-row .no { color: var(--slate-500); text-decoration: line-through; text-decoration-color: rgba(225, 29, 72, .45); border-left: 1px solid var(--line); }
.vs-row .yes { border-left: 1px solid var(--line); background: linear-gradient(90deg, rgba(238, 242, 255, .95), rgba(255, 255, 255, .3) 85%); position: relative; color: var(--slate-800); font-weight: 500; }
.vs-row .yes::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 3px; background: var(--gradient); }
.vs-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.25fr); padding: 0 18px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-500); }
.vs-head span:nth-child(2) { padding-left: 18px; } .vs-head span:nth-child(3) { padding-left: 18px; color: var(--indigo-600); }
@media (max-width: 760px) { .vs-head { display: none; } .vs-row { grid-template-columns: 1fr; } .vs-row .no, .vs-row .yes { border-left: 0; border-top: 1px solid var(--line); } .vs-row .yes::before { display: none; } }

/* --- Segmenti: pila di schede --- */
.stack { display: grid; gap: 24px; }
.card-s { position: sticky; top: 104px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; padding: clamp(24px, 3.4vw, 40px); border-radius: 28px; background: rgba(255, 255, 255, .86); box-shadow: 0 -10px 40px -24px rgba(15, 23, 42, .25), var(--shadow-card); transform-origin: center top; min-height: 250px; }
.card-s .k { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--indigo-600); }
.card-s h3 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 300; line-height: 1.08; letter-spacing: -.03em; margin-top: 12px; }
.card-s dl { margin: 0; display: grid; gap: 14px; }
.card-s dt { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-500); }
.card-s dd { margin: 6px 0 0; color: var(--slate-800); }
.card-s .flowline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.card-s .flowline i { font-style: normal; font-size: .8rem; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--slate-200); background: #fff; color: var(--slate-700); }
.card-s .flowline i.first { border-color: transparent; background: var(--gradient); color: #fff; }
.card-s .flowline b { color: var(--slate-400); font-weight: 400; }
@media (max-width: 820px) { .card-s { position: relative; top: 0; grid-template-columns: 1fr; } }

/* --- AI Act: linea del tempo --- */
.tline { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 46px; }
.tline::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 3px; border-radius: 3px; background: var(--slate-200); }
.tline .tfill { position: absolute; left: 0; top: 15px; height: 3px; width: 46%; border-radius: 3px; background: var(--gradient); transform-origin: left; }
.tline .today { position: absolute; top: 2px; left: 46%; transform: translateX(-50%); font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--gradient); padding: 6px 9px; border-radius: 999px; white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(99, 102, 241, .6); }
.tp { position: relative; display: grid; gap: 6px; }
.tp::before { content: ""; position: absolute; top: -38px; left: 0; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 3px solid var(--indigo-500); }
.tp.past::before { background: var(--indigo-600); border-color: var(--indigo-600); }
.tp time { font-weight: 700; font-size: .86rem; color: var(--indigo-600); font-variant-numeric: tabular-nums; }
.tp p { margin: 0; color: var(--muted); font-size: .93rem; }
@media (max-width: 760px) { .tline { grid-template-columns: 1fr 1fr; padding-top: 0; } .tline::before, .tline .tfill, .tline .today, .tp::before { display: none; } }
.law-grid { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.law { padding: 26px; display: grid; gap: 14px; align-content: start; }
.law dl { margin: 0; display: grid; gap: 14px; }
.law dt { font-size: .82rem; font-weight: 700; color: var(--indigo-600); }
.law dd { margin: 4px 0 0; color: var(--muted); font-size: .94rem; }
.fines { display: grid; gap: 18px; }
.fine { padding: 22px 24px; display: grid; gap: 6px; }
.fine b { font-size: clamp(2.2rem, 4vw, 2.9rem); font-weight: 300; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--slate-900); }
.fine span { color: var(--muted); font-size: .9rem; }
.disclaimer { margin-top: 20px; font-size: .88rem; color: var(--faint); max-width: 86ch; }
@media (max-width: 860px) { .law-grid { grid-template-columns: 1fr; } }

/* --- Prove --- */
.proofs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.proof { padding: 28px 26px; display: grid; gap: 10px; align-content: start; }
.proof .big { font-size: clamp(3rem, 6vw, 4.2rem); font-weight: 300; letter-spacing: -.05em; line-height: .95; font-variant-numeric: tabular-nums; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.proof p { margin: 0; color: var(--muted); font-size: .94rem; }
@media (max-width: 860px) { .proofs { grid-template-columns: 1fr; } }

/* --- Percorso e prezzi --- */
.path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ph { padding: 26px; display: grid; gap: 10px; align-content: start; }
.ph .k { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--indigo-600); }
.ph p { margin: 0; color: var(--muted); font-size: .95rem; }
.ph.mid { box-shadow: 0 0 0 2px rgba(99, 102, 241, .35), var(--shadow-card); }
.price { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.price > div { padding: 22px 24px; border-radius: var(--r); border: 1px dashed var(--slate-300); background: rgba(255, 255, 255, .45); display: grid; gap: 6px; }
.price .k { font-size: .78rem; font-weight: 700; color: var(--amber-600); }
.price p { margin: 0; color: var(--muted); font-size: .92rem; }
@media (max-width: 820px) { .path, .price { grid-template-columns: 1fr; } }

/* --- Domande --- */
.faq { display: grid; gap: 10px; max-width: 920px; margin: 0 auto; }
.faq details { border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: box-shadow .25s, background-color .25s; }
.faq details[open] { background: var(--glass-hover); box-shadow: var(--shadow-card); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 18px 22px; font-weight: 600; font-size: 1.02rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; flex: none; border-right: 2px solid var(--indigo-600); border-bottom: 2px solid var(--indigo-600); transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq .ans { padding: 0 22px 20px; color: var(--muted); max-width: 74ch; }
.faq .ans p { margin: 0; }

/* --- Demo --- */
.contact .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact .head { margin-bottom: 0; }
.ticks { display: grid; gap: 12px; margin: 4px 0 0; padding: 0; list-style: none; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--muted); }
.ticks svg { width: 20px; height: 20px; color: var(--emerald-600); margin-top: 3px; }
form { display: grid; gap: 14px; border-radius: 28px; padding: 28px; box-shadow: var(--shadow-float); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-hint { font-size: .8rem; color: var(--slate-600); line-height: 1.45; }
.field.full { grid-column: 1 / -1; }
label { font-size: .86rem; font-weight: 600; color: var(--slate-700); }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--slate-200); background: rgba(255, 255, 255, .9); color: var(--text); font: 1rem/1.4 var(--sans); transition: border-color .2s, box-shadow .2s; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--indigo-500); box-shadow: 0 0 0 3px rgba(99, 102, 241, .25); background: #fff; }
input[aria-invalid="true"] { border-color: var(--rose-600); }
.err { font-size: .82rem; color: var(--rose-700); min-height: 1em; }
.form-note { font-size: .82rem; color: var(--faint); margin: 0; }
.form-note a { color: var(--indigo-600); font-weight: 600; text-underline-offset: 3px; }
.form-done { border: 1px solid var(--indigo-200); background: var(--indigo-50); color: var(--slate-800); border-radius: 12px; padding: 14px 16px; font-size: .93rem; }
@media (max-width: 900px) { .contact .wrap { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } form { padding: 20px; } }

/* --- Accesso --- */
.login-sec .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(32px, 5vw, 80px); align-items: center; }
.login-sec .head { margin-bottom: 0; }
.login-sec .ticks a { color: var(--indigo-600); font-weight: 600; text-underline-offset: 3px; }
.login-card { gap: 16px; padding: 32px; background: rgba(255, 255, 255, .82); box-shadow: var(--shadow-float); }
.login-top { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; }
.login-top .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
.login-top .brand-mark svg { width: 24px; height: 24px; }
.login-top > div b { display: block; font-size: 1.05rem; }
.login-top > div span { display: block; font-size: .85rem; color: var(--muted); }
.login-err { border: 1px solid var(--rose-200); background: rgba(255, 228, 230, .9); color: var(--rose-700); border-radius: 12px; padding: 12px 14px; font-size: .92rem; }
.pw { position: relative; }
.pw input { padding-right: 88px; }
.pw-toggle { all: unset; cursor: pointer; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: .78rem; font-weight: 700; color: var(--indigo-600); padding: 8px 10px; border-radius: 8px; }
.pw-toggle:hover { background: var(--indigo-50); }
.pw-toggle:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 1px; }
.login-card .btn { width: 100%; }
@media (max-width: 900px) { .login-sec .wrap { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .login-card { padding: 22px; } }

footer { padding-block: 36px 44px; border-top: 1px solid var(--slate-200); background: rgba(255, 255, 255, .5); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
footer p { margin: 0; color: var(--faint); font-size: .86rem; }

/* «Riduci animazioni» nel sistema: movimenti più lenti, niente scorrimento fluido. Il nastro resta su una riga. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation-duration: 80s; }
}
/* Pausa scelta dal visitatore */
.motion-off .marquee-track { animation-play-state: paused; }
.motion-off .player .tab::after { animation: none; transform: scaleX(0); }
.motion-toggle { position: fixed; z-index: 60; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 12px; border-radius: 999px; cursor: pointer;
  font: 600 .82rem/1 var(--sans); color: var(--slate-700); background: rgba(255, 255, 255, .85); border: 1px solid var(--slate-200);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow-card); transition: box-shadow .2s, transform .2s var(--ease); }
.motion-toggle:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.motion-toggle i { width: 10px; height: 12px; display: inline-block; border-left: 3px solid var(--indigo-600); border-right: 3px solid var(--indigo-600); }
.motion-off .motion-toggle i { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--indigo-600); }

/* --- Pagine legali (legale.html): testi gestiti dalla console, «Pagine legali e cookie» --- */
.legal { padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 96px); }
.legal-head { display: grid; gap: 12px; max-width: 820px; margin-bottom: clamp(28px, 4vw, 44px); }
.legal-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.legal-meta { margin: 0; color: var(--muted); font-size: .95rem; }
.legal-grid { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 880px); gap: clamp(24px, 4vw, 48px); align-items: start; }
.legal-toc { position: sticky; top: 100px; font-size: .9rem; }
.legal-toc p { margin: 0 0 10px; font-weight: 700; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--indigo-600); }
.legal-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.legal-toc a { display: block; padding: 6px 10px; border-radius: 10px; text-decoration: none; color: var(--slate-600); line-height: 1.35; }
.legal-toc a:hover { background: rgba(255, 255, 255, .85); color: var(--slate-900); }
.legal-doc { background: var(--surface-2); border: 1px solid var(--glass-line); border-radius: var(--r); padding: clamp(22px, 4vw, 48px); box-shadow: var(--shadow-card); min-width: 0; }
.legal-doc > :first-child { margin-top: 0; }
.legal-doc h2 { font-size: 1.35rem; font-weight: 650; letter-spacing: -.015em; line-height: 1.3; margin: 2em 0 .6em; scroll-margin-top: 110px; }
.legal-doc h3 { font-size: 1.05rem; margin: 1.6em 0 .4em; }
.legal-doc p, .legal-doc li { color: var(--slate-700); max-width: 75ch; }
.legal-doc p { margin: 0 0 1em; }
.legal-doc ul, .legal-doc ol { margin: 0 0 1em; padding-left: 1.3em; display: grid; gap: .35em; }
.legal-doc a { color: var(--indigo-600); font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-doc .in-breve { background: var(--indigo-50); border: 1px solid var(--indigo-100); border-radius: var(--r-md); padding: 18px 20px; margin: 0 0 1.6em; }
.legal-doc .in-breve p { margin: 0 0 .6em; color: var(--slate-800); }
.legal-doc .in-breve p:last-child { margin-bottom: 0; }
.table-scroll { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--slate-200); border-radius: 14px; }
.legal-doc table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .9rem; line-height: 1.5; background: #fff; }
.legal-doc th, .legal-doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--slate-200); }
.legal-doc th { background: var(--slate-50); font-weight: 650; color: var(--slate-800); }
.legal-doc tbody tr:last-child td { border-bottom: 0; }
mark.da-completare { background: var(--amber-100); color: var(--amber-800); border-radius: 6px; padding: 0 6px; font-weight: 600; }
@media (max-width: 900px) { .legal-grid { grid-template-columns: minmax(0, 1fr); } .legal-toc { position: static; } }
@media (max-width: 520px) { .legal-page .nav-actions .btn-ghost { display: none; } }

/* --- Fondo del sito: dati societari e link legali --- */
.site-footer .wrap { display: grid; gap: 14px; justify-content: stretch; align-items: start; }
.sf-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.sf-links { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.sf-links a, .sf-cookie { color: var(--slate-600); text-decoration: none; font: inherit; }
.sf-cookie { background: none; border: 0; padding: 0; cursor: pointer; }
.sf-links a:hover, .sf-cookie:hover { color: var(--indigo-700); text-decoration: underline; text-underline-offset: 3px; }
footer .sf-company { font-size: .8rem; }

/* --- Banner dei cookie (consenso.js) --- */
.cookie-banner { position: fixed; z-index: 70; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px 24px; border-radius: 22px;
  background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--slate-200); box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .3); }
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; margin: 0 0 6px; padding-right: 40px; }
.cookie-banner h2:focus { outline: none; }
.cb-text { margin: 0 0 14px; font-size: .93rem; color: var(--slate-700); }
.cb-text a { color: var(--indigo-600); font-weight: 600; text-underline-offset: 3px; }
.cb-prefs { border: 0; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.cb-prefs[hidden] { display: none; }
.cb-prefs legend { font-weight: 650; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.cb-cat { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--slate-200);
  border-radius: 12px; background: #fff; font-weight: 400; font-size: .88rem; color: var(--slate-600); }
.cb-cat input { width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--indigo-600); }
.cb-cat b { display: block; color: var(--slate-800); }
.cb-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cb-actions .btn { min-height: 44px; }
.cb-actions .btn[hidden] { display: none; }
.cb-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  border: 0; background: transparent; color: var(--slate-500); cursor: pointer; }
.cb-close:hover { background: var(--slate-100); color: var(--slate-900); }
.cb-close svg { width: 20px; height: 20px; }
@media (max-width: 520px) { .cookie-banner { padding: 18px; bottom: 8px; width: calc(100% - 16px); } .cb-actions .btn { flex: 1 1 100%; } }
