:root {
  --paper: #f2efe6;
  --paper-2: #e5dfd1;
  --paper-3: #d6cebd;
  --ink: #17201c;
  --muted: #59635d;
  --green: #143d31;
  --green-2: #0b2a21;
  --green-3: #244f42;
  --orange: #df6338;
  --orange-dark: #a63f20;
  --cream: #fffdf7;
  --line: #bdb5a4;
  --code: #0d1512;
  --good: #2e7d5b;
  --radius: 4px;
  --shell: min(1180px, calc(100% - 40px));
  --shadow: 12px 12px 0 rgba(23, 32, 28, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 32, 28, .035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgba(23, 32, 28, .035) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--paper);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; }
code, pre { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; }
.shell { width: var(--shell); margin-inline: auto; }
.section { padding-block: 112px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 30;
  padding: 10px 14px;
  color: var(--cream);
  background: var(--green-2);
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  border-bottom: 1px solid rgba(23, 32, 28, .14);
  backdrop-filter: blur(14px);
}
.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -.025em;
  text-decoration: none;
}
.brand img { flex: 0 0 auto; }
.version {
  margin-left: 3px;
  padding: 2px 7px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 650 12px/1.5 "Cascadia Code", monospace;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links > a:not(.button) {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.nav-links > a:hover { color: var(--green); }
.menu-button {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 7px;
}
.menu-button span:not(.sr-only) {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px;
  background: var(--ink);
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: var(--cream);
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--orange);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}
.button:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--orange); }
.button-small { min-height: 38px; padding-inline: 15px; box-shadow: none; }
.button-small:hover { box-shadow: 3px 3px 0 var(--orange); }
.button-inverse {
  color: var(--green-2);
  background: var(--cream);
  border-color: var(--cream);
}
.text-link {
  font-weight: 800;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.text-link span { color: var(--orange); }
.text-link.light { color: var(--cream); }

.eyebrow {
  margin: 0 0 17px;
  color: var(--orange-dark);
  font: 750 12px/1.4 "Cascadia Code", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.signal {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(223, 99, 56, .14);
}
h1, h2, h3 { margin-top: 0; line-height: 1.06; letter-spacing: -.04em; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { margin-bottom: 27px; font-size: clamp(49px, 5.9vw, 84px); }
h1 em { color: var(--orange-dark); font-weight: 500; }
h2 { font-size: clamp(38px, 4.2vw, 61px); }
h3 { font-size: 20px; }
.lede {
  max-width: 700px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.65;
}
.section-tag {
  margin-bottom: 34px;
  padding-bottom: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font: 700 12px/1.4 "Cascadia Code", monospace;
  letter-spacing: .09em;
}
.light-tag { color: #91a59c; border-color: #35584d; }

.hero {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: clamp(44px, 6vw, 82px);
  align-items: center;
  min-height: 760px;
  padding-block: 86px 92px;
}
.hero-actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 50px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.hero-facts li { padding: 16px 20px 0 0; }
.hero-facts strong { display: block; font-size: 14px; }
.hero-facts span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.roster-board {
  color: #dce7e1;
  background: var(--code);
  border: 1px solid #34443d;
  border-radius: 7px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid #2d3e37;
}
.board-head > div { display: grid; gap: 4px; }
.board-head strong { color: var(--cream); font-size: 20px; }
.board-kicker, .board-state, .board-note {
  font-family: "Cascadia Code", monospace;
}
.board-kicker { color: #9bada5; font-size: 12px; letter-spacing: .1em; }
.board-state { color: #98c8ad; font-size: 12px; letter-spacing: .08em; white-space: nowrap; }
.board-state i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; background: #61b88b; border-radius: 50%; }
.board-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #2d3e37;
}
.board-metrics div { min-height: 112px; padding: 20px 15px; border-right: 1px solid #2d3e37; }
.board-metrics div:last-child { border: 0; }
.board-metrics strong { display: block; color: #f18a62; font: 500 26px/1 Georgia, serif; overflow-wrap: normal; white-space: nowrap; }
.board-metrics span { display: block; margin-top: 9px; color: #9aaca4; font-size: 12px; line-height: 1.4; }
.candidate-scroll { overflow-x: auto; padding: 10px 22px 12px; }
.candidate-scroll-hint { display: none; }
.candidate-table { min-width: 490px; font: 600 13px/1.4 "Cascadia Code", monospace; }
.candidate-table caption { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.candidate-table th, .candidate-table td { padding: 13px 10px; border-bottom: 1px solid #293932; }
.candidate-table thead th { color: #9bada5; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.candidate-table tbody th { color: #ecf2ef; overflow-wrap: anywhere; text-align: left; }
.candidate-table tbody tr:last-child th,
.candidate-table tbody tr:last-child td { border-bottom: 0; }
.pass { color: #75c499; }
.na { color: #d3a86d; }
.dash { color: #60716a; }
.board-note { margin: 0; padding: 15px 22px 18px; color: #a0b1a9; background: #111d18; font-size: 12px; line-height: 1.55; }

.truth-rail { color: #dce7e1; background: var(--green); border-block: 1px solid var(--green-2); }
.truth-rail .shell { display: grid; grid-template-columns: repeat(5, 1fr); }
.truth-rail span {
  padding: 16px 14px;
  border-right: 1px solid rgba(255,255,255,.12);
  font: 650 12px/1.4 "Cascadia Code", monospace;
  text-align: center;
}
.truth-rail span:first-child { border-left: 1px solid rgba(255,255,255,.12); }

.problem-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 90px; }
.problem-grid h2 { margin-bottom: 0; }
.problem-copy { padding-top: 37px; }
.problem-copy p { margin: 0 0 22px; color: var(--muted); font-size: 18px; }
.problem-copy p:first-child { color: var(--ink); font-size: 21px; }
.prompt-actions { display: flex; min-height: 44px; align-items: center; gap: 12px; margin-bottom: 8px; }
.copy-prompt {
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--cream);
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  font-weight: 800;
  cursor: pointer;
}
.copy-status { color: var(--muted); font-size: 13px; }
.coordinator-prompt {
  margin: 0 0 22px;
  padding: 18px;
  overflow-x: auto;
  color: #dce7e1;
  background: var(--code);
  border: 1px solid #34443d;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.workflow { color: #dce7e1; background: var(--green-2); }
.inverse h2 { color: var(--cream); max-width: 850px; }
.workflow .eyebrow { color: #ef8e68; }
.factory-line { margin: 60px 0 0; padding: 0; list-style: none; border-top: 1px solid #35584d; }
.factory-line li {
  display: grid;
  grid-template-columns: 95px .85fr 1.15fr;
  align-items: baseline;
  padding: 27px 0;
  border-bottom: 1px solid #35584d;
}
.factory-line .step-number { color: #ee8b65; font: 700 12px/1 "Cascadia Code", monospace; }
.factory-line div { display: contents; }
.factory-line h3 { margin: 0; color: var(--cream); font-size: 25px; }
.factory-line p { max-width: 600px; margin: 0; color: #9aada5; }

.controls-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; }
.section-heading > p:last-child { color: var(--muted); font-size: 18px; }
.control-ledger { border-top: 1px solid var(--ink); }
.control-ledger article {
  display: grid;
  grid-template-columns: 120px .85fr 1.15fr;
  gap: 22px;
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}
.control-ledger article > span { color: var(--orange-dark); font: 750 12px/1.4 "Cascadia Code", monospace; letter-spacing: .08em; }
.control-ledger h3, .control-ledger p { margin: 0; }
.control-ledger p { color: var(--muted); font-size: 14px; }

.routing { color: #dce7e1; background: var(--green); }
.routing-layout { display: grid; grid-template-columns: .7fr 1.3fr; gap: 80px; align-items: end; }
.routing-layout > div { min-width: 0; }
.routing h2 { color: var(--cream); }
.routing .eyebrow { color: #ef8e68; }
.routing-layout > div:first-child > p:last-child { color: #a5b8af; }
.route-table { overflow-x: auto; border: 1px solid #45685d; }
.route-scroll-hint { display: none; }
table { width: 100%; min-width: 660px; border-collapse: collapse; }
th, td { padding: 16px 17px; border-bottom: 1px solid #3d6256; text-align: left; }
th { color: #8fa69c; font: 650 12px/1.3 "Cascadia Code", monospace; letter-spacing: .08em; text-transform: uppercase; }
td { color: #d8e5df; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.035); }

.evidence { display: grid; grid-template-columns: 1fr 1fr; gap: 105px; align-items: center; }
.receipt-stack { position: relative; min-height: 390px; }
.receipt-card {
  position: absolute;
  display: grid;
  width: min(380px, 85%);
  min-height: 150px;
  padding: 24px;
  background: var(--cream);
  border: 1px solid var(--ink);
  box-shadow: 7px 7px 0 rgba(23, 32, 28, .12);
}
.receipt-card span { color: var(--orange-dark); font: 700 12px/1.4 "Cascadia Code", monospace; letter-spacing: .08em; }
.receipt-card strong { align-self: end; font: 700 18px/1.3 "Cascadia Code", monospace; }
.receipt-card small { color: var(--muted); font-family: "Cascadia Code", monospace; }
.request-card { left: 0; top: 0; transform: rotate(-2deg); }
.events-card { right: 0; top: 105px; transform: rotate(1.5deg); }
.result-card { left: 7%; top: 220px; border-color: var(--orange-dark); transform: rotate(-.7deg); }
.evidence-copy p:not(.eyebrow) { color: var(--muted); font-size: 18px; }

.quick-start { color: #dce7e1; background: var(--code); }
.quick-start .eyebrow { color: #ef8e68; }
.quick-layout { display: grid; grid-template-columns: .72fr 1.28fr; gap: 80px; align-items: center; }
.quick-layout > div:first-child > p:not(.eyebrow) { color: #9caea6; }
.terminal { overflow: hidden; background: #080d0b; border: 1px solid #34443d; border-radius: 6px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; color: #8fa299; background: #151f1b; font: 650 12px/1.4 "Cascadia Code", monospace; }
.terminal-bar span { width: 9px; height: 9px; background: #43534c; border-radius: 50%; }
.terminal-bar span:first-child { background: var(--orange); }
.terminal-bar b { margin-left: 8px; }
.terminal pre { margin: 0; padding: 25px; overflow-x: auto; font-size: 13px; line-height: 1.75; }
.prompt { color: #ed8c66; }
.comment { color: #71877d; }

.status-intro { display: grid; grid-template-columns: 1.15fr .85fr; gap: 90px; align-items: end; }
.status-intro h2 { margin-bottom: 0; }
.status-intro > p { color: var(--muted); font-size: 18px; }
.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 55px; border: 1px solid var(--line); }
.boundary-grid > div { padding: 34px; }
.boundary-grid > div + div { border-left: 1px solid var(--line); background: rgba(255,255,255,.28); }
.boundary-label { color: var(--orange-dark); font: 750 12px/1.4 "Cascadia Code", monospace; letter-spacing: .09em; }
.boundary-grid ul { margin: 22px 0 0; padding: 0; list-style: none; }
.boundary-grid li { position: relative; padding: 9px 0 9px 28px; border-bottom: 1px solid rgba(189,181,164,.55); }
.boundary-grid li:last-child { border: 0; }
.boundary-now li::before, .boundary-not li::before { position: absolute; left: 0; font-weight: 800; }
.boundary-now li::before { content: "✓"; color: var(--good); }
.boundary-not li::before { content: "—"; color: var(--orange-dark); }
.budget-note {
  display: grid;
  grid-template-columns: .32fr 1fr;
  gap: 38px;
  margin-top: 34px;
  padding: 27px;
  background: #efd4c5;
  border-left: 5px solid var(--orange);
}
.budget-note p { margin: 0; }

.final-cta { padding-block: 82px; color: var(--cream); background: var(--green-2); }
.final-cta .eyebrow { color: #ef8e68; }
.final-inner { display: grid; grid-template-columns: 1fr auto; gap: 70px; align-items: center; }
.final-inner h2 { max-width: 750px; margin-bottom: 0; }
.final-actions { display: grid; gap: 24px; justify-items: start; }
.site-footer { padding-block: 38px; color: #a7bbb2; background: #071a14; border-top: 1px solid #23463b; }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; }
.footer-brand { color: var(--cream); }
.footer-grid p { margin: 0; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { min-width: 44px; font-size: 13px; text-underline-offset: 4px; }
.site-header .brand,
.nav-links > a,
.text-link,
.footer-links a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 960px) {
  .hero, .problem-grid, .controls-layout, .routing-layout, .evidence, .quick-layout, .status-intro { grid-template-columns: 1fr; }
  .hero { padding-top: 68px; }
  .problem-grid, .controls-layout, .routing-layout, .evidence, .quick-layout, .status-intro { gap: 48px; }
  .factory-line li { grid-template-columns: 75px .8fr 1.2fr; }
  .control-ledger article { grid-template-columns: 110px 1fr; }
  .control-ledger article p { grid-column: 2; }
  .truth-rail .shell { grid-template-columns: repeat(3, 1fr); }
  .truth-rail span { border-bottom: 1px solid rgba(255,255,255,.12); }
  .final-inner { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --shell: min(100% - 28px, 1180px); }
  .section { padding-block: 78px; }
  .nav { min-height: 64px; }
  .site-header .brand { min-height: 44px; }
  .menu-button { display: inline-flex; }
  .nav-links {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: var(--cream);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links > a { min-height: 44px; padding: 10px 12px; }
  .nav-links .button { margin-top: 6px; }
  .hero-actions a { min-height: 44px; }
  .text-link { display: inline-flex; min-height: 44px; align-items: center; }
  .final-actions a { min-height: 44px; }
  .footer-links a { display: inline-flex; min-height: 44px; align-items: center; }
  .hero { min-height: auto; padding-block: 55px 70px; }
  h1 { font-size: clamp(45px, 13.5vw, 65px); }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts li { padding-bottom: 12px; }
  .board-head { display: grid; }
  .board-metrics { grid-template-columns: repeat(2, 1fr); }
  .board-metrics div:nth-child(2) { border-right: 0; }
  .board-metrics div:nth-child(-n+2) { border-bottom: 1px solid #2d3e37; }
  .candidate-scroll { padding-inline: 14px; }
  .candidate-scroll-hint { display: block; margin: 12px 14px 0; color: #a0b1a9; font: 650 12px/1.4 "Cascadia Code", monospace; }
  .route-scroll-hint { display: block; margin: 0 0 12px; color: #b8c9c1; font: 650 12px/1.4 "Cascadia Code", monospace; }
  .truth-rail .shell { grid-template-columns: 1fr; }
  .truth-rail span, .truth-rail span:first-child { border: 0; border-bottom: 1px solid rgba(255,255,255,.12); text-align: left; }
  .factory-line li { grid-template-columns: 45px 1fr; gap: 12px; }
  .factory-line div { display: block; }
  .factory-line p { margin-top: 9px; }
  .control-ledger article { grid-template-columns: 1fr; gap: 10px; }
  .control-ledger article p { grid-column: auto; }
  .receipt-stack { min-height: 420px; }
  .receipt-card { width: 88%; }
  .request-card { left: 0; }
  .events-card { right: 0; }
  .result-card { left: 3%; }
  .boundary-grid { grid-template-columns: 1fr; }
  .boundary-grid > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .boundary-grid > div { padding: 25px; }
  .budget-note { grid-template-columns: 1fr; gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
}

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