@font-face {
  font-family: "Geist"; src: url(fonts/geist.woff2) format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono"; src: url(fonts/geist-mono.woff2) format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* The tokens of the app, from frontend/src/styles.css. --fa is lighter here for 4.5:1 text contrast. */
:root {
  --bg: #111214; --p1: #16171a; --p2: #1e2024; --p3: #25272c; --ln: #2a2c31;
  --tx: #e6e7e9; --mu: #a0a2a9; --fa: #868991;
  --ac: oklch(0.7 0.12 250); --acw: oklch(0.7 0.12 250 / .16); --onac: #0d1117;
  --ok: oklch(0.74 0.13 155); --er: oklch(0.68 0.17 25);
  --okw: oklch(0.74 0.13 155 / .13); --erw: oklch(0.68 0.17 25 / .13);
  --okb: oklch(0.74 0.13 155 / .22); --erb: oklch(0.68 0.17 25 / .22);
  --sh: 0 14px 32px -10px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --r: 6px;
  --gut: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--tx); font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; font-feature-settings: "ss01";
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ac); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
code, kbd, pre, .mono { font-family: var(--mono); font-variant-ligatures: none; }
code { font-size: .9em; }
p code, dd code { color: var(--tx); background: var(--p2); padding: 1px 5px; border-radius: 4px; }
kbd { font-size: .8em; padding: 1px 6px; border: 1px solid var(--ln); border-radius: 4px; color: var(--mu); }
::selection { background: oklch(0.7 0.12 250 / .35); color: #fff; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 4px; }
html { scrollbar-color: var(--p3) var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--p3); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.sprite { position: absolute; }
.ic { width: 16px; height: 16px; flex: none; }
.mu { color: var(--mu); }
.fa { color: var(--fa); }
.ok { color: var(--ok); }
.er { color: var(--er); }
.small { font-size: 13px; }
.grow { flex: 1; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gut); }

/* Buttons, as in the app, one size up */
.btn {
  height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px;
  border: 1px solid var(--ln); background: transparent; border-radius: var(--r); color: var(--tx);
  font: 500 14px/1 var(--sans); cursor: pointer; white-space: nowrap; flex: none;
  transition: background-color .15s, border-color .15s, filter .15s;
}
.btn:hover { background: var(--p2); text-decoration: none; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 18px; font-size: 15px; }
.btn.primary { background: var(--ac); color: var(--onac); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .6; cursor: default; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10; background: oklch(0.17 0.004 270 / .86);
  border-bottom: 1px solid var(--ln); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.nav-in { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--tx); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav-links a:not(.btn) { color: var(--mu); display: inline-flex; align-items: center; gap: 7px; }
.nav-links a:not(.btn):hover { color: var(--tx); text-decoration: none; }

/* Hero */
.hero { padding-top: clamp(32px, 5vh, 56px); }
.hero-text { display: grid; grid-template-columns: max-content minmax(260px, 1fr); gap: 24px 56px; align-items: end; margin-bottom: clamp(24px, 4vh, 40px); }
h1 { font-size: clamp(2.5rem, 4.9vw, 4.25rem); line-height: 1.02; letter-spacing: -.038em; color: var(--mu); white-space: nowrap; }
h1 span { color: var(--tx); }
.hero-side { display: grid; gap: 14px; padding-bottom: 4px; }
.lede { color: var(--mu); font-size: 16px; line-height: 1.55; max-width: 48ch; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--tx); }
.facts span { display: inline-flex; align-items: center; gap: 8px; }
.facts span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.facts span:last-child::before { background: var(--fa); }

/* The window, as the detail panel of the app */
.win { background: var(--p1); border: 1px solid var(--ln); border-radius: 10px; box-shadow: var(--sh); overflow: hidden; }
.demo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.win-main { min-width: 0; }
.win-head { padding: 16px 20px 0; border-bottom: 1px solid var(--ln); }

/* The assistant panel of the app */
.assist { border-left: 1px solid var(--ln); background: var(--p1); padding: 16px 20px 20px; display: grid; align-content: start; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--mu); }
.assist-head { display: flex; align-items: center; gap: 8px; color: var(--tx); padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--ln); margin-inline: -20px; padding-inline: 20px; }
.dot.ac { background: var(--ac); width: 7px; height: 7px; }
.chip { font: 12px var(--mono); padding: 1px 8px; border: 1px solid var(--ln); border-radius: 10px; color: var(--mu); }
.assist-title { color: var(--tx); font-weight: 600; font-size: 15px; }
.assist-ref { color: var(--ac); font-size: 12.5px; margin-top: -8px; }
.assist-label { font-size: 12.5px; color: var(--fa); margin-top: 4px; }
.assist-label.ac { color: var(--ac); margin-top: 0; }
.evidence { margin: -4px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.evidence li { position: relative; padding-left: 16px; }
.evidence li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 7px; height: 1px; background: var(--fa); }
.fixbox { margin-top: 6px; padding: 12px 14px; border-radius: var(--r); background: var(--acw); color: var(--tx); display: grid; gap: 6px; }
.win-kind { display: flex; gap: 10px; align-items: center; font: 13px var(--mono); }
.tag { padding: 2px 8px; background: var(--p2); border: 1px solid var(--ln); border-radius: 4px; color: var(--mu); }
.win-name { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; font-size: 19px; }
.state { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--er); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.er { background: var(--er); box-shadow: 0 0 0 3px var(--erw); }
.win-tabs { display: flex; gap: 22px; font-size: 14px; color: var(--mu); }
.win-tabs span { padding-bottom: 10px; border-bottom: 2px solid transparent; }
.win-tabs .on { color: var(--tx); border-color: var(--tx); }
.win-tabs kbd { border: 0; padding: 0; font-size: 11px; color: var(--fa); }
.win-bar { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--ln); }
.seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--ln); border-radius: var(--r); }
.seg button {
  height: 30px; padding: 0 13px; border: 0; border-radius: 4px; background: transparent; color: var(--mu);
  font: 14px var(--sans); cursor: pointer;
}
.seg button:hover { color: var(--tx); }
.seg button[aria-selected="true"] { background: var(--p3); color: var(--tx); }
.stat { font-size: 13px; }
.spin { display: none; width: 13px; height: 13px; border: 2px solid var(--ln); border-top-color: var(--ac); border-radius: 50%; animation: spin .7s linear infinite; }
#dryrun.busy .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.dry { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--ease); }
.dry > .okbox { overflow: hidden; min-height: 0; }
.dry.hide { grid-template-rows: 0fr; }
.okbox {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 0 20px;
  font: 13.5px/1.55 var(--mono); color: var(--ok); background: var(--okw);
  border-bottom: 1px solid var(--ln);
}
.okbox .ic { margin-top: 3px; }
.dry:not(.hide) .okbox { padding-block: 11px; }
.dry.hide .okbox { padding-block: 0; border-bottom-color: transparent; }
.dry.reveal .okbox span, .dry.reveal .okbox .ic { animation: wipe .7s var(--ease) both; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Diff rows: old number, new number, sign, text */
.code { padding: 6px 0 10px; font: 14px/1 var(--mono); overflow-x: auto; }
.r { display: grid; grid-template-columns: 3.4em 3.4em 1.6em 1fr; align-items: baseline; position: relative; }
.code .r { min-height: 25px; align-items: center; }
.r .o, .r .n { color: var(--fa); text-align: right; padding-right: .9em; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13px; }
.r .s { color: var(--fa); text-align: center; font-family: var(--mono); }
.r .t { white-space: pre; padding-right: 20px; }
.r.fold { color: var(--fa); background: oklch(1 0 0 / .025); }
.narrow-t { display: none; }
.r.fold .t { font-size: 13px; }
.r.del { background: var(--erw); }
.r.add { background: var(--okw); }
.r.del .s { color: var(--er); }
.r.add .s { color: var(--ok); }
.code .r.del .o, .code .r.add .n { color: var(--mu); }
.caret { display: none; width: 2px; height: 1.15em; background: var(--ac); vertical-align: -3px; margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Live and Edit views of the same rows */
.code[data-mode="live"] .add, .code[data-mode="edit"] .del { display: none; }
.code[data-mode="live"] .r, .code[data-mode="edit"] .r { background: none; }
.code[data-mode="live"] .r.fold, .code[data-mode="edit"] .r.fold { background: oklch(1 0 0 / .025); }
.code[data-mode="live"] .s, .code[data-mode="edit"] .s { visibility: hidden; }
.code[data-mode="live"] .n, .code[data-mode="edit"] .o { visibility: hidden; }
.code[data-mode="edit"] .caret { display: inline-block; }
.code[data-mode="edit"] .add .t { color: var(--tx); }

/* The one authored entrance: the changed bands draw in, the text is there from the start */
.code .r.del { animation: tint-er .9s var(--ease) .3s backwards; }
.code .r.add { animation: tint-ok .9s var(--ease) .3s backwards; }
.code .r:nth-child(7) { animation-delay: .42s; }
.code .r:nth-child(10) { animation-delay: .54s; }
.code .r:nth-child(11) { animation-delay: .66s; }
@keyframes tint-er { from { background: transparent; } to { background: var(--erw); } }
@keyframes tint-ok { from { background: transparent; } to { background: var(--okw); } }

.hero-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 16px; font-size: 14px; color: var(--fa); }
.hero-foot span { max-width: 68ch; }

/* Video, with its scenes as a list beside it */
.film { padding-top: clamp(88px, 13vh, 136px); }
.film-head { display: grid; gap: 14px; }
.film-head p { color: var(--mu); max-width: 68ch; }
.film-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; margin-top: 32px; align-items: start; }
.film-frame { margin: 0; border: 1px solid var(--ln); border-radius: 10px; overflow: hidden; background: #0c0d0f; box-shadow: var(--sh); }
.film-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0c0d0f; }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.chapters button {
  width: 100%; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px;
  border: 0; border-radius: var(--r); background: transparent; color: var(--mu); font: 14.5px var(--sans); text-align: left; cursor: pointer;
}
.chapters button:hover { background: var(--p1); color: var(--tx); }
.chapters button[aria-current] { background: var(--p2); color: var(--tx); }
.chapters .mono { min-width: 2.8em; font-size: 12.5px; color: var(--fa); font-variant-numeric: tabular-nums; }
.chapters button[aria-current] .mono { color: var(--ac); }

/* File header */
.file { padding-top: clamp(96px, 14vh, 152px); }
.film h2, .file h2, .more-tools h2, .speed h2, .local h2, .news h2, .install h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.1; letter-spacing: -.03em; max-width: 22ch; }
.filehead {
  margin: 28px 0 0; padding: 18px 20px; background: var(--p1); border: 1px solid var(--ln); border-radius: var(--r);
  font-size: 14px; line-height: 1.75; color: var(--mu); overflow-x: auto;
}

/* Hunks */
.hunk { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: 32px 56px; align-items: start; padding-top: clamp(72px, 10vh, 112px); }
.hunk h2, .tool h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2; letter-spacing: -.025em; margin-bottom: 22px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .6em; align-items: baseline;
}
.tool h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); margin-bottom: 18px; }
/* The hunk range sits on the heading line, as in a unified diff */
.range { font-size: max(12.5px, .5em); font-weight: 400; letter-spacing: 0; color: var(--fa); white-space: nowrap; position: relative; top: -.15em; }
.lines { border: 1px solid var(--ln); border-radius: var(--r); overflow: hidden; background: var(--p1); }
.lines .r { grid-template-columns: 2.4em 2.4em 1.3em 1fr; padding: 9px 0; }
.lines .r + .r { border-top: 1px solid oklch(1 0 0 / .03); }
.lines code { font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 14px; color: var(--tx); }
.lines p { font-size: 15.5px; line-height: 1.55; padding-right: 16px; }
.lines p code { font-size: 13px; padding: 1px 5px; white-space: nowrap; }
.lines .r .o, .lines .r .n { font-size: 12px; }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 14.5px; }
.more .ic { transition: transform .25s var(--ease); }
.more:hover .ic { transform: translateX(3px); }

.shot { margin: 0; width: fit-content; max-width: 100%; border: 1px solid var(--ln); border-radius: 8px; overflow: hidden; background: var(--bg); }
.hunk .shot, .hunk .stage { margin-top: 30px; }

/* A confirmation dialog of the app, coded, on the dot grid of the topology view */
.stage {
  margin: 0; padding: clamp(24px, 4vw, 44px) clamp(16px, 3vw, 36px); border: 1px solid var(--ln); border-radius: 8px;
  background: radial-gradient(circle, oklch(1 0 0 / .07) 1px, transparent 1.2px) 0 0 / 18px 18px, var(--bg);
  display: grid; place-items: center;
}
.dlg {
  width: min(480px, 100%); display: grid; gap: 14px; padding: 20px; font-size: 14px; line-height: 1.5;
  background: var(--p1); border: 1px solid var(--ln); border-radius: 10px; box-shadow: var(--sh);
}
.dlg-title { font-size: 16px; font-weight: 600; }
.itemlist { padding: 8px 12px; background: var(--bg); border: 1px solid var(--ln); border-radius: var(--r); font: 13px var(--mono); }
.dlg-word { display: grid; gap: 8px; font-size: 13.5px; }
.dlg-word b { color: var(--tx); font-weight: 500; }
.field { display: flex; align-items: center; height: 34px; padding: 0 10px; border: 1px solid var(--ac); border-radius: var(--r); background: var(--bg); font-size: 14px; }
.field .caret { display: inline-block; }
.dlg .okbox { padding: 9px 12px; border: 0; border-radius: var(--r); font-size: 12.5px; }
.dlg-foot { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.chk { width: 16px; height: 16px; border-radius: 4px; background: var(--ac); color: var(--onac); display: grid; place-items: center; }
.chk .ic { width: 12px; height: 12px; }
.dlg .btn { cursor: default; }

/* More tools: the sidebar of the app as the file list */
.more-tools { padding-top: clamp(96px, 14vh, 152px); }
.tree-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; margin-top: 32px; align-items: start; }
.tree { display: grid; gap: 2px; position: sticky; top: 80px; }
.tree button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 40px; padding: 0 12px;
  border: 0; border-radius: var(--r); background: transparent; color: var(--mu); font: 15px var(--sans); text-align: left; cursor: pointer;
}
.tree button:hover { background: var(--p1); color: var(--tx); }
.tree button[aria-selected="true"] { background: var(--p2); color: var(--tx); }
.ds { font-size: 12px; white-space: nowrap; }
.new { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--ok); }
.tool { display: grid; gap: 0; }
.tool[hidden] { display: none; }
.tool .shot { margin-top: 22px; }
.tool .more { justify-self: start; }

/* Speed */
.speed { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 56px; padding-top: clamp(96px, 14vh, 152px); align-items: start; }
.speed-text { display: grid; gap: 16px; }
.speed-text p { color: var(--mu); max-width: 52ch; }
.speed-text .more { margin-top: 0; justify-self: start; }
.tbl { width: 100%; border-collapse: collapse; background: var(--p1); border: 1px solid var(--ln); border-radius: var(--r); overflow: hidden; font-size: 15px; }
.tbl th { text-align: left; font-weight: 500; font-size: 13px; color: var(--fa); padding: 12px 18px; border-bottom: 1px solid var(--ln); }
.tbl td { padding: 13px 18px; border-top: 1px solid oklch(1 0 0 / .04); vertical-align: top; }
.tbl tbody tr:first-child td { border-top: 0; }
.tbl tbody tr:hover td { background: oklch(1 0 0 / .02); }
.speed .tbl td.mono { color: var(--ok); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Local and free */
.local { padding-top: clamp(96px, 14vh, 152px); }
.kv { margin: 32px 0 0; border-top: 1px solid var(--ln); }
.kv div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 32px; padding: 20px 0; border-bottom: 1px solid var(--ln); }
.kv dt { color: var(--fa); font-size: 15px; }
.kv dd { margin: 0; font-size: 17px; max-width: 68ch; }

/* Release notes: each release adds lines */
.news { padding-top: clamp(96px, 14vh, 152px); }
.rels { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--ln); }
.rel { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px 32px; padding: 24px 0; border-bottom: 1px solid var(--ln); }
.rel-tag { display: grid; align-content: start; gap: 2px; padding-top: 8px; }
.rel-tag a { font-size: 15px; }
.rel-tag time { font-size: 14px; }
.lines.log .r { grid-template-columns: 2.4em minmax(0, 1fr); }
.lines.log b { font-weight: 600; }
.lines.log kbd { font-size: 12px; }
.rel + .rel .lines.log .r.add { background: none; }
.rel + .rel .lines.log p { color: var(--mu); }
.rel + .rel .lines.log b { color: var(--tx); }
.lines.log .lbl { display: inline-block; min-width: 2.6em; margin-right: 10px; font-size: 12.5px; color: var(--fa); }
.news .more { margin-top: 24px; }

/* Install */
.install { padding-top: clamp(96px, 14vh, 152px); padding-bottom: clamp(80px, 12vh, 128px); }
.install-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.install-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 40px; margin-top: 36px; align-items: start; }
.files td:first-child { color: var(--mu); }
.files a { font-size: 13.5px; white-space: nowrap; }
.steps.linux { margin-top: 32px; }
.steps { display: grid; gap: 14px; }
.steps > p { font-size: 14px; }
.term { background: #0c0d0f; border: 1px solid var(--ln); border-radius: var(--r); overflow: hidden; }
.term-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--ln); font-size: 13px; color: var(--fa); }
.copy {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 4px;
  background: transparent; color: var(--mu); font: 13px var(--sans); cursor: pointer;
}
.copy:hover { background: var(--p2); color: var(--tx); }
.copy.done { color: var(--ok); }
.term pre { margin: 0; padding: 14px 16px; font-size: 13.5px; line-height: 1.7; overflow-x: auto; color: var(--tx); }
.term pre code { font-size: inherit; }

/* Footer */
.foot { border-top: 1px solid var(--ln); background: var(--p1); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-block: 28px; }
.foot .brand { font-size: 15px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.foot nav a { color: var(--mu); }
.foot nav a:hover { color: var(--tx); }
.foot .small { flex-basis: 100%; }

@media (max-width: 1100px) {
  .demo { grid-template-columns: minmax(0, 1fr); }
  .assist { border-left: 0; border-top: 1px solid var(--ln); }
}
@media (max-width: 960px) {
  .hero-text { grid-template-columns: minmax(0, 1fr); }
  h1 { white-space: normal; }
  .hunk, .speed { grid-template-columns: minmax(0, 1fr); }
  .hunk .shot { margin-top: 0; }
  .install-grid { grid-template-columns: minmax(0, 1fr); }
  .tree-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .film-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .chapters { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .chapters li { flex: none; }
  .chapters button { width: auto; height: 34px; background: var(--p1); border: 1px solid var(--ln); }
  .tree { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .tree button { flex: none; height: 36px; background: var(--p1); border: 1px solid var(--ln); }
  .tree button[aria-selected="true"] { border-color: var(--p3); }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .hide-sm, .nav-links a.hide-sm { display: none; }
  .rel { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 20px 0; }
  .rel-tag { display: flex; align-items: baseline; gap: 12px; padding-top: 0; }
  .nav-links { gap: 16px; }
  .win-head { padding: 14px 14px 0; }
  .win-bar { flex-wrap: wrap; padding: 10px 14px; }
  .win-bar .grow { display: none; }
  .win-bar .btn { flex: 1 1 auto; }
  .okbox { padding-inline: 14px; font-size: 12.5px; }
  .code { font-size: 13px; }
  .r { grid-template-columns: 2.6em 2.6em 1.4em 1fr; }
  .lines .r { grid-template-columns: 2.2em 2.2em 1.3em 1fr; }
  .kv div { grid-template-columns: 1fr; gap: 4px; }
  .code .r.wide, .wide-t { display: none; }
  .narrow-t { display: inline; }
  .shot { overflow-x: auto; overscroll-behavior-x: contain; }
  .shot img { max-width: none; }
  /* The right edge fades while more of the screenshot is to the right */
  .shot.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
  .kv dd { font-size: 16px; }
  .tbl th, .tbl td { padding-inline: 12px; }
  .files a { white-space: normal; overflow-wrap: anywhere; }
  .speed .tbl td.mono { white-space: normal; }
  .hero-foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
