/* ToneCatch: cream paper, black ink, and colour only where a note sounds. */
:root {
  --cream: #fff8ec;
  --cream-2: #f7eedd;
  --line: rgba(60, 40, 10, .13);
  --ink: #141414;
  --grey: #7b7b7b;
  --grey-soft: #a3a3a3;
  --text-dim: #5c5850; /* updated by script.js as the background changes */
  --bg: #fff8ec;
  --fg: #141414;
  --ebony: #17161c;

  /* Interval spectrum, one hue per semitone distance (from the app) */
  --int-0: #8a8a9a; --int-1: #e0505c; --int-2: #e9633a; --int-3: #f0832b;
  --int-4: #f7bd33; --int-5: #d8d43c; --int-6: #9fcc4a; --int-7: #3fbf8f;
  --int-8: #34b3ae; --int-9: #3aa0d6; --int-10: #6c8ef0; --int-11: #9b7cf0;
  --int-12: #c96ee0; --violet: #8b7cf6;

  --font: "Baloo 2", ui-rounded, system-ui, sans-serif;
  --gutter: clamp(16px, 6vw, 100px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { padding-inline: var(--gutter); max-width: 1440px; margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--ink); color: var(--cream); padding: 8px 14px; border-radius: 10px; }

/* ---------- Nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 44px 20px; gap: 24px; }
.logo { display: inline-flex; align-items: baseline; text-decoration: none; font-weight: 800; font-size: 2.6rem; line-height: 1; letter-spacing: -.01em; }
.logo-catch { color: var(--grey-soft); }
.logo-note { width: .82em; height: .82em; margin-left: .2em; align-self: center; transform: translateY(-.04em); }
.nav nav { display: flex; gap: clamp(20px, 3.6vw, 52px); }
.nav nav a { font-weight: 700; font-size: 1.3rem; text-decoration: none; position: relative; }
.nav nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 3px; border-radius: 3px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav nav a:hover::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  min-height: calc(100vh - 140px);
  min-height: calc(100svh - 140px);
  padding-block: 40px 80px;
}
.hero-copy { text-align: center; }
.hero h1 {
  font-size: clamp(2.4rem, 3.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.5;
  color: var(--grey);
  letter-spacing: -.005em;
  text-wrap: balance;
}
.lede { margin: 20px auto 0; max-width: 34ch; color: var(--text-dim); font-size: 1.2rem; }
.cta-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 6px 30px 2px;
  background: var(--ink); color: var(--cream);
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 1.15rem; text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 #000;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #000; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 #000; }
.hint { color: var(--grey); font-size: 1rem; }
kbd {
  font-family: var(--font); font-weight: 700; font-size: .85rem;
  display: inline-block; min-width: 1.7em; padding: 2px 6px 0; text-align: center;
  background: #fff; border: 1.5px solid var(--line); border-bottom-width: 3px; border-radius: 6px; color: var(--ink);
}

/* Stage: piano, floating interval names, readout */
.stage { position: relative; padding-top: 120px; }
.fallboard {
  position: relative;
  background: linear-gradient(180deg, #24232b 0%, var(--ebony) 40%);
  border-radius: 26px;
  padding: 26px 14px 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 34px 40px -26px rgba(60, 40, 10, .55), 0 10px 0 -2px #0c0b10;
  transform: perspective(1400px) rotateX(14deg);
  transform-origin: 50% 100%;
}
.fallboard::before { /* the red felt strip */
  content: ""; position: absolute; left: 14px; right: 14px; top: 16px; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #6d1f27, #8b2a33, #6d1f27);
}
.piano { position: relative; height: clamp(170px, 19vw, 250px); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.whites { display: flex; height: 100%; gap: 3px; }
.key { border: 0; padding: 0; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
.key.white {
  flex: 1;
  border-radius: 3px 3px 10px 10px;
  background: linear-gradient(180deg, #fffefb 0%, #f4efe4 80%, #e6dfd1 100%);
  box-shadow: inset 0 -5px 0 rgba(20,20,20,.1), 0 2px 0 rgba(0,0,0,.6);
  transition: transform .09s ease-out, box-shadow .09s ease-out, background .25s ease-out;
}
.key.black {
  position: absolute; top: 0; height: 62%; z-index: 2;
  border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, #45434f 0%, #19181f 55%, #0b0a0f 100%);
  box-shadow: inset 1px 0 0 rgba(255,255,255,.08), 0 4px 6px rgba(0,0,0,.55);
  transition: transform .09s ease-out, box-shadow .09s ease-out, background .25s ease-out;
}
.key.white.down { transform: translateY(3px); box-shadow: inset 0 4px 8px rgba(20,20,20,.25), 0 0 0 rgba(0,0,0,.6); }
.key.black.down { transform: translateY(3px); box-shadow: inset 0 2px 5px rgba(0,0,0,.6); }
.key.lit.white { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 45%, white) 0%, var(--c) 100%); }
.key.lit.black { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 75%, white) 0%, var(--c) 100%); }
.key .lbl { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-weight: 700; font-size: .78rem; color: rgba(20,20,20,.38); line-height: 1; pointer-events: none; }
.key.black .lbl { color: rgba(255,255,255,.4); bottom: 8px; font-size: .7rem; }
.key.lit .lbl { color: var(--ink); }
.key:focus-visible { outline: 3px solid var(--int-9); outline-offset: -3px; }

/* Entrance: keys rise one after another, once */
.piano.enter .key { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes rise { from { transform: translateY(26px); opacity: 0; } }

.bubbles { position: absolute; inset: 0 0 auto 0; height: 100%; pointer-events: none; z-index: 3; }
.bubble {
  position: absolute; top: 10px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  animation: float 2.2s var(--ease) forwards;
}
.bubble b {
  display: grid; place-items: center;
  min-width: 64px; height: 56px; padding: 6px 14px 0;
  border-radius: 18px;
  background: var(--c); color: var(--ink);
  font-size: 1.7rem; font-weight: 800; line-height: 1;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 60%, black);
}
.bubble span { margin-top: 10px; font-weight: 700; font-size: 1rem; color: var(--ink); white-space: nowrap; }
.bubble::after { /* a stem down toward the key */
  content: ""; order: -1; position: absolute; top: 100%; width: 2px; height: 40px; background: linear-gradient(var(--c), transparent); opacity: .7;
}
.bubble.note b { min-width: 44px; height: 40px; font-size: 1.2rem; border-radius: 14px; background: #fff; box-shadow: 0 4px 0 var(--line); }
@keyframes float {
  0% { opacity: 0; transform: translate(-50%, 34px) scale(.8); }
  14% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -8px); }
  100% { opacity: 0; transform: translate(-50%, -26px); }
}

.stage-foot { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 26px; text-align: center; }
.readout { font-weight: 600; color: var(--text-dim); min-height: 1.6em; }
.readout strong { color: var(--ink); }
.sound {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px 6px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 2px solid var(--ink); font-weight: 700; font-size: .95rem;
}
.sound svg { width: 20px; height: 20px; }
.sound[aria-pressed="false"] { opacity: .45; border-color: currentColor; transition: opacity .2s; }
.sound[aria-pressed="false"]:hover, .sound[aria-pressed="false"]:focus-visible { opacity: 1; }
.sound .wave { display: none; }
.sound[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.sound[aria-pressed="true"] .wave { display: block; }
.sound[aria-pressed="true"] .mute { display: none; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 11vw, 150px) 0; }
.section-head { max-width: 640px; }
.section h2, .download h2 {
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  font-weight: 800; line-height: 1.12; letter-spacing: -.01em;
  text-wrap: balance;
}
.section-head p { margin-top: 18px; color: var(--text-dim); max-width: 58ch; }

/* Spectrum: thirteen mini keys, each plays its interval */
.spectrum {
  display: grid; grid-template-columns: repeat(13, 1fr); gap: 8px;
  margin-top: 48px;
}
.swatch {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  height: 200px; padding: 0 4px 14px;
  border: 0; border-radius: 6px 6px 16px 16px; cursor: pointer;
  background: var(--c);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.12);
  transform-origin: top;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.swatch:hover { transform: translateY(-4px); }
.swatch.down { transform: translateY(4px) scaleY(.98); box-shadow: inset 0 3px 8px rgba(0,0,0,.25); }
.swatch b { font-size: 1.35rem; font-weight: 800; line-height: 1; }
.swatch small { margin-top: 6px; font-size: .78rem; font-weight: 600; line-height: 1.15; text-align: center; opacity: .8; }
.swatch .semi { position: absolute; top: 12px; font-size: .8rem; font-weight: 700; opacity: .55; }

/* Flow: what you practise -> a field of pixel notes -> what you end up with */
.flow-toggle { display: inline-flex; gap: 4px; margin-top: 32px; padding: 4px; border: 2px solid currentColor; border-radius: 999px; }
.flow-toggle button { border: 0; background: transparent; padding: 9px 20px 6px; border-radius: 999px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: background .2s, color .2s; }
.flow-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.flow {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1.15fr) minmax(0, 1fr);
  gap: 0 clamp(48px, 7vw, 120px);
  align-items: center;
  margin-top: 56px;
}
.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.flow-lines path { fill: none; stroke: currentColor; transition: opacity .45s ease; }
.flow-lines .base { stroke-opacity: .3; stroke-width: 1.5; }
.flow-lines .pulse { stroke-opacity: .85; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 14; animation: flow-run 2.6s linear infinite; }
.flow[data-state="tc"] .flow-lines .pulse { animation-duration: 1s; }
.flow-lines .off { opacity: 0; }
@keyframes flow-run { to { stroke-dashoffset: -32; } }

.flow-col h3 { font-size: 1.35rem; font-weight: 800; text-align: center; margin-bottom: 22px; }
.flow-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.flow-box {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 64px; padding: 14px 18px 11px;
  background: var(--bg);
  border: 2px solid currentColor; border-radius: 14px;
  font-weight: 600; font-size: 1.08rem; line-height: 1.25; text-align: center;
  transition: opacity .45s ease, transform .45s var(--ease), color .3s;
}
.flow-box .t { transition: opacity .2s ease, transform .2s ease; }
.flow-box.swap .t { opacity: 0; transform: translateY(6px); }
.flow-box .sw { flex: none; width: 12px; height: 12px; border-radius: 4px; background: var(--c); transition: transform .3s var(--ease); }
.flow[data-state="usual"] .flow-box .sw { transform: scale(0); width: 0; }
.flow[data-state="usual"] .flow-out .flow-box { color: var(--text-dim); border-style: dashed; }
.flow-box.off { opacity: 0; transform: scale(.92); }

.flow-core { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.flow-piano { position: relative; width: 100%; max-width: 460px; padding-top: 150px; }
.fallboard.flat { transform: none; }
.flow-keys { position: relative; height: clamp(120px, 11vw, 150px); }
.flow-keys .key { cursor: default; }
.flow-arcs { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 3; }
.flow-arcs .fall { fill: #8a8a9a; }
.flow-arcs .pair { transition: opacity .9s ease; }
.flow-arcs .pair.gone { opacity: 0; }
.flow-arcs .pair path { fill: none; stroke: var(--c); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .5s var(--ease); }
.flow-arcs .pair rect { fill: var(--c); }
.flow-arcs .pair text { font: 800 17px var(--font); fill: var(--ink); }
.flow-arcs .pair rect, .flow-arcs .pair text { opacity: 0; transition: opacity .25s ease .35s; }
.flow-arcs .pair.drawn path { stroke-dashoffset: 0; }
.flow-arcs .pair.drawn rect, .flow-arcs .pair.drawn text { opacity: 1; }
.flow-chip { padding: 7px 18px 4px; border: 2px solid currentColor; border-radius: 999px; font-weight: 700; white-space: nowrap; }

/* Chords: a stack of intervals, then a progression of root moves */
.chord-lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 32px clamp(32px, 6vw, 96px); align-items: center; margin-top: 48px; }
.chord-pick { display: flex; flex-direction: column; gap: 10px; }
.chord-btn {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 14px 20px 11px; border: 2px solid currentColor; border-radius: 14px;
  background: transparent; font-weight: 700; font-size: 1.1rem; text-align: left; cursor: pointer;
  transition: background .2s, color .2s;
}
.chord-btn small { font-weight: 600; font-size: .95rem; color: var(--text-dim); white-space: nowrap; }
.chord-btn[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.chord-btn[aria-pressed="true"] small { color: #c9c3b6; }
.chord-stack { margin: 0; display: flex; flex-direction: column-reverse; align-items: stretch; max-width: 420px; justify-self: center; width: 100%; }
.cs-note { display: flex; align-items: center; gap: 14px; }
.cs-note b { display: grid; place-items: center; width: 64px; height: 52px; padding-top: 4px; border-radius: 14px; background: var(--ink); color: var(--cream); font-size: 1.5rem; font-weight: 800; }
.cs-note span { font-weight: 600; color: var(--text-dim); }
.cs-gap { display: flex; align-items: center; gap: 16px; margin: 4px 0 4px 23px; }
.cs-bar { width: 18px; height: calc(var(--s) * 19px); border-radius: 6px; background: var(--c); }
.cs-gap strong { font-size: 1.4rem; font-weight: 800; }
.cs-gap span { color: var(--text-dim); font-weight: 600; }
.chord-stack figcaption { order: -1; margin-top: 18px; font-weight: 700; font-size: 1.15rem; }
.chord-stack.build .cs-note, .chord-stack.build .cs-gap { animation: stack-in .4s var(--ease) both; animation-delay: calc(var(--i) * 180ms); }
@keyframes stack-in { from { opacity: 0; transform: translateY(14px); } }

.prog-head { margin-top: clamp(72px, 9vw, 120px); max-width: 640px; }
.prog-head h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; line-height: 1.2; }
.prog-head p { margin-top: 14px; color: var(--text-dim); }
.nowrap { white-space: nowrap; }
.prog { list-style: none; padding: 0; margin: 40px 0 32px; display: flex; align-items: center; gap: 12px; }
.prog-chord {
  flex: 1; min-width: 0; padding: 18px 18px 16px;
  border: 2px solid currentColor; border-radius: 18px; background: var(--bg);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.prog-chord.on { transform: translateY(-4px); box-shadow: 0 6px 0 currentColor; }
.prog-chord .rn { font-size: 2rem; font-weight: 800; line-height: 1; }
.prog-chord .nm { margin-top: 6px; font-weight: 700; }
.prog-chord .nt { color: var(--text-dim); font-weight: 600; font-size: .95rem; }
.prog-chord .bars { display: flex; gap: 4px; margin-top: 12px; }
.prog-chord .bars i { height: 8px; border-radius: 4px; background: var(--c); flex: var(--s); }
.prog-move { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 700; font-size: .9rem; color: var(--text-dim); transition: color .2s; }
.prog-move b { display: grid; place-items: center; min-width: 46px; height: 34px; padding: 4px 10px 0; border-radius: 10px; background: var(--c); color: var(--ink); font-size: 1.05rem; font-weight: 800; }
.prog-move.on { color: var(--fg); }

/* Units in two stages */
.unit-stage { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 64px; font-size: 1.35rem; font-weight: 800; }
.unit-stage + .units { margin-top: 18px; }
#units > .unit-stage:first-child { margin-top: 40px; }
.unit-stage .soon { font-size: .9rem; font-weight: 700; padding: 4px 12px 2px; border-radius: 999px; border: 2px dashed currentColor; color: var(--text-dim); }
.unit.soon .unit-n { background: transparent; border: 2px dashed var(--c); box-shadow: none; color: var(--text-dim); }
.unit.soon h3 { color: var(--text-dim); }

/* Screens */
.screens { display: flex; justify-content: center; align-items: flex-start; gap: clamp(16px, 4vw, 56px); margin-top: 64px; }
.screens figure { margin: 0; width: min(280px, 30%); }
.screens img { border-radius: 34px; border: 8px solid #0d0c12; background: #0d0c12; box-shadow: 0 0 0 2px rgba(255,255,255,.14), 0 40px 60px -30px rgba(0, 0, 0, .6); height: auto; }
.screens .lift { margin-top: -40px; }
.screens figcaption { margin-top: 18px; text-align: center; font-weight: 600; color: var(--text-dim); }

/* Units */
.units { list-style: none; padding: 0; margin: 0; }
.unit {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 8px 28px; align-items: center;
  padding: 26px 0; border-bottom: 2px solid color-mix(in srgb, currentColor 12%, transparent);
}
.unit:first-child { border-top: 2px solid color-mix(in srgb, currentColor 12%, transparent); }
.unit-n { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; padding-top: 4px; background: var(--c); font-weight: 800; font-size: 1.8rem; box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 60%, black); }
.unit h3 { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.unit p { color: var(--text-dim); }
.unit-lessons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 420px; }
.unit-lessons span { font-size: .9rem; font-weight: 600; padding: 4px 12px 2px; border-radius: 999px; background: color-mix(in srgb, currentColor 8%, transparent); color: var(--text-dim); white-space: nowrap; }

/* Download band: the one dark surface, like the fallboard */
/* Download: sits on its own colour, with a second playable piano in the same fallboard as the hero */
.download {
  /* A full screen tall, so the slow fade into dark has room to finish before the page ends */
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(100px, 12vw, 160px) clamp(80px, 10vw, 140px);
}
.download-inner { text-align: center; padding-inline: clamp(0px, 4vw, 64px); }
.download-inner p { margin: 18px auto 0; max-width: 46ch; color: var(--text-dim); }
.download .hint { color: var(--text-dim); }
.btn-light { background: var(--cream); color: var(--ink); box-shadow: 0 4px 0 #b9ad97; }
.btn-light:hover { box-shadow: 0 5px 0 #b9ad97; }
.btn-light:active { box-shadow: 0 0 0 #b9ad97; }
.btn-light:focus-visible { outline-color: var(--cream); }
.mini-keys {
  --pad: 14px;
  display: flex; gap: 3px; position: relative;
  height: 160px; margin-top: 56px;
  padding: 24px var(--pad) var(--pad);
  background: linear-gradient(180deg, #24232b 0%, var(--ebony) 40%);
  border-radius: 26px;
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 0 0 1px rgba(255,255,255,.08), 0 30px 40px -28px rgba(0, 0, 0, .5);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.mini-keys::before { content: ""; position: absolute; left: var(--pad); right: var(--pad); top: 14px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, #6d1f27, #8b2a33, #6d1f27); }
.mk { border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .09s ease-out; }
.mk.white { flex: 1; border-radius: 2px 2px 8px 8px; background: linear-gradient(180deg, #fffefb, #e6dfd1); }
.mk.black { position: absolute; top: 24px; height: calc((100% - 24px - var(--pad)) * .62); z-index: 2; background: linear-gradient(180deg, #3a3844, #0b0a0f); border-radius: 0 0 5px 5px; }
.mk.lit { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 45%, white) 0%, var(--c) 100%); }
.mk.down { transform: translateY(3px); }
.mk:focus-visible { outline: 3px solid var(--cream); outline-offset: -3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; }
  .hero-copy { order: -1; }
  .stage { padding-top: 110px; }
  .spectrum { grid-template-columns: repeat(7, 1fr); }
  .swatch { height: 150px; }
  .flow { grid-template-columns: 1fr; gap: 28px; margin-top: 40px; }
  .flow-lines { display: none; }
  .flow-box.off { display: none; }
  .flow-core { order: 0; }
  .flow-col h3 { text-align: left; margin-bottom: 14px; }
  .flow-col ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
  .flow-box { min-height: 52px; justify-content: flex-start; text-align: left; }
  .flow-piano { padding-top: 120px; }
  .unit { grid-template-columns: 76px 1fr; }
  .chord-lab { grid-template-columns: 1fr; }
  .chord-stack { justify-self: start; }
  .prog { flex-direction: column; align-items: stretch; }
  .prog-move { flex-direction: row; justify-content: center; }
  .unit-lessons { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 640px) {
  body { font-size: 1.05rem; }
  .nav { padding-block: 22px 8px; flex-wrap: wrap; }
  .logo { font-size: 2rem; }
  .nav nav a { font-size: 1.05rem; }
  .hero h1 { line-height: 1.3; }
  .fallboard { padding: 22px 8px 8px; border-radius: 20px; transform: none; }
  .fallboard::before { left: 8px; right: 8px; top: 12px; }
  .bubble b { min-width: 52px; height: 46px; font-size: 1.35rem; }
  .spectrum { grid-template-columns: repeat(4, 1fr); }
  .swatch { height: 120px; }
  .screens { flex-direction: column; align-items: center; }
  .screens figure { width: min(280px, 80%); }
  .screens .lift { margin-top: 0; }
  .unit { grid-template-columns: 1fr; }
  .unit-lessons { grid-column: 1; }
  .mini-keys { height: 120px; --pad: 8px; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  /* Interval names still need time on screen: fade only, no movement */
  .bubble { animation: fade 2.2s linear forwards !important; transform: translateX(-50%); }
  @keyframes fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
}
