@font-face { font-family: "Jersey15"; src: url("/fonts/jersey15.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jbmono.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

/* A 16-bit organ on a hill. Pixel face Jersey 15 for the loud things (name, heads, knobs, buttons, notes, big
   numbers), Figtree for every sentence and label, mono only for the CA and memos. Jersey 15 is drawn on 27 font
   pixels per em, so it is only ever set at 27 / 54 / 81 / 108 px (one, two, three, four screen pixels per font pixel):
   any other size smears. Its C, B, G and O are four different shapes; Pixelify Sans, used before, drew C with a one
   pixel notch and B with a cut corner, so at 16-24 px C read as O and B as G.
   Text face sizes 16 / 18 / 20 / 24 / 32 / 48, spacing 4 / 8 / 12 / 16 / 24 / 32 / 48 (bands 64 / 96). Plates are the
   console's cream plastic with a hard navy pixel edge and a hard drop, never a soft glass card. */
:root {
  --sky: #2F63C9; --sky-deep: #1F4FB0; --navy: #1B2457; --navy-2: #0D1336; --pink: #F06FA8; --pink-deep: #C93A7C;
  --plastic: #ECE8DF; --plastic-hi: #F8F6F0; --plastic-lo: #D3CDBF; --sun: #F7D23E; --orange: #F49A2A; --grass: #3E8A2E;
  --paper: #F3EBD6; --white: #FFFFFF;
  --container: 1280px; --edge: 48px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --display: "Jersey15", "Arial Narrow", sans-serif;
  --p1: 27px; --p2: 54px; --p3: 81px; --p4: 108px;   /* the only sizes of the pixel face */
  --text: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --px: 4px;                                   /* one art pixel of the UI: borders and drops step by it */
  --edge-line: var(--px) solid var(--navy);
  --drop: calc(var(--px) * 1.5) calc(var(--px) * 1.5) 0 var(--navy);
  color-scheme: light;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sky); color: var(--navy); font: 400 18px/1.55 var(--text); font-variant-numeric: tabular-nums; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.px, .name, .headline, .head h2, .card h3, .big, .step .n, .step h3, .btn, .knob .kl, .chip, .rows .nt, .doc h3, .tagpill { -webkit-font-smoothing: none; font-smooth: never; }
:focus-visible { outline: var(--px) solid var(--sun); outline-offset: 3px; }

/* ---------- the first screen: the console, front on, everything on it ---------- */
/* The scene is the picture's own box (16:9 of the width) and a size container: every overlay is placed and sized in
   cqw of it, measured off art/site/px-hero-wide.png (1672 x 941): x / 1672 * 100cqw, y / 1672 * 100cqw. The section
   is as tall as the screen allows; a shorter screen loses sky and pipe tops, never the console's sides. */
.first { position: relative; overflow: hidden; aspect-ratio: 1672 / 941; max-height: max(100svh, calc(100vw * 941 / 1672 * .84)); width: 100%; background: var(--sky); }
.scene { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 1672 / 941; container-type: inline-size; container-name: scene; }
.art { position: absolute; inset: 0; }
.art picture, .art img.bg { width: 100%; height: 100%; display: block; }

.desk-head { display: flex; flex-direction: column; align-items: center; gap: .55cqw; }
.on-desk { position: absolute; left: 26.675cqw; top: 22.787cqw; width: 46.59cqw; height: 14.414cqw; padding: .6cqw 1.6cqw;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .5cqw; text-align: center; }
.name { margin: 0; font: 400 var(--p3)/.9 var(--display); letter-spacing: 0; color: var(--white); white-space: nowrap;
  text-shadow: 3px 0 0 var(--navy), -3px 0 0 var(--navy), 0 3px 0 var(--navy), 0 -3px 0 var(--navy), 3px 3px 0 var(--navy), -3px 3px 0 var(--navy), 3px -3px 0 var(--navy), -3px -3px 0 var(--navy), 0 7px 0 var(--navy), 3px 7px 0 var(--navy), -3px 7px 0 var(--navy); }
.headline { margin: 0; font: 400 var(--p1)/1.1 var(--display); color: var(--navy); }
.headline em { font-style: normal; color: var(--pink-deep); }
.lede { margin: 0; font-size: 18px; line-height: 1.4; color: var(--navy); max-width: 40em; }
.lede b { font-weight: 800; }

/* the stop jambs: drawknobs in a column */
.jamb { position: absolute; top: 25.12cqw; height: 15.43cqw; display: flex; flex-direction: column; justify-content: space-evenly; padding: .3cqw 1cqw; }
.jamb-l { left: 9.211cqw; width: 14.055cqw; }
.jamb-r { left: 76.615cqw; width: 14.115cqw; }
.knob { --kn: 3.3cqw; display: flex; align-items: center; gap: .7cqw; min-height: 48px; padding: 0; border: 0; background: none; color: var(--navy); text-decoration: none; cursor: pointer; text-align: left; }
.knob .kb { position: relative; flex: none; width: var(--kn); aspect-ratio: 192 / 195; }
.knob .kn { width: 100%; height: 100%; filter: drop-shadow(2px 3px 0 rgba(27,36,87,.35)); transform-origin: 50% 50%; }
.knob .mk { position: absolute; left: 50%; top: 50%; width: 50%; height: 50%; object-fit: contain; transform: translate(-50%, -50%); padding: 3px; background: var(--plastic-hi); border-radius: 50%; }
.knob.pulled .mk, .knob[aria-pressed="true"] .mk { transform: translate(-50%, -50%) scale(1.2); }
.knob .kl { display: flex; flex-direction: column; align-items: flex-start; font: 400 var(--p1)/1 var(--display); white-space: nowrap; }
.knob .kl small { margin-top: 2px; font: 700 16px/1 var(--text); color: #2C3466; -webkit-font-smoothing: antialiased; }
.knob:hover .kl, .knob:focus-visible .kl { color: var(--pink-deep); }
.knob:hover .kn { transform: translateY(-2px); }
.knob:active .kn { transform: scale(.94); }
.knob:focus-visible { outline-offset: 2px; }
.knob.off { cursor: help; }
.knob.off .kn { filter: grayscale(.55) drop-shadow(2px 3px 0 rgba(27,36,87,.25)); }
/* pulled: the knob slides out toward the visitor in three hard steps and stays out (the current page, sound on) */
.knob.pulled .kn, .knob[aria-pressed="true"] .kn { animation: pull .24s steps(3, end) forwards; }
.knob[aria-current="page"] .kl, .knob[aria-pressed="true"] .kl { color: var(--pink-deep); }
@keyframes pull { from { transform: scale(1); filter: drop-shadow(2px 3px 0 rgba(27,36,87,.35)); } to { transform: scale(1.2); filter: drop-shadow(5px 7px 0 rgba(27,36,87,.45)); } }

/* the contract plate, screwed on the kickboard over the pedals */
.on-kick { position: absolute; left: 25cqw; width: 50cqw; top: 49.4cqw; height: 4.8cqw; display: flex; align-items: center; }
.on-kick .ca-plate { width: 100%; }

.plate { background: var(--plastic); border: var(--edge-line); box-shadow: var(--drop); color: var(--navy); }
.ca-plate { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s2); padding: 4px 4px 4px 24px; }
.ca-lbl { font: 400 var(--p1)/1 var(--display); color: var(--navy); }
.ca-addr { min-width: 0; overflow-wrap: anywhere; word-break: break-all; font-size: 16px; line-height: 1.3; user-select: all; }
.ca-addr.wait { font: 600 16px/1.3 var(--text); white-space: normal; word-break: normal; overflow-wrap: normal; user-select: text; color: var(--navy); }
.key-btn { min-height: 54px; padding: 0 1em; border: 0; background: var(--navy); color: var(--white); font: 400 var(--p1)/1 var(--display); cursor: pointer; box-shadow: inset -3px -3px 0 var(--navy-2); -webkit-font-smoothing: none; }
.key-btn:active { transform: translateY(2px); }
.key-btn:hover { background: #2A3678; }
.key-btn[disabled] { background: #4A5283; color: var(--white); box-shadow: inset -3px -3px 0 #343B66; cursor: not-allowed; }

/* what the organ is playing now: a sticker in the sky's corner */
.nowplaying { position: absolute; z-index: 3; left: var(--s2); top: var(--s2); max-width: min(27vw, 420px); margin: 0; padding: 12px 24px 12px 12px; background: var(--navy); color: var(--white); font: 600 16px/1.45 var(--text); border: var(--px) solid var(--white); box-shadow: var(--drop); }
.nowplaying:empty { display: none; }
.nowplaying b { color: var(--sun); }
.nowplaying .tag { display: inline-block; margin-right: 8px; padding: 10px 16px; line-height: 1; background: var(--pink); color: var(--white); font: 700 16px/1 var(--text); }

/* live parts on the picture */
.ov { position: absolute; pointer-events: none; }
.screen { position: absolute; overflow: hidden; }
.screen canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.keyglow { position: absolute; background: rgba(240,111,168,.85); mix-blend-mode: multiply; opacity: 0; transition: opacity .4s steps(3, end); }
.keyglow.blk { background: rgba(255,120,190,1); mix-blend-mode: screen; }
.keyglow.on { opacity: 1; transition: none; }
.pipeglow { position: absolute; background: radial-gradient(closest-side, rgba(255,236,170,.95), rgba(247,210,62,.5) 55%, rgba(247,210,62,0)); mix-blend-mode: screen; opacity: 0; transition: opacity .6s steps(4, end); }
.pipeglow.on { opacity: 1; transition: none; }
.puff { position: absolute; width: 7%; opacity: 0; transform: translate(-50%, 0) scale(.4); image-rendering: pixelated; }
.puff.go { animation: puff 2.2s steps(11, end) forwards; }
@keyframes puff { 0% { opacity: 0; transform: translate(-50%, 0) scale(.35); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(-10%, -240%) scale(1.5); } }

/* ---------- sections below ---------- */
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--edge); }
.band { padding: var(--s7) 0; }
.band.grass { background: var(--grass); background-image: linear-gradient(180deg, #4C9A33 0 8px, #3E8A2E 8px 16px, #3E8A2E 16px); }
.band.paper { background: #F4F6FA; }
.band.sky { background: var(--sky); }
.head { margin: 0 0 var(--s5); }
.head h2 { margin: 0 0 var(--s1); font: 400 var(--p2)/1 var(--display); }
.head p { margin: 0; font-size: 19px; max-width: 42em; }
.on-dark .head h2, .on-dark .head p { color: var(--white); }
.on-dark .head h2 { text-shadow: 0 4px 0 var(--navy); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 12px 1.2em; border: var(--edge-line); font: 400 var(--p1)/1 var(--display); text-decoration: none; cursor: pointer; box-shadow: var(--drop); transition: transform .08s steps(2, end), box-shadow .08s steps(2, end); }
.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--navy); }
.btn-pink { background: var(--pink); color: var(--white); text-shadow: 2px 2px 0 var(--pink-deep); }
.btn-pink:hover { background: #F481B4; }
.btn-plastic { background: var(--plastic); color: var(--navy); }
.btn-plastic:hover { background: var(--plastic-hi); }
.btn:focus-visible { outline-offset: 4px; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--plastic-lo); color: var(--navy); text-shadow: none; cursor: not-allowed; }
.btn[aria-disabled="true"]:active { transform: none; box-shadow: var(--drop); }

/* the roll: a punched paper strip the organ reads */
.roll-band { background: var(--navy); color: var(--white); padding-bottom: var(--s6); }
.roll-band .head h2 { color: var(--white); text-shadow: 0 4px 0 #000A2E; }
.roll-band .head p { color: #DCE2FF; }
.roll { position: relative; height: 460px; background: #101640; border-top: var(--px) solid #000A2E; border-bottom: var(--px) solid #000A2E; }
.roll canvas { width: 100%; height: 100%; display: block; }

/* the play desk */
.desk { padding: var(--s4); display: grid; gap: var(--s2); }
.desk-top { display: grid; grid-template-columns: 1fr auto; gap: var(--s3); align-items: start; }
.phrase { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font: 600 17px/1.3 var(--text); }
.chip { display: inline-flex; align-items: center; min-height: 54px; padding: 0 27px; background: var(--navy); color: var(--white); font: 400 var(--p1)/1 var(--display); }
.chip.mine { background: var(--pink-deep); }
.chip.ghost { background: transparent; color: var(--navy); border: 3px dashed rgba(27,36,87,.4); font: 700 16px/1 var(--text); -webkit-font-smoothing: antialiased; }
.verdict { min-height: 2.9em; margin: 8px 0 0; font: 600 18px/1.45 var(--text); }
.verdict b { font-weight: 800; color: var(--pink-deep); }
.octaves { display: none; gap: 8px; }
.octaves button { min-width: 48px; min-height: 54px; padding: 0 27px; border: 3px solid var(--navy); background: var(--plastic-lo); color: var(--navy); font: 400 var(--p1)/1 var(--display); cursor: pointer; -webkit-font-smoothing: none; }
.octaves button:hover { background: var(--plastic-hi); }
.octaves button:active { transform: translateY(2px); }
.octaves button[aria-pressed="true"] { background: var(--navy); color: var(--white); }

.kbd { position: relative; width: 100%; user-select: none; touch-action: manipulation; border: var(--edge-line); box-shadow: var(--drop); background: var(--plastic-lo); padding-bottom: 32px; }
.kbd .oct { position: relative; float: left; }
.kbd .oct img { width: 100%; height: 100%; display: block; }
.kbd .k { position: absolute; top: 0; border: 0; padding: 0; background: transparent; cursor: pointer; }
.kbd .k:focus-visible { outline: var(--px) solid var(--pink); outline-offset: -4px; }
.kbd .k:hover { background: rgba(240,111,168,.22); }
.kbd .k:active { background: rgba(240,111,168,.45); }
.kbd .k.lit, .kbd .k.picked { background: rgba(240,111,168,.55); }
.kbd .k.blk.picked { background: rgba(255,140,200,.9); }
.kbd .k.blk.lit { background: rgba(255,140,200,.9); }
/* octave names sit under the keys, never on them */
.kbd .k[data-lbl]::after { content: attr(data-lbl); position: absolute; left: 0; right: 0; bottom: -26px; text-align: center; font: 700 16px/1 var(--text); color: var(--navy); pointer-events: none; }
.kbd::after { content: ""; display: block; clear: both; }
.desk-bottom { display: grid; grid-template-columns: 1fr auto; gap: var(--s3); align-items: center; }
.amount { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.amount label { font: 400 var(--p1)/1 var(--display); -webkit-font-smoothing: none; }
.amount input { width: 120px; min-height: 56px; padding: 0 16px; border: 3px solid var(--navy); background: var(--white); color: var(--navy); font: 700 18px/1 var(--text); }
.amount .hint { font-size: 16px; color: #3A4270; }
.status-line { font: 600 16px/1.4 var(--text); min-height: 1.4em; margin: 0; color: var(--navy); }
.status-line:empty { display: none; }
.status-line a { color: var(--pink-deep); }

/* bellows + score summary row */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: stretch; }
.card { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.card h3 { margin: 0; font: 400 var(--p2)/1 var(--display); }
.big { font: 400 var(--p3)/1 var(--display); color: var(--navy); }
.big small { font-size: var(--p1); margin-left: .2em; }
.gauge { position: relative; height: 24px; background: #DAD4C6; border: 3px solid var(--navy); overflow: hidden; }
.gauge i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--sun) 0 12px, var(--orange) 12px 16px); transition: width .6s steps(6, end); }
.gauge .mark { position: absolute; top: 0; bottom: 0; width: 4px; background: var(--navy); }
/* each threshold label stands under its own mark */
.gauge-legend { position: relative; height: 24px; font: 700 16px/1.3 var(--text); }
.gauge-legend span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.gauge-legend span:last-child { transform: translateX(-70%); }
.air { display: grid; grid-template-columns: 200px 1fr; gap: var(--s3); align-items: center; }
.air .note-small { margin: 4px 0 0; }
.bellows-art { width: 200px; height: auto; image-rendering: pixelated; }
.air-split { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 16px; }
.air-split li { padding: 8px 16px; background: var(--plastic-hi); border-left: 4px solid var(--pink); }
.air-split li + li { border-left-color: var(--sun); }

/* the score rows */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 48px 64px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 2px solid rgba(27,36,87,.16); font-size: 16px; }
.rows li:last-child { border-bottom: 0; }
.rows .bar { color: #5A6190; font-weight: 600; }
.rows .nt { font: 400 var(--p1)/1 var(--display); }
.rows .rest .nt { color: #3E4677; }
.rows .amt { white-space: nowrap; }
.rows .who { min-width: 0; overflow-wrap: anywhere; white-space: nowrap; }
.rows .who a { text-decoration: none; }
.rows .who a:hover { text-decoration: underline; }
/* one badge system: a status, not a button. Same size everywhere, colour says the kind */
.tagpill { display: inline-flex; align-items: center; justify-content: center; min-width: 112px; min-height: 36px; padding: 10px 16px; border: 0; font: 700 16px/1 var(--text); white-space: nowrap; -webkit-font-smoothing: antialiased; }
.tag-chord { background: var(--pink-deep); color: var(--white); }
.tag-amen { background: var(--sun); color: var(--navy); }
.tag-minor { background: #C9D6F5; color: var(--navy); }
.tag-wolf { background: var(--navy); color: var(--white); }
.tag-sell { background: #FAD3DD; color: #8A1D47; }
.tag-silent { background: #DDD7C8; color: var(--navy); }
.tag-note { background: #DDE3F7; color: var(--navy); }

/* three steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.step { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.step .n { font: 400 var(--p3)/1 var(--display); color: var(--pink); text-shadow: 4px 4px 0 var(--navy); }
.step h3 { margin: 0; font: 400 var(--p2)/1 var(--display); min-height: 2em; }  /* every title keeps two lines */
.step p { margin: 0; }

.note-small { font-size: 16px; color: #3A4270; }
.err { color: #B4234F; font-weight: 700; }

/* ---------- inner pages: the picture under a stop rail ---------- */
/* a compact head: rail, title, one line, then the page's content (no fixed height; the picture only fills it) */
.page-top { position: relative; overflow: hidden; background: var(--sky); }
.page-top > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right 30%; }
.page-top .inner { position: relative; z-index: 2; padding: var(--s3) var(--edge) var(--s4); max-width: var(--container); margin: 0 auto; display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; }
.rail { align-self: stretch; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 8px 24px; margin-bottom: var(--s2); background: var(--plastic); border: var(--edge-line); box-shadow: var(--drop); }
.rail-l, .rail-r { display: flex; gap: var(--s3); flex-wrap: wrap; }
.rail .knob { --kn: 44px; }
.page-top .name { font-size: var(--p2); white-space: normal; }
.page-top + .band { padding-top: var(--s5); }
.page-top .inner > .name, .page-top .inner > .headline { margin: 0; }
.page-top .headline { font-size: var(--p1); color: var(--white); text-shadow: 3px 0 0 var(--navy), -3px 0 0 var(--navy), 0 3px 0 var(--navy), 0 -3px 0 var(--navy), 3px 3px 0 var(--navy); max-width: 20em; }
.page-top .headline em { font-style: normal; color: var(--sun); }
.rail .knob .kl small { color: var(--navy); }
.doc { max-width: 760px; }
.doc h3 { font: 400 var(--p2)/1 var(--display); margin: var(--s5) 0 var(--s2); }
.doc p, .doc li { font-size: 18px; }
.doc table { width: 100%; border-collapse: collapse; margin: var(--s2) 0; }
.doc th, .doc td { text-align: left; padding: 12px 1em; border-bottom: 2px solid rgba(27,36,87,.15); font-size: 17px; }
.doc code { font-family: var(--mono); font-size: 16px; color: #2C3A8C; font-weight: 600; }
.doc ul { padding-left: 1.2em; }
.doc > h3:first-child { margin-top: 0; }
.doc .ca-plate { margin-bottom: var(--s3); }
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.filters .btn { min-height: 54px; padding: 0 24px; }
/* an inner page's own head is one small line: the big title is already in the page top */
.page-top + .band .wrap > .head:first-child { margin-bottom: var(--s3); }
.page-top + .band .wrap > .head:first-child h2 { font-size: var(--p1); margin-bottom: 4px; }
.page-top + .band .wrap > .head:first-child p { font-size: 16px; }
.filters .btn[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.score-plate { padding: var(--s2) var(--s4); }
.rows li.now { background: rgba(247,210,62,.4); }
.tagwrap { display: flex; gap: var(--s2); align-items: center; justify-content: flex-end; }
.play-from { min-height: 48px; padding: 0 20px; border: 3px solid var(--navy); background: transparent; color: var(--navy); font: 700 16px/1 var(--text); cursor: pointer; white-space: nowrap; }
.play-from:hover { background: rgba(27,36,87,.08); }
.play-from:active { transform: translateY(2px); }
.more { display: flex; justify-content: center; margin-top: var(--s4); }
.split { width: 100%; border-collapse: collapse; }
.split th, .split td { text-align: left; padding: 12px 1em; border-bottom: 2px solid rgba(27,36,87,.15); font-size: 17px; vertical-align: top; }
.split th { font-weight: 700; }
.spends-head { margin-top: var(--s7); }
.rows.spends li { grid-template-columns: 64px 140px 1fr auto; }
.memo { font-size: 16px; color: #3A4270; }
.check { padding: var(--s4); display: grid; gap: var(--s2); }
.check label { font: 400 var(--p1)/1 var(--display); -webkit-font-smoothing: none; }
.check input { min-height: 56px; padding: 0 16px; border: 3px solid var(--navy); background: var(--white); color: var(--navy); font-size: 16px; width: 100%; }
.lost { position: relative; min-height: 100svh; overflow: hidden; }
.lost > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.lost .inner { position: relative; z-index: 2; padding: var(--s7) var(--edge); max-width: 640px; display: flex; flex-direction: column; gap: var(--s3); align-items: flex-start; }
.lost .name { font-size: var(--p3); white-space: normal; }
.lost .headline { color: var(--white); text-shadow: 3px 3px 0 var(--navy); font-size: var(--p1); }

/* the roll legend */
.legend { list-style: none; margin: calc(var(--s3) * -1) 0 var(--s4); padding: 0; display: flex; flex-wrap: wrap; gap: 12px 24px; font: 600 16px/1.3 var(--text); color: #DCE2FF; }
.legend li { display: flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 16px; height: 16px; border: 2px solid #DCE2FF; }
.sw-hole { background: #0D1336; }
.sw-sun { background: var(--sun); }
.sw-grey { background: #C9C2B0; }
.sw-tear { width: 4px; height: 20px; border: 0; background: #FF5A78; }
.sw-pink { background: #E0408A; }

/* the biggest pixel step only on wide screens */
@media (min-width: 1800px) { .on-desk .name { font-size: var(--p4); } }

/* ---------- 761-1199: the console picture whole, its copy and knobs on a plate under it ---------- */
@media (max-width: 1199px) {
  .first { aspect-ratio: auto; max-height: none; overflow: visible; display: flex; flex-direction: column; }
  .scene { position: relative; aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "art art" "desk desk" "kick kick" "links nav"; gap: var(--s3) var(--s4);
    padding: 0 var(--s4) var(--s5); background: var(--grass); container-type: normal; }
  .art { position: relative; inset: auto; grid-area: art; margin: 0 calc(var(--s4) * -1); aspect-ratio: 1672 / 941; }
  /* the name and headline stay on the drawn music desk (cqw of the scene = of the picture); the lede goes under it */
  .scene { container-type: inline-size; }
  .on-desk { display: contents; }
  /* cqw counts the scene's content box; the picture is that plus both side paddings */
  .desk-head { --aw: calc(100cqw + 2 * var(--s4)); grid-area: art; align-self: start; justify-self: start; z-index: 2; margin: calc(var(--aw) * .22787) 0 0 calc(var(--aw) * .26675 - var(--s4)); width: calc(var(--aw) * .4659); height: calc(var(--aw) * .14414); justify-content: center; gap: 8px; text-align: center; }
  .name { font-size: var(--p2); }
  .headline { font-size: var(--p1); }
  .lede { grid-area: desk; font-size: 18px; color: var(--white); text-shadow: 0 2px 0 rgba(13,19,54,.5); text-align: center; justify-self: center; }
  .jamb { position: static; width: auto; height: auto; padding: var(--s2) var(--s3); gap: var(--s2); background: var(--plastic); border: var(--edge-line); box-shadow: var(--drop); }
  .jamb-l { grid-area: links; } .jamb-r { grid-area: nav; }
  .knob { --kn: 48px; gap: 12px; }
  .on-kick { position: static; grid-area: kick; width: auto; height: auto; }
  .nowplaying { position: static; order: -1; max-width: none; margin: 0; border: 0; border-bottom: var(--px) solid var(--white); box-shadow: none; }
}
@media (max-width: 1199px) { .rows .who { white-space: normal; } }
@media (max-width: 1199px) {
  .step h3 { font-size: var(--p1); }
  /* the stop rail: knob over its word, so all eight fit one row from 1024 */
  .rail { padding: 8px 16px; }
  .rail .knob { --kn: 32px; flex-direction: column; gap: 4px; min-width: 72px; }
  .rail .knob .kl { font: 700 16px/1.25 var(--text); -webkit-font-smoothing: antialiased; }
  .rail .knob .kl small { color: #3E4677; }
  .rail .knob .kl { align-items: center; text-align: center; }
  .rail .knob .kl small { margin-top: 0; }
  .rail-l, .rail-r { gap: var(--s2); }
}
@media (max-width: 1023px) { .duo, .steps { grid-template-columns: minmax(0, 1fr); } .step h3 { min-height: 0; } }
/* ---------- 761-1023: the desk is too small for the name: it goes in a band of sky over the picture ---------- */
@media (min-width: 761px) and (max-width: 1023px) {
  .scene { grid-template-areas: "head head" "art art" "desk desk" "kick kick" "links nav"; }
  .desk-head { grid-area: head; justify-self: stretch; width: auto; height: auto; margin: 0 calc(var(--s4) * -1) calc(var(--s3) * -1); padding: var(--s4) var(--s4) var(--s2); background: var(--sky); gap: 12px; }
  .name { font-size: var(--p3); }
  .desk-head .headline { color: var(--white); text-shadow: 2px 2px 0 var(--navy), -2px 0 0 var(--navy), 0 -2px 0 var(--navy), 2px 0 0 var(--navy), 0 2px 0 var(--navy); }
  .desk-head .headline em { color: var(--sun); }
  /* the lede takes the drawn desk instead */
  .lede { --aw: calc(100cqw + 2 * var(--s4)); grid-area: art; align-self: start; justify-self: start; z-index: 2; margin: calc(var(--aw) * .22787) 0 0 calc(var(--aw) * .26675 - var(--s4)); width: calc(var(--aw) * .4659); height: calc(var(--aw) * .14414); display: block; align-content: center; text-align: center; padding: 0 24px; font-size: 16px; color: var(--navy); text-shadow: none; }
}
/* ---------- phones: the tall picture, the name in its sky ---------- */
@media (max-width: 760px) {
  :root { --edge: 16px; --px: 3px; }
  body { font-size: 17px; }
  .scene { grid-template-columns: minmax(0, 1fr); grid-template-areas: "art" "desk" "kick" "links" "nav"; padding: 0 var(--edge) var(--s4); gap: var(--s2); }
  .art { margin: 0 calc(var(--edge) * -1); aspect-ratio: 941 / 1260; overflow: hidden; }
  .art picture, .art img.bg { height: auto; }
  .art img.bg { margin-top: -17.003%; }  /* the tall picture loses its top 160 rows of empty sky (stage.js GEO.tall.oy) */
  .desk-head { justify-self: stretch; width: auto; height: auto; margin: 24px calc(var(--edge) * -1) 0; padding: 0 var(--edge); gap: 12px; }
  .desk-head .name { font-size: var(--p2); white-space: normal; }
  .desk-head .headline { color: var(--white); text-shadow: 2px 2px 0 var(--navy), -2px 0 0 var(--navy), 0 -2px 0 var(--navy), 2px 0 0 var(--navy), 0 2px 0 var(--navy); font-size: var(--p1); }
  .desk-head .headline em { color: var(--sun); display: block; }
  .lede { font-size: 17px; }
  .jamb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px 16px; gap: 8px 12px; }
  .knob { --kn: 40px; gap: 10px; }
  .ca-plate { grid-template-columns: 1fr auto; padding: 8px 4px 8px 16px; }
  .ca-plate .ca-lbl { display: none; }
  .duo, .steps { grid-template-columns: minmax(0, 1fr); }
  /* tables become one block per row, each cell with its own column name */
  .split thead, .doc thead { display: none; }
  .split, .doc table, .split tbody, .doc tbody { display: block; }
  .split tr, .doc tr { display: block; padding: 12px 16px; border-bottom: 2px solid rgba(27,36,87,.15); }
  .split td, .doc td { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 4px 0; border: 0; }
  .split td:empty { display: none; }
  .split td::before, .doc td::before { content: attr(data-label); font-weight: 700; }
  .desk { padding: var(--s3) var(--s4); }
  .desk-top, .desk-bottom { grid-template-columns: 1fr; }
  .octaves { display: flex; flex-wrap: wrap; }
  .rows li { grid-template-columns: 52px 1fr; row-gap: 8px; }
  .rows li .who { grid-column: 2 / -1; }
  .rows li .tagpill { grid-column: 2 / -1; justify-self: start; }
  .card { padding: var(--s4) var(--s4); }
  .band { padding: var(--s6) 0; }
  .band .wrap { padding: 0 32px; }
  .rows .amt { white-space: normal; }
  .rows li { padding: 14px 16px; }
  .nowplaying { padding: 12px 24px; }
  .card h3, .step h3, .doc h3 { font-size: var(--p1); }
  .step h3 { min-height: 0; }
  .big { font-size: var(--p2); }
  .page-top .name, .lost .name { font-size: var(--p2); }
  .air { grid-template-columns: minmax(0, 1fr); }
  .bellows-art { width: 120px; }
  .legend { gap: 8px 16px; }
  .btn { width: 100%; }
  .roll { height: 380px; }
  .page-top .inner { padding: 8px var(--edge) var(--s3); gap: 12px; }
  .page-top + .band { padding-top: var(--s4); }
  .rail { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; margin-bottom: 0; }
  .rail-l, .rail-r { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .rail .knob { min-width: 0; --kn: 30px; }
  .rail-l, .rail-r { gap: 4px 8px; }
  .filters .btn { width: auto; flex: 1 1 auto; }
  .rail .knob { --kn: 40px; }
  .score-plate { padding: var(--s1) 0; }
  .tagwrap { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .rows.spends li { grid-template-columns: 52px 1fr; }
  .rows.spends li .who { grid-column: 1 / -1; white-space: normal; }
  .split th, .split td, .doc th, .doc td { font-size: 16px; }
  .lost { display: flex; flex-direction: column-reverse; min-height: 0; background: var(--sky); }
  .lost > img.bg { position: static; height: auto; aspect-ratio: 16 / 9; }
  .lost .inner { padding: var(--s5) var(--edge) var(--s3); }
}
@media (max-width: 360px) {
  .band .wrap { padding: 0 16px; }
  .split td, .doc td { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .knob { --kn: 34px; gap: 8px; }
  .jamb { padding: 12px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
