:root {
  --bg: #f7f8f6;
  --bg-alt: #eef1ee;
  --surface: #ffffff;
  --text: #16201d;
  --muted: #5b6662;
  --line: #d9dfdb;
  --accent: #0f766e;
  --accent-soft: #d6efec;
  --llm: #6d4bd1;
  --llm-soft: #ebe5fb;
  --up: #15803d;
  --press: #b45309;
  --early: #2563eb;
  --corr: #b91c1c;
  /* Chart series, a validated categorical order: book, twin, S&P 500, paper account. */
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --radius: 12px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1211;
    --bg-alt: #121917;
    --surface: #171f1d;
    --text: #e6ece9;
    --muted: #97a39f;
    --line: #26312e;
    --accent: #2dd4bf;
    --accent-soft: #123430;
    --llm: #a78bfa;
    --llm-soft: #251d3d;
    --up: #4ade80;
    --press: #fbbf24;
    --early: #60a5fa;
    --corr: #f87171;
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s4: #c98500;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.top nav { display: flex; gap: 20px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.top nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 88px 0 72px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 24px;
  padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--muted); background: var(--surface);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--press); }
h1 {
  margin: 0 0 20px; font-size: clamp(36px, 6vw, 60px); line-height: 1.05;
  letter-spacing: -0.03em; font-weight: 750;
}
.lede { max-width: 640px; margin: 0 0 48px; font-size: 18px; color: var(--muted); }

.facts {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.facts li { background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.facts strong { font-size: 28px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.facts span { font-size: 14px; color: var(--muted); line-height: 1.4; }

/* Sections */
.band { padding: 72px 0; border-top: 1px solid var(--line); }
.band.alt { background: var(--bg-alt); }
h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.02em; }
h2.sub { margin-top: 56px; }
.section-lede { margin: 0 0 32px; max-width: 640px; color: var(--muted); }
.note { margin: 20px 0 0; font-size: 14px; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.card h3 { margin: 0 0 12px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.card li + li { margin-top: 6px; }

.tag { font-size: 13px; padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.tag-llm { background: var(--llm-soft); color: var(--llm); }
.tag-code { background: var(--accent-soft); color: var(--accent); }

/* Timeline */
.timeline { list-style: none; margin: 24px 0 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 0 0 20px 24px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
}
.timeline time { font-family: var(--mono); font-size: 14px; color: var(--accent); padding-top: 2px; }
.timeline div { color: var(--muted); font-size: 15px; }
.timeline strong { color: var(--text); }

/* Regime table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.regimes { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
.regimes th, .regimes td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.regimes tbody tr:last-child > * { border-bottom: 0; }
.regimes thead th { font-size: 13px; font-weight: 600; color: var(--muted); }
.regimes td { color: var(--muted); }
.regimes .num { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.pill { display: inline-block; white-space: nowrap; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid currentcolor; }
.pill-up { color: var(--up); }
.pill-press { color: var(--press); }
.pill-early { color: var(--early); }
.pill-corr { color: var(--corr); }

/* Limits */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.limit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.limit strong { font-size: 26px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--accent); }
.limit span { font-size: 14px; color: var(--muted); }
.principles { margin: 32px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.principles li { padding-left: 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.principles strong { color: var(--text); }

.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 14px; }
.foot p { margin: 0 0 8px; max-width: 760px; }
.muted { color: var(--muted); }

@media (max-width: 820px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .split, .split.three, .grid { grid-template-columns: 1fr; }
  /* Links move to a second header row (CSS only, no menu script). */
  html { scroll-padding-top: 104px; }
  .top-inner { height: auto; flex-wrap: wrap; row-gap: 6px; padding-top: 12px; padding-bottom: 10px; }
  .top nav { width: 100%; gap: 18px; overflow-x: auto; scrollbar-width: none; }
  .top nav a { white-space: nowrap; padding: 4px 0; }
  .hero { padding: 56px 0 48px; }
  .band { padding: 56px 0; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 360px) {
  .top nav { gap: 12px; }
  .top nav a { font-size: 13px; }
}
