:root {
  --ink: #1c1b18;
  --coal: #292621;
  --paper: #fffaf0;
  --dust: #f2eadb;
  --sand: #ded0b7;
  --muted: #6d665d;
  --line: #b8aa91;
  --oxide: #9d3d2f;
  --oxide-dark: #67241d;
  --sage: #5f6d55;
  --ochre: #ba7a2c;
  --blue: #2f6670;
  --max: 1180px;
  --shadow: 8px 8px 0 rgba(28, 27, 24, .12);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 12%, rgba(186, 122, 44, .1), transparent 28rem),
    linear-gradient(90deg, rgba(28, 27, 24, .025) 1px, transparent 1px),
    var(--dust);
  background-size: auto, 34px 34px, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--oxide); }
button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: 1rem;
  padding: .7rem 1rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(28, 27, 24, .35);
  background: rgba(242, 234, 219, .95);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--max));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.025em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--oxide);
  color: white;
  font-family: Georgia, serif;
  font-size: .78rem;
  box-shadow: 3px 3px 0 var(--ink);
}

.brand small {
  display: block;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  font-size: .84rem;
  font-weight: 750;
  text-decoration: none;
}
.site-nav a[aria-current="page"] { color: var(--oxide); }
.source-link { border-left: 1px solid var(--line); padding-left: 1.2rem; }

.menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid var(--ink);
  background: transparent;
  padding: .55rem .75rem;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.status-rail {
  border-bottom: 1px solid var(--line);
  background: var(--coal);
  color: #f7f0e4;
}
.status-rail .inner {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: .6rem 0;
  display: flex;
  gap: 1rem 2rem;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.status-rail strong { color: #ffd8a3; }

.shell { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }

.hero {
  min-height: 650px;
  padding: clamp(3.5rem, 8vw, 7.5rem) 0 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
}

.eyebrow,
.meta-line,
.section-number,
.evidence-label,
.kicker {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow { color: var(--oxide); }
.hero h1,
.page-hero h1 {
  max-width: 860px;
  margin: .8rem 0 1.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  line-height: .88;
  letter-spacing: -.065em;
  text-wrap: balance;
}
.hero h1 em { color: var(--oxide); font-style: italic; font-weight: 400; }
.hero-copy { max-width: 680px; font-size: clamp(1.08rem, 2vw, 1.32rem); }

.button-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .75rem 1.1rem;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: white;
  font-size: .83rem;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--oxide);
}
.button:hover { background: var(--oxide); color: white; }
.button.secondary { background: transparent; color: var(--ink); box-shadow: none; }
.button.secondary:hover { background: var(--paper); }

.hero-visual { position: relative; margin: 0; }
.hero-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -18px 24px 24px -18px;
  border: 1px solid var(--oxide);
  background: repeating-linear-gradient(-45deg, transparent 0 9px, rgba(157,61,47,.1) 9px 10px);
}
.hero-visual img {
  width: 100%;
  height: auto;
  max-height: 580px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 35% 50%;
  filter: saturate(.88) contrast(1.03);
}

figcaption {
  padding-top: .7rem;
  color: var(--muted);
  font-size: .76rem;
}

.stamp {
  position: absolute;
  right: -18px;
  top: -22px;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 2px solid var(--oxide);
  border-radius: 50%;
  background: var(--paper);
  color: var(--oxide);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(7deg);
}

.section { padding: clamp(4rem, 8vw, 7rem) 0; border-top: 1px solid var(--line); }
.section-heading {
  margin-bottom: 2.4rem;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(220px, .45fr);
  gap: 1.4rem;
  align-items: start;
}
.section-heading h2 {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: -.045em;
}
.section-heading p { margin: .2rem 0 0; color: var(--muted); }
.section-number { color: var(--oxide); }

.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.task-card {
  min-height: 280px;
  padding: 2rem;
  position: relative;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.task-card:nth-child(odd) { border-right: 1px solid var(--line); }
.task-card:hover { background: var(--paper); color: var(--ink); }
.task-card .task-id { color: var(--oxide); font: 800 .68rem/1 ui-monospace, monospace; letter-spacing: .12em; }
.task-card h3 { max-width: 440px; margin: 3rem 0 .8rem; font: 700 clamp(1.7rem, 3vw, 2.7rem)/1 Georgia, serif; letter-spacing: -.035em; }
.task-card p { max-width: 520px; color: var(--muted); }
.task-card .arrow { position: absolute; right: 1.7rem; top: 1.6rem; font-size: 1.4rem; }
.task-card:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 235px; }

.method-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 4rem; }
.method-copy h2 { margin: 0 0 1rem; font: 700 clamp(2.1rem, 4vw, 4rem)/1 Georgia, serif; letter-spacing: -.04em; }
.legend { margin: 0; border-top: 2px solid var(--ink); }
.legend-row { display: grid; grid-template-columns: 170px 1fr; gap: 1.2rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.legend-row dd, .legend-row dt { margin: 0; }
.legend-row dd { color: var(--muted); }

.evidence-label { display: inline-flex; align-items: center; gap: .45rem; }
.evidence-label::before { content: ""; width: 9px; height: 9px; border: 1px solid currentColor; transform: rotate(45deg); }
.official { color: var(--sage); }
.developer { color: var(--blue); }
.community { color: var(--ochre); }
.derived { color: var(--oxide); }
.unknown { color: var(--muted); }

.hold-list { counter-reset: hold; margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.hold-list li { display: grid; grid-template-columns: 55px 1fr auto; gap: 1.2rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.hold-list li::before { counter-increment: hold; content: counter(hold, decimal-leading-zero); color: var(--oxide); font: 800 .7rem/1 ui-monospace, monospace; }
.hold-reason { color: var(--muted); font-size: .86rem; }

.page-hero { padding: clamp(3rem, 7vw, 6.5rem) 0 3.5rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 960px; font-size: clamp(3rem, 7vw, 6rem); }
.page-deck { max-width: 760px; font-size: clamp(1.08rem, 2vw, 1.3rem); }
.page-meta { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; margin-top: 1.5rem; color: var(--muted); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: clamp(2.5rem, 6vw, 6rem); padding: 4rem 0 6rem; }
.article { min-width: 0; }
.article h2 { margin: 3.5rem 0 1rem; font: 700 clamp(2rem, 4vw, 3.3rem)/1.05 Georgia, serif; letter-spacing: -.035em; }
.article h3 { margin: 2.4rem 0 .6rem; font-size: 1.2rem; line-height: 1.25; }
.article p, .article li { max-width: 760px; }
.article li + li { margin-top: .55rem; }

.direct-answer {
  margin-bottom: 3rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 2px solid var(--ink);
  border-left: 9px solid var(--oxide);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.direct-answer h2 { margin: .6rem 0 1rem; font-size: clamp(1.8rem, 3vw, 2.7rem); }
.direct-answer p:last-child { margin-bottom: 0; }

.article-figure { margin: 3rem 0; }
.article-figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.article-figure .caption-line { display: flex; justify-content: space-between; gap: 1rem; }

.step-list { counter-reset: step; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.step-list li { counter-increment: step; display: grid; grid-template-columns: 58px 1fr; gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.step-list li::before { content: counter(step, decimal-leading-zero); color: var(--oxide); font: 900 1rem/1 ui-monospace, monospace; padding-top: .35rem; }
.step-list strong { display: block; margin-bottom: .3rem; font-size: 1.05rem; }

.side-note { align-self: start; position: sticky; top: 104px; }
.side-note-box { margin-bottom: 1rem; padding: 1.25rem; border-top: 2px solid var(--ink); background: rgba(255, 250, 240, .55); }
.side-note-box h2 { margin: 0 0 .7rem; font: 800 .72rem/1 ui-monospace, monospace; letter-spacing: .11em; text-transform: uppercase; }
.side-note-box p, .side-note-box li { font-size: .82rem; }
.side-note-box ul { margin: .7rem 0 0; padding-left: 1.1rem; }

.callout { margin: 2rem 0; padding: 1.35rem; border-left: 5px solid var(--ochre); background: rgba(186, 122, 44, .1); }
.callout strong { display: block; margin-bottom: .25rem; }

.filter-row { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.5rem 0; }
.filter-row button { min-height: 44px; padding: .55rem .8rem; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: 800 .7rem/1 ui-monospace, monospace; text-transform: uppercase; }
.filter-row button[aria-pressed="true"] { background: var(--ink); color: white; }

.status-ledger { border-top: 2px solid var(--ink); }
.status-row {
  display: grid;
  grid-template-columns: 155px minmax(220px, .8fr) minmax(280px, 1.2fr);
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.status-row h3 { margin: 0; font: 700 1.06rem/1.25 Georgia, serif; }
.status-row p { margin: 0; color: var(--muted); font-size: .9rem; }

.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 2rem 2rem; border-left: 1px solid var(--line); }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .3rem; width: 10px; height: 10px; background: var(--oxide); transform: rotate(45deg); }
.timeline time { color: var(--oxide); font: 800 .7rem/1 ui-monospace, monospace; text-transform: uppercase; }

.systems-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.system-block { min-height: 260px; padding: 2rem; background: var(--dust); }
.system-block h3 { margin: 1.4rem 0 .7rem; font: 700 1.75rem/1 Georgia, serif; }
.system-block p { color: var(--muted); }
.system-block ul { padding-left: 1.1rem; }

.image-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 3rem 0; }
.image-pair figure { margin: 0; }
.image-pair img {
  width: 100%;
  height: auto;
  max-height: 320px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.image-pair figure:first-child img { object-position: 56% 50%; }
.image-pair figure:last-child img { object-position: 44% 56%; }

.sources { margin-top: 4rem; padding-top: 2rem; border-top: 2px solid var(--ink); }
.sources h2 { margin-top: 0; font-size: 1.5rem; }
.sources li { word-break: break-word; }

.next-route { margin-top: 4rem; padding: 2rem; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; background: var(--coal); color: #f7f0e4; }
.next-route h2 { margin: 0 0 .5rem; color: white; }
.next-route p { margin: 0; color: #cfc6b7; }
.next-route .button { border-color: white; box-shadow: 4px 4px 0 var(--ochre); }

.site-footer { padding: 3.5rem 0; border-top: 1px solid var(--line); background: var(--coal); color: #d7cdbd; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.site-footer strong { color: white; }
.site-footer p { max-width: 650px; font-size: .84rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; align-content: start; }

.not-found { min-height: 72vh; display: grid; place-items: center; text-align: center; }
.not-found h1 { margin: 0; font: 700 clamp(5rem, 20vw, 13rem)/.8 Georgia, serif; color: var(--oxide); }

@media (max-width: 900px) {
  .menu-button { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 72px; padding: 1rem 20px 1.5rem; border-bottom: 2px solid var(--ink); background: var(--paper); }
  .site-nav[data-open="true"] { display: block; }
  .site-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .source-link { border-left: 0; padding-left: 0; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-visual { width: min(86%, 560px); margin: 1rem 0 0 auto; }
  .hero-visual img { max-height: none; aspect-ratio: 16 / 11; object-position: 42% 52%; }
  .section-heading { grid-template-columns: 62px 1fr; }
  .section-heading p { grid-column: 2; }
  .method-grid, .article-layout { grid-template-columns: 1fr; }
  .side-note { position: static; order: 2; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
  .status-row { grid-template-columns: 135px 1fr; }
  .status-row p { grid-column: 2; }
}

@media (max-width: 620px) {
  .header-inner, .shell, .status-rail .inner { width: min(calc(100% - 36px), var(--max)); }
  .brand small { display: none; }
  .status-rail .inner { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem 1rem; }
  .hero { padding-top: 3.5rem; gap: 2.5rem; }
  .hero h1, .page-hero h1 { letter-spacing: -.055em; }
  .hero-visual { width: calc(100% - 16px); }
  .stamp { right: -8px; width: 86px; height: 86px; font-size: .58rem; }
  .section-heading { display: block; }
  .section-number { display: block; margin-bottom: .8rem; }
  .section-heading p { margin-top: 1rem; }
  .task-grid, .systems-grid, .image-pair, .footer-grid, .side-note { grid-template-columns: 1fr; }
  .task-card:nth-child(odd) { border-right: 0; }
  .task-card { min-height: 235px; padding: 1.45rem 0; }
  .task-card .arrow { right: 0; }
  .legend-row { grid-template-columns: 1fr; gap: .4rem; }
  .hold-list li { grid-template-columns: 40px 1fr; }
  .hold-reason { grid-column: 2; }
  .article-layout { padding-top: 2rem; }
  .status-row { grid-template-columns: 1fr; }
  .status-row p { grid-column: 1; }
  .next-route { grid-template-columns: 1fr; padding: 1.5rem; }
  .image-pair img { max-height: none; aspect-ratio: 16 / 10; }
  .image-pair figure:first-child img { object-position: 54% 50%; }
  .image-pair figure:last-child img { object-position: 42% 56%; }
}

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