:root {
  color-scheme: light;
  --ink: #101513;
  --ink-2: #1b2320;
  --paper: #f1f0e9;
  --white: #fffefa;
  --line: #aab1aa;
  --muted: #59635d;
  --acid: #d9ee45;
  --cyan: #16aaa6;
  --cyan-dark: #08716f;
  --coral: #ed573f;
  --yellow: #f3c64c;
  --blue: #5575d9;
  --good: #5db98f;
  --mono: Consolas, "Courier New", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  letter-spacing: 0;
}
button, input { font: inherit; }
button, a { color: inherit; }
button { border-radius: 0; }
[hidden] { display: none !important; }
.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 13px;
  color: var(--ink);
  background: var(--acid);
  border: 2px solid var(--ink);
  font: 800 10px/1 var(--mono);
  text-decoration: none;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }
.eyebrow {
  margin: 0;
  color: var(--cyan-dark);
  font: 800 10px/1.4 var(--mono);
  text-transform: uppercase;
}

.site-header {
  min-height: 66px;
  display: flex;
  align-items: stretch;
  color: var(--white);
  background: var(--ink);
  border-bottom: 1px solid #303934;
}
.brand {
  min-width: 265px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 24px;
  border-right: 1px solid #39423d;
  text-decoration: none;
}
.brand span {
  color: var(--acid);
  font: 900 24px/1 var(--mono);
}
.brand b {
  font: 800 10px/1.2 var(--mono);
}
.site-header nav {
  margin-left: auto;
  display: flex;
  align-items: stretch;
}
.site-header nav a {
  min-width: 118px;
  display: grid;
  place-items: center;
  padding: 0 15px;
  border-left: 1px solid #39423d;
  color: #c8d0ca;
  font: 800 9px/1 var(--mono);
  text-decoration: none;
}
.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--ink);
  background: var(--acid);
  outline: 0;
}

.drift-hero {
  min-height: 580px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
  color: var(--white);
  background: var(--ink-2);
  border-bottom: 1px solid var(--ink);
}
.hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 76px max(28px, calc((100vw - 1480px) / 2 + 28px));
  background: var(--ink-2);
}
.hero-copy .eyebrow { color: var(--acid); }
.hero-copy h1 {
  max-width: 980px;
  margin: 22px 0 24px;
  font: 900 76px/.91 var(--mono);
  letter-spacing: 0;
  text-wrap: balance;
}
.hero-copy > p:last-of-type {
  max-width: 720px;
  margin: 0;
  color: #c7cec9;
  font-size: 15px;
  line-height: 1.72;
}
.hero-signal {
  max-width: 760px;
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
  color: #aeb8b1;
  font: 800 9px/1 var(--mono);
}
.hero-signal i { height: 1px; background: #65716a; }
.hero-signal strong {
  padding: 9px 11px;
  color: var(--ink);
  background: var(--acid);
  border: 1px solid var(--acid);
  font: inherit;
  text-align: center;
}
.hero-facts {
  margin: 0;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  border-left: 1px solid #3e4742;
  background: #131916;
}
.hero-facts div {
  min-height: 100px;
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  border-bottom: 1px solid #3e4742;
}
.hero-facts div:last-child { border-bottom: 0; }
.hero-facts dt {
  align-self: stretch;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--acid);
  border-right: 1px solid #3e4742;
  font: 900 13px/1 var(--mono);
}
.hero-facts dd {
  margin: 0;
  padding: 18px;
  color: #c3ccc5;
  font: 800 10px/1.5 var(--mono);
}

.compare-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 66px 28px 70px;
}
.workbench-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .58fr);
  gap: 54px;
  align-items: end;
  margin-bottom: 28px;
}
.workbench-header h2 {
  max-width: 900px;
  margin: 10px 0 0;
  font: 900 46px/.98 var(--mono);
  letter-spacing: 0;
}
.workbench-header > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.file-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--ink);
  background: var(--white);
}
.file-dock { min-width: 0; }
.file-dock > header {
  min-height: 86px;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--ink);
}
.file-dock > header > span {
  align-self: stretch;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  font: 800 9px/1 var(--mono);
}
.file-dock > header > div { padding: 14px 18px; }
.file-dock > header p {
  margin: 0 0 6px;
  color: var(--cyan-dark);
  font: 800 8px/1 var(--mono);
}
.file-dock > header h3 {
  margin: 0;
  font: 900 19px/1.1 var(--mono);
}
.file-drop {
  min-height: 195px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  cursor: pointer;

  background-color: #f6f7f2;
  text-align: center;
}
.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.file-drop::before {
  content: "+";
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--cyan-dark);
  border: 1px solid var(--ink);
  font: 900 27px/1 var(--mono);
}
.file-drop b { font: 900 11px/1.2 var(--mono); }
.file-drop small { color: var(--muted); font: 700 8px/1.5 var(--mono); }
.file-drop:hover,
.file-drop:focus-within { background-color: #ecf6ef; outline: 3px solid var(--acid); outline-offset: -3px; }
.file-status {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font: 800 8px/1 var(--mono);
}
.file-status span { color: var(--muted); }
.file-status code {
  min-width: 0;
  margin-left: auto;
  color: var(--cyan-dark);
  font: 700 8px/1 var(--mono);
  overflow-wrap: anywhere;
  text-align: right;
}
.file-status[data-state="loaded"] span { color: #176f4f; }
.file-status[data-state="error"] span { color: var(--coral); }
.pair-junction {
  display: grid;
  grid-template-rows: 1fr 1px auto 1px 1fr;
  place-items: center;
  padding: 16px 12px;
  color: var(--white);
  background: var(--ink);
  border-right: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  font: 900 10px/1 var(--mono);
}
.pair-junction i { width: 1px; height: 100%; background: #59645d; }
.pair-junction b {
  width: 100%;
  padding: 11px 4px;
  color: var(--ink);
  background: var(--acid);
  font: inherit;
  text-align: center;
}
.sample-rail {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) repeat(3, auto);
  border: 1px solid var(--ink);
  border-top: 0;
  background: #e5e8e1;
}
.sample-rail > div {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 10px 15px;
}
.sample-rail strong { font: 900 9px/1 var(--mono); }
.sample-rail small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.sample-rail button {
  min-height: 58px;
  padding: 10px 15px;
  border: 0;
  border-left: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: 800 8px/1.25 var(--mono);
}
.sample-rail button:hover,
.sample-rail button:focus-visible,
.sample-rail button[aria-pressed="true"] { color: var(--white); background: var(--cyan-dark); outline: 0; }
.sample-notice {
  min-height: 42px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  color: var(--ink);
  background: var(--yellow);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  font-size: 10px;
}
.sample-notice strong { font: 900 8px/1 var(--mono); }
.policy-gates {
  margin: 24px 0 0;
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--white);
}
.policy-gates legend {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: -1px;
  padding: 0 14px 0 0;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--ink);
  font: 900 9px/1 var(--mono);
}
.policy-gates legend span {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 48px;
  color: var(--ink);
  background: var(--acid);
}
.policy-gates > p {
  margin: 0;
  padding: 12px 15px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.5;
}
.policy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.policy-item {
  min-height: 72px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.policy-item:nth-child(3n) { border-right: 0; }
.policy-item:nth-last-child(-n + 3) { border-bottom: 0; }
.policy-item input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--cyan-dark);
}
.policy-item b { display: block; font: 900 9px/1.35 var(--mono); }
.policy-item small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.policy-item:hover { background: #f0f7f1; }
.compare-command {
  min-height: 100px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(300px, 440px);
  align-items: center;
  gap: 24px;
  margin-top: 14px;
  padding: 18px;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--ink);
}
.compare-command > div { display: grid; gap: 6px; }
.compare-command > div b { color: var(--acid); font: 900 9px/1 var(--mono); }
.compare-command > div small { color: #aeb8b1; font-size: 9px; }
.compare-command button {
  min-height: 62px;
  display: grid;
  grid-template-columns: 1fr 62px;
  align-items: stretch;
  padding: 0;
  color: var(--ink);
  background: var(--acid);
  border: 1px solid var(--acid);
  cursor: pointer;
}
.compare-command button span { display: grid; place-items: center; padding: 12px; font: 900 12px/1 var(--mono); }
.compare-command button b { display: grid; place-items: center; color: var(--white); background: var(--cyan-dark); font: 900 10px/1 var(--mono); }
.compare-command button:hover,
.compare-command button:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.compare-command button:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .48; }
.compare-command > p {
  min-height: 14px;
  grid-column: 1 / -1;
  margin: -8px 0 0;
  color: #ff806d;
  font: 700 9px/1.4 var(--mono);
}

.result-band { color: var(--white); background: var(--ink-2); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.result-shell { max-width: 1480px; margin: 0 auto; padding: 58px 28px 64px; }
.result-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.result-header .eyebrow { color: var(--acid); }
.result-header h2 { margin: 10px 0 0; font: 900 46px/.98 var(--mono); }
.digest {
  width: 250px;
  border: 1px solid #657069;
  background: #111713;
}
.digest span { display: block; padding: 7px 9px; color: #98a49c; border-bottom: 1px solid #657069; font: 800 8px/1 var(--mono); }
.digest code { min-height: 32px; display: flex; align-items: center; padding: 7px 9px; color: var(--acid); font: 700 9px/1 var(--mono); overflow-wrap: anywhere; }
.result-idle {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  border: 1px solid #58625c;

  background-color: #141a17;
}
.idle-mark { width: 76px; height: 76px; display: grid; place-items: center; color: var(--ink); background: var(--acid); font: 900 17px/1 var(--mono); }
.result-idle h3 { margin: 0; font: 900 22px/1.1 var(--mono); }
.result-idle p { max-width: 520px; margin: 9px 0 0; color: #aeb7b1; font-size: 11px; line-height: 1.6; }
.result-summary {
  margin: 0;
  display: grid;
  grid-template-columns: 1.25fr repeat(4, 1fr);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--ink);
}
.result-summary div { min-width: 0; padding: 14px; border-right: 1px solid var(--ink); }
.result-summary div:last-child { border-right: 0; }
.result-summary dt { color: var(--muted); font: 800 8px/1.3 var(--mono); }
.result-summary dd { margin: 11px 0 0; font: 900 20px/1 var(--mono); overflow-wrap: anywhere; }
.result-summary div:first-child dd { font-size: 13px; }
.trace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  border-right: 1px solid #58625c;
  border-bottom: 1px solid #58625c;
  border-left: 1px solid #58625c;
}
.trace-frame { position: relative; min-width: 0; min-height: 460px; background: #111713; }
.trace-frame canvas { width: 100%; height: 460px; display: block; }
.trace-legend {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 12px;
  padding: 8px 10px;
  color: #b7c0ba;
  background: #111713;
  border: 1px solid #4c5750;
  font: 800 7px/1 var(--mono);
}
.trace-legend span { display: flex; align-items: center; gap: 6px; }
.trace-legend i { width: 9px; height: 9px; display: block; }
.legend-added { background: var(--acid); }
.legend-removed { background: var(--coral); }
.legend-stable { background: #647068; }
.decision-panel {
  min-width: 0;
  padding: 25px 22px;
  color: var(--ink);
  background: var(--acid);
  border-left: 1px solid #58625c;
}
.decision-panel > p { margin: 0; font: 900 8px/1 var(--mono); }
.decision-panel > strong { display: block; margin-top: 16px; font: 900 30px/.94 var(--mono); overflow-wrap: anywhere; }
.decision-panel > span { min-height: 72px; display: block; margin-top: 14px; font-size: 10px; line-height: 1.55; }
.decision-panel dl { margin: 22px 0 0; border-top: 1px solid #6f7826; }
.decision-panel dl div { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid #6f7826; }
.decision-panel dt { font: 800 8px/1.3 var(--mono); }
.decision-panel dd { margin: 0; font: 900 9px/1.2 var(--mono); text-align: right; }
body[data-drift-decision="review-required"] .decision-panel { color: var(--white); background: var(--coral); }
body[data-drift-decision="review-required"] .decision-panel dl,
body[data-drift-decision="review-required"] .decision-panel dl div { border-color: #7d291f; }
body[data-drift-decision="change-observed"] .decision-panel { color: var(--ink); background: var(--yellow); }
.change-ledger,
.gate-ledger { margin-top: 26px; border: 1px solid #58625c; }
.change-ledger > header,
.gate-ledger > header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-bottom: 1px solid #58625c;
}
.change-ledger .eyebrow,
.gate-ledger .eyebrow { color: var(--cyan); }
.change-ledger h3,
.gate-ledger h3 { margin: 6px 0 0; font: 900 22px/1 var(--mono); }
.change-ledger > header > span { min-width: 48px; height: 48px; display: grid; place-items: center; color: var(--ink); background: var(--acid); font: 900 16px/1 var(--mono); }
.gate-ledger > header > p { max-width: 430px; margin: 0; color: #aeb7b1; font-size: 10px; line-height: 1.5; }
.ledger-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ledger-group { min-width: 0; padding: 18px; border-right: 1px solid #58625c; border-bottom: 1px solid #58625c; }
.ledger-group:nth-child(2n) { border-right: 0; }
.ledger-group:nth-last-child(-n + 2) { border-bottom: 0; }
.ledger-group h4 { margin: 0; color: var(--acid); font: 900 9px/1 var(--mono); }
.ledger-group ul { margin: 13px 0 0; padding: 0; list-style: none; }
.ledger-group li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid #39433d; font-size: 9px; line-height: 1.45; }
.ledger-group li b { color: #aeb7b1; font: 800 8px/1.3 var(--mono); }
.ledger-group li span { min-width: 0; overflow-wrap: anywhere; }
.ledger-empty { margin: 13px 0 0; color: #8d9991; font-size: 9px; }
.gate-results { display: grid; }
.gate-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 120px;
  align-items: center;
  border-bottom: 1px solid #58625c;
}
.gate-row:last-child { border-bottom: 0; }
.gate-row > * { align-self: stretch; display: flex; align-items: center; padding: 11px 14px; border-right: 1px solid #58625c; }
.gate-row > *:last-child { border-right: 0; }
.gate-row strong { font: 900 9px/1.35 var(--mono); }
.gate-row span { color: #b4beb7; font: 800 8px/1 var(--mono); }
.gate-row b { justify-content: center; color: var(--ink); background: #6f7c73; font: 900 8px/1 var(--mono); text-align: center; }
.gate-row[data-status="violated"] b { color: var(--white); background: var(--coral); }
.gate-row[data-status="not-observed"] b { background: var(--good); }
.gate-row[data-status="not-evaluable"] b { background: var(--yellow); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.result-actions button {
  min-height: 44px;
  padding: 10px 14px;
  color: var(--white);
  background: transparent;
  border: 1px solid #737f77;
  cursor: pointer;
  font: 900 8px/1 var(--mono);
}
.result-actions button:first-child { color: var(--ink); background: var(--acid); border-color: var(--acid); }
.result-actions button:hover,
.result-actions button:focus-visible { color: var(--ink); background: var(--white); outline: 0; }
.result-actions p { min-height: 16px; flex-basis: 100%; margin: 2px 0 0; color: var(--acid); font: 700 8px/1.4 var(--mono); }

.method-band { background: var(--cyan); border-bottom: 1px solid var(--ink); }
.method-shell { max-width: 1480px; margin: 0 auto; padding: 62px 28px; }
.method-shell .eyebrow { color: #e1fffb; }
.method-shell > header { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .55fr); gap: 54px; align-items: end; }
.method-shell h2 { max-width: 900px; margin: 12px 0 0; color: var(--white); font: 900 48px/.98 var(--mono); }
.method-shell > header > p:last-child { margin: 0; color: #e1fffb; font-size: 12px; line-height: 1.7; }
.method-shell ol { margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #075f5c; border-left: 1px solid #075f5c; list-style: none; }
.method-shell li { min-height: 190px; padding: 18px; color: var(--ink); background: #f8fbf4; border-right: 1px solid #075f5c; border-bottom: 1px solid #075f5c; }
.method-shell li span { color: var(--coral); font: 900 10px/1 var(--mono); }
.method-shell li h3 { margin: 34px 0 0; font: 900 14px/1.3 var(--mono); }
.method-shell li p { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.limits-band { color: var(--white); background: var(--blue); border-bottom: 1px solid var(--ink); }
.limits-shell { max-width: 1480px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, .8fr) minmax(420px, 1fr); gap: 56px; padding: 62px 28px; }
.limits-shell .eyebrow { color: #e3e9ff; }
.limits-shell h2 { margin: 12px 0 0; font: 900 43px/1 var(--mono); }
.limits-shell ul { margin: 0; padding: 0; border-top: 1px solid #304a9d; list-style: none; }
.limits-shell li { padding: 13px 0; border-bottom: 1px solid #304a9d; color: #f4f6ff; font-size: 11px; line-height: 1.55; }
.limits-shell nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.limits-shell nav a { padding: 9px 11px; color: var(--white); background: #405fc3; border: 1px solid #263e8e; font: 900 8px/1 var(--mono); text-decoration: none; }
.limits-shell nav a:hover,
.limits-shell nav a:focus-visible { color: var(--ink); background: var(--acid); outline: 0; }
.footer { min-height: 74px; display: flex; align-items: center; gap: 22px; padding: 16px 28px; color: var(--white); background: var(--ink); font: 900 9px/1 var(--mono); }
.footer > a { font-size: 13px; text-decoration: none; }
.footer > span { color: var(--acid); }
.footer nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 18px; }
.footer nav a { text-decoration: none; }
.footer a:hover,
.footer a:focus-visible { color: var(--acid); outline: 0; }
.noscript { margin: 0; padding: 12px; color: var(--white); background: var(--coral); font: 800 10px/1.5 var(--mono); }

@media (max-width: 1120px) {
  .drift-hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { min-height: 500px; padding: 70px 28px; }
  .hero-facts { grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr; border-top: 1px solid #3e4742; border-left: 0; }
  .hero-facts div { min-height: 92px; grid-template-columns: 58px 1fr; border-right: 1px solid #3e4742; border-bottom: 0; }
  .hero-facts div:last-child { border-right: 0; }
  .file-pair { grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); }
  .sample-rail { grid-template-columns: 1fr 1fr 1fr; }
  .sample-rail > div { grid-column: 1 / -1; border-bottom: 1px solid var(--ink); }
  .sample-rail button:first-of-type { border-left: 0; }
  .trace-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .method-shell ol { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .site-header { display: block; }
  .brand { min-height: 56px; border-right: 0; border-bottom: 1px solid #39423d; }
  .site-header nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .site-header nav a { min-width: 0; min-height: 48px; padding: 0 8px; text-align: center; line-height: 1.25; }
  .hero-copy { min-height: 440px; padding: 56px 20px 46px; }
  .hero-copy h1 { font-size: 54px; }
  .hero-copy > p:last-of-type { font-size: 13px; }
  .hero-signal { grid-template-columns: auto 1fr auto; }
  .hero-signal i:nth-of-type(2), .hero-signal span:last-child { display: none; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts div { border-bottom: 1px solid #3e4742; }
  .hero-facts div:nth-child(2n) { border-right: 0; }
  .hero-facts div:nth-last-child(-n + 2) { border-bottom: 0; }
  .compare-shell { padding: 46px 14px 50px; }
  .workbench-header,
  .method-shell > header,
  .limits-shell { grid-template-columns: 1fr; gap: 20px; }
  .workbench-header h2 { font-size: 36px; }
  .file-pair { grid-template-columns: 1fr; }
  .pair-junction { min-height: 72px; grid-template-columns: 1fr 1px auto 1px 1fr; grid-template-rows: 1fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); border-right: 0; border-left: 0; }
  .pair-junction i { width: 100%; height: 1px; }
  .pair-junction b { width: auto; min-width: 80px; }
  .file-dock > header { grid-template-columns: 62px 1fr; }
  .file-drop { min-height: 165px; }
  .sample-rail { grid-template-columns: 1fr; }
  .sample-rail button { min-height: 50px; border-top: 1px solid var(--ink); border-left: 0; }
  .sample-rail button:first-of-type { border-top: 0; }
  .sample-notice { display: grid; gap: 4px; }
  .policy-grid { grid-template-columns: 1fr 1fr; }
  .policy-item:nth-child(3n) { border-right: 1px solid var(--line); }
  .policy-item:nth-child(2n) { border-right: 0; }
  .policy-item:nth-last-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .policy-item:nth-last-child(-n + 2) { border-bottom: 0; }
  .compare-command { grid-template-columns: 1fr; }
  .compare-command > p { grid-column: auto; }
  .result-shell { padding: 46px 14px 50px; }
  .result-header { align-items: flex-start; flex-direction: column; }
  .result-header h2 { font-size: 36px; }
  .digest { width: 100%; }
  .result-idle { min-height: 270px; padding: 28px; }
  .result-summary { grid-template-columns: 1fr 1fr; }
  .result-summary div { border-bottom: 1px solid var(--ink); }
  .result-summary div:nth-child(2n) { border-right: 0; }
  .result-summary div:first-child { grid-column: 1 / -1; border-right: 0; }
  .result-summary div:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .trace-grid { grid-template-columns: 1fr; }
  .trace-frame,
  .trace-frame canvas { min-height: 520px; height: 520px; }
  .decision-panel { border-top: 1px solid #58625c; border-left: 0; }
  .ledger-groups { grid-template-columns: 1fr; }
  .ledger-group,
  .ledger-group:nth-child(2n),
  .ledger-group:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid #58625c; }
  .ledger-group:last-child { border-bottom: 0; }
  .gate-ledger > header { align-items: flex-start; flex-direction: column; }
  .gate-row { grid-template-columns: minmax(0, 1fr) 110px; }
  .gate-row > span { grid-column: 1 / -1; border-top: 1px solid #58625c; border-right: 0; }
  .method-shell { padding: 48px 14px; }
  .method-shell h2,
  .limits-shell h2 { font-size: 35px; }
  .limits-shell { padding: 48px 14px; }
  .limits-shell nav { grid-column: auto; }
  .footer { align-items: flex-start; flex-direction: column; }
  .footer nav { margin-left: 0; }
}

@media (max-width: 500px) {
  .hero-copy h1 { font-size: 43px; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts div { border-right: 0; border-bottom: 1px solid #3e4742; }
  .hero-facts div:nth-last-child(-n + 2) { border-bottom: 1px solid #3e4742; }
  .hero-facts div:last-child { border-bottom: 0; }
  .policy-grid { grid-template-columns: 1fr; }
  .policy-item,
  .policy-item:nth-child(2n),
  .policy-item:nth-child(3n),
  .policy-item:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .policy-item:last-child { border-bottom: 0; }
  .result-idle { align-items: flex-start; flex-direction: column; }
  .result-summary { grid-template-columns: 1fr; }
  .result-summary div,
  .result-summary div:first-child,
  .result-summary div:last-child { grid-column: auto; border-right: 0; border-bottom: 1px solid var(--ink); }
  .result-summary div:last-child { border-bottom: 0; }
  .trace-frame,
  .trace-frame canvas { min-height: 560px; height: 560px; }
  .trace-legend { right: 8px; bottom: 8px; left: 8px; flex-wrap: wrap; }
  .ledger-group li { grid-template-columns: 62px minmax(0, 1fr); }
  .gate-row { grid-template-columns: 1fr; }
  .gate-row > *,
  .gate-row > span { grid-column: auto; border-top: 0; border-right: 0; border-bottom: 1px solid #58625c; }
  .gate-row > b { min-height: 40px; }
  .result-actions { display: grid; }
  .result-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
