/* ==========================================================================
   SigmaPilot — site.css
   Trading-desk visual direction. Dark slate default; light via
   [data-theme="light"] on <html>. Tokens per spec 2026-06-12.
   Color = meaning only (bullish / bearish / accent). Mono for all data.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* surfaces — dark default (gradient page bg from #141a24 → #10151d) */
  --bg-top:      #141a24;
  --bg-bot:      #10151d;
  --surface:     #16202c;
  --surface-2:   #1b2735;
  --inset:       #0f1722;
  --border:      #232c3b;
  --border-2:    #2d3a4d;

  /* ink */
  --text:        #dbe4ee;
  --muted:       #8b98a9;
  --faint:       #5f6c7d;

  /* meaning */
  --accent:      #6ca6f5;
  --accent-bg:   rgba(108, 166, 245, 0.10);
  --accent-bd:   rgba(108, 166, 245, 0.34);
  --bull:        #4ac26b;
  --bull-bg:     rgba(74, 194, 107, 0.11);
  --bull-bd:     rgba(74, 194, 107, 0.32);
  --bear:        #e5534b;
  --bear-bg:     rgba(229, 83, 75, 0.11);
  --bear-bd:     rgba(229, 83, 75, 0.32);

  /* chart-line motif stroke */
  --line:        rgba(108, 166, 245, 0.16);

  /* shadows (theme-dependent) */
  --shadow:    0 1px 2px rgba(0,0,0,0.25);
  --shadow-lg: 0 24px 60px -28px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.02);

  color-scheme: dark;
}

/* Structural tokens — theme-independent, so they live on `html`, NOT `:root`.
   This keeps the :root token set === the [data-theme="light"] set (no palette
   token may drift in one theme only — pinned by test_static_site.py). Fonts,
   radii and max-width never change between themes, so duplicating them into the
   light block would be dead, drift-prone CSS. */
html {
  /* type */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* geometry */
  --r:    8px;
  --r-lg: 12px;
  --maxw: 1120px;
}

[data-theme="light"] {
  --bg-top:      #f7f9fb;
  --bg-bot:      #f7f9fb;
  --surface:     #ffffff;
  --surface-2:   #f1f5f9;
  --inset:       #f5f8fb;
  --border:      #e2e8f0;
  --border-2:    #cfd9e6;

  --text:        #16233a;
  --muted:       #5b6b7f;
  --faint:       #8595a8;

  --accent:      #2c5fb3;
  --accent-bg:   rgba(44, 95, 179, 0.08);
  --accent-bd:   rgba(44, 95, 179, 0.30);
  --bull:        #1a7f37;
  --bull-bg:     rgba(26, 127, 55, 0.09);
  --bull-bd:     rgba(26, 127, 55, 0.28);
  --bear:        #cf222e;
  --bear-bg:     rgba(207, 34, 46, 0.08);
  --bear-bd:     rgba(207, 34, 46, 0.26);

  --line:        rgba(44, 95, 179, 0.14);

  --shadow:    0 1px 2px rgba(22, 35, 58, 0.06);
  --shadow-lg: 0 20px 48px -30px rgba(22, 35, 58, 0.28), 0 0 0 1px rgba(22,35,58,0.03);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bot) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-bg); color: var(--text); }

code, pre, .mono { font-family: var(--mono); font-variant-ligatures: none; }

/* faint chart grid behind the page top */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 620px;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 78%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 78%);
  opacity: 0.5;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
main { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section { padding: 56px 0; border-top: 1px solid var(--border); }
.section-head { margin-bottom: 26px; }
.section-head h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin-top: 8px;
}
.section-head .sub { color: var(--muted); margin-top: 6px; font-size: 14.5px; }

/* ---------- Nav ---------- */
nav.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-top) 82%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
          backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}
nav.top .inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 12px 26px;
  display: flex; align-items: center; gap: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.01em; font-size: 15px; }

/* Real wordmark logo. Derived 320px-wide PNGs (static/logo-{dark,light}.png,
   ~12-19 KB each — down from the 2 MB+ originals in img/, which stay untouched).
   They retain ~79% baked-in transparent/white padding (the actual mark fills
   only the centre band, h≈0.21·H, w≈0.64·W, centred). We clip that padding away
   with a fixed-size overflow box and an oversized, centred <img> so the visible
   wordmark reads at nav size. Dark theme → dark logo (light ink on its own dark
   pill); light theme → light logo (dark ink on white). One <img> shows per theme
   via [data-theme]; both are fetched but the hidden one is tiny, so no
   lazy-loading (which would flash the visible first-paint nav logo). */
.brand .logo-clip {
  position: relative; display: block; overflow: hidden;
  width: 150px; height: 34px;            /* visible logo viewport in the nav */
  flex: none;
}
.brand .logo-clip img {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  height: 158px; width: auto;            /* oversize so the centre band ≈ 32px tall */
  max-width: none;
}
.brand .logo-clip .logo-light { display: none; }
[data-theme="light"] .brand .logo-clip .logo-dark  { display: none; }
[data-theme="light"] .brand .logo-clip .logo-light { display: block; }

.brand .ver {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: var(--faint);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; margin-left: 2px;
}

nav.top .links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
nav.top .links a.nav-link {
  padding: 7px 11px; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: color 0.12s, background 0.12s;
}
nav.top .links a.nav-link:hover { color: var(--text); background: var(--surface); }
nav.top .links a.nav-link[aria-current="page"] { color: var(--text); background: var(--surface); }
nav.top .links a.ext::after { content: " ↗"; color: var(--faint); font-size: 0.85em; }

.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  border: 1px solid var(--border); background: var(--surface);
  padding: 5px 9px; border-radius: 6px; margin-left: 4px;
}
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.status[data-state="ok"]   { color: var(--bull); border-color: var(--bull-bd); }
.status[data-state="ok"]   .dot { background: var(--bull); animation: pulse 1.9s ease-in-out infinite; }
.status[data-state="down"] { color: var(--bear); border-color: var(--bear-bd); }
.status[data-state="down"] .dot { background: var(--bear); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.theme-toggle {
  width: 32px; height: 32px; border-radius: 6px; margin-left: 4px;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  font-size: 14px; line-height: 1; transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-2); }
.theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun  { display: inline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 7px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.08s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .btn-primary, :root:not([data-theme="light"]) .btn-primary { color: #0c1118; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn .arrow { transition: transform 0.18s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn svg { fill: currentColor; }

.tlink {
  color: var(--muted);
  border-bottom: 1px dotted var(--faint);
  transition: color 0.12s, border-color 0.12s;
}
.tlink:hover { color: var(--accent); border-color: var(--accent-bd); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
}

/* ---------- Terminal (signature output card) ---------- */
.terminal {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg);
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.terminal-bar .dots { display: flex; gap: 6px; }
.terminal-bar .dots i { width: 9px; height: 9px; border-radius: 50%; display: block; opacity: 0.55; }
.terminal-bar .dots i:nth-child(1) { background: var(--bear); }
.terminal-bar .dots i:nth-child(2) { background: #d9a441; }
.terminal-bar .dots i:nth-child(3) { background: var(--bull); }
.terminal-bar .ttl { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-left: 6px; }
.terminal-bar .ttl b { color: var(--text); font-weight: 600; }
.terminal-bar .tag {
  margin-left: auto; font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-bg); border: 1px solid var(--accent-bd);
  padding: 2px 7px; border-radius: 4px;
}
.terminal-body { padding: 16px 18px 18px; overflow-x: auto; }

/* JSON / code coloring — shared by terminal + code cards + examples */
.j { font-family: var(--mono); font-size: 12.5px; line-height: 1.62; white-space: pre; color: var(--text); }
.j .prompt { color: var(--faint); display: block; margin-bottom: 12px; }
.j .prompt .fn { color: var(--accent); }
.j .k { color: var(--accent); }                 /* json key */
.j .s { color: var(--text); }                    /* string value */
.j .n { color: var(--text); font-weight: 600; }  /* number */
.j .bull { color: var(--bull); font-weight: 600; }
.j .bear { color: var(--bear); }
.j .bool { color: var(--muted); }
.j .c { color: var(--faint); font-style: italic; }
.j .hl {
  background: var(--accent-bg); border-left: 2px solid var(--accent-bd);
  padding-left: 8px; margin-left: -10px; display: inline-block;
}
.j .hl-risk {
  background: var(--bear-bg); border-left: 2px solid var(--bear-bd);
  padding-left: 8px; margin-left: -10px; display: inline-block;
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 44px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1.05fr; gap: 56px; align-items: center; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-bd);
  padding: 4px 10px 4px 8px; border-radius: 100px; margin-bottom: 20px;
}
.hero .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1.hero-h {
  font-size: clamp(34px, 5vw, 54px); font-weight: 750;
  letter-spacing: -0.03em; line-height: 1.06; margin-bottom: 16px;
}
h1.hero-h .accent { color: var(--accent); }
.hero-sub { font-size: 17px; color: var(--muted); margin-bottom: 26px; max-width: 44ch; }
.hero-sub b { color: var(--text); font-weight: 600; }
.hero-ctas { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero-proof {
  display: flex; align-items: center; gap: 10px; margin-top: 22px;
  font-family: var(--mono); font-size: 12px; color: var(--faint); flex-wrap: wrap;
}

/* chart-line stroke drawn behind hero headline */
.hero-line { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-line svg { position: absolute; top: 8%; left: -2%; width: 70%; height: auto; opacity: 0.9; }
.hero-line polyline {
  fill: none; stroke: var(--accent); stroke-width: 1.4; opacity: 0.22;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  animation: draw 2.4s ease forwards 0.2s;
}
.hero-line circle { fill: var(--accent); opacity: 0; animation: dot 0.4s ease forwards 2.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot { to { opacity: 0.7; } }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pillar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 20px 20px 18px; transition: border-color 0.18s, transform 0.18s;
}
.pillar:hover { border-color: var(--border-2); transform: translateY(-2px); }
.pillar .lead { font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.pillar .lead.neutral { color: var(--muted); }
.pillar .desc { color: var(--faint); font-size: 13px; margin-top: 6px; }

/* ---------- Works-with strip ---------- */
.workswith {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.ww-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  padding: 9px 14px; border-radius: 8px; transition: border-color 0.15s, transform 0.15s;
}
.ww-chip:hover { border-color: var(--border-2); transform: translateY(-1px); }
.ww-chip .d { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.ww-chip .meta { font-family: var(--mono); font-size: 11px; color: var(--faint); }

/* ---------- Install tabs ---------- */
.tabs { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px; margin-bottom: 16px; }
.tab {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--muted);
  padding: 6px 13px; border-radius: 6px; cursor: pointer; border: 1px solid transparent;
  background: transparent; transition: color 0.12s, background 0.12s;
}
.tab[aria-selected="true"] { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.tabpanel { display: none; }
.tabpanel.active { display: block; }

.code-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.code-card .head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.code-card .head .badge {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-bd); padding: 2px 7px; border-radius: 4px;
}
.code-card .head h4 { font-size: 14px; font-weight: 600; }
.code-card .head .sub { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.code-card .body { position: relative; background: var(--inset); }
.code-card pre { padding: 15px 16px; overflow-x: auto; }
.code-card .foot { padding: 11px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
/* Two one-line per-client connect rows (Claude / ChatGPT) under the remote URL. */
.code-card .connect-rows {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 16px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted); line-height: 1.4;
}
.code-card .connect-rows .row b { color: var(--text); font-weight: 600; }

.copy-btn {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  padding: 4px 9px; border-radius: 6px; cursor: pointer; opacity: 0;
  transition: opacity 0.15s, color 0.12s, border-color 0.12s;
}
.code-card .body:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--text); border-color: var(--border-2); }
.copy-btn.copied { opacity: 1; color: var(--bull); border-color: var(--bull-bd); }

/* ---------- Tools page ---------- */
.tools-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.filter-wrap { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.filter-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 15px; height: 15px; }
#toolFilter {
  width: 100%; font-family: var(--mono); font-size: 13.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px 10px 34px; outline: none; transition: border-color 0.14s;
}
#toolFilter:focus { border-color: var(--accent-bd); }
#toolFilter::placeholder { color: var(--faint); }
.filter-count { font-family: var(--mono); font-size: 12px; color: var(--faint); white-space: nowrap; }

.group-label {
  display: flex; align-items: baseline; gap: 10px; margin: 30px 0 14px;
}
.group-label h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.group-label .n { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.group-label.hide { display: none; }

.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.tool {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 9px;
  transition: border-color 0.15s, transform 0.15s;
}
.tool:hover { border-color: var(--border-2); transform: translateY(-2px); }
.tool.hide { display: none; }
.tool .name { font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.tool .theory { font-size: 12px; color: var(--accent); font-weight: 500; }
.tool .what { font-size: 13px; color: var(--muted); line-height: 1.5; }
.tool .badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.badge-x {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  color: var(--muted); background: var(--inset); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 5px; white-space: nowrap;
}
.badge-x.timing { color: var(--accent); border-color: var(--accent-bd); background: var(--accent-bg); }
.badge-x.dex { color: var(--bull); border-color: var(--bull-bd); background: var(--bull-bg); }

.note-raw {
  margin-top: 12px; font-size: 12.5px; color: var(--faint);
  background: var(--inset); border: 1px solid var(--border); border-left: 2px solid var(--border-2);
  border-radius: 6px; padding: 10px 13px; line-height: 1.5;
}
.note-raw code { color: var(--muted); font-size: 0.92em; }
.note-raw b { color: var(--muted); font-weight: 600; }

/* markets table */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
table.markets { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.markets th, table.markets td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
table.markets thead th {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); background: var(--surface-2);
}
table.markets tbody tr:last-child td { border-bottom: 0; }
table.markets td:first-child { font-weight: 600; color: var(--text); white-space: nowrap; }
table.markets td .mono { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
table.markets tbody tr:hover td { background: var(--surface-2); }

/* comparison — single grid so paired rows share height across both columns */
.compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
}
.compare .cell { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 13.5px; line-height: 1.5; }
.compare .cell.us { background: var(--accent-bg); border-left: 1px solid var(--border); }
.compare .cell.them { color: var(--muted); }
.compare .head { font-weight: 700; font-size: 14px; }
.compare .cell.us.head { color: var(--accent); }
.compare .cell.them.head { color: var(--muted); }
.compare .cell:nth-last-child(-n+2) { border-bottom: 0; }
.compare .cell .mono { font-family: var(--mono); font-size: 12px; color: var(--faint); display: block; margin-top: 3px; }

/* ---------- Terms / legal page ---------- */
.legal { max-width: 760px; padding-bottom: 64px; }
.legal-block { margin: 26px 0; }
.legal-block h3, .risk-note h3 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.legal-list { display: flex; flex-direction: column; gap: 9px; }
.legal-list li {
  list-style: none; position: relative; padding-left: 18px;
  font-size: 14.5px; line-height: 1.5; color: var(--text);
}
.legal-list li::before {
  content: "—"; position: absolute; left: 0; color: var(--accent);
}
.legal-list a { color: var(--accent); }
/* Risk disclaimer — prominent callout (the one block a reader must not miss). */
.risk-note {
  margin: 28px 0; padding: 20px 22px; border-radius: var(--r-lg);
  background: var(--bear-bg); border: 1px solid var(--bear-bd); border-left: 3px solid var(--bear);
}
.risk-note h3 { color: var(--bear); }
.risk-note p { font-size: 14.5px; line-height: 1.6; color: var(--text); }
.risk-note .mono { font-family: var(--mono); font-size: 0.92em; color: var(--muted); }
.legal-foot {
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; color: var(--faint);
}

/* ---------- Examples page ---------- */
.ex { margin-bottom: 14px; }
.ex-q {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  font-size: 15px; color: var(--text);
}
.ex-q .you {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-bd);
  padding: 2px 7px; border-radius: 4px; white-space: nowrap;
}
.ex-spotlight .ex-q .you { color: var(--bull); background: var(--bull-bg); border-color: var(--bull-bd); }
.ex-spotlight .terminal { border-color: var(--bull-bd); }
.ex-headline {
  margin: 6px 0 18px; font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; letter-spacing: -0.02em;
}

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--border); padding: 30px 0 44px; margin-top: 28px; position: relative; z-index: 1;
}
footer.site .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 26px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
footer.site .brand { font-size: 14px; }
footer.site .brand .logo-clip { width: 92px; height: 26px; }
footer.site .brand .logo-clip img { height: 92px; }
footer.site .flinks { display: flex; gap: 20px; font-size: 13px; color: var(--muted); }
footer.site .flinks a:hover { color: var(--accent); }
footer.site .meta { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
footer.site .meta a { color: var(--muted); border-bottom: 1px dotted var(--faint); }
footer.site .meta a:hover { color: var(--accent); }

/* ---------- Reveal (load + scroll) ----------
   JS-additive: the hide-before-animate rule is scoped to `.js` (added to <html>
   by the pre-paint script). No-JS readers never hit `opacity: 0`, so they see
   all content immediately; JS readers get the reveal animation. Pinned by
   test_static_site.py::TestJsAdditiveReveal. */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.05s; }
.reveal.d2 { transition-delay: 0.12s; }
.reveal.d3 { transition-delay: 0.20s; }
.reveal.d4 { transition-delay: 0.28s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 48px 0 32px; }
  .pillars { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .hero-line svg { width: 110%; opacity: 0.5; }
  .compare { grid-template-columns: 1fr; }
  .compare .cell.us { border-left: 0; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  nav.top .inner { padding: 11px 16px; gap: 10px; }
  nav.top .links a.nav-link { padding: 6px 8px; font-size: 13px; }
  .status { display: none; }
  .brand .ver { display: none; }
  /* Scale the wordmark down slightly so it never crowds the links on narrow nav. */
  .brand .logo-clip { width: 124px; height: 30px; }
  .brand .logo-clip img { height: 138px; }
  footer.site .inner { flex-direction: column; align-items: flex-start; gap: 16px; padding: 0 16px; }
  footer.site .meta { margin-left: 0; }
  .section { padding: 44px 0; }
  .tool-grid { grid-template-columns: 1fr; }
  .compare .row { min-height: 0; }
  .terminal-body, .j { font-size: 11.5px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  /* `.js`-scoped to match the hide rule: with JS the reveal is hidden, so this
     un-hides it instantly; with no JS there is nothing to un-hide. */
  .js .reveal { opacity: 1; transform: none; }
  .hero-line polyline { stroke-dashoffset: 0; }
  .hero-line circle { opacity: 0.7; }
}
