/* noted — site styles.
   Structure after adrianmato.com/pewpew: one centered column (logo, headline, copy command + GitHub,
   a rounded panel with the terminal window, sections of h2 + a sub-line + content, 2×2 cards, the manual).
   Colors come from themes.css (--c-<role>: the app's own palette roles), through the short tokens in :root. */

@font-face { font-family: "VGA"; src: url("fonts/PxPlus-IBM-VGA-9x16.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* The theme's colours are typed, so a theme change fades instead of snapping. */
@property --c-bar-bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-bar-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-bar-hot { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-bar-sel-bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-bar-sel-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-bar-sel-hot { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-border-active { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-border-inactive { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-button-bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-button-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-button-focus-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-button-hot { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-button-shadow { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-cmd-bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-cmd-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-cursor-bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-cursor-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-dialog-bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-dialog-border { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-dialog-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-error-bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-error-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-help-bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-help-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-help-hi { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-icon { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-keycap-bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-keycap-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-pane-accent { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-pane-bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-pane-bright { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-pane-dim { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-pane-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-shadow-bg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-shadow-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-status-fg { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --c-title-inactive { syntax: "<color>"; inherits: true; initial-value: #000; }
:root { transition-property: --c-bar-bg, --c-bar-fg, --c-bar-hot, --c-bar-sel-bg, --c-bar-sel-fg, --c-bar-sel-hot, --c-border-active, --c-border-inactive, --c-button-bg, --c-button-fg, --c-button-focus-fg, --c-button-hot, --c-button-shadow, --c-cmd-bg, --c-cmd-fg, --c-cursor-bg, --c-cursor-fg, --c-dialog-bg, --c-dialog-border, --c-dialog-fg, --c-error-bg, --c-error-fg, --c-help-bg, --c-help-fg, --c-help-hi, --c-icon, --c-keycap-bg, --c-keycap-fg, --c-pane-accent, --c-pane-bg, --c-pane-bright, --c-pane-dim, --c-pane-fg, --c-shadow-bg, --c-shadow-fg, --c-status-fg, --c-title-inactive; transition-duration: .5s; transition-timing-function: cubic-bezier(.4, 0, .2, 1); }

:root {
  --bezel: 0px;
  --font-ui: "VGA", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-term: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ink: var(--c-pane-fg);
  --bright: var(--c-pane-bright);
  --hot: var(--c-pane-accent);
  --secondary: color-mix(in oklab, var(--c-pane-fg) 80%, var(--page));
  --card: color-mix(in oklab, var(--page) 90%, var(--c-pane-fg));
  --rule: color-mix(in srgb, var(--c-pane-fg) 62%, transparent);
  --rule-hover: color-mix(in srgb, var(--c-pane-fg) 92%, transparent);

  --margin-small: 16px;
  --margin-medium: 48px;
  --margin-large: 78px;
  --section-gap-large: 144px;
  --section-gap-small: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* The page's own background. The theme chips carry their theme's palette, so app.js reads each theme's --page off its chip
   for the browser's bars (theme-color). Nothing inside a chip uses it. */
:root, .chip { --page: color-mix(in oklab, var(--c-pane-bg) 72%, #000); }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--page); color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: transparent;
  font: 16px/24px var(--font-ui); font-kerning: none; font-synthesis: none; text-rendering: optimizeSpeed;
  overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
/* The screen's own light falling on the room. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(90% 70% at 50% 0%, color-mix(in oklab, var(--c-pane-bg) 55%, var(--page)), transparent 72%);
  opacity: .8;
}
h1, h2, h3, p, dl, dd, dt, ol, ul { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 400; }
ul, ol { list-style: none; }
code, kbd { font: inherit; }
a { color: var(--hot); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
/* Windows 3.1's cursors, drawn chunky (tools/cursors.py): the arrow, and the hand on anything that acts. */
html { cursor: url(cursors/arrow.png) 0 0, default; cursor: -webkit-image-set(url(cursors/arrow.png) 1x, url(cursors/arrow@2x.png) 2x) 0 0, default; cursor: image-set(url(cursors/arrow.png) 1x, url(cursors/arrow@2x.png) 2x) 0 0, default; }
a, button, summary, label, [role="radio"], .term-wrap, .logo {
  cursor: url(cursors/hand.png) 12 0, pointer; cursor: -webkit-image-set(url(cursors/hand.png) 1x, url(cursors/hand@2x.png) 2x) 12 0, pointer; cursor: image-set(url(cursors/hand.png) 1x, url(cursors/hand@2x.png) 2x) 12 0, pointer;
}
:focus-visible { outline: 2px dashed var(--hot); outline-offset: 3px; }
/* Selected text, lit as noted lights a search match (Turbo: black on yellow). */
/* Selected text, as the app draws it in a note (Theme::selection): the cursor bar's colors. */
::selection { background: var(--c-cursor-bg); color: var(--c-cursor-fg); text-shadow: none; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -64px; z-index: 200; padding: 8px 16px; background: var(--bright); color: var(--page); }
.skip:focus { top: calc(var(--bezel) + 8px); }

/* ---------- The CRT: scanlines, phosphor mask, vignette, a faint, slow breathing ---------- */
.crt {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.24) 2px 3px),
    repeating-linear-gradient(90deg, rgba(255,40,40,.04) 0 1px, rgba(40,255,40,.04) 1px 2px, rgba(60,60,255,.04) 2px 3px),
    radial-gradient(130% 91% at 50% 50%, rgba(0,0,0,0) 53%, rgba(0,0,0,var(--vignette, .54)) 100%);
  -webkit-backdrop-filter: url(#crt-warp); backdrop-filter: url(#crt-warp);
}
.warp { position: absolute; pointer-events: none; }
.crt::after { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; animation: flicker 7s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: 0; } 25% { opacity: .018; } 50% { opacity: .006; } 75% { opacity: .014; } }


html.no-crt { --bezel: 0px; }
html.no-crt .crt { display: none; }

/* The first paint of a visit: the tube warms up, a bright line opening into the page. */
.warm { display: none; }
html.boot .warm { display: block; position: fixed; inset: 0; z-index: 99; pointer-events: none; }
.warm i { position: absolute; left: 0; right: 0; background: #000; }
.warm i:first-child { top: 0; height: calc(50% - 1px); animation: curtain-up .64s var(--ease) both; }
.warm i:last-child { bottom: 0; height: calc(50% - 1px); animation: curtain-down .64s var(--ease) both; }
.warm::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: var(--c-pane-bright); box-shadow: 0 0 24px 6px var(--c-pane-fg); animation: line-out .64s ease-out both; }
@keyframes curtain-up { 0%, 14% { transform: none; } 100% { transform: translateY(-100%); } }
@keyframes curtain-down { 0%, 14% { transform: none; } 100% { transform: translateY(100%); } }
@keyframes line-out { 0%, 14% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- The column ---------- */
.container { max-width: 1100px; margin: 0 auto; padding-top: 72px; text-align: center; }
section { margin-bottom: var(--section-gap-large); }
.margin { margin-left: var(--margin-large); margin-right: var(--margin-large); }

.logo { display: block; margin: 0 auto 32px; padding: 0; border: 0; background: none; line-height: 0; transition: transform .1s ease-in-out; }
.logo:focus-visible { outline: 0; }
.logo:focus-visible { transform: translateY(-3px); }
.logo:active { transition: transform .3s ease-in-out; transform: scale(.9); }
.logo-art { display: block; width: 120px; height: auto; }   /* 40 half-cells × 3 px: every pixel whole (tools/lockup.py) */
@keyframes blink { 50% { opacity: 0; } }

h1 { margin-bottom: 20px; font-size: 64px; line-height: 72px; letter-spacing: -.02em; color: var(--bright); text-wrap: balance; text-shadow: 0 0 14px color-mix(in srgb, var(--c-pane-fg) 38%, transparent); }
/* The pixel font's space is a whole cell: between the sentences, a tighter one. */
h1 .sp { word-spacing: -.2em; }
h1 em { white-space: nowrap; font-style: normal; color: var(--hot); text-shadow: 0 0 16px color-mix(in srgb, var(--hot) 55%, transparent); }
h2 { margin-bottom: 16px; font-size: 32px; line-height: 48px; color: var(--bright); text-wrap: balance; }
.sub, .lead { color: var(--secondary); font-size: 24px; line-height: 32px; text-wrap: balance; }
.sub code, .lead code { color: var(--hot); }
/* Links inside running text are underlined: color alone doesn't set them apart from the text around them. */
.sub a, .card dd a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.sub a:hover, .card dd a:hover { text-decoration-thickness: 2px; }

/* ---------- Install: the copy command, and how (a pull-down, as noted's own menus drop) ---------- */
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; margin-bottom: 48px; }
.cta li { display: flex; min-width: 0; max-width: 100%; }

.pill {
  position: relative; display: flex; align-items: center; width: 480px; max-width: 100%; margin: 0; padding: 11px 12px 11px 16px;
  border: 3px double var(--rule); background: transparent; color: var(--bright);
  font: 14px/22px var(--font-term); text-align: left; user-select: none; -webkit-user-select: none;
  transition: border-color .12s ease-in-out, transform .2s ease-in-out;
}
.pill:hover { border-color: var(--rule-hover); }
.pill:active { transform: scale(.99); }
.pill code { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pill .prompt { color: var(--hot); }
.pill svg { flex: none; margin-left: 16px; transition: transform .2s ease-in-out, opacity .2s ease-in-out; }
.pill .check { position: absolute; right: 12px; opacity: 0; transform: scale(.5); visibility: hidden; }
.pill[data-copied] .copy { opacity: 0; transform: scale(.5); }
.pill[data-copied] .check { opacity: 1; transform: scale(1); visibility: visible; }

.methods { position: relative; }
/* 13/11, not 12/12: centred in the same height, the VGA font's baseline sits 1px above JetBrains Mono's in the
   command beside it, so the label drops 1px to share the command's baseline. */
.pick {
  display: flex; align-items: center; gap: 8px; width: auto; padding: 13px 12px 11px; border: 0; background: var(--bright); color: var(--page); text-align: left; text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--c-shadow-bg); transition: filter .12s ease-in-out;
}
/* Sized for the longest name (POWERSHELL, 10 cells), so the pull-down never moves as you pick. */
.pick > span:first-child { flex: 1; min-width: 10ch; white-space: nowrap; }
.pick:hover { filter: brightness(.9); }
.pick .caret { font-size: 12px; }
.menu {
  position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 100%; padding: 4px 0;
  background: var(--c-bar-bg); color: var(--c-bar-fg); text-align: left; text-transform: uppercase; border: 3px double var(--c-bar-fg);
  box-shadow: 8px 8px 0 var(--c-shadow-bg);
}
.menu:focus, .menu:focus-visible { outline: none; }   /* the highlighted row shows where the keys are */
.menu li { padding: 4px 12px; white-space: nowrap; }
.menu li[aria-selected="true"]::before { content: "\2713"; position: absolute; left: 4px; }   /* ✓, a glyph the VGA font has (√, the app's, isn't in it) */
.menu li { position: relative; padding-left: 22px; }
.menu li:hover, .menu li.active { background: var(--c-bar-sel-bg); color: var(--c-bar-sel-fg); }

/* ---------- The terminal, on its "wallpaper" panel ---------- */
/* The terminal and its chapters keep the page's gutter from the screen's sides, and clear of a notch
   (viewport-fit=cover): they grow to their 100 columns only where there's room for both. */
.demo { --gutter: max(var(--margin-medium), env(safe-area-inset-left), env(safe-area-inset-right)); margin-bottom: var(--section-gap-large); }
.preview { display: flex; align-items: center; justify-content: center; max-width: 100%; }
.cli {
  width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--cols, 100) * .6em); overflow: hidden; text-align: left;
  font-size: 16px; line-height: 1; background: #1d1d1f;   /* 100 columns × .6em: 960 px wide */ border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 24px 56px -12px rgba(0,0,0,.65), 0 8px 20px -6px rgba(0,0,0,.45);
}

.term-wrap { position: relative; overflow: hidden; container-type: inline-size; background: var(--c-pane-bg); aspect-ratio: 60 / 34.32; }
.term {
  position: absolute; inset: 0; font-family: var(--font-term); font-size: calc(100cqw / (var(--cols, 100) * 0.6)); line-height: 1.32;
  white-space: pre; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; user-select: none;
  background: var(--c-pane-bg); color: var(--c-pane-fg);
}
.term .row { height: 1.32em; overflow: hidden; }
.term .cursor { position: absolute; left: 0; top: 0; width: .6em; height: 1.32em; border-bottom: .14em solid var(--c-pane-fg); animation: blink 1.06s steps(1) infinite; pointer-events: none; }
.term .cursor[hidden] { display: none; }
.fg-unset { color: var(--c-pane-fg); }
.bg-unset { background-color: var(--c-pane-bg); }
.poster { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; }
html:not(.js) .player { display: none; }
.player { width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--cols, 100) * .6 * 16px); margin: 28px auto 0; }
.chapters { display: flex; gap: 8px; }
.chapters li { flex: 1 1 auto; min-width: 0; }
.chapters button { display: block; width: 100%; padding: 8px 0 0; border: 0; background: none; text-align: left; color: color-mix(in oklab, var(--secondary) 50%, var(--page)); text-transform: uppercase; }
.chapters .seg { display: block; position: relative; height: 6px; overflow: hidden; background: color-mix(in oklab, var(--c-pane-fg) 24%, transparent); }
.chapters .seg i { position: absolute; inset: 0; background: var(--hot); transform-origin: 0 50%; transform: scaleX(0); }
.chapters .name { display: inline-block; max-width: 100%; margin-top: 8px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.chapters button:hover, .chapters button:focus-visible { color: var(--secondary); }
/* No dashed ring: the playing chapter's lit label already says where you are. */
.chapters button:focus-visible { outline: 0; }
.chapters button[aria-current="step"] .name { background: var(--bright); color: var(--page); }

/* ---------- Themes ---------- */
.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 160px)); justify-content: center; gap: 32px 24px; margin-top: 56px; }
.chip { display: block; align-self: start; width: 100%; padding: 0; border: 0; background: none; color: var(--secondary); }
.mini { position: relative; display: block; width: 100%; aspect-ratio: 100 / 64; overflow: hidden; background: var(--c-pane-bg); box-shadow: 0 0 0 1px rgba(255,255,255,.1), 6px 6px 0 rgba(0,0,0,.35) }
.mini i { position: absolute; display: block; }
.mini .mb { left: 0; right: 0; top: 0; height: 11%; background: var(--c-bar-bg); }
.mini .kb { left: 0; right: 0; bottom: 0; height: 11%; background: repeating-linear-gradient(90deg, var(--c-keycap-bg) 0 7%, var(--c-cmd-bg) 7% 21%) var(--c-cmd-bg); }
.mini .pl { left: 3%; top: 17%; width: 30%; bottom: 16%; border: 1px solid var(--c-border-inactive); }
.mini .pe { left: 36%; right: 3%; top: 17%; bottom: 16%; border: 1px solid var(--c-border-active); }
.mini .sl { left: 4.5%; top: 22%; width: 27%; height: 7%; background: var(--c-cursor-bg); }
.mini .l1 { left: 6%; top: 34%; width: 20%; height: 4%; background: var(--c-pane-fg); }
.mini .l2 { left: 6%; top: 43%; width: 24%; height: 4%; background: var(--c-pane-fg); }
.mini .l3 { left: 6%; top: 52%; width: 16%; height: 4%; background: var(--c-pane-dim); }
.mini .tt { left: 54%; top: 14.5%; width: 20%; height: 6%; background: var(--c-border-active); }
.mini .e1 { left: 40%; top: 27%; width: 24%; height: 5%; background: var(--c-pane-bright); }
.mini .e2 { left: 40%; top: 37%; width: 46%; height: 4%; background: var(--c-pane-fg); }
.mini .e3 { left: 40%; top: 46%; width: 38%; height: 4%; background: var(--c-pane-accent); }
.mini .e4 { left: 40%; top: 55%; width: 30%; height: 4%; background: var(--c-pane-dim); }
.cname { display: block; margin-top: 16px; text-wrap: balance; }
.chip:hover .cname, .chip:focus-visible .cname, .chip[aria-checked="true"] .cname { color: var(--bright); }
/* Arrow keys move the selection with the focus, so the selected ring already shows where it is. */
.chip:focus-visible { outline: 0; }
.chip[aria-checked="true"] .mini { outline: 3px solid var(--hot); outline-offset: 4px; }
.chip[aria-checked="true"] .cname::before { content: "► "; color: var(--hot); }

/* ---------- Cards ---------- */
.features dl { display: flex; flex-wrap: wrap; align-items: stretch; gap: 24px; margin-top: 64px; text-align: left; }
.card { --pad: 40px; flex: 1 1 calc(50% - 12px); display: flex; flex-direction: column; gap: 16px; padding: 40px var(--pad) 32px; border: 3px double var(--rule); }
.ico { flex: none; color: var(--hot); }
/* Like the app's framed panes: the title sits in the top border, as text that breaks the line,
   its icon's first pixel lined up with the copy below: back by the title's own 12px of padding,
   and the 2px the icons leave empty on their left. */
.card { position: relative; }
.card dt { position: absolute; top: 0; left: calc(var(--pad) - 14px); transform: translateY(-50%); display: flex; align-items: center; gap: 12px; padding: 0 12px; white-space: nowrap; text-transform: uppercase; background: var(--page); color: var(--hot); }
.card dd { color: var(--secondary); text-wrap: pretty; }

/* ---------- Benchmark: text-mode bars (built from block characters by app.js) ---------- */
.chart { width: 75%; margin: 56px auto 0; text-align: left; font: 16px/24px var(--font-ui); }
.metric { margin-bottom: 32px; }
.metric:last-child { margin-bottom: 0; }
.m-head { text-transform: uppercase; }
.m-head b { font-weight: 400; color: var(--bright); }
.bar { display: flex; gap: 0; white-space: pre; }
.bar .who { flex: none; width: 12ch; color: var(--secondary); }
.bar .fill { flex: 1; min-width: 0; overflow: hidden; }
.bar.a .fill { color: var(--hot); }
.bar.b .fill { color: var(--secondary); }
.bar.a .fill i, .bar.b .fill i { font-style: normal; }
/* A bar's last, partial cell: a whole cell wide, its block cut to the fraction. */
.bar .fill .part { display: inline-block; overflow: hidden; vertical-align: bottom; margin-right: calc(1ch - var(--w, 0ch)); }
.bar .fill em { font-style: normal; color: var(--bright); }
.bar .fill strong { font-weight: 400; color: var(--hot); }
/* Nothing under the bench: the gap below it belongs to the manual's section (its book reaches up into it). */
.bench { margin-bottom: 0; }
.bench .fine { width: 75%; margin: 48px auto 0; color: var(--secondary); font-size: 16px; line-height: 24px; text-align: left; }

/* ---------- The manual: the WebGL booklet itself (booklet/manual.js, inline), lying in the page ---------- */
/* The gap above the book is the section's own, and empty: the book's canvas reaches up into it (manual.css,
   --bk-bleed), so a page rising as it turns has room there, and the book, framed once for its open spread and
   still as it opens, can fill its box. */
.manual { --bk-bleed: 96px; padding-top: var(--bk-bleed); }
/* As big as the window allows: nearly its full width, and short enough that the book and its button fit on one screen. */
.manual #manual.bk-inline { --book-w: min(1680px, 100vw - 48px, (100vh - 112px) * 1.6); width: var(--book-w); max-width: none; margin-inline: calc((100% - var(--book-w)) / 2); }
/* The booklet is paper, not phosphor: it sits above the CRT layer (.crt, z-index 90), so no scanlines, mask or warp touch it. */
.manual #manual.bk-inline { z-index: 91; cursor: inherit; }
html:not(.js) .manual #manual, html:not(.js) .manual .open { display: none; }
.manual-poster { display: block; width: min(300px, 100%); height: auto; margin: 0 auto; }
.open { display: inline-block; margin-top: 16px; padding: 12px 16px; border: 0; background: var(--bright); color: var(--page); text-transform: uppercase; box-shadow: 4px 4px 0 var(--c-shadow-bg); transition: filter .12s ease-in-out; }
.open:hover { filter: brightness(.9); }
.open:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--c-shadow-bg); }

/* ---------- Bring existing Markdown: a real, cropped app frame, like the demo ---------- */
.migration-shot { max-width: 640px; margin: 40px auto 0; }
.migration-shot .term-wrap { cursor: inherit; box-shadow: 12px 12px 0 var(--c-shadow-bg); }
.migration-shot .term { white-space: normal; background: var(--c-dialog-bg); }
.migration-shot .row { white-space: pre; }
.migration-shot figcaption { margin-top: 24px; color: var(--secondary); font-size: 16px; line-height: 24px; text-wrap: balance; }
.migration-shot figcaption span { color: var(--bright); }

/* ---------- Ready: the install command again, at the end ---------- */
.ready .cta { margin-bottom: 0; }
/* Where it goes, the script to read first, and the files themselves: small print under the command. */
.install-note { max-width: 640px; margin: 24px auto 0; color: var(--secondary); font-size: 16px; line-height: 24px; text-wrap: balance; }
.install-note + .install-note { margin-top: 8px; }
.install-note code { color: var(--bright); overflow-wrap: anywhere; }
.install-note a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.install-note a:hover { text-decoration-thickness: 2px; }

/* ---------- Hello: a message box, as noted draws its own (src/ui/dos.rs: MessageBox) ---------- */
/* The dialog's gray, a double frame with the title cut into it, Turbo Vision's drop shadow, and
   push buttons with their hotkey lit and a half-block shadow. Colors are the theme's dialog roles. */
.dlg {
  position: relative; max-width: 640px; margin: 0 auto; padding: 40px 48px 36px;
  background: var(--c-dialog-bg); color: var(--c-dialog-fg);
  box-shadow: 24px 24px 0 var(--c-shadow-bg);
}
.dlg::before { content: ""; position: absolute; inset: 10px; border: 3px double var(--c-dialog-border); pointer-events: none; }
.dlg-title { position: absolute; top: 0; left: 0; right: 0; margin: 0; font-size: 16px; line-height: 24px; text-transform: uppercase; color: var(--c-dialog-border); text-shadow: none; }
.dlg-title span { position: relative; padding: 0 12px; background: var(--c-dialog-bg); }
.dlg-text { position: relative; margin: 8px 0 0; font-size: 18px; line-height: 28px; text-wrap: balance; }
.dlg-buttons { position: relative; display: flex; justify-content: center; gap: 24px; margin-top: 28px; }
.btn {
  display: inline-block; min-width: 132px; padding: 4px 20px; text-align: center;
  background: var(--c-button-bg); color: var(--c-button-fg);
  box-shadow: 8px 6px 0 var(--c-button-shadow);
}
.btn u { text-decoration: none; color: var(--c-button-hot); text-decoration: var(--hotkey-deco, none); }
.btn:hover { text-decoration: none; color: var(--c-button-focus-fg); }
.btn:active { transform: translate(8px, 6px); box-shadow: none; }
.btn:focus-visible { outline: 2px dashed var(--c-dialog-border); outline-offset: 4px; }

/* ---------- Footer ---------- */
/* The footer sits outside <main> (its own landmark), in the same 1100px column. */
.site-foot { max-width: 1100px; margin: 0 auto; }
.foot { margin-top: 0; padding: 32px 0 calc(48px + var(--bezel)); border-top: 1px solid var(--rule); color: var(--secondary); text-align: left; }
.foot .made { font: 16px/24px var(--font-term); text-transform: uppercase; letter-spacing: .02em; }
.foot .made a { color: inherit; }
.foot .made a:hover { color: var(--bright); }
.foot .credit::before { content: "\00b7  "; }
/* CRT on/off: a word in the line, not a control box. Hover and keyboard focus brighten it. */
.crt-toggle { padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.crt-toggle:hover, .crt-toggle:focus-visible { color: var(--bright); outline: 0; }
.foot .nowrap { white-space: nowrap; }
/* The logo, small, at the line's end: back to the top. A 20-cell drawing, so 40 px keeps it crisp. */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.foot-home { flex: none; line-height: 0; transition: transform .1s ease-in-out; }
.foot-home:hover { transform: translateY(-2px); }
.foot-logo { display: block; }
/* The logo sits in the screen's bottom corner, where the tube's warp bends most: above the CRT layer, so it stays square. */
.foot-home { position: relative; z-index: 91; }

/* ---------- Smaller screens (pewpew's breakpoints) ---------- */
@media (max-width: 1100px) {
}
@media (max-width: 900px) {
  .margin { margin-left: var(--margin-medium); margin-right: var(--margin-medium); }
  .features dl { row-gap: 32px; }
  .card { --pad: 32px; flex-basis: 310px; padding: 28px var(--pad) 24px; }
  .chips { grid-template-columns: repeat(4, 1fr); }
  /* Once the themes fill the column, the benchmark does too, and a section's line under its heading runs
     to the column's edges rather than balancing into short lines. */
  .chart, .bench .fine { width: 100%; }
  .sub { text-wrap: pretty; }
  br { display: none; }
}
/* Below 720px the command and the pull-down no longer fit on one line (480 + 8 + the 129 px pull-down, plus
   the margins): once they stack, each takes the full width, edges lined up, and a command longer than the
   line wraps as a terminal wraps it, at the edge, so all of it shows. */
@media (max-width: 719px) {
  .cta li { flex: 1 1 100%; }
  .pill, .pick, .menu { width: 100%; }
  .pick { padding-block: 12px; }   /* on a line of its own, the label centres again */
  .pill code { white-space: normal; word-break: break-all; }
}
/* Below 600px the six chapters' full names no longer fit beside each other within the gutters: each keeps its
   first word (.more holds the rest). */
@media (max-width: 599px) {
  .chapters .more { display: none; }
}
/* Below 640px the credit gets its own line and the CRT switch hides to leave room for the logo. */
@media (max-width: 639px) {
  .foot .nowrap { display: none; }
  .foot .credit { display: block; }
  .foot .credit::before { content: none; }
}
@media (max-width: 500px) {
  /* On a phone the command is read or copied, not run: no installer to pick. */
  .cta .methods { display: none; }
  .container { padding-top: 72px; }
  .margin { margin-left: var(--margin-small); margin-right: var(--margin-small); }
  section { margin-bottom: var(--section-gap-small); }
  .logo-art { width: 120px; height: auto; }
  h1 { font-size: 40px; line-height: 44px; }
  h2 { font-size: 24px; line-height: 32px; }
  .sub, .lead { font-size: 16px; line-height: 24px; }
  .cta { margin-top: 32px; margin-bottom: 40px; }
  .demo { --gutter: max(var(--margin-small), env(safe-area-inset-left), env(safe-area-inset-right)); }
  /* Six names in one row get ~40px each, too narrow for even "Write" at the VGA font's 9px a glyph: the row
     swipes instead, edge to edge (fading out at the screen's sides), and every chapter keeps its full name.
     app.js scrolls the playing one into view. */
  .chapters {
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
    mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  }
  .chapters::-webkit-scrollbar { display: none; }
  .chapters li { flex: 0 0 auto; min-width: 88px; scroll-snap-align: start; }
  .chapters .more { display: inline; }
  .chips { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; margin-top: 36px; }
  .features dl { margin-top: 36px; }
  .card { --pad: 20px; padding: 24px var(--pad) 20px; gap: 12px; }
  .manual { --bk-bleed: var(--section-gap-small); }
  .chart { font-size: 14px; line-height: 20px; }
  .dlg { padding: 36px 24px 28px; box-shadow: 12px 12px 0 var(--c-shadow-bg); }
  .dlg-text { font-size: 16px; line-height: 24px; }
  .dlg-buttons { gap: 16px; }
  .btn { min-width: 0; flex: 1; padding-inline: 4px; white-space: nowrap; font-size: 14px; box-shadow: 6px 4px 0 var(--c-button-shadow); }
  .btn:active { transform: translate(6px, 4px); }
  .manual #manual.bk-inline { width: auto; margin-inline: calc(-1 * var(--margin-small)); }
}
/* The narrowest phones: the longest card title and its icon would run over the border's right corner,
   so the title goes alone, its text on the copy's edge. */
@media (max-width: 349px) {
  .card dt { left: calc(var(--pad) - 12px); }
  .card dt .ico { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  :root { transition-duration: 0s; }
  .crt::after, .term .cursor { animation: none; }
  .warm { display: none !important; }
  html { scroll-behavior: auto; }
  .pill svg { transition: opacity .2s ease-in-out; }
  .pill[data-copied] .copy, .pill .check { transform: none; }
}
