/* The Workbench — styles.css
 * Palette: cobalt #244BCB · chalk #F6F6F2 · carbon #171B20 · hi-vis #E4F47B
 * System fonts only. No external assets.
 */
:root {
  --cobalt: #244BCB;
  --cobalt-deep: #1B3A9F;
  --cobalt-ink: #1E3FAE;
  --chalk: #F6F6F2;
  --paper: #FFFFFF;
  --carbon: #171B20;
  --hivis: #E4F47B;
  --muted: #4A5261;
  --rule: rgba(36, 75, 203, 0.16);
  --grid: rgba(36, 75, 203, 0.055);
  --bad: #A3141C;
  --ok: #1B6B35;
  --warn: #7A4B00;
  --radius: 6px;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 70ch;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--chalk);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--carbon);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }
a { color: var(--cobalt-ink); text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { color: var(--carbon); text-decoration-thickness: 3px; }
code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: rgba(36, 75, 203, 0.08); padding: 0.05em 0.3em; border-radius: 3px; }
kbd { border: 1px solid var(--carbon); border-bottom-width: 2px; border-radius: 3px; padding: 0 0.35em; background: var(--paper); font-size: 0.85em; }
strong { font-weight: 700; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.6em; }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.75rem); letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; margin-top: 1.8em; }
p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--carbon);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px var(--hivis);
  border-radius: 2px;
}
.hero :focus-visible, .site-header :focus-visible, .sheet--question :focus-visible, .sheet--end :focus-visible {
  outline-color: var(--hivis);
  box-shadow: 0 0 0 7px var(--carbon);
}
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
[tabindex="-1"]:focus-visible { outline: 3px dashed var(--cobalt); box-shadow: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -5rem; z-index: 100;
  background: var(--hivis); color: var(--carbon); font-weight: 700;
  padding: 0.75rem 1rem; border: 2px solid var(--carbon); border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.small { font-size: 0.92rem; color: var(--muted); }

/* ---------- header ---------- */
.site-header { background: var(--carbon); color: var(--chalk); border-bottom: 3px solid var(--hivis); }
.site-header__inner {
  max-width: 1180px; margin: 0 auto; padding: 0.5rem var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem;
}
.back-link {
  color: var(--hivis); font-weight: 700; text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px;
}
.back-link:hover { color: var(--chalk); text-decoration: underline; }
.site-mark { margin: 0; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.18em; color: var(--chalk); }
.site-mark__glyph { color: var(--hivis); }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1rem; }
.site-nav a { color: var(--chalk); display: inline-flex; align-items: center; min-height: 44px; font-size: 0.95rem; }
.site-nav a:hover { color: var(--hivis); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--cobalt);
  background-image:
    linear-gradient(rgba(246, 246, 242, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 246, 242, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(246, 246, 242, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 246, 242, 0.05) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  color: var(--chalk);
}
.hero__guides { position: absolute; inset: 0; pointer-events: none; }
.hero__guides::before, .hero__guides::after { content: ""; position: absolute; background: var(--hivis); opacity: 0.55; }
.hero__guides::before { left: 0; right: 0; height: 1px; top: 12%; animation: sweep-y 11s ease-in-out infinite alternate; }
.hero__guides::after { top: 0; bottom: 0; width: 1px; left: 8%; animation: sweep-x 14s ease-in-out infinite alternate; }
@keyframes sweep-y { from { transform: translateY(0); } to { transform: translateY(560px); } }
@keyframes sweep-x { from { transform: translateX(0); } to { transform: translateX(min(80vw, 1100px)); } }
@media (prefers-reduced-motion: reduce) {
  .hero__guides::before, .hero__guides::after { animation: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

.hero__inner {
  position: relative; max-width: 1180px; margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center;
}
.breadcrumb { font-size: 0.9rem; margin-bottom: 1.2rem; }
.breadcrumb a { color: var(--chalk); }
.breadcrumb a:hover { color: var(--hivis); }
.eyebrow { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hivis); margin-bottom: 1rem; }
.hero h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.3rem, 1.3rem + 4.6vw, 4.6rem);
  line-height: 1.02; letter-spacing: -0.02em; margin-bottom: 1.25rem;
}
.hl { background: var(--hivis); color: var(--carbon); padding: 0 0.12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero__lede { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); max-width: 40em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0; }

.is-isnt { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; border: 1.5px solid rgba(246, 246, 242, 0.6); border-radius: var(--radius); }
.is-isnt > div { padding: 0.9rem 1rem; }
.is-isnt > div + div { border-left: 1.5px solid rgba(246, 246, 242, 0.6); }
.is-isnt dt { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hivis); margin-bottom: 0.25rem; }
.is-isnt dd { margin: 0; font-size: 0.95rem; line-height: 1.5; }

.hero__figure { margin: 0; }
.hero__figure figcaption { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; margin-top: 0.4rem; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.layers { width: 100%; height: auto; display: block; }
.layers__sheet path { fill: rgba(246, 246, 242, 0.1); stroke: var(--chalk); stroke-width: 1.5; }
.layers__sheet--human path { fill: rgba(228, 244, 123, 0.18); stroke: var(--hivis); stroke-width: 2; }
.layers__label { fill: var(--chalk); font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-anchor: middle; }
.layers__sheet--human .layers__label { fill: var(--hivis); font-weight: 700; }
.layers__dim line { stroke: var(--chalk); stroke-width: 1.2; }
.layers__dim text { fill: var(--chalk); font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-anchor: middle; }
.layers__note text { fill: var(--hivis); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-anchor: middle; }
.layers__note line { stroke: var(--hivis); stroke-width: 2; }
.layers__sheet { transition: transform 300ms ease; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 48px; padding: 0.6rem 1.2rem;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; text-align: center;
  border: 2px solid var(--carbon); border-radius: var(--radius); cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--carbon); text-decoration: none; }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn--hivis { background: var(--hivis); color: var(--carbon); }
.btn--hivis:hover { color: var(--carbon); }
.btn--ghost { background: transparent; color: var(--chalk); border-color: var(--chalk); }
.btn--ghost:hover { background: var(--chalk); color: var(--carbon); box-shadow: 4px 4px 0 var(--hivis); }
.btn--cobalt { background: var(--cobalt); color: var(--chalk); }
.btn--cobalt:hover { color: var(--chalk); }
.btn--line { background: var(--paper); color: var(--carbon); }
.btn--line:hover { color: var(--carbon); }
.btn--small { min-height: 44px; padding: 0.45rem 0.9rem; font-size: 0.95rem; }
.btn--big { font-size: 1.15rem; padding: 0.8rem 1.5rem; }

/* ---------- tags ---------- */
.tag {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.3;
  padding: 0.15em 0.5em; border: 1.5px solid currentColor; border-radius: 3px; vertical-align: 0.12em;
  background: var(--paper); color: var(--carbon);
}
.tag::before { margin-right: 0.35em; }
.tag--evidence { background: var(--carbon); color: var(--chalk); border-color: var(--carbon); }
.tag--evidence::before { content: "§"; }
.tag--framework { background: var(--cobalt); color: var(--chalk); border-color: var(--cobalt); }
.tag--framework::before { content: "▣"; }
.tag--interp { background: var(--paper); color: var(--cobalt-ink); border-color: var(--cobalt-ink); }
.tag--interp::before { content: "◇"; }
.tag--hypo { background: var(--paper); color: var(--carbon); border-style: dashed; }
.tag--hypo::before { content: "?"; }
.tag--illus { background: var(--hivis); color: var(--carbon); border-color: var(--carbon); }
.tag--illus::before { content: "✎"; }
.tag--fiction { background: var(--hivis); color: var(--carbon); border-color: var(--carbon); border-style: dashed; }
.tag--fiction::before { content: "✦"; }
.hero .tag { vertical-align: baseline; }

/* ---------- contents ---------- */
.contents { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: 1rem; }
.contents__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; }
.contents__meta { font-family: var(--mono); font-size: 0.8rem; font-weight: 400; letter-spacing: 0.06em; color: var(--muted); }
.contents__list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 0.75rem; }
.contents__list a {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.9rem;
  padding: 0.85rem 1rem; min-height: 72px; background: var(--paper); border: 1.5px solid var(--carbon); border-radius: var(--radius);
  color: var(--carbon); text-decoration: none; position: relative; transition: transform 120ms ease, box-shadow 120ms ease;
}
.contents__list a:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--cobalt); }
.contents__list .num { grid-row: 1 / span 2; font-family: var(--mono); font-weight: 700; color: var(--cobalt-ink); font-size: 1.1rem; padding-top: 0.05em; }
.contents__list .t { font-weight: 700; line-height: 1.3; }
.contents__list .d { font-size: 0.88rem; color: var(--muted); }
.legend { font-size: 0.92rem; line-height: 2; color: var(--carbon); max-width: 90ch; }

/* ---------- sheets ---------- */
.sheet { padding: clamp(3rem, 7vw, 5.5rem) 0 1rem; border-top: 1.5px solid var(--rule); }
.sheet__head { margin-bottom: 1.6rem; }
.sheet__num {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cobalt-ink);
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem;
}
.sheet__num::after { content: ""; flex: 1; height: 1.5px; background: repeating-linear-gradient(90deg, var(--cobalt) 0 8px, transparent 8px 13px); max-width: 220px; }
.sheet__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sheet__foot { margin-top: 2rem; font-family: var(--mono); font-size: 0.85rem; }
.sheet__foot a { display: inline-flex; min-height: 44px; align-items: center; }

.pull { margin: 2rem 0; padding: 1.2rem 1.4rem; background: var(--hivis); border-left: 6px solid var(--carbon); font-size: 1.2rem; font-weight: 600; line-height: 1.45; }
.pull p { margin: 0; }
.claims { padding-left: 1.4rem; }
.claims li { margin-bottom: 0.8rem; }
.note { font-family: var(--mono); font-size: 0.85rem; background: var(--paper); border: 1.5px dashed var(--cobalt); padding: 0.6rem 0.8rem; border-radius: var(--radius); }

/* ---------- bench ---------- */
.sheet--bench { background: linear-gradient(180deg, transparent, rgba(36, 75, 203, 0.05)); }
.bench { margin-top: 0.5rem; }
.bench__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: -1.5px; position: relative; z-index: 1; }
.bench__tab {
  font: inherit; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 0.6rem; min-height: 56px;
  padding: 0.6rem 0.8rem; background: var(--chalk); color: var(--carbon);
  border: 1.5px solid var(--carbon); border-radius: var(--radius) var(--radius) 0 0; border-bottom-color: var(--carbon);
}
.bench__tab:hover { background: var(--paper); }
.bench__tab[aria-selected="true"] { background: var(--paper); border-bottom-color: var(--paper); box-shadow: inset 0 4px 0 var(--cobalt); }
.bench__tab-n { flex: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--carbon); font-family: var(--mono); font-weight: 700; }
.bench__tab[aria-selected="true"] .bench__tab-n { background: var(--hivis); }
.bench__tab-t { font-weight: 700; font-size: 0.95rem; line-height: 1.25; }

.bench__panel { background: var(--paper); border: 1.5px solid var(--carbon); border-radius: 0 0 var(--radius) var(--radius); padding: clamp(1rem, 3vw, 2rem); }
.bench__kicker { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--carbon); background: var(--hivis); display: inline-block; padding: 0.1em 0.5em; border: 1.5px dashed var(--carbon); margin-bottom: 0.6rem; }
.bench__title { margin-top: 0; font-size: 1.5rem; }
.bench__failure { color: var(--muted); max-width: 70ch; }
.bench__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem); align-items: start; }
.bench__side-title { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.2rem; color: var(--cobalt-ink); }
.bench__count { font-weight: 700; margin-bottom: 0.8rem; }
.bench__tools { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.bench__nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.bench__pos { margin: 0; font-family: var(--mono); font-size: 0.85rem; }

.fix-row { border-top: 1.5px solid var(--rule); padding: 0.7rem 0; }
.fix-row:first-child { border-top: 0; padding-top: 0; }
.fix {
  font: inherit; cursor: pointer; width: 100%; display: flex; align-items: center; gap: 0.7rem; text-align: left;
  min-height: 48px; padding: 0.45rem 0.7rem; background: var(--chalk); color: var(--carbon);
  border: 2px solid var(--carbon); border-radius: var(--radius);
  transition: background-color 150ms ease;
}
.fix:hover { background: #ECEEE4; }
.fix__state {
  flex: none; font-family: var(--mono); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  width: 3.2em; text-align: center; padding: 0.25em 0; border: 1.5px solid var(--carbon); border-radius: 999px; background: var(--paper);
}
.fix__label { font-weight: 700; }
.fix[aria-pressed="true"] { background: var(--hivis); }
.fix[aria-pressed="true"] .fix__state { background: var(--carbon); color: var(--hivis); }
.fix__notes { font-size: 0.92rem; line-height: 1.5; padding: 0.55rem 0.2rem 0; color: var(--carbon); }
.fix__notes p { margin: 0 0 0.35rem; }

/* mock browser frame */
.frame { border: 1.5px solid var(--carbon); border-radius: var(--radius); overflow: hidden; background: var(--chalk); box-shadow: 6px 6px 0 rgba(36, 75, 203, 0.25); }
.frame__bar { display: flex; align-items: center; gap: 0.75rem; background: var(--carbon); color: var(--chalk); padding: 0.4rem 0.7rem; font-family: var(--mono); font-size: 0.78rem; }
.frame__dots { display: inline-flex; gap: 5px; }
.frame__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--chalk); opacity: 0.6; display: inline-block; }
.frame__url { background: rgba(246, 246, 242, 0.14); padding: 0.1rem 0.6rem; border-radius: 999px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame__body { padding: clamp(0.9rem, 2.5vw, 1.4rem); min-height: 260px; }
.frame__stamp { margin: 0; padding: 0.35rem 0.7rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; border-top: 1.5px dashed var(--carbon); background: var(--hivis); color: var(--carbon); }

.readout { margin-top: 1rem; padding: 0.9rem 1rem; border: 1.5px solid var(--cobalt); border-radius: var(--radius); background: rgba(36, 75, 203, 0.04); }
.readout__title { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cobalt-ink); margin: 0; }
.readout__sum { font-weight: 700; font-size: 1.05rem; margin: 0.15rem 0 0.5rem; }
.readout__list { list-style: none; margin: 0 0 0.5rem; padding: 0; font-size: 0.93rem; }
.readout__list li { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.15rem 0; }
.readout__list .mark { flex: none; width: 1.4rem; height: 1.4rem; display: inline-grid; place-items: center; border-radius: 3px; font-weight: 700; font-size: 0.85rem; }
.readout__list .ok .mark { background: var(--ok); color: #fff; }
.readout__list .no .mark { background: var(--paper); color: var(--bad); border: 1.5px solid var(--bad); }
.readout__caveat { font-size: 0.82rem; color: var(--muted); margin: 0; }

/* Case A — landing */
.mock-landing { position: relative; background: #FFF6EC; color: #2A1E14; border-radius: 4px; padding: 1rem; overflow: hidden; min-height: 240px; }
.mock-landing__top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; position: relative; z-index: 1; margin-bottom: 0.8rem; }
.mock-logo { font-weight: 800; letter-spacing: 0.02em; }
.mock-badge { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; background: #D3247A; color: #fff; padding: 0.2em 0.5em; border-radius: 3px; animation: blink 0.9s steps(2, start) 5; } /* stops after ~4.5s (WCAG 2.2.2) */
@keyframes blink { to { visibility: hidden; } }
.mock-blob { position: absolute; width: 340px; height: 340px; right: -120px; top: -90px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FF9F68, #D3247A 55%, #6B2FD6); opacity: 0.85; }
.mock-h { position: relative; z-index: 1; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.75rem); line-height: 1.15; margin: 0 0 0.5rem; max-width: 18em; }
.mock-sub { position: relative; z-index: 1; margin: 0 0 0.8rem; font-size: 0.98rem; max-width: 30em; }
.mock-facts { position: relative; z-index: 1; list-style: none; padding: 0; margin: 0 0 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mock-facts li { background: #fff; border: 1.5px solid #2A1E14; border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.88rem; }
.mock-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mock-btn { font: inherit; cursor: pointer; min-height: 44px; padding: 0.4rem 0.9rem; border-radius: 999px; }
.mock-btn--same { background: #fff; color: #2A1E14; border: 1.5px solid #2A1E14; }
.mock-btn--primary { background: #2A1E14; color: #FFF6EC; border: 2px solid #2A1E14; font-weight: 700; }
.mock-btn--quiet { background: transparent; color: #2A1E14; border: 0; text-decoration: underline; text-underline-offset: 0.2em; }
.demo-note { position: relative; z-index: 1; margin: 0.7rem 0 0; font-size: 0.88rem; font-style: italic; min-height: 1.4em; }
.mock-landing.is-calm { background: #FFF6EC; }

/* Case B — guestbook */
.mock-guest { display: grid; gap: 0.8rem; }
.mock-guest__fields { display: grid; gap: 0.7rem; }
.field label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.2rem; }
.field input {
  width: 100%; font: inherit; font-family: var(--mono); font-size: 0.92rem; min-height: 44px; padding: 0.4rem 0.6rem;
  border: 1.5px solid var(--carbon); border-radius: 4px; background: var(--paper); color: var(--carbon);
}
.field input[aria-invalid="true"] { border-color: var(--bad); border-width: 2.5px; }
.field-error { color: var(--bad); font-weight: 700; font-size: 0.9rem; margin: 0.3rem 0 0; }
.field-error:empty { display: none; }
.mock-guest__cap { margin: 0; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.guest-card { background: var(--paper); border: 1.5px solid var(--carbon); border-radius: 4px; padding: 0.8rem; font-size: 0.93rem; }
.guest-card__label { margin: 0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.guest-card__name { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.5rem; word-break: break-all; }
.guest-card__muted { color: var(--muted); font-style: italic; }
.guest-card__site { margin: 0.4rem 0; word-break: break-all; }
.sim-label { margin: 0 0 0.3rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; display: inline-block; background: var(--hivis); border: 1.5px dashed var(--carbon); padding: 0.05em 0.4em; }
.sim-list { margin: 0 0 0.4rem; padding-left: 1.2rem; }
.verdict { margin: 0.3rem 0; font-weight: 600; }
.verdict--ok { color: var(--ok); }
.verdict--bad { color: var(--bad); }
.verdict--warn { color: var(--warn); }
.policy { margin-top: 0.6rem; padding: 0.5rem 0.6rem; border: 1.5px dashed var(--muted); border-radius: 4px; font-size: 0.88rem; }
.policy.is-on { border-style: solid; border-color: var(--ok); background: rgba(27, 107, 53, 0.06); }
.policy p { margin: 0.3rem 0 0; }
.policy code { display: block; white-space: pre-wrap; word-break: break-word; }

/* Case C — newsletter */
.mock-news { background: var(--paper); border-radius: 4px; padding: 1rem; display: grid; gap: 0.6rem; max-width: 30rem; }
.mock-news__h { margin: 0; font-size: 1.3rem; }
.mock-news__p { margin: 0; font-size: 0.95rem; }
.mock-news .hint { margin: 0 0 0.3rem; font-size: 0.88rem; color: var(--muted); }
.mock-news input { font-family: var(--sans); }
.mock-news input.is-error { border-color: #D0021B; border-width: 2.5px; }
.mock-news__btn {
  font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.4rem 1.1rem; background: var(--carbon); color: var(--chalk);
  border: 2px solid var(--carbon); border-radius: 4px; cursor: pointer; justify-self: start;
}
.mock-news__btn--fake { user-select: none; }
.mock-news__result { margin: 0; font-weight: 700; color: var(--ok); min-height: 1.4em; }
.demo-caveat { margin: 0; font-size: 0.85rem; padding: 0.4rem 0.6rem; background: var(--hivis); border: 1.5px dashed var(--carbon); border-radius: 4px; }
/* the deliberately failing "before" state */
.mock-news.is-pale { background: #FBFBF8; }
.mock-news.is-pale .mock-news__h, .mock-news.is-pale .mock-news__p { color: #A9ACB2; }
.mock-news.is-pale .mock-news__p { font-size: 0.8rem; }
.mock-news.is-pale input { border-color: #D5D7DB; color: #8D9097; min-height: 30px; font-size: 0.8rem; padding: 0.2rem 0.4rem; }
.mock-news.is-pale .mock-news__btn { min-height: 22px; padding: 0.1rem 0.5rem; font-size: 0.78rem; background: #C9CCD2; color: #FFFFFF; border-color: #C9CCD2; }

/* Case D — essay */
.mock-essay { background: var(--paper); padding: 1rem; border-radius: 4px; font-family: Georgia, "Times New Roman", serif; }
.mock-essay__h { font-size: 1.35rem; margin: 0 0 0.5rem; }
.mock-essay__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; font-family: var(--sans); }
.mock-essay p { font-size: 1rem; line-height: 1.6; }

/* ---------- decision tree ---------- */
.tree { margin: 1.5rem 0 1rem; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 1rem; align-items: start; }
.tree__top { background: var(--carbon); color: var(--chalk); border-radius: var(--radius); padding: 1rem; }
.tree__kicker { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hivis); margin-bottom: 0.6rem; }
.tree__trail { list-style: none; margin: 0; padding: 0; counter-reset: crumb; }
.tree__crumb { position: relative; padding: 0.5rem 0 0.5rem 1.6rem; border-left: 1.5px dashed rgba(246, 246, 242, 0.5); font-size: 0.9rem; counter-increment: crumb; }
.tree__crumb::before { content: counter(crumb); position: absolute; left: -0.75rem; top: 0.45rem; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%; background: var(--chalk); color: var(--carbon); font-family: var(--mono); font-size: 0.75rem; font-weight: 700; }
.tree__crumb--empty { border-left: 0; padding-left: 0; color: rgba(246, 246, 242, 0.85); }
.tree__crumb--empty::before { content: none; }
.tree__crumb-q { display: block; }
.tree__crumb-a { display: inline-block; margin-top: 0.2rem; font-family: var(--mono); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.05em 0.5em; border-radius: 3px; }
.tree__crumb-a.is-yes { background: var(--hivis); color: var(--carbon); }
.tree__crumb-a.is-no { background: var(--chalk); color: var(--carbon); }
.tree__card { background: var(--paper); border: 1.5px solid var(--carbon); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.75rem); box-shadow: 6px 6px 0 var(--cobalt); }
.tree__step { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cobalt-ink); margin-bottom: 0.4rem; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.tree__code { background: var(--cobalt); color: var(--chalk); padding: 0.1em 0.5em; border-radius: 3px; }
.tree__verdict { background: var(--hivis); color: var(--carbon); padding: 0.1em 0.5em; border-radius: 3px; border: 1.5px solid var(--carbon); }
.tree__q { font-family: var(--display); font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); margin-top: 0; }
.tree__hint { color: var(--muted); }
.tree__answers { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.tree__answers .btn { min-width: 7rem; }
.tree__dl dt { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cobalt-ink); margin-top: 0.7rem; }
.tree__dl dd { margin: 0.15rem 0 0; }
.tree__ctrls { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tree-static { margin: 1rem 0 2rem; background: var(--paper); border: 1.5px solid var(--carbon); border-radius: var(--radius); padding: 0.6rem 1rem; }
.tree-static summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.tree-static ul, .tree-static ol { padding-left: 1.3rem; }

.evidence-box { margin: 2rem 0 0; padding: 1.2rem 1.4rem; border: 1.5px solid var(--carbon); border-left-width: 6px; background: var(--paper); border-radius: var(--radius); }
.evidence-box h3 { margin-top: 0; font-size: 1.15rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* ---------- pipeline ---------- */
.pipeline { margin: 1rem 0 2rem; overflow-x: auto; }
.pipeline svg { width: 100%; min-width: 640px; height: auto; display: block; }
.pipeline figcaption { font-family: var(--mono); font-size: 0.8rem; margin-top: 0.4rem; color: var(--muted); }
.pipe__rule line { stroke: var(--cobalt); stroke-width: 2; stroke-dasharray: 6 5; }
.pipe__nodes rect { fill: var(--paper); stroke: var(--carbon); stroke-width: 2; }
.pipe__nodes .human rect { fill: var(--hivis); }
.pipe__nodes text { font-family: var(--mono); text-anchor: middle; fill: var(--cobalt-ink); font-size: 14px; font-weight: 700; }
.pipe__nodes text.lbl { fill: var(--carbon); font-size: 13px; letter-spacing: 0.1em; }
.pipe__loop { fill: none; stroke: var(--carbon); stroke-width: 1.5; stroke-dasharray: 5 4; }
.pipe__note { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-anchor: middle; fill: var(--carbon); }
.pipe__key { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; fill: var(--muted); }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps > li { position: relative; padding: 0 0 1rem 3.4rem; counter-increment: step; border-left: 1.5px dashed var(--cobalt); margin-left: 1.2rem; }
.steps > li:last-child { border-left-color: transparent; }
.steps > li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: -1.25rem; top: -0.1rem;
  width: 2.5rem; height: 2.5rem; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--carbon); border-radius: 4px;
  font-family: var(--mono); font-weight: 700; color: var(--cobalt-ink);
}
.steps h3 { margin: 0 0 0.3rem; padding-top: 0.25rem; font-size: 1.15rem; }

/* ---------- specimens ---------- */
.specimen { margin: 2rem 0; padding-top: 1.2rem; border-top: 1.5px dashed var(--cobalt); }
.specimen h3 { margin-top: 0; display: flex; gap: 0.6rem; align-items: baseline; }
.sp-num { font-family: var(--mono); font-size: 0.85rem; background: var(--carbon); color: var(--hivis); padding: 0.1em 0.45em; border-radius: 3px; }
.code {
  background: var(--carbon); color: #EEF0E6; padding: 1rem 1.1rem; border-radius: 0 0 var(--radius) var(--radius);
  overflow-x: auto; line-height: 1.55; font-size: 0.86rem; margin: 0 0 1rem; tab-size: 2;
  border-top: 3px solid var(--hivis);
}
.code code { background: none; padding: 0; color: inherit; font-size: inherit; }
.copy { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; background: #2A303A; border-radius: var(--radius) var(--radius) 0 0; padding: 0.3rem 0.5rem; }
.copy__btn { font: inherit; font-size: 0.85rem; font-weight: 700; min-height: 36px; min-width: 44px; padding: 0.2rem 0.75rem; background: var(--hivis); color: var(--carbon); border: 1.5px solid var(--carbon); border-radius: 4px; cursor: pointer; }
.copy__status { color: var(--chalk); font-size: 0.85rem; }
html:not(.js) .code { border-radius: var(--radius); }

/* ---------- QA table ---------- */
.table-scroll { overflow-x: auto; margin: 0 0 1.5rem; border: 1.5px solid var(--carbon); border-radius: var(--radius); background: var(--paper); }
.qa-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 620px; }
.qa-table caption { text-align: left; padding: 0.7rem 1rem; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cobalt-ink); border-bottom: 1.5px solid var(--carbon); }
.qa-table th, .qa-table td { text-align: left; vertical-align: top; padding: 0.7rem 1rem; border-bottom: 1px solid var(--rule); }
.qa-table thead th { background: var(--carbon); color: var(--chalk); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.qa-table tbody th { font-weight: 700; width: 22%; }
.qa-table td:last-child { background: rgba(228, 244, 123, 0.35); }

/* ---------- essay / objections ---------- */
.credit { padding: 1rem 1.2rem; background: var(--paper); border: 1.5px solid var(--carbon); border-left: 6px solid var(--cobalt); border-radius: var(--radius); font-size: 0.98rem; }
.objection { margin: 1.5rem 0; padding: 1.1rem 1.3rem; background: var(--paper); border: 1.5px solid var(--carbon); border-radius: var(--radius); }
.objection h3 { margin-top: 0; }
.objection p:last-child { margin-bottom: 0; }
.myths { margin: 0; }
.myths > div { padding: 0.8rem 0; border-top: 1.5px dashed var(--cobalt); }
.myths dt { font-weight: 700; }
.myths dt::before { content: "✕ "; color: var(--bad); }
.myths dd { margin: 0.2rem 0 0; }

/* ---------- gate ---------- */
.gate { background: var(--paper); border: 2px solid var(--carbon); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.75rem); box-shadow: 8px 8px 0 var(--hivis), 8px 8px 0 1.5px var(--carbon); }
.gate fieldset { border: 0; border-top: 1.5px solid var(--carbon); margin: 0 0 1rem; padding: 0.8rem 0 0; min-width: 0; }
.gate fieldset:first-child { border-top: 0; padding-top: 0; }
.gate legend { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cobalt-ink); font-weight: 700; padding: 0 0.4rem 0 0; }
.check { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.5rem 0.4rem; border-radius: 4px; cursor: pointer; min-height: 44px; }
.check:hover { background: rgba(36, 75, 203, 0.06); }
.check input { flex: none; width: 1.4rem; height: 1.4rem; margin: 0.15rem 0 0; accent-color: var(--cobalt); cursor: pointer; }
.check input:checked + span { text-decoration: line-through; text-decoration-color: var(--cobalt); text-decoration-thickness: 2px; }
.gate__status { margin: 1rem 0; }
.gate__status progress { width: 100%; height: 14px; accent-color: var(--cobalt); }
.gate__msg { font-weight: 700; margin: 0.5rem 0 0; }
.gate.is-complete .gate__msg { background: var(--hivis); padding: 0.4rem 0.6rem; border-radius: 4px; border: 1.5px solid var(--carbon); }
.gate__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- open question / end ---------- */
.sheet--question { background: var(--cobalt); color: var(--chalk); border-top: 0; padding-bottom: clamp(3rem, 7vw, 5rem); margin-top: 3rem; }
.sheet--question .sheet__num { color: var(--hivis); }
.sheet--question .sheet__num::after { background: repeating-linear-gradient(90deg, var(--hivis) 0 8px, transparent 8px 13px); }
.sheet--question h2 { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.6rem); }
.sheet--question a:not(.btn) { color: var(--hivis); }

.sources { padding-left: 1.4rem; }
.sources li { margin-bottom: 1.2rem; }
.sources li p { margin: 0 0 0.3rem; font-size: 0.97rem; }
.sources .src { font-size: 1rem; }

.related { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.related li { background: var(--paper); border: 1.5px solid var(--carbon); border-radius: var(--radius); padding: 1rem 1.2rem; }
.related a { display: flex; flex-wrap: wrap; gap: 0.2rem 0.75rem; align-items: baseline; font-weight: 700; font-size: 1.1rem; min-height: 44px; }
.rel-url { font-family: var(--mono); font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.related p { margin: 0.3rem 0 0; }

.sheet--end { background: var(--carbon); color: var(--chalk); border-top: 3px solid var(--hivis); padding-bottom: clamp(3rem, 6vw, 4.5rem); margin-top: 3rem; }
.sheet--end h2 { color: var(--chalk); }
.end-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.sheet--end .btn--line { background: transparent; color: var(--chalk); border-color: var(--chalk); }
.sheet--end .btn--line:hover { background: var(--chalk); color: var(--carbon); box-shadow: 4px 4px 0 var(--hivis); }

.site-footer { background: var(--carbon); color: var(--chalk); border-top: 1px solid rgba(246, 246, 242, 0.2); padding: 1.5rem 0 2rem; font-size: 0.9rem; }
.site-footer a { color: var(--hivis); }
.site-footer code { background: rgba(246, 246, 242, 0.12); color: var(--chalk); }
.site-footer p { margin: 0 0 0.5rem; }

/* ---------- 404 ---------- */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: left; }
.lost__card { max-width: 40rem; padding: 2rem var(--gutter); }
.lost__code { font-family: var(--mono); font-size: clamp(3rem, 12vw, 7rem); font-weight: 800; color: var(--cobalt); line-height: 1; margin: 0 0 0.5rem; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__figure { max-width: 420px; }
  .bench__grid { grid-template-columns: 1fr; }
  .tree { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .bench__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0.5rem; }
  .bench__tab { border-radius: var(--radius); }
  .bench__tab[aria-selected="true"] { border-bottom-color: var(--carbon); }
  .bench__panel { border-radius: var(--radius); }
  .site-nav { margin-left: 0; width: 100%; }
  .site-mark { display: none; }
}
@media (max-width: 560px) {
  .is-isnt { grid-template-columns: 1fr; }
  .is-isnt > div + div { border-left: 0; border-top: 1.5px solid rgba(246, 246, 242, 0.6); }
  .bench__tab-t { font-size: 0.85rem; }
  .bench__nav .bench__pos { order: -1; width: 100%; text-align: center; }
  .steps > li { padding-left: 2.4rem; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* ---------- forced colours ---------- */
@media (forced-colors: active) {
  .fix[aria-pressed="true"] { border-width: 4px; }
  .tag { border: 1px solid CanvasText; }
}

/* ---------- print ---------- */
@media print {
  @page { margin: 16mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .skip-link, .hero__guides, .hero__actions, .bench, .tree, .copy, .gate__actions, .sheet__foot, .end-actions { display: none !important; }
  .hero { background: #fff; color: #000; }
  .hero .hl { background: none; color: #000; text-decoration: underline; }
  .hero__figure, .pipeline { break-inside: avoid; }
  .layers__sheet path { stroke: #000; }
  .layers__label, .layers__dim text { fill: #000; }
  .bench-fallback[hidden] { display: block !important; }
  .tree-static { display: block; }
  .tree-static[open] > *, .tree-static > * { display: block; }
  .sheet--question, .sheet--end, .site-footer { background: #fff; color: #000; }
  .sheet--question a, .site-footer a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  .code { background: #f3f3f3; color: #000; border: 1px solid #999; white-space: pre-wrap; }
  .gate { box-shadow: none; }

  body.print-gate main > *:not(#gate), body.print-gate .site-footer { display: none !important; }
  body.print-gate #gate { border: 0; padding: 0; }
  body.print-gate .gate { padding: 10pt 14pt; }
  body.print-gate .check { min-height: 0; padding: 2pt 0; line-height: 1.35; }
  body.print-gate .gate fieldset { margin-bottom: 4pt; padding-top: 4pt; }
  body.print-gate .gate__status { margin: 6pt 0 0; }
  body.print-gate .sheet__head { margin-bottom: 6pt; }
  body.print-gate #gate .sheet__head p.sheet__tags { display: none; }
}
