:root {
  --sheet: #f2efe8;
  --paper: var(--sheet);
  --black: #111;
  --white: #fff;
  --ink: var(--black);
  --red: #e30613;
  --cyan: #00d8f0;
  color-scheme: dark;
  font-family: "Helvetica Neue", Helvetica, Arial, "Nimbus Sans", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}
:root[data-invert] { --paper: var(--black); --ink: var(--white); }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--sheet); background: var(--black); }
h1, h2, h3, p, figure, ol, ul, dl, dd { margin: 0; }
button, a { color: inherit; }
button { font: inherit; }
a { text-underline-offset: .2em; }
code, kbd { font: inherit; font-weight: 700; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only, .svg-defs { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell { width: min(100%, 2008px); margin-inline: auto; padding: 8px clamp(12px, 2.5vw, 44px); }
.deck-header, .deck-dock { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.deck-header { min-height: 43px; margin-bottom: 8px; }
.deck-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.02em; }
.deck-brand svg { width: 22px; height: 22px; --paper: var(--black); }
.chapters, .dock-group { display: flex; align-items: center; gap: 4px; }
.control {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; min-width: 36px;
  padding: 0 10px; border: 1px solid transparent; background: transparent; color: inherit;
  cursor: pointer; touch-action: manipulation; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.control:disabled { opacity: .38; cursor: default; }
.control:hover:not(:disabled) { border-color: currentColor; }
.control[aria-current], .control[aria-pressed="true"] { background: var(--sheet); color: var(--black); }
.icon-control { padding-inline: 7px; font-size: 20px; }
.icon-control svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.deck-dock { min-height: 43px; margin-top: 6px; }
.dock-label, kbd { font-size: 11px; }
.dock-label { margin-right: 5px; }
#page { min-width: 59px; text-align: center; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.noscript { padding: 12px; }

.stage { --poster-width: min(100%, max(870px, calc((100svh - 121px) * 16 / 9))); }
.deck-progress { height: 2px; width: var(--poster-width); margin-inline: auto; }
.deck-progress span {
  display: block; height: 100%; background: var(--red); transform-origin: left;
  transform: scaleX(var(--deck-progress, calc(1 / 15))); transition: transform 240ms cubic-bezier(.2,.75,.25,1);
}
.poster {
  --margin: 5.45%; --top: 14%; --bottom: 7%;
  position: relative; isolation: isolate; overflow: hidden; container-type: inline-size;
  width: var(--poster-width);
  margin-inline: auto; aspect-ratio: 16 / 9;
  background: var(--paper); color: var(--ink);
  line-height: 1.37;
}
.poster::after {
  content: attr(data-axis); position: absolute; top: var(--top); right: 2.15%;
  writing-mode: vertical-rl; font-size: max(10px, .89cqw); font-weight: 700; letter-spacing: .085em;
}
.poster-meta {
  position: absolute; inset: 4.55% var(--margin) auto; display: flex; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid currentColor; padding-bottom: .83cqw;
  font-size: max(12px, 1.02cqw); font-weight: 700; line-height: 1.1;
}
.page-mark { white-space: nowrap; font-variant-numeric: tabular-nums; }
.edition-mark {
  position: absolute; right: var(--margin); bottom: 2.3%; z-index: 3;
  white-space: nowrap; font-variant-numeric: tabular-nums; font-size: max(10px, .86cqw); font-weight: 700; letter-spacing: .03em;
}
.plate {
  position: absolute; inset: var(--top) var(--margin) var(--bottom); display: grid;
  grid-template: repeat(12, minmax(0, 1fr)) / repeat(12, minmax(0, 1fr));
  font-size: max(15px, 1.54cqw); line-height: 1.4;
  overflow-wrap: break-word;
}
.plate > * { min-width: 0; }
.plate::after {
  --grid-line: rgb(0 216 240 / 64%); content: ''; position: absolute; inset: 0;
  visibility: hidden; pointer-events: none; z-index: 4; border: 1px solid var(--grid-line);
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%, 100% calc(100% / 12);
}
:root[data-grid] .plate::after { visibility: visible; }
.headline { align-self: start; padding-top: .37cqw; font-size: 5.1cqw; line-height: 1.04; font-weight: 800; letter-spacing: -.057em; }
.headline code { letter-spacing: -.065em; }
.intro { font-size: max(16px, 1.88cqw); line-height: 1.42; }
.ink-line { fill: none; stroke: currentColor; stroke-linecap: square; stroke-linejoin: bevel; }
.paper-node { fill: var(--paper); stroke: currentColor; }
.signal-fill { fill: var(--red); }
.branch-mark { display: block; width: 100%; height: 100%; min-height: 0; }

/* The art rail never shares copy cells. Seed changes stay inside this region. */
.motif {
  grid-area: 1 / 10 / 4 / 13; width: 100%; height: 100%;
  display: grid; grid-template: repeat(6, minmax(0, 1fr)) / repeat(6, minmax(0, 1fr));
  min-height: 0; overflow: clip; pointer-events: none;
}
.shape { display: grid; place-items: center; min-height: 0; min-width: 0; color: var(--ink); }
.shape > * { display: block; width: 90%; max-height: 93%; aspect-ratio: 1; background: currentColor; }
.shape.disc, .shape.dot { color: var(--red); }
.disc > *, .dot > * { width: auto; height: 86%; max-width: 90%; border-radius: 50%; }
.dot > * { height: 55%; }
.arc > * { width: auto; height: 86%; max-width: 90%; border-radius: 0 100% 0 0; mask-image: radial-gradient(circle at 0 100%, transparent 48%, #111 49%); }
.bar > * { width: 94%; height: 26%; aspect-ratio: auto; }
.disc { grid-area: 1 / 2 / 5 / 6; }
.arc { grid-area: 4 / 1 / 7 / 4; }
.bar { grid-area: 6 / 4 / 7 / 7; }
.dot { grid-area: 2 / 6 / 3 / 7; }
.motif[data-variant="1"] .disc { grid-area: 2 / 3 / 6 / 7; }
.motif[data-variant="1"] .arc { grid-area: 1 / 1 / 4 / 3; }
.motif[data-variant="1"] .bar { grid-area: 6 / 2 / 7 / 6; }
.motif[data-variant="1"] .dot { grid-area: 4 / 1 / 5 / 2; }
.motif[data-variant="2"] .disc { grid-area: 1 / 1 / 5 / 5; }
.motif[data-variant="2"] .arc { grid-area: 4 / 4 / 7 / 7; }
.motif[data-variant="2"] .bar { grid-area: 6 / 1 / 7 / 4; }
.motif[data-variant="2"] .dot { grid-area: 2 / 6 / 3 / 7; }
.motif[data-variant="3"] .disc { grid-area: 3 / 1 / 7 / 5; }
.motif[data-variant="3"] .arc { grid-area: 1 / 4 / 4 / 7; }
.motif[data-variant="3"] .bar { grid-area: 1 / 1 / 2 / 4; }
.motif[data-variant="3"] .dot { grid-area: 5 / 6 / 6 / 7; }

.cover-copy { grid-area: 2 / 8 / 12 / 13; align-self: center; }
.cover-name { font-size: 2.22cqw; font-weight: 800; letter-spacing: -.06em; margin-bottom: 1.25cqw; }
.cover h1 { font-size: 6.26cqw; line-height: .99; letter-spacing: -.07em; font-weight: 800; }
.cover .intro { margin-top: 2.25cqw; }
.cover-art { grid-area: 2 / 1 / 11 / 8; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding-right: 3.2cqw; }
.cover-art figcaption { display: flex; justify-content: space-between; padding-top: .8cqw; border-top: 1px solid; font-size: 1.05cqw; font-weight: 700; }
.cover .motif { grid-area: 11 / 1 / 13 / 4; margin-top: .4cqw; }
.start-hint { grid-area: 12 / 8 / 13 / 13; align-self: end; display: flex; align-items: center; gap: .85cqw; font-size: max(12px, 1.02cqw); }
.start-hint kbd { font-size: inherit; }

.flow .headline, .systems .headline, .packages .headline, .states .headline, .tests .headline, .preflight .headline, .conflicts .headline { grid-area: 1 / 1 / 4 / 10; }
.flow-steps { grid-area: 4 / 1 / 7 / 13; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.65cqw; }
.flow-steps li { position: relative; min-width: 0; display: grid; align-content: start; border-top: 2px solid; padding-top: .65cqw; }
.flow-steps button { display: grid; gap: .35cqw; }
.flow-steps li::before { content: ''; position: absolute; top: -.43cqw; left: 0; width: .74cqw; height: .74cqw; border-radius: 50%; background: var(--ink); }
.flow-steps li:nth-child(4)::before, .flow-steps li:last-child::before { background: var(--red); }
.flow-steps strong { font-size: 1.92cqw; }
.step-panel { grid-area: 7 / 1 / 10 / 13; align-self: start; display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 1.4cqw; padding-top: .75cqw; border-top: 1px solid var(--ink); }
.step-detail { min-width: 0; }
.outcomes { grid-area: 10 / 1 / 13 / 13; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3cqw; align-items: end; }
.outcomes > div { border-top: .48cqw solid var(--red); padding-top: .65cqw; }
.outcomes strong { display: block; font-size: 4.45cqw; font-weight: 800; letter-spacing: -.064em; line-height: 1.12; }
.outcomes p { margin-top: .35cqw; }

.branch-flow { --top: 11%; --bottom: 4%; }
.branch-flow-figure { grid-area: 1 / 1 / -1 / -1; min-height: 0; }
.branch-flow-original { display: block; height: 100%; cursor: zoom-in; }
.branch-flow-original img { display: block; width: 100%; height: 100%; object-fit: contain; }

.foundation { grid-area: 5 / 1 / 11 / 6; padding: 1.35cqw 1.6cqw; background: var(--ink); color: var(--paper); align-self: start; }
.foundation strong { font-size: 3.14cqw; letter-spacing: -.055em; }
.foundation p { margin-top: .65em; }
.rule-list > div { border-top: 1px solid currentColor; padding: .65cqw 0 .66cqw; }
.rule-list dt { font-size: 1.85cqw; font-weight: 800; line-height: 1.15; }
.rule-list dd { margin-top: .35cqw; }
.systems-list { grid-area: 4 / 7 / 13 / 13; }

.specification .headline { grid-area: 1 / 1 / 6 / 7; font-size: 6cqw; }
.specification .intro { grid-area: 7 / 1 / 11 / 6; align-self: start; }
.specification .motif { grid-area: 11 / 1 / 13 / 4; }
.plan-map { grid-area: 2 / 7 / 13 / 13; border-left: .55cqw solid var(--red); padding-left: 1.8cqw; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.plan-map > strong { display: block; font-size: 4.25cqw; letter-spacing: -.08em; line-height: 1.1; }
.plan-map ul { list-style: none; padding: 0; margin-top: 1.15cqw; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2cqw 1cqw; }
.plan-map li { border-top: 1px solid; padding: .75cqw 0; font-size: 2cqw; font-weight: 700; }
.plan-map p { margin-top: 1.1cqw; }

.levels { grid-area: 4 / 1 / 13 / 9; }
.levels > div { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 1cqw; align-items: center; padding: .92cqw 0; border-top: 1px solid; }
.levels dt { font-size: 3.23cqw; font-weight: 800; line-height: 1.08; letter-spacing: -.08em; }
.levels > div:nth-child(2) { border-top: .34cqw solid var(--red); }
.entry-check { grid-area: 4 / 10 / 13 / 13; border-top: .34cqw solid var(--red); padding-top: .94cqw; }
.entry-check h3, .isolation h3 { font-size: 2.08cqw; letter-spacing: -.055em; line-height: 1.15; }
.entry-check ul { margin-top: .6cqw; padding-left: 1.12em; }
.entry-check li { padding: .3cqw 0; }

.state-rail { grid-area: 4 / 1 / 11 / 13; padding: 0; list-style: none; display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); }
.state-rail li { display: grid; align-items: stretch; border-top: 1px solid; padding-left: 1.3cqw; position: relative; }
.state-rail button { display: grid; grid-template-columns: 5fr 7fr; gap: 1cqw; align-items: center; }
.state-play { grid-area: 11 / 10 / 12 / 13; justify-self: end; align-self: center; }
.state-rail li::before { content: ''; width: .55cqw; height: .55cqw; border-radius: 50%; background: var(--ink); position: absolute; left: 0; }
.state-rail li:last-child { border-top: .34cqw solid var(--red); }
.state-rail li:last-child::before { background: var(--red); }
.state-rail code { overflow-wrap: anywhere; font-size: 2.24cqw; line-height: 1.08; letter-spacing: -.051em; }
.state-notes { grid-area: 12 / 1 / 13 / 13; display: flex; justify-content: space-between; gap: 2cqw; align-items: center; }

.local .headline { grid-area: 1 / 1 / 6 / 7; font-size: 6cqw; }
.local-art { grid-area: 6 / 1 / 13 / 6; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.local-art figcaption { border-top: 1px solid; padding-top: .52cqw; }
.local-rules { grid-area: 5 / 7 / 13 / 13; }
.local-rules > div:first-child, .preflight-list > div:first-child, .conflict-list > div:first-child { border-top: .34cqw solid var(--red); }

.isolation .headline { grid-area: 1 / 1 / 5 / 10; }
.branch-path { grid-area: 6 / 1 / 8 / 13; padding: 0; list-style: none; display: grid; grid-template-columns: 3fr 4.5fr 4.5fr; align-items: start; }
.branch-path li { border-top: 2px solid; padding: .68cqw 1cqw .25cqw 0; font-size: 1.95cqw; letter-spacing: -.04em; position: relative; }
.branch-path li::before { content: ''; position: absolute; top: -.4cqw; left: 0; width: .72cqw; height: .72cqw; border-radius: 50%; background: var(--red); }
.isolation-body { grid-area: 9 / 1 / 13 / 13; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.2cqw; }
.isolation-body > div { border-top: 1px solid; padding-top: .6cqw; }
.isolation-body p { margin-top: .55cqw; }

.test-layers { grid-area: 4 / 1 / 10 / 13; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8cqw 2.2cqw; list-style: none; padding: 0; }
.test-layers > li { border-top: 1px solid; padding-top: .62cqw; }
.test-layers strong { display: block; font-size: 2.12cqw; letter-spacing: -.03em; }
.test-layers p { margin-top: .35cqw; }
.evidence-rail { grid-area: 11 / 1 / 13 / 13; background: var(--ink); color: var(--paper); display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; font-size: 1.95cqw; font-weight: 800; }
.evidence-rail span { position: relative; padding-left: 1.25cqw; }
.evidence-rail span + span::before { position: absolute; left: -.72cqw; color: var(--paper); content: '→'; font-weight: 400; }

.integration .headline { grid-area: 1 / 1 / 6 / 7; font-size: 5.55cqw; }
.integration .intro { grid-area: 6 / 1 / 10 / 6; }
.merge-art { grid-area: 10 / 1 / 13 / 6; align-self: end; }
.merge-play { grid-area: 9 / 1 / 10 / 5; align-self: end; justify-self: start; }
.merge-art svg { display: block; width: 100%; height: auto; }
.integration .motif { grid-area: 1 / 10 / 4 / 13; }
.merge-steps { grid-area: 5 / 7 / 11 / 13; padding: 0; list-style: none; display: grid; }
.merge-steps li { position: relative; padding: .55cqw 0 .48cqw 1.25cqw; border-top: 1px solid; }
.merge-steps li::before { position: absolute; top: .85cqw; left: 0; content: ''; border-radius: 50%; width: .56cqw; height: .56cqw; background: var(--red); }
.merge-steps strong { display: block; font-size: 1.95cqw; line-height: 1.2; }
.merge-steps span { display: block; margin-top: .22cqw; }
.return-note { grid-area: 12 / 7 / 13 / 13; padding-top: .45cqw; border-top: .34cqw solid var(--red); line-height: 1.22; }

.commits { grid-area: 4 / 1 / 7 / 13; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2cqw; }
.commits code { font-size: 4.1cqw; line-height: 1.1; letter-spacing: -.075em; }
.commits code:last-child { text-align: right; }
.commits span { position: relative; padding: .48cqw 1.85cqw; border-inline: .3cqw solid var(--red); font-weight: 800; }
.preflight-list { grid-area: 7 / 1 / 12 / 13; }
.preflight-list > div, .conflict-list > div { display: grid; grid-template-columns: 3fr 9fr; align-items: center; gap: 1.4cqw; }
.preflight-list dd, .conflict-list dd { margin-top: 0; }
.send-note { grid-area: 12 / 1 / 13 / 13; align-self: end; font-weight: 700; }

.conflict-list { grid-area: 4 / 1 / 11 / 13; display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); }
.conflict-list > div { padding-top: .7cqw; padding-bottom: .7cqw; }
.baseline-note { grid-area: 12 / 1 / 13 / 13; align-self: end; padding-left: .9cqw; border-left: .38cqw solid var(--red); font-weight: 800; }

.review .headline, .closing .headline { grid-area: 1 / 1 / 6 / 7; font-size: 6.2cqw; }
.review .intro { grid-area: 7 / 1 / 11 / 6; }
.review .motif { grid-row-end: 3; }
.gate-hint { grid-area: 3 / 7 / 4 / 13; align-self: end; padding-bottom: .42em; font-size: max(12px, 1.07cqw); font-weight: 700; }
.gate-rail { grid-area: 4 / 7 / 11 / 13; padding: 0; list-style: none; }
.gate-rail li { border-top: 1px solid; padding: .3cqw 0; font-size: 2.05cqw; font-weight: 700; }
.gate-rail button { display: flex; gap: .76em; align-items: center; }
.gate-rail button::before {
  content: ''; display: grid; place-items: center; flex: 0 0 1.32em; height: 1.32em; border: 1px solid;
  font-size: .68em; line-height: 1;
}
.gate-rail .is-checked button::before { content: '✓'; color: var(--paper); background: var(--ink); border-color: var(--ink); }
.gate-rail li:last-child { border-top: .34cqw solid var(--red); }
.merge-note { grid-area: 12 / 1 / 13 / 13; align-self: end; font-weight: 700; }
.responsibility { grid-area: 4 / 7 / 11 / 13; }
.closing-line { grid-area: 11 / 1 / 13 / 13; align-self: end; border-top: .34cqw solid var(--red); padding-top: .7cqw; font-size: 2.34cqw; font-weight: 800; }
.closing-line span { margin-inline: .28em; }

[data-step], [data-gate] {
  width: 100%; min-height: 2em; padding: .15em .36em; text-align: left; color: inherit;
  border: 0; background: transparent; cursor: pointer; touch-action: manipulation;
  transition: background-color 160ms, box-shadow 160ms;
}
[data-step]:focus-visible, [data-gate]:focus-visible { outline-offset: -2px; }
@media (hover: hover) {
  [data-step]:hover, [data-gate]:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
}
.is-selected, .is-checked { background: color-mix(in srgb, var(--red) 10%, var(--paper)); box-shadow: inset 3px 0 var(--red); }
.flow-steps li.is-selected::before { background: var(--red); scale: 1.25; }
.conflict-list [data-step]::after { content: ' ›'; }
.conflict-list .is-selected dt { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .22em; }
.play-button {
  min-height: 2.25em; padding: .29em .72em; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-size: max(12px, 1.04cqw); font-weight: 700; white-space: nowrap; cursor: pointer; touch-action: manipulation;
}
.play-button:hover, .play-button[aria-pressed="true"] { color: var(--paper); background: var(--ink); }
.play-button:disabled { display: none; }
.merge-ready { display: none; }
.merge-note[data-ready] .merge-rule { display: none; }
.merge-note[data-ready] .merge-ready { display: inline; padding-left: .6em; border-left: 3px solid var(--red); }

.poster.is-entering .plate > :is(.headline, .cover-copy), .poster.is-entering .motif {
  animation: slide-in 320ms cubic-bezier(.2,.75,.25,1) both;
}
.poster.is-entering .plate > :not(.headline, .cover-copy, .motif, figure) {
  animation: slide-in 360ms 52ms cubic-bezier(.2,.75,.25,1) both;
}
.poster { --enter-x: 18px; }
.poster[data-direction="back"] { --enter-x: -18px; }
@keyframes slide-in { from { opacity: 0; transform: translateX(var(--enter-x)); } }
.traveler { visibility: hidden; fill: var(--red); stroke: var(--paper); stroke-width: 2; }
:is(.poster.is-drawing, .poster.is-entering .local) .draw {
  stroke-dasharray: 1; animation: draw-line 740ms cubic-bezier(.3,0,.22,1) both;
}
:is(.poster.is-drawing, .poster.is-entering .local) .draw:nth-child(2) { animation-delay: 70ms; }
:is(.poster.is-drawing, .poster.is-entering .local) .draw:nth-child(3) { animation-delay: 140ms; }
:is(.poster.is-drawing, .poster.is-entering .local) .pop { animation: node-in 400ms 180ms ease-out both; transform-box: fill-box; transform-origin: center; }
.poster.has-motion .traveler { animation: show-traveler 5.4s linear both; }
.poster.has-motion .merge-art .traveler { animation-duration: 3.6s; }
@keyframes draw-line { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes node-in { from { opacity: 0; scale: .55; } }
@keyframes show-traveler { 0%, 10%, 98%, 100% { visibility: hidden; } 12%, 96% { visibility: visible; } }

#slide-index {
  width: min(710px, calc(100% - 24px)); max-height: min(78svh, 780px); padding: 18px clamp(13px, 2.7vw, 32px) 20px;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
}
#slide-index::backdrop { background: rgb(17 17 17 / 82%); }
.index-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; }
.index-head h2 { font-size: 1.65rem; letter-spacing: -.065em; }
#index-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
#index-list li { border-top: 1px solid; }
#index-list button {
  text-align: left; display: block; width: 100%; padding: 10px 4px; color: inherit;
  border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1.42;
}
#index-list button:hover { text-decoration: underline; }
#index-list button[aria-current] { font-weight: 800; box-shadow: inset 3px 0 var(--red); padding-left: 10px; }

@media screen and (max-width: 880px) {
  .shell { padding-inline: 10px; }
  .stage { --poster-width: 100%; }
  .poster { aspect-ratio: auto; min-height: min(72svh, 560px); padding: 17px var(--margin) 39px; --margin: 6%; }
  .edition-mark { bottom: 10px; }
  .poster-meta { position: static; padding-bottom: 10px; }
  .poster::after { right: 1.2%; top: 51px; font-size: 8px; }
  .plate { position: relative; inset: auto; margin-top: 14px; grid-template: auto / repeat(12, minmax(0, 1fr)); gap: 14px 0; }
  .plate::after { background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px); }
  .plate > :not(.motif) { grid-column: 1 / -1; grid-row: auto; }
  .plate .headline, .cover h1 { font-size: clamp(36px, 8.45cqw, 66px); }
  .plate .headline { min-height: 1.05em; }
  .plate > .headline { grid-column: 1 / 10; }
  .plate .intro { font-size: clamp(16px, 3.8cqw, 24px); }
  .plate .motif { grid-area: 1 / 10 / 2 / 13; height: min(18cqw, 95px); align-self: start; }
  .cover-art { order: 2; padding: 0; gap: 4px; grid-template-rows: minmax(0, 1fr) auto; height: min(63cqw, 420px); }
  .cover .cover-copy { order: 1; grid-area: 1 / 1 / 2 / 10; }
  .cover-name { font-size: 17px; margin-bottom: 7px; }
  .cover .intro { margin-top: 10px; }
  .cover-art figcaption { font-size: 12px; }
  .cover .motif { grid-row: 1; }
  .start-hint { order: 3; gap: 10px; }
  .step-panel { gap: 8px; padding-top: 9px; }
  .state-play { justify-self: start; }
  .play-button { min-height: 36px; }
  .flow-steps, .outcomes, .test-layers, .isolation-body, .evidence-rail { gap: 12px; }
  .branch-flow-slide { min-height: 0; }
  .branch-flow-original, .branch-flow-original img { height: auto; }
  .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-steps li { padding-top: 8px; gap: 2px; }
  .flow-steps li::before, .branch-path li::before { width: 8px; height: 8px; top: -5px; }
  .flow-steps strong, .rule-list dt, .entry-check h3, .plan-map li, .isolation h3, .test-layers strong, .merge-steps strong { font-size: max(18px, 3.6cqw); }
  .outcomes strong, .foundation strong, .plan-map > strong { font-size: max(27px, 5.9cqw); }
  .outcomes { align-items: start; }
  .outcomes > div, .foundation { padding-top: 8px; }
  .foundation { padding: 10px 13px; }
  .foundation p { margin-top: 4px; }
  .rule-list > div, .levels > div, .state-rail li, .gate-rail li, .test-layers > li, .isolation-body > div { padding-block: 8px; }
  .rule-list dd, .test-layers p, .isolation-body p { margin-top: 4px; }
  .plan-map { padding-left: 10px; }
  .plan-map li { padding: 6px 0; }
  .levels > div { grid-template-columns: 1fr 1fr; gap: 10px; }
  .levels dt { font-size: max(20px, 4.15cqw); }
  .entry-check { padding-top: 7px; }
  .entry-check li { padding-block: 4px; }
  .state-rail { grid-template-rows: none; }
  .state-rail li { padding-left: 11px; }
  .state-rail button { grid-template-columns: 1fr; gap: 4px; }
  .state-rail li::before { height: 5px; width: 5px; top: 15px; }
  .state-rail code { font-size: max(17px, 3.8cqw); }
  .state-notes { display: grid; gap: 4px; }
  .local-art { height: min(49cqw, 330px); }
  .local-art figcaption { padding-top: 6px; }
  .branch-path { display: grid; grid-template-columns: 1fr; padding-left: 11px; border-left: 2px solid; }
  .branch-path li { padding: 4px 0; border-top: 0; font-size: max(16px, 3.5cqw); }
  .branch-path li::before { top: .75em; left: -16px; }
  .isolation-body { grid-template-columns: 1fr; gap: 6px; }
  .test-layers { gap: 12px 15px; }
  .evidence-rail { font-size: 14px; grid-template-columns: repeat(2, 1fr); padding: 10px; }
  .evidence-rail span { padding-left: 12px; }
  .evidence-rail span:nth-child(3)::before { content: none; }
  .merge-art { max-width: 430px; }
  .merge-steps li { padding: 7px 0 7px 12px; }
  .merge-steps li::before { width: 5px; height: 5px; top: 13px; }
  .merge-steps span { margin-top: 3px; }
  .return-note, .send-note { padding-top: 6px; }
  .commits { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 5px; }
  .commits code { font-size: max(16px, 3.5cqw); overflow-wrap: anywhere; }
  .commits span { font-size: 12px; padding: 3px 6px; }
  .conflict-list { grid-template-rows: none; }
  .preflight-list > div, .conflict-list > div { display: block; }
  .preflight-list dd, .conflict-list dd { margin-top: 4px; }
  .baseline-note { padding-left: 8px; }
  .gate-rail li { font-size: max(18px, 3.6cqw); }
  .gate-rail button::before { font-size: 12px; }
  .gate-hint { padding: 0; }
  .review .motif { grid-row-end: 2; }
  .closing-line { font-size: max(15px, 3.5cqw); padding-top: 8px; }
}
@media screen and (max-width: 510px) {
  .deck-header { display: grid; grid-template-columns: 1fr auto; gap: 4px; }
  .chapters { grid-column: 1/-1; grid-row: 2; }
  .chapters .control { flex: 1; }
  .toolbar-index { grid-column: 2; grid-row: 1; }
  .control { padding-inline: 5px; min-width: 29px; }
  .deck-dock { flex-wrap: wrap; gap: 3px 5px; }
  .deck-dock kbd, .dock-label { display: none; }
  .dock-links { margin-left: auto; }
  #index-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce), print {
  .poster, .poster *, .poster *::before, .poster *::after, .deck-progress span {
    animation: none !important; transition: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-action="replay-motion"] { display: none; }
}
@page { size: 16in 9in; margin: 0; }
@media print {
  :root { --paper: var(--sheet) !important; --ink: var(--black) !important; color-scheme: light; }
  body { margin: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .deck-header, .deck-dock, .deck-progress, #slide-index, .plate::after, .noscript, #slide-heading,
  .play-button, .start-hint, .step-panel, .traveler, .gate-hint, .merge-ready { display: none !important; }
  .merge-note[data-ready] .merge-rule { display: inline; }
  .is-selected, .is-checked { background: transparent; box-shadow: none; }
  .conflict-list .is-selected dt { text-decoration: none; }
  .conflict-list [data-step]::after { content: none; }
  .gate-rail .is-checked button::before { content: ''; color: inherit; background: transparent; border-color: currentColor; }
  .shell { width: auto; max-width: none; padding: 0; }
  .poster, .poster[hidden] {
    display: block !important; width: 16in; height: 9in; min-height: 0; min-width: 0; aspect-ratio: auto;
    margin: 0; padding: 0; break-after: page; break-inside: avoid;
  }
  .poster:last-child { break-after: auto; }
}
