/* Camber — landing. Restyle editoriale (2026-11-11) sul concept in redesign-source:
   grafite, avorio e arancio bruciato, titoli grandi in condensato, sezioni scure alternate
   a sezioni avorio, griglie a filetti. Font e angoli 2px dal Camber Design System.
   Le riproduzioni dell'app (.dark-ui: demo dell'hero, pannelli delle funzioni) restano
   coi colori dell'app. */
:root {
  color-scheme: dark;

  /* Palette del sito */
  --ink: #111414;
  --ink-deep: #0b0e0e;
  --panel: #161a1a;
  --paper: #efede6;
  --paper-2: #e6e4db;
  --paper-3: #dcdad0;
  --ivory: #f4f3ed;
  --orange: #e86737;
  --orange-hover: #f47a4d;
  --on-orange: #121514;
  --orange-ink: #a8461c; /* arancio per testo su avorio: contrasto AA */

  /* Colori di contesto: ogni sezione (scura o avorio) li ridefinisce */
  --fg: var(--ivory);
  --fg-muted: #a2aaa6;
  --fg-faint: #7f8985;
  --rule: #2c3231;
  --rule-strong: #4a5350;
  --numeral: #3d4644;
  --accent-ink: var(--orange);

  /* Token dell'app (Camber Design System), per le riproduzioni dell'app */
  --bg: #0b0d12;
  --surface: #12151c;
  --surface-raised: #1a1e27;
  --surface-sunken: #0e1117;
  --border: #232834;
  --border-strong: #343b4b;
  --text: #e7eaf0;
  --text-muted: #8b93a5;
  --accent: #b85c2a;
  --accent-text: #d4834f;
  --accent-soft: rgba(184, 92, 42, 0.16);
  --warning: #fbbf24;
  --success: #4ade80;
  --ctx: #5b9cf5;
  --lap-a: #d4834f; /* grafici: giro A arancio, giro B blu */
  --lap-b: #5b9cf5;
  --radius: 2px;

  --font-display: "Barlow Condensed", "Bahnschrift SemiBold Condensed", "Arial Narrow", sans-serif;
  --font-body: Barlow, "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-ui-mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;

  --content-max: 1240px;
  --gutter: 20px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (min-width: 720px) { :root { --gutter: 32px; --header-h: 68px; } }
@media (min-width: 1200px) { :root { --gutter: 40px; } }

.dark-ui { color-scheme: dark; background: var(--bg); color: var(--text); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
html.menu-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--accent-ink); }
code { font-family: var(--font-mono); font-size: 0.88em; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
::selection { background: var(--orange); color: var(--on-orange); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
/* Sezioni che ricevono il focus da un link interno (main.js): niente cornice */
[tabindex="-1"]:focus { outline: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.wrap {
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip { position: absolute; left: -999px; top: 8px; z-index: 60; padding: 10px 16px; background: var(--orange); color: var(--on-orange); font-weight: 600; text-decoration: none; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-muted); }
.small { font-size: 14px; color: var(--fg-muted); }
.accent { color: var(--accent-ink); }
.num { font-family: var(--font-ui-mono); font-variant-numeric: tabular-nums; }

/* ---------- Tipografia ---------- */
.label { font-family: var(--font-mono); font-size: 12px; line-height: 1.3; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); }
.display-xl { font-family: var(--font-display); font-weight: 700; font-size: clamp(64px, 10vw, 140px); line-height: 0.88; letter-spacing: -0.012em; }
.display-lg { font-family: var(--font-display); font-weight: 700; font-size: clamp(42px, 5.4vw, 76px); line-height: 0.94; letter-spacing: -0.01em; }
.title { font-family: var(--font-body); font-weight: 600; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; max-width: 52ch; color: var(--fg-muted); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(244, 243, 237, 0.07); transition: border-color 0.2s; }
/* Sfondo sfocato su uno pseudo-elemento: un backdrop-filter sull'header stesso
   farebbe da riferimento al menu fisso qui dentro e lo schiaccerebbe */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(11, 14, 14, 0.86); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.site-header.is-scrolled { border-bottom-color: rgba(244, 243, 237, 0.13); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--ivory); text-decoration: none; }
.lockup img { display: block; width: 30px; height: 30px; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }
.nav { display: none; align-items: center; gap: 28px; }
.nav a { color: #b3bab6; text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color 0.15s; }
.nav a:hover { color: var(--ivory); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-cta { display: inline-flex; align-items: center; gap: 10px; padding: 8px 0 7px; border-bottom: 1px solid rgba(232, 103, 55, 0.55); color: var(--ivory); text-decoration: none; font-size: 14.5px; font-weight: 600; transition: border-color 0.15s; }
.header-cta .ico { width: 16px; height: 16px; color: var(--orange); }
.header-cta:hover { border-color: var(--orange); }
.header-cta[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.menu-toggle { position: relative; display: inline-block; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(244, 243, 237, 0.16); border-radius: var(--radius); background: transparent; cursor: pointer; }
.menu-toggle span { position: absolute; left: 10px; right: 10px; top: 50%; height: 1.5px; margin-top: -0.75px; background: var(--ivory); transition: transform 0.25s var(--ease); }
.menu-toggle span:first-child { transform: translateY(-4px); }
.menu-toggle span:last-child { transform: translateY(4px); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
.mobile-nav { position: fixed; z-index: 39; inset: var(--header-h) 0 0; overflow-y: auto; padding: 8px max(var(--gutter), env(safe-area-inset-left, 0px)) 40px; background: var(--ink-deep); }
.mobile-nav a { display: flex; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); color: var(--ivory); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.1; }
.mobile-nav a span { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; color: var(--orange); }
@media (min-width: 960px) {
  .nav { display: flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---------- Pulsanti e link ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 28px;
  border-radius: var(--radius); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.2s;
}
.btn--primary { padding: 14px 18px 14px 22px; border: 1px solid var(--orange); background: var(--orange); color: var(--on-orange); box-shadow: 0 16px 40px -18px rgba(232, 103, 55, 0.85); }
.btn--primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); transform: translateY(-2px); box-shadow: 0 20px 44px -16px rgba(232, 103, 55, 0.9); }
.btn--lg { min-height: 54px; font-size: 16px; }
.btn .ico { width: 18px; height: 18px; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; box-shadow: none; }
.text-link { display: inline-flex; align-items: center; gap: 14px; color: var(--fg); text-decoration: none; font-size: 15.5px; font-weight: 600; }
.box-arrow { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(244, 243, 237, 0.28); border-radius: var(--radius); transition: border-color 0.15s, transform 0.2s var(--ease); }
.box-arrow .ico { width: 16px; height: 16px; }
.text-link:hover .box-arrow { border-color: var(--orange); transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--ink-deep); }
/* Sfondo: foto di Fabio (img/hero-car.webp). È chiara e satura: un po' spenta col filtro
   e velata, forte a sinistra sotto il testo, più leggera a destra dietro la demo */
.hero-photo { position: absolute; z-index: -1; inset: 0; }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; filter: saturate(0.85); }
.hero-photo::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 14, 14, 0.96) 0%, rgba(11, 14, 14, 0.88) 34%, rgba(11, 14, 14, 0.6) 56%, rgba(11, 14, 14, 0.45) 100%),
    linear-gradient(0deg, rgba(11, 14, 14, 0.92) 0%, rgba(11, 14, 14, 0) 28%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "film" "bottom"; gap: 48px; padding-top: 96px; padding-bottom: 28px; }
.hero-copy { grid-area: copy; }
.hero-grid .film { grid-area: film; }
.hero-bottom { grid-area: bottom; }
.hero-copy { display: grid; gap: 26px; align-content: start; min-width: 0; container-type: inline-size; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: #c8ccc7; }
.eyebrow__dot { flex: none; width: 7px; height: 7px; background: var(--orange); box-shadow: 0 0 0 4px rgba(232, 103, 55, 0.14); animation: blink 2.4s ease-in-out infinite; }
/* Il titolo si misura sulla colonna (unità cqi): "race engineer." resta su una riga */
.hero-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(54px, 8.4vw, 124px); font-size: clamp(50px, 18.5cqi, 124px); line-height: 0.86; letter-spacing: -0.015em; color: var(--ivory); overflow-wrap: break-word; }
.hero-tagline { display: block; margin-top: 0.26em; font-size: 0.36em; line-height: 1; letter-spacing: -0.005em; color: var(--orange); }
.hero .lead { color: #b9bfbc; max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; margin-top: 4px; }
.cta-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.counter__n { color: var(--fg); font-weight: 600; }
.qualities { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid rgba(244, 243, 237, 0.12); display: flex; flex-wrap: wrap; gap: 8px 28px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #a9b0ac; }
/* "+" davanti a ogni voce: regge anche quando la riga va a capo */
.qualities li::before { content: "+"; margin-right: 10px; color: var(--orange); }
.hero-bottom { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid rgba(244, 243, 237, 0.14); display: grid; gap: 10px; font-size: 14.5px; color: var(--fg-muted); }
.hero-bottom li { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: baseline; gap: 12px; }
.hero-bottom .label { color: var(--orange); }
.hero-bottom .soon { color: var(--fg-faint); }

/* Su schermi larghi tutto l'hero sta in uno schermo: altezza della finestra meno l'header.
   Il testo si misura anche sull'altezza (vh); la demo prende l'altezza che resta e le
   scene scorrono al loro interno (main.js tiene in vista la risposta che compare). */
@media (min-width: 1100px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "copy film" "bottom bottom";
    gap: clamp(16px, 2.6vh, 28px) 56px;
    /* -1px: il bordo sotto l'header */
    min-height: clamp(560px, calc(100svh - var(--header-h) - 1px), 980px);
    padding-top: clamp(20px, 4.5vh, 64px);
    padding-bottom: 0;
  }
  .hero-copy { align-self: center; gap: clamp(12px, 2vh, 26px); }
  .hero-title { font-size: clamp(50px, min(18.5cqi, 12.4vh), 124px); }
  .hero .lead { font-size: clamp(16px, min(1.5vw, 2.5vh), 19px); }
  .hero .cta-meta { margin-top: clamp(-14px, -1vh, -4px); }
  .qualities { padding-top: clamp(10px, 1.8vh, 18px); row-gap: 4px; }
  /* contain: size → la demo non allunga la riga: ne prende l'altezza (al massimo 760 px) */
  .hero-grid .film { contain: size; align-self: center; height: 100%; max-height: 760px; display: flex; flex-direction: column; }
  .hero-grid .film-stage { flex: 1 1 auto; min-height: 0; }
  .hero-bottom { display: flex; flex-wrap: wrap; gap: 8px 48px; padding: 16px 0 20px; }
}
/* Finestre larghe ma strette: più spazio al testo */
@media (min-width: 1100px) and (max-width: 1279px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); column-gap: 40px; }
}
/* Finestre basse (portatili 1366×768): pulsante e fascia più compatti */
@media (min-width: 1100px) and (max-height: 720px) {
  .hero .btn--lg { min-height: 48px; padding-block: 11px; }
  .hero-title { font-size: clamp(50px, min(18.5cqi, 12vh), 124px); }
  .hero-bottom { padding: 12px 0 14px; }
}
@media (max-width: 1099px) {
  /* Su schermi stretti la foto è una fascia in cima, il testo la sormonta in fondo */
  .hero-photo { position: relative; z-index: auto; inset: auto; height: clamp(260px, 60vw, 540px); overflow: hidden; }
  .hero-photo img { object-position: 42% 45%; }
  .hero-photo::after { background:
    linear-gradient(0deg, var(--ink-deep) 0%, rgba(11, 14, 14, 0.55) 32%, rgba(11, 14, 14, 0.2) 65%); }
  .hero-grid { position: relative; margin-top: -64px; padding-top: 0; }
  .hero-grid .film { width: 100%; max-width: 720px; }
  /* Demo alta al massimo come mezzo schermo abbondante: la chat scorre dentro */
  .film-stage { height: clamp(400px, 62svh, 560px); }
  .hero-bottom { margin-top: 8px; }
}

/* ---------- Demo animata (film) ---------- */
.film { position: relative; margin: 0; min-width: 0; border: 1px solid rgba(244, 243, 237, 0.14); border-radius: var(--radius); font-family: var(--font-ui); font-size: 13.5px; overflow: hidden;
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.4); }
.film-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.film-dots { display: inline-flex; gap: 5px; margin-right: 6px; }
.film-dots i { width: 9px; height: 9px; border-radius: var(--radius); background: var(--border-strong); }
.app-name { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12.5px; }
.app-crumb { font-family: var(--font-ui-mono); font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.film-toggle { margin-left: auto; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-raised); color: var(--text-muted); cursor: pointer; }
.film-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.film-toggle .ico { width: 14px; height: 14px; }
.film:not(.js) .film-toggle { display: none; }

.film-stage { position: relative; display: grid; grid-template-rows: minmax(0, 1fr); background:
  radial-gradient(80% 60% at 50% 0%, rgba(184, 92, 42, 0.07), transparent 70%), var(--bg); }
/* Le scene stanno tutte nella stessa cella. Senza altezza imposta lo stage prende quella
   della più alta; con l'altezza imposta (hero a schermo intero, mobile) scorrono dentro */
.scene { grid-area: 1 / 1; min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; scroll-behavior: smooth; padding: 16px; display: grid; align-content: start; gap: 10px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0s linear 0.45s; }
.scene--1, .scene--2, .scene--4 { align-content: safe center; }
.film[data-scene="1"] .scene--1, .film[data-scene="2"] .scene--2, .film[data-scene="3"] .scene--3, .film[data-scene="4"] .scene--4 { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

/* Animazioni d'ingresso: solo con JS attivo (classe .js) e solo nella scena attiva */
.film.js .scene .anim { opacity: 0; }
.film.js[data-scene] .scene.is-on .anim { animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--d, 0) * 1ms); }
.d1 { --d: 150; } .d2 { --d: 300; } .d3 { --d: 450; } .d4 { --d: 600; } .d5 { --d: 750; } .d6 { --d: 900; } .d7 { --d: 1050; } .d8 { --d: 1200; } .d9 { --d: 1700; } .d10 { --d: 2300; }

/* Scena 1 */
.crumbs { font-family: var(--font-ui-mono); font-size: 11.5px; color: var(--text-muted); }
.crumbs b { color: var(--border-strong); font-weight: 400; padding-inline: 2px; }
.toast { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 6px 10px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); font-size: 12px; color: var(--text-muted); }
.live-dot { width: 7px; height: 7px; border-radius: var(--radius); background: var(--success); animation: blink 1.6s ease-in-out infinite; }
.group { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.session { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 10px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); }
.s-time { font-family: var(--font-ui-mono); font-size: 12px; }
.s-time em { font-style: normal; color: var(--text-muted); margin-left: 6px; }
.s-best { font-family: var(--font-ui-mono); font-weight: 600; text-align: right; }
.s-meta { font-size: 12px; color: var(--text-muted); }
.s-meta:last-of-type { text-align: right; }
.s-tag { position: absolute; top: -7px; right: 8px; padding: 0 6px; background: var(--accent); color: #fff; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; border-radius: var(--radius); }
.session.is-new { border-color: var(--accent); background: linear-gradient(90deg, var(--accent-soft), var(--surface) 70%); }
.session.is-new .s-best { color: var(--accent-text); }
.film.js .scene.is-on .session.is-new { animation: slidein 0.7s var(--ease) 0.5s both, pulse 1.6s ease-out 1.2s 2; }

/* Scena 2 */
.panel-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.readouts { display: flex; gap: 24px; flex-wrap: wrap; }
.readout { display: grid; gap: 4px; }
.readout__label { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.readout__value { font-family: var(--font-mono); font-size: clamp(20px, 2.6vw, 26px); line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; }
.readout__value.is-best { color: var(--accent-text); }
.laps { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.laps th, .laps td { padding: 4px; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); text-align: left; white-space: nowrap; overflow: hidden; }
.laps th { background: var(--surface-sunken); font-size: 10px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-muted); }
.laps .num { text-align: right; }
.laps th.num { font-family: inherit; }
.laps .c-lap { width: 34px; } .laps .c-time { width: 72px; } .laps .c-gap { width: 58px; } .laps .c-fuel { width: 40px; } .laps .c-err { width: 36px; }
.gapbar { display: block; height: 6px; min-width: 2px; margin-left: 6px; background: color-mix(in srgb, var(--text-muted) 55%, transparent); transform-origin: left; }
.gapbar.w7 { width: 7%; } .gapbar.w9 { width: 9%; } .gapbar.w11 { width: 11%; } .gapbar.w24 { width: 24%; } .gapbar.w30 { width: 30%; }
.film.js .scene.is-on .gapbar { animation: grow 0.8s var(--ease) 0.9s both; }
.laps tr.is-error td { background: color-mix(in srgb, var(--warning) 8%, transparent); }
.laps tr.is-error .gapbar { background: color-mix(in srgb, var(--warning) 65%, transparent); }
.laps tr.is-best td { background: var(--accent-soft); }
.laps tr.is-best .time { color: var(--accent-text); font-weight: 700; }
.laps .gap0 { color: var(--accent-text); font-family: inherit; font-size: 10.5px; text-transform: uppercase; }
.laps .g2 { color: var(--text-muted); }
.laps .g3, .laps .err { color: var(--warning); }
.laps .ok { color: var(--text-muted); opacity: 0.6; }
.flag { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent); background: color-mix(in srgb, var(--warning) 8%, transparent); border-radius: var(--radius); font-size: 12.5px; }
.flag .ico { color: var(--warning); width: 16px; height: 16px; }

/* Scena 3 */
.bubble { justify-self: end; max-width: 85%; padding: 8px 12px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius); min-height: 1.6em; }
.bubble.is-typing::after { content: "▍"; color: var(--accent-text); animation: blink 0.9s steps(1) infinite; }
.reply { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); line-height: 1.5; font-size: 13px; }
.reply__who { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.verdict { font-weight: 600; font-size: 13.5px; }
.pt { display: grid; gap: 2px; padding: 4px 0 4px 10px; border-left: 2px solid var(--warning); }
.pt--setup { border-left-color: var(--accent); }
.pt__lbl { justify-self: start; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warning); }
.pt--setup .pt__lbl { color: var(--accent-text); }
.test { padding: 6px 10px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--radius); }
.test b { color: var(--accent-text); }
/* Comparsa progressiva della risposta (main.js aggiunge .on in ordine) */
.w { transition: opacity 0.25s; }
.film.js .w, .film.js .pt, .film.js .verdict, .film.js .test { opacity: 0; }
.film.js .w.on, .film.js .pt.on, .film.js .verdict.on, .film.js .test.on { opacity: 1; }
.film.js .pt, .film.js .test { transition: opacity 0.3s; }
.film.js [data-block] { opacity: 0; transform: translateY(6px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.film.js [data-block].on { opacity: 1; transform: none; }
.film.js .mini-chart .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.film.js .mini-chart.on .draw { animation: draw 1.6s var(--ease) forwards; }
.tag { display: inline-block; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: var(--radius); font-family: var(--font-ui-mono); font-size: 10.5px; color: var(--text-muted); white-space: nowrap; vertical-align: 1px; }
.tag--hyp { border-color: color-mix(in srgb, var(--ctx) 55%, transparent); color: var(--ctx); }
.mini-chart { padding: 6px; border: 1px solid var(--border); background: var(--bg); border-radius: var(--radius); }
.mini-chart svg { display: block; width: 100%; height: auto; }

/* Grafici SVG comuni (riproduzioni dell'app) */
.grid line { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.corners line { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.zone { fill: var(--accent-soft); }
.mark { stroke: var(--lap-a); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.8; }
.mark--b { stroke: var(--lap-b); }
.ln { fill: none; stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ln--a { stroke: var(--lap-a); }
.ln--b { stroke: var(--lap-b); }
.ln--thin { stroke-width: 1.3; }
svg .t { font-family: var(--font-mono); font-size: 10px; fill: var(--text-muted); letter-spacing: 0.04em; }
svg .t--a { fill: var(--lap-a); font-weight: 600; }
svg .t--b { fill: var(--lap-b); font-weight: 600; }
svg .t--c { text-anchor: middle; }
svg .t--end { text-anchor: end; }
svg .t--hl { fill: var(--accent-text); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.legend__src { margin-left: auto; opacity: 0.8; }
.key { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--lap-a); }
.key--b { background: var(--lap-b); }
.key--u { background: var(--accent); height: 8px; width: 10px; }
.key--o { background: var(--ctx); height: 8px; width: 10px; }

/* Scena 4 */
.op { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius); margin-top: 18px; }
.op__head { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.op__head .ico { width: 15px; height: 15px; }
.op__what { font-size: 14px; }
.diff { width: 100%; border-collapse: collapse; font-size: 13px; }
.diff th, .diff td { padding: 6px 4px; border-bottom: 1px solid var(--border); text-align: left; }
.diff th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; }
.diff .num { text-align: right; }
.diff th.num { font-family: inherit; }
.diff .chg { color: var(--accent-text); font-weight: 600; }
.op__note { font-size: 12.5px; color: var(--text-muted); }
.op__actions { display: flex; gap: 8px; }
.fake-btn { display: inline-block; padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface-raised); font-size: 13px; }
.fake-btn--ok { border-color: var(--accent); color: var(--accent-text); }
.op__done { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--success); }
.op__done u { color: var(--text-muted); text-underline-offset: 3px; }
.film.js .scene.is-on .fake-btn--ok { animation: press 0.5s ease 2.4s both; }
.film.js .op__done { opacity: 0; }
.film.js .scene.is-on .op__done { animation: rise 0.5s var(--ease) 2.9s both; }

/* Capitoli */
.film-chapters { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); background: var(--surface); }
.chap { position: relative; display: flex; align-items: baseline; gap: 6px; padding: 10px 10px 12px; border: 0; border-right: 1px solid var(--border); background: transparent; color: var(--text-muted); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.chap:last-child { border-right: 0; }
.chap:hover { color: var(--text); }
.chap__n { font-family: var(--font-ui-mono); font-size: 10.5px; }
.chap.is-active { color: var(--text); }
.chap.is-active .chap__n { color: var(--accent-text); }
.chap__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--border); }
.chap__bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.chap.is-done .chap__bar i { transform: scaleX(1); opacity: 0.5; }
.film:not(.js) .chap__bar { display: none; }
@media (max-width: 420px) { .chap__n { display: none; } .chap { justify-content: center; } }
.film.is-paused *, .film.is-paused *::before, .film.is-paused *::after { animation-play-state: paused !important; }
.film figcaption { padding: 6px 12px; border-top: 1px solid var(--border); background: var(--surface-sunken); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }

/* ---------- Sezioni ---------- */
.section { position: relative; padding-block: 72px; }
@media (min-width: 960px) { .section { padding-block: 112px; } }
.section--ink { background: var(--ink); }
.section--panel { background: var(--panel); }
.section--deep { background: var(--ink-deep); }
.section--ink + .section--panel, .section--panel + .section--deep { border-top: 1px solid var(--rule); }
.section--paper {
  color-scheme: light;
  --fg: #141716;
  --fg-muted: #565d58;
  --fg-faint: #7a7f77;
  --rule: #d3d1c7;
  --rule-strong: #aeaca1;
  --numeral: #c4c1b5;
  --accent-ink: var(--orange-ink);
  background: var(--paper);
  color: var(--fg);
}
/* Intestazione di sezione: "01 / How it works ————" */
.section-top { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; line-height: 1.3; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); }
.section-top::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.section-top__n { color: var(--accent-ink); }
.section-top__n::after { content: "/"; margin-left: 12px; color: var(--fg-faint); }
.section-head { display: grid; gap: 20px; max-width: 880px; margin-bottom: 56px; }
.split-head { display: grid; gap: 20px; margin-bottom: 56px; }
@media (min-width: 960px) { .split-head { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 64px; align-items: end; } }
.section-lead { font-size: 18px; line-height: 1.6; color: var(--fg-muted); max-width: 58ch; }
.section-lead b { color: var(--fg); font-weight: 600; }

/* ---------- Come funziona (avorio) ---------- */
.how-grid { display: grid; gap: 48px; }
@media (min-width: 1000px) { .how-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 88px; align-items: start; } }
.how-intro { display: grid; gap: 24px; align-content: start; }
.photo { margin: 16px 0 0; overflow: hidden; border-radius: var(--radius); background: var(--paper-3); }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 55% 40%; transition: transform 1.2s var(--ease); }
.photo:hover img { transform: scale(1.03); }
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.step { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding: 28px 0 30px; border-bottom: 1px solid var(--rule); }
.step__num { font-family: var(--font-display); font-weight: 700; font-size: 56px; line-height: 0.85; color: var(--numeral); transition: color 0.3s; }
.step:hover .step__num { color: var(--accent-ink); }
.step__body { display: grid; gap: 8px; }
.step__n { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.step__body > p:last-child { color: var(--fg-muted); font-size: 15.5px; max-width: 54ch; }
@media (max-width: 520px) { .step { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; } .step__num { font-size: 42px; } }

/* ---------- Funzioni: griglia a filetti ---------- */
.board { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
@media (min-width: 760px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--chart, .tile--ab { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  /* Riga 1: grafico (4/6) ed errori (2/6); poi due file da tre */
  .board { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tile { grid-column: span 2; }
  .tile.tile--chart { grid-column: 1 / 5; }
}
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-width: 0; padding: 22px 20px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transition: background 0.25s; }
@media (min-width: 720px) { .tile { padding: 28px; } }
.tile:hover { background: rgba(244, 243, 237, 0.018); }
.tile__text { display: grid; gap: 8px; }
.tile__text p { color: var(--fg-muted); font-size: 15px; max-width: 62ch; }
.tile .title { font-size: 21px; }
.tile--chart .title { font-size: clamp(22px, 2vw, 27px); }
.viz { padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.lapchart, .hist { display: block; width: 100%; height: auto; }
html.js .tile .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.js .tile.is-visible .draw { animation: draw 2.4s var(--ease) 0.2s forwards; }
html.js .tile.is-visible .ln--b.draw { animation-delay: 0.5s; }

.hist .axis { stroke: var(--border-strong); }
.hist .zero { stroke: var(--border-strong); stroke-dasharray: 2 3; }
.hist .bar { fill: #8b93a5; transform-box: fill-box; transform-origin: bottom; }
.hist .bar.slow { fill: #4a5366; }
html.js .tile .hist .bar { transform: scaleY(0); }
html.js .tile.is-visible .hist .bar { transform: scaleY(1); transition: transform 0.9s var(--ease) 0.3s; }

.errs, .notes { list-style: none; margin: 0; padding: 6px; display: grid; gap: 4px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13.5px; }
.errs li, .notes li { display: grid; grid-template-columns: 58px 1fr; gap: 10px; align-items: baseline; padding: 8px; background: var(--surface); border-radius: var(--radius); color: var(--text-muted); }
.errs b, .notes b { color: var(--text); font-weight: 600; margin-right: 4px; }
.errs__t { font-family: var(--font-ui-mono); color: var(--warning); font-weight: 600; text-align: right; }
.errs__rec .errs__t { color: var(--ctx); }
.notes__id { font-family: var(--font-ui-mono); color: var(--accent-text); }
.notes li { grid-template-columns: 34px 1fr; }

.ideal { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.ideal__row { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; }
.ideal__bar { height: 8px; background: color-mix(in srgb, var(--accent) 70%, transparent); transform-origin: left; }
.ideal__bar--1 { width: 82%; } .ideal__bar--2 { width: 100%; } .ideal__bar--3 { width: 76%; }
html.js .tile .ideal__bar { transform: scaleX(0); }
html.js .tile.is-visible .ideal__bar { transform: scaleX(1); transition: transform 1s var(--ease) 0.3s; }
.ideal__sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.ideal__vs { font-family: var(--font-ui-mono); font-size: 12px; color: var(--success); }

.balance { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.balance__head, .balance__row { display: grid; grid-template-columns: 64px repeat(3, 1fr); gap: 6px; align-items: center; }
.balance__head span { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); text-align: center; }
.bal { position: relative; height: 22px; background: var(--surface); border-radius: var(--radius); }
.bal::before { content: ""; position: absolute; left: 50%; top: 3px; bottom: 3px; width: 1px; background: var(--border-strong); }
.bal::after { content: ""; position: absolute; top: 5px; bottom: 5px; left: 50%; background: var(--accent); transform-origin: left; }
.bal--u1::after { width: 16%; } .bal--u2::after { width: 30%; } .bal--u3::after { width: 44%; }
.bal--o1::after { width: 18%; left: auto; right: 50%; background: var(--ctx); transform-origin: right; }
.bal--n::after { width: 3%; background: var(--text-muted); }
html.js .tile .bal::after { transform: scaleX(0); }
html.js .tile.is-visible .bal::after { transform: scaleX(1); transition: transform 0.9s var(--ease) 0.3s; }

.mini-op, .ab { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13.5px; }
.mini-op__row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border); color: var(--text-muted); }
.mini-op__row b { color: var(--accent-text); }
.mini-op__ok { display: flex; align-items: center; gap: 8px; color: var(--success); font-size: 13px; }
.mini-op__ok .ico { width: 16px; height: 16px; }
.ab__title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 600; }
.ab__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; padding: 8px 0; border-block: 1px solid var(--border); }
.ab__grid .num { font-size: 16px; }
.good { color: var(--success); }

/* ---------- Simulatori ---------- */
.sims { display: grid; border-top: 1px solid var(--rule); }
.sim { display: grid; gap: 14px; align-content: start; padding-block: 32px 36px; }
@media (min-width: 900px) {
  .sims { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sim { padding-right: 32px; }
  .sim + .sim { padding-left: 32px; border-left: 1px solid var(--rule); }
}
@media (max-width: 899px) { .sim + .sim { border-top: 1px solid var(--rule); } }
.sim__kicker { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }
.sim__kicker code { font-size: 1em; text-transform: none; }
.sim__name { margin-bottom: 6px; font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 3.2vw, 42px); line-height: 0.95; letter-spacing: -0.005em; }
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--fg-muted); font-size: 15.5px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; }
.ticks li::before { content: "+"; flex: none; font-family: var(--font-mono); font-weight: 500; color: var(--accent-ink); }
.ticks code { color: var(--fg); }
.sims-next { display: flex; gap: 12px; align-items: baseline; padding-top: 24px; border-top: 1px solid var(--rule); color: var(--fg-muted); font-size: 15.5px; }
.sims-next__plus { font-family: var(--font-mono); color: var(--accent-ink); }

/* ---------- La parte AI (avorio) ---------- */
.roles { display: grid; border: 1px solid var(--rule); }
@media (min-width: 900px) {
  .roles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .role + .role { border-left: 1px solid var(--rule); }
}
@media (max-width: 899px) { .role + .role { border-top: 1px solid var(--rule); } }
.role { display: grid; gap: 14px; align-content: start; padding: 26px 24px 30px; }
.role__n { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--fg-muted); }
.role__head { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-weight: 600; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.role__head .ico { width: 20px; height: 20px; color: var(--accent-ink); }
.role--you { background: var(--paper-2); }
.role--you .role__head { color: var(--accent-ink); }

/* Flusso dei dati */
.flow { display: grid; gap: 22px; margin-block: 32px 80px; padding: 24px; background: var(--paper-3); border-radius: var(--radius); }
@media (min-width: 960px) {
  .flow { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px; padding: 32px; }
  .flow__box--none { grid-column: 1 / -1; }
}
.flow__box { display: grid; gap: 12px; min-width: 0; }
.flow__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1; }
.flow__title .ico { width: 22px; height: 22px; color: var(--accent-ink); }
.flow__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.flow__arr { width: 14px; height: 14px; color: var(--fg-muted); }
.chip { padding: 5px 9px; border: 1px solid var(--rule-strong); border-radius: var(--radius); font-family: var(--font-mono); font-size: 12px; color: var(--fg); white-space: nowrap; }
.chip--accent { border-color: var(--orange); background: var(--orange); color: var(--on-orange); font-weight: 600; }
.flow__note { font-size: 14.5px; color: var(--fg-muted); }
.flow__providers { font-size: 15px; }
.flow__box--none { align-items: center; gap: 8px 20px; padding-top: 20px; border-top: 1px dashed var(--rule-strong); }
@media (min-width: 600px) { .flow__box--none { grid-template-columns: auto 1fr; } }
.flow__box--none .flow__title { font-size: 22px; color: var(--fg-muted); }
.flow__box--none .flow__title .ico { color: var(--fg-muted); }
.flow__link { display: grid; gap: 6px; }
.flow__line { position: relative; display: block; height: 2px; background: repeating-linear-gradient(90deg, #a3a197 0 6px, transparent 6px 10px); overflow: hidden; }
.flow__line i { position: absolute; top: -2px; left: 0; width: 22px; height: 6px; background: var(--orange); border-radius: var(--radius); animation: flow-r 2.4s linear infinite; }
.flow__line--back i { background: var(--fg); animation-name: flow-l; animation-delay: 1.2s; }
.flow__label { margin-bottom: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); }
@media (max-width: 959px) {
  .flow__link { grid-template-columns: 2px 1fr; gap: 8px 14px; padding: 4px 0 4px 18px; }
  .flow__line { width: 2px; height: 46px; background: repeating-linear-gradient(180deg, #a3a197 0 6px, transparent 6px 10px); }
  .flow__line i { top: 0; left: -2px; width: 6px; height: 16px; animation-name: flow-d; }
  .flow__line--back i { animation-name: flow-u; }
  .flow__label { align-self: center; margin: 0; }
}

/* Chiave, token, modello */
.cards3 { display: grid; gap: 40px; }
@media (min-width: 900px) { .cards3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; } }
.card { display: grid; gap: 14px; align-content: start; padding-top: 24px; border-top: 1px solid var(--rule-strong); }
.card__n { font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 0.9; color: var(--numeral); }
.card .title { font-size: 22px; }
.card p { color: var(--fg-muted); font-size: 15.5px; }
.card p b { color: var(--fg); }
.card .small { font-size: 14px; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.links a { display: inline-flex; padding: 5px 10px; border: 1px solid var(--rule-strong); border-radius: var(--radius); font-size: 14px; font-weight: 500; text-decoration: none; color: var(--fg); transition: border-color 0.15s, color 0.15s; }
.links a:hover { border-color: var(--accent-ink); color: var(--accent-ink); }

/* Cosa contiene un messaggio */
.anatomy { display: grid; gap: 16px; margin-top: 80px; padding-top: 32px; border-top: 1px solid var(--rule-strong); }
.anatomy__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; }
.anatomy .title { font-size: 22px; }
.anatomy__row { display: grid; gap: 8px; }
@media (min-width: 760px) { .anatomy__row { grid-template-columns: 132px 1fr; align-items: center; } }
.anatomy__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); }
.stack { display: flex; gap: 3px; height: 44px; }
.seg { display: flex; align-items: center; padding: 0 10px; min-width: 0; overflow: hidden; white-space: nowrap; font-family: var(--font-mono); font-size: 12px; color: #2e3430; border-radius: var(--radius); transform-origin: left; }
.seg--sys { flex: 2.2; background: #d6d3c8; }
.seg--lib { flex: 1.6; background: #c6c3b6; }
.seg--sum { flex: 3.4; background: #b3b0a2; color: #1d2220; }
.seg--q { flex: 0.6; justify-content: center; background: #141716; color: var(--ivory); }
.seg--out { flex: 1.4; background: var(--orange); color: var(--on-orange); }
.seg--cache { flex: 7.2; color: #4c524e; background: repeating-linear-gradient(135deg, #d3d0c4 0 2px, #e6e4db 2px 7px); }
@media (max-width: 600px) { .seg { font-size: 0; padding: 0; } .stack { height: 18px; } }
html.js .anatomy .stack { clip-path: inset(0 100% 0 0); }
html.js .anatomy.is-visible .stack { clip-path: inset(0 0 0 0); transition: clip-path 1.4s var(--ease) 0.2s; }
.anatomy__note { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 15.5px; color: var(--fg-muted); }
.anatomy__note .ico { color: var(--accent-ink); }
.anatomy__note b { color: var(--fg); }
@media (max-width: 600px) {
  .anatomy__row::after { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-muted); }
  .anatomy__row:nth-of-type(2)::after { content: "instructions · notebook & garage · summary · you · answer"; }
  .anatomy__row:nth-of-type(3)::after { content: "conversation so far (cache) · you · answer"; }
}

/* ---------- I tuoi dati ---------- */
.dtable-wrap { border-top: 1px solid var(--rule-strong); }
.dtable { width: 100%; border-collapse: collapse; font-size: 15px; }
.dtable th, .dtable td { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.dtable th:last-child, .dtable td:last-child { padding-right: 0; }
.dtable thead th { padding-block: 14px; border-bottom-color: var(--rule-strong); white-space: nowrap; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); }
.dtable tbody th { width: 22%; font-weight: 600; color: var(--fg); }
.dtable td { color: var(--fg-muted); }
.dtable td b { color: var(--fg); }
.dtable .yes, .dtable .no { white-space: nowrap; width: 1%; }
.dtable .yes { color: var(--fg); }
.dtable .yes .ico { color: var(--orange); }
.dtable .no { color: var(--fg-faint); }
.dtable .ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 8px; }
.dtable tbody tr { transition: background 0.15s; }
.dtable tbody tr:hover { background: rgba(244, 243, 237, 0.02); }
@media (max-width: 760px) {
  .dtable thead { display: none; }
  .dtable, .dtable tbody, .dtable tr, .dtable th, .dtable td { display: block; width: auto; }
  .dtable tr { padding: 18px 0; border-bottom: 1px solid var(--rule); }
  .dtable th, .dtable td { padding: 4px 0; border: 0; white-space: normal; }
  .dtable tbody th { width: auto; margin-bottom: 4px; font-size: 18px; }
  .dtable td::before { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); }
  .dtable td:nth-of-type(1)::before { content: "On your PC"; }
  .dtable td:nth-of-type(2)::before { content: "Sent to your AI provider"; }
  .dtable td:nth-of-type(3)::before { content: "Sent to Camber"; }
  .dtable .yes, .dtable .no { width: auto; }
}
.data-notes { display: grid; gap: 20px; margin-top: 36px; }
@media (min-width: 900px) { .data-notes { grid-template-columns: 1fr 1fr; gap: 48px; } }
.data-notes p { padding-left: 18px; border-left: 2px solid var(--orange); color: var(--fg-muted); font-size: 15px; }
.data-notes b { color: var(--fg); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: 40px; }
.faq-head { display: grid; gap: 20px; align-content: start; }
.faq-head .section-top { margin-bottom: 8px; }
@media (min-width: 960px) {
  .faq-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr); gap: 96px; }
  .faq-head { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; }
}
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule-strong); }
.faq summary { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding-block: 22px; cursor: pointer; list-style: none; font-weight: 600; font-size: 17.5px; line-height: 1.4; color: var(--fg); transition: color 0.15s; }
.faq summary::-webkit-details-marker { display: none; }
/* Più che diventa meno: due linee arancio, la verticale si chiude all'apertura */
.faq summary::after { content: ""; flex: none; align-self: center; width: 14px; height: 14px;
  background: linear-gradient(var(--orange), var(--orange)) center / 14px 1.5px no-repeat, linear-gradient(var(--orange), var(--orange)) center / 1.5px 14px no-repeat;
  transition: background-size 0.25s var(--ease); }
.faq details[open] summary::after { background-size: 14px 1.5px, 1.5px 0; }
.faq summary:hover { color: var(--orange); }
.faq details p { max-width: 62ch; padding-bottom: 22px; color: var(--fg-muted); }
.faq details p b { color: var(--fg); }

/* ---------- Chiusura con foto ---------- */
.closing { position: relative; isolation: isolate; overflow: hidden; padding-block: 88px 96px; border-top: 1px solid var(--rule); background: var(--ink-deep); }
@media (min-width: 960px) { .closing { padding-block: 128px 136px; } }
.closing__photo { position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 75% 30%; opacity: 0.55; }
.closing::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(11, 14, 14, 0.96) 0%, rgba(11, 14, 14, 0.8) 40%, rgba(11, 14, 14, 0.25) 78%), linear-gradient(0deg, rgba(11, 14, 14, 0.8), rgba(11, 14, 14, 0) 55%); }
.closing-inner { position: relative; display: grid; gap: 24px; justify-items: start; }
/* 5em: "One change" / "at a time." su due righe */
.closing .display-xl { max-width: 5em; color: var(--ivory); }
.closing .lead { color: #c2c8c4; }
@media (max-width: 720px) { .closing__photo { opacity: 0.38; object-position: 72% 20%; } }

/* ---------- Footer ---------- */
.site-footer { padding-block: 28px 32px; border-top: 1px solid var(--rule); background: var(--ink-deep); font-size: 13.5px; color: var(--fg-muted); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 40px; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ivory); text-decoration: none; }
.footer-note { flex: 1 1 360px; max-width: 70ch; }
/* Chi l'ha fatto e come contattarlo; sotto, più piccola, la dichiarazione "not affiliated" */
.footer-credit { flex: 1 1 380px; max-width: 72ch; color: var(--fg); }
.footer-credit a { color: var(--orange); text-underline-offset: 3px; overflow-wrap: anywhere; }
.footer-credit a:hover { color: var(--orange-hover); }
.footer-row--small { margin-top: 18px; font-size: 12.5px; color: var(--fg-faint); }
.footer-row--small .footer-note { flex: 1 1 100%; max-width: none; padding-top: 16px; border-top: 1px solid var(--rule); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--fg-muted); }
.footer-links a:hover { color: var(--fg); }

/* ---------- Pagine di testo (privacy) ---------- */
.prose { max-width: 66ch; padding-block: 72px 96px; display: grid; gap: 16px; }
.prose h1 { margin-bottom: 8px; font-family: var(--font-display); font-weight: 700; font-size: clamp(52px, 7vw, 84px); line-height: 0.9; letter-spacing: -0.01em; }
.prose h2 { margin-top: 24px; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.1; }
.prose p, .prose li { color: var(--fg-muted); }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.prose li::marker { color: var(--orange); }

/* ---------- Comparsa allo scorrimento ---------- */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
html.js .reveal.is-visible { opacity: 1; transform: none; }
/* Nella griglia a filetti solo dissolvenza: i bordi restano allineati */
html.js .board .reveal { transform: none; }

/* ---------- Keyframes ---------- */
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slidein { from { opacity: 0; transform: translateY(-14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(184, 92, 42, 0.55); } 100% { box-shadow: 0 0 0 10px rgba(184, 92, 42, 0); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes press { 0% { transform: none; } 40% { transform: scale(0.94); background: var(--accent); color: #fff; } 100% { transform: none; background: var(--accent); color: #fff; } }
@keyframes flow-r { from { left: -24px; } to { left: 100%; } }
@keyframes flow-l { from { left: 100%; } to { left: -24px; } }
@keyframes flow-d { from { top: -18px; } to { top: 100%; } }
@keyframes flow-u { from { top: 100%; } to { top: -18px; } }

/* ---------- Riduci animazioni ---------- */
@media (prefers-reduced-motion: reduce) {
  html, .scene { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .tile .draw, .film.js .mini-chart .draw { stroke-dashoffset: 0; }
  .flow__line i { display: none; }
  html.js .tile .hist .bar, html.js .tile .ideal__bar, html.js .tile .bal::after { transform: none; }
  html.js .anatomy .stack { clip-path: none; }
  .film.js .scene .anim, .film.js .op__done { opacity: 1; }
  .photo:hover img { transform: none; }
}
