/* ══════════════════════════════════════════════════════════════════════════
   « Signal » — the design system of the A/B site.
   Loaded after style.css: its tokens override the legacy ones, and every new
   component reads colours from tokens only (no hex inside component rules).
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens: light ─────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --bg:            #f3f5f9;
  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --surface-3:     #eef2f7;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;
  --text:          #0f172a;
  --text-secondary:#334155;
  --text-muted:    #64748b;
  --accent:        #4f46e5;
  --accent-hover:  #4338ca;
  --accent-wash:   rgba(79, 70, 229, 0.08);
  --primary:       var(--accent);
  --primary-hover: var(--accent-hover);
  --danger:        #dc2626;
  --danger-hover:  #b91c1c;
  --danger-wash:   rgba(220, 38, 38, 0.08);
  --warn:          #b45309;
  --warn-wash:     rgba(245, 158, 11, 0.14);

  /* Direction × confidence ramps (exploratoire → établi). */
  --better-1: #60a5fa; --better-2: #3b82f6; --better-3: #2563eb; --better-4: #1e40af;
  --worse-1:  #fb923c; --worse-2:  #ea580c; --worse-3:  #c2410c; --worse-4:  #7c2d12;
  --flat-1:   #94a3b8; --flat-2:   #64748b; --flat-3:   #475569; --flat-4:   #1e293b;
  --better-wash: rgba(37, 99, 235, 0.10);
  --worse-wash:  rgba(234, 88, 12, 0.10);
  --flat-wash:   rgba(100, 116, 139, 0.07);

  /* Section accents. */
  --lane-a-verifier:   var(--danger);
  --lane-a-decider:    #7c3aed;
  --lane-verdict-clair:#0f766e;
  --lane-en-cours:     var(--accent);
  --lane-brouillons:   #94a3b8;

  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .05);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, .12);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── Tokens: dark (forced by the toggle, or the system setting) ────────── */
:root.dark {
  color-scheme: dark;
  --bg:            #0b1120;
  --surface:       #151e30;
  --surface-2:     #1a2438;
  --surface-3:     #222e45;
  --border:        #2c3a52;
  --border-strong: #3b4a65;
  --text:          #e6ebf3;
  --text-secondary:#cbd5e1;
  --text-muted:    #94a3b8;
  --accent:        #818cf8;
  --accent-hover:  #a5b4fc;
  --accent-wash:   rgba(129, 140, 248, 0.12);
  --danger:        #f87171;
  --danger-hover:  #fca5a5;
  --danger-wash:   rgba(248, 113, 113, 0.12);
  --warn:          #fbbf24;
  --warn-wash:     rgba(251, 191, 36, 0.14);
  --better-1: #2563eb; --better-2: #3b82f6; --better-3: #60a5fa; --better-4: #bfdbfe;
  --worse-1:  #c2410c; --worse-2:  #ea580c; --worse-3:  #fb923c; --worse-4:  #fed7aa;
  --flat-1:   #64748b; --flat-2:   #94a3b8; --flat-3:   #cbd5e1; --flat-4:   #f1f5f9;
  --better-wash: rgba(96, 165, 250, 0.14);
  --worse-wash:  rgba(251, 146, 60, 0.14);
  --flat-wash:   rgba(148, 163, 184, 0.10);
  --lane-a-decider:    #a78bfa;
  --lane-verdict-clair:#2dd4bf;
  --lane-brouillons:   #64748b;
  --shadow:    0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 44px rgba(0, 0, 0, .45);
}

/* ── Base ──────────────────────────────────────────────────────────────── */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
}

a { color: var(--accent); }

.content { max-width: 1240px; padding: 32px 24px 64px; }

h1, h2, h3 { letter-spacing: -0.01em; }

.muted { color: var(--text-muted); }

/* ── Navigation ────────────────────────────────────────────────────────── */
.navbar {
  height: 60px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  gap: 16px;
}
.navbar-brand a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 750;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--better-3), var(--accent));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}
.navbar-menu { align-items: center; gap: 4px; }
.navbar-item { border-radius: 8px; color: var(--text-muted); }
.navbar-item:hover { background: var(--surface-3); color: var(--text); }
.navbar-item.active { background: var(--accent-wash); color: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
button, .btn { border-radius: var(--radius); border-color: var(--border); }
button:hover, .btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn-primary, button.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover, button.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--surface); }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger-soft { background: var(--danger-wash); border-color: transparent; color: var(--danger); }
.btn-danger-soft:hover { background: var(--danger); color: #fff; }

/* ── Page header ───────────────────────────────────────────────────────── */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-head h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 760; }
.page-head .page-sub { color: var(--text-muted); margin-top: 2px; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Segmented control (Cartes | Tableau, Simple | Détail). */
.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
}
.segmented a, .segmented button {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}
.segmented .on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ── Confidence badge ──────────────────────────────────────────────────── */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  white-space: nowrap;
  cursor: help;
  --tier-ink: var(--flat-4);
}
.tier-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.tier-bars i { display: block; width: 3px; border-radius: 1px; background: var(--border-strong); }
.tier-bars i:nth-child(1) { height: 4px; }
.tier-bars i:nth-child(2) { height: 6px; }
.tier-bars i:nth-child(3) { height: 8px; }
.tier-bars i:nth-child(4) { height: 11px; }
.tier-bars i.on { background: var(--tier-ink); }
.tier-badge.tier-etabli       { --tier-ink: var(--flat-4); background: color-mix(in srgb, var(--flat-4) 12%, var(--surface)); }
.tier-badge.tier-probable     { --tier-ink: var(--flat-3); }
.tier-badge.tier-tendance     { --tier-ink: var(--flat-2); }
.tier-badge.tier-exploratoire { background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-secondary); }
.tier-badge.tier-trop-tot     { background: transparent; border: 1px dashed var(--border-strong); color: var(--text-muted); }
.alert-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--danger-wash); color: var(--danger);
  font-size: 0.7rem; font-weight: 750; letter-spacing: 0.07em;
}
.muted-badge {
  display: inline-flex; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--text-muted);
  font-size: 0.7rem; font-weight: 650;
}

/* ── Marks: direction × tier ───────────────────────────────────────────── */
.dir-better.tier-exploratoire { --mark: var(--better-1); }
.dir-better.tier-tendance     { --mark: var(--better-2); }
.dir-better.tier-probable     { --mark: var(--better-3); }
.dir-better.tier-etabli       { --mark: var(--better-4); }
.dir-worse.tier-exploratoire  { --mark: var(--worse-1); }
.dir-worse.tier-tendance      { --mark: var(--worse-2); }
.dir-worse.tier-probable      { --mark: var(--worse-3); }
.dir-worse.tier-etabli        { --mark: var(--worse-4); }
.dir-flat.tier-exploratoire   { --mark: var(--flat-1); }
.dir-flat.tier-tendance       { --mark: var(--flat-2); }
.dir-flat.tier-probable       { --mark: var(--flat-3); }
.dir-flat.tier-etabli         { --mark: var(--flat-4); }
.tier-trop-tot, .tier-none    { --mark: var(--flat-1); }

/* ── Ruler & funnel (SVG) ──────────────────────────────────────────────── */
.ruler-svg, .funnel-svg, .ring-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ruler-mini { max-width: 260px; }
.rl-zone-worse  { fill: var(--worse-wash); }
.rl-zone-flat   { fill: var(--flat-wash); }
.rl-zone-better { fill: var(--better-wash); }
.rl-line  { stroke: var(--border-strong); stroke-width: 1; }
.rl-zero  { stroke: var(--text-muted); }
.rl-caption { fill: var(--text-muted); font-size: 12px; font-weight: 600; }
.rl-tick  { fill: var(--text-muted); font-size: 12px; }
.rl-edge  { opacity: 0.7; }
.rl-value { fill: var(--text); font-size: 13px; font-weight: 700; }
.rl-bar   { fill: var(--mark, var(--flat-2)); }
.tier-trop-tot .rl-bar { fill: none; stroke: var(--flat-1); stroke-width: 1.5; stroke-dasharray: 4 3; }
.rl-chevron { fill: none; stroke: var(--mark, var(--flat-2)); stroke-width: 2; stroke-linecap: round; }
.rl-est   { fill: var(--surface); stroke: var(--mark, var(--flat-2)); stroke-width: 3; }
.rl-est:not(.rl-est-ring) { fill: var(--mark, var(--flat-2)); stroke: var(--surface); stroke-width: 2.5; }
.rl-bound { stroke: var(--surface); stroke-width: 3; }
.fn-band   { fill: var(--mark, var(--flat-2)); opacity: 0.18; }
.fn-edge   { fill: none; stroke: var(--mark, var(--flat-2)); stroke-width: 2; stroke-linejoin: round; }
.fn-dot    { fill: var(--mark, var(--flat-2)); stroke: var(--surface); stroke-width: 2; }
.fn-marker { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.fn-marker-label { fill: var(--text-muted); font-size: 11px; }
.fn-hover  { fill: transparent; }
.fn-hover:hover { fill: var(--accent-wash); }
.ring-track { fill: none; stroke: var(--surface-3); stroke-width: 6; }
.ring-fill  { fill: none; stroke: var(--mark, var(--accent)); stroke-width: 6; stroke-linecap: round; }
.ring-label { fill: var(--text); font-size: 13px; font-weight: 750; }

/* ── Dashboard: lanes of cards ─────────────────────────────────────────── */
.lane { margin-top: 28px; }
.lane > summary, .lane-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-secondary); margin-bottom: 12px; cursor: default; list-style: none;
}
.lane > summary { cursor: pointer; }
.lane > summary::-webkit-details-marker { display: none; }
.lane-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--surface-3); color: var(--text-secondary); font-size: 0.72rem;
}
.lane-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lane-color); }
.lane-a-verifier   { --lane-color: var(--lane-a-verifier); }
.lane-a-decider    { --lane-color: var(--lane-a-decider); }
.lane-verdict-clair{ --lane-color: var(--lane-verdict-clair); }
.lane-en-cours     { --lane-color: var(--lane-en-cours); }
.lane-brouillons   { --lane-color: var(--lane-brouillons); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.test-card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
}
.test-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--lane-color);
}
.test-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-game {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted);
}
.card-title { font-size: 1.02rem; font-weight: 720; line-height: 1.3; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card-headline { font-size: 0.9rem; line-height: 1.45; color: var(--text-secondary); }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-muted);
}
.card-foot .ring-svg { width: 44px; height: 44px; }
.card-actions { position: relative; z-index: 1; display: flex; gap: 6px; }
.family-pills { display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 1; }
.family-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-secondary);
  text-decoration: none;
}
.family-pill .pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mark, var(--flat-1)); }
.card-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.card-family { margin-top: -6px; font-size: 0.78rem; color: var(--text-muted); }
.card-guidance {
  padding: 8px 10px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--lane-color) 8%, var(--surface));
  font-size: 0.85rem; font-weight: 600; line-height: 1.4; color: var(--text);
}
.card-leads { font-size: 0.78rem; color: var(--text-muted); }
.card-timing { display: flex; align-items: center; gap: 10px; }
.card-ring { flex: none; }
.card-day { font-weight: 750; color: var(--text-secondary); }
.test-table .conclusion-cell .tier-badge { vertical-align: middle; }

/* Cards | Tableau: both views are rendered, one shows. */
.dashboard[data-view="table"] .view-cards,
.dashboard:not([data-view="table"]) .view-table { display: none; }
.view-cards > .card-grid { margin-top: 16px; }

.empty-state {
  padding: 56px 24px; text-align: center; color: var(--text-muted);
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
}

/* ── Overview: slides ──────────────────────────────────────────────────── */
html.has-slides { scroll-snap-type: y proximity; }
.overview { display: flex; flex-direction: column; gap: 24px; }
.slide {
  position: relative;
  min-height: min(76vh, 760px);
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  padding: clamp(28px, 5vw, 64px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  scroll-margin-top: 80px;
}
.slide-kicker {
  font-size: 0.78rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
}
.slide h2.slide-title { font-size: clamp(1.4rem, 2.6vw, 2.2rem); font-weight: 760; }
.slide-verdict { background: linear-gradient(160deg, color-mix(in srgb, var(--mark, var(--flat-2)) 9%, var(--surface)) 0%, var(--surface) 60%); }
.verdict-text {
  font-size: clamp(1.7rem, 3.6vw, 3.3rem);
  line-height: 1.15;
  font-weight: 780;
  letter-spacing: -0.02em;
  max-width: 24ch;
}
.verdict-caveat { color: var(--text-muted); font-size: 0.95rem; max-width: 70ch; }
.verdict-facts { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact-value { font-size: clamp(1.3rem, 2vw, 1.8rem); font-weight: 760; }
.fact-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.slide .ring-svg { width: 88px; height: 88px; }
.slide-ruler { max-width: 900px; }
.slide-funnel { max-width: 900px; }
.variant-block { display: flex; flex-direction: column; gap: 10px; }
.variant-block + .variant-block { padding-top: 18px; border-top: 1px solid var(--border); }
.variant-name { font-weight: 720; }
.slide-nav {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px; z-index: 50;
}
.slide-nav a {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-strong); transition: transform .15s, background .15s;
}
.slide-nav a.on { background: var(--accent); transform: scale(1.35); }

.findings { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.finding {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px; border-radius: var(--radius-lg);
  background: var(--surface-2); border: 1px solid var(--border);
}
.finding-title { font-weight: 720; }
.finding-text { color: var(--text-secondary); font-size: 0.92rem; }
.finding-note { color: var(--text-muted); font-size: 0.8rem; }
.finding.alert-finding { background: var(--danger-wash); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
/* Leads: one per line, the sentence beside its interval. */
.leads { display: flex; flex-direction: column; gap: 14px; }
.lead {
  display: grid; grid-template-columns: minmax(220px, 2fr) minmax(0, 3fr);
  gap: 8px 28px; align-items: center;
}
.lead-text { display: flex; flex-direction: column; gap: 8px; }
.lead-chart { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lead-chart .slide-ruler { max-width: 600px; }
.lead-rows { display: flex; flex-direction: column; gap: 6px; }
.lead-siblings { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--border); }
.lead-row {
  display: grid; grid-template-columns: minmax(160px, 1fr) 240px minmax(0, 1fr);
  gap: 14px; align-items: center; font-size: 0.86rem; color: var(--text-secondary);
}
.lead-row-name { font-weight: 650; color: var(--text); }
.lead-row-ruler { display: block; width: 240px; }
.lead-row-p { color: var(--text-muted); }
.lead-more > summary, .isolated > summary {
  cursor: pointer; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px;
}
.isolated .lead-rows { padding: 12px 16px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--border); }
.rl-zone-side { fill: color-mix(in srgb, var(--flat-2) 10%, transparent); }
@media (max-width: 768px) {
  .lead { grid-template-columns: 1fr; }
  .lead-row { grid-template-columns: 1fr; gap: 4px; }
}

.noise-line { color: var(--text-muted); font-size: 0.9rem; max-width: 80ch; }
.guidance-text { font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.4; font-weight: 600; max-width: 46ch; }
.guidance-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.guidance-actions form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.guidance-actions input[name="reason"], .actions input[name="reason"] {
  min-width: 240px; padding: 8px 12px; font: inherit; font-size: 0.9rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
}

.view-switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.crumb { color: var(--text-muted); font-size: 0.85rem; }
.crumb a { color: var(--text-muted); }

.page-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.state-chip {
  display: inline-flex; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--text-secondary);
  font-size: 0.75rem; font-weight: 650;
}
.state-chip.chip-alarmed { background: var(--danger-wash); color: var(--danger); }
.variant-sentence { font-size: 1.05rem; color: var(--text-secondary); max-width: 70ch; }
.ruler-caption { color: var(--text-muted); font-size: 0.9rem; }
.fact-ring { flex-direction: row; align-items: center; gap: 12px; }
.funnel-values { font-size: 0.85rem; color: var(--text-secondary); }
.funnel-values summary { cursor: pointer; color: var(--text-muted); }
.funnel-values table { margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.funnel-values th, .funnel-values td { padding: 4px 14px 4px 0; text-align: left; border-bottom: 1px solid var(--border); }
.family-pill.current { border-color: var(--mark, var(--border-strong)); color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.finding-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.finding-dir { font-size: 1.1rem; color: var(--flat-3); }
.finding-list { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; }
.finding.muted-finding { background: var(--surface-3); }
.tier-inline { margin-left: auto; }
.guidance-more a { color: var(--text-muted); }
.view-switch h1 { margin: 0; }

.brand-text { white-space: nowrap; }

/* ── Detailed view ─────────────────────────────────────────────────────── */
input, select, textarea { background: var(--surface); color: var(--text); border-color: var(--border); }
.verdict-panel {
  display: flex; flex-direction: column; gap: 12px;
  margin: 18px 0 8px; padding: 22px 24px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--mark, var(--flat-2)) 8%, var(--surface)) 0%, var(--surface) 70%);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.verdict-panel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.verdict-panel-text { font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.35; font-weight: 700; max-width: 60ch; }
.verdict-panel-guidance { font-weight: 600; color: var(--text-secondary); max-width: 70ch; }
.verdict-stats { display: flex; flex-direction: column; gap: 6px; }
.verdict-pairs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.leads-panel { margin: 18px 0; display: flex; flex-direction: column; gap: 12px; }
.leads-panel h2 { font-size: 1.1rem; }
.kpi-ruler { display: inline-block; width: 150px; vertical-align: middle; }
.kpi-ruler .ruler-svg { width: 150px; }
.kpi-list-name .tier-badge { margin-left: 6px; font-size: 0.62rem; padding: 1px 7px 1px 6px; }
.cc-svg { font-family: var(--font); }
.cc-grid  { stroke: var(--border); stroke-width: 1; }
.cc-axis  { stroke: var(--border-strong); stroke-width: 1; }
.cc-tick  { fill: var(--text-muted); font-size: 10px; }
.cc-label { fill: var(--text-secondary); font-size: 11px; }
.cc-dot   { stroke: var(--surface); stroke-width: 1; }
.cc-bar-a { fill: color-mix(in srgb, var(--worse-3) 50%, transparent); }
.cc-bar-b { fill: color-mix(in srgb, var(--better-3) 50%, transparent); }
.cc-legend { fill: var(--surface); fill-opacity: 0.9; stroke: var(--border); }
.power-warning { color: var(--danger); font-weight: 600; }
@media (max-width: 768px) {
  .kpi-ruler { display: none; }
}

.help-tiers { display: grid; grid-template-columns: max-content 1fr; gap: 10px 14px; align-items: center; margin: 8px 0 16px; }
.help-tiers dd { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }
.leads-explainer { margin: 4px 14px 8px; }
.help-computations { margin-top: 14px; color: var(--text-secondary); font-size: 0.88rem; }
.help-computations summary { cursor: pointer; font-weight: 650; color: var(--text); }
@media (max-width: 480px) { .help-tiers { grid-template-columns: 1fr; } }

/* ── Motion ────────────────────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.slide, .test-card { animation: rise .45s ease both; }
@media (prefers-reduced-motion: reduce) {
  .slide, .test-card { animation: none; }
  .test-card:hover { transform: none; }
  html.has-slides { scroll-snap-type: none; }
}

/* ── Small screens ─────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .slide-nav { display: none; }
}
@media (max-width: 768px) {
  .content { padding: 20px 14px 48px; }
  .navbar { padding: 0 12px; }
  .navbar-menu { overflow-x: auto; scrollbar-width: none; }
  .navbar-item { padding: 6px 10px; white-space: nowrap; }
  .slide { min-height: auto; border-radius: 18px; }
  .config-section dl { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}
@media (max-width: 600px) {
  /* A ruler shrinks to the screen and keeps its shape (zones, lines, bar);
     its labels would be unreadable at that scale, and the sentence under it
     gives the figures. */
  .slide-ruler text { display: none; }
  /* The funnel keeps a readable size and scrolls; overview.js opens it on the
     most recent days, at the right. */
  .slide-funnel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .slide-funnel .funnel-svg { min-width: 560px; }
}
@media (max-width: 480px) {
  .brand-text { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .verdict-facts { gap: 16px; }
}
