@font-face {
  font-family: "Orbitron";
  src: url("fonts/Orbitron-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  --bg: #fff;
  --ink: #0a0a0a;
  --ink-soft: #3f3f46;
  --muted: #6b7280;
  --line: #e5e5e5;
  --control: #8a8a93;
  --frame-line: #c4c4c8;
  --panel: #f4f4f5;
  --grid: #e4e4e7;
  --shade: #e4e4e7;
  --rose: #f43f5e;
  --display: "Orbitron", "Arial Black", system-ui, sans-serif;
  --mono: "Courier Prime", "Courier New", ui-monospace, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 6px;
  --header-h: 64px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0a0a0a;
  --ink: #fafafa;
  --ink-soft: #d4d4d8;
  --muted: #a1a1aa;
  --line: #262626;
  --control: #71717a;
  --frame-line: #3f3f46;
  --panel: #141414;
  --grid: #1f1f1f;
  --shade: #1c1c1e;
  color-scheme: dark;
}
/* #6b7280 is 4.4:1 on the panel grey, short of AA, so panel surfaces use a darker muted. */
:root:not([data-theme="dark"]) :is(.tab-panel, .ba-before, .defs > div, .scenario, .hero-art, .search-results li[aria-selected="true"], .loop-steps li[aria-current="step"], thead th) { --muted: #52525b; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  overflow-wrap: break-word;
}
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { margin: 0; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; }
code { font-family: var(--mono); font-size: .95em; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
caption { text-align: left; font-family: var(--mono); font-size: 14px; color: var(--muted); padding-bottom: 8px; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
thead th { font-weight: 700; background: var(--panel); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }
html:not(.js) .js-only { display: none !important; }
.js .nojs-only { display: none !important; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h);
  padding: 8px clamp(16px, 3vw, 32px);
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 40px; }
.brand-glyph { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; margin: 0; }
.header-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  width: 260px; min-height: 40px; padding: 0 8px 0 12px;
  border: 1px solid var(--control); border-radius: var(--radius);
  background: var(--bg); color: var(--muted);
  font: 15px var(--sans); cursor: pointer; text-align: left;
}
.search-placeholder { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd {
  font: 12px var(--mono); color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; background: var(--panel);
}
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a:not(.chip) {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px;
  text-decoration: none; font-size: 15px; border-radius: var(--radius);
}
.site-nav a:not(.chip):hover { text-decoration: underline; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--control); border-radius: 999px;
  font: 14px var(--mono); text-decoration: none; background: var(--bg);
}
.progress-chip { margin-left: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--line); }
.menu-btn { display: none; }

.band { border-top: 1px solid var(--line); }
main > .band:first-child { border-top: 0; }
.frame {
  max-width: 1280px; margin: 0 auto;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.cells { display: grid; gap: 1px; background: var(--line); }
.cells + .cells { border-top: 1px solid var(--line); }
.cell { background: var(--bg); padding: clamp(20px, 3vw, 40px); min-width: 0; }
.cells-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cells-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cells-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cells-tags { grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); }
.cells-hero-state { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); }
.cells-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.band-head .frame { padding: 36px 24px 32px; text-align: center; }
.band-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em;
}
.band-sub { font-family: var(--mono); color: var(--muted); margin: 10px auto 0; max-width: 60ch; }
.band-head .stamp { margin-bottom: 8px; }

.stamp {
  font-family: var(--mono); font-size: 14px; letter-spacing: .04em;
  color: var(--muted); margin: 0 0 10px;
}
.cell-title { font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; line-height: 1.3; margin-bottom: 12px; }
.cell-title a { text-decoration: none; }
.cell-title a:hover { text-decoration: underline; }
.note { font-family: var(--mono); font-size: 14.5px; color: var(--muted); }
.small { font-size: 15px; color: var(--ink-soft); max-width: 70ch; }
.prose { max-width: 68ch; }
.mini { display: block; font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.plain-list { margin: 0; padding-left: 20px; max-width: 80ch; }
.plain-list li { margin-bottom: 6px; }
.text-link { font-weight: 700; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: min(720px, calc(100vh - var(--header-h))); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(40px, 6vw, 80px) clamp(20px, 3.4vw, 40px); }
.chip-soft { background: var(--panel); border-color: var(--line); border-radius: var(--radius); color: var(--ink-soft); margin-bottom: 28px; min-height: 32px; }
h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.05rem, 3.6vw, 3.25rem); line-height: 1.08; letter-spacing: -.03em;
  margin-bottom: 24px;
}
.h1-line { display: block; }
.h1-soft { color: var(--ink-soft); font-weight: 500; }
.lead { font-family: var(--mono); font-size: 1.15rem; line-height: 1.6; color: var(--muted); max-width: 34em; margin-bottom: 14px; }
.hero-note { font-size: 16px; color: var(--ink-soft); max-width: 46ch; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px;
  border: 1px solid var(--control); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
  font: 700 16px/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--ink); }
.btn-solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-solid:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.hero-art { background: var(--panel); border-left: 1px solid var(--line); padding: 16px; display: flex; }
.hero-art-inner {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  border: 1px solid var(--frame-line);
  background-image:
    repeating-linear-gradient(30deg, var(--grid) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(150deg, var(--grid) 0 1px, transparent 1px 46px);
  padding: 12px;
}
.cube { width: 100%; height: auto; max-height: 600px; display: block; overflow: visible; }
.art-caption { font-family: var(--mono); font-size: 13.5px; color: var(--ink-soft); text-align: center; margin: 4px auto 0; max-width: 46ch; }
.cube .face-fill { fill: var(--bg); stroke: var(--ink); stroke-width: 1.6; }
.cube .edge-outer { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.cube .edge-inset { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.cube .plinth-top { fill: var(--panel); stroke: var(--ink); stroke-width: 1.4; }
.cube .plinth-side { fill: var(--shade); stroke: var(--ink); stroke-width: 1.4; }
.cube .plinth-shade { fill: var(--panel); }
.cube .dash { fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-dasharray: 5 4; }
.cube .rivets circle { fill: var(--panel); stroke: var(--ink); stroke-width: 1.1; }
.cube .loop-glyph { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cube text { text-anchor: middle; fill: var(--ink); }
.cube .face-label { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.cube .face-caption { font-family: var(--mono); font-size: 12.5px; fill: var(--ink-soft); }
.cube .plinth-label { font-family: var(--mono); font-size: 15px; }
.cube .chip-dark { fill: var(--ink); }
.cube .chip-rose { fill: var(--bg); stroke: var(--rose); stroke-width: 1.4; }
.cube .chip-text { font-family: var(--sans); font-weight: 700; font-size: 16px; }
.cube .chip-text-light { fill: var(--bg); }
.cube .face { transition: transform .25s ease; }
.cube .face-link { cursor: pointer; }
.cube .face-link:hover .face, .cube .face-link:focus-visible .face { transform: translateY(-6px); }
.cube .face-link:focus { outline: none; }
.cube .face-link:focus-visible .face-hit { stroke-width: 3.5; stroke-dasharray: 8 4; }
@media (prefers-reduced-motion: no-preference) {
  .cube-float { animation: float 7s ease-in-out infinite; }
}
@keyframes float { 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) {
  .cube .face { transition: none; }
}

.cell-intro p { color: var(--ink-soft); }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font: 12.5px/1.5 var(--mono); white-space: nowrap;
  border: 1px solid var(--control); border-radius: var(--radius);
  padding: 1px 8px; margin-right: 8px; vertical-align: .08em;
  background: var(--bg);
}
.tag-glyph { font-size: 11px; line-height: 1; }
.cells-tags .tag { font-size: 14px; padding: 4px 10px; margin-right: 0; white-space: normal; }

.ladder .rung { display: flex; flex-direction: column; }
.rung-dl { margin: 0 0 16px; }
.rung-dl dt { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rung-dl dd { margin: 0 0 12px; font-size: 15.5px; }
.rung-progress { margin-top: auto; display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 14px; }
.meter { flex: 1; height: 6px; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--ink); }
.artifact { display: flex; gap: 14px; align-items: flex-start; }
.artifact p { margin: 0; font-weight: 700; }
.artifact-n {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border: 1px solid var(--ink); border-radius: var(--radius);
  font-family: var(--display); font-weight: 700; font-size: 15px;
}

.ch-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1px; background: var(--line); }
.ch-wide .ch-grid { grid-template-columns: minmax(0, 1fr); }
.ch-wide .ch-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; align-items: start; }
.ch-wide .ch-text > .stamp, .ch-wide .ch-text > .ch-title, .ch-wide .ch-text > .label { grid-column: 1 / -1; }
.ch-wide .ch-text > .claims { grid-column: 1; }
.ch-wide .ch-text > :not(.stamp):not(.ch-title):not(.label):not(.claims) { grid-column: 2; }
.ch-wide .ch-text > .done-btn { grid-column: 1; justify-self: start; }
.ch-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.35rem, 2.3vw, 1.9rem); line-height: 1.2; letter-spacing: -.02em;
  margin-bottom: 4px;
}
.label {
  font: 400 13px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 26px 0 12px;
}
.ch-lab > .label:first-child { margin-top: 0; }
.claims { list-style: none; padding: 0; margin: 0; max-width: 68ch; }
.claims li { margin-bottom: 14px; }
.src {
  font: 13px var(--mono); white-space: nowrap;
  text-decoration: underline dotted; text-decoration-thickness: 1px;
}
.src:hover { text-decoration-style: solid; }

.try {
  position: relative;
  border: 1.5px dashed var(--control);
  padding: 18px 22px 8px; margin: 22px 0 24px; max-width: 68ch;
}
.try::before, .try::after {
  content: ""; position: absolute; width: 8px; height: 8px;
  border: 1.2px solid var(--control); border-radius: 50%; background: var(--bg);
}
.try::before { top: 6px; left: 6px; }
.try::after { bottom: 6px; right: 6px; }
.try .label { margin-top: 0; }

.done-btn { margin-top: 8px; }
.done-btn::before {
  content: ""; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 3px;
}
.done-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.done-btn[aria-pressed="true"]::before {
  width: 6px; height: 12px; border-width: 0 2.5px 2.5px 0; border-radius: 0;
  transform: rotate(45deg) translate(-2px, -2px);
}
.chapter[data-done] .stamp::after { content: " · done"; }

.panel-title { font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: -.01em; margin: 22px 0 10px; }
.panel-q { font-family: var(--mono); font-size: 1.05rem; line-height: 1.55; }
.study-title { font-family: var(--display); font-weight: 600; font-size: .95rem; margin-bottom: 4px; }

.tabs { margin-bottom: 16px; }
.tab-panel { border: 1px solid var(--line); background: var(--panel); padding: 18px 20px 8px; }
.tab-panel + .tab-panel { border-top: 0; }
.tab-panel > .panel-title { margin-top: 0; }
[data-enhanced] > .tab-panel > .panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[data-enhanced] > .tab-panel + .tab-panel { border-top: 1px solid var(--line); }
[role="tablist"] { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
[role="tab"] {
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--control); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); font: 15px var(--sans); cursor: pointer;
}
[role="tab"][aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }

.pair { margin: 0; }
.pair dt { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pair dd { margin: 0 0 12px; }

.lab { margin-bottom: 8px; }
.lab-hint { font-size: 15px; color: var(--ink-soft); }
.lab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.result {
  border-left: 2px solid var(--ink); padding: 8px 0 8px 14px; margin: 14px 0;
  font-weight: 700; min-height: 1.6em;
}
.result:empty { display: none; }
.status { font-family: var(--mono); font-size: 14px; color: var(--muted); }

.choice-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.choice, .toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--control); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); font: 15px var(--sans); cursor: pointer;
}
.choice[aria-pressed="true"], .toggle[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.toggle::before { content: ""; width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px; }
.toggle[aria-pressed="true"]::before { background: currentColor; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback { margin: 6px 0 0; font-size: 15.5px; }
.feedback:empty { display: none; }

.defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 0 0 16px; }
.defs > div { background: var(--panel); padding: 12px 14px; }
.defs dt { font-family: var(--display); font-weight: 600; font-size: 14px; }
.defs dd { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.idea-cards { list-style: none; padding: 0; margin: 0; }
.idea-card { border: 1px solid var(--line); padding: 14px 16px; margin-bottom: -1px; }
.idea-prompt { font-family: var(--mono); font-size: 1rem; margin-bottom: 6px; }
.idea-open { margin-top: 16px; border-style: dashed; border-color: var(--control); }
.idea-open ul { padding-left: 20px; }

.switch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 14px; }
.bulb-wrap { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 0 6px; font-family: var(--mono); font-size: 14.5px; }
.bulb { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.bulb[data-state="unknown"] { border-style: dashed; }
.bulb[data-state="on"] { background: var(--ink); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5.5px var(--ink); }
.candidates tr[data-out] th, .candidates tr[data-out] td:first-of-type { text-decoration: line-through; color: var(--muted); }
.candidates tr[data-out] td { color: var(--muted); }
.budget { font-family: var(--mono); font-size: 14.5px; }
.obs-log { font-family: var(--mono); font-size: 14px; padding-left: 22px; margin: 8px 0; }
.obs-log:empty { display: none; }

.formulas { list-style: none; padding: 0; margin: 12px 0; }
.formulas li { border: 1px solid var(--line); padding: 10px 14px; margin-bottom: -1px; font-size: 15.5px; }
.formulas code { display: block; margin-top: 6px; font-size: 1.1rem; font-weight: 700; }
.seg { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seg legend { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0; margin-bottom: 6px; }
.seg label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--control); border-radius: var(--radius); cursor: pointer; font-size: 15px;
}
.seg label:has(input:checked) { border-color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--ink); }
.seg input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
.lab-controls { margin: 12px 0; }
.truth td[data-active], .truth th[data-active] { background: var(--panel); font-weight: 700; }
.truth tr[aria-current="true"] td { border-top: 1px solid var(--rose); border-bottom: 1px solid var(--rose); }
.truth tr[aria-current="true"] td:first-child { border-left: 3px solid var(--rose); position: relative; padding-left: 22px; }
.truth tr[aria-current="true"] td:first-child::before {
  content: ""; position: absolute; left: 8px; top: 50%; margin-top: -5px;
  border: 5px solid transparent; border-left: 7px solid var(--ink); border-right: 0;
}
.truth tr[aria-current="true"] td:last-child { border-right: 1px solid var(--rose); }

.sliders { display: grid; gap: 14px; margin: 12px 0 18px; }
.slider { display: grid; gap: 4px; font-size: 15px; }
.slider span { display: flex; justify-content: space-between; gap: 12px; }
.slider output { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.slider input { width: 100%; min-height: 40px; accent-color: var(--ink); margin: 0; }
.grid100 { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; max-width: 300px; margin: 18px 0 12px; }
.mark { display: inline-block; width: 14px; height: 14px; flex: none; }
.grid100 .mark { width: 100%; height: auto; aspect-ratio: 1; }
.m-uf { background: var(--ink); }
.m-um { border: 2px solid var(--ink); }
.m-sf { background: var(--ink-soft); border-radius: 50%; }
.m-sc { border: 1.5px solid var(--control); border-radius: 50%; transform: scale(.7); }
.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14.5px; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }

.scenario { border: 1px solid var(--line); background: var(--panel); padding: 14px 16px; font-family: var(--mono); }
.changes { padding: 0; list-style: none; margin: 0 0 12px; }
.change { border: 1px solid var(--line); padding: 12px 16px; margin-bottom: -1px; }
.change-label { font-weight: 700; margin-bottom: 4px; }
.why { font-size: 15px; color: var(--ink-soft); margin: 6px 0 0; }
.js .change:not([data-answered]) .why { display: none; }

.before-after { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ba { background: var(--bg); padding: 16px 18px; }
.ba-before { background: var(--panel); }
.ba-claim { font-family: var(--mono); font-size: 1.05rem; line-height: 1.8; }
.ba-before .ba-claim { font-family: var(--display); font-weight: 600; font-size: 1.25rem; }
mark.part, span.part { background: none; color: inherit; padding-bottom: 1px; border-bottom: 2px solid var(--ink); }
.part[data-part="conditions"] { border-bottom-style: dashed; }
.part[data-part="measure"] { border-bottom-style: dotted; border-bottom-width: 3px; }
.part[data-part="limit"] { border-bottom-style: double; border-bottom-width: 4px; }
.parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 12px 0 0; }
.parts dt { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.parts dd { margin: 2px 0 0; font-size: 15px; }
.numbered { padding-left: 22px; max-width: 68ch; }
.numbered li { margin-bottom: 6px; }

.principles details { border-top: 1px solid var(--line); }
.principles details:last-child { border-bottom: 1px solid var(--line); }
.principles summary {
  display: flex; align-items: center; gap: 12px; min-height: 52px; cursor: pointer;
  font-weight: 700; list-style: none; padding: 8px 0;
}
.principles summary::-webkit-details-marker { display: none; }
.principles summary::after { content: "+"; margin-left: auto; font-family: var(--mono); font-size: 20px; }
.principles details[open] summary::after { content: "−"; }
.principles details p { padding: 0 0 14px 46px; color: var(--ink-soft); max-width: 68ch; }
.p-n {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border: 1px solid var(--ink); border-radius: var(--radius);
  font-family: var(--display); font-size: 14px; font-weight: 700;
}
.compact { font-size: 14.5px; margin-top: 8px; }
.table-scroll { overflow-x: auto; margin: 0 0 16px; max-width: 100%; }
.dag { margin: 4px 0 8px; border: 1px solid var(--line); padding: 12px 16px; max-width: 68ch; }
.dag figcaption { font-family: var(--mono); font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.dag ul { list-style: none; padding: 0; margin: 0; font-family: var(--mono); font-size: 14.5px; }

.mech-cards, .mode-cards, .study-cards, .inv-cards, .period-cards {
  display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.mech-cards > *, .mode-cards > *, .study-cards > *, .inv-cards > *, .period-cards > * { background: var(--bg); padding: 16px 18px; }
.mech .panel-title, .inv .panel-title, .period .panel-title { margin-top: 0; }
.study-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.study .pair dd, .mode .pair dd, .mech .pair dd { font-size: 15px; }
.inv-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.period-cards { grid-template-columns: minmax(0, 1fr); }
.conc { padding-left: 18px; font-size: 15px; }
.conc li { margin-bottom: 6px; }

.loop { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 20px; align-items: start; }
.loop-ring { width: 100%; height: auto; }
.loop-ring .ring { fill: none; stroke: var(--control); stroke-width: 1.2; stroke-dasharray: 4 4; }
.loop-ring .node circle { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.loop-ring .node text { font-family: var(--display); font-weight: 700; font-size: 16px; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.loop-ring .node[data-current] circle { fill: var(--ink); }
.loop-ring .node[data-current] text { fill: var(--bg); }
.loop-ring .node .halo { fill: none; stroke: var(--rose); stroke-width: 1.5; opacity: 0; }
.loop-ring .node[data-current] .halo { opacity: 1; }
.loop-steps { padding-left: 22px; margin: 0; }
.loop-steps li { padding: 6px 8px; margin-bottom: 4px; font-size: 15.5px; border-left: 2px solid transparent; }
.loop-steps li[aria-current="step"] { border-left-color: var(--rose); background: var(--panel); }
.loop-side .lab-actions { margin-top: 0; }
.rule-box { border: 1.5px dashed var(--control); padding: 14px 18px; margin-top: 18px; }
.rule-box p:last-child { margin-bottom: 0; }

.stack { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; border: 1px solid var(--ink); }
.stack .bar {
  min-height: max(44px, calc(var(--min) * 1.2px));
  display: flex; align-items: center; padding: 4px 8px;
  border-top: 1px solid var(--ink);
}
.stack .bar:first-child { border-top: 0; }
.bar-text { background: var(--bg); color: var(--ink); border: 1px solid var(--line); padding: 2px 8px; font-size: 14.5px; display: inline-flex; gap: 10px; }
.bar-name { font-weight: 700; }
.bar-min { font-family: var(--mono); }
.bar-1 { background: var(--ink); }
.bar-2 { background: var(--shade); }
.bar-3 { background: repeating-linear-gradient(45deg, var(--ink) 0 1px, transparent 1px 8px); }
.bar-4 { background: var(--panel); }
.bar-5 { background: radial-gradient(var(--ink) 1px, transparent 1.5px) 0 0 / 8px 8px; }

.week-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .9fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 16px; }
.phase { background: var(--bg); padding: 12px 14px; }
.phase-title { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.week-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.week-btn {
  position: relative; min-width: 44px; min-height: 44px; padding: 0 10px;
  border: 1px solid var(--control); border-radius: var(--radius); background: var(--bg); color: var(--ink);
  font: 700 15px var(--display); cursor: pointer;
}
.week-btn-wide { font-family: var(--sans); font-size: 14px; }
.week-btn[aria-expanded="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.week-btn[data-done]::after {
  content: ""; position: absolute; right: -4px; top: -4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink);
  background-image: linear-gradient(var(--ink), var(--ink)); background-size: 6px 6px; background-position: center; background-repeat: no-repeat;
}
.week-panels { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.week-panel { background: var(--bg); padding: 16px 20px; }
.week-panel .panel-title { margin-top: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.phase-tag { font-family: var(--mono); font-weight: 400; font-size: 13px; color: var(--muted); }
.week-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; margin: 0 0 12px; }
.week-dl dt { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.week-dl dd { margin: 4px 0 0; font-size: 15.5px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: 15.5px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; flex: none; }

.promise { margin: 18px 0; padding: 16px 20px; border-left: 3px solid var(--ink); background: var(--panel); font-family: var(--mono); font-size: 1.05rem; max-width: 68ch; }
.promise p { margin: 0; }
.brief td, .brief th { font-size: 14.5px; }
.brief td:last-child { font-family: var(--mono); font-size: 14px; }
.desk-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 26px; margin-bottom: 8px; font-size: 15.5px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .35em; width: 12px; height: 12px; border: 1.5px solid var(--ink); }
.flow { list-style: none; padding: 0; margin: 0 0 12px; counter-reset: flow; }
.flow li {
  counter-increment: flow; position: relative;
  border: 1px solid var(--ink); padding: 8px 12px 8px 44px; margin-bottom: 22px; font-size: 15px; font-weight: 700;
}
.flow li::before { content: counter(flow); position: absolute; left: 12px; top: 8px; font-family: var(--display); font-size: 13px; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 24px; bottom: -22px; height: 21px; border-left: 1.5px solid var(--ink); }
.flow-decision { border-style: dashed !important; }
.flow-branch { display: block; font-weight: 400; font-family: var(--mono); font-size: 13.5px; margin-top: 4px; }

.pilot td { text-align: center; font-family: var(--mono); font-weight: 700; width: 12%; }
.pilot td.held { background: var(--ink); color: var(--bg); }
.pilot tfoot td { background: none; color: inherit; font-weight: 400; }
.arith { list-style: none; padding: 0; margin: 0 0 18px; }
.arith li { border: 1px solid var(--line); padding: 10px 14px; margin-bottom: -1px; font-size: 15.5px; }
.rubric .dim { border: 1px solid var(--line); margin: 0 0 -1px; padding: 10px 14px 8px; }
.rubric legend { font-family: var(--display); font-weight: 600; font-size: 14.5px; padding: 0 6px; }
.rubric .dim label { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: 15px; }
.rubric input[type="radio"] { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; flex: none; }
.lvl { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid var(--control); border-radius: 4px; font-family: var(--mono); font-weight: 700; flex: none; }
.rubric .dim label:has(input:checked) { font-weight: 700; }
.rubric .dim label:has(input:checked) .lvl { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.critical { margin-top: 16px; align-items: flex-start; max-width: 70ch; }
.critical input { margin-top: 4px; }

.artifacts { list-style: none; padding: 0; margin: 0 0 14px; }
.artifacts li { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); padding: 12px 16px; margin-bottom: -1px; font-weight: 700; }
.complete-line { border: 1px solid var(--rose); padding: 12px 16px; font-weight: 700; }

.checkpoint .cell { background: var(--bg); }
.baseline { padding-left: 22px; max-width: 80ch; }
.baseline li { margin-bottom: 18px; }
.baseline label { display: block; font-weight: 700; margin-bottom: 6px; }
textarea, input[type="search"] {
  width: 100%; font: 16px/1.5 var(--sans); color: var(--ink); background: var(--bg);
  border: 1px solid var(--control); border-radius: var(--radius); padding: 10px 12px;
}
textarea { resize: vertical; min-height: 96px; }

.tool-card { display: flex; flex-direction: column; }
.tool-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.tool-head h4 { font-family: var(--display); font-weight: 600; font-size: .95rem; }
pre {
  margin: 0; flex: 1;
  background: var(--panel); border: 1px solid var(--line); padding: 14px 16px;
  font: 14px/1.55 var(--mono); color: var(--ink);
  overflow-x: auto; white-space: pre;
}
.report-structure ol { padding-left: 22px; columns: 2; column-gap: 40px; }
.report-structure li { margin-bottom: 6px; break-inside: avoid; }
.filter { display: grid; gap: 6px; max-width: 420px; margin-bottom: 8px; font-weight: 700; }
.glossary { margin: 12px 0 0; }
.gloss-item { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 4px 24px; border-top: 1px solid var(--line); padding: 10px 0; }
.gloss-item dt { font-weight: 700; }
.gloss-item dd { margin: 0; color: var(--ink-soft); max-width: 70ch; }
.gloss-item:target, .refs li:target { outline: 1px solid var(--rose); outline-offset: 4px; }
.prose-block > p, .prose-block > ul { max-width: 75ch; }
.prose-block ul li { margin-bottom: 6px; }
.refs { padding-left: 26px; font-size: 15px; }
.refs li { margin-bottom: 12px; max-width: 90ch; }
.refs a { overflow-wrap: anywhere; }

.site-footer { border-bottom: 1px solid var(--line); }
.site-footer p { font-size: 15px; }
.site-footer .brand-name { font-size: 18px; margin-bottom: 8px; }

.search-dialog {
  width: min(640px, calc(100vw - 24px)); max-height: min(70vh, 560px);
  margin: 12vh auto auto; padding: 0;
  border: 1px solid var(--control); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
}
.search-dialog::backdrop { background: rgb(10 10 10 / .4); }
.search-box { display: flex; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); }
.search-box input { border: 0; padding: 8px 4px; font-size: 17px; }
.search-box input:focus-visible { outline: none; }
.search-dialog:has(input:focus-visible) .search-box { box-shadow: inset 0 -2px 0 var(--ink); }
.search-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; max-height: calc(min(70vh, 560px) - 70px); }
.search-results:empty { display: none; }
.search-results li {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  min-height: 44px; padding: 8px 12px; border-radius: var(--radius); cursor: pointer; border-left: 2px solid transparent;
}
.search-results li[aria-selected="true"] { background: var(--panel); border-left-color: var(--rose); }
.search-results .kind { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.search-empty { padding: 16px; margin: 0; color: var(--muted); }

@media (max-width: 1080px) {
  .cells-tags { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cells-tags .cell-intro { grid-column: 1 / -1; }
  .cells-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cells-hero-state { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cells-hero-state > :first-child { grid-column: 1 / -1; }
  .week-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-art { border-left: 0; border-top: 1px solid var(--line); }
  .cube { max-height: 460px; }
  .ch-grid, .ch-wide .ch-text { grid-template-columns: minmax(0, 1fr); }
  .ch-wide .ch-text > * { grid-column: 1 !important; }
  .cells-3 { grid-template-columns: minmax(0, 1fr); }
  .desk-split { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .week-dl { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .search-trigger { width: 40px; padding: 0; justify-content: center; }
  .search-placeholder, .search-trigger .kbd { display: none; }
  .header-inner { flex-wrap: nowrap; position: relative; }
  .js .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px clamp(16px, 3vw, 32px) 16px;
  }
  .js .site-header[data-menu-open] .site-nav { display: flex; }
  .js .site-nav a:not(.chip) { min-height: 44px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .js .progress-chip { margin: 12px 0 0; align-self: flex-start; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
  .header-tools { gap: 6px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cells-2, .cells-4, .cells-tags, .cells-hero-state, .cells-footer, .defs, .parts, .before-after, .week-nav { grid-template-columns: minmax(0, 1fr); }
  .loop { grid-template-columns: minmax(0, 1fr); }
  .loop-ring { max-width: 220px; justify-self: center; }
  .gloss-item { grid-template-columns: minmax(0, 1fr); }
  .report-structure ol { columns: 1; }
  .band-head .frame { padding: 28px 16px 24px; }
  .hero-copy { padding: 36px 20px 40px; }
  .hero-art { padding: 10px; }
  .brand-name { font-size: 17px; }
  .lead { font-size: 1.05rem; }
}

.formula { font-family: var(--mono); font-size: 15px; line-height: 1.7; padding: 14px 16px; border: 1px solid var(--line); background: var(--panel); overflow-x: auto; }
.more-link { margin: 0 0 18px; }
.extra .ch-text .try { margin-top: 20px; }

.book { display: flex; flex-direction: column; }
.book cite { font-style: normal; }
.book-by { font-family: var(--mono); font-size: 14.5px; color: var(--muted); }
.book-links { color: var(--ink-soft); }
.book-buy { margin-top: auto; padding-top: 8px; }

.spec .prose-block > .cell-title { display: flex; gap: 12px; align-items: baseline; }
.spec .prose-block > .cell-title:not(:first-child) { margin-top: 36px; }
.doc-n { font: 400 14px var(--mono); color: var(--muted); letter-spacing: .04em; flex: none; }
.doc-control p:last-child { margin: 0; font-size: 15.5px; }
.toc { margin: 0; padding-left: 22px; columns: 2; column-gap: 48px; max-width: 90ch; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.section-sum { font-family: var(--mono); color: var(--muted); max-width: 34ch; margin-top: 14px; }
.advisory { border-left: 3px solid var(--control); background: var(--panel); padding: 12px 16px; margin: 16px 0; max-width: 75ch; }
.advisory p { margin: 0; }
.advisory .advisory-label { font: 700 13px var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.advisory-caution { border-left-color: var(--rose); }
.start-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 640px) { .toc { columns: 1; } }
@media (max-width: 1280px) and (min-width: 821px) {
  .search-trigger { width: 40px; padding: 0; justify-content: center; }
  .search-placeholder, .search-trigger .kbd { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .site-nav { flex-wrap: nowrap; white-space: nowrap; }
}
@media (max-width: 920px) and (min-width: 821px) {
  .site-nav { gap: 0; }
  .site-nav a:not(.chip) { padding: 0 6px; font-size: 14.5px; }
  .brand-name { font-size: 17px; }
}
