:root {
  --paper: #edeff1;
  --panel: #f8f9fa;
  --ink: #12181f;
  --steel: #55626d;
  --rule: #c5ccd3;
  --hazard: #ffc40d;
  --breach: #c8102e;
  --breach-soft: #fbe4e7;
  --held: #0b7a5c;
  --held-soft: #dcf1ea;
  --refused: #8a95a0;
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--body); -webkit-text-size-adjust: 100%; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--hazard); border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }
.muted { color: var(--steel); }
.notice { padding: 16px 20px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 2px solid var(--ink); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.35rem/1 var(--display); font-stretch: 125%; letter-spacing: .01em; }
.target { width: 28px; height: 28px; flex: none; }
.top nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: .95rem; font-weight: 600; }
.top nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { border-bottom-color: var(--ink); }
.top nav .repo { background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 2px; border-bottom: 0; }
@media (max-width: 720px) { .top { position: static; } }

/* type */
h1, h2, h3 { font-family: var(--display); font-stretch: 125%; margin: 0; line-height: 1.08; letter-spacing: -.005em; }
h1 { font-weight: 800; font-size: clamp(1.9rem, 5.2vw, 3.5rem); max-width: 18ch; text-wrap: balance; }
h2 { font-weight: 800; font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-bottom: 18px; }
h3 { font-weight: 700; font-size: 1.1rem; font-stretch: 100%; }
.lede { font-size: 1.15rem; max-width: 62ch; margin: 18px 0 0; }
.block { padding-top: 56px; padding-bottom: 8px; }
.block > p, .intro { max-width: 66ch; }
.num { font-variant-numeric: tabular-nums; }

/* hero */
.hero { padding-top: 44px; padding-bottom: 12px; }
.exhibit { display: grid; grid-template-columns: minmax(0, 1.05fr) 44px minmax(0, 1fr); align-items: stretch; margin-top: 30px; border: 2px solid var(--ink); background: var(--panel); }
.exhibit > section { padding: 18px 20px 20px; min-width: 0; }
.exhibit h3 { margin-bottom: 12px; }
.arrow { display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--hazard); font: 800 1.4rem var(--display); }
.arrow span { writing-mode: vertical-rl; letter-spacing: .12em; font-size: .8rem; }
@media (max-width: 820px) {
  .exhibit { grid-template-columns: 1fr; }
  .arrow { height: 40px; } .arrow span { writing-mode: horizontal-tb; }
}
.page-excerpt { font: 400 .92rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; color: var(--steel); }
.page-excerpt mark { background: var(--hazard); color: var(--ink); padding: 1px 2px; box-shadow: 0 0 0 1px var(--ink); font-weight: 600; }
.caption { font-size: .88rem; color: var(--steel); margin: 12px 0 0; }

/* order slip */
.slip { width: 100%; border-collapse: collapse; font-size: .95rem; }
.slip th, .slip td { text-align: left; padding: 7px 8px 7px 0; border-top: 1px solid var(--rule); vertical-align: top; }
.slip thead th { border-top: 0; font-weight: 600; color: var(--steel); font-size: .85rem; padding-bottom: 4px; }
.slip tbody th { font-weight: 600; white-space: nowrap; padding-right: 14px; }
.slip .ask { color: var(--steel); }
.slip .v { width: 1%; white-space: nowrap; font-weight: 700; padding-right: 0; }
.slip tr.bad td, .slip tr.bad th { background: var(--breach-soft); }
.slip tr.bad td:first-of-type { box-shadow: inset 3px 0 0 var(--breach); padding-left: 8px; }
.slip tr.bad .v { color: var(--breach); }
.slip tr.ok .v { color: var(--held); }
@media (max-width: 560px) {
  .slip, .slip tbody, .slip tr, .slip th, .slip td { display: block; width: auto; }
  .slip thead { display: none; }
  .slip tr { padding: 8px 0; border-top: 1px solid var(--rule); }
  .slip th, .slip td { border: 0; padding: 0; background: none !important; box-shadow: none !important; }
  .slip tr.bad { border-left: 4px solid var(--breach); padding-left: 10px; background: var(--breach-soft); }
  .slip .ask::before { content: "Asked for: "; }
  .slip .v { width: auto; }
}

/* chips: seatbelt verdicts */
.gates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.chip { border: 1.5px solid var(--ink); padding: 8px 10px; font-size: .88rem; line-height: 1.3; background: #fff; }
.chip b { display: block; font-size: .85rem; }
.chip.bad { background: var(--breach); border-color: var(--breach); color: #fff; }
.chip.good { background: var(--held-soft); border-color: var(--held); }
.chip.neutral { background: #fff; border-style: dashed; color: var(--steel); }
@media (max-width: 560px) { .gates { grid-template-columns: 1fr; } }

/* tallies / bars */
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 4px 0 18px; font-size: .92rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 14px; display: inline-block; border: 1.5px solid var(--ink); }
.sw.faithful { background: var(--held); border-color: var(--held); }
.sw.stop { background: repeating-linear-gradient(135deg, var(--refused) 0 3px, #dfe3e7 3px 6px); border-color: var(--refused); }
.sw.breach { background: var(--breach); border-color: var(--breach); }
.sw.error { background: #fff; border-style: dashed; border-color: var(--steel); }
.board { border-top: 2px solid var(--ink); }
.board-head, .board-row { display: grid; grid-template-columns: 210px minmax(180px, 1fr) repeat(3, 76px); gap: 0 14px; align-items: center; }
.board-head { padding: 10px 0 6px; font-size: .85rem; font-weight: 600; color: var(--steel); }
.board-head .span3 { grid-column: 3 / 6; text-align: center; border-bottom: 1.5px solid var(--steel); padding-bottom: 2px; }
.board-head .sub { text-align: center; font-weight: 700; color: var(--ink); }
.group-title { margin: 22px 0 4px; font: 700 1rem var(--display); font-stretch: 112%; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.group-title small { font: 400 .9rem var(--body); color: var(--steel); }
.board-row { padding: 9px 0; border-top: 1px solid var(--rule); }
.board-row .name { font-weight: 600; line-height: 1.25; }
.board-row .name small { display: block; font-weight: 400; color: var(--steel); }
.bar { display: flex; height: 26px; gap: 2px; }
.seg { display: flex; align-items: center; justify-content: center; min-width: 2px; color: #fff; font-size: .85rem; font-weight: 700; overflow: hidden; }
.seg.faithful { background: var(--held); }
.seg.stop { background: repeating-linear-gradient(135deg, var(--refused) 0 3px, #e3e7ea 3px 6px); color: var(--ink); }
.seg.stop span { background: #fff; padding: 0 4px; border-radius: 2px; }
.seg.breach { background: var(--breach); }
.seg.error { background: #fff; border: 1.5px dashed var(--steel); color: var(--steel); }
.leak { text-align: center; font-weight: 700; }
.leak.zero { color: var(--held); }
.leak.some { color: var(--breach); }
.leak.none-yet { color: var(--steel); font-weight: 400; }
.leak small { display: block; font-weight: 400; color: var(--steel); font-size: .78rem; }
@media (max-width: 820px) {
  .board-head { display: none; }
  .board-row { grid-template-columns: repeat(3, 1fr); row-gap: 8px; }
  .board-row .name, .board-row .bar-wrap { grid-column: 1 / -1; }
  .leak::before { content: attr(data-l); display: block; font-weight: 400; font-size: .78rem; color: var(--steel); }
}
.takeaways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; margin: 30px 0 0; border: 2px solid var(--ink); }
.takeaways > div { padding: 16px 18px; border-left: 1.5px solid var(--ink); background: var(--panel); }
.takeaways > div:first-child { border-left: 0; }
.takeaways b { display: block; font: 800 1.05rem/1.2 var(--display); font-stretch: 112%; margin-bottom: 6px; }
@media (max-width: 700px) { .takeaways > div { border-left: 0; border-top: 1.5px solid var(--ink); } .takeaways > div:first-child { border-top: 0; } }
details.table-view { margin-top: 16px; }
details summary { cursor: pointer; font-weight: 600; }
.plain-table { border-collapse: collapse; width: 100%; font-size: .92rem; margin-top: 8px; }
.plain-table th, .plain-table td { text-align: left; border-top: 1px solid var(--rule); padding: 5px 10px 5px 0; }

/* heatmap */
.heat-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
.heat { border-collapse: separate; border-spacing: 0 2px; width: 100%; min-width: 640px; }
.heat th { font-size: .85rem; text-align: center; font-weight: 600; color: var(--steel); padding: 8px 6px 4px; vertical-align: bottom; }
.heat th:first-child { text-align: left; }
.heat td { padding: 0; }
.heat .scn { padding-right: 12px; }
.heat .scn button { all: unset; cursor: pointer; display: block; width: 100%; padding: 6px 0; font-weight: 600; line-height: 1.25; }
.heat .scn button:hover { text-decoration: underline; }
.heat .scn button:focus-visible { outline: 3px solid var(--ink); box-shadow: 0 0 0 5px var(--hazard); }
.heat .scn small { display: block; font-weight: 400; color: var(--steel); }
.cell { text-align: center; font-weight: 700; padding: 8px 4px; border-left: 2px solid var(--paper); min-width: 96px; font-variant-numeric: tabular-nums; }
.lvl-row td, .lvl-row th { padding: 14px 0 2px; font: 700 .95rem var(--display); font-stretch: 112%; text-align: left; }

/* lab & playground controls */
.controls { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lab, .field label, .field .lab { font-size: .88rem; font-weight: 600; color: var(--steel); }
select, input[type="text"], input[type="number"] { font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 2px; padding: 7px 9px; min-height: 40px; max-width: 100%; }
select { min-width: 220px; }
input[type="number"] { width: 110px; }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border: 2px solid var(--ink); background: var(--panel); }
.lab-grid > section { padding: 18px 20px 20px; min-width: 0; }
.lab-grid > section + section { border-left: 2px solid var(--ink); }
@media (max-width: 820px) { .lab-grid { grid-template-columns: 1fr; } .lab-grid > section + section { border-left: 0; border-top: 2px solid var(--ink); } }
.quote { margin: 0 0 14px; padding: 10px 12px; border-left: 4px solid var(--steel); background: #fff; font-size: .95rem; }
.quote small { display: block; color: var(--steel); }
.verdict { margin: 14px 0 0; padding: 10px 12px; border: 1.5px solid var(--ink); background: #fff; font-size: .95rem; }
.verdict ul { margin: 6px 0 0; padding-left: 20px; }
.pp { margin: 12px 0 0; font-size: .9rem; color: var(--steel); }
.pp code, .method code { font-family: var(--mono); font-size: .88em; background: #e1e5e9; padding: 1px 5px; border-radius: 2px; }
.play-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); border: 2px solid var(--ink); background: var(--panel); }
.play-grid > section { padding: 18px 20px 20px; min-width: 0; }
.play-grid > section + section { border-left: 2px solid var(--ink); }
@media (max-width: 860px) { .play-grid { grid-template-columns: 1fr; } .play-grid > section + section { border-left: 0; border-top: 2px solid var(--ink); } }
.items { display: grid; grid-template-columns: minmax(0, 1fr) 96px 64px; gap: 8px; margin: 6px 0 12px; }
.items input { width: 100%; }
.row2 { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }
.mandate { font-size: .92rem; margin: 0 0 14px; padding: 10px 12px; background: #fff; border: 1.5px dashed var(--steel); }
.mandate b { display: block; }
.big-verdict { font: 800 1.5rem/1.1 var(--display); font-stretch: 118%; padding: 14px 14px; border: 2px solid var(--ink); background: #fff; margin-bottom: 12px; }
.big-verdict.allow { background: var(--hazard); }
.big-verdict.block { background: var(--ink); color: #fff; }
.big-verdict small { display: block; font: 400 .92rem/1.4 var(--body); margin-top: 6px; }

/* prose */
.prose p, .prose li { max-width: 68ch; }
.prose h3 { margin: 26px 0 6px; }
.prose ul { padding-left: 20px; }
.limits li { margin: 6px 0; }
.foot { margin-top: 64px; padding: 26px 0 40px; border-top: 2px solid var(--ink); font-size: .92rem; }
.foot p { margin: 4px 0; max-width: 80ch; }

.steps { list-style: none; counter-reset: s; display: grid; gap: 10px; margin: 22px 0 8px; padding: 0; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: s; border: 1px solid var(--line, #d6dbe0); border-radius: 10px; padding: 12px 14px 12px 44px; position: relative; background: var(--card, transparent); }
.steps li::before { content: counter(s); position: absolute; left: 12px; top: 11px; width: 22px; height: 22px; border-radius: 50%; background: #FFC40D; color: #12181F; font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.full-board { margin: 18px 0; }
.full-board > summary { cursor: pointer; font-weight: 700; padding: 10px 0; }

.pp-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 16px 0; }
.pp-card { border: 1px solid var(--line, #d6dbe0); border-left: 6px solid #2f8f4e; border-radius: 10px; padding: 14px 16px; }
.pp-card.bad { border-left-color: #c2342b; }
.pp-card h3 { margin: 0 0 6px; }
.pp-big { font-size: 2.4rem; font-weight: 800; margin: 0; line-height: 1.1; }
.pp-big small { font-size: 1rem; font-weight: 600; }
.pp-card ul { margin: 10px 0; padding-left: 18px; }
.ids { display: flex; flex-wrap: wrap; gap: 6px; }
.ids code { font-size: .8rem; }

.run-btn { font: inherit; font-weight: 700; background: #FFC40D; color: #12181F; border: 2px solid #12181F; border-radius: 10px; padding: 12px 20px; cursor: pointer; min-height: 48px; }
.run-btn:disabled { opacity: .6; cursor: progress; }
.run-btn:focus-visible { outline: 3px solid #12181F; outline-offset: 3px; }

.run-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.run-btn.alt { background: #fff; }
.opts { margin: 6px 0 14px; }
.opts > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

a.run-btn { display: inline-block; text-decoration: none; }

/* Live pipeline: the order travels from the shop page to PayPal, or stops at the seatbelt. */
.pipe { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; padding: 0; position: relative; }
.pipe .node { border: 2px solid #9aa5ae; border-radius: 10px; padding: 10px 8px; text-align: center; background: #fff; position: relative; min-height: 74px; transition: background .35s, border-color .35s; }
.pipe .node b { display: block; font-size: .9rem; }
.pipe .node span { display: block; font-size: .78rem; color: #55626d; margin-top: 2px; overflow-wrap: anywhere; }
.pipe .node:not(:last-of-type)::after { content: ""; position: absolute; right: -10px; top: 50%; width: 12px; height: 2px; background: #9aa5ae; }
.pipe .node.idle { opacity: .65; }
.pipe .node.warn { border-color: #d9a400; background: #fff8dc; }
.pipe .node.ok { border-color: #1f7a3d; background: #e3f4e8; }
.pipe .node.bad { border-color: #c2342b; background: #fde6e4; }
.pipe .node.active { border-color: #12181F; }
.pipe .token { position: absolute; top: -9px; left: 12.5%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #FFC40D; border: 2px solid #12181F; }
.pipe.busy .node.active { animation: pulse 1.1s ease-in-out infinite; }
.pipe.busy .node:nth-of-type(3) { animation-delay: .35s; }
.pipe.busy .token { animation: scan 2.2s ease-in-out infinite; }
.pipe.done .token { animation: travel .9s cubic-bezier(.3,.7,.3,1) forwards; }
.pipe.done .node.bad, .pipe.done .node.ok { animation: pop .5s ease-out both; }
.pipe.done .node:nth-of-type(2) { animation-delay: .1s; }
.pipe.done .node:nth-of-type(3) { animation-delay: .45s; }
.pipe.done .node:nth-of-type(4) { animation-delay: .8s; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(18,24,31,.35); } 50% { box-shadow: 0 0 0 6px rgba(18,24,31,0); } }
@keyframes scan { 0% { left: 12.5%; } 50% { left: 37.5%; } 100% { left: 12.5%; } }
@keyframes travel { from { left: 12.5%; } to { left: calc(12.5% + var(--stop) * 25%); } }
@keyframes pop { 0% { transform: scale(.94); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .pipe .token, .pipe .node { animation: none !important; transition: none; }
  .pipe.done .token { left: calc(12.5% + var(--stop) * 25%); }
}
@media (max-width: 520px) { .pipe { gap: 5px; } .pipe .node { padding: 8px 4px; } .pipe .node b { font-size: .78rem; } .pipe .node span { font-size: .68rem; } .pipe .node:not(:last-of-type)::after { display: none; } }
