@font-face { font-family: "Archivo fallback"; font-weight: 400 450; src: local("Arial"), local("ArialMT"); size-adjust: 98.3%; }
@font-face { font-family: "Archivo fallback"; font-weight: 500 650; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 94.3%; }
@font-face { font-family: "Archivo fallback"; font-weight: 700 900; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 110.8%; }

:root {
  --sky: #f6e5c0;
  --ink: #18140c;
  --soil: #7c421e;
  --burrow: #442710;
  --gold: #f6b241;
  --sand: #e6c38a;
  --on-dark: #f6e5c0;

  --paper: #f4efe7;
  --card: #fffdf9;
  --well: #faf6ef;
  --hair: #e6ddcf;
  --g-ink: #3f2c1d;
  --g-sub: #64554a;
  --g-mute: #6e5f52;

  --text: "Archivo", "Archivo fallback", Arial, sans-serif;
  --mono: "JetBrains Mono", Menlo, Consolas, monospace;

  --m: clamp(1rem, 3vw, 2.5rem);
  --fs-small: 0.9375rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-code: 13px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --u: 3px;
}
@media (min-width: 790px) { :root { --fs-code: 14px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--text); font-size: var(--fs-body); line-height: 1.55;
  font-kerning: normal; text-rendering: optimizeLegibility; overflow-x: clip;
}
img { display: block; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
pre, code, kbd { font-family: var(--mono); font-variant-ligatures: none; letter-spacing: 0; }
code, kbd { font-size: 0.9em; }
pre code { font-size: inherit; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.nw { white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: 8px; z-index: 9; background: var(--card); color: var(--ink); font-weight: 600; padding: 10px 14px; transform: translateY(-200%); }
.skip:focus-visible { transform: none; }

/* the burrow chamber's stepped corner, one pixel step = --u */
.px {
  clip-path: polygon(
    calc(var(--u) * 2) 0, calc(100% - var(--u) * 2) 0, calc(100% - var(--u) * 2) var(--u), calc(100% - var(--u)) var(--u),
    calc(100% - var(--u)) calc(var(--u) * 2), 100% calc(var(--u) * 2), 100% calc(100% - var(--u) * 2),
    calc(100% - var(--u)) calc(100% - var(--u) * 2), calc(100% - var(--u)) calc(100% - var(--u)),
    calc(100% - var(--u) * 2) calc(100% - var(--u)), calc(100% - var(--u) * 2) 100%, calc(var(--u) * 2) 100%,
    calc(var(--u) * 2) calc(100% - var(--u)), var(--u) calc(100% - var(--u)), var(--u) calc(100% - var(--u) * 2),
    0 calc(100% - var(--u) * 2), 0 calc(var(--u) * 2), var(--u) calc(var(--u) * 2), var(--u) var(--u), calc(var(--u) * 2) var(--u));
}

/* ---------- top navigation ---------- */
html { scrollbar-gutter: stable; }
.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.25rem 1.5rem; padding: 14px var(--m) 0; position: relative; z-index: 3; }
.top .mark { display: block; padding: 4px 0; }
.top .mark img { width: 218px; height: 36px; image-rendering: pixelated; }
.top nav ul { display: flex; gap: 0 clamp(1.25rem, 2.6vw, 2.25rem); margin: 0; padding: 0; list-style: none; font-weight: 600; font-size: 1rem; }
.top nav a { display: inline-block; padding: 10px 0; text-decoration-color: transparent; transition: text-decoration-color 180ms ease; }
.top nav a:hover { text-decoration-color: currentColor; }
.top nav a[aria-current="page"] { text-decoration-color: var(--soil); text-decoration-thickness: 3px; text-underline-offset: 0.45em; }
@media (min-width: 1580px) and (min-height: 1000px) { .top .mark img { width: 436px; height: 72px; } .top nav ul { font-size: 1.1875rem; } }

/* ---------- commands ---------- */
.plaque { display: flex; align-items: stretch; background: var(--ink); color: var(--on-dark); min-width: 0; }
.plaque > code { flex: 1; min-width: 0; padding: 0.7em 0.9em; line-height: 1.5; align-self: center; font-size: var(--fs-code); overflow-wrap: break-word; }
.plaque .cl { display: block; padding-left: 2ch; text-indent: -2ch; }
.plaque > code.cl { padding-left: calc(0.9em + 2ch); }
.copy {
  flex: none; font: 600 var(--fs-small) / 1 var(--text); letter-spacing: 0.01em;
  border: 0; cursor: pointer; min-height: 44px; min-width: 4.75rem; padding: 0 0.75em;
  color: var(--sand); background: var(--burrow); display: inline-grid; place-items: center;
  transition: transform 140ms var(--ease-out), background-color 180ms ease, color 180ms ease;
}
.copy > span { grid-area: 1 / 1; }
.copy:not([data-state="ok"]) > .l-ok, .copy[data-state="ok"] > .l-copy { visibility: hidden; }
.copy:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .copy:hover { color: var(--on-dark); background: var(--soil); } }
.copy:focus-visible { outline: 3px solid var(--gold); outline-offset: -6px; }

/* ======================================================================
   home: one screen, the whole savanna
   ====================================================================== */
.first {
  position: relative; overflow: hidden; background: var(--sky);
  --ar: 1.77683; /* 1672 / 941 */
  --imgw: max(100vw, 100svh * var(--ar));
  --imgh: calc(var(--imgw) / var(--ar));
  --ox: calc((100vw - var(--imgw)) * 0.45);
  --oy: calc((100svh - var(--imgh)) * 0.6);
  height: 100vh; height: 100svh;
}
.scene { position: absolute; inset: 0; z-index: 0; container-type: size; }
/* the picture's placement inside the scene, in the scene's own units */
.scene > *, .scene::before {
  --imgw: max(100cqw, 100cqh * var(--ar));
  --imgh: calc(var(--imgw) / var(--ar));
  --ox: calc((100cqw - var(--imgw)) * 0.45);
  --oy: calc((100cqh - var(--imgh)) * 0.6);
}
.art {
  position: absolute; inset: 0;
  background: var(--sky) url(assets/savanna.webp) no-repeat var(--ox) var(--oy) / var(--imgw) var(--imgh);
  image-rendering: pixelated;
}
.hero { position: relative; z-index: 2; }
.hero h1 { font-weight: 800; font-stretch: 108%; letter-spacing: -0.03em; line-height: 1.06; }
.hero .watch { margin-top: 0.875rem; }
.hero .get { display: grid; gap: 0.35em; }
.hero .say { font-size: clamp(0.8125rem, calc(var(--imgw) * 0.0088), 1.125rem); font-weight: 600; line-height: 1.3; margin-top: 0.75em; }
.hero .say:first-child { margin-top: 0; }
.hero .plaque > code { font-size: 1em; }
.hero .copy { font-size: max(0.875rem, 0.85em); }

/* wide screens: the copy sits in the sky right of the meerkat, measured in the picture's own units */
@media (orientation: landscape) and (min-width: 560px) {
  .home .top { position: absolute; inset: 0 0 auto 0; }
  .hero {
    position: absolute;
    left: calc(var(--ox) + var(--imgw) * 0.46);
    top: max(calc(var(--oy) + var(--imgh) * 0.09), 5rem);
    width: min(calc(var(--imgw) * 0.44), calc(100vw - var(--ox) - var(--imgw) * 0.46 - var(--m)));
  }
  .hero h1 { font-size: clamp(1.625rem, calc(var(--imgw) * 0.028), 5rem); text-wrap: balance; }
  .hero .watch { margin-top: clamp(0.875rem, calc(var(--imgw) * 0.011), 2rem); font-size: clamp(15px, calc(var(--imgw) * 0.0108), 26px); }
  .hero .get { margin-top: clamp(1.375rem, calc(var(--imgw) * 0.019), 2.75rem); font-size: clamp(13px, calc(var(--imgw) * 0.0084), 19px); max-width: calc(var(--imgw) * 0.41); }
}

/* phones and tall screens: the words above, the meerkat and its burrow below */
@media (orientation: portrait), (max-width: 559px) {
  .first { display: flex; flex-direction: column; }
  .scene { order: 3; position: relative; inset: auto; flex: 1 1 0; min-height: 0; margin-top: 0.5rem; }
  .scene > *, .scene::before { --imgh: 113cqh; --imgw: calc(var(--imgh) * var(--ar)); --ox: calc((100cqw - var(--imgw)) * 0.32); --oy: calc(100cqh - var(--imgh)); }
  .hero { padding: clamp(0.25rem, 1.5svh, 1.25rem) var(--m) 0; }
  .hero h1 { font-size: clamp(1.25rem, 9vw, 4.5rem); text-wrap: balance; }
  .hero .watch { margin-top: clamp(0.875rem, 3svh, 1.75rem); }
  .hero .get { margin-top: clamp(1.25rem, 5svh, 3rem); font-size: 13px; max-width: 36rem; }
  .hero .say { font-size: 0.875rem; }
}
@media (orientation: portrait) and (min-width: 700px) {
  .hero .get { font-size: 15px; }
}
/* narrow phones: the picture is at most 1.3 screens wide, so all four chambers stay in view */
@media (orientation: portrait) and (max-width: 559px) {
  .scene > *, .scene::before { --imgh: clamp(calc(100cqw / var(--ar)), 113cqh, calc(130cqw / var(--ar))); --ox: calc((100cqw - var(--imgw)) * 0.15); }
}
/* the picture's sky meets the page's sky without a seam */
@media (orientation: portrait), (max-width: 559px) {
  .scene::before { content: ""; position: absolute; inset: 0 0 auto; height: max(0px, calc(var(--oy) + var(--imgh) * 0.27)); z-index: 3; background: linear-gradient(var(--sky), rgb(246 229 192 / 0)); pointer-events: none; }
}
@media (orientation: portrait) and (max-height: 720px), (max-width: 380px) {
  .top { padding-top: 10px; }
  .top nav ul { gap: 0 1.25rem; }
  .top nav a { padding-block: 6px; }
  .hero { padding-top: 0.25rem; }
  .hero h1 { font-size: clamp(1.125rem, 9vw, 3.5rem); }
  .hero .watch { margin-top: 0.75rem; }
  .hero .get { margin-top: 1.125rem; gap: 0.25em; }
  .hero .say { font-size: 0.8125rem; margin-top: 0.4em; }
  .hero .plaque > code { padding-block: 0.5em; }
}
@media (max-width: 479px) {
  .plaque > code.cl { padding-left: calc(0.7em + 2ch); padding-right: 0.5em; }
  .copy { min-width: 4rem; padding: 0 0.6em; }
}

/* short landscape screens: the sky is too low for the words, so they get a patch of sky of their own */
@media (orientation: landscape) and (min-width: 560px) and (max-height: 540px) {
  .first { --oy: calc((100svh - var(--imgh)) * 0.25); }
  .top { padding-top: 8px; }
  .top nav a { padding-block: 6px; }
  .hero {
    top: 3.5rem; padding: 0.625rem 0.875rem 0.875rem; border-radius: 4px;
    left: calc(var(--ox) + var(--imgw) * 0.44);
    width: calc(100vw - var(--ox) - var(--imgw) * 0.44 - 0.75rem);
    background: rgb(246 229 192 / 0.94);
  }
  .hero h1 { font-size: clamp(1.375rem, 3.2vw, 2rem); }
  .hero .watch { margin-top: 0.5rem; font-size: 13px; }
  .hero .get { margin-top: 0.75rem; font-size: 12px; max-width: none; gap: 0.25em; }
  .hero .say { font-size: 0.75rem; margin-top: 0.3em; }
  .hero .plaque > code { padding-block: 0.4em; }
}

/* ---------- home: the film, one more chamber of the burrow, dug into the soil below the picture ---------- */
.film {
  --deep: #4e250e; --or: clamp(2.5rem, 6vw, 4.5rem);
  position: relative; margin-top: -1px; background: var(--deep); color: var(--on-dark);
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(4rem, 8vw, 7rem);
}
/* the soil ends in a pixel step, the way the picture's edges do */
.film::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; pointer-events: none;
  background:
    linear-gradient(90deg, var(--deep) 0 41%, transparent 0 63%, var(--deep) 0 70%, transparent 0) 0 0 / 152px 8px repeat-x,
    linear-gradient(90deg, transparent 0 18%, var(--deep) 0 31%, transparent 0 79%, var(--deep) 0 84%, transparent 0) 40px 0 / 232px 8px repeat-x,
    linear-gradient(90deg, var(--deep) 0 8%, transparent 0) 16px 8px / 152px 8px repeat-x;
  /* the step pauses where "Or…" sits on the edge */
  -webkit-mask: linear-gradient(90deg, #000 calc(50% - var(--or) * 1.6), transparent 0 calc(50% + var(--or) * 1.6), #000 0);
  mask: linear-gradient(90deg, #000 calc(50% - var(--or) * 1.6), transparent 0 calc(50% + var(--or) * 1.6), #000 0);
}
.film-body { display: grid; justify-items: center; text-align: center; }
.film h2 { color: var(--on-dark); }
/* the wall steps at the corners in whole pixels, like the chambers in the picture; the figure draws a dark outline around it */
.film-frame {
  --s: clamp(4px, 0.5vw, 7px); --line: #2e1407;
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0; width: 100%;
  max-width: min(60rem, calc((100svh - 11rem) * 16 / 9));
  filter: drop-shadow(var(--s) 0 0 var(--line)) drop-shadow(calc(var(--s) * -1) 0 0 var(--line)) drop-shadow(0 var(--s) 0 var(--line)) drop-shadow(0 calc(var(--s) * -1) 0 var(--line));
}
.film-wall {
  padding: var(--s); background: #8a5530;
  clip-path: polygon(0 calc(var(--s) * 2), var(--s) calc(var(--s) * 2), var(--s) var(--s), calc(var(--s) * 2) var(--s), calc(var(--s) * 2) 0,
    calc(100% - var(--s) * 2) 0, calc(100% - var(--s) * 2) var(--s), calc(100% - var(--s)) var(--s), calc(100% - var(--s)) calc(var(--s) * 2), 100% calc(var(--s) * 2),
    100% calc(100% - var(--s) * 2), calc(100% - var(--s)) calc(100% - var(--s) * 2), calc(100% - var(--s)) calc(100% - var(--s)), calc(100% - var(--s) * 2) calc(100% - var(--s)), calc(100% - var(--s) * 2) 100%,
    calc(var(--s) * 2) 100%, calc(var(--s) * 2) calc(100% - var(--s)), var(--s) calc(100% - var(--s)), var(--s) calc(100% - var(--s) * 2), 0 calc(100% - var(--s) * 2));
}
/* the screen notches one step, so the wall turns each corner */
.film-screen {
  clip-path: polygon(0 var(--s), var(--s) var(--s), var(--s) 0, calc(100% - var(--s)) 0, calc(100% - var(--s)) var(--s), 100% var(--s),
    100% calc(100% - var(--s)), calc(100% - var(--s)) calc(100% - var(--s)), calc(100% - var(--s)) 100%, var(--s) 100%, var(--s) calc(100% - var(--s)), 0 calc(100% - var(--s)));
}
.film-screen { position: relative; aspect-ratio: 16 / 9; background: #000; container-type: inline-size; }
.film-screen video { display: block; width: 100%; height: 100%; }
.film-screen video:focus-visible { outline-color: var(--gold); outline-offset: -3px; }
/* the poster dims under one centred play button */
.film-play { position: absolute; inset: 0; display: block; border: 0; padding: 0; cursor: pointer; background: rgb(24 12 4 / 0.45); transition: background-color 180ms ease; color: var(--ink); }
.film-play > span {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: clamp(3.5rem, 9cqi, 6rem); aspect-ratio: 1; border-radius: 50%;
  background: var(--gold); transition: scale 140ms var(--ease-out), background-color 180ms ease;
}
.film-play > span::before { content: ""; width: 34%; height: 38%; margin-left: 8%; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.film-play:hover { background: rgb(24 12 4 / 0.3); }
.film-play:hover > span { background: #f8c066; scale: 1.06; }
.film-play:focus-visible { outline: 0; }
.film-play:focus-visible > span { outline: 3px solid var(--on-dark); outline-offset: 3px; }
/* "Or…" straddles the edge: cream on the soil above, soil on the paper below */
.film-or {
  position: absolute; left: 50%; top: 100%; translate: -50% -50%; rotate: -7deg; z-index: 1; margin: 0;
  font-weight: 800; font-stretch: 108%; font-size: var(--or); line-height: 1; letter-spacing: -0.02em;
}
.film-or a {
  display: block; padding-inline: 0.1em; text-decoration: none; color: transparent;
  background: linear-gradient(187deg, var(--on-dark) 50%, var(--deep) 0); -webkit-background-clip: text; background-clip: text;
}
.film-or a:hover { background-image: linear-gradient(187deg, var(--gold) 50%, var(--soil) 0); }

/* ---------- home: the playground below the first screen ---------- */
/* the full face: drawings use box-drawing glyphs the hero's subset leaves out */
@font-face { font-family: "Mono full"; src: url(assets/JetBrainsMono-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
.play { --mono: "Mono full", Menlo, Consolas, monospace; --cell: 10px; }
.try-link { display: inline-block; padding: 0.55em 1.15em; font-weight: 700; line-height: 1.2; letter-spacing: 0.01em; color: var(--ink); background: var(--gold); border-radius: 4px; text-decoration: none; box-shadow: 0 2px 0 var(--soil); }
.try-link:hover { background: #f8c066; }
.try-link:active { transform: translateY(2px); box-shadow: none; }
.play { padding-block: clamp(3rem, 7vw, 5.5rem) 0; }
.film + .play { padding-top: clamp(4.5rem, 9vw, 7rem); }
.play .sec-lead code { color: var(--ink); font-weight: 500; }
.play-src { margin-top: clamp(1.5rem, 3vw, 2rem); display: grid; gap: 0.75rem; }
.presets { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.presets button {
  font: 600 var(--fs-small) / 1 var(--text); color: var(--g-ink); background: var(--card); border: 0; cursor: pointer;
  min-height: 40px; padding: 0 1rem; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--hair);
}
.presets button[aria-pressed="true"] { color: var(--on-dark); background: var(--burrow); box-shadow: none; }
/* the editor: a transparent textarea over its highlighted copy */
.editor { position: relative; border-radius: 6px; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); }
.editor .hl, #play-src {
  margin: 0; padding: 1rem 1.1rem; border: 0; white-space: pre; overflow: auto;
  font: 13px / 1.6 var(--mono); font-variant-ligatures: none; letter-spacing: 0; tab-size: 4;
}
.editor .hl { position: absolute; inset: 0; color: var(--g-ink); pointer-events: none; scrollbar-width: none; }
.editor .hl::-webkit-scrollbar { display: none; }
#play-src {
  position: relative; display: block; width: 100%; min-height: 12rem; resize: vertical;
  background: transparent; color: transparent; caret-color: var(--ink);
}
#play-src::selection { color: transparent; background: rgb(246 178 65 / 0.45); }
#play-src:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.hl .k { color: #8a3b12; font-weight: 500; }
.hl .d { color: #a0611a; }
.hl .a { color: #2f6f7e; }
.hl .t { color: #3d6b2a; }
.hl .s { color: #7a4a8c; }
.hl .c { color: var(--g-mute); font-style: italic; }
.hl .i { color: var(--ink); }
/* width and text size */
.play-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-bottom: 0.75rem; font-size: var(--fs-small); font-weight: 600; }
.ctl-w { display: flex; align-items: center; gap: 0.6rem; flex: 1 1 18rem; max-width: 34rem; }
.ctl-w input { flex: 1; accent-color: var(--soil); min-width: 6rem; }
.ctl-w output { font-weight: 500; white-space: nowrap; min-width: 6.5em; }
.ctl-font { display: inline-flex; align-items: center; gap: 0.25rem; }
.ctl-font output { min-width: 3.2em; text-align: center; font-weight: 500; }
.ctl-font button {
  font: 600 var(--fs-small) / 1 var(--text); color: var(--g-ink); background: var(--card); border: 0; cursor: pointer;
  min-width: 40px; min-height: 36px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--hair);
}
.ctl-font button:disabled { opacity: 0.4; cursor: default; }
.term-lane { margin-top: 1.25rem; min-width: 0; }
.term {
  position: relative; background: var(--ink); color: var(--on-dark); border-radius: 6px;
  width: calc(var(--cols, 80) * 1ch + 2rem + 14px); max-width: 100%; font: 400 var(--cell) / 1.3 var(--mono);
}
.dragging, .dragging * { cursor: ew-resize !important; user-select: none; }
.term-bar { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 1rem; font: 600 0.8125rem / 1.2 var(--text); color: var(--sand); border-bottom: 1px solid rgb(246 229 192 / 0.12); white-space: nowrap; overflow: hidden; }
.term-bar a { color: inherit; }
pre.term-out {
  margin: 0; padding: 1rem calc(1rem + 14px) 1rem 1rem; overflow-x: auto; white-space: pre; min-height: 8rem;
  font: inherit; line-height: 1.25; line-height: round(nearest, 1.25em, 1px); font-variant-ligatures: none;
}
.term[data-state="loading"] .out, .term[data-state="idle"] .out, .term[data-state="error"] .out { color: var(--sand); font-family: var(--text); white-space: normal; }
.probe { position: absolute; left: 0; top: 0; visibility: hidden; white-space: pre; }
.term { overflow: clip; }
.term .note { white-space: pre-wrap; padding: 0 1rem 0.9rem; font: 0.8125rem / 1.4 var(--text); color: var(--gold); }
.term .note:empty { display: none; }
.grip {
  position: absolute; top: 0; right: 0; bottom: 0; width: 14px; cursor: ew-resize; touch-action: none;
  background: var(--burrow); border-radius: 0 6px 6px 0; display: grid; place-items: center;
}
.grip::after { content: ""; width: 4px; height: 36px; border-radius: 2px; background: var(--sand); opacity: 0.7; }
.grip:hover::after, .dragging .grip::after { opacity: 1; background: var(--gold); }
.grip:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.cmp-h { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.play .panel-note { margin-top: 0.4rem; max-width: 70ch; }
.cmp { margin-top: 1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.term-cmp { width: 100%; }
.term-cmp pre.term-out {
  padding-right: 1rem;
  background: linear-gradient(to right, transparent calc(1rem + var(--cols, 80) * 1ch), rgb(246 229 192 / 0.05) 0) no-repeat,
    repeating-linear-gradient(to bottom, var(--gold) 0 6px, transparent 6px 12px) no-repeat calc(1rem + var(--cols, 80) * 1ch) 0 / 1px 100%;
  background-attachment: local;
}
.credits { margin-top: 1.25rem; font-size: var(--fs-small); color: var(--g-sub); max-width: 70ch; }
.play pre.term-out { min-height: 5rem; }
.play .cmp-h { font-size: 1rem; }
/* wide screens: the source on the left stays put; the three terminals stack on the right */
@media (min-width: 1000px) {
  .play .wrap { max-width: 112rem; }
  .play-body { display: grid; grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; margin-top: clamp(1.5rem, 3vw, 2rem); }
  .play-src { position: sticky; top: 1rem; margin-top: 0; }
  #play-src { height: calc(100svh - 6rem); resize: none; }
  .play-out .play-ctl { position: sticky; top: 0; z-index: 2; background: var(--paper); padding-block: 0.5rem; margin-top: -0.5rem; }
  .play-out .term-lane { margin-top: 0; }
  .play .cmp-h { margin-top: 1.75rem; }
}

/* ======================================================================
   inner pages: the paper surface
   ====================================================================== */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) var(--m) 0; max-width: 76rem; margin-inline: auto; }
.page-head h1 { font-weight: 800; font-stretch: 108%; letter-spacing: -0.03em; line-height: 1; font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem); }
.page-head .promo { display: block; width: 100%; height: auto; margin-top: 1.5rem; border-radius: 6px; background: #000; }
.page-head .lead { margin-top: 1rem; font-size: var(--fs-lead); line-height: 1.45; color: var(--g-sub); max-width: 46ch; }
.page-head .jump { margin-top: 0.75rem; font-weight: 600; }
.page-head .jump a { display: inline-block; padding-block: 6px; text-decoration-color: var(--soil); }
.wrap { padding-inline: var(--m); max-width: 76rem; margin-inline: auto; }
.sec { padding-block: clamp(3rem, 7vw, 5.5rem); }
h2 { font-weight: 800; font-stretch: 108%; font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); letter-spacing: -0.03em; line-height: 1.05; }
h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.005em; }
.sec-lead { margin-top: 0.75rem; color: var(--g-sub); max-width: 52ch; }
.sec-lead a { color: var(--ink); font-weight: 600; }

.panel-note { color: var(--g-sub); font-size: var(--fs-small); }

/* cards */
.card { background: var(--card); border-radius: 6px; min-width: 0; box-shadow: 0 0 0 1px var(--hair); }
.card-head { padding: clamp(1.1rem, 2.2vw, 1.5rem) clamp(1.1rem, 2.4vw, 2rem) clamp(0.9rem, 1.8vw, 1.2rem); }
.card-head h3 { font-weight: 600; }
.card-head p { margin-top: 0.2rem; font-size: var(--fs-small); color: var(--g-sub); }
.card-body { display: grid; border-top: 1px solid var(--hair); position: relative; }
.demo { display: block; width: 100%; max-width: 100%; height: auto; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }

/* install */
.ways { display: grid; gap: 2.25rem clamp(2rem, 4vw, 4rem); margin-top: clamp(2rem, 4vw, 3rem); }
@media (min-width: 1000px) { .ways { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.way { min-width: 0; display: grid; align-content: start; }
.way p { margin-top: 0.25rem; max-width: 60ch; color: var(--g-ink); }
.way p a, .way p code { color: var(--ink); }
.way p code { font-weight: 500; }
.way .plaque { margin-top: 0.875rem; }
.way .plaque + .plaque { margin-top: 6px; }
.more { margin-top: clamp(2.25rem, 4.5vw, 3.5rem); }
.more summary { cursor: pointer; font-weight: 700; padding-block: 0.75rem; min-height: 44px; width: max-content; max-width: 100%; }
.more summary::marker { color: var(--soil); }
.more-body { padding-top: 1rem; }
.more .ways { margin-top: 0; }
.more h3 { font-size: var(--fs-body); }

/* the Claude Mod page */
.facts { margin: 0; display: grid; gap: 1.5rem; max-width: 60ch; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0.25rem 0 0; color: var(--g-ink); }
.facts code, .facts kbd { font-weight: 500; color: var(--ink); }
.split { display: grid; gap: clamp(2rem, 4vw, 3.5rem); margin-top: clamp(2rem, 4vw, 3rem); }
@media (min-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.steps { margin: clamp(1.5rem, 3vw, 2rem) 0 0; padding: 0; list-style: none; display: grid; gap: 1.75rem; max-width: 46rem; counter-reset: s; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: 0.75rem; }
.steps > li::before { content: counter(s); font-weight: 800; font-stretch: 108%; font-size: 1.25rem; line-height: 1.3; color: var(--soil); }
.steps > li > * { grid-column: 2; }
.steps p { color: var(--g-ink); }
.steps .plaque { margin-top: 0.75rem; }
.note { margin-top: 1.5rem; color: var(--g-sub); font-size: var(--fs-small); max-width: 60ch; }

/* footer: the page ends in the ground */
.foot { margin-top: clamp(2rem, 5vw, 4rem); }
.horizon { height: calc(61px * var(--hs)); --hs: 2; background: url(assets/horizon.png) repeat-x 0 0 / calc(338px * var(--hs)) calc(61px * var(--hs)); image-rendering: pixelated; }
@media (min-width: 900px) { .horizon { --hs: 3; } }
.foot-body { background: var(--soil); color: var(--on-dark); padding: 0.5rem 0 2.5rem; }
.foot-row { display: grid; gap: 1rem 2.5rem; }
@media (min-width: 900px) { .foot-row { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; } }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 1.75rem; font-weight: 600; margin: 0; padding: 0; list-style: none; }
.foot-links a { display: inline-block; padding-block: 10px; }
.foot p { font-size: var(--fs-small); max-width: 64ch; }
.foot :focus-visible { outline-color: var(--gold); }

@media (prefers-reduced-motion: reduce) { .copy, .film-play > span { transition-duration: 1ms; } }
