:root {
  --color-bg: #0a0a0a;
  --color-bg-secondary: #111111;
  --color-bg-card: #1a1a1a;
  --color-text: #e5e5e5;
  --color-text-secondary: #999999;
  --color-accent: #3b82f6;
  --color-accent-glow: rgba(59, 130, 246, 0.15);
  --color-border: #222222;
  --color-gradient-start: #3b82f6;
  --color-gradient-end: #8b5cf6;
  --max-width: 1100px;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-family: var(--font-sans); background: var(--color-bg); color: var(--color-text); scroll-behavior: smooth; }
body { min-height: 100vh; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--color-accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .82; }
img { display: block; max-width: 100%; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

nav { position: fixed; inset: 0 0 auto; z-index: 100; background: rgba(10,10,10,.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); }
.nav-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { color: var(--color-text); font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--color-text-secondary); font-size: .9rem; font-weight: 500; }
.nav-links a:hover { color: var(--color-text); opacity: 1; }

.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 128px 0 80px; text-align: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; top: 0; left: 50%; width: 680px; height: 680px; transform: translateX(-50%); background: radial-gradient(circle, rgba(59,130,246,.19), transparent 70%); pointer-events: none; }
#routeCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .3; }
.hero-content { position: relative; z-index: 1; }
.kicker { margin-bottom: 14px; color: var(--color-accent); font-family: var(--font-mono); font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 800; letter-spacing: 0; line-height: 1.08; margin-bottom: 22px; }
.gradient-text, .stat-value { background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.subtitle { max-width: 720px; margin: 0 auto 40px; color: var(--color-text-secondary); font-size: 1.22rem; }
.cta-group, .artifact-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; border-radius: 8px; padding: 0 26px; border: 0; font: inherit; font-size: 1rem; font-weight: 650; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; }
.btn-primary { background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end)); color: white; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--color-accent-glow); opacity: 1; }
.btn-secondary { background: var(--color-bg-card); color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { border-color: var(--color-accent); opacity: 1; }

.stats-row { display: flex; justify-content: center; gap: 64px; flex-wrap: wrap; padding: 48px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.stat { text-align: center; }
.stat-value { font-size: 2.5rem; font-weight: 800; }
.stat-label { color: var(--color-text-secondary); font-size: .9rem; margin-top: 4px; }
.section { padding: 80px 0; }
.section-with-figure { padding-top: 48px; }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 12px; line-height: 1.14; }
.section-subtitle { max-width: 740px; margin: 0 auto 48px; color: var(--color-text-secondary); text-align: center; font-size: 1.08rem; }
.align-left { text-align: left; margin-left: 0; margin-right: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 24px; }
.feature-card, .diagram-card, .artifact-console, .citation-card { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: 12px; padding: 32px; transition: .3s; }
.feature-card:hover, .diagram-card:hover { border-color: var(--color-accent); transform: translateY(-2px); box-shadow: 0 8px 32px var(--color-accent-glow); }
.feature-icon { display: inline-flex; min-width: 46px; min-height: 46px; align-items: center; justify-content: center; margin-bottom: 16px; border-radius: 10px; background: rgba(59,130,246,.12); color: #93c5fd; font-family: var(--font-mono); font-size: 1rem; font-weight: 700; }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 8px; font-weight: 650; }
.feature-card p { color: var(--color-text-secondary); font-size: .95rem; }
.highlight .feature-icon { min-width: 78px; color: white; background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end)); }
.diagram-card { margin-top: 32px; padding: 16px; overflow: hidden; }
.diagram-card img { width: 100%; border-radius: 8px; background: white; }
.section-figure-card { margin: 0 auto 42px; max-width: 980px; }
.section-figure-link { display: block; }
.section-figure-image { display: block; }
.loop-detail-card { margin-top: 28px; margin-bottom: 0; }
.bench-flow-card { margin-top: 28px; margin-bottom: 0; }
.bench-band { background: linear-gradient(180deg, transparent, rgba(59,130,246,.05), transparent); }
.results-section { padding-top: 56px; background: linear-gradient(180deg, rgba(59,130,246,.035), rgba(10,10,10,0)); }
.results-section .container { max-width: 1240px; }
.results-heading .kicker { text-align: center; }
.results-heading .section-subtitle { margin-bottom: 28px; }
.result-highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.result-highlight { border: 1px solid var(--color-border); border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); padding: 18px; }
.result-highlight span { color: #93c5fd; font-family: var(--font-mono); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.result-highlight strong { display: block; margin: 8px 0 4px; color: var(--color-text); font-size: 1.6rem; line-height: 1.1; }
.result-highlight p { color: var(--color-text-secondary); font-size: .9rem; line-height: 1.55; }
.results-table-card { border: 1px solid var(--color-border); border-radius: 12px; background: linear-gradient(180deg, #181818, #111); padding: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.24); }
.table-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.table-toolbar span { border: 1px solid rgba(147,197,253,.2); border-radius: 999px; background: rgba(59,130,246,.08); color: #bfdbfe; padding: 6px 10px; font-family: var(--font-mono); font-size: .72rem; }
.table-scroll { overflow-x: auto; border: 1px solid var(--color-border); border-radius: 10px; background: #0d0d0d; }
.results-table { width: 100%; min-width: 1060px; border-collapse: separate; border-spacing: 0; color: var(--color-text); font-size: .84rem; }
.results-table caption { caption-side: top; padding: 0 0 12px; color: var(--color-text-secondary); text-align: left; font-size: .84rem; }
.results-table th, .results-table td { border-bottom: 1px solid rgba(255,255,255,.07); padding: 10px 12px; }
.results-table thead th { background: #111827; color: #dbeafe; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.results-table thead tr:first-child th { border-bottom-color: rgba(255,255,255,.12); }
.results-table tbody tr:last-child th, .results-table tbody tr:last-child td { border-bottom: 0; }
.group-head { text-align: center; }
.group-id { background: rgba(59,130,246,.18) !important; }
.group-ood { background: rgba(52,211,153,.16) !important; }
.taxonomy { width: 136px; border-right: 1px solid rgba(255,255,255,.08); color: var(--color-text-secondary); font-size: .7rem; font-weight: 800; letter-spacing: .08em; line-height: 1.35; text-align: left; text-transform: uppercase; vertical-align: top; }
.taxonomy-bound { color: #fcd34d; }
.taxonomy-agent { color: #86efac; }
.taxonomy-dynamic { color: #93c5fd; }
.taxonomy-static { color: #fca5a5; }
.taxonomy-policy { color: #c4b5fd; }
.taxonomy-single { color: #fdba74; }
.router-cell { min-width: 210px; color: var(--color-text); font-weight: 700; text-align: left; white-space: nowrap; }
.router-cell span { margin-left: 6px; color: #86efac; font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; }
.num { color: #cfcfcf; font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.row-oracle { background: rgba(250,204,21,.055); }
.row-acrouter { background: linear-gradient(90deg, rgba(52,211,153,.16), rgba(52,211,153,.045) 58%, transparent); }
.row-acrouter .router-cell { color: #dcfce7; }
.best { color: #bbf7d0; font-weight: 900; }
.money-best { color: #fde68a; font-weight: 900; }
.na { color: #5f5f5f; }
.results-note { margin-top: 14px; color: var(--color-text-secondary); font-size: .86rem; line-height: 1.6; }
.evidence-panel { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; margin-top: 34px; align-items: start; }
.evidence-panel-copy { position: sticky; top: 88px; }
.evidence-panel-copy .kicker { margin-bottom: 10px; }
.evidence-panel-copy h3 { max-width: 12ch; font-size: 1.45rem; line-height: 1.12; margin-bottom: 12px; }
.evidence-panel-copy p { color: var(--color-text-secondary); font-size: .92rem; line-height: 1.55; }
.evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.evidence-card { display: grid; gap: 14px; border: 1px solid var(--color-border); border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.014)); padding: 14px; overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; }
.evidence-card:hover { border-color: rgba(147,197,253,.45); transform: translateY(-2px); box-shadow: 0 16px 42px rgba(0,0,0,.24); }
.evidence-card-wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .7fr); align-items: center; }
.evidence-visual { display: grid; place-items: center; min-height: 156px; border-radius: 9px; background: #f8fafc; overflow: hidden; }
.evidence-card-wide .evidence-visual { min-height: 210px; }
.evidence-visual img { width: 100%; max-height: 224px; object-fit: contain; background: #f8fafc; }
.evidence-card:not(.evidence-card-wide) .evidence-visual img { max-height: 156px; }
.evidence-card figcaption { display: grid; gap: 7px; }
.evidence-card figcaption span { color: #93c5fd; font-family: var(--font-mono); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.evidence-card figcaption strong { color: var(--color-text); font-size: 1rem; line-height: 1.25; }
.evidence-card figcaption p { color: var(--color-text-secondary); font-size: .84rem; line-height: 1.55; }
.artifact-console { padding: 18px; }
.console-bar { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--color-border); padding-bottom: 12px; color: var(--color-text-secondary); }
.console-bar span { width: 10px; height: 10px; border-radius: 50%; background: #f87171; }
.console-bar span:nth-child(2) { background: #fbbf24; }
.console-bar span:nth-child(3) { background: #34d399; }
.console-bar strong { margin-left: 6px; font-family: var(--font-mono); font-size: .82rem; }
.artifact-actions { justify-content: flex-start; margin: 18px 0; }
.artifact-output { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 14px; }
.artifact-output article { border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-secondary); padding: 16px; }
.artifact-output span { color: #93c5fd; font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; }
.artifact-output h3 { margin: 8px 0; font-size: 1rem; }
.artifact-output p { color: var(--color-text-secondary); font-size: .92rem; }
.result-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 36px; align-items: center; }
.citation-card { max-width: 900px; }
pre { overflow-x: auto; border-radius: 8px; background: var(--color-bg-secondary); padding: 24px; color: var(--color-text-secondary); font-family: var(--font-mono); font-size: .9rem; }
footer { padding: 48px 0; border-top: 1px solid var(--color-border); text-align: center; color: var(--color-text-secondary); font-size: .85rem; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 100px 0 60px; }
  .stats-row { gap: 32px; }
  .feature-grid, .result-grid, .result-highlights { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .section-with-figure { padding-top: 36px; }
  .hero h1 { font-size: 2.45rem; }
  .section-figure-card { margin-bottom: 32px; }
  .loop-detail-card { margin-top: 24px; margin-bottom: 0; }
  .bench-flow-card { margin-top: 24px; margin-bottom: 0; }
  .results-section { padding-top: 44px; }
  .results-table-card { padding: 12px; margin-left: -8px; margin-right: -8px; }
  .table-toolbar span { font-size: .68rem; }
  .evidence-panel { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
  .evidence-panel-copy { position: static; }
  .evidence-panel-copy h3 { max-width: none; }
  .evidence-grid { grid-template-columns: 1fr; }
  .evidence-card-wide { grid-column: auto; grid-template-columns: 1fr; }
  .evidence-card-wide .evidence-visual, .evidence-visual { min-height: 144px; }
  .evidence-visual img, .evidence-card:not(.evidence-card-wide) .evidence-visual img { max-height: 150px; }
}
