/* ════════════════════════════════════════════════════════════════════════════
   Auto Moto Radar — Landing informativa (statica, autonoma).
   Token e look COPIATI dall'app (frontend/style.css) per coerenza; landing
   indipendente (nessun link ai file dell'app). Niente CDN/web-font/analytics.
   ════════════════════════════════════════════════════════════════════════════ */

/* ─── Token tema (verbatim da frontend/style.css:9-62) ──────────────────────── */
:root, :root[data-theme="light"] {
  --bg:          #f3f4f6;
  --surface:     #ffffff;
  --surface-2:   #eceef1;
  --surface-3:   #e3e6ea;
  --line:        #d3d8de;
  --line-strong: #b6bdc7;
  --text:        #14181f;
  --text-muted:  #5b6472;
  --text-faint:  #8a94a2;
  --accent:      #1f6feb;
  --accent-weak: #e7f0fd;
  --pos:         #117a37;
  --pos-weak:    #e1f3e8;
  --neg:         #c2362f;
  --warn:        #8a6100;
  --warn-weak:   #fbf0d5;

  --tag-subito-fg:    #1357c4;  --tag-subito-bg:    #e7f0fd;
  --tag-autoscout-fg: #8a6100;  --tag-autoscout-bg: #faf0d5;
  --tag-moto-fg:      #117a37;  --tag-moto-bg:      #e1f3e8;

  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --num:  var(--sans);
  --r:  4px;
  --r2: 6px;
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.10);
}

:root[data-theme="dark"] {
  --bg:          #0d1117;
  --surface:     #161b22;
  --surface-2:   #1b212c;
  --surface-3:   #222a36;
  --line:        #2a313c;
  --line-strong: #3a434f;
  --text:        #e6edf3;
  --text-muted:  #8b97a6;
  --text-faint:  #6a7787;
  --accent:      #4d9bff;
  --accent-weak: #15243a;
  --pos:         #3fb950;
  --pos-weak:    #11271a;
  --neg:         #f0726a;
  --warn:        #d6a838;
  --warn-weak:   #2a2310;

  --tag-subito-fg:    #6cb0ff;  --tag-subito-bg:    #14233a;
  --tag-autoscout-fg: #e3b341;  --tag-autoscout-bg: #2a2310;
  --tag-moto-fg:      #56d364;  --tag-moto-bg:      #11271a;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

/* ─── Base (da style.css:65-76) ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;   /* guardia anti scroll-x (clip non rompe la topbar sticky) */
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent-weak); }
html { scroll-behavior: smooth; }

/* ─── Accessibilità: focus da tastiera coerente su tutti gli elementi attivi ──── */
.btn:focus-visible,
.theme-toggle:focus-visible,
a:focus-visible,
.wiz-opt:focus-visible,
.wiz-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  text-decoration: none;
}

/* Le sezioni con id sono bersaglio di link ancora: lascia spazio alla topbar sticky
   così il titolo non finisce nascosto sotto la barra. */
section[id] { scroll-margin-top: 72px; }

/* Rispetta chi preferisce meno movimento: niente scroll animato né transizioni. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Container pulito (NO !important/Bootstrap dell'app; tengo il cap 4K + padding fluido) */
.wrap {
  max-width: 1080px;
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

/* ─── Topbar (da style.css:119-144) ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand .brand-logo { display: block; border-radius: var(--r); flex: none; }
.brand .brand-name {
  font-size: 1.02rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-spacer { flex: 1; }
/* Link di navigazione fra le sezioni (accessibilità). Sotto 720px collassano: vedi media. */
.topnav { display: flex; gap: 4px; }
.topnav a {
  color: var(--text-muted); font-weight: 600; font-size: 0.9rem;
  padding: 6px 10px; border-radius: var(--r);
  transition: color .12s, background .12s;
}
.topnav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.topbar-cta { padding: 8px 16px; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--text-muted); cursor: pointer; font-size: 1rem; line-height: 1;
  transition: border-color .12s, color .12s, background .12s;
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--text); }

/* ─── Sezioni ───────────────────────────────────────────────────────────────── */
section { padding: clamp(40px, 7vw, 76px) 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }
.eyebrow {
  font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); margin: 0 0 10px;
}
h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 16px; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); letter-spacing: -0.01em; margin: 0 0 14px; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--text-muted); max-width: 640px; margin: 0 0 8px; }
.muted { color: var(--text-muted); }
.section-intro { max-width: 680px; margin: 0 0 28px; color: var(--text-muted); }

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-top: clamp(48px, 8vw, 96px);
}
/* Sfondo fotografico (asset locale) de-opacizzato + sfumatura verso il colore di sfondo
   per stacco pulito dalla sezione sotto. Decorativo, dietro al contenuto. */
.hero-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("./hero.jpg") center / cover no-repeat;
  opacity: 0.16;
}
:root[data-theme="dark"] .hero-bg { opacity: 0.30; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, var(--bg) 100%);
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 5vw, 56px); align-items: center;
}
.hero-copy { min-width: 0; }
.hero-logo { margin-bottom: 18px; }
/* Riga 1: claim forte (testo pieno, peso medio). Riga 2: supporto, più piccola e muted. */
.hero .lead-1 {
  color: var(--text); font-weight: 600;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem); line-height: 1.3; margin-bottom: 12px;
}
.hero .lead-2 { font-size: clamp(0.98rem, 2vw, 1.12rem); margin-bottom: 4px; }
.badge-invito {
  display: inline-block; margin-top: 6px;
  font-size: 0.8rem; font-weight: 700; color: var(--accent);
  background: var(--accent-weak); border-radius: 999px; padding: 5px 14px;
}

/* ─── Wizard di profilazione (hero) ─────────────────────────────────────────── */
.wizard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2);
  padding: 22px; box-shadow: var(--shadow);
}
.wiz-kicker {
  margin: 0; font-size: 0.74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent);
}
.wiz-progress { margin: 4px 0 14px; font-size: 0.78rem; color: var(--text-muted); }
.wiz-q { margin: 0 0 14px; font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }
.wiz-q:focus { outline: none; }   /* focus programmatico: niente outline al tab interno */
.wiz-options { display: grid; gap: 10px; }
.wiz-opt {
  text-align: left; width: 100%; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer;
  transition: border-color .12s, background .12s, transform .12s;
}
.wiz-opt:hover { border-color: var(--accent); background: var(--accent-weak); }
.wiz-opt:active { transform: translateY(1px); }
.wiz-text { margin: 0 0 16px; color: var(--text-muted); }
.wiz-cta { width: 100%; margin-top: 2px; }
.wiz-controls { display: flex; gap: 16px; margin-top: 14px; }
.wiz-link {
  background: none; border: none; padding: 4px 0;
  color: var(--text-muted); font: inherit; cursor: pointer;
}
.wiz-link:hover { color: var(--accent); text-decoration: underline; }
/* Recap configuratore */
.wiz-recap { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); padding: 2px 12px; margin: 0 0 16px; }
.wiz-recap-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dotted var(--line); font-size: 0.9rem; }
.wiz-recap-row:last-child { border-bottom: none; }
.wiz-recap-k { color: var(--text-muted); }
.wiz-recap-v { font-weight: 700; color: var(--text); text-align: right; }

/* ─── Hero: demo "ricerca che si auto-digita" ─────────────────────────────────── */
.hero-demo { font-variant-numeric: tabular-nums; }
.hero-demo-body { padding: 16px; }
.hd-search { margin-bottom: 12px; }
/* nowrap+overflow: il testo digitato non deve mai andare a capo (campo che cresce → salto pagina su mobile stretto). */
.hd-field { display: flex; align-items: center; min-height: 44px; white-space: nowrap; overflow: hidden; }
.hd-caret { display: inline-block; width: 2px; height: 1.05em; background: var(--accent); margin-left: 2px; animation: hd-blink 1.05s step-end infinite; }
@keyframes hd-blink { 50% { opacity: 0; } }
/* Altezza FISSA (non min-height): la fase "typing" (liste hidden) e l'esito devono
   occupare lo stesso spazio, altrimenti la pagina sobbalza a ogni ciclo del loop. */
.hd-results { height: 312px; overflow: hidden; }
/* La lista nascosta deve sparire davvero: .fx .result-list{display:flex} sovrasta [hidden]. */
.fx .result-list[hidden] { display: none; }
/* Dropdown autocomplete (mirror app), copiato scopato .fx. */
.hero-demo .ac-wrap { position: relative; flex: 1; min-width: 0; }
.fx .ac-list { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow); max-height: 200px; overflow-y: auto; }
.fx .ac-list[hidden] { display: none; }
.fx .ac-item { padding: 8px 11px; border-radius: var(--r); font-size: 0.92rem; color: var(--text); }
.fx .ac-item.active { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .hd-caret { display: none; } }

/* ─── Modal wizard ────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.modal-card {
  position: relative; z-index: 1; width: 100%; max-width: 460px; max-height: 90vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r2);
  box-shadow: var(--shadow); padding: 24px;
}
.modal-x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--text-muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.modal-x:hover { color: var(--text); }
.modal-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── Pulsanti ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
  padding: 11px 26px; cursor: pointer; border: 1px solid transparent; font-family: inherit;
  white-space: nowrap;   /* niente CTA su due righe su mobile stretto */
  transition: background .12s, border-color .12s, color .12s;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.07); text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
/* Pieno neutro: scuro in light, chiaro in dark (si adatta al tema). */
.btn-dark { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-dark:hover { filter: brightness(1.12); text-decoration: none; color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ─── Griglie generiche ─────────────────────────────────────────────────────── */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface);
  padding: 20px;
  transition: border-color .14s, transform .14s, box-shadow .14s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ─── Come funziona: split Prima / Dopo ─────────────────────────────────────── */
.ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(16px, 3vw, 34px); align-items: center; margin-top: 6px; }
.ba-side { min-width: 0; }
.ba-lab { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 14px; }
.ba-lab-before { color: var(--neg); }
.ba-lab-after { color: var(--pos); }
.ba-arrow { font-size: 1.9rem; font-weight: 700; color: var(--accent); line-height: 1; }
/* Prima: finestre "fonte" sparse/ruotate (il caos di oggi). */
.ba-mock { position: relative; height: 252px; overflow: hidden; }
.ba-win { position: absolute; width: 80%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow); overflow: hidden; }
.ba-win1 { top: 12px; left: 2%; transform: rotate(-3deg); }
.ba-win2 { top: 64px; left: 16%; transform: rotate(2.5deg); z-index: 2; }
.ba-win3 { top: 124px; left: 6%; transform: rotate(-1.5deg); }
.ba-win-bar { background: var(--surface-3); border-bottom: 1px solid var(--line); padding: 5px 11px; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); }
.ba-win-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 11px; font-size: 0.78rem; font-family: var(--num); color: var(--text-muted); border-top: 1px solid var(--line); }
.ba-win-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ba-win-row span:last-child { font-weight: 700; color: var(--text); }
.ba-list { margin-bottom: 14px; }
.ba-pts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 0.88rem; }
.ba-pts li { display: flex; align-items: center; gap: 8px; color: var(--text); }
.ba-pts-before li::before { content: "✕"; color: var(--neg); font-weight: 700; }
.ba-pts-after li::before { content: "✓"; color: var(--pos); font-weight: 700; }
.ba-impact { margin: clamp(22px, 4vw, 34px) 0 0; text-align: center; font-weight: 700; font-size: clamp(0.95rem, 2.2vw, 1.15rem); color: var(--text); }
.ba-impact b { color: var(--accent); }
@media (max-width: 760px) {
  .ba { grid-template-columns: 1fr; gap: 18px; }
  .ba-arrow { justify-self: center; transform: rotate(90deg); }   /* → diventa ↓ */
}
@media (max-width: 480px) {
  /* Prima: card restano sovrapposte/ruotate (caos), contenute dal .ba-mock. */
  .ba-list .result-row { grid-template-columns: 64px minmax(0,1fr) auto !important; }
  .ba-list .row-fonte { display: none; }
}

/* ─── Showcase: replica FEDELE dei risultati app (statico, dati finti) ─────────
   CSS copiato verbatim da frontend/style.css (toolbar 315-367 + risultati 380-451),
   scopato sotto .showcase. Nessun link all'app, nessun dato reale. */
.showcase-note {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); margin: 0 0 10px;
}
.showcase { font-variant-numeric: tabular-nums; }

/* Toolbar risultati — qui position:static (in app è sticky top:53px). */
.showcase .results-toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2);
  padding: 9px 12px; margin-bottom: 10px;
}
.showcase .tb-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.showcase .tb-sep { width: 1px; align-self: stretch; min-height: 24px; background: var(--line); }
.showcase .tb-count { font-family: var(--num); font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.showcase .tb-stat { display: inline-flex; align-items: baseline; gap: 5px; font-size: 0.82rem; }
.showcase .tb-stat-label { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.showcase .tb-stat b { font-family: var(--num); font-weight: 700; color: var(--text); }
.showcase .tb-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.showcase .facet-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.showcase .facet-chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-muted);
  border-radius: var(--r); padding: 4px 11px; font-size: 0.78rem; font-weight: 600; font-family: inherit;
}
.showcase .facet-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.showcase .tb-btn {
  border: 1px solid var(--line); color: var(--text); background: var(--surface);
  border-radius: var(--r); font-weight: 600; font-size: 0.78rem; padding: 5px 12px; white-space: nowrap;
}
.showcase .tb-price { display: flex; flex-direction: column; gap: 3px; min-width: 168px; }
.showcase .tb-price-labels { display: flex; justify-content: space-between; font-family: var(--num); font-size: 0.7rem; color: var(--text-muted); }
/* Slider prezzo FINTO (look noUi, statico — niente nouislider). */
.showcase .fake-slider { position: relative; height: 5px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); }
.showcase .fs-connect { position: absolute; top: 0; bottom: 0; left: 22%; right: 28%; background: var(--accent); border-radius: 3px; }
.showcase .fs-handle { position: absolute; top: -6px; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.showcase .fs-h1 { left: calc(22% - 7px); }
.showcase .fs-h2 { right: calc(28% - 7px); }

/* Intestazioni colonne */
.showcase .grid-head {
  display: grid; align-items: center; gap: 12px; padding: 8px 14px;
  background: var(--surface-3); border: 1px solid var(--line); border-bottom: none;
  border-radius: var(--r2) var(--r2) 0 0;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
}
.showcase .gh { white-space: nowrap; }
.showcase .gh-num { text-align: right; }

/* Lista + righe risultato */
.showcase .result-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 0 0 var(--r2) var(--r2); background: var(--surface); overflow: hidden; }
.showcase .result-row { display: grid; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.showcase .result-row:last-child { border-bottom: none; }
.showcase .result-row.best { border-left-color: var(--pos); }
.showcase .row-thumb { width: 100%; height: 82px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.showcase .row-thumb svg { width: 48px; height: 48px; opacity: .5; }
.showcase .row-main { min-width: 0; }
.showcase .row-titolo { font-weight: 600; font-size: 0.92rem; line-height: 1.3; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.showcase .row-variante { margin-top: 1px; font-size: 0.78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showcase .row-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-family: var(--num); font-size: 0.74rem; color: var(--text-faint); }
.showcase .row-sub-m { display: none; }
.showcase .row-fonte { min-width: 0; }
.showcase .row-cell { font-family: var(--num); font-size: 0.82rem; color: var(--text); white-space: nowrap; }
.showcase .row-cell.num { text-align: right; }
.showcase .row-cell.muted { color: var(--text-muted); }
.showcase .row-prezzo { font-family: var(--num); font-weight: 700; font-size: 1.02rem; color: var(--text); text-align: right; white-space: nowrap; }
.showcase .result-row.best .row-prezzo { color: var(--pos); }
.showcase .vend-badge { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.02em; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.showcase .vend-priv { background: var(--surface-2); color: var(--text-muted); }
.showcase .vend-conc { background: var(--accent-weak); color: var(--accent); }
.showcase .tag { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; display: inline-block; white-space: nowrap; }
.showcase .tag-subito    { background: var(--tag-subito-bg);    color: var(--tag-subito-fg); }
.showcase .tag-autoscout { background: var(--tag-autoscout-bg); color: var(--tag-autoscout-fg); }
.showcase .tag-moto      { background: var(--tag-moto-bg);      color: var(--tag-moto-fg); }
.showcase .row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.showcase .row-act { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--text-muted); }
.showcase .ico { width: 16px; height: 16px; display: inline-block; }

/* Responsive come l'app: <1100 niente carb/cv; <860 riga impilata. */
@media (max-width: 1100px) {
  .showcase .grid-head, .showcase .result-row {
    grid-template-columns: 120px minmax(0,1fr) 64px 98px 124px 96px 104px !important;
  }
  .showcase .col-carb, .showcase .col-cv { display: none; }
}
@media (max-width: 860px) {
  .showcase .grid-head { display: none; }
  .showcase .result-row {
    grid-template-columns: 84px minmax(0,1fr) !important;
    grid-template-areas: "thumb main" "thumb price"; row-gap: 2px;
  }
  .showcase .row-thumb { grid-area: thumb; width: 84px; height: 84px; align-self: start; }
  .showcase .row-main { grid-area: main; }
  .showcase .row-prezzo { grid-area: price; align-self: start; justify-self: start; text-align: left; font-size: 1.1rem; margin-top: 2px; }
  .showcase .row-cell, .showcase .row-fonte, .showcase .row-actions { display: none; }
  .showcase .row-sub-m { display: block; font-family: var(--num); font-size: 0.74rem; color: var(--text-muted); margin-top: 4px; }
}

/* ═══ Funzioni: carosello custom di mockup fedeli ═══════════════════════════════
   Chrome del carosello + CSS dei mockup COPIATO da frontend/style.css, tutto
   scopato sotto .fx (zero leak). Mockup statici, non-interattivi. */

/* — Chrome explorer: lista-tab (sx) + finestra app (dx) — */
.fx-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fx-explorer { display: grid; grid-template-columns: 290px 1fr; gap: 22px; align-items: start; }
.fx-tabs { display: flex; flex-direction: column; gap: 4px; max-height: 430px; overflow-y: auto; }
/* Selettore funzioni: nascosto su desktop (si usano le tab), mostrato su mobile (vedi @860). */
.fx-select {
  display: none; width: 100%; box-sizing: border-box;
  padding: 11px 12px; font: inherit; font-weight: 600;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); cursor: pointer;
}
.fx-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fx-tab {
  display: flex; align-items: center; gap: 11px; text-align: left; width: 100%;
  padding: 10px 12px; border: 1px solid transparent; border-radius: var(--r);
  background: none; color: var(--text-muted); font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.fx-tab:hover { background: var(--surface-2); color: var(--text); }
.fx-tab[aria-selected="true"] { background: var(--accent-weak); color: var(--accent); border-color: var(--accent); }
.fx-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fx-tab-ico { width: 30px; height: 30px; flex: none; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--accent); }
.fx-tab-ico svg { width: 16px; height: 16px; }
.fx-stage { min-width: 0; }
/* Finestra app: barra titolo + corpo ad altezza fissa, contenuto centrato. */
.appwin { border: 1px solid var(--line); border-radius: var(--r2); background: var(--bg); box-shadow: var(--shadow); overflow: hidden; }
.appwin-bar { display: flex; align-items: center; gap: 7px; padding: 9px 12px; background: var(--surface-3); border-bottom: 1px solid var(--line); }
.awd { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.appwin-title { margin-left: 8px; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.appwin-body { height: 400px; overflow: auto; padding: 18px; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.appwin-body * { cursor: default; }
.fx-panel { width: 100%; }
.fx-stage-cap { margin: 12px 2px 0; font-size: 0.9rem; color: var(--text-muted); }
.fx-cap { margin: 12px 0 0; font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 860px) {
  .fx-explorer { grid-template-columns: 1fr; gap: 14px; }
  /* La striscia di tab orizzontale è inservibile col touch (scrollWidth ~3300px):
     su mobile la sostituisce un menu a tendina nativo. */
  .fx-tabs { display: none; }
  .fx-select { display: block; }
  .appwin-body { height: auto; min-height: 400px; }
}

/* — Token forzati per lo slide Dark mode (ridichiarano il tema sul sottoalbero) — */
.force-dark {
  --bg:#0d1117; --surface:#161b22; --surface-2:#1b212c; --surface-3:#222a36;
  --line:#2a313c; --line-strong:#3a434f; --text:#e6edf3; --text-muted:#8b97a6; --text-faint:#6a7787;
  --accent:#4d9bff; --accent-weak:#15243a; --pos:#3fb950; --pos-weak:#11271a; --neg:#f0726a;
  --warn:#d6a838; --warn-weak:#2a2310;
  --tag-subito-fg:#6cb0ff; --tag-subito-bg:#14233a; --tag-autoscout-fg:#e3b341; --tag-autoscout-bg:#2a2310;
  --tag-moto-fg:#56d364; --tag-moto-bg:#11271a;
  background: var(--bg); color: var(--text);
}
.force-light {
  --bg:#f3f4f6; --surface:#ffffff; --surface-2:#eceef1; --surface-3:#e3e6ea;
  --line:#d3d8de; --line-strong:#b6bdc7; --text:#14181f; --text-muted:#5b6472; --text-faint:#8a94a2;
  --accent:#1f6feb; --accent-weak:#e7f0fd; --pos:#117a37; --pos-weak:#e1f3e8; --neg:#c2362f;
  --warn:#8a6100; --warn-weak:#fbf0d5;
  --tag-subito-fg:#1357c4; --tag-subito-bg:#e7f0fd; --tag-autoscout-fg:#8a6100; --tag-autoscout-bg:#faf0d5;
  --tag-moto-fg:#117a37; --tag-moto-bg:#e1f3e8;
  background: var(--bg); color: var(--text);
}

/* ═══ Mockup CSS copiato da frontend/style.css, scopato .fx ═════════════════════ */
/* Righe risultato + griglia (per slide Dettaglio/Colonne/Dark) */
.fx .grid-head { display: grid; align-items: center; gap: 12px; padding: 8px 14px; background: var(--surface-3); border: 1px solid var(--line); border-bottom: none; border-radius: var(--r2) var(--r2) 0 0; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.fx .gh { white-space: nowrap; }
.fx .gh-num { text-align: right; }
.fx .result-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 0 0 var(--r2) var(--r2); background: var(--surface); overflow: hidden; }
.fx .result-row { display: grid; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.fx .result-row:last-child { border-bottom: none; }
.fx .result-row.best { border-left-color: var(--pos); }
.fx .row-thumb { width: 100%; height: 82px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.fx .row-thumb svg { width: 46px; height: 46px; opacity: .5; }
.fx .row-main { min-width: 0; }
.fx .row-titolo { font-weight: 600; font-size: 0.92rem; line-height: 1.3; color: var(--text); }
.fx .row-variante { margin-top: 1px; font-size: 0.78rem; color: var(--text-muted); }
.fx .row-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-family: var(--num); font-size: 0.74rem; color: var(--text-faint); }
.fx .row-fonte { min-width: 0; }
.fx .row-cell { font-family: var(--num); font-size: 0.82rem; color: var(--text); white-space: nowrap; }
.fx .row-cell.num { text-align: right; }
.fx .row-cell.muted { color: var(--text-muted); }
.fx .row-prezzo { font-family: var(--num); font-weight: 700; font-size: 1.02rem; color: var(--text); text-align: right; white-space: nowrap; }
.fx .result-row.best .row-prezzo { color: var(--pos); }
.fx .vend-badge { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.02em; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.fx .vend-priv { background: var(--surface-2); color: var(--text-muted); }
.fx .vend-conc { background: var(--accent-weak); color: var(--accent); }
.fx .tag { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; display: inline-block; white-space: nowrap; }
.fx .tag-subito { background: var(--tag-subito-bg); color: var(--tag-subito-fg); }
.fx .tag-autoscout { background: var(--tag-autoscout-bg); color: var(--tag-autoscout-fg); }
.fx .tag-moto { background: var(--tag-moto-bg); color: var(--tag-moto-fg); }
.fx .tb-btn { border: 1px solid var(--line); color: var(--text); background: var(--surface); border-radius: var(--r); font-weight: 600; font-size: 0.78rem; padding: 5px 12px; white-space: nowrap; display: inline-block; }

/* Slide 1: search form */
.fx .search-form { max-width: 920px; margin: 0 auto; width: 100%; }
.fx .seg-toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 3px; margin-bottom: 16px; }
.fx .seg-toggle .seg { cursor: default; padding: 6px 22px; border-radius: 3px; font-weight: 700; font-size: 0.85rem; color: var(--text-muted); letter-spacing: 0.02em; }
.fx .seg-toggle .seg.on { background: var(--text); color: var(--bg); }
.fx .search-fields { display: flex; gap: 10px; align-items: stretch; }
.fx .field-input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); font-size: 1rem; padding: 11px 12px; }
.fx .field-input .ph { color: var(--text-faint); }
.fx .btn-cerca { flex-shrink: 0; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: var(--r); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em; padding: 0 32px; display: inline-flex; align-items: center; }
.fx .adv-toggle { margin-top: 14px; color: var(--accent); font-weight: 600; font-size: 0.85rem; }
.fx .adv-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 16px; }
.fx .adv-field { display: flex; flex-direction: column; gap: 4px; }
.fx .adv-field span { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.fx .adv-field .inp { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); padding: 7px 9px; font-size: 0.9rem; font-family: var(--num); }
.fx .adv-field .inp.empty { color: var(--text-faint); }

/* Slide 2: menu Colonne */
.fx .tb-cols-menu { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow); padding: 6px; max-width: 230px; }
.fx .tb-cols-menu label { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; padding: 4px 6px; border-radius: var(--r); }
.fx .ck { width: 15px; height: 15px; border: 1px solid var(--line-strong); border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; flex: none; }
.fx .ck.on { background: var(--accent); border-color: var(--accent); }

/* Slide 3: pannello dettaglio */
.fx .row-detail { background: var(--surface-2); border: 1px solid var(--line); border-top: none; }
.fx .row-detail .det-inner { padding: 12px 14px; }
.fx .det-gallery { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.fx .det-thumb { width: 96px; height: 72px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.fx .det-thumb svg { width: 40px; height: 40px; opacity: .5; }
.fx .det-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 2px 18px; }
.fx .det-spec { display: flex; justify-content: space-between; gap: 10px; font-size: 0.82rem; padding: 4px 0; border-bottom: 1px dotted var(--line); }
.fx .det-k { color: var(--text-muted); }
.fx .det-v { font-weight: 600; color: var(--text); text-align: right; }
.fx .det-foot { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fx .det-open { display: inline-flex; align-items: center; font-size: 0.82rem; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); border-radius: var(--r); padding: 6px 14px; background: var(--accent-weak); }
.fx .det-act { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--text); border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r); padding: 6px 12px; }
.fx .det-act.attivo { background: var(--accent-weak); border-color: var(--accent); color: var(--accent); }
.fx .det-act svg, .fx .det-open svg { width: 15px; height: 15px; }

/* Slide 4: matrice confronto */
.fx .cmatrix-panel { border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); overflow: hidden; }
.fx .cmatrix-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface-3); border-bottom: 1px solid var(--line); }
.fx .cmatrix-title { font-weight: 700; font-size: 0.9rem; }
.fx .cmatrix-scroll { overflow-x: auto; }
.fx .cmatrix { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.fx .cmatrix th, .fx .cmatrix td { border-bottom: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.fx .cmatrix thead th { background: var(--surface-2); min-width: 150px; vertical-align: top; }
.fx .cmatrix th.cm-label, .fx .cmatrix td.cm-label { background: var(--surface-3); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); min-width: 110px; white-space: nowrap; }
.fx .cm-coltitle { font-size: 0.82rem; font-weight: 600; line-height: 1.25; max-width: 150px; }
.fx .cmatrix td.cm-val { font-family: var(--num); font-size: 0.85rem; color: var(--text); }
.fx .cmatrix td.cm-best { color: var(--pos); font-weight: 700; background: var(--pos-weak); }

/* Slide 5: salvati + ricerche */
.fx .saved-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.fx .saved-tab { border: 1px solid var(--line); background: var(--surface); color: var(--text-muted); border-radius: var(--r); padding: 6px 14px; font-weight: 700; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 6px; }
.fx .saved-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.fx .saved-tab .cnt { background: rgba(127,127,127,.25); border-radius: 9px; padding: 0 6px; font-size: 0.72rem; }
.fx .salvato-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.fx .salvato-titolo { font-weight: 600; font-size: 0.84rem; color: var(--text); }
.fx .salvato-dettagli { font-family: var(--num); font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }
.fx .ric-card { border: 1px solid var(--line); border-radius: var(--r2); padding: 12px; background: var(--surface); }
.fx .ric-card.has-novita { border-color: var(--accent); }
.fx .ric-title { font-weight: 700; font-size: 0.92rem; display: flex; align-items: center; gap: 6px; }
.fx .ric-badge { background: var(--neg); color: #fff; font-size: 0.72rem; font-weight: 700; border-radius: 10px; padding: 1px 7px; min-width: 18px; text-align: center; font-family: var(--num); }
.fx .ric-sub { font-family: var(--num); font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }
.fx .ric-digest { font-size: 0.78rem; font-weight: 600; color: var(--warn); margin-top: 4px; }
.fx .ric-alerts { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.fx .ric-alert { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: var(--r); background: var(--surface-2); font-size: 0.8rem; }
.fx .ric-motivo { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.fx .ric-nuovo .ric-motivo { background: var(--tag-subito-bg); color: var(--tag-subito-fg); }
.fx .ric-calo .ric-motivo { background: var(--tag-moto-bg); color: var(--tag-moto-fg); }
.fx .ric-alert-prezzo { font-family: var(--num); font-weight: 700; white-space: nowrap; }

/* Slide 6: report PDF/CSV (anteprima finta) */
.fx .rep { border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; background: var(--surface); }
.fx .rep-band { background: #14181f; color: #fff; padding: 12px 14px; }
.fx .rep-band b { font-weight: 800; letter-spacing: -0.01em; }
.fx .rep-band span { display: block; font-size: 0.74rem; opacity: .75; margin-top: 2px; }
.fx .rep-metrics { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.fx .rep-metric .l { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.fx .rep-metric .v { font-family: var(--num); font-weight: 700; font-size: 1rem; }
.fx .rep-rows { font-size: 0.8rem; }
.fx .rep-rows div { display: grid; grid-template-columns: 1fr auto; padding: 6px 14px; border-bottom: 1px solid var(--line); font-family: var(--num); }
.fx .rep-export { display: flex; gap: 8px; margin-top: 12px; }

/* Slide 7: segnala (solo card, NIENTE overlay fixed) */
.fx .report-card { width: 100%; max-width: 440px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r2); box-shadow: var(--shadow); padding: 16px; }
.fx .report-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; margin-bottom: 12px; }
.fx .report-ta { width: 100%; min-height: 96px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text-faint); padding: 9px 11px; font-size: 0.9rem; }
.fx .report-attach { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: 0.82rem; color: var(--text-muted); }
.fx .report-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }
.fx .report-send { background: var(--accent); border: 1px solid var(--accent); color: #fff; border-radius: var(--r); font-weight: 600; font-size: 0.78rem; padding: 5px 14px; }

/* Slide 8: aiuti (dot + tooltip STATICO, non fixed) */
.fx .help-demo { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.fx .help-row { display: inline-flex; align-items: center; gap: 6px; font-size: 0.95rem; color: var(--text); }
.fx .help-dot { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 0.64rem; font-weight: 700; color: var(--text-muted); background: var(--surface); }
.fx .help-tip { position: static; max-width: 280px; background: var(--text); color: var(--bg); padding: 8px 11px; border-radius: var(--r); font-size: 0.76rem; line-height: 1.45; box-shadow: var(--shadow); }

/* Slide 9: dark mode split */
.fx .theme-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fx .theme-pane { border: 1px solid var(--line); border-radius: var(--r2); padding: 12px; }
.fx .theme-pane .pane-lab { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; }

/* Slide 10: WhatsApp */
.fx .wa-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; max-width: 420px; margin: 0 auto; }
.fx .wa-ico { width: 54px; height: 54px; border-radius: 50%; background: var(--pos-weak); color: var(--pos); display: inline-flex; align-items: center; justify-content: center; }
.fx .wa-ico svg { width: 30px; height: 30px; }

/* Toolbar compatta (.fx) per le slide Aiuti/Tema */
.fx .results-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: 8px 11px; }
.fx .tb-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }
.fx .tb-sep { width: 1px; align-self: stretch; min-height: 20px; background: var(--line); }
.fx .tb-count { font-family: var(--num); font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.fx .tb-stat { display: inline-flex; align-items: baseline; gap: 5px; font-size: 0.8rem; }
.fx .tb-stat-label { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.fx .tb-stat b { font-family: var(--num); font-weight: 700; color: var(--text); }
.fx .help-dot.on { border-color: var(--accent); color: var(--accent); background: var(--accent-weak); }

/* Slide Aiuti: help in-context (toolbar + dot + tooltip ancorato) */
.fx .help-ctx { display: flex; flex-direction: column; gap: 16px; }
.fx .hc-active { color: var(--accent); }
.fx .hc-tip { position: relative; align-self: flex-end; max-width: 320px; }
.fx .hc-tip::before { content: ""; position: absolute; top: -5px; right: 28px; width: 10px; height: 10px; background: var(--text); transform: rotate(45deg); }

/* Slide Tema: split ricco */
.fx .ts-bar { padding: 6px 9px; margin-bottom: 8px; }

/* Slide Pronto intervento */
.fx .pronto { display: flex; flex-direction: column; gap: 14px; max-width: 480px; margin: 0 auto; }
.fx .pronto-head { display: flex; align-items: center; gap: 12px; }
.fx .pronto-head h4 { margin: 0; font-size: 1.05rem; }
.fx .pronto-head p { margin: 2px 0 0; color: var(--text-muted); font-size: 0.88rem; }
.fx .pronto-head .wa-ico { width: 42px; height: 42px; flex: none; }
.fx .pronto-head .wa-ico svg { width: 24px; height: 24px; }
.fx .chat { display: flex; flex-direction: column; gap: 8px; }
.fx .bubble { max-width: 82%; padding: 8px 12px; border-radius: 12px; font-size: 0.9rem; line-height: 1.35; }
.fx .bubble-in { align-self: flex-start; background: var(--surface-2); color: var(--text); border-bottom-left-radius: 3px; }
.fx .bubble-out { align-self: flex-end; background: var(--pos-weak); color: var(--text); border-bottom-right-radius: 3px; }
.fx .pronto-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.fx .pronto-chip { font-size: 0.82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-muted); }
.fx .pronto .btn { align-self: flex-start; }
.appwin-body .wa-card .btn { cursor: pointer; }

@media (max-width: 720px) {
  .fx .adv-grid { grid-template-columns: repeat(2, 1fr); }
  .fx .theme-split { grid-template-columns: 1fr; }
}

/* ─── Roadmap: timeline alternata a 2 lati ──────────────────────────────────── */
#roadmap .eyebrow, #roadmap h2 { text-align: center; }
#roadmap .section-intro { text-align: center; margin-left: auto; margin-right: auto; }
#roadmap { padding-bottom: 0; }   /* la linea della timeline arriva fino al footer */
.timeline { list-style: none; margin: 0 auto; padding: 0 0 52px; position: relative; max-width: 820px; }
/* Linea verticale centrale, fino in fondo (tocca il footer). */
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 4px; bottom: 0; width: 2px;
  background: var(--line); transform: translateX(-50%);
}
/* Dot terminale dove la linea incontra il footer. */
.timeline::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 13px; height: 13px; box-sizing: border-box;
  border-radius: 50%; background: var(--accent); border: 2px solid #fff; transform: translate(-50%, 50%); z-index: 1;
}
.tl-item {
  position: relative; width: 50%; box-sizing: border-box;
  padding: 0 34px 28px 0; text-align: right;
}
.tl-item:nth-child(even) { margin-left: 50%; padding: 0 0 28px 34px; text-align: left; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; top: 3px; right: -7px; width: 14px; height: 14px; box-sizing: border-box;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); z-index: 1;
}
.tl-item:nth-child(even) .tl-dot { right: auto; left: -7px; }
.tl-status {
  display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; margin-bottom: 6px;
}
.st-test  { background: var(--pos-weak);    color: var(--pos); }
.st-dev   { background: var(--accent-weak); color: var(--accent); }
.st-study { background: var(--warn-weak);   color: var(--warn); }
.tl-item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.tl-item p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
/* Mobile: collassa a lato singolo (linea a sinistra). */
@media (max-width: 640px) {
  .timeline::before { left: 7px; transform: none; }
  .timeline::after { left: 7px; }
  .tl-item, .tl-item:nth-child(even) {
    width: 100%; margin-left: 0; padding: 0 0 24px 30px; text-align: left;
  }
  .tl-dot, .tl-item:nth-child(even) .tl-dot { left: 0; right: auto; }
}

/* ─── Footer (tutto blu, indipendente dal tema) ───────────────────────────────── */
.footer { background: #1f6feb; color: #fff; font-size: 0.9rem; }
.footer a:focus-visible, .footer-cta-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.footer-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; padding: 34px 0 28px; }
.footer-cta-h { margin: 0; font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 800; letter-spacing: -0.01em; }
.footer-cta-sub { margin: 5px 0 0; font-size: 0.95rem; color: rgba(255, 255, 255, .9); max-width: 52ch; }
.footer-cta-btn { background: #fff; color: #1f6feb; border-color: #fff; }
.footer-cta-btn:hover { filter: brightness(.95); color: #1f6feb; text-decoration: none; }
.footer-main { position: relative; overflow: hidden; border-top: 1px solid rgba(255, 255, 255, .2); }
/* Watermark radar grande in filigrana, dietro le colonne. */
.footer-watermark { position: absolute; right: -36px; top: 50%; transform: translateY(-50%); width: 320px; height: 320px; opacity: 0.07; pointer-events: none; z-index: 0; }
.footer-watermark svg { width: 100%; height: 100%; }
.footer-cols, .footer-legal { position: relative; z-index: 1; }   /* contenuto sopra il watermark */
.footer-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; padding: 34px 0 24px; }
.footer-brand-col .brand { display: inline-flex; align-items: center; gap: 9px; }
.footer-brand-col .brand { gap: 11px; }
.footer-brand-col .brand-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
/* Logo canonico (anelli + antenna): riquadro trasparente → sul footer blu resta
   il radar azzurro #bfdbfe, coerente con navbar/hero. */
.footer .brand-logo rect { fill: transparent; }
.footer-tag { margin: 12px 0 14px; color: rgba(255, 255, 255, .85); font-size: 0.9rem; max-width: 42ch; }
.footer-col-h { margin: 0 0 10px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, .7); }
.footer-col a { display: block; padding: 5px 0; color: rgba(255, 255, 255, .9); font-weight: 600; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-legal { padding: 16px 0 30px; color: rgba(255, 255, 255, .75); font-size: 0.82rem; border-top: 1px solid rgba(255, 255, 255, .2); }
@media (max-width: 700px) {
  .footer-cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-cols { grid-template-columns: 1fr; gap: 22px; }
}
/* Watermark 320px con `right:-36px`: sborda 36px a destra del footer. Su desktop largo
   è filigrana intenzionale (clippata), ma fino a 860px (phone/tablet) bleeda → via. */
@media (max-width: 860px) {
  .footer-watermark { display: none; }
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }   /* copy sopra, wizard sotto */
}
@media (max-width: 720px) {
  /* Link nav collassano: restano CTA + toggle; il footer garantisce i link (fallback a11y). */
  .topnav { display: none; }
}
/* iPhone SE & affini: restringo CTA e gap così logo+nome+CTA+toggle restano su una riga. */
@media (max-width: 430px) {
  .topbar { gap: 8px; padding: 10px 12px; }
  .topbar-cta { padding: 7px 12px; font-size: 0.85rem; }
  .theme-toggle { width: 32px; height: 32px; }
  .brand .brand-name { font-size: 0.9rem; }
}
@media (max-width: 480px) {
  .brand .brand-name { font-size: 0.95rem; }
  /* Lista compatta (244px): altezza riservata coerente, niente sobbalzo. */
  .hd-results { height: 248px; }
  /* Hero demo: riga compatta (le colonne fisse 84/104/80 venivano tagliate dall'.appwin). */
  .hero-demo .result-row { grid-template-columns: 60px minmax(0,1fr) auto !important; gap: 10px; }
  .hero-demo .row-thumb { height: 60px; }
  .hero-demo .row-fonte { display: none; }
  /* Explorer "Espandi i dettagli": riga compatta, niente scroll-x interno. */
  #fxp2 .result-row { grid-template-columns: 84px minmax(0,1fr) auto !important; }
  #fxp2 .row-fonte { display: none; }
}
