/* ============================================================
   HOMEPAGE — Page-specific styles
   Foundation (body, type, nav, brand, buttons, footer, theme
   toggle, variant pill) lives in aivz-shared.css.
   This file contains ONLY:
   - Hero section (.hero with scanline + grid backdrop)
   - Right-rail diagnostic card (.demo-card, .gauge, .layers, .firehose)
   - Section-specific layouts (.three-beat, .companion, .platforms,
     .personas, .category, .authority, .final-cta overrides)
   - Light-mode overrides for all of the above
   ============================================================ */

  /* ===== HERO ===== */
  .hero {
    position: relative;
    background: var(--dark-base);
    padding: 88px 0 96px;
    overflow: hidden;
    border-bottom: 1px solid var(--dark-border);
  }
  /* grid backdrop */
  .hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
      linear-gradient(rgba(99,102,241,0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(99,102,241,0.06) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
    opacity: 0.7;
  }
  /* scanline sweep */
  .hero::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: linear-gradient(90deg, transparent, rgba(34,197,94,0.55), transparent);
    animation: scanline 6s linear infinite;
    box-shadow: 0 0 20px rgba(34,197,94,0.35);
    pointer-events: none;
  }
  @keyframes scanline {
    0% { transform: translateY(0); opacity: 0; }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% { transform: translateY(820px); opacity: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero::after { animation: none; opacity: 0; }
  }

  .hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 56px;
    align-items: center;
  }
  @media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  }

  .hero-copy { display: flex; flex-direction: column; gap: 24px; }
  .hero-h1-mark {
    display: inline-block;
    background: linear-gradient(180deg, #F8FAFC, #C7D2FE 60%, #A5B4FC);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }

  /* Scan widget */
  .scan-widget {
    margin-top: 8px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 24px 60px -20px rgba(0,0,0,0.55), 0 0 0 1px rgba(99,102,241,0.05) inset;
  }
  .scan-label {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-heading); font-size: 11px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint);
    margin-bottom: 12px;
  }
  .scan-label .live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-neon);
    box-shadow: 0 0 0 4px rgba(34,197,94,0.15);
    animation: pulse 1.6s ease-in-out infinite;
  }
  @keyframes pulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.15); }
    50% { box-shadow: 0 0 0 8px rgba(34,197,94,0.0); }
  }
  @media (prefers-reduced-motion: reduce) { .scan-label .live-dot { animation: none; } }

  .scan-row {
    display: grid; grid-template-columns: 1fr auto; gap: 12px;
  }
  @media (max-width: 560px) { .scan-row { grid-template-columns: 1fr; } }
  .scan-input {
    height: 56px;
    background: var(--dark-base-deep);
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    color: var(--text-strong);
    padding: 0 18px;
    font-family: var(--font-mono);
    font-size: 16px;
    letter-spacing: 0.01em;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
  }
  .scan-input::placeholder { color: var(--text-faint); }
  .scan-input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.18);
  }
  .scan-submit {
    height: 56px; padding: 0 26px;
    /* brand-600 (not brand-500) so white text passes WCAG AA. brand-500
       stays the brand identity color used on logos / accents elsewhere. */
    background: var(--brand-600); color: white;
    border: none; border-radius: 10px;
    font-weight: 700; font-size: 15px;
    cursor: pointer; transition: background .15s;
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-sans);
  }
  .scan-submit:hover { background: var(--brand-700); }
  .scan-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 14px; font-size: 12px; color: var(--text-faint);
  }
  .scan-meta .dots {
    display: inline-flex; gap: 8px; align-items: center;
  }
  .scan-meta .pip {
    display: inline-flex; align-items: center; gap: 6px;
  }
  .scan-meta .pip::before {
    content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--slate-500);
  }
  .scan-secondary {
    margin-top: 14px; font-size: 14px; color: var(--brand-300);
    display: inline-flex; align-items: center; gap: 6px; font-weight: 500;
  }
  .scan-secondary:hover { color: var(--brand-200); }

  /* Right-rail demo: ScoreGauge + firehose lines */
  .demo-card {
    position: relative;
    background:
      radial-gradient(180px 180px at 50% 30%, rgba(99,102,241,0.18), transparent 70%),
      var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 20px;
    padding: 28px;
    overflow: hidden;
  }
  .demo-card::after {
    content: ""; position: absolute; inset: 0;
    background:
      repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.0) 0,
        rgba(255,255,255,0.0) 3px,
        rgba(255,255,255,0.018) 3px,
        rgba(255,255,255,0.018) 4px
      );
    pointer-events: none;
    border-radius: 20px;
  }
  .demo-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
  }
  .demo-head .id {
    font-family: var(--font-mono); font-size: 11px;
    color: var(--text-faint); letter-spacing: 0.05em;
  }
  .demo-head .live {
    font-family: var(--font-heading); font-size: 10px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent-neon); display: inline-flex; align-items: center; gap: 6px;
  }
  .demo-head .live::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-neon);
  }

  .gauge-wrap { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
  .gauge { position: relative; width: 200px; height: 200px; }
  .gauge svg { transform: rotate(-90deg); }
  .gauge-num {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
  }
  .gauge-num .n {
    font-family: var(--font-sans); font-weight: 800; font-size: 64px;
    line-height: 1; letter-spacing: -0.04em; color: var(--text-strong);
    font-variant-numeric: tabular-nums;
  }
  .gauge-num .lbl {
    font-family: var(--font-heading); font-size: 10px; font-weight: 700;
    letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-blue);
    margin-top: 4px;
  }

  .layers { display: flex; flex-direction: column; gap: 12px; }
  .layer-row {
    display: grid; grid-template-columns: 80px 1fr 36px; gap: 10px; align-items: center;
  }
  .layer-row .lname {
    font-family: var(--font-heading); font-size: 10px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted);
  }
  .layer-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.04); overflow: hidden; }
  .layer-bar .fill { height: 100%; border-radius: 999px; }
  .layer-row .ln { font-family: var(--font-mono); font-size: 13px; color: var(--text-strong); text-align: right; font-weight: 700; }

  /* Citation Core 11 mini status block (hero) */
  .cc11-mini { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--dark-border); }
  .cc11-mini-h { font-family: var(--font-heading); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-faint); }
  .cc11-mini-row { display: flex; gap: 5px; margin-top: 8px; }
  .cc11-dot { width: 14px; height: 14px; border-radius: 3px; }
  .cc11-dot.ok { background: var(--signal-green); }
  .cc11-dot.warn { background: var(--signal-yellow); }
  .cc11-dot.bad { background: var(--signal-red); }

  .firehose {
    margin-top: 22px;
    border-top: 1px solid var(--dark-border);
    padding-top: 16px;
    display: flex; flex-direction: column; gap: 8px;
    font-family: var(--font-mono); font-size: 12px; color: var(--text-faint);
  }
  .fh { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; }
  .fh .t { color: var(--slate-600); }
  .fh .ok { color: var(--accent-neon); }
  .fh .warn { color: var(--signal-yellow); }

  /* ===== SECTION SHELL ===== */
  section.block { padding: 96px 0; border-bottom: 1px solid var(--dark-border); }
  section.block.tight { padding: 72px 0; }
  .section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; max-width: 760px; }
  .section-head .ml { color: var(--text-muted); font-size: 17px; line-height: 1.55; max-width: 640px; }

  /* ===== THREE BEAT ===== */
  .three-beat {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  }
  @media (max-width: 900px) { .three-beat { grid-template-columns: 1fr; } }
  .beat-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 28px;
    position: relative; overflow: hidden;
    transition: border-color .15s, transform .15s;
  }
  .beat-card:hover { border-color: var(--brand-700); transform: translateY(-2px); }
  .beat-card .step {
    position: absolute; top: 22px; right: 24px;
    font-family: var(--font-mono); font-size: 11px; color: var(--slate-400);
  }
  .beat-card .ic {
    width: 44px; height: 44px; border-radius: 10px;
    background: rgba(99,102,241,0.12);
    color: var(--brand-300);
    display: grid; place-items: center;
    margin-bottom: 18px;
  }
  .beat-card h3 {
    font-family: var(--font-heading); font-weight: 700; font-size: 22px;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-strong);
    margin: 0 0 10px;
  }
  .beat-card p { font-size: 15px; color: var(--text-muted); margin: 0 0 18px; line-height: 1.55; }
  .beat-card .lk {
    color: var(--brand-300); font-size: 14px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
  }
  .beat-card .lk:hover { color: var(--brand-200); }

  /* ===== STAT BAND ===== */
  .stat-band {
    display: grid; grid-template-columns: repeat(5, 1fr);
    border: 1px solid var(--dark-border); border-radius: 16px;
    background: linear-gradient(180deg, rgba(99,102,241,0.06), rgba(2,6,23,0.0));
    overflow: hidden;
  }
  @media (max-width: 768px) { .stat-band { grid-template-columns: repeat(2, 1fr); } }
  .stat-cell {
    padding: 32px 24px;
    border-right: 1px solid var(--dark-border);
    display: flex; flex-direction: column; gap: 8px;
    text-align: center;
  }
  .stat-cell:last-child { border-right: none; }
  @media (max-width: 768px) { .stat-cell { border-right: none; border-bottom: 1px solid var(--dark-border); } }
  .stat-cell .num {
    font-family: var(--font-heading); font-weight: 700; font-size: 56px;
    line-height: 1; letter-spacing: -0.01em; color: var(--brand-400);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 24px rgba(129, 140, 248, 0.35);
  }
  .stat-cell .lab {
    font-family: var(--font-heading); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-muted);
  }

  /* ===== COMPANION (4) ===== */
  .companion {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 20px;
    padding: 48px;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center;
  }
  @media (max-width: 900px) { .companion { grid-template-columns: 1fr; padding: 32px; } }
  .pct-bars { display: flex; flex-direction: column; gap: 14px; }
  .pct-row {
    display: grid; grid-template-columns: 110px 1fr 90px; gap: 12px; align-items: center;
  }
  .pct-row .pname {
    font-family: var(--font-heading); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-body);
  }
  .pct-bar { height: 12px; background: rgba(255,255,255,0.04); border-radius: 999px; position: relative; overflow: hidden; }
  .pct-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 999px; background: var(--brand-500); }
  .pct-fill.alt { background: var(--accent-blue); }
  .pct-val { font-family: var(--font-mono); font-size: 13px; color: var(--text-strong); text-align: right; font-weight: 700; }
  .pct-legend { display: flex; gap: 20px; margin-top: 14px; font-size: 12px; color: var(--text-faint); }
  .pct-legend .lg { display: inline-flex; align-items: center; gap: 8px; }
  .pct-legend .sw { width: 10px; height: 10px; border-radius: 3px; }

  /* ===== PLATFORMS (5) ===== */
  .platforms {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  }
  @media (max-width: 1024px) { .platforms { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 560px) { .platforms { grid-template-columns: 1fr; } }
  .pf {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 14px;
    padding: 22px;
    display: flex; flex-direction: column; gap: 14px;
    transition: border-color .15s;
  }
  .pf:hover { border-color: var(--brand-700); }
  .pf .pf-top { display: flex; align-items: center; justify-content: space-between; }
  .pf .pf-name {
    font-family: var(--font-heading); font-size: 14px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-strong);
  }
  .pf .pf-sub { font-size: 13px; color: var(--text-faint); line-height: 1.45; }
  .badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-family: var(--font-heading); font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.14em;
  }
  .badge.live { background: rgba(16,185,129,0.12); color: var(--signal-green); }
  .badge.beta { background: rgba(245,158,11,0.12); color: var(--signal-yellow); }
  .badge.road { background: rgba(148,163,184,0.10); color: var(--text-muted); }
  .badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

  .pf-extras { background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: 14px; padding: 22px; }
  .pf-extras .et { font-family: var(--font-heading); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
  .pf-extras .ed { color: var(--text-body); font-size: 14px; line-height: 1.55; }

  /* ===== PERSONAS (6) ===== */
  .personas {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
  }
  @media (max-width: 768px) { .personas { grid-template-columns: 1fr; } }
  .persona {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 28px;
    transition: border-color .15s, transform .15s;
  }
  .persona:hover { border-color: var(--brand-700); transform: translateY(-2px); }
  .persona.primary { border-color: var(--brand-700); background: linear-gradient(180deg, rgba(99,102,241,0.06), var(--dark-card)); }
  .persona .tag {
    font-family: var(--font-heading); font-size: 10px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase; color: var(--brand-300);
    margin-bottom: 12px;
  }
  .persona .tag.pri { color: var(--accent-neon); }
  .persona h3 {
    font-family: var(--font-heading); font-size: 22px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-strong);
    margin: 0 0 14px; line-height: 1.15;
  }
  .persona .quote { font-style: italic; color: var(--text-strong); }
  .persona p { color: var(--text-muted); font-size: 15px; line-height: 1.55; margin: 0 0 18px; }
  .persona .lk { color: var(--brand-300); font-size: 14px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }

  /* ===== CATEGORY (7) ===== */
  .category {
    display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  }
  @media (max-width: 900px) { .category { grid-template-columns: 1fr; } }
  .verbs {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  }
  .verb {
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 18px 14px;
    text-align: center;
    background: var(--dark-card);
  }
  .verb .v {
    font-family: var(--font-heading); font-size: 14px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-strong);
  }
  .verb .vi { color: var(--brand-400); margin-bottom: 8px; }
  @media (max-width: 768px) { .verbs { grid-template-columns: repeat(2, 1fr); } }

  /* ===== AUTHORITY GRAPH (8) ===== */
  .authority {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
    background: var(--dark-card); border: 1px solid var(--dark-border);
    border-radius: 20px; padding: 40px;
  }
  @media (max-width: 768px) { .authority { grid-template-columns: 1fr; padding: 28px; } }
  .auth-col h3 {
    font-family: var(--font-heading); font-size: 22px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-strong);
    margin: 0 0 10px;
  }
  .auth-col .pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px;
    font-family: var(--font-heading); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.16em;
    background: rgba(99,102,241,0.12); color: var(--brand-300);
    margin-bottom: 16px;
  }
  .auth-col p { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin: 0 0 18px; }
  .auth-col .vsep {
    width: 1px; background: var(--dark-border);
  }

  /* ===== FINAL CTA (9) ===== */
  .final-cta {
    text-align: center;
    background:
      radial-gradient(800px 320px at 50% 0%, rgba(99,102,241,0.18), transparent 70%),
      var(--dark-base);
    padding: 120px 0;
    border-bottom: 1px solid var(--dark-border);
  }
  .final-cta .display-h2 { max-width: 760px; margin: 0 auto 16px; }
  .final-cta .lede { margin: 0 auto 36px; }
  .final-cta .scan-widget { max-width: 640px; margin: 0 auto; text-align: left; }
  .final-cta .micro { font-size: 13px; color: var(--text-faint); margin-top: 18px; }


  /* ============================================================
     LIGHT MODE OVERRIDES
     The hero diagnostic card (.demo-card) intentionally stays
     dark — it reads as an embedded instrument surface against
     either page background.
     ============================================================ */
  [data-theme="light"] body { background: var(--background); color: var(--slate-700); }

  /* TOPNAV */
  [data-theme="light"] .topnav { background: rgba(248,250,252,0.85); border-bottom-color: var(--slate-200); }
  [data-theme="light"] .brand-word { color: var(--slate-900); }
  [data-theme="light"] .nav-links a { color: var(--slate-700); }
  [data-theme="light"] .nav-links a:hover { color: var(--slate-900); }
  [data-theme="light"] .btn-outline-dark { color: var(--slate-900); border-color: var(--text-body); background: white; }
  [data-theme="light"] .btn-outline-dark:hover { border-color: var(--slate-900); background: var(--slate-50); }
  [data-theme="light"] .btn-ghost-dark { color: var(--slate-700); }
  [data-theme="light"] .btn-ghost-dark:hover { color: var(--slate-900); }
  [data-theme="light"] .theme-toggle { color: var(--slate-700); border-color: var(--text-body); background: white; }
  [data-theme="light"] .theme-toggle:hover { color: var(--slate-900); border-color: var(--text-faint); background: var(--slate-50); }
  [data-theme="light"] .theme-toggle .ic-sun { display: block; }
  [data-theme="light"] .theme-toggle .ic-moon { display: none; }

  /* HERO */
  [data-theme="light"] .hero { background: var(--background); border-bottom-color: var(--slate-200); }
  [data-theme="light"] .hero::before {
    background-image:
      linear-gradient(rgba(99,102,241,0.10) 1px, transparent 1px),
      linear-gradient(90deg, rgba(99,102,241,0.10) 1px, transparent 1px);
  }
  [data-theme="light"] .hero::after {
    background: linear-gradient(90deg, transparent, rgba(34,197,94,0.45), transparent);
    box-shadow: 0 0 18px rgba(34,197,94,0.25);
  }
  [data-theme="light"] .display-h1 { color: var(--slate-900); }
  [data-theme="light"] .display-h2 { color: var(--slate-900); }
  [data-theme="light"] .lede { color: var(--slate-600); }
  [data-theme="light"] .body-md { color: var(--slate-700); }
  [data-theme="light"] .eyebrow { color: var(--brand-700); }
  [data-theme="light"] .eyebrow-muted { color: var(--text-faint); }
  [data-theme="light"] .hero-h1-mark {
    background: linear-gradient(180deg, var(--slate-900), var(--brand-600) 60%, var(--brand-700));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }

  /* SCAN WIDGET */
  [data-theme="light"] .scan-widget {
    background: white;
    border-color: var(--slate-200);
    box-shadow: 0 24px 60px -20px rgba(15,23,42,0.12);
  }
  [data-theme="light"] .scan-label { color: var(--text-faint); }
  [data-theme="light"] .scan-input {
    background: var(--slate-50);
    border-color: var(--slate-200);
    color: var(--slate-900);
  }
  [data-theme="light"] .scan-input::placeholder { color: var(--text-muted); }
  [data-theme="light"] .scan-input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.18);
  }
  [data-theme="light"] .scan-meta { color: var(--text-faint); }
  [data-theme="light"] .scan-meta .pip::before { background: var(--slate-400); }
  [data-theme="light"] .scan-secondary { color: var(--brand-700); }
  [data-theme="light"] .scan-secondary:hover { color: var(--brand-600); }

  /* DEMO / DIAGNOSTIC CARD (right rail of hero) */
  [data-theme="light"] .demo-card {
    background:
      radial-gradient(220px 220px at 50% 28%, rgba(99,102,241,0.14), transparent 70%),
      white;
    border-color: var(--slate-200);
    box-shadow: 0 24px 60px -20px rgba(15,23,42,0.12);
  }
  [data-theme="light"] .demo-card::after {
    background:
      repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,0.0) 0,
        rgba(0,0,0,0.0) 3px,
        rgba(15,23,42,0.025) 3px,
        rgba(15,23,42,0.025) 4px
      );
  }
  [data-theme="light"] .demo-head .id { color: var(--text-faint); }
  /* Gauge: invert track + number */
  [data-theme="light"] .gauge svg circle:first-of-type { stroke: var(--slate-200); }
  [data-theme="light"] .gauge-num .n { color: var(--slate-900); }
  /* Layers */
  [data-theme="light"] .layer-row .lname { color: var(--text-faint); }
  [data-theme="light"] .layer-bar { background: var(--slate-100); }
  [data-theme="light"] .layer-row .ln { color: var(--slate-900); }
  /* Citation Core 11 mini block */
  [data-theme="light"] .demo-card div[style*="border-top"] { border-top-color: var(--slate-200) !important; }
  [data-theme="light"] .demo-card div[style*="color:var(--text-faint)"] { color: var(--text-faint) !important; }
  /* Firehose log */
  [data-theme="light"] .firehose {
    border-top-color: var(--slate-200);
    color: var(--slate-600);
  }
  [data-theme="light"] .fh .t { color: var(--text-muted); }
  [data-theme="light"] .fh .ok { color: #047857; }
  [data-theme="light"] .fh .warn { color: #B45309; }

  /* SECTIONS */
  [data-theme="light"] section.block { border-bottom-color: var(--slate-200); }
  [data-theme="light"] .section-head .ml { color: var(--slate-700); }

  /* THREE BEAT */
  [data-theme="light"] .beat-card { background: white; border-color: var(--slate-200); }
  [data-theme="light"] .beat-card:hover { border-color: var(--brand-500); }
  [data-theme="light"] .beat-card .step { color: var(--text-muted); }
  [data-theme="light"] .beat-card .ic { background: var(--brand-50); color: var(--brand-700); }
  [data-theme="light"] .beat-card h3 { color: var(--slate-900); }
  [data-theme="light"] .beat-card p { color: var(--slate-700); }
  [data-theme="light"] .beat-card .lk { color: var(--brand-700); }
  [data-theme="light"] .beat-card .lk:hover { color: var(--brand-600); }

  /* STAT BAND */
  [data-theme="light"] .stat-band {
    background: linear-gradient(180deg, rgba(99,102,241,0.05), rgba(255,255,255,0));
    border-color: var(--slate-200);
  }
  [data-theme="light"] .stat-cell { border-right-color: var(--slate-200); }
  @media (max-width: 768px) {
    [data-theme="light"] .stat-cell { border-bottom-color: var(--slate-200); }
  }
  [data-theme="light"] .stat-cell .num {
    color: var(--brand-600);
    text-shadow: 0 0 24px rgba(99,102,241,0.18);
  }
  [data-theme="light"] .stat-cell .lab { color: var(--text-faint); }

  /* COMPANION */
  [data-theme="light"] .companion { background: white; border-color: var(--slate-200); }
  [data-theme="light"] .pct-row .pname { color: var(--slate-700); }
  [data-theme="light"] .pct-bar { background: var(--slate-100); }
  [data-theme="light"] .pct-val { color: var(--slate-900); }
  [data-theme="light"] .pct-legend { color: var(--text-faint); }

  /* PLATFORMS */
  [data-theme="light"] .pf { background: white; border-color: var(--slate-200); }
  [data-theme="light"] .pf:hover { border-color: var(--brand-500); }
  [data-theme="light"] .pf .pf-name { color: var(--slate-900); }
  [data-theme="light"] .pf .pf-sub { color: var(--slate-600); }
  [data-theme="light"] .pf-extras { background: var(--brand-50); border-color: var(--brand-200); }
  [data-theme="light"] .pf-extras .et { color: var(--brand-700); }
  [data-theme="light"] .pf-extras .ed { color: var(--brand-900); }
  [data-theme="light"] .badge.live { background: rgba(16,185,129,0.10); color: #047857; }
  [data-theme="light"] .badge.beta { background: rgba(245,158,11,0.10); color: #B45309; }
  [data-theme="light"] .badge.road { background: var(--slate-100); color: var(--slate-600); }

  /* PERSONAS */
  [data-theme="light"] .persona { background: white; border-color: var(--slate-200); }
  [data-theme="light"] .persona:hover { border-color: var(--brand-500); }
  [data-theme="light"] .persona.primary {
    background: linear-gradient(180deg, var(--brand-50), white 90%);
    border-color: var(--brand-300);
  }
  [data-theme="light"] .persona .tag { color: var(--brand-700); }
  [data-theme="light"] .persona .tag.pri { color: #047857; }
  [data-theme="light"] .persona h3 { color: var(--slate-900); }
  [data-theme="light"] .persona .quote { color: var(--slate-900); }
  [data-theme="light"] .persona p { color: var(--slate-700); }
  [data-theme="light"] .persona .lk { color: var(--brand-700); }

  /* CATEGORY */
  [data-theme="light"] .verb { background: white; border-color: var(--slate-200); }
  [data-theme="light"] .verb .v { color: var(--slate-900); }
  [data-theme="light"] .verb .vi { color: var(--brand-600); }

  /* AUTHORITY GRAPH — handle inline border-left */
  [data-theme="light"] .authority { background: white; border-color: var(--slate-200); }
  [data-theme="light"] .auth-col h3 { color: var(--slate-900); }
  [data-theme="light"] .auth-col p { color: var(--slate-700); }
  [data-theme="light"] .auth-col + .auth-col { border-left-color: var(--slate-200) !important; }
  [data-theme="light"] .auth-col .pill { background: var(--brand-50); color: var(--brand-700); }

  /* FINAL CTA */
  [data-theme="light"] .final-cta {
    background:
      radial-gradient(800px 320px at 50% 0%, rgba(99,102,241,0.14), transparent 70%),
      var(--background);
    border-bottom-color: var(--slate-200);
  }
  [data-theme="light"] .final-cta .eyebrow { color: var(--brand-700); }
  [data-theme="light"] .final-cta .micro { color: var(--text-faint); }

  /* FOOTER */
  [data-theme="light"] footer { background: var(--background); border-top: 1px solid var(--slate-200); }
  [data-theme="light"] .foot-grid h5 { color: var(--text-faint); }
  [data-theme="light"] .foot-grid a { color: var(--slate-700); }
  [data-theme="light"] .foot-grid a:hover { color: var(--slate-900); }
  [data-theme="light"] .foot-bottom { border-top-color: var(--slate-200); color: var(--text-faint); }

  /* VARIANT PILL */
  [data-theme="light"] .variant-pill {
    background: white; border-color: var(--text-body); color: var(--slate-700);
    box-shadow: 0 4px 12px -4px rgba(15,23,42,0.12);
  }
