/* Spin Doctor · landing-page direction "keyrail": the key strip is the page.
   Phone: a pinned strip of lit key pads; every chapter is a stack of records that flip up out of the
   crate, one screen each. Desktop: a rail of lit, labelled cue pads that turns a pinned record (its
   label is the Camelot wheel) to the key under the needle, the phone in front showing the real
   screen, the copy on the right. Ground family and accent are the app's (src/index.css); the key
   colours are the app's palette "spin" (src/ui/keyColor.ts) as rgb triples, so a pad can be lit at
   any strength. Every colour, face, duration and radius is a token on :root. */

@property --bg { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --surface { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --surface-2 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --edge { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --fg { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --fg-2 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --acc { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --acc-ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --glow-c { syntax: "<color>"; inherits: true; initial-value: transparent; }
/* scrubbed counters: the initial value is the final frame, which is what the static page shows */
@property --bpm10 { syntax: "<integer>"; inherits: true; initial-value: 1748; }
@property --sec { syntax: "<integer>"; inherits: true; initial-value: 13; }
@property --db { syntax: "<integer>"; inherits: true; initial-value: -16; }

:root {
  color-scheme: dark;
  /* the app's dark slate and its one accent */
  --ink: #0f1419; --panel: #161c23; --raised: #1f2630; --line: #2c343f;
  --text: #e8edf2; --muted: #97a3b0; --faint: #66727f;
  --accent: #ff6a3d; --accent-ink: #1a0b05; --accent-rgb: 255 106 61;
  --ok: #6fd39a; --warn: #f2c14e; --bad: #ff5d5d;
  /* the app's light screen, "for daylight and outdoors": the labels chapter is label stock */
  --day: #eef1f4; --day-panel: #ffffff; --day-raised: #d8dfe6; --day-line: #c9d1d9;
  --day-text: #0f1419; --day-muted: #46525f; --day-accent: #c2410c; --day-accent-ink: #ffffff;
  /* objects */
  --vinyl: #07090b; --groove: #1e252e; --key-ink: #000000; --paper: #ffffff; --print: #000000;
  --text-rgb: 232 237 242; --ink-rgb: 15 20 25; --shade-rgb: 0 0 0;
  --shade: rgb(var(--shade-rgb) / 0.6); --shade-soft: rgb(var(--shade-rgb) / 0.28); --dim: rgb(var(--ink-rgb) / 0.66);
  --edge-hi: rgb(var(--text-rgb) / 0.06); --sheen: rgb(var(--text-rgb) / 0.07);
  /* Camelot key colours, palette "spin": hsl((n-1)*30+150, 70 % / 62 %, 56 % / 70 %) */
  --k1a: 64 221 143; --k1b: 131 226 179; --k2a: 64 221 221; --k2b: 131 226 226;
  --k3a: 64 143 221; --k3b: 131 179 226; --k4a: 64 64 221; --k4b: 131 131 226;
  --k5a: 143 64 221; --k5b: 179 131 226; --k6a: 221 64 221; --k6b: 226 131 226;
  --k7a: 221 64 143; --k7b: 226 131 179; --k8a: 221 64 64; --k8b: 226 131 131;
  --k9a: 221 143 64; --k9b: 226 179 131; --k10a: 221 221 64; --k10b: 226 226 131;
  --k11a: 143 221 64; --k11b: 179 226 131; --k12a: 64 221 64; --k12b: 131 226 131;
  /* faces: Archivo for what a sleeve would print, Inter for everything the app says */
  --display: "Archivo", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wide: 112%; --wider: 118%;
  /* time */
  --t-fast: 140ms; --t-state: 320ms; --t-theme: 600ms; --t-cue: 900ms; --t-glow: 900ms;
  --t-pad: 460ms; --t-step: 70ms; --t-rise: 1100ms; --t-delay: 160ms; --t-drop: 700ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* shape */
  --r-xs: 4px; --r-s: 8px; --r-m: 12px; --r-l: 18px; --r-pill: 999px; --r-sleeve: 6px;
  --r-phone: 38px; --r-screen: 30px; --r-label: 10px; --r-key: 10px; --r-chip: 11px; --r-btn: 14px;
  --r-kbig: 16px; --r-badge: 7px; --r-box: 9px; --r-round: 50%;
  --gutter: 16px; --strip-h: 62px; --measure: 60ch; --disc: 124px; --rec-gap: 104px;
  /* themed roles: dark by default, the light screen inside the labels chapter */
  --bg: var(--ink); --surface: var(--panel); --surface-2: var(--raised); --edge: var(--line);
  --fg: var(--text); --fg-2: var(--muted); --acc: var(--accent); --acc-ink: var(--accent-ink);
  --glow-c: rgb(var(--accent-rgb) / 0.42);
}

/* key classes carry their colour as --kc (wheel wedges) */
.k1a { --kc: var(--k1a); } .k1b { --kc: var(--k1b); } .k2a { --kc: var(--k2a); } .k2b { --kc: var(--k2b); }
.k3a { --kc: var(--k3a); } .k3b { --kc: var(--k3b); } .k4a { --kc: var(--k4a); } .k4b { --kc: var(--k4b); }
.k5a { --kc: var(--k5a); } .k5b { --kc: var(--k5b); } .k6a { --kc: var(--k6a); } .k6b { --kc: var(--k6b); }
.k7a { --kc: var(--k7a); } .k7b { --kc: var(--k7b); } .k8a { --kc: var(--k8a); } .k8b { --kc: var(--k8b); }
.k9a { --kc: var(--k9a); } .k9b { --kc: var(--k9b); } .k10a { --kc: var(--k10a); } .k10b { --kc: var(--k10b); }
.k11a { --kc: var(--k11a); } .k11b { --kc: var(--k11b); } .k12a { --kc: var(--k12a); } .k12b { --kc: var(--k12b); }

/* the light screen: the labels chapter always; the strip, rail and stage while it is cued */
.labels, html[data-cue="k2a"] .strip, html[data-cue="k2a"] .rail, html[data-cue="k2a"] .stage {
  --bg: var(--day); --surface: var(--day-panel); --surface-2: var(--day); --edge: var(--day-line);
  --fg: var(--day-text); --fg-2: var(--day-muted); --acc: var(--day-accent); --acc-ink: var(--day-accent-ink);
  --edge-hi: rgb(var(--shade-rgb) / 0.04); --dim: rgb(var(--shade-rgb) / 0.4);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--ink); color: var(--text); overflow-x: clip;
  -webkit-text-size-adjust: 100%; scrollbar-color: var(--raised) var(--ink);
  scroll-padding-top: var(--strip-h);
}
body { margin: 0; background: var(--ink); color: var(--text); font: 400 16.5px/1.55 var(--sans); overflow-x: clip; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent); color: var(--accent-ink); }
.labels ::selection { background: var(--day-accent); color: var(--day-accent-ink); }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 3px; border-radius: var(--r-s); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
p, figure, h1, h2, ul, ol { margin: 0; }
b { font-weight: 650; }
h1, h2 { font-family: var(--display); color: var(--fg); text-wrap: balance; }

.skip {
  position: fixed; z-index: 60; left: var(--gutter); top: -80px; padding: 12px 16px; border-radius: var(--r-m);
  background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none;
}
.skip:focus-visible { top: 12px; }

/* ---------- buttons, type ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 14px;
  border-radius: var(--r-btn); font: 700 15.5px/1.1 var(--sans); text-decoration: none; text-align: center; white-space: nowrap;
}
.btn-primary { background: var(--acc); color: var(--acc-ink); box-shadow: 0 14px 28px -16px rgb(var(--accent-rgb) / 0.9); }
.btn-primary:hover { background: color-mix(in srgb, var(--acc) 86%, var(--fg)); }
.btn-ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--edge); }
.btn-ghost:hover { border-color: var(--fg-2); }
.fine { font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.copy, .lead { max-width: var(--measure); color: var(--fg); }
.lead { font-size: 17px; line-height: 1.5; }
.copy b, .lead b { color: var(--fg); }
.more { display: inline-flex; align-items: center; min-height: 44px; color: var(--acc); font-weight: 650; text-decoration: underline; text-decoration-color: rgb(var(--accent-rgb) / 0.45); }
.more:hover { text-decoration-color: var(--acc); }

/* ---------- the strip: pinned key pads (phone and tablet) ---------- */
.strip {
  position: sticky; top: 0; z-index: 40; height: var(--strip-h);
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px; align-items: center;
  padding: 0 var(--gutter); background: var(--bg); border-bottom: 1px solid var(--edge);
}
.strip-home { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-round); }
.mini { width: 42px; height: 42px; overflow: visible; }
.mini-bg { fill: var(--surface); stroke: var(--edge); stroke-width: 3; }
.mini .w { fill: rgb(var(--kc) / 0.18); }
.mini .w.set { fill: rgb(var(--kc) / 0.6); }
.mini-hub { fill: var(--bg); stroke: var(--edge); stroke-width: 3; }
.mini-needle { transform: rotate(var(--needle, 0deg)); transform-origin: 0 0; }
.mini-needle path { fill: var(--acc); }
html:not([data-cue]) .mini-needle, html[data-cue="top"] .mini-needle { visibility: hidden; }
html[data-cue="k6a"] .mini .k6a, html[data-cue="k8a"] .mini .k8a, html[data-cue="k10a"] .mini .k10a,
html[data-cue="k12a"] .mini .k12a, html[data-cue="k2a"] .mini .k2a, html[data-cue="offer"] .mini .set { fill: rgb(var(--kc)); }

.chips { list-style: none; padding: 0; display: grid; gap: 4px; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.5fr); }
.chip {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 48px; padding: 0 2px; border-radius: var(--r-chip); text-decoration: none;
  background: rgb(var(--k) / 0.14); border: 1px solid rgb(var(--k) / 0.42); color: var(--fg);
}
.chip b { font: 800 15px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.chip span { font: 600 10.5px/1 var(--sans); color: var(--fg-2); white-space: nowrap; }
.chip.played { background: rgb(var(--k) / 0.32); }
.chip.played span { color: var(--fg); }
.chip:hover { border-color: rgb(var(--k)); }
.chip[aria-current] { background: rgb(var(--k)); border-color: rgb(var(--k)); color: var(--key-ink); box-shadow: 0 8px 18px -10px rgb(var(--k) / 0.9); }
.chip[aria-current] span { color: var(--key-ink); }
.chip-offer { --k: var(--accent-rgb); background: var(--surface); }
.chip-offer b { color: var(--acc); }
.chip-offer[aria-current] { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.chip-offer[aria-current] b, .chip-offer[aria-current] span { color: var(--acc-ink); }
/* on the light screen the orange price sits on white, not on an orange tint (5.2:1, not 3.8:1) */
html[data-cue="k2a"] .chip-offer, html[data-cue="k2a"] .pad-offer .pad-key { background: var(--day-panel); }

/* ---------- the rail and the stage exist on wide screens only ---------- */
.rail, .stage { display: none; }
.script { overflow-x: clip; }

/* ---------- the hero: the front of the crate ---------- */
.hero { position: relative; padding: 18px var(--gutter) 0; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.brand img { width: 40px; height: 40px; border-radius: var(--r-key); }
.brand b { display: block; font: 700 17px/1.2 var(--sans); color: var(--fg); }
.brand > span > span { display: block; font-size: 13.5px; line-height: 1.3; color: var(--fg-2); }
h1 { font-size: clamp(38px, calc(10.4vw / var(--vp-zoom, 1)), 76px); font-weight: 820; font-stretch: var(--wider); line-height: 0.93; letter-spacing: -0.03em; margin-bottom: 14px; }
.lede { font-size: 16.5px; line-height: 1.5; max-width: 34em; margin-bottom: 18px; color: var(--fg); }
.door { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; max-width: 520px; }
.price a {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-height: 44px; padding: 10px 0 2px;
  font-size: 14px; line-height: 1.45; color: var(--fg-2); text-decoration: none;
}
.price a:hover { color: var(--fg); }
.tag {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: var(--r-xs);
  border: 1px solid rgb(var(--accent-rgb) / 0.55); color: var(--acc); font: 700 11px/1.5 var(--sans);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.hero-phone { position: relative; margin: 22px calc(-1 * var(--gutter)) 0; height: 400px; overflow: hidden; display: flex; justify-content: center; }
.hero-phone .handset {
  width: 288px; height: max-content; padding: 8px 8px 0; border-radius: var(--r-phone) var(--r-phone) 0 0;
  background: var(--raised); border: 1px solid var(--line); border-bottom: 0; transform-origin: 50% 100%;
}
.hero-phone img { width: 100%; border-radius: var(--r-screen) var(--r-screen) 0 0; }
.crate-lip {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 44px; background: var(--panel);
  border-top: 1px solid var(--line); box-shadow: 0 -18px 30px -12px var(--shade), inset 0 1px 0 var(--edge-hi);
}
.crate-lip::after {
  content: ""; position: absolute; left: 50%; top: 12px; width: 88px; height: 16px; margin-left: -44px;
  border-radius: var(--r-pill); background: var(--ink); box-shadow: inset 0 2px 4px var(--shade);
}

/* ---------- a record: a sleeve with the vinyl showing its key and track ---------- */
.chap { position: relative; }
.rec { position: relative; margin: var(--rec-gap) var(--gutter) 0; scroll-margin-top: calc(var(--disc) * 0.72 + 12px); }
.chap > .rec:first-child { scroll-margin-top: calc(var(--disc) * 0.72 + 12px); }
.sleeve { position: relative; isolation: isolate; display: grid; gap: 18px; padding: 26px 18px 24px; transform-origin: 50% 100%; }
.sleeve::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: var(--r-sleeve);
  background: var(--surface); border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 30px 50px -34px var(--shade);
}
.sleeve::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: var(--r-sleeve); background: var(--ink); opacity: 0; pointer-events: none; }
.labels .sleeve::after { background: var(--day); }
.sleeve > :not(.vinyl) { position: relative; z-index: 1; min-width: 0; }
.vinyl {
  position: absolute; z-index: -1; top: calc(var(--disc) * -0.72); right: 14px; width: var(--disc); height: var(--disc);
  border-radius: var(--r-round); display: grid; place-items: center;
  background:
    conic-gradient(from 20deg, transparent 0 8%, var(--sheen) 14%, transparent 20% 54%, var(--sheen) 60%, transparent 66%),
    radial-gradient(circle, transparent 0 27%, var(--vinyl) 27.5% 31%, transparent 31.5%),
    repeating-radial-gradient(circle, var(--vinyl) 0 1.6px, var(--groove) 1.6px 2.6px);
  box-shadow: 0 10px 24px -10px var(--shade);
}
.vinyl > * { grid-area: 1 / 1; }
.vinyl b {
  width: 38%; aspect-ratio: 1; border-radius: var(--r-round); display: grid; place-items: center; padding-bottom: 8px;
  background: rgb(var(--k)); color: var(--key-ink); font: 800 14px/1 var(--sans); letter-spacing: -0.01em;
}
.vinyl small { transform: translateY(11px); font: 800 8.5px/1 var(--sans); color: var(--key-ink); letter-spacing: 0.08em; }
.rec h2 { font-size: clamp(30px, calc(8.4vw / var(--vp-zoom, 1)), 48px); font-weight: 780; font-stretch: var(--wide); line-height: 1; letter-spacing: -0.025em; }
.shot { display: grid; gap: 8px; }
.shot img { width: 100%; border-radius: var(--r-m); border: 1px solid var(--edge); background: var(--ink); }
.shot figcaption { font-size: 13.5px; color: var(--fg-2); }
.shot-tall img { width: min(100%, 360px); }
.shot-label img { width: min(100%, 420px); border: 0; box-shadow: 0 16px 30px -18px var(--shade); }
.shot-parts img { width: min(100%, 400px); }
.shot-wide { display: none; }
.facts { list-style: none; padding: 0; display: grid; border-top: 1px solid var(--edge); }
.facts li { display: grid; gap: 3px; padding: 13px 0; border-bottom: 1px solid var(--edge); color: var(--fg-2); font-size: 15.5px; }
.facts li > b { font: 720 17px/1.25 var(--display); font-stretch: var(--wide); color: var(--fg); letter-spacing: -0.01em; }
.facts span b { color: var(--fg); }

/* ---------- 6A · the listen: the groove, the label clock, the meter ---------- */
.groove-beat { display: grid; gap: 14px; }
.groove-wrap { position: relative; width: min(100%, 290px); aspect-ratio: 1; margin: 0 auto; }
.groove { width: 100%; height: 100%; }
.g-disc { fill: var(--vinyl); }
.g-track { fill: none; stroke: var(--groove); stroke-width: 1.5; }
.g-trace { fill: none; stroke: var(--acc); stroke-width: 1.7; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.g-label { fill: rgb(var(--k)); }
.g-sec {
  position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: calc(50% - 17px);
  font: 800 30px/1 var(--sans); color: var(--key-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.g-sec small { font-size: 15px; margin-left: 2px; }
.meter { padding: 11px 13px 9px; border-radius: var(--r-m); border: 1px solid var(--edge); background: var(--bg); }
.m-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--fg-2); }
.m-word { display: grid; }
.m-word > span { grid-area: 1 / 1; }
.m-q { visibility: hidden; }
.m-db { color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-track { position: relative; display: block; height: 12px; margin: 8px 0 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.m-zone { position: absolute; top: 0; bottom: 0; left: 50%; width: 36.7%; background: color-mix(in srgb, var(--ok) 12%, transparent); }
.m-fill {
  position: absolute; inset: 0; border-radius: var(--r-pill); transform-origin: 0 50%;
  transform: scaleX(calc((var(--db) + 60) / 60)); background: linear-gradient(to right, var(--ok), var(--ok) 55%, var(--warn));
}
.m-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--fg-2); font-variant-numeric: tabular-nums; }

/* ---------- 8A · the read, as a poster ---------- */
.read-beat { display: grid; gap: 14px; }
.ro-l { display: block; font: 650 12px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 8px; }
.ro-bpm { display: grid; }
.bpm { display: block; font: 800 clamp(84px, calc(27vw / var(--vp-zoom, 1)), 168px)/0.84 var(--sans); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; color: var(--fg); margin-left: -0.04em; }
.ro-key { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 14px; }
.ro-key .ro-l { grid-column: 1 / -1; }
.kbig { display: grid; place-items: center; padding: 6px 14px; border-radius: var(--r-kbig); background: rgb(var(--k)); color: var(--key-ink); font: 800 clamp(48px, calc(14vw / var(--vp-zoom, 1)), 84px)/1 var(--sans); letter-spacing: -0.03em; }
.ro-alt { display: grid; gap: 6px; }
.mus { font: 650 22px/1 var(--sans); color: var(--fg); }
.alts { font-size: 14px; color: var(--fg-2); white-space: nowrap; }
.kb { display: inline-grid; place-items: center; min-width: 34px; padding: 3px 6px; border-radius: var(--r-badge); background: rgb(var(--k)); color: var(--key-ink); font: 800 13px/1.15 var(--sans); font-style: normal; font-variant-numeric: tabular-nums; }
.ro-note { padding-top: 12px; border-top: 1px solid var(--edge); font-size: 14.5px; color: var(--fg); }
.ro-note .dot { color: var(--fg-2); }
.w-warn { color: var(--warn); font-weight: 600; }
.w-bad { color: var(--bad); font-weight: 600; }

/* ---------- 10A · the proof: emphasis bars, every condition labelled ---------- */
.bars-beat { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-l); background: var(--bg); border: 1px solid var(--edge); }
.bars-beat figcaption { font-size: 14px; color: var(--fg-2); }
.bars-beat figcaption b { color: var(--fg); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--fg-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 18px; height: 10px; border-radius: 0 var(--r-xs) var(--r-xs) 0; display: inline-block; }
.sw-x { background: var(--accent); }
.sw-m { background: color-mix(in srgb, var(--accent) 62%, var(--panel)); }
.bars { list-style: none; padding: 0; display: grid; gap: 11px; }
.bar { --ex: var(--muted); --mx: color-mix(in srgb, var(--muted) 58%, var(--panel)); display: grid; gap: 5px; }
.bar.me { --ex: var(--accent); --mx: color-mix(in srgb, var(--accent) 62%, var(--panel)); }
.who { font-size: 14px; line-height: 1.35; color: var(--fg); }
.who b { font-weight: 650; }
.track { position: relative; display: block; height: 14px; border-radius: 0 var(--r-xs) var(--r-xs) 0; background: var(--surface); }
.fm, .fx { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 0 var(--r-xs) var(--r-xs) 0; transform-origin: 0 50%; }
.fm { width: calc(var(--m) * 1%); background: var(--mx); }
.fx { width: calc(var(--x) * 1%); background: var(--ex); box-shadow: 2px 0 0 var(--bg); }
.val { font: 650 14px/1.2 var(--sans); color: var(--fg); font-variant-numeric: tabular-nums; }
.stat { display: grid; gap: 6px; max-width: var(--measure); color: var(--fg); }
.stat .big { font: 800 clamp(64px, calc(19vw / var(--vp-zoom, 1)), 104px)/0.86 var(--sans); letter-spacing: -0.045em; color: var(--acc); }

/* ---------- 12A · the crate: rows land, the wheel answers a tap ---------- */
.crate-beat { display: grid; gap: 8px; }
.cr-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: var(--r-m); border: 1px solid var(--edge); background: var(--bg); }
.cr-name { display: grid; font: 700 19px/1.2 var(--sans); color: var(--fg); }
.cr-name small { font: 650 11px/1.4 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-2); }
.cr-n { font: 600 17px var(--sans); color: var(--fg-2); }
.cr-rows { list-style: none; padding: 0; overflow: clip; }
.cr-rows li { display: grid; grid-template-columns: 14px 40px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 2px; }
.pos { font-size: 12.5px; color: var(--fg-2); text-align: right; font-variant-numeric: tabular-nums; }
.disc {
  width: 40px; height: 40px; border-radius: var(--r-key);
  background: radial-gradient(circle, rgb(var(--k)) 0 14%, var(--vinyl) 15% 17%, transparent 18%), repeating-radial-gradient(circle, var(--vinyl) 0 1.2px, var(--raised) 1.2px 2.8px);
}
.meta { display: grid; min-width: 0; }
.meta b { font-weight: 650; font-size: 15.5px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta small { font-size: 13px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb { font: 700 17px var(--sans); color: var(--fg); font-variant-numeric: tabular-nums; }
.cr-rows .kb { min-width: 44px; padding: 6px 8px; font-size: 15px; border-radius: var(--r-s); }
.mix-beat { display: grid; gap: 10px; justify-items: center; }
.mix { width: min(100%, 322px); }
.mix .w path { fill: rgb(var(--kc) / 0.1); stroke: transparent; stroke-width: 1.4; stroke-linejoin: round; }
.mix .w text { fill: var(--fg-2); font-family: var(--sans); font-weight: 650; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.mix .w .wc { font-size: 7px; font-weight: 700; }
.mix .w.lit path { fill: rgb(var(--kc)); }
.mix .w.lit text { fill: var(--key-ink); }
.mix .w.near path { stroke: rgb(var(--text-rgb) / 0.75); stroke-dasharray: 3 2; }
.mix .w.picked path { stroke: var(--fg); stroke-width: 2.2; stroke-dasharray: none; }
.mix .w:focus { outline: none; }
.mix .w:focus-visible path { stroke: var(--acc); stroke-width: 3; stroke-dasharray: none; }
html.js .mix .w { cursor: pointer; }
html.js .mix .w:hover path { stroke: var(--fg); }
.mix .hub { fill: var(--surface); stroke: var(--edge); stroke-width: 1; }
.mix .hub-l { font: 400 7px var(--sans); letter-spacing: 1px; fill: var(--fg-2); text-anchor: middle; }
.mix .hub-n { font: 700 14px var(--sans); fill: var(--fg); text-anchor: middle; dominant-baseline: central; }
.mix-say { max-width: 34em; min-height: 3em; text-align: center; font-size: 14.5px; color: var(--fg); }

/* ---------- 2A · labels: label stock ---------- */
.labels { background: var(--day); color: var(--day-text); padding: 1px 0 72px; margin-top: 88px; border-top: 1px solid var(--day-line); }
.labels .vinyl { box-shadow: 0 10px 24px -12px var(--shade-soft); }
.labels .sleeve::before { box-shadow: 0 30px 50px -36px var(--shade-soft); }
.build { display: grid; justify-items: center; gap: 14px; padding-top: 10px; }
.lbl {
  position: relative; width: min(100%, 300px); aspect-ratio: 4 / 3; padding: 11px 12px; border-radius: var(--r-label);
  background: var(--paper); color: var(--print); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 3fr 2fr 2fr 3fr;
  align-items: center; gap: 5px 8px; box-shadow: 0 1px 0 var(--day-line), 0 24px 40px -24px var(--shade-soft), inset 0 0 0 1px var(--day-line);
}
.p { position: relative; display: block; font-family: var(--sans); text-align: center; }
.p::before {
  content: attr(data-n); position: absolute; left: -6px; top: -4px; width: 20px; height: 20px; border-radius: var(--r-round);
  display: grid; place-items: center; background: var(--day-accent); color: var(--day-accent-ink); font: 800 11px/1 var(--sans); letter-spacing: 0;
}
.p-key { font: 800 50px/0.9 var(--sans); letter-spacing: -0.03em; }
.p-key::before { left: -2px; top: -2px; }
.p-bpm, .p-pos { align-self: stretch; display: grid; place-items: center; border-radius: var(--r-box); background: var(--print); color: var(--paper); font: 800 40px/1 var(--sans); letter-spacing: -0.03em; }
.p-artist { grid-column: 1 / -1; font: 600 18px/1.05 var(--sans); letter-spacing: 0.01em; }
.p-title { grid-column: 1 / -1; font: 500 13px/1.15 var(--sans); }
.p-pos { grid-column: 1 / -1; font-size: 22px; letter-spacing: 0.02em; }
.parts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 13.5px; color: var(--fg); }
.parts li { display: inline-flex; align-items: center; gap: 6px; }
.parts i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: var(--r-round); background: var(--day-accent); color: var(--day-accent-ink); font: 800 11px/1 var(--sans); font-style: normal; }
.build figcaption { text-align: center; }

.printer { display: grid; justify-items: center; padding-top: 4px; }
.printer-body {
  position: relative; z-index: 2; width: min(78%, 250px); height: 54px; border-radius: var(--r-l) var(--r-l) var(--r-key) var(--r-key);
  background: var(--day-text); box-shadow: 0 14px 24px -14px var(--shade);
}
.printer-body .slot { position: absolute; left: 14%; right: 14%; bottom: 10px; height: 6px; border-radius: var(--r-pill); background: var(--vinyl); box-shadow: inset 0 2px 2px var(--shade); }
.printer-body .led { position: absolute; right: 18px; top: 14px; width: 8px; height: 8px; border-radius: var(--r-round); background: var(--day-accent); }
.feed { position: relative; z-index: 1; width: 160px; margin-top: -10px; overflow: hidden; padding: 0 12px 20px; }
.feed img { width: 100%; border-radius: 0 0 var(--r-s) var(--r-s); box-shadow: 0 0 0 1px var(--day-line), 0 18px 26px -16px var(--shade-soft); background: var(--paper); }
.printer figcaption { margin-top: 10px; max-width: 30em; text-align: center; }

.sizes-beat { display: grid; gap: 12px; }
.sizes { --mm: 2.2px; list-style: none; padding: 4px 0 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 16px; }
.sizes li { display: grid; gap: 3px; font-size: 13px; color: var(--fg-2); }
.sizes li b { font-size: 14px; color: var(--fg); font-weight: 650; }
.blank {
  display: grid; grid-template-rows: var(--rows); gap: calc(var(--mm) * 0.8); width: calc(var(--w) * var(--mm)); height: calc(var(--h) * var(--mm));
  padding: calc(var(--mm) * 1.5); border-radius: calc(var(--mm) * 1.2); background: var(--paper); color: var(--print);
  box-shadow: 0 0 0 1px var(--day-line), 0 12px 20px -14px var(--shade-soft); margin-bottom: 6px;
}
.blank-cut { box-shadow: 0 0 0 1px var(--day-line), inset 0 0 0 calc(var(--mm) * 0.5) var(--day-raised), 0 12px 20px -14px var(--shade-soft); }
.blank-qr { grid-template-columns: 1fr calc(16 * var(--mm)); grid-template-rows: 1fr; }
.s-rows { display: grid; grid-template-rows: var(--rows); gap: calc(var(--mm) * 0.8); min-width: 0; }
.sr { display: flex; gap: calc(var(--mm) * 0.8); min-height: 0; align-items: stretch; justify-content: center; }
.sr > i { flex: 1 1 0; min-width: 0; display: grid; place-items: center; font: 800 calc(var(--mm) * 5.6)/1 var(--sans); font-style: normal; letter-spacing: -0.03em; overflow: hidden; white-space: nowrap; }
.sr .s-inv { background: var(--print); color: var(--paper); border-radius: calc(var(--mm) * 0.8); }
.sr .s-w2 { flex-grow: 2; }
.sr .s-out { box-shadow: inset 0 0 0 calc(var(--mm) * 0.45) var(--print); border-radius: calc(var(--mm) * 0.8); }
.sr .s-line { align-self: center; height: calc(var(--mm) * 1.3); background: var(--day-muted); border-radius: var(--r-pill); flex: 0 1 82%; }
.sr .s-bold { background: var(--print); }
.sr .s-thin { height: calc(var(--mm) * 0.9); }
.sr .s-short { flex-basis: 58%; }
.sr .s-small { font-size: calc(var(--mm) * 3.6); flex: 0 0 auto; }
.sr-left { justify-content: flex-start; }
.sr-split { justify-content: space-between; align-items: center; }
.s-qr {
  align-self: center; aspect-ratio: 1; border-radius: calc(var(--mm) * 0.4);
  background:
    linear-gradient(var(--paper), var(--paper)) 50% 50% / 30% 30% no-repeat,
    conic-gradient(var(--print) 25%, var(--paper) 0 50%, var(--print) 0 75%, var(--paper) 0) 0 0 / 22% 22%;
  box-shadow: inset 0 0 0 calc(var(--mm) * 0.9) var(--print);
}
.ways { list-style: none; padding: 0; display: grid; border-top: 1px solid var(--edge); }
.ways li { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--edge); font-size: 15px; }
.ways b { font: 700 16px/1.3 var(--sans); color: var(--fg); }
.ways span { color: var(--fg-2); }

/* ---------- $39 · the offer, printed as three labels ---------- */
.offer { padding: 96px var(--gutter) 40px; scroll-margin-top: 0; }
.offer h2 { font-size: clamp(36px, calc(10vw / var(--vp-zoom, 1)), 64px); font-weight: 820; font-stretch: var(--wider); line-height: 0.95; letter-spacing: -0.03em; }
.ill { display: flex; align-items: center; gap: 10px; margin-top: 14px; font: 700 17px/1.35 var(--sans); color: var(--fg); }
.ill::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: var(--r-round); background: var(--acc); }
.tiers { list-style: none; margin-top: 30px; padding: 0; display: grid; gap: 30px; }
.tier { display: grid; grid-template-rows: 1fr auto; }
.plabel {
  display: grid; grid-template-rows: auto auto 1fr; gap: 6px; padding: 14px 14px 14px; border-radius: var(--r-label);
  background: var(--paper); color: var(--print); transform: rotate(var(--tilt));
  box-shadow: 0 2px 0 var(--shade-soft), 0 26px 40px -26px var(--shade);
}
.pl-row { display: flex; gap: 10px; align-items: stretch; }
.pl-big { font: 820 clamp(50px, calc(15vw / var(--vp-zoom, 1)), 72px)/0.95 var(--sans); letter-spacing: -0.04em; }
.pl-box { flex: 1; display: grid; place-items: center; padding: 6px 10px; border-radius: var(--r-box); background: var(--print); color: var(--paper); font: 800 17px/1.1 var(--sans); letter-spacing: 0.02em; text-transform: uppercase; text-align: center; }
.pl-name { font: 650 22px/1.1 var(--sans); text-transform: uppercase; letter-spacing: 0.01em; text-align: center; }
.pl-terms { font: 500 13.5px/1.3 var(--sans); text-transform: uppercase; text-align: center; color: var(--print); }
.tier .btn { margin-top: 14px; }
/* the tester button and the app beside it (2026-10-20): side by side while they fit, else stacked, tester first */
.tier-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tier-btns .btn { flex: 1 1 auto; margin-top: 0; }
.btn-app { background: transparent; }
.offer-fine { margin-top: 26px; }
.door-end { margin-top: 18px; grid-template-columns: 1fr; max-width: 520px; }

/* ---------- footer ---------- */
.foot { padding: 64px var(--gutter) 76px; border-top: 1px solid var(--line); margin-top: 48px; display: grid; gap: 16px; }
.strap { font: 820 clamp(34px, calc(9.6vw / var(--vp-zoom, 1)), 72px)/0.96 var(--display); font-stretch: var(--wider); letter-spacing: -0.03em; color: var(--text); }
.set { font-size: 15px; color: var(--muted); max-width: 40em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; color: var(--text); text-decoration-color: var(--line); }
.foot-links a:hover { text-decoration-color: var(--accent); }

/* =====================================================================================
   TABLET (768–1179): the phone's architecture opened up. The strip names each chapter in
   full, the hero sets the copy beside the crate, each record is a wider sleeve.
   ===================================================================================== */
@media (min-width: 768px) {
  :root { --gutter: 32px; --strip-h: 66px; --disc: 156px; --rec-gap: 136px; }
  .chips { gap: 6px; }
  .chip { flex-direction: row; gap: 8px; }
  .chip b { font-size: 16px; }
  .chip span { font-size: 13px; }
  .btn { padding: 0 20px; font-size: 16.5px; }
  .hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); column-gap: 32px; padding-top: 32px; }
  h1 { font-size: clamp(44px, calc(6.2vw / var(--vp-zoom, 1)), 68px); }
  .hero > :not(.hero-phone) { grid-column: 1; }
  .hero-phone { grid-column: 2; grid-row: 1 / span 6; align-self: end; height: 560px; margin: 0 calc(-1 * var(--gutter)) 0 0; }
  .hero-phone .handset { width: 300px; }
  .rec { max-width: 760px; margin-left: auto; margin-right: auto; padding: 0 var(--gutter); }
  .rec .sleeve { padding: 34px 30px 30px; }
  .groove-beat { grid-template-columns: 290px minmax(0, 1fr); align-items: center; column-gap: 28px; }
  .groove-beat figcaption { grid-column: 1 / -1; }
  .offer, .foot { max-width: 820px; margin-left: auto; margin-right: auto; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .tiers .tier:last-child { grid-column: 1 / -1; width: calc(50% - 15px); justify-self: center; }
  .door-end { grid-template-columns: 1.2fr 1fr 1fr; max-width: none; }
  .shot-wide { display: grid; }
}

/* =====================================================================================
   DESKTOP (≥ 1180): the strip becomes a rail of cue pads on the left; a pinned stage in the
   centre (the record turns the cued key under the needle, the phone shows the real screen);
   the copy on the right.
   ===================================================================================== */
@media (min-width: 1180px) {
  :root {
    --gutter: 0px; --strip-h: 0px; --rec-gap: 0px;
    --rail-w: clamp(244px, calc(18.5vw / var(--vp-zoom, 1)), 290px); --pane-w: clamp(430px, calc(38vw / var(--vp-zoom, 1)), 600px);
    --pad-h: clamp(46px, calc(6.6vh / var(--vp-zoom, 1)), 60px); --pad-gap: clamp(6px, calc(1.1vh / var(--vp-zoom, 1)), 10px);
    --deck: min(calc(var(--pane-w) - 44px), calc(calc(100vh / var(--vp-zoom, 1)) - 190px));
    --phone-w: min(calc(var(--deck) * 0.47), calc((calc(100vh / var(--vp-zoom, 1)) - 230px) * 0.462));
    --col-l: clamp(32px, calc(3.6vw / var(--vp-zoom, 1)), 60px); --col-r: clamp(36px, calc(4.4vw / var(--vp-zoom, 1)), 76px);
  }
  html { scroll-padding-top: 0; }
  body { font-size: 17px; }
  .strip { display: none; }
  .page { display: grid; grid-template-columns: var(--rail-w) var(--pane-w) minmax(0, 1fr); align-items: start; }

  /* the rail of cue pads */
  .rail {
    grid-column: 1; grid-row: 1; position: sticky; top: 0; height: calc(100vh / var(--vp-zoom, 1)); z-index: 5;
    display: flex; flex-direction: column; gap: 18px; padding: 26px 20px 24px 24px;
    background: var(--bg); border-right: 1px solid var(--edge); color: var(--fg);
  }
  .rail-brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; color: var(--fg); }
  .rail-brand img { width: 40px; height: 40px; border-radius: var(--r-key); }
  .rail-brand b { display: block; font: 700 17px/1.2 var(--sans); }
  .rail-brand small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--fg-2); }
  .pads { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
  .pads-hint { margin: 0 0 12px 18px; font-size: 13px; color: var(--fg-2); }
  .pads ol { position: relative; list-style: none; padding: 0 0 0 18px; display: grid; gap: var(--pad-gap); }
  .pads ol::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; border-radius: var(--r-pill); background: var(--edge); }
  .pad {
    position: relative; display: grid; grid-template-columns: calc(var(--pad-h) - 8px) minmax(0, 1fr); align-items: center; gap: 12px;
    min-height: var(--pad-h); padding: 4px 10px 4px 4px; border-radius: var(--r-btn); text-decoration: none; color: var(--fg);
    background: var(--surface); border: 1px solid var(--edge);
  }
  .pad-key {
    display: grid; place-items: center; height: calc(var(--pad-h) - 10px); border-radius: var(--r-key);
    background: linear-gradient(rgb(var(--k) / 0.24), rgb(var(--k) / 0.12)); color: var(--fg); font: 800 16px/1 var(--sans); font-variant-numeric: tabular-nums;
    box-shadow: inset 0 0 0 1px rgb(var(--k) / 0.45);
  }
  .pad-txt { display: grid; min-width: 0; }
  .pad-txt b { font: 720 16px/1.15 var(--display); font-stretch: var(--wide); letter-spacing: -0.01em; }
  .pad-txt small { font-size: 12.5px; line-height: 1.3; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pad:hover { border-color: rgb(var(--k) / 0.8); }
  .pad:hover .pad-key { background: rgb(var(--k) / 0.36); }
  .pad.played .pad-key { background: rgb(var(--k) / 0.36); }
  .pad[aria-current] { border-color: rgb(var(--k)); background: linear-gradient(90deg, rgb(var(--k) / 0.16), var(--surface) 72%); }
  .pad[aria-current] .pad-key { background: linear-gradient(rgb(var(--k)), color-mix(in srgb, rgb(var(--k)) 84%, var(--key-ink))); color: var(--key-ink); box-shadow: 0 8px 18px -8px rgb(var(--k) / 0.95); }
  .pad:active { transform: translateY(1px); }
  .pad-offer { --k: var(--accent-rgb); }
  .pad-offer .pad-key, .pad-offer:hover .pad-key { background: var(--surface-2); color: var(--acc); font-size: 15px; box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.55); }
  .pad-offer[aria-current] { border-color: var(--acc); background: linear-gradient(90deg, rgb(var(--accent-rgb) / 0.16), var(--surface) 72%); }
  .pad-offer[aria-current] .pad-key { background: var(--acc); color: var(--acc-ink); }
  .rail-marker {
    position: absolute; left: -1px; top: 0; width: 12px; height: 12px; border-radius: var(--r-round); background: var(--acc);
    box-shadow: 0 0 0 3px var(--bg); transform: translateY(var(--marker-y, -40px)); visibility: hidden;
  }
  html.js[data-cue]:not([data-cue="top"]) .rail-marker { visibility: visible; }
  .rail-door { display: grid; gap: 4px; }
  .rail-door .btn { min-height: 48px; font-size: 15.5px; }
  .rail-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--fg-2); }
  .rail-link:hover { color: var(--fg); }

  /* the stage: a record whose label is the wheel, cued to the chapter's key under the needle */
  html.js .stage {
    display: block; grid-column: 2; grid-row: 1; position: sticky; top: 0; height: calc(100vh / var(--vp-zoom, 1)); overflow: hidden;
    background: var(--bg); border-right: 1px solid var(--edge);
  }
  /* 100dvh only where it parses: inside calc(… / var()) an unknown unit would void the height, not fall back to vh */
  @supports (height: 100dvh) { .rail, html.js .stage { height: calc(100dvh / var(--vp-zoom, 1)); } }
  .glow { position: absolute; inset: 0; background: radial-gradient(closest-side at 58% 44%, var(--glow-c), transparent 82%); }
  .deck { position: absolute; left: 50%; top: 44%; width: var(--deck); height: var(--deck); transform: translate(-50%, -50%); }
  .platter {
    position: absolute; inset: 0; border-radius: var(--r-round);
    background:
      conic-gradient(from 30deg, transparent 0 9%, var(--sheen) 14%, transparent 20% 59%, var(--sheen) 64%, transparent 70%),
      radial-gradient(circle, transparent 0 35.4%, var(--vinyl) 35.6% 36.6%, transparent 37%),
      repeating-radial-gradient(circle, var(--vinyl) 0 2.2px, var(--groove) 2.2px 3.6px);
    box-shadow: 0 0 0 1px var(--line), 0 40px 70px -30px var(--shade);
  }
  .ring { position: absolute; inset: 14.5%; width: 71%; height: 71%; overflow: visible; }
  .ring .turn { transform: rotate(var(--turn, 0deg)); transform-origin: 0 0; }
  .ring .w { fill: rgb(var(--kc) / 0.16); stroke: var(--vinyl); stroke-width: 1; }
  .ring .w.set { fill: rgb(var(--kc) / 0.42); }
  .ring .wl {
    fill: var(--muted); font-family: var(--sans); font-weight: 650; font-size: 8px; text-anchor: middle; dominant-baseline: central;
    transform-box: fill-box; transform-origin: center; transform: rotate(calc(-1 * var(--turn, 0deg)));
  }
  .ring .wl.set { fill: var(--text); }
  html[data-cue="k6a"] .ring .w.k6a, html[data-cue="k8a"] .ring .w.k8a, html[data-cue="k10a"] .ring .w.k10a,
  html[data-cue="k12a"] .ring .w.k12a, html[data-cue="k2a"] .ring .w.k2a, html[data-cue="offer"] .ring .w.set { fill: rgb(var(--kc)); }
  html[data-cue="k6a"] .ring .wl.k6a, html[data-cue="k8a"] .ring .wl.k8a, html[data-cue="k10a"] .ring .wl.k10a,
  html[data-cue="k12a"] .ring .wl.k12a, html[data-cue="k2a"] .ring .wl.k2a, html[data-cue="offer"] .ring .wl.set { fill: var(--key-ink); font-weight: 800; }
  .ring-hub { fill: var(--panel); stroke: var(--line); stroke-width: 0.8; }
  .ring-hole { fill: var(--vinyl); }
  .arm { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 1; }
  .arm-base { fill: var(--raised); stroke: var(--line); stroke-width: 0.3; }
  .arm-pivot { fill: var(--line); }
  .arm-swing { transform-origin: 94px 5px; }
  .arm-tube { fill: none; stroke: var(--muted); stroke-width: 0.6; stroke-linecap: round; }
  .arm-head { fill: none; stroke: var(--text); stroke-width: 1.2; stroke-linecap: round; }
  .arm-led { fill: var(--accent); }
  .stage .handset {
    position: absolute; z-index: 2; width: var(--phone-w); left: calc(34% - var(--phone-w) / 2); top: 50%; transform: translateY(-50%);
    padding: 7px; border-radius: var(--r-phone); background: var(--raised); border: 1px solid var(--line);
    box-shadow: 0 50px 80px -34px var(--shade), inset 0 1px 0 var(--edge-hi);
  }
  .screen { position: relative; aspect-ratio: 390 / 844; border-radius: var(--r-screen); overflow: hidden; background: var(--ink); }
  .sc { position: absolute; left: 0; top: 0; width: 100%; opacity: 0; }
  html:not([data-shot]) .sc-crate7, html[data-shot="crate7"] .sc-crate7, html[data-shot="offer"] .sc-crate7,
  html[data-shot^="scan"] .sc-scan, html[data-shot="crate3"] .sc-crate3, html[data-shot="sheet"] .sc-sheet,
  html[data-shot="print"] .sc-sheet, html[data-shot="designs"] .sc-sheet, html[data-shot="designer"] .sc-designer,
  html[data-shot="qr"] .sc-qr, html[data-shot="printer"] .sc-printer, html[data-shot="phomemo"] .sc-printer { opacity: 1; }
  .spot {
    position: absolute; left: 3%; right: 3%; top: var(--st, 30%); height: var(--sh, 20%); border-radius: var(--r-btn); opacity: 0;
    box-shadow: 0 0 0 2px var(--accent), 0 0 0 1200px var(--dim);
  }
  html[data-shot="scan-meter"] .spot { --st: 8.4%; --sh: 15.6%; opacity: 1; }
  html[data-shot="scan-read"] .spot { --st: 24.6%; --sh: 33.4%; opacity: 1; }
  html[data-shot="scan-note"] .spot { --st: 42.4%; --sh: 6.8%; opacity: 1; }
  html[data-shot="designs"] .spot { --st: 39.2%; --sh: 26.6%; opacity: 1; }
  html[data-shot="printer"] .spot { --st: 39.2%; --sh: 36.2%; opacity: 1; }
  html[data-shot="phomemo"] .spot { --st: 75.3%; --sh: 7.8%; opacity: 1; }
  .readout { position: absolute; left: 24px; right: 24px; bottom: calc(3.4vh / var(--vp-zoom, 1)); display: grid; justify-items: center; text-align: center; }
  .readout p { display: none; }
  .readout b { display: inline-flex; align-items: center; gap: 8px; font: 720 15px/1.3 var(--display); font-stretch: var(--wide); color: var(--fg); }
  .readout span { display: block; margin-top: 4px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
  .readout .kb { font-size: 12.5px; }
  .kb-offer { background: var(--acc); color: var(--acc-ink); }
  html:not([data-shot]) .readout [data-for="crate7"], html[data-shot="crate7"] .readout [data-for="crate7"],
  html[data-shot="scan-meter"] .readout [data-for="scan-meter"], html[data-shot="scan-read"] .readout [data-for="scan-read"],
  html[data-shot="scan-note"] .readout [data-for="scan-note"], html[data-shot="crate3"] .readout [data-for="crate3"],
  html[data-shot="sheet"] .readout [data-for="sheet"], html[data-shot="print"] .readout [data-for="sheet"],
  html[data-shot="designer"] .readout [data-for="designer"], html[data-shot="qr"] .readout [data-for="qr"],
  html[data-shot="printer"] .readout [data-for="printer"], html[data-shot="offer"] .readout [data-for="offer"],
  html[data-shot="designs"] .readout [data-for="designs"], html[data-shot="phomemo"] .readout [data-for="phomemo"] { display: block; }
  .readout .ro-test { margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--fg-2); }
  html[data-shot="sheet"] .readout .ro-test, html[data-shot="print"] .readout .ro-test, html[data-shot="designs"] .readout .ro-test,
  html[data-shot="designer"] .readout .ro-test, html[data-shot="qr"] .readout .ro-test { display: block; }
  /* the backlight takes the colour of the key under the needle */
  html[data-cue="k6a"] .stage { --glow-c: rgb(var(--k6a) / 0.42); }
  html[data-cue="k8a"] .stage { --glow-c: rgb(var(--k8a) / 0.45); }
  html[data-cue="k10a"] .stage { --glow-c: rgb(var(--k10a) / 0.32); }
  html[data-cue="k12a"] .stage { --glow-c: rgb(var(--k12a) / 0.34); }
  html[data-cue="k2a"] .stage { --glow-c: rgb(var(--k2a) / 0.5); }
  html[data-cue="offer"] .stage { --glow-c: rgb(var(--accent-rgb) / 0.55); }

  /* the script */
  .script { grid-column: 3; grid-row: 1; min-width: 0; padding: 0 var(--col-r) 0 var(--col-l); }
  html:not(.js) .script { grid-column: 2 / 4; max-width: 920px; }
  html.js .dup { display: none; }
  .hero { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh / var(--vp-zoom, 1)); padding: calc(9vh / var(--vp-zoom, 1)) 0; }
  .hero .brand { display: none; }
  html:not(.js) .hero .brand { display: flex; }
  h1 { font-size: clamp(48px, calc(4.6vw / var(--vp-zoom, 1)), 80px); margin-bottom: 22px; }
  .lede { font-size: 18.5px; margin-bottom: 26px; }
  .door { max-width: 470px; }
  .price a { font-size: 14.5px; }
  .hero-phone { align-self: stretch; height: 420px; margin: 24px 0 0; }

  .chap { padding: calc(13vh / var(--vp-zoom, 1)) 0 calc(2vh / var(--vp-zoom, 1)); }
  .rec { max-width: none; margin: 0; padding: 0; scroll-margin-top: 0; }
  .rec + .rec { margin-top: 64px; }
  .chap > .rec:first-child { scroll-margin-top: 0; }
  .rec .sleeve { padding: 0; gap: 20px; }
  .sleeve::before, .sleeve::after, .vinyl { display: none; }
  .rec h2 { font-size: clamp(36px, calc(3.1vw / var(--vp-zoom, 1)), 52px); }
  .rec + .rec h2 { font-size: clamp(28px, calc(2.3vw / var(--vp-zoom, 1)), 38px); }
  .lead { font-size: 18px; }
  .groove-beat { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); align-items: center; column-gap: 28px; }
  .groove-beat figcaption { grid-column: 1 / -1; }
  .bpm { font-size: clamp(104px, calc(9vw / var(--vp-zoom, 1)), 168px); }
  .read-beat { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 30px; }
  .ro-note, .read-beat figcaption { flex: 1 0 100%; }
  .crate-beat + .mix-beat { margin-top: 4px; }
  .labels { margin: 0 calc(-1 * var(--col-r)) 0 calc(-1 * var(--col-l)); padding: calc(13vh / var(--vp-zoom, 1)) var(--col-r) calc(12vh / var(--vp-zoom, 1)) var(--col-l); border-top: 0; }
  .sizes { --mm: 2.5px; }
  .ways { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .offer { max-width: none; padding: calc(14vh / var(--vp-zoom, 1)) 0 calc(6vh / var(--vp-zoom, 1)); }
  .offer h2 { font-size: clamp(48px, calc(4.4vw / var(--vp-zoom, 1)), 76px); }
  .tiers { grid-template-columns: minmax(0, 1fr); max-width: 500px; gap: 26px; }
  .tiers .tier:last-child { grid-column: auto; width: auto; }
  .pl-big { font-size: clamp(46px, calc(4vw / var(--vp-zoom, 1)), 60px); }
  .door-end { display: flex; flex-wrap: wrap; gap: 8px; max-width: none; }
  .door-end .btn { flex: 1 1 auto; }
  .foot { max-width: none; padding: calc(10vh / var(--vp-zoom, 1)) 0 calc(8vh / var(--vp-zoom, 1)); margin-top: 0; }
  .strap { font-size: clamp(44px, calc(4vw / var(--vp-zoom, 1)), 72px); }
}
@media (min-width: 1400px) {
  .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; gap: 22px; }
  .plabel { padding: 12px; }
  .pl-row { flex-direction: column; gap: 8px; }
  .pl-big { font-size: clamp(40px, calc(3.3vw / var(--vp-zoom, 1)), 54px); text-align: center; }
  .pl-box { font-size: 14px; padding: 7px 8px; }
  .pl-name { font-size: 17px; }
  .pl-terms { font-size: 12px; }
  .tier .btn { font-size: 15px; min-height: 48px; }
  /* three across: the tiers share rows (label · button · the app under the free tier's tester), so the
     tester sits on the same line as "I'd own it" and "I'd pay monthly" and the app hangs below it */
  .tiers { row-gap: 0; }
  .tier { grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
  .tier-btns { display: contents; }
  .tier-btns .btn:first-child { margin-top: 14px; }
  .tier-btns .btn-app { margin-top: 8px; }
}
@media (min-width: 1180px) and (max-height: 760px) {
  .pads-hint, .pad-txt small { display: none; }
  .rail { gap: 12px; padding-top: 18px; padding-bottom: 16px; }
}

/* =====================================================================================
   MOTION. Every keyframe and transition lives here and only here. Native scroll is the clock
   for the beats; nothing captures wheel or touch. Reduced motion, no JavaScript and browsers
   without scroll-driven animation get the complete static page above.
   ===================================================================================== */
@media (prefers-reduced-motion: no-preference) {
  html.js { scroll-behavior: smooth; }
  .btn, .chip, .pad, .pad-key, .more, .foot-links a, .price a, .rail-link {
    transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), text-decoration-color var(--t-fast), transform var(--t-fast);
  }
  .strip, .rail, .stage { transition: --bg var(--t-theme) var(--ease-out), --surface var(--t-theme) var(--ease-out), --edge var(--t-theme) var(--ease-out), --fg var(--t-theme) var(--ease-out), --fg-2 var(--t-theme) var(--ease-out), --acc var(--t-theme) var(--ease-out), --acc-ink var(--t-theme) var(--ease-out), --glow-c var(--t-glow) var(--ease-out); }
  .mini-needle, .ring .turn, .ring .wl { transition: transform var(--t-cue) var(--ease-out); }
  .mini .w, .ring .w, .ring .wl { transition: fill var(--t-state) var(--ease-out); }
  .sc, .spot { transition: opacity var(--t-state) var(--ease-out); }
  .rail-marker { transition: transform var(--t-state) var(--ease-out); }
  .mix .w path { transition: stroke var(--t-fast), fill var(--t-fast); }

  /* the boot: the pads run a light check, the first record is pulled from the crate, the arm drops */
  @keyframes pad-check { 0% { transform: translateY(-120%); } 34% { transform: none; background-color: rgb(var(--k)); color: var(--key-ink); } 100% { background-color: rgb(var(--k) / 0.14); } }
  @keyframes pad-check-key { 38% { box-shadow: inset 0 0 0 40px rgb(var(--k)); color: var(--key-ink); } }
  @keyframes rise { from { transform: perspective(1100px) translateY(150px) rotateX(64deg); } }
  @keyframes arm-drop { from { transform: rotate(-24deg); } }
  @keyframes spin-in { from { transform: rotate(calc(var(--turn, 0deg) - 150deg)); } }
  @keyframes deck-in { from { transform: translateY(-50%) translateX(-36px) rotate(-3deg); } }
  @keyframes needle-sweep { 0% { transform: rotate(180deg); visibility: visible; } 99% { transform: rotate(420deg); visibility: visible; } 100% { transform: rotate(420deg); visibility: hidden; } }
  html.js.boot .mini-needle { animation: needle-sweep calc(var(--t-step) * 4) linear calc(var(--t-delay) + var(--t-pad) * 0.34) both; }
  html.js.boot .chips li .chip { animation: pad-check var(--t-pad) var(--ease-out) both; }
  html.js.boot .chips li:nth-child(1) .chip, html.js.boot .pads li:nth-child(1) .pad-key { animation-delay: calc(var(--t-delay) + var(--t-step) * 0); }
  html.js.boot .chips li:nth-child(2) .chip, html.js.boot .pads li:nth-child(2) .pad-key { animation-delay: calc(var(--t-delay) + var(--t-step) * 1); }
  html.js.boot .chips li:nth-child(3) .chip, html.js.boot .pads li:nth-child(3) .pad-key { animation-delay: calc(var(--t-delay) + var(--t-step) * 2); }
  html.js.boot .chips li:nth-child(4) .chip, html.js.boot .pads li:nth-child(4) .pad-key { animation-delay: calc(var(--t-delay) + var(--t-step) * 3); }
  html.js.boot .chips li:nth-child(5) .chip, html.js.boot .pads li:nth-child(5) .pad-key { animation-delay: calc(var(--t-delay) + var(--t-step) * 4); }
  html.js.boot .chips li:nth-child(6) .chip, html.js.boot .pads li:nth-child(6) .pad-key { animation-delay: calc(var(--t-delay) + var(--t-step) * 5); }
  html.js.boot .pads li .pad-key { animation: pad-check-key var(--t-pad) var(--ease-out) both; }
  html.js.boot .hero-phone .handset { animation: rise var(--t-rise) var(--ease-out) calc(var(--t-delay) * 3) backwards; }
  html.js.boot .ring .turn { animation: spin-in var(--t-rise) var(--ease-out) backwards; }
  html.js.boot .arm-swing { animation: arm-drop var(--t-drop) var(--ease-out) calc(var(--t-delay) * 4) backwards; }
  html.js.boot .stage .handset { animation: deck-in var(--t-rise) var(--ease-out) calc(var(--t-delay) * 2) backwards; }

  @supports (animation-timeline: view()) {
    /* phone and tablet: each record stands up out of the crate on its bottom edge as it arrives,
       its vinyl rides out of the sleeve, and it tips forward as it leaves under the strip */
    @media (max-width: 1179px) {
      @keyframes flip-up { from { transform: perspective(1200px) rotateX(42deg); } to { transform: none; } }
      @keyframes flip-away { to { transform: perspective(1400px) rotateX(-7deg) scale(0.98); } }
      @keyframes shade-off { from { opacity: 0.66; } to { opacity: 0; } }
      @keyframes shade-on { to { opacity: 0.36; } }
      @keyframes vinyl-out { from { transform: translateY(calc(var(--disc) * 0.36)) rotate(-50deg); } }
      html.js .rec { view-timeline: --rec block; }
      html.js .rec .sleeve {
        animation: flip-up linear backwards, flip-away linear forwards;
        animation-timeline: --rec, --rec; animation-range: entry 0% entry 72%, exit 16% exit 100%;
      }
      html.js .rec .sleeve::after {
        animation: shade-off linear backwards, shade-on linear forwards;
        animation-timeline: --rec, --rec; animation-range: entry 0% entry 72%, exit 16% exit 100%;
      }
      html.js .rec .vinyl { animation: vinyl-out var(--ease-out) backwards; animation-timeline: --rec; animation-range: entry 0% entry 42%; }
    }

    /* the beats, scrubbed by the thumb (Needle's grammar, inside each record) */
    @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
    @keyframes count-sec { from { --sec: 0; } to { --sec: 13; } }
    @keyframes rise-db { from { --db: -43; } to { --db: -16; } }
    @keyframes word-q { 0%, 11% { visibility: visible; } 11.5%, 100% { visibility: hidden; } }
    @keyframes word-g { 0%, 11% { visibility: hidden; } 11.5%, 100% { visibility: visible; } }
    @keyframes settle { 0% { --bpm10: 0; } 52% { --bpm10: 1803; } 74% { --bpm10: 1731; } 100% { --bpm10: 1748; } }
    @keyframes land { 0%, 70% { transform: translateX(-10px) scale(1.14); } 100% { transform: none; } }
    @keyframes grow { from { transform: scaleX(0); } }
    @keyframes row-in { from { transform: translateX(104%); } }
    @keyframes wedge-on { from { fill: rgb(var(--kc) / 0.1); } }
    @keyframes ring-in { from { stroke-width: 0; } }
    @keyframes fly-l { from { transform: translate(calc(-70vw / var(--vp-zoom, 1)), -10px) rotate(-12deg); } }
    @keyframes fly-r { from { transform: translate(calc(70vw / var(--vp-zoom, 1)), -10px) rotate(12deg); } }
    @keyframes fly-u { from { transform: translateY(110px); } }
    @keyframes feed { from { transform: translateY(-100%); } }
    @keyframes lay { from { transform: translateY(-14px) rotate(-5deg); } }
    @keyframes stick { from { transform: translateY(-40px) rotate(calc(var(--tilt) * -6)); } to { transform: translateY(0) rotate(var(--tilt)); } }

    html.js .groove-beat { view-timeline: --g block; }
    html.js .g-trace { animation: draw linear both; animation-timeline: --g; animation-range: entry 30% cover 58%; }
    html.js .sec-static, html.js .db-static, html.js .bpm-static { display: none; }
    html.js .sec::before { counter-reset: s var(--sec); content: counter(s); }
    html.js .g-sec { animation: count-sec linear both; animation-timeline: --g; animation-range: entry 30% cover 58%; }
    html.js .db::before { counter-reset: d var(--db); content: counter(d); }
    html.js .meter { animation: rise-db linear both; animation-timeline: --g; animation-range: entry 40% cover 62%; }
    html.js .m-q { animation: word-q linear both; animation-timeline: --g; animation-range: entry 40% cover 62%; }
    html.js .m-g { animation: word-g linear both; animation-timeline: --g; animation-range: entry 40% cover 62%; }

    html.js .read-beat { view-timeline: --r block; }
    html.js .bpm::before { counter-reset: w round(down, var(--bpm10) / 10, 1) t mod(var(--bpm10), 10); content: counter(w) "." counter(t); }
    html.js .bpm { animation: settle linear both; animation-timeline: --r; animation-range: entry 25% cover 52%; }
    html.js .kbig { animation: land linear both; animation-timeline: --r; animation-range: entry 25% cover 52%; }

    html.js .bars-beat { view-timeline: --b block; }
    html.js .bars .fm, html.js .bars .fx { animation: grow linear both; animation-timeline: --b; }
    html.js .bars li:nth-child(1) :is(.fm, .fx) { animation-range: entry 20% cover 42%; }
    html.js .bars li:nth-child(2) :is(.fm, .fx) { animation-range: entry 30% cover 46%; }
    html.js .bars li:nth-child(3) :is(.fm, .fx) { animation-range: entry 40% cover 50%; }
    html.js .bars li:nth-child(4) :is(.fm, .fx) { animation-range: entry 50% cover 54%; }

    html.js .crate-beat { view-timeline: --c block; }
    html.js .cr-rows li { animation: row-in var(--ease-out) both; animation-timeline: --c; }
    html.js .cr-rows li:nth-child(1) { animation-range: entry 30% cover 42%; }
    html.js .cr-rows li:nth-child(2) { animation-range: entry 50% cover 48%; }
    html.js .cr-rows li:nth-child(3) { animation-range: entry 70% cover 54%; }
    html.js .mix-beat { view-timeline: --m block; }
    html.js .mix .w.lit path { animation: wedge-on linear both; animation-timeline: --m; animation-range: entry 20% cover 40%; }
    html.js .mix .w.picked path, html.js .mix .w.near path { animation: ring-in linear both; animation-timeline: --m; animation-range: entry 40% cover 50%; }

    html.js .build { view-timeline: --l block; }
    html.js .p-key { animation: fly-l var(--ease-out) both; animation-timeline: --l; animation-range: entry 10% cover 34%; }
    html.js .p-bpm { animation: fly-r var(--ease-out) both; animation-timeline: --l; animation-range: entry 25% cover 40%; }
    html.js .p-artist { animation: fly-u var(--ease-out) both; animation-timeline: --l; animation-range: entry 40% cover 45%; }
    html.js .p-title { animation: fly-u var(--ease-out) both; animation-timeline: --l; animation-range: entry 55% cover 50%; }
    html.js .p-pos { animation: fly-u var(--ease-out) both; animation-timeline: --l; animation-range: entry 65% cover 54%; }
    html.js .printer { view-timeline: --p block; }
    html.js .feed img { animation: feed linear both; animation-timeline: --p; animation-range: entry 25% cover 55%; }
    html.js .sizes-beat { view-timeline: --s block; }
    html.js .blank { animation: lay var(--ease-out) both; animation-timeline: --s; }
    html.js .sizes li:nth-child(1) .blank { animation-range: entry 10% cover 34%; }
    html.js .sizes li:nth-child(2) .blank { animation-range: entry 18% cover 38%; }
    html.js .sizes li:nth-child(3) .blank { animation-range: entry 26% cover 42%; }
    html.js .sizes li:nth-child(4) .blank { animation-range: entry 34% cover 46%; }
    html.js .sizes li:nth-child(5) .blank { animation-range: entry 42% cover 50%; }
    html.js .tiers { view-timeline: --o block; }
    html.js .plabel { animation: stick var(--ease-out) both; animation-timeline: --o; }
    html.js .tier:nth-child(1) .plabel { animation-range: entry 0% cover 30%; }
    html.js .tier:nth-child(2) .plabel { animation-range: entry 10% cover 36%; }
    html.js .tier:nth-child(3) .plabel { animation-range: entry 20% cover 42%; }
  }
}

/* PKT-011 reflow: a door left with one button gives it the whole row, not the first of its two tracks (l.169) */
/* "one button left": the only child, or the only one this side of the breakpoint keeps (a device hide stays in the
   page with sd-hide-phone / sd-hide-desk, display none, so :only-child would still count it). The end door too. */
@media (max-width: 1179.98px) {
  .door > :nth-child(1 of :not(.sd-hide-phone)):nth-last-child(1 of :not(.sd-hide-phone)) { grid-column: 1 / -1; }
}
@media (min-width: 1180px) {
  .door > :nth-child(1 of :not(.sd-hide-desk)):nth-last-child(1 of :not(.sd-hide-desk)) { grid-column: 1 / -1; }
}
/* /PKT-011 reflow */

/* PKT-011 reflow: the end door with two buttons left sets two tracks at 768-1179, not an empty third (l.467) */
@media (min-width: 768px) and (max-width: 1179.98px) {
  .door-end:has(> :nth-child(2 of :not(.sd-hide-phone)):nth-last-child(1 of :not(.sd-hide-phone))) { grid-template-columns: 1.2fr 1fr; }
}
/* /PKT-011 reflow */

/* PKT-011 reflow: two tiers at 768-1179 share their row; only an odd last tier is centred alone at half width (l.466) */
@media (min-width: 768px) and (max-width: 1179.98px) {
  .tiers .tier:last-child:nth-child(even) { grid-column: auto; width: auto; justify-self: auto; }
}
/* /PKT-011 reflow */

/* PKT-011 reflow: from 1180 a tier that is last only because a tier is off stretches like the others (l.655 resets its column and width, not its centring); the default third tier keeps the bank's centring, pixel for pixel */
@media (min-width: 1180px) {
  .tiers .tier:last-child:not(:nth-child(3)) { justify-self: auto; }
}
/* /PKT-011 reflow */

/* PKT-011 reflow: from 1400 the tiers make one column per tier shown, not three fixed tracks (l.663; the subgrid rows hold: each tier spans 3) */
@media (min-width: 1400px) {
  .tiers { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}
/* /PKT-011 reflow */
