/* Humane Interfaces — Design With a Door Out
   Original stylesheet. System fonts only. No external assets. */

:root {
  --graphite: #17181e;
  --graphite-2: #1e2028;
  --graphite-3: #262934;
  --line: #3a3e4d;
  --peri: #8ca2ff;
  --peri-deep: #3b4fb0;      /* periwinkle for text on bone */
  --bone: #f8f3e8;
  --bone-2: #ece5d6;
  --leaf: #4a9d80;
  --leaf-deep: #2b6a53;      /* leaf for text on bone */
  --leaf-bright: #6cc3a3;    /* leaf for text on graphite */
  --amber: #f2b66b;          /* trap signal on graphite */
  --amber-deep: #8a4b0f;     /* trap signal on bone */
  --ink: #17181e;
  --text: #f1ece1;
  --muted: #c4beb2;
  --radius: 14px;
  --measure: 68ch;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Bitstream Charter", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--graphite);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--peri); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--bone); color: var(--ink); padding: 0.75rem 1rem; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23, 24, 30, 0.94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .topbar { background: rgba(23, 24, 30, 0.82); backdrop-filter: blur(8px); }
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 0.55rem 1rem;
  display: flex; align-items: center; gap: 0.75rem 1.25rem; flex-wrap: wrap;
}
.back-link {
  font-weight: 700; color: var(--bone); text-decoration: none;
  padding: 0.45rem 0.7rem; border: 1px solid var(--line); border-radius: 999px;
  min-height: 44px; display: inline-flex; align-items: center;
}
.back-link:hover { border-color: var(--peri); }
.brand { font-family: var(--serif); font-size: 1.05rem; color: var(--text); text-decoration: none; margin-right: auto; }
.brand span { color: var(--peri); }
.topnav { display: flex; gap: 0.25rem 0.9rem; flex-wrap: wrap; font-size: 0.95rem; }
.topnav a { color: var(--muted); text-decoration: none; padding: 0.4rem 0.1rem; min-height: 32px; display: inline-flex; align-items: center; }
.topnav a:hover { color: var(--bone); text-decoration: underline; }
@media (max-width: 720px) {
  .topbar { position: relative; }
  [id], section.chapter, .exhibit { scroll-margin-top: 16px; }
  .topnav { width: 100%; order: 3; gap: 0.1rem 0.85rem; }
  .brand { font-size: 0.98rem; }
}

/* ---------- Layout ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 1rem; }
.prose { max-width: var(--measure); }
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin: 1.25rem 0 0; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line); }
.breadcrumb a { color: var(--muted); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--bone); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); margin: 0.2em 0 0.5em; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); margin: 1.6em 0 0.5em; }
h4 { font-size: 1.1rem; margin: 1.2em 0 0.4em; font-family: var(--sans); }
p { margin: 0 0 1em; }
strong { color: var(--bone); }

.kicker {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--peri); margin: 0;
}

section.chapter { padding: clamp(3rem, 7vw, 6rem) 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
[id] { scroll-margin-top: 96px; }

/* claim labels */
.claim {
  display: inline-block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 4px; border: 1px solid currentColor;
  vertical-align: 0.15em; margin-right: 0.4rem; white-space: nowrap; line-height: 1.5;
}
.claim.evidence { color: var(--leaf-bright); }
.claim.framework { color: var(--peri); }
.claim.interpretation { color: var(--bone); }
.claim.hypothesis { color: var(--amber); }
.claim.illustration { color: #d9b8f0; }
.claim.fiction { color: #f0a8b8; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2rem, 6vw, 5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr 1fr; } }
.hero h1 { font-size: clamp(2.6rem, 7.5vw, 5.4rem); margin: 0.25em 0 0.3em; letter-spacing: -0.025em; }
.hero h1 em { font-style: italic; color: var(--peri); }
.lede { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--text); max-width: 40ch; }
.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 1.5rem 0; }
.btn {
  font: inherit; font-weight: 700; cursor: pointer; border-radius: 999px;
  padding: 0.7rem 1.25rem; min-height: 44px; display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none; border: 2px solid transparent; line-height: 1.2;
}
.btn-primary { background: var(--peri); color: var(--ink); }
.btn-primary:hover { background: #a9baff; }
.btn-ghost { background: transparent; color: var(--bone); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--peri); }
.btn-leaf { background: var(--leaf-bright); color: var(--ink); }

.isnot {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--graphite-2);
  display: grid; gap: 0.5rem 1.5rem; grid-template-columns: 1fr; font-size: 0.95rem; max-width: 46rem;
}
@media (min-width: 640px) { .isnot { grid-template-columns: 1fr 1fr; } }
.isnot h2 { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.3rem; color: var(--peri); }
.isnot ul { margin: 0; padding-left: 1.1rem; }
.isnot li { margin: 0.2rem 0; }

.hero-figure { margin: 0; }
.hero-figure figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.6rem; }

/* ---------- TOC ---------- */
.toc { background: var(--graphite-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 0 0 1rem; }
.toc h2 { font-size: 1.2rem; margin: 0 0 0.6rem; }
.toc ol { margin: 0; padding: 0; list-style: none; columns: 1; gap: 2rem; counter-reset: toc; }
@media (min-width: 720px) { .toc ol { columns: 2; } }
@media (min-width: 1100px) { .toc ol { columns: 3; } }
.toc li { break-inside: avoid; margin: 0.2rem 0; counter-increment: toc; display: flex; gap: 0.6rem; }
.toc li::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); color: var(--peri); font-size: 0.85rem; padding-top: 0.15rem; }
.toc a { color: var(--text); min-height: 28px; display: inline-block; }

/* ---------- Callouts ---------- */
.pull {
  font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.35; color: var(--bone);
  border-left: 4px solid var(--peri); padding: 0.3rem 0 0.3rem 1.2rem; margin: 2rem 0; max-width: 34ch;
}
.note {
  border: 1px solid var(--line); border-left: 4px solid var(--leaf); border-radius: 10px;
  background: var(--graphite-2); padding: 1rem 1.2rem; margin: 1.5rem 0; max-width: var(--measure);
}
.note.warn { border-left-color: var(--amber); }
.note p:last-child { margin-bottom: 0; }

/* door tests */
.tests { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.5rem 0; counter-reset: dt; }
@media (min-width: 720px) { .tests { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tests { grid-template-columns: repeat(3, 1fr); } }
.tests li {
  list-style: none; background: var(--graphite-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; counter-increment: dt; position: relative;
}
.tests li::before { content: "T" counter(dt); font-family: var(--mono); color: var(--peri); font-size: 0.8rem; }
.tests h3 { margin: 0.2rem 0 0.4rem; font-size: 1.2rem; }
.tests p { margin: 0; font-size: 0.97rem; }
.tests .q { font-style: italic; color: var(--bone); margin-top: 0.5rem; }
.tests { padding: 0; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 1.5rem 0; border-left: 2px solid var(--line); max-width: var(--measure); }
.timeline li { position: relative; padding: 0 0 1.3rem 1.4rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 0.55rem; width: 12px; height: 12px; border-radius: 50%; background: var(--peri); }
.timeline .yr { font-family: var(--mono); color: var(--peri); font-size: 0.9rem; display: block; }

/* ---------- Control room ---------- */
.room-intro { max-width: var(--measure); }
.exhibit-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 2rem; padding: 0; list-style: none; }
.exhibit-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.45rem 0.9rem;
  border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 0.95rem;
}
.exhibit-nav a:hover { border-color: var(--peri); }

.exhibit {
  border: 1px solid var(--line); border-radius: 20px; background: var(--graphite-2);
  padding: clamp(1rem, 2.5vw, 2rem); margin: 0 0 2.5rem; scroll-margin-top: 96px;
}
.exhibit-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.exhibit-head h3 { margin: 0.2rem 0 0.3rem; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.exhibit-head .kicker { color: var(--muted); }
.exhibit-sub { margin: 0; color: var(--muted); max-width: 60ch; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--graphite); gap: 2px; }
.seg button {
  font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--muted); background: transparent; border: 0;
  border-radius: 999px; padding: 0.45rem 0.95rem; min-height: 40px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--bone); color: var(--ink); }
.seg button[aria-pressed="true"]::before { content: "● "; font-size: 0.7em; vertical-align: 0.15em; }
.seg .seg-label { align-self: center; padding: 0 0.6rem 0 0.7rem; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.no-js .seg, .no-js .js-only { display: none !important; }

.panes { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.25rem; }
@media (min-width: 900px) { .panes { grid-template-columns: 1fr 1fr; } }

.pane {
  border-radius: 16px; padding: 1rem; position: relative; transition: opacity 0.25s ease, transform 0.25s ease;
  border: 2px solid var(--line);
}
.pane.trap { border-style: dashed; border-color: var(--amber); background:
  repeating-linear-gradient(135deg, rgba(242,182,107,0.05) 0 10px, transparent 10px 20px), var(--graphite); }
.pane.humane { border-color: var(--leaf); background: var(--graphite); }
.pane-label { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.trap .pane-label { color: var(--amber); }
.humane .pane-label { color: var(--leaf-bright); }
.js .exhibit .pane:not(.is-dim) { box-shadow: 0 0 0 4px rgba(140, 162, 255, 0.35); }
.js .exhibit .pane:not(.is-dim) .pane-label span:first-child::after { content: " · inspecting"; color: var(--peri); }
.pane.is-dim { border-width: 1px; }
@media (max-width: 899px) { .pane.is-dim { display: none; } }

/* device mockups: bone screen */
.device {
  background: var(--bone); color: var(--ink); border-radius: 12px; padding: 1rem;
  font-size: 0.95rem; line-height: 1.5; box-shadow: 0 0 0 6px #0f1014, 0 10px 30px rgba(0,0,0,0.35);
  min-height: 15rem;
  color-scheme: light;
}
.device a, .device .linklike { color: var(--peri-deep); }
.device h4 { font-family: var(--sans); color: var(--ink); margin: 0 0 0.4rem; font-size: 1.02rem; }
.device .dev-bar { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.72rem; color: #5a564e; border-bottom: 1px solid #d8d0bf; padding-bottom: 0.4rem; margin-bottom: 0.75rem; }
.device p { margin: 0 0 0.6rem; }
.device .fine { font-size: 0.82rem; color: #5b574f; }   /* demonstrates "fine print" while keeping >= 4.5:1 */
.device label { display: flex; gap: 0.55rem; align-items: flex-start; margin: 0.45rem 0; cursor: pointer; min-height: 24px; }
.device input[type="checkbox"], .device input[type="radio"] { width: 25px; height: 25px; margin: 0.1rem 0 0; accent-color: var(--peri-deep); flex: 0 0 auto; }
.device fieldset { border: 1px solid #d3cab7; border-radius: 10px; padding: 0.5rem 0.8rem 0.6rem; margin: 0.6rem 0; }
.device legend { font-weight: 700; padding: 0 0.3rem; }
.device select { font: inherit; padding: 0.35rem 0.5rem; border-radius: 8px; border: 1px solid #8f877a; background: #fff; color: var(--ink); min-height: 36px; max-width: 100%; }
.d-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; align-items: center; }
.dbtn {
  font: inherit; font-weight: 700; font-size: 0.92rem; border-radius: 10px; padding: 0.5rem 0.9rem; min-height: 40px;
  cursor: pointer; border: 2px solid var(--ink); background: #fff; color: var(--ink);
}
.dbtn.solid { background: var(--ink); color: var(--bone); }
.dbtn.loud { background: #1f6f4f; border-color: #1f6f4f; color: #fff; font-size: 1.05rem; padding: 0.7rem 1.3rem; }
.dbtn.danger { background: #fff; border-color: #9b2c1f; color: #8e2418; }
.dbtn.danger-solid { background: #9b2c1f; border-color: #9b2c1f; color: #fff; }
.dbtn.quiet { border-color: transparent; background: transparent; text-decoration: underline; font-weight: 500; padding: 0.5rem 0.4rem; color: #4f4b44; }
.dbtn[disabled] { opacity: 0.6; cursor: not-allowed; }
.dbtn:focus-visible, .device a:focus-visible, .device input:focus-visible, .device select:focus-visible, .switch:focus-visible { outline: 3px solid var(--peri-deep); outline-offset: 2px; }

.dialog-mock { border: 2px solid var(--ink); border-radius: 12px; background: #fff; padding: 0.9rem; margin: 0.5rem 0; }
.dialog-mock h4 { margin-top: 0; }
.toast { background: var(--ink); color: var(--bone); border-radius: 10px; padding: 0.6rem 0.8rem; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 0.6rem; }
.toast .dbtn { background: var(--bone); color: var(--ink); border-color: var(--bone); min-height: 36px; padding: 0.35rem 0.8rem; }
.ok-text { color: var(--leaf-deep); font-weight: 700; }
.bad-text { color: #8e2418; font-weight: 700; }

/* switches */
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid #ddd4c3; }
.switch-row:last-child { border-bottom: 0; }
.switch-row .sw-text { display: flex; flex-direction: column; }
.switch-row .sw-text small { color: #5b574f; font-size: 0.8rem; }
.switch {
  flex: 0 0 auto; width: 54px; height: 30px; border-radius: 999px; border: 2px solid var(--ink); background: #e3dccd;
  position: relative; cursor: pointer; padding: 0;
}
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform 0.18s ease; }
.switch[aria-checked="true"] { background: #2b6a53; border-color: #2b6a53; }
.switch[aria-checked="true"]::after { transform: translateX(24px); background: #fff; }
.switch[aria-disabled="true"] { opacity: 0.75; cursor: not-allowed; }
.switch .sw-state { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* feed */
.feed { height: 15rem; overflow-y: auto; border: 1px solid #cfc6b3; border-radius: 10px; padding: 0.4rem 0.6rem; background: #fffdf8; }
.feed:focus-visible { outline: 3px solid var(--peri-deep); outline-offset: 2px; }
.feed article { border-bottom: 1px solid #e6dfd0; padding: 0.5rem 0.1rem; }
.feed article .who { margin: 0; font-size: 0.9rem; font-weight: 700; color: var(--ink); }
.feed article p + p { margin: 0.1rem 0 0; font-size: 0.85rem; color: #4f4b44; }
.feed .end { text-align: center; padding: 0.9rem 0.4rem; color: var(--leaf-deep); font-weight: 700; }
.feed .divider { text-align: center; font-family: var(--mono); font-size: 0.75rem; color: #5b574f; padding: 0.4rem 0; }
.meter { height: 8px; background: #ddd4c3; border-radius: 999px; overflow: hidden; margin: 0.4rem 0; }
.meter span { display: block; height: 100%; background: #2b6a53; width: 0; transition: width 0.3s ease; }

/* readouts beneath panes */
.readout { font-family: var(--mono); font-size: 0.84rem; background: #0f1014; color: var(--text); border-radius: 10px; padding: 0.7rem 0.8rem; margin-top: 0.8rem; border: 1px solid var(--line); min-height: 3.2rem; }
.readout b { color: var(--bone); }
.readout .flag { color: var(--amber); }
.readout .good { color: var(--leaf-bright); }
.pane-actions { display: flex; justify-content: flex-end; margin-top: 0.6rem; }
.reset-btn { font: inherit; font-size: 0.85rem; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.8rem; min-height: 36px; cursor: pointer; }
.reset-btn:hover { color: var(--bone); border-color: var(--peri); }

.whats { margin: 0.75rem 0 0; padding-left: 1.2rem; font-size: 0.93rem; }
.whats li { margin: 0.25rem 0; }

/* console analysis */
.console { margin-top: 1.5rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .console { grid-template-columns: 1fr 1fr; } }
.console-card { border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; background: var(--graphite); }
.console-card h4 { margin: 0 0 0.4rem; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--peri); }
.console-card p, .console-card ul { margin: 0 0 0.6rem; font-size: 0.97rem; }
.console-card ul { padding-left: 1.1rem; }
.console-card.trapview { border-color: rgba(242,182,107,0.55); }
.console-card.humaneview { border-color: rgba(108,195,163,0.55); }
.console-card.nuance { grid-column: 1 / -1; }
.console-card[hidden] { display: none; }

/* ---------- Redesign bench ---------- */
.bench { border: 1px solid var(--line); border-radius: 20px; background: var(--graphite-2); padding: clamp(1rem, 2.5vw, 2rem); }
.bench-controls { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 980px) { .bench-controls { grid-template-columns: 320px 1fr; } }
.bench label.sel { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.bench select { font: inherit; width: 100%; padding: 0.6rem; border-radius: 10px; background: var(--graphite); color: var(--text); border: 1px solid var(--line); min-height: 44px; }
.fixes { border: 1px solid var(--line); border-radius: 14px; padding: 0.6rem 1rem 0.8rem; margin: 1rem 0 0; }
.fixes legend { font-weight: 700; padding: 0 0.3rem; color: var(--bone); }
.fixes label { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.4rem 0; cursor: pointer; }
.fixes input { width: 24px; height: 24px; margin-top: 0.2rem; accent-color: var(--leaf); flex: 0 0 auto; }
.bench-previews { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 720px) { .bench-previews { grid-template-columns: 1fr 1fr; } }
.bench-previews .pane { padding: 0.8rem; }
.report { margin-top: 1.5rem; border: 1px solid var(--leaf); border-radius: 14px; padding: 1.1rem 1.2rem; background: var(--graphite); }
.report:empty { display: none; }
.report h3 { margin-top: 0; }
.report table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.report th, .report td { text-align: left; vertical-align: top; padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--line); }
.report th { color: var(--peri); font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table-scroll { overflow-x: auto; }

/* ---------- Checklists ---------- */
.lists { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .lists { grid-template-columns: 1fr 1fr; } }
.list-card { border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.3rem; background: var(--graphite-2); }
.list-card h3 { margin-top: 0; }
.list-card ol, .list-card ul { padding-left: 1.2rem; margin: 0; }
.list-card li { margin: 0.45rem 0; }

/* standards table */
.std { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.96rem; }
.std th, .std td { border-bottom: 1px solid var(--line); padding: 0.6rem 0.5rem; text-align: left; vertical-align: top; }
.std th { color: var(--peri); font-weight: 600; }
.std td:first-child { font-family: var(--mono); font-size: 0.86rem; white-space: nowrap; color: var(--bone); }

/* misconceptions */
.myths { display: grid; gap: 1rem; grid-template-columns: 1fr; padding: 0; }
@media (min-width: 900px) { .myths { grid-template-columns: 1fr 1fr; } }
.myths li { list-style: none; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.15rem; background: var(--graphite-2); }
.myths .myth { font-family: var(--serif); font-size: 1.15rem; color: var(--bone); margin: 0 0 0.35rem; }
.myths .myth::before { content: "Myth — "; font-family: var(--mono); font-size: 0.75rem; color: var(--amber); text-transform: uppercase; letter-spacing: 0.06em; }
.myths p:last-child { margin: 0; }

/* sources */
.sources { padding-left: 1.3rem; max-width: 80ch; }
.sources li { margin: 0 0 1.1rem; }
.sources .what { display: block; font-size: 0.95rem; color: var(--muted); margin-top: 0.2rem; }

/* related */
.related { display: grid; gap: 1rem; grid-template-columns: 1fr; padding: 0; }
@media (min-width: 760px) { .related { grid-template-columns: repeat(3, 1fr); } }
.related li { list-style: none; border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; background: var(--graphite-2); display: flex; flex-direction: column; gap: 0.4rem; }
.related h3 { margin: 0; font-size: 1.2rem; }
.related p { margin: 0; font-size: 0.96rem; flex: 1; }

/* final */
.final { text-align: left; padding: clamp(3rem, 8vw, 6rem) 0; border-top: 1px solid var(--line); }
.final .big-q { font-family: var(--serif); font-size: clamp(1.6rem, 3.6vw, 2.6rem); color: var(--bone); max-width: 28ch; line-height: 1.2; margin: 0.4rem 0 1.2rem; }

footer.site-foot { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--muted); font-size: 0.92rem; }
footer.site-foot a { color: var(--muted); }
.foot-grid { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.foot-links a { min-height: 32px; display: inline-flex; align-items: center; }

/* diagrams */
.diagram { margin: 1.5rem 0; }
.diagram figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; max-width: var(--measure); }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: left; padding: 3rem 1rem; }
.notfound .box { max-width: 40rem; }

@media print {
  .topbar, .seg, .js-only, .bench, .reset-btn { display: none !important; }
  body { background: #fff; color: #000; }
  h1, h2, h3, h4, strong { color: #000; }
}

.device label.stack { flex-direction: column; gap: 0.25rem; align-items: flex-start; }
.device .err { color: #8e2418; font-weight: 700; margin: 0.4rem 0 0; }
.device .step-title { font-weight: 700; font-size: 1.02rem; margin: 0 0 0.4rem; }
.device .step-title:focus { outline: 2px dashed var(--peri-deep); outline-offset: 3px; }
.device .mock-cb { font-family: var(--mono); margin-right: 0.35rem; }
.device .preview-line { margin: 0.35rem 0; }
.device .tag { display: inline-block; font-family: var(--mono); font-size: 0.7rem; border: 1px solid #8f877a; border-radius: 4px; padding: 0 0.3rem; margin-left: 0.3rem; color: #4f4b44; }
.device .stat { font-family: var(--mono); font-size: 0.82rem; background: #ece5d6; border-radius: 6px; padding: 0.3rem 0.5rem; display: inline-block; margin-top: 0.4rem; }
.device .nag { border: 2px solid var(--ink); background: #fff; border-radius: 10px; padding: 0.7rem; margin: 0.6rem 0; }
.device .dialog-mock.red { background: #f6d9d4; border-color: #9b2c1f; }
.device .sw-ctl { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.78rem; color: #4f4b44; }
.report .fine-note { color: var(--muted); font-size: 0.9rem; margin: 1rem 0 0; }
.report:focus { outline: 3px solid var(--peri); outline-offset: 3px; }

.device strong, .device b { color: inherit; }
.device .toast strong { color: inherit; }

@media (min-width: 900px) { .js .console { grid-template-columns: 1fr; } }
