/* The record is the navigation. A dark room, an LED wall, one lamp, the pressing's colour.
   Display: Jost (self-hosted, variable). Text: the system's book serif. */

@font-face {
  font-family: Jost;
  src: url(fonts/jost-vf.woff2) format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
/* Arial reshaped to Jost's width and vertical metrics, so the swap doesn't shift lines */
@font-face {
  font-family: "Jost Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans");
  size-adjust: 96.7%;
  ascent-override: 110.7%;
  descent-override: 39.3%;
  line-gap-override: 0%;
}

:root {
  --page: #121110;          /* the board; the shader's background is this exact value */
  --ink: #dcd6cc;           /* 13:1 on --page */
  --ink-2: #aea79c;         /* 7.9:1 */
  --rule: #3a3633;
  --rule-hi: #5a554f;
  --well: #1a1816;          /* code blocks, the arm board */
  --label: #b8432c;         /* the paper label, as printed */
  --accent: #b598ff;        /* the visit's pressing, lifted to >= 4.5:1; the head script sets it */

  --display: Jost, "Jost Fallback", Futura, "Century Gothic", sans-serif;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* one spacing scale for everything */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;
  --gut: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 34rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--page); color: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.55 var(--serif); overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--accent); color: #120f0d; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; }
p { margin: 0; }

.skip {
  position: absolute; left: var(--s2); top: var(--s2); z-index: 10;
  padding: var(--s2) var(--s3); background: var(--ink); color: var(--page);
  font: 500 1rem var(--display); transform: translateY(-200%);
}
.skip:focus { transform: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- home: one scene, three acts ---------- */

/* The scene is a fixed canvas under everything; the acts are ordinary text over it. Each act
   has a .frame: an empty square the camera keeps its subject in (the record, then the record
   turned over, then the sleeve). Before the scene runs, and where it can't, each frame shows a
   still render of the same shot, twice the frame's size, centred on it. */
.scene {
  position: fixed; left: 0; top: 0; z-index: 0;
  width: 100vw; height: 100lvh;
  opacity: 0; transition: opacity 0.8s ease;
  touch-action: pan-y;               /* a vertical swipe scrolls; a sideways one turns the record */
  -webkit-tap-highlight-color: transparent;
}
html.live .scene { opacity: 1; }
.story { position: relative; z-index: 1; pointer-events: none; }
.story .txt { pointer-events: auto; position: relative; }
.act { position: relative; overflow: clip; overflow-clip-margin: 0; }
.frame { position: relative; aspect-ratio: 1; }
.frame .still {
  position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; max-width: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent);
  mask-image: radial-gradient(closest-side, #000 62%, transparent);
  pointer-events: none; user-select: none;
}
html.live .frame .still { opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0s linear 0.8s; }
html.js:not(.still):not(.no-live) .frame .still.later { display: none; }   /* the scene will draw these */
.disc {                              /* the record's own box: what the page transition moves */
  position: absolute; left: 2.6%; top: 6.9%; width: 86.2%; height: 86.2%;
  border-radius: 50%; overflow: hidden; pointer-events: none;
  view-transition-name: record;
}
.disc canvas { width: 100%; height: 100%; }
.foot { position: relative; z-index: 1; background: var(--page); }

#name {
  font-weight: 800;
  font-size: clamp(4.25rem, 21vw, 6rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
  margin-left: -0.05em;
  text-wrap: balance;
}
.line { margin-top: var(--s5); max-width: 23em; font-size: 1.1875rem; line-height: 1.42; }

/* One heading for every section (Side A, Side B, Liner notes, The menagerie): heavy Jost on a
   3px rule, its second word light. Lists under them are hairline rows, like an LP back. */
:root { --h2: clamp(1.875rem, 2.4vw + 0.9rem, 2.625rem); }
.side-head, .credits-head {
  display: flex; align-items: baseline; gap: 0.35em; flex-wrap: wrap;
  margin-top: var(--s7);
  padding-bottom: var(--s3);
  border-bottom: 3px solid var(--ink);
  font-size: var(--h2); font-weight: 800; line-height: 1; letter-spacing: -0.025em;
}
.side-head span { font-weight: 300; color: var(--ink-2); letter-spacing: -0.01em; }
.act-b .side-head, .act-c .side-head { margin-top: 0; }
.tracks { list-style: none; margin: 0; padding: 0; font-family: var(--display); }
.tracks li { border-bottom: 1px solid var(--rule); }
.tracks a {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: baseline; column-gap: var(--s3);
  min-height: 3.25rem; padding: 0.8rem 0 0.7rem;
  color: var(--ink); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.tracks .n { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 0.9375rem; letter-spacing: 0.02em; }
.tracks .t { min-width: 0; font-size: 1.375rem; font-weight: 500; line-height: 1.2; letter-spacing: -0.012em; }
.tracks .k { font: 400 0.9375rem/1.2 var(--display); color: var(--ink-2); white-space: nowrap; }
.tracks .y { display: none; }
.tracks a:hover .t, .tracks a.on .t { color: var(--accent); }
.tracks a.on .n, .tracks a:hover .n { color: var(--accent); }
.tracks a:focus-visible { outline-offset: 2px; }

.writing a { padding-bottom: 0.2rem; }
.writing .t { font-weight: 600; }
.writing .dek { margin: 0 0 0 calc(3rem + var(--s3)); padding-bottom: 0.85rem; max-width: 30rem; color: var(--ink-2); font: 400 1.0625rem/1.45 var(--serif); }
.writing .pub .k { color: var(--ink); }
.writing .draft .t { color: var(--ink-2); font-weight: 450; }
.writing .draft .k { color: var(--ink-2); }
.writing .draft a:hover .t, .writing .draft a.on .t { color: var(--accent); }

@media (max-width: 599px) {
  .writing .t::after { display: none; }
  .writing a { grid-template-columns: 3rem minmax(0, 1fr); row-gap: 0.1rem; }
  .writing .k { grid-column: 2; font-size: 0.9375rem; }
  .writing .t { font-size: 1.25rem; line-height: 1.2; }
}

/* liner notes, set as credits: role on the left, name on the right */
/* set like the credits on the back of an LP: hairline rows, the role small on the left */
.liner { margin: var(--s4) 0 0; display: grid; }
.liner div { display: grid; grid-template-columns: 6rem 1fr; gap: var(--s4); align-items: baseline; padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.liner dt { font: 500 0.9375rem/1.4 var(--display); color: var(--ink-2); }
.liner dd { margin: 0; font-size: 1.125rem; line-height: 1.45; max-width: 28rem; }
.elsewhere { display: flex; gap: var(--s4); align-self: center; }
.elsewhere a { display: block; color: var(--ink-2); transition: color 0.15s; }
.elsewhere a:hover, .elsewhere a:focus-visible { color: var(--ink); }
.elsewhere svg { display: block; width: 1.375rem; height: 1.375rem; fill: currentColor; }

.credits-note { margin-top: var(--s3); color: var(--ink-2); max-width: 30rem; }
.credits { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: var(--s3) var(--s5); }
.credits li { display: grid; grid-template-columns: 48px 1fr; column-gap: var(--s3); align-items: center; line-height: 1.3; }
.credits .portrait { grid-row: span 2; width: 48px; height: 48px; background: url(img/portraits.webp) 0 0 / 288px 48px no-repeat; image-rendering: pixelated; }
.credits b { font: 700 1.0625rem/1.2 var(--display); }
.credits span:last-child { color: var(--ink-2); font-size: 0.9375rem; }
.credits-more { margin-top: var(--s5); font-family: var(--display); font-weight: 500; }

/* Phone, and anything taller than wide: a stack. Side A's shot, then its text; then a turn: a
   spacer two screens tall whose box pins to the screen while the record lifts and turns over;
   then Side B's text; another turn (into the sleeve); the liner notes. The text panels are
   opaque, full bleed, and the record is only ever drawn in the open boxes between them. */
.act { padding: 0 var(--gut); }
.act .frame { width: 100vw; margin-left: calc(-1 * var(--gut)); }
.act-a > .frame { margin-top: 3svh; }
/* phones: the opening box is a little smaller than the screen, so the shot takes in the whole
   deck (arm, platter, a strip of shelf), not just the record */
@media not ((min-width: 700px) and (min-aspect-ratio: 1/1)) {
  .act-a > .frame { width: min(82vw, 74svh); margin: 4svh auto 3svh; }
}
@media (max-width: 599px) {
  .tracks a { grid-template-columns: 2.1rem minmax(0, 1fr) auto; column-gap: var(--s2); }
  .writing a { grid-template-columns: 2.1rem minmax(0, 1fr); }
  .writing .dek { margin-left: calc(2.1rem + var(--s2)); }
}
/* the panel's top edge: the room fades into the page over the first 2.5rem */
.txt { background: linear-gradient(to bottom, rgb(18 17 16 / 0), rgb(18 17 16 / 0.62) 7rem); margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) var(--s8);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.8), 0 0 18px rgb(0 0 0 / 0.65); }
.act-b .txt, .act-c .txt { padding-top: 2.5rem; }
.turn { position: relative; height: 0; pointer-events: none; }
.turn .pin { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.turn .frame { width: min(100vw, 64svh); }
/* into the sleeve: the shot sits low, so the notes follow it without a dark band */
.turn-bc .pin { place-items: end center; padding-bottom: 4svh; }
html.still .turn, html.no-live .turn, html:not(.js) .turn { display: none; }
html.js:not(.still):not(.no-live) :is(.act-b, .act-c) > .frame { display: none; }
html.still .act-b .frame, html.no-live .act-b .frame, html.still .act-c .frame, html.no-live .act-c .frame { margin-top: var(--s6); }

/* Wide: text in a column, the shot beside it, pinned; acts alternate sides. The turns are empty
   screens where the record crosses over. */
@media (min-width: 700px) and (min-aspect-ratio: 1/1) {
  .story { --cw: min(34rem, 38vw); --fw: min(112svh, 78vw); }
  .act {
    min-height: 100svh;
    display: grid; grid-template-columns: var(--cw) minmax(0, 1fr); column-gap: 4vw;
    padding: 0 var(--gut);
  }
  .act .frame {
    grid-row: 1; width: var(--fw); align-self: start; justify-self: center;
    position: sticky; top: calc(50svh - var(--fw) / 2); margin: calc(50svh - var(--fw) / 2) 0;
  }
  .txt { grid-row: 1; align-self: center; background: none; margin: 0; padding: 14svh 0; min-height: 0 !important; }
  /* the shot spans the act and slides under the text column; the text sits on a soft fade */
  .txt { position: relative; z-index: 1; text-shadow: 0 1px 2px rgb(0 0 0 / 0.8), 0 0 18px rgb(0 0 0 / 0.65); }
  .act-a .frame { grid-column: 1 / -1; justify-self: center; margin-left: 10vw; }
  .act-a .txt { grid-column: 1; }
  .act-b, .act-c { grid-template-columns: minmax(0, 1fr) var(--cw); }
  .act-b .frame, .act-c .frame { grid-column: 1 / -1; justify-self: center; margin-right: 10vw; }
  .act-b .txt, .act-c .txt { grid-column: 2; padding-top: 14svh; }
  html.js:not(.still):not(.no-live) :is(.act-b, .act-c) > .frame { display: block; }
  html.still .act-b .frame, html.no-live .act-b .frame, html.still .act-c .frame, html.no-live .act-c .frame { margin-top: calc(50svh - var(--fw) / 2); }
  .turn .frame { width: min(100svh, 70vw); }
  .turn-bc .pin { place-items: center; padding-bottom: 0; }
  #name { font-size: clamp(5rem, 8.6vw, 9.5rem); }
  .line { font-size: 1.3125rem; }
  .tracks .t { font-size: 1.5rem; }
  .tracks .y { display: block; width: 3rem; text-align: right; font-weight: 500; font-size: 0.9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
  .act-a .tracks a { grid-template-columns: 3rem minmax(0, 1fr) auto auto; }
}
@media (min-width: 1800px) and (min-aspect-ratio: 1/1) {
  .story { --cw: 38rem; }
}

/* Wide: a fade from the screen edge behind whichever side has text (left for Side A, right for
   Side B and the notes), following the scene's stage --k, so the shot can run under the column */
@media (min-width: 700px) and (min-aspect-ratio: 1/1) {
  .story::before, .story::after {
    content: ""; position: fixed; top: 0; bottom: 0; width: 58vw; z-index: -1; pointer-events: none;
  }
  .story::before {
    left: 0; background: linear-gradient(to right, rgb(18 17 16 / 0.72), rgb(18 17 16 / 0.42) 55%, rgb(18 17 16 / 0));
    opacity: clamp(0, calc(1 - var(--k, 0) * 2.2), 1);
  }
  .story::after {
    right: 0; background: linear-gradient(to left, rgb(18 17 16 / 0.72), rgb(18 17 16 / 0.42) 55%, rgb(18 17 16 / 0));
    opacity: clamp(0, calc((var(--k, 0) - 0.3) * 2.6), 1);
  }
}

/* A side's text comes in as that side turns to face you. The scene writes its stage to --k on
   .story every frame (0 Side A, 1 Side B, 2 in the sleeve); each line slides a few pixels from
   the record's side, a little after the one above it, and goes back out if you scroll back. */
html.live .act-b .txt { --e0: calc((var(--k, 9) - 0.2) * 3); }
html.live .act-c .txt { --e0: calc((var(--k, 9) - 1.2) * 3); }
html.live :is(.act-b, .act-c) :is(.side-head, .tracks > li, .liner > div, .credits-head, .credits-note, .credits > li) {
  --e: clamp(0, calc(var(--e0) - var(--i, 0) * 0.12), 1);   /* reaches 1 for --i up to 5 at the act's rest */
  opacity: var(--e);
  transform: translateX(calc((1 - var(--e)) * -18px));
}
@media (prefers-reduced-motion: reduce) {
  html.live :is(.act-b, .act-c) :is(.side-head, .tracks > li, .liner > div, .credits-head, .credits-note, .credits > li) { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scene { transition: none; }
}

/* ---------- the run-out: footer ---------- */

.foot { margin-top: 0; padding: 0 var(--gut); }
.floor { position: relative; height: 72px; border-bottom: 1px solid var(--rule); }
.pet {
  position: absolute; left: 0; bottom: 0;
  background-repeat: no-repeat; image-rendering: pixelated;
  cursor: pointer; will-change: transform;
}
.foot-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3) var(--s6);
  padding: var(--s5) 0 var(--s7);
  border-top: 3px solid var(--ink);
  font: 500 0.9375rem/1.4 var(--display); color: var(--ink-2);
}
.home .foot-row { border-top-width: 1px; border-top-color: var(--rule); }
.foot-row nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.foot-row a { color: var(--ink); text-decoration-color: var(--rule-hi); }
.foot-row a:hover { color: var(--accent); text-decoration-color: var(--accent); }
body:not(.home) .foot { margin-top: var(--s9); }
body:not(.home) .foot-row { border-top: 0; }

/* ---------- inner pages: the mini record and a sleeve-style title ---------- */

.top {
  display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: var(--s5);
  max-width: 80rem; margin: 0;
  padding: var(--s6) var(--gut) var(--s5);
  border-bottom: 3px solid var(--ink);
  margin-inline: var(--gut); padding-inline: 0;
}
.mini {
  display: block; width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
  view-transition-name: record;
  align-self: center;
}
.mini-rec {
  display: block; width: 100%; height: 100%;
  background: #0d0c0b url(img/mini/swirl-192.webp) center / cover no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  .mini-rec { animation: turn 10.8s linear infinite; }   /* 33⅓ rpm, a sixth as fast */
}
@keyframes turn { to { transform: rotate(-1turn); } }
.top .kicker { font: 500 0.9375rem/1.3 var(--display); color: var(--ink-2); }
.top .kicker a { color: var(--ink-2); text-decoration-color: var(--rule-hi); }
.top .kicker a:hover { color: var(--accent); }
.top h1 { font-size: clamp(2.5rem, 9vw, 5.5rem); font-weight: 800; line-height: 0.92; letter-spacing: -0.035em; margin-top: var(--s2); text-wrap: balance; }
.top h1 .tn { font-weight: 400; color: var(--ink-2); letter-spacing: -0.02em; }

.page {
  max-width: 80rem; margin: 0;
  padding: var(--s6) var(--gut) 0;
}
.col { max-width: var(--measure); }
@media (min-width: 720px) {
  .col { margin-left: calc(72px + var(--s5)); }
}
.lede { font-size: 1.5rem; line-height: 1.38; text-wrap: pretty; }
/* wide: the details hang in a narrow column to the left, like credits beside liner text */
@media (min-width: 1100px) {
  .page > .col:not(.prose):not(.tracknav) {
    max-width: none; display: grid; grid-template-columns: 10rem minmax(0, 38rem); column-gap: var(--s7);
  }
  .page > .col:not(.prose):not(.tracknav) > * { grid-column: 2; }
  .page > .col:not(.prose):not(.tracknav) > .meta { grid-column: 1; grid-row: 1; margin: 0.55rem 0 0; }
  .page > nav.tracknav.col { margin-left: calc(72px + var(--s5) + 10rem + var(--s7)); max-width: 38rem; }
  .post { max-width: none; }
}
@media (max-width: 599px) {
  .top { grid-template-columns: 52px 1fr; column-gap: var(--s3); align-items: center; }
  .mini { width: 52px; height: 52px; }
  .top-t { display: contents; }
  .top h1 { grid-column: 1 / -1; margin-top: var(--s3); }
}
.page .meta { margin-bottom: var(--s4); font-weight: 500; }
.figure { margin: var(--s6) 0 0; }
.figure img { width: 100%; height: auto; background: #000; }
.figure img.px { image-rendering: pixelated; }
.figure figcaption { margin-top: var(--s2); font: 400 0.9375rem/1.4 var(--display); color: var(--ink-2); }
.placeholder {
  margin: var(--s6) 0 0;
  padding: var(--s3) 0 0;
  border-top: 1px solid var(--rule-hi);
  font: italic 400 1.0625rem/1.4 var(--serif); color: var(--ink-2);
}
.tracknav {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4);
  margin-top: var(--s8); padding-top: var(--s3);
  border-top: 3px solid var(--ink);
  font: 600 1.125rem/1.3 var(--display);
}
.tracknav a { color: var(--ink); text-decoration: none; padding: var(--s2) 0; }
.tracknav a:hover .t { color: var(--accent); }
.tracknav .n { color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.tracknav [rel="next"] { grid-column: 2; text-align: right; }

/* ---------- long reading ---------- */

.meta { font: 400 0.9375rem/1.4 var(--display); color: var(--ink-2); }
.standfirst { font-size: 1.5rem; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.prose { font-size: 1.1875rem; line-height: 1.6; max-width: 36rem; hanging-punctuation: first; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.625rem; font-weight: 600; line-height: 1.2; margin-top: 2.2em; }
.prose h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.25; margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.3em; }
.prose li::marker { color: var(--ink-2); }
.prose blockquote { margin-left: 0; padding-left: 1.1em; border-left: 2px solid var(--rule-hi); font-style: italic; color: var(--ink); }
.prose code { font: 0.84em/1 var(--mono); background: var(--well); padding: 0.12em 0.3em; border-radius: 2px; }
.prose pre {
  margin-top: 1.4em; margin-bottom: 1.4em;
  padding: var(--s4) var(--s5); background: var(--well); border-left: 2px solid var(--rule-hi);
  overflow-x: auto; font: 0.875rem/1.55 var(--mono); tab-size: 2;
}
.prose pre code { background: none; padding: 0; font: inherit; }
.prose figure { margin: 1.8em 0; }
.prose figure img { width: 100%; height: auto; border: 1px solid var(--rule); }
.prose figcaption { margin-top: var(--s2); font: 400 0.9375rem/1.4 var(--display); color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--rule-hi); width: 6rem; margin: 2.4em 0; }
.prose sup { line-height: 0; font-size: 0.72em; }
.prose sup a { text-decoration: none; font-family: var(--display); padding: 0 0.1em; }
.prose table { border-collapse: collapse; font: 400 1rem/1.4 var(--display); width: 100%; }
.prose th, .prose td { text-align: left; padding: var(--s2) var(--s4) var(--s2) 0; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 600; border-bottom-color: var(--ink-2); }
.prose td.num, .prose th.num { text-align: right; font-variant-numeric: tabular-nums; }
.footnotes { margin-top: 3em; padding-top: var(--s4); border-top: 1px solid var(--rule); font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.footnotes ol { padding-left: 1.25em; margin: 0; }
.footnotes li + li { margin-top: var(--s2); }
.footnotes :target { color: var(--ink); }

/* ---------- the animals ---------- */

.menagerie { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--s7) var(--s6); }
.animal { display: grid; align-content: start; }
.animal .stage { border-bottom: 3px solid var(--ink); display: flex; justify-content: flex-start; }
.animal .sprite {
  --s: 192px;
  width: var(--s); height: var(--s);
  background: var(--sheet) 0 0 / calc(var(--s) * 6) auto no-repeat;
  image-rendering: pixelated;
  border: 0; padding: 0; cursor: pointer;
}
.animal h2 { font-size: 1.875rem; font-weight: 800; letter-spacing: -0.025em; margin-top: var(--s3); }
.animal p { margin-top: var(--s1); color: var(--ink); }
.animal h3 { margin-top: var(--s4); font: 700 0.9375rem var(--display); color: var(--ink-2); }
.anims { list-style: none; margin: var(--s2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); font-family: var(--display); }
.anims button {
  font: 450 1rem/1.3 var(--display); color: var(--ink);
  background: none; border: 0; padding: var(--s2) 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--rule-hi); text-underline-offset: 0.22em;
}
.anims button:hover { text-decoration-color: var(--ink-2); }
.anims button[aria-pressed="true"] { color: var(--accent); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.anims button:disabled { cursor: default; text-decoration: none; color: var(--ink-2); }

/* ---------- 404 ---------- */
.skipped { padding-top: var(--s8); }
.skipped p + p { margin-top: var(--s4); }

/* ---------- page transitions: the record shrinks into the corner and grows back ---------- */

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(record) { animation-duration: 0.6s; animation-timing-function: cubic-bezier(0.3, 0.7, 0.2, 1); border-radius: 50%; overflow: hidden; }
::view-transition-old(record), ::view-transition-new(record) { height: 100%; }
::view-transition-old(arm) { animation-duration: 0.18s; }
::view-transition-new(arm) { animation-delay: 0.4s; animation-duration: 0.2s; animation-fill-mode: both; }

/* ---------- projector mode (?tv): read from the sofa ---------- */

html.tv { font-size: 125%; }
html.tv .tracks .t { font-size: 1.5rem; }
html.tv #name { font-size: clamp(5rem, 9vw, 10rem); }
html.tv .tracks a { padding: var(--s4) 0; }
html.tv :focus-visible { outline-width: 4px; outline-offset: 6px; }
@media (min-width: 700px) and (min-aspect-ratio: 1/1) {
  html.tv .story { --cw: min(40rem, 44vw); }
}

/* ---------- published posts: code blocks, notes, diagrams ---------- */

.post { max-width: 38rem; }
.post .prose { max-width: none; }
.draft { color: var(--ink-2); font-style: normal; }
.standfirst + .prose { margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--rule); }
.prose .block { margin: 1.2em 0 1.4em; display: flex; flex-direction: column; }
.prose .block pre { margin: 0; }
@media (max-width: 640px) {
  /* code runs to the screen edges on a phone: more room for long lines */
  .prose .block { margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); }
  .prose .block pre { border-left: 0; padding-left: var(--gut); font-size: 0.8125rem; }
  .prose figure { margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); padding: 0 var(--gut); }
  .prose .block .copy { margin-right: var(--gut); }
}
.copy {                               /* a tab on the block's top edge, never over the code */
  align-self: flex-end;
  font: 450 0.875rem/1 var(--display); color: var(--ink-2);
  background: var(--well); border: 0; border-radius: 0;
  padding: var(--s2) var(--s3); min-height: 2rem; cursor: pointer;
}
.copy:hover { color: var(--ink); border-color: var(--rule-hi); }
.prose .note {
  padding: var(--s3) 0 var(--s3) var(--s5);
  border-left: 2px solid var(--accent);
  font-size: 1.0625rem; line-height: 1.55;
}
.prose ul li > strong:first-child { font-family: var(--display); font-weight: 600; }

/* the diagram: drawn in the sleeve's inks */
.prose figure:has(svg) { overflow-x: auto; }
.prose figure svg { width: 100%; min-width: 600px; height: auto; font: 16px var(--display); overflow: visible; }
.prose figure svg text { fill: var(--ink); }
.prose figure svg .name { font-weight: 600; }
.prose figure svg .small { fill: var(--ink-2); font-size: 14px; }
.prose figure svg .zone { fill: none; stroke: var(--rule-hi); stroke-width: 1; stroke-dasharray: 4 4; }
.prose figure svg .box { fill: var(--well); stroke: var(--rule-hi); stroke-width: 1; }
.prose figure svg .main { fill: color-mix(in srgb, var(--accent) 13%, var(--page)); stroke: var(--accent); stroke-width: 1.5; }
.prose figure svg .wire { fill: none; stroke: var(--ink-2); stroke-width: 1.5; }
.prose figure svg .head { fill: var(--ink-2); }
.prose figure svg rect { rx: 0; }


/* ---------- lite: the launch version (name, the record, liner notes) ----------
   Wide: one text column on the left all the way down. The name sits low, on the dark shelf
   under the record; the notes take its place as the record goes into its sleeve on the right. */
@media (min-width: 700px) and (min-aspect-ratio: 1/1) {
  .lite .story { --fw: min(96svh, 72vw); }
  .lite .act-a .frame { margin-left: 14vw; }
  .lite .act-a .txt { align-self: end; padding: 0 0 6svh; }
  .lite #name { font-size: clamp(5rem, min(17vw, 27svh), 16rem); white-space: nowrap; }
  .lite .act-c { grid-template-columns: var(--cw) minmax(0, 1fr); }
  .lite .act-c .frame { margin-right: 0; }
  .lite .act-c .txt { grid-column: 1; padding-top: 14svh; }
  .lite .credits { grid-template-columns: 1fr; }
  .lite .story::before { opacity: clamp(0, calc((var(--k, 0) - 0.3) * 2.6), 1); }
  .lite .story::after { display: none; }
}
/* lite, phones: the first screen is the record with the name under it; the record turns over
   and sleeves itself in the open stretch after it, then the notes come up as a solid panel */
@media not ((min-width: 700px) and (min-aspect-ratio: 1/1)) {
  .lite .act-a { min-height: 100svh; display: flex; flex-direction: column; }
  .lite .act-a .txt { margin-top: auto; background: none; padding-bottom: 5svh; }
  .lite #name { font-size: min(25vw, 8rem); }
  .lite .act-c { margin-top: 75svh; }
  .lite .act-c .txt { background: linear-gradient(to bottom, rgb(18 17 16 / 0), rgb(18 17 16 / 0.95) 4.5rem); padding-top: 6rem; }
}

/* generated: one mini record per pressing */
[data-pid="orange-black"] .mini-rec { background-image: url(img/mini/orange-black-192.webp); }
[data-pid="clear-red-black"] .mini-rec { background-image: url(img/mini/clear-red-black-192.webp); }
[data-pid="yellow-red"] .mini-rec { background-image: url(img/mini/yellow-red-192.webp); }
[data-pid="white-rainbow"] .mini-rec { background-image: url(img/mini/white-rainbow-192.webp); }
[data-pid="clear-blue-white"] .mini-rec { background-image: url(img/mini/clear-blue-white-192.webp); }
[data-pid="lime-black"] .mini-rec { background-image: url(img/mini/lime-black-192.webp); }
[data-pid="green-teal"] .mini-rec { background-image: url(img/mini/green-teal-192.webp); }
[data-pid="cow"] .mini-rec { background-image: url(img/mini/cow-192.webp); }
[data-pid="galaxy"] .mini-rec { background-image: url(img/mini/galaxy-192.webp); }
[data-pid="purple-marble"] .mini-rec { background-image: url(img/mini/purple-marble-192.webp); }
[data-pid="blue-marble"] .mini-rec { background-image: url(img/mini/blue-marble-192.webp); }
[data-pid="pinwheel"] .mini-rec { background-image: url(img/mini/pinwheel-192.webp); }
[data-pid="rgb-swirl"] .mini-rec { background-image: url(img/mini/rgb-swirl-192.webp); }
[data-pid="rainbow"] .mini-rec { background-image: url(img/mini/rainbow-192.webp); }
[data-pid="orange-in-blue"] .mini-rec { background-image: url(img/mini/orange-in-blue-192.webp); }
[data-pid="blue-in-green"] .mini-rec { background-image: url(img/mini/blue-in-green-192.webp); }
[data-pid="pink-green"] .mini-rec { background-image: url(img/mini/pink-green-192.webp); }
[data-pid="tricolour"] .mini-rec { background-image: url(img/mini/tricolour-192.webp); }
[data-pid="quad"] .mini-rec { background-image: url(img/mini/quad-192.webp); }
