/* ---------- Reset + tokens ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; }

:root {
  --paper:  #f8f9fc;
  --paper2: #ffffff;
  --ink:    #1e293b;
  --ink2:   #0f172a;
  --muted:  #64748b;
  --line:   #e2e8f0;

  --blue:   #4f46e5;
  --violet: #7c3aed;
  --pink:   #ec4899;
  --gold:   #f59e0b;
  --green:  #16a34a;
  --teal:   #0ea5e9;
  --red:    #e11d48;

  --grad-1: linear-gradient(135deg, var(--blue) 0%, var(--violet) 60%, var(--pink) 100%);
  --grad-2: linear-gradient(135deg, var(--pink), var(--gold));
  --grad-3: linear-gradient(135deg, var(--teal), var(--blue));

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12), 0 6px 18px rgba(15, 23, 42, 0.06);

  --content-w: 1180px;
  --gap: 28px;
}

/* ---------- Fonts ---------- */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500;1,9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap");

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  background-image:
    radial-gradient(900px 600px at 12% -8%,  rgba(124, 58, 237, 0.10), transparent 60%),
    radial-gradient(800px 540px at 92% 6%,   rgba(245, 158, 11, 0.10), transparent 60%),
    radial-gradient(900px 600px at 50% 102%, rgba(236, 72, 153, 0.10), transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3, h4 { color: var(--ink2); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-family: "Fraunces", serif; font-weight: 700; }
h2 { font-family: "Fraunces", serif; font-weight: 700; }
p { color: #334155; }
a  { color: var(--blue); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--violet); }
code { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 18px;
  width: min(calc(100% - 28px), 1180px);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: var(--r-pill);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: box-shadow .25s ease, background .25s ease;
}
.topbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
}
.navbar-logos { display: flex; align-items: center; gap: 14px; }
.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Fraunces", serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--ink2);
  letter-spacing: -0.01em;
}
.brandmark:hover { color: var(--ink2); }
.brandmark-logo, .microsoft-mark { width: 22px; height: 22px; flex-shrink: 0; }
.brand-weave { color: var(--ink2); }
.brand-bench {
  font-style: italic;
  background: var(--grad-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.navbar-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}
.navbar-related {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: var(--r-pill);
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.82rem;
  transition: background .15s ease, border-color .15s ease;
}
.navbar-related:hover { background: white; border-color: #cbd5e1; color: var(--ink2); }
.nr-icon {
  display: inline-block;
  width: 16px; height: 16px;
  border-radius: 4px;
  background: var(--grad-2);
}
.nr-label { display: block; font-size: 0.66rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; line-height: 1; }
.nr-name  { display: block; font-weight: 600; line-height: 1.25; }
.nav { margin-left: auto; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.nav a:hover { color: var(--ink2); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--grad-1);
  border-radius: 2px;
  transition: right .25s ease;
}
.nav a:hover::after { right: 0; }

/* ---------- Hero ---------- */
.hero {
  padding: 130px 24px 40px;
  max-width: var(--content-w);
  margin: 0 auto;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: start;
}
.kicker {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(124, 58, 237, 0.10);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--violet);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 22px;
  white-space: nowrap;
  max-width: 100%;
}
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 1.04;
  margin: 0 0 22px;
  letter-spacing: -0.02em;
}
.hero h1::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.92em;
  margin-left: 0.04em;
  vertical-align: -0.12em;
  background: var(--grad-1);
  border-radius: 4px;
  animation: cursor 1.2s steps(2) infinite;
}
@keyframes cursor { 50% { opacity: 0; } }
.hero-subtitle {
  font-size: 1.07rem;
  line-height: 1.65;
  color: #475569;
  max-width: 58ch;
  margin: 0 0 26px;
}
.hero-subtitle strong { color: var(--ink2); }
.hero-subtitle em { font-style: italic; color: var(--violet); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.button:hover { transform: translateY(-1px); }
.button.primary {
  background: var(--grad-1);
  color: white;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.28);
}
.button.primary:hover { color: white; box-shadow: 0 10px 24px rgba(124, 58, 237, 0.36); }
.button.secondary {
  background: white;
  color: var(--ink2);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.button.secondary:hover { color: var(--ink2); border-color: #cbd5e1; }
.button.tertiary {
  background: var(--ink2);
  color: white;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
}
.button.tertiary:hover { color: white; background: #0b1220; }
.button-icon { width: 16px; height: 16px; fill: currentColor; }

.related-project {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  max-width: 520px;
}
.related-project:hover { color: var(--ink); border-color: #cbd5e1; box-shadow: var(--shadow-md); }
.related-icon { width: 18px; height: 18px; border-radius: 6px; background: var(--grad-3); flex-shrink: 0; }
.related-text { display: grid; gap: 1px; }
.related-tag { font-family: "JetBrains Mono", monospace; font-size: 0.7rem; color: var(--teal); text-transform: uppercase; letter-spacing: 0.05em; }
.related-title { font-weight: 600; color: var(--ink2); }
.related-summary { font-size: 0.85rem; color: var(--muted); }
.related-arrow { color: var(--muted); font-size: 1.1rem; margin-left: auto; }

/* ---------- Hero ledger ---------- */
.hero-ledger {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hero-ledger::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--grad-1);
}
.ledger-kicker {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.ledger-hero { display: flex; align-items: baseline; gap: 4px; margin-bottom: 14px; }
.ledger-value {
  font-family: "Fraunces", serif;
  font-size: 4.6rem;
  font-weight: 700;
  line-height: 0.95;
  background: var(--grad-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.ledger-denominator {
  font-family: "Fraunces", serif;
  font-size: 1.8rem;
  color: var(--muted);
  font-weight: 500;
}
.ledger-copy { font-size: 0.92rem; line-height: 1.55; color: #475569; margin: 0 0 18px; }
.ledger-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.ledger-stat { display: flex; flex-direction: column; gap: 2px; }
.ledger-stat span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ledger-stat b {
  font-family: "Fraunces", serif;
  font-size: 1.55rem;
  color: var(--ink2);
}
.ledger-stat-text { font-family: "Inter", sans-serif !important; font-size: 0.85rem !important; line-height: 1.3; }

/* Harnesses row with GitHub logos */
.ledger-stat-harness { grid-column: 1 / -1; }
.harness-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}
.harness-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.harness-logo img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.harness-logo b {
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink2);
}

/* ---------- Section frame ---------- */
.section {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 64px 24px;
}
.section-header {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 32px;
  margin-bottom: 36px;
  align-items: start;
}
.section-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  padding-top: 22px;
}
.section-eyebrow::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 56px; height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--pink), var(--blue));
}
.section h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
}
.section-lede { font-size: 1.02rem; line-height: 1.65; color: #475569; max-width: 70ch; margin: 0; }

/* ---------- Teaser ---------- */
.teaser-showcase { max-width: var(--content-w); margin: 0 auto; padding: 36px 24px 0; }
.teaser-heading {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 32px;
  margin-bottom: 22px;
  align-items: start;
}
.teaser-heading > span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 22px;
  position: relative;
}
.teaser-heading > span::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 56px; height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--pink));
}
.teaser-heading h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 10px; line-height: 1.2; }
.teaser-figure {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.teaser-figure img { display: block; width: 100%; height: auto; }
.teaser-caption { text-align: center; font-size: 0.88rem; color: var(--muted); margin: 12px auto 0; max-width: 800px; }

/* ---------- Manifesto / steps ---------- */
.manifesto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.statement {
  background: var(--grad-1);
  color: white;
  padding: 32px 30px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.statement::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.25), transparent 60%);
  pointer-events: none;
}
.statement h3 {
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
  line-height: 1.25;
  color: white;
  margin: 0 0 14px;
  font-weight: 600;
}
.statement p { color: rgba(255, 255, 255, 0.92); font-size: 1rem; margin: 0 0 18px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
}
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.step {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.step:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.step strong { display: block; color: var(--ink2); font-size: 0.98rem; margin-bottom: 6px; }
.step p { font-size: 0.88rem; color: var(--muted); margin: 0; line-height: 1.5; }

/* ---------- Figure frame ---------- */
.figure-frame {
  margin: 0 0 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
}
.figure-frame img { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.figure-frame .caption { font-size: 0.88rem; color: var(--muted); margin: 12px 4px 0; line-height: 1.55; }
.caption strong { color: var(--ink2); }

/* ---------- Domain grid ---------- */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.domain-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 16px 14px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.domain-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent, var(--blue));
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.domain-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.domain-tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--accent, var(--blue));
  background: color-mix(in srgb, var(--accent, var(--blue)) 12%, transparent);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  margin-bottom: 6px;
  font-weight: 600;
}
.domain-card h4 { margin: 0 0 4px; font-size: 1rem; color: var(--ink2); }
.domain-card p  { margin: 0; font-size: 0.84rem; color: var(--muted); line-height: 1.5; }

/* ---------- Method grid ---------- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.method-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 24px 22px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.method-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.method-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.method-card.accent-blue::before  { background: var(--blue); }
.method-card.accent-red::before   { background: var(--red); }
.method-card.accent-gold::before  { background: var(--gold); }
.method-card.accent-green::before { background: var(--green); }

.method-num {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.04);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.method-card h3 {
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink2);
}
.method-card p { font-size: 0.94rem; color: #475569; line-height: 1.6; margin: 0; }
.method-card strong { color: var(--ink2); }

/* ---------- Tables ---------- */
.table-wrap {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}
.results-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.results-table thead { background: var(--grad-1); }
.results-table thead th {
  color: white;
  padding: 14px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}
.results-table thead th:first-child { text-align: left; }
.results-table tbody td {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.92rem;
  color: var(--ink2);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--pink) calc(var(--heat, 0) * 0.4%), transparent),
      color-mix(in srgb, var(--blue) calc(var(--heat, 0) * 0.4%), transparent));
}
.results-table tbody td.model-cell {
  text-align: left;
  background: white;
  font-family: "Inter", sans-serif;
  font-size: 0.94rem;
}
.results-table tbody td.na { background: white; color: var(--muted); }
.results-table tbody td.best {
  background: white;
  font-weight: 700;
  color: var(--pink);
  border-left: 1px solid var(--line);
}
.table-caption { font-size: 0.85rem; color: var(--muted); margin: 12px 18px; line-height: 1.55; }

/* ---------- Bar comparison ---------- */
.bar-row {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.bar-row-title {
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
  margin: 0 0 22px;
  color: var(--ink2);
}
.bar-stage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: end;
  height: 220px;
  padding: 0 20px 12px;
  border-bottom: 1px dashed var(--line);
}
.bar { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bar-fill {
  width: 100%;
  max-width: 100px;
  height: var(--h, 50%);
  background: linear-gradient(180deg, var(--c1, var(--blue)), var(--c2, var(--violet)));
  border-radius: 12px 12px 4px 4px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
  transition: height .8s cubic-bezier(.2,.8,.3,1);
}
.bar-label {
  margin-top: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}
.bar-label b { display: block; font-size: 1.1rem; color: var(--ink2); margin-top: 4px; }
.bar-caption { font-size: 0.88rem; color: var(--muted); margin: 18px 6px 0; line-height: 1.55; }

/* ---------- Ablation grid ---------- */
.ablation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.ablation-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-sm);
}
.ablation-tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--violet);
  background: rgba(124, 58, 237, 0.08);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 10px;
}
.ablation-card h3 {
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  margin: 0 0 8px;
  color: var(--ink2);
  line-height: 1.3;
}
.ablation-lede { font-size: 0.92rem; color: #475569; margin: 0 0 18px; line-height: 1.6; }
.ablation-card .bar-stage { height: 180px; padding: 0 4px 8px; }
.ablation-foot { font-size: 0.78rem; color: var(--muted); margin: 14px 0 0; line-height: 1.55; font-style: italic; }
.judge-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 4px;
}
.judge-table th {
  text-align: left;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.04);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.judge-table th:not(:first-child) { text-align: center; }
.judge-table td {
  padding: 12px;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", monospace;
  text-align: center;
  color: var(--ink2);
}
.judge-table td:first-child { text-align: left; font-family: "Inter", sans-serif; color: var(--ink2); }
.judge-table td.delta { color: var(--red); font-weight: 700; }

/* ---------- Analysis grid ---------- */
.analysis-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--gap);
  margin-bottom: 28px;
}
.analysis-figure {
  margin: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
}
.analysis-figure img { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.analysis-figure .caption { font-size: 0.86rem; color: var(--muted); margin: 12px 4px 0; line-height: 1.55; }
.analysis-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-content: start;
}
.num-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
}
.num-tag {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.num-value {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 2.1rem;
  font-weight: 700;
  background: var(--grad-2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.num-value small { font-size: 0.65em; color: var(--muted); -webkit-text-fill-color: var(--muted); margin-left: 2px; }
.num-card p { font-size: 0.84rem; color: var(--muted); margin: 0; line-height: 1.5; }
.num-card code { font-size: 0.78rem; padding: 1px 5px; background: rgba(15, 23, 42, 0.06); border-radius: 4px; color: var(--ink2); }
.analysis-poster { margin-top: 4px; }

/* ---------- BibTeX + authors ---------- */
.bibtex-wrap {
  position: relative;
  background: #f1f5f9;
  color: var(--ink2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}
.bibtex-wrap pre {
  margin: 0;
  padding: 22px 24px;
  overflow-x: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink2);
}
.bibtex-wrap code { color: var(--ink2); }
.bib-copy {
  position: absolute;
  top: 12px; right: 12px;
  padding: 6px 12px;
  background: #fff;
  color: var(--ink2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.bib-copy:hover { background: var(--paper); border-color: #cbd5e1; }
.bib-copy.copied { background: var(--green); border-color: var(--green); color: #fff; }

.authors {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}
.authors h3 {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 600;
}
.author-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.author-list li { font-size: 1rem; color: var(--ink2); }
.author-list strong { color: var(--ink2); font-weight: 600; }
.author-list sup { color: var(--muted); font-size: 0.72rem; margin-left: 1px; font-weight: 500; }
.affil { font-size: 0.88rem; color: var(--muted); margin: 6px 0 4px; }
.affil sup { font-size: 0.7rem; }
.affil-foot { font-size: 0.85rem; color: var(--muted); margin: 4px 0 0; }
.affil-foot a { color: var(--blue); }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 36px 24px 56px;
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 32px;
}
.footer p { font-size: 0.85rem; color: var(--muted); margin: 0 0 6px; }
.footer a { color: var(--blue); }
.footer-meta { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding-top: 110px; }
  .manifesto, .method-grid, .ablation-grid, .analysis-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .domain-grid { grid-template-columns: repeat(2, 1fr); }
  .section-header, .teaser-heading { grid-template-columns: 1fr; gap: 18px; }
  .section-eyebrow, .teaser-heading > span { padding-top: 16px; }
  .nav { gap: 12px; font-size: 0.85rem; }
  .navbar-related { display: none; }
}

@media (max-width: 680px) {
  .topbar { padding: 8px 12px; gap: 12px; }
  .nav { display: none; }
  .hero h1 { font-size: 2.6rem; }
  .hero h1::after { display: none; }
  .ledger-value { font-size: 3.6rem; }
  .ledger-stats { grid-template-columns: 1fr; gap: 8px; }
  .section { padding: 48px 16px; }
  .hero { padding: 96px 16px 24px; }
  .teaser-showcase { padding: 24px 16px 0; }
  .bar-stage { gap: 14px; padding: 0 8px 8px; }
  .steps, .domain-grid { grid-template-columns: 1fr; }
  .analysis-numbers { grid-template-columns: 1fr; }
  .ledger-hero { gap: 2px; }
  .button { padding: 9px 16px; font-size: 0.88rem; }
}

/* ---------- Additions for paper-grounded sections ---------- */

/* Table title (above the gradient header) */
.table-title {
  padding: 14px 18px 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* Cross-harness table: smaller font, second column harness-cell */
.results-table-2 { font-size: 0.86rem; }
.results-table-2 tbody td { padding: 11px 12px; }
.results-table-2 thead th { padding: 13px 12px; font-size: 0.72rem; }
.results-table tbody td.harness-cell {
  text-align: left;
  background: rgba(15, 23, 42, 0.03);
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  color: var(--ink2);
}
.results-table tbody tr.best-row td.model-cell,
.results-table tbody tr.best-row td.harness-cell {
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.10), rgba(245, 158, 11, 0.06));
  border-left: 3px solid var(--pink);
}
.results-table tbody tr.best-row td { border-top-color: rgba(236, 72, 153, 0.25); }


/* Ablation tables (compact, fit inside ablation-card) */
.ablation-table { margin-top: 12px; font-size: 0.86rem; }
.ablation-table td.delta-pos { color: var(--green); font-weight: 700; }
.ablation-table tr.best-row td {
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.10), rgba(245, 158, 11, 0.04));
  border-top-color: rgba(236, 72, 153, 0.25);
}

/* Judge ablation panel (grid: text + figure) */
.judge-ablation {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--gap);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-top: var(--gap);
}
.judge-ablation-text h3 {
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  margin: 8px 0 12px;
  color: var(--ink2);
  line-height: 1.3;
}
.judge-ablation-text p {
  font-size: 0.95rem;
  color: #475569;
  margin: 0 0 18px;
  line-height: 1.65;
}
.judge-ablation-fig { margin: 0; align-self: center; }
.judge-ablation-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.judge-ablation-fig .caption {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 10px 4px 0;
  line-height: 1.55;
}

/* Failure analysis: 5-family headline strip */
.failure-headline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: var(--gap) 0;
}
.failure-family {
  background: white;
  border: 1px solid var(--line);
  border-top: 4px solid var(--fam, var(--violet));
  border-radius: var(--r-md);
  padding: 18px 16px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.failure-family.fam-e1 { --fam: #1E3A8A; }
.failure-family.fam-e2 { --fam: #0D9488; }
.failure-family.fam-e3 { --fam: #0EA5E9; }
.failure-family.fam-e4 { --fam: #6366F1; }
.failure-family.fam-e5 { --fam: #DC2626; }
.failure-share {
  font-family: "Fraunces", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--fam);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.failure-family strong {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: var(--ink2);
  margin-bottom: 8px;
}
.failure-family p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* Per-backbone fingerprint cards */
.fingerprints {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.fingerprint {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
}
.fp-tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pink);
  background: rgba(236, 72, 153, 0.08);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 10px;
}
.fingerprint h3 {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  margin: 0 0 8px;
  color: var(--ink2);
  line-height: 1.3;
}
.fingerprint p {
  font-size: 0.88rem;
  color: #475569;
  margin: 0;
  line-height: 1.6;
}

/* Tool-call distribution section */
.section-toolmix .section-header { margin-bottom: 22px; }
.toolmix-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--gap);
}
.toolmix-figure {
  margin: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
}
.toolmix-figure img { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.toolmix-figure .caption { font-size: 0.84rem; color: var(--muted); margin: 12px 4px 0; line-height: 1.55; }
.toolmix-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-content: start;
}

/* Tighter responsive for new sections */
@media (max-width: 980px) {
  .judge-ablation { grid-template-columns: 1fr; }
  .failure-headline { grid-template-columns: repeat(2, 1fr); }
  .fingerprints { grid-template-columns: 1fr; }
  .toolmix-grid { grid-template-columns: 1fr; }
  .results-table-2 { font-size: 0.78rem; }
  .results-table-2 tbody td { padding: 8px 6px; }
}
@media (max-width: 680px) {
  .failure-headline { grid-template-columns: 1fr; }
  .toolmix-numbers { grid-template-columns: 1fr; }
}

/* ---------- Headline comparison panel (Why 41.2% is striking) ---------- */
.headline-comparison {
  display: grid;
  grid-template-columns: 0.95fr 1.1fr;
  gap: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-top: var(--gap);
}
.hc-hero {
  padding: 36px 38px 32px;
  background:
    linear-gradient(135deg, rgba(236, 72, 153, 0.06), rgba(245, 158, 11, 0.04)),
    white;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.hc-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pink);
  background: rgba(236, 72, 153, 0.08);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  align-self: flex-start;
}
.hc-bigstat {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.hc-bigvalue {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 5.4rem;
  line-height: 0.95;
  letter-spacing: -0.04em;
  background: var(--grad-2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hc-bigvalue small { font-size: 0.4em; -webkit-text-fill-color: var(--ink2); color: var(--ink2); margin-left: 4px; font-weight: 600; }
.hc-bigcaption {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.5;
  max-width: 240px;
}
.hc-bigcaption b {
  display: block;
  margin-top: 4px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink2);
  font-weight: 600;
}
.hc-narrative {
  font-size: 0.94rem;
  color: #475569;
  line-height: 1.7;
  margin: 0;
}
.hc-narrative strong { color: var(--ink2); }

/* Right side: horizontal bar comparison */
.hc-bars {
  padding: 36px 38px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: white;
}
.hc-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 70px;
  align-items: center;
  gap: 14px;
}
.hc-bar-name {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  color: var(--ink2);
  line-height: 1.25;
  text-align: right;
}
.hc-bar-name small {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
  font-weight: 500;
}
.hc-bar-track {
  height: 22px;
  background: rgba(15, 23, 42, 0.05);
  border-radius: var(--r-pill);
  overflow: hidden;
  position: relative;
}
.hc-bar-fill {
  height: 100%;
  width: var(--w, 50%);
  background: linear-gradient(90deg, var(--c1, var(--blue)), var(--c2, var(--violet)));
  border-radius: var(--r-pill);
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.12) inset;
  transition: width 1s cubic-bezier(.2,.8,.3,1);
}
.hc-bar-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.hc-bar-val small { font-size: 0.7em; color: var(--muted); margin-left: 1px; font-weight: 500; }

/* Highlight the "ours" rows */
.hc-bar-row.hc-ours .hc-bar-name strong { color: var(--pink); }
.hc-bar-row.hc-ours .hc-bar-track { background: rgba(236, 72, 153, 0.08); }
.hc-bar-row.hc-ours.hc-faded .hc-bar-fill { opacity: 0.75; }

.hc-footnote {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 12px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  line-height: 1.55;
  font-style: italic;
}

/* Responsive: stack to single column < 980px */
@media (max-width: 980px) {
  .headline-comparison { grid-template-columns: 1fr; }
  .hc-hero { border-right: none; border-bottom: 1px solid var(--line); padding: 28px; }
  .hc-bars { padding: 24px 22px; }
  .hc-bar-row { grid-template-columns: 110px 1fr 60px; gap: 10px; }
  .hc-bar-name { font-size: 0.82rem; }
  .hc-bigvalue { font-size: 4.2rem; }
}
@media (max-width: 680px) {
  .hc-bar-row { grid-template-columns: 90px 1fr 52px; gap: 8px; }
  .hc-bar-name { font-size: 0.75rem; }
  .hc-bar-name small { font-size: 0.6rem; }
  .hc-bar-val { font-size: 0.82rem; }
}

/* "Coming soon" pill button (non-interactive, replaces unreleased paper link) */
.button.button-soon {
  background: rgba(15, 23, 42, 0.05);
  color: var(--muted);
  cursor: default;
  box-shadow: none;
  font-style: italic;
  border: 1px dashed rgba(15, 23, 42, 0.18);
}
.button.button-soon:hover { transform: none; color: var(--muted); background: rgba(15, 23, 42, 0.05); }
.button.button-soon .button-icon { opacity: 0.55; }
.footer-soon { color: var(--muted); font-style: italic; }

/* ============================================================
 * Video demo carousel (#demos) — one video at a time, paginated
 * ============================================================ */
.demo-carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "prev stage next" ". dots .";
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.dc-stage {
  grid-area: stage;
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.dc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(248, 250, 252, 0.08);
}
.dc-tag {
  flex-shrink: 0;
  background: var(--dc-accent, #0ea5e9);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 3px 9px;
  border-radius: 4px;
}
.dc-title {
  color: #e2e8f0;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.3;
}
.dc-count {
  margin-left: auto;
  flex-shrink: 0;
  color: #94a3b8;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.dc-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3200 / 1080;
  background: #000;
  overflow: hidden;
}
.dc-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}
.dc-arrow {
  grid-area: prev;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink2);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.dc-arrow.dc-next { grid-area: next; }
.dc-arrow:hover { transform: scale(1.08); border-color: #cbd5e1; box-shadow: var(--shadow-md); }
.dc-arrow:active { transform: scale(0.96); }
.dc-dots {
  grid-area: dots;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}
.dc-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(15, 23, 42, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.dc-dot:hover { background: rgba(15, 23, 42, 0.4); }
.dc-dot.active { background: var(--dc-accent, #0ea5e9); transform: scale(1.25); }

@media (max-width: 720px) {
  .demo-carousel {
    grid-template-columns: 1fr;
    grid-template-areas: "stage" "dots";
  }
  .dc-arrow {
    position: absolute;
    top: 38%;
    z-index: 3;
    background: rgba(255, 255, 255, 0.92);
  }
  .dc-prev { left: 6px; }
  .dc-next { right: 6px; }
  .dc-title { font-size: 0.84rem; }
}
