:root {
  --paper: #f2efe7;
  --paper-deep: #e7e1d4;
  --ink: #11213a;
  --muted: #5d6877;
  --line: rgba(17, 33, 58, 0.16);
  --line-strong: rgba(17, 33, 58, 0.34);
  --signal: #ff5e43;
  --signal-dark: #d73c23;
  --lime: #bff36a;
  --sky: #6bbcff;
  --white: #fffdf8;
  --shadow: 0 22px 70px rgba(17, 33, 58, 0.12);
  --radius: 22px;
  --max: 1220px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Iowan Old Style, Palatino Linotype, Book Antiqua, Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(17, 33, 58, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 33, 58, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: var(--sans);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: -100px;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgba(242, 239, 231, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.progress-track { height: 3px; background: var(--paper-deep); }
.progress-track span { display: block; height: 100%; background: var(--signal); transition: width 500ms ease; }
.nav-wrap {
  width: min(calc(100% - 40px), var(--max));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex: 0 0 auto; }
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--lime);
  font-weight: 900;
}
.brand b, .brand small { display: block; line-height: 1.1; }
.brand b { font-size: 0.88rem; letter-spacing: -0.01em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.09em; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  min-width: 64px;
  padding: 9px 8px 8px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease;
}
.site-nav a:hover { color: var(--ink); background: rgba(255,255,255,0.56); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--white); box-shadow: 0 3px 12px rgba(17,33,58,.07); }
.site-nav em, .site-nav span { display: block; font-style: normal; }
.site-nav em { color: var(--signal-dark); font-size: 0.61rem; font-weight: 800; letter-spacing: .12em; }
.site-nav span { margin-top: 2px; font-size: .68rem; font-weight: 750; white-space: nowrap; }
.nav-toggle { display: none; border: 0; background: transparent; }

main { overflow: clip; }
.page-shell { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.hero { padding: 92px 0 72px; }
.hero.compact { padding-bottom: 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 64px; align-items: end; }
.overline, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--signal-dark);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .15em;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
.display {
  max-width: 960px;
  margin: 18px 0 22px;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7vw, 7rem);
  font-weight: 500;
  line-height: .92;
  letter-spacing: -.055em;
}
.display .accent { color: var(--signal-dark); font-style: italic; }
.lede { max-width: 730px; color: var(--muted); font-size: clamp(1.08rem, 1.8vw, 1.35rem); line-height: 1.55; }
.hero-note {
  padding: 24px;
  border-top: 4px solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
}
.hero-note strong { display: block; margin-bottom: 8px; font-family: var(--serif); font-size: 1.55rem; line-height: 1.05; }
.hero-note p { margin: 0; color: var(--muted); font-size: .9rem; }

.section { padding: 72px 0; }
.section.tight { padding: 44px 0; }
.section.ink { color: var(--white); background: var(--ink); }
.section.signal { background: var(--signal); }
.section.paper-deep { background: var(--paper-deep); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .58fr); gap: 50px; align-items: end; margin-bottom: 38px; }
.section-head h2 {
  max-width: 760px;
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4.6vw, 4.4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
}
.section-head p { margin: 0; color: var(--muted); font-size: 1rem; }
.section.ink .section-head p { color: #b9c4d5; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { min-height: 210px; padding: 24px; border: 1px solid var(--line); background: rgba(255,253,248,.72); }
.metric-card.hot { color: white; background: var(--signal-dark); border-color: transparent; }
.metric-card.dark { color: white; background: var(--ink); border-color: transparent; }
.metric-card small { display: block; min-height: 38px; color: inherit; opacity: .7; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.metric-card strong { display: block; margin: 20px 0 8px; font-family: var(--serif); font-size: clamp(2.3rem, 4vw, 4rem); font-weight: 500; line-height: .9; letter-spacing: -.04em; }
.metric-card p { margin: 0; color: inherit; opacity: .72; font-size: .83rem; }

.story-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.story-card {
  position: relative;
  min-height: 250px;
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--white);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.story-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.story-card em { color: var(--signal-dark); font-size: .74rem; font-style: normal; font-weight: 900; letter-spacing: .13em; }
.story-card h3 { max-width: 470px; margin: 32px 0 12px; font-family: var(--serif); font-size: 2.2rem; font-weight: 500; line-height: 1; }
.story-card p { max-width: 520px; margin-bottom: 0; color: var(--muted); }
.story-card i { position: absolute; right: 25px; top: 24px; font-size: 1.7rem; font-style: normal; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.thirds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panel { padding: 30px; border: 1px solid var(--line); background: var(--white); }
.panel.soft { background: rgba(255,253,248,.62); }
.panel.dark { color: white; background: var(--ink); border-color: var(--ink); }
.panel.signal { background: #ffd1c8; }
.panel.lime { background: var(--lime); }
.panel h3 { margin-bottom: 12px; font-family: var(--serif); font-size: 1.8rem; font-weight: 500; line-height: 1.08; }
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }
.panel p, .panel li { color: var(--muted); }
.panel.dark p, .panel.dark li { color: #c8d1df; }
.panel ul { padding-left: 18px; }
.panel li + li { margin-top: 8px; }

.evidence-label { display: inline-flex; align-items: center; gap: 7px; font-size: .64rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.evidence-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.evidence-label.observed { color: #267561; }
.evidence-label.demonstrated { color: #176fb2; }
.evidence-label.proposed { color: var(--signal-dark); }
.evidence-label.unproven { color: #78638e; }
.source {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .68rem;
  overflow-wrap: anywhere;
}
.source button { flex: 0 0 auto; padding: 4px 8px; border: 1px solid var(--line); background: transparent; cursor: pointer; }

.quote {
  margin: 0;
  padding: 38px 0 38px 42px;
  border-left: 5px solid var(--signal);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.8vw, 3.5rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
}
.quote cite { display: block; margin-top: 20px; color: var(--muted); font-family: var(--sans); font-size: .75rem; font-style: normal; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.diagram { position: relative; padding: 34px; border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.flow { display: flex; align-items: stretch; gap: 12px; }
.flow.vertical { flex-direction: column; }
.flow-node { flex: 1; min-width: 0; padding: 20px; border: 1px solid var(--line); background: var(--paper); }
.flow-node strong { display: block; margin: 5px 0 7px; font-size: .94rem; }
.flow-node small { color: var(--muted); }
.flow-node.active { background: var(--lime); border-color: var(--ink); }
.flow-node.signal { background: #ffd1c8; border-color: var(--signal-dark); }
.flow-arrow { align-self: center; color: var(--signal-dark); font-weight: 900; }

.comparison { border-top: 2px solid var(--ink); }
.comparison-row { display: grid; grid-template-columns: 190px 1fr 1fr; border-bottom: 1px solid var(--line); }
.comparison-row > * { padding: 22px; }
.comparison-row > :not(:last-child) { border-right: 1px solid var(--line); }
.comparison-row b { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.comparison-row p { margin: 0; color: var(--muted); }
.comparison-head { color: white; background: var(--ink); }
.comparison-head > * { border-color: rgba(255,255,255,.18) !important; }

.bar-list { display: grid; gap: 20px; }
.bar-row { display: grid; grid-template-columns: 190px minmax(0,1fr) 90px; gap: 18px; align-items: center; }
.bar-row span { font-size: .82rem; font-weight: 750; }
.bar-track { height: 18px; background: rgba(17,33,58,.08); }
.bar-track i { display: block; height: 100%; background: var(--signal); }
.bar-row strong { text-align: right; font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }

.branch { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 110px; padding: 90px 0 25px; }
.branch::before { content: ''; position: absolute; left: 50%; top: 0; width: 2px; height: 70px; background: var(--ink); }
.branch::after { content: ''; position: absolute; left: calc(25% - 1px); right: calc(25% - 1px); top: 68px; height: 2px; background: var(--ink); }
.branch-side { position: relative; padding: 30px; border: 1px solid var(--line); background: var(--white); }
.branch-side::before { content: ''; position: absolute; left: 50%; top: -22px; width: 2px; height: 22px; background: var(--ink); }
.branch-side.new { border-top: 6px solid var(--signal); }
.branch-side.old { border-top: 6px solid var(--ink); }

.timeline { position: relative; display: grid; gap: 18px; }
.timeline::before { content: ''; position: absolute; left: 27px; top: 24px; bottom: 24px; width: 2px; background: var(--line-strong); }
.timeline-item { position: relative; display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 22px; }
.timeline-dot { z-index: 1; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--ink); font-size: .72rem; font-weight: 900; }
.timeline-item:nth-child(even) .timeline-dot { color: var(--ink); background: var(--lime); }
.timeline-card { padding: 24px; border: 1px solid var(--line); background: var(--white); }
.timeline-card header { display: flex; justify-content: space-between; gap: 18px; }
.timeline-card h3 { margin: 0; font-family: var(--serif); font-size: 1.65rem; font-weight: 500; }
.timeline-card time { flex: 0 0 auto; color: var(--signal-dark); font-weight: 900; }
.timeline-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.chip { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .68rem; font-weight: 750; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-row button { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-size: .76rem; font-weight: 800; }
.filter-row button[aria-pressed="true"] { color: white; background: var(--ink); }

.warning-stack { display: grid; gap: 12px; }
.warning { display: grid; grid-template-columns: 70px minmax(0,1fr); border: 1px solid var(--line); background: var(--white); }
.warning strong { display: grid; place-items: center; padding: 18px; color: var(--signal-dark); background: #ffd1c8; font-family: var(--serif); font-size: 1.7rem; }
.warning div { padding: 18px 22px; }
.warning h3 { margin: 0 0 4px; font-size: .95rem; }
.warning p { margin: 0; color: var(--muted); font-size: .84rem; }

.status-table { width: 100%; border-collapse: collapse; background: var(--white); }
.status-table th, .status-table td { padding: 18px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.status-table th { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.benchmark-table { margin-top: 24px; }
.benchmark-table td { color: var(--muted); font-size: .86rem; }
.benchmark-table td:first-child { color: var(--ink); }
.benchmark-note { margin-top: 24px; }
.status { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: .66rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.status.replace { background: var(--lime); }
.status.review { background: #ffd1c8; }
.status.retain { color: white; background: var(--ink); }

.callout { display: grid; grid-template-columns: 90px minmax(0,1fr); border: 2px solid var(--ink); background: var(--lime); }
.callout > strong { display: grid; place-items: center; border-right: 2px solid var(--ink); font-family: var(--serif); font-size: 2rem; }
.callout > div { padding: 24px; }
.callout h3 { margin-bottom: 5px; }
.callout p { margin: 0; color: rgba(17,33,58,.75); }

.site-footer {
  width: min(calc(100% - 40px), var(--max));
  margin: 78px auto 30px;
  padding: 32px 0;
  border-top: 2px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}
.site-footer strong { display: block; margin-top: 5px; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.next-link { display: grid; grid-template-columns: 1fr auto; column-gap: 20px; text-align: right; text-decoration: none; }
.next-link span { grid-column: 1; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
.next-link b { grid-column: 1; }
.next-link i { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--signal-dark); font-size: 2rem; font-style: normal; }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 500ms ease, transform 500ms ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .nav-toggle { display: grid; width: 48px; height: 42px; padding: 8px; place-content: center; gap: 4px; cursor: pointer; }
  .nav-toggle span { width: 22px; height: 2px; background: var(--ink); }
  .nav-toggle b { position: absolute; width: 1px; height: 1px; clip: rect(0 0 0 0); overflow: hidden; }
  .site-nav { position: absolute; top: 76px; left: 0; right: 0; display: none; grid-template-columns: repeat(2,1fr); padding: 18px 20px 24px; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
  .site-nav.is-open { display: grid; }
  .site-nav a { display: flex; align-items: center; gap: 10px; text-align: left; }
  .site-nav em, .site-nav span { display: inline; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .thirds { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .page-shell, .nav-wrap, .site-footer { width: min(calc(100% - 28px), var(--max)); }
  .brand small { display: none; }
  .hero { padding: 62px 0 48px; }
  .hero-grid, .section-head, .split { grid-template-columns: 1fr; gap: 28px; }
  .display { font-size: clamp(3rem, 16vw, 5.5rem); }
  .metric-grid, .story-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 180px; }
  .section { padding: 52px 0; }
  .section-head { align-items: start; }
  .flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .comparison-row { grid-template-columns: 1fr; }
  .comparison-row > :not(:last-child) { border-right: 0; border-bottom: 1px solid var(--line); }
  .bar-row { grid-template-columns: 1fr 70px; gap: 8px; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .bar-row strong { grid-column: 2; grid-row: 1; }
  .branch { grid-template-columns: 1fr; gap: 35px; padding-top: 60px; }
  .branch::before { height: 45px; }
  .branch::after { display: none; }
  .branch-side::before { left: 30px; }
  .timeline-card header { display: block; }
  .timeline-card time { display: block; margin-top: 4px; }
  .warning { grid-template-columns: 58px minmax(0,1fr); }
  .status-table { display: block; overflow-x: auto; }
  .site-footer { display: block; }
  .next-link { margin-top: 28px; text-align: left; grid-template-columns: 1fr auto; }
  .callout { grid-template-columns: 58px minmax(0,1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
