:root {
  color-scheme: light;
  --paper: #f7f2e8;
  --paper-deep: #ede5d5;
  --ink: #211f1b;
  --muted: #665f54;
  --line: #d7cdbc;
  --accent: #e85332;
  --accent-dark: #a93821;
  --verified: #18794e;
  --code: #1b1a17;
  --code-ink: #fff9eb;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--accent-dark); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 2px; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.page { width: min(calc(100% - 40px), 820px); margin: 0 auto; padding: 40px 0 48px; }
.wide-page { width: min(calc(100% - 40px), 1180px); }
.site-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 58px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.site-nav > a { color: var(--ink); font-weight: 750; text-decoration: none; }
.hero { padding: 0 0 48px 44px; }
.eyebrow, .section-label, .current-call span, .rule span {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font: 750 0.78rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 {
  max-width: 700px;
  margin-bottom: 18px;
  font: 750 clamp(3.5rem, 10vw, 6.6rem)/0.91 Georgia, "Times New Roman", serif;
  letter-spacing: -0.055em;
}
h2 { margin-bottom: 10px; font: 750 clamp(1.65rem, 4vw, 2.35rem)/1.12 Georgia, "Times New Roman", serif; letter-spacing: -0.025em; }
.lede { max-width: 610px; color: var(--muted); font-size: clamp(1.18rem, 3vw, 1.55rem); line-height: 1.45; }

.current-call, .rule, .adoption-gate {
  margin: 32px 0 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  background: var(--paper-deep);
}
.current-call strong, .rule strong { display: block; font-size: 1.18rem; }
.current-call p, .rule p, .adoption-gate p { margin: 8px 0 0; color: var(--muted); }
.access-note { max-width: 650px; color: var(--muted); font-size: 0.92rem; }

.route { display: grid; grid-template-columns: 44px minmax(0, 1fr); border-top: 1px solid var(--line); }
.route-step {
  padding-top: 48px;
  color: var(--accent-dark);
  font: 750 0.8rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.route-content { min-width: 0; padding: 46px 0 58px; }
.route-content > p:not(.section-label, .fine-print) { max-width: 660px; color: var(--muted); }
.route code:not(pre code) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }

pre {
  max-width: 100%;
  margin: 24px 0 0;
  padding: 22px 24px;
  overflow-x: auto;
  border-radius: 4px;
  color: var(--code-ink);
  background: var(--code);
  font: 0.86rem/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.table-wrap { max-width: 100%; margin-top: 24px; overflow-x: auto; }
.table-wrap:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 15px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font: 700 0.72rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.06em; text-transform: uppercase; }

.evidence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.evidence div { padding: 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.28); }
.evidence span, .evidence small { display: block; color: var(--muted); font-size: 0.76rem; }
.evidence strong { display: block; margin: 4px 0; font-size: 1.45rem; line-height: 1.2; }
.evidence small { color: var(--verified); }
.fine-print { margin: 16px 0 0; color: var(--muted); font-size: 0.82rem; }

.adoption-gate { border-left: 1px solid var(--line); }
.actions { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; margin-top: 28px; }
.actions .primary { padding: 11px 16px; border-radius: 999px; color: white; background: var(--accent-dark); font-weight: 750; text-decoration: none; }
.actions .primary:hover { background: var(--ink); }

footer { margin-left: 44px; padding-top: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
footer p { margin-bottom: 4px; }

.plain-header { max-width: 880px; margin-bottom: 48px; }
.plain-header h1 { font-size: clamp(2.75rem, 7vw, 5rem); overflow-wrap: anywhere; }
.dates { display: flex; gap: 36px; margin: 28px 0 16px; padding: 16px 0; border-block: 1px solid var(--line); }
.dates div { min-width: 210px; }
.dates dt { color: var(--muted); font: 700 0.7rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.06em; text-transform: uppercase; }
.dates dd { margin: 4px 0 0; font-weight: 750; }
.legend-block, .plain-callout { margin: 32px 0 54px; padding: 22px 0; border-block: 1px solid var(--line); }
.legend-block h2, .plain-callout h2 { font-size: 1.3rem; }
.legend-block dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin: 20px 0 0; }
.legend-block dl div { display: grid; grid-template-columns: 125px 1fr; gap: 10px; }
.legend-block dt, .legend-block dd { margin: 0; }
.legend-block dd { color: var(--muted); font-size: 0.84rem; }
.status { display: inline-block; font: 750 0.68rem/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; }
.status-benchmarked { color: var(--verified); }
.status-screened { color: #205b8d; }
.status-setup-blocked { color: #9a3121; }
.status-researched-only { color: var(--muted); }
.catalog-section { margin: 52px 0; }
.catalog-section > h2 { padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.catalog-section h2 small { color: var(--muted); font: 500 0.85rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.catalog-table { min-width: 940px; font-size: 0.82rem; }
.catalog-table th, .catalog-table td { padding: 12px 10px; }
.catalog-table th:nth-child(1) { width: 16%; }
.catalog-table th:nth-child(2) { width: 13%; }
.catalog-table th:nth-child(3) { width: 14%; }
.catalog-table th:nth-child(4) { width: 23%; }
.mono-cell { font: 0.75rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.experiment-list { margin-top: 58px; border-top: 1px solid var(--line); }
.experiment { padding: 40px 0; border-bottom: 1px solid var(--line); }
.experiment h2 { font-size: 1.8rem; }
.experiment p, .experiment li { max-width: 900px; }
.experiment li { margin-bottom: 6px; }
.coverage-evidence { margin-bottom: 54px; }
.coverage-evidence div { min-height: 96px; }
.result-table { min-width: 1180px; }
.result-table th:nth-child(1) { width: 7%; }
.result-table th:nth-child(2) { width: 10%; }
.result-table th:nth-child(3) { width: 18%; }
.result-table th:nth-child(4), .result-table th:nth-child(5), .result-table th:nth-child(6) { width: 8%; }
.result-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.72rem; line-height: 1.4; }

@media (max-width: 700px) {
  body { background: var(--paper); font-size: 16px; }
  .page { width: min(calc(100% - 28px), 820px); padding-top: 44px; }
  .site-nav { flex-direction: column; gap: 6px; margin-bottom: 38px; }
  .hero { padding-left: 0; }
  h1 { font-size: clamp(3rem, 15vw, 4.2rem); }
  .route { grid-template-columns: 30px minmax(0, 1fr); }
  .route-content { padding-left: 4px; }
  .evidence { grid-template-columns: 1fr; }
  footer { margin-left: 30px; }
  .wide-page footer { margin-left: 0; }
  .dates { flex-direction: column; gap: 14px; }
  .legend-block dl { grid-template-columns: 1fr; }
  .plain-header h1 { font-size: 2.55rem; }
  .legend-block dl div { grid-template-columns: 120px minmax(0, 1fr); }
}

@media (prefers-contrast: more) {
  :root { --muted: #3d3831; --line: #8c8375; }
}

@media print {
  body { background: white; }
  .page { width: auto; padding: 0; }
  .actions .primary { padding: 0; color: black; background: none; }
}
