/* Self-hosted Google Fonts (Latin subset, OFL). No request to Google = faster first paint and no visitor IP sent to a third party. */
@font-face { font-family: 'Big Shoulders Display'; font-style: normal; font-weight: 700 900; font-display: swap; src: url(/assets/fonts/big-shoulders-display.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/instrument-sans.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/ibm-plex-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/ibm-plex-mono-500.woff2) format('woff2'); }

:root {
  --bg: #0f0e11;
  --bg-raised: #17151a;
  --chassis-hi: #242127;
  --chassis-lo: #18161b;
  --pad-hi: #2e2a31;
  --pad-lo: #221f25;
  --line: rgba(243, 237, 226, 0.08);
  --ink: #f3ede2;
  --ink-soft: #c9c1b4;
  --muted: #8f877c;
  --accent: #ff5b1f;
  --accent-ink: #1a0b04;

  --font-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 26px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
}

body[data-kit='hand'] {
  --accent: #f2a33a;
  --accent-ink: #1c1003;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

/* min-height: the body background is painted over the root box; on short pages (go, 404) it would
   otherwise end mid-screen and the glow would repeat below it. */
html { -webkit-text-size-adjust: 100%; min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 70% 45% at 72% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%) no-repeat,
    var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  transition: background-color .4s;
  overflow-x: hidden;
}

/* Film grain over everything, very faint. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 .35em;
  margin: 0 .08em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-raised);
  font: 500 .78em/1.55 var(--font-mono);
  text-align: center;
  color: var(--ink);
}

/* Platform-specific bits. Default to desktop until JS knows better. */
.only-mobile { display: none; }
[data-platform='mobile'] .only-mobile { display: revert; }
[data-platform='mobile'] .only-desktop { display: none; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 900 22px/1 var(--font-display);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.logo svg { width: 22px; height: 22px; fill: var(--pad-hi); }
.logo svg .lit { fill: var(--accent); transition: fill .4s; }
.logo-tld { color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--ink-soft); }
.site-nav a:hover { color: var(--ink); }

/* The one filled item in the nav: getting the app is the site's goal. */
.nav-app {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink) !important;
  font-weight: 600;
  box-shadow: 0 6px 20px -8px var(--accent);
  transition: filter .2s, transform .12s, background-color .4s;
}
.nav-app:hover { filter: brightness(1.08); transform: translateY(-1px); }
.nav-app svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 720px) {
  .site-nav a:not(.nav-app) { display: none; }
  .logo { font-size: 19px; }
}
/* Keep the logo and the app button on one line down to 320px phones. */
.nav-app { flex: none; white-space: nowrap; }
.logo { min-width: 0; }
@media (max-width: 400px) {
  .site-header { gap: 10px; }
  .logo { gap: 7px; font-size: 16px; }
  .logo svg { width: 18px; height: 18px; }
  .nav-app { padding: 8px 13px 8px 11px; font-size: 14px; gap: 5px; }
  .nav-app svg { width: 14px; height: 14px; }
}
@media (max-width: 340px) {
  .logo { font-size: 14.5px; }
  .nav-app svg { display: none; }
  .nav-app { padding-left: 13px; }
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'title' 'device' 'beat' 'copy';
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px var(--gutter) 48px;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: 'title device' 'copy device' 'beat device';
    grid-template-rows: auto auto 1fr;
    row-gap: 28px;
    column-gap: 56px;
    padding-top: 40px;
    padding-bottom: 88px;
  }
  .hero-title { font-size: clamp(52px, 5.9vw, 96px); }
}

.hero-title {
  grid-area: title;
  align-self: end;
  margin: 0;
  font: 900 clamp(44px, 12vw, 112px)/.86 var(--font-display);
  letter-spacing: -.01em;
  text-transform: uppercase;
  animation: rise .7s cubic-bezier(.2, .8, .2, 1) both;
}

.hero-title em {
  display: block;
  font-style: normal;
  color: var(--accent);
  transition: color .4s;
}

.hero-copy {
  grid-area: copy;
  animation: rise .7s .12s cubic-bezier(.2, .8, .2, 1) both;
}

.lede { margin: 0 0 12px; font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-soft); max-width: 34em; }
.hint { margin: 0; font: 400 13px/1.5 var(--font-mono); color: var(--muted); max-width: 40em; }

.hero-device { grid-area: device; min-width: 0; }

/* ---------- Device ---------- */

.device {
  position: relative;
  max-width: 580px;
  margin: 0 auto;
  padding: clamp(14px, 3vw, 26px);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--chassis-hi), var(--chassis-lo) 60%);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 40px 80px -30px rgba(0, 0, 0, .8),
    0 0 0 1px rgba(0, 0, 0, .4);
  animation: rise .8s .05s cubic-bezier(.2, .8, .2, 1) both;
}

/* Screws. */
.device::before, .device::after {
  content: '';
  position: absolute;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4a454e, #121014);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5);
}
.device::before { left: 10px; }
.device::after { right: 10px; }

.device-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: clamp(12px, 2.4vw, 20px);
}

.lcd {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0a0a0b;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .05);
  font: 500 12px/1.35 var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 8px color-mix(in srgb, var(--accent) 55%, transparent);
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: color .4s;
}

.lcd-row { display: flex; gap: 8px; white-space: nowrap; overflow: hidden; }
.lcd-row span { overflow: hidden; text-overflow: ellipsis; }
.lcd-label { opacity: .55; }
.lcd-label ~ .lcd-label { margin-left: auto; }
.lcd-main { font-size: 17px; letter-spacing: .04em; }

.controls { display: grid; gap: 8px; align-content: center; }
.kit-switch, .tempo { display: flex; gap: 6px; }

.hw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #34303a, #28252c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 2px 0 #0d0c0f, 0 3px 6px rgba(0, 0, 0, .4);
  color: var(--ink-soft);
  font: 500 11.5px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: color .15s, transform .08s, box-shadow .08s;
}

.hw-btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 #0d0c0f; }
.hw-btn[aria-pressed='true'] { color: var(--ink); background: linear-gradient(180deg, #3d3842, #2f2b34); }
.kit-switch .hw-btn[aria-pressed='true'] { color: var(--accent); }
.hw-small { flex: 0 0 34px; padding: 0; font-size: 16px; }

.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a2a24;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5);
}
#metro[aria-pressed='true'] .led { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

@media (max-width: 440px) {
  .device-panel { grid-template-columns: 1fr; }
  .controls { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .kit-switch, .tempo { gap: 4px; min-width: 0; }
  .hw-btn { padding: 0 8px; font-size: 10.5px; letter-spacing: .04em; gap: 5px; }
  .hw-small { flex-basis: 30px; font-size: 15px; }
}

/* ---------- Pads ---------- */

.pads {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.8vw, 14px);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.pad {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: clamp(10px, 2vw, 16px);
  background: linear-gradient(165deg, var(--pad-hi), var(--pad-lo));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    inset 0 -3px 6px rgba(0, 0, 0, .35),
    0 3px 0 #0c0b0e,
    0 6px 14px rgba(0, 0, 0, .45);
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  animation: pad-in .5s calc(.25s + var(--i) * .025s) cubic-bezier(.2, .8, .2, 1) both;
}

/* Light layer: only opacity animates, so hits stay cheap on phones. */
.pad::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--accent) 95%, white) 0%, var(--accent) 35%, color-mix(in srgb, var(--accent) 30%, transparent) 75%);
  opacity: 0;
}

.pad[data-hit='a']::before { animation: glow-a .32s ease-out; }
.pad[data-hit='b']::before { animation: glow-b .32s ease-out; }
.pad[data-hit='a'] { animation: press-a .14s ease-out; }
.pad[data-hit='b'] { animation: press-b .14s ease-out; }

@keyframes glow-a { from { opacity: var(--vel, 1); } to { opacity: 0; } }
@keyframes glow-b { from { opacity: var(--vel, 1); } to { opacity: 0; } }
@keyframes press-a { from { transform: scale(.955); } to { transform: none; } }
@keyframes press-b { from { transform: scale(.955); } to { transform: none; } }

.pad:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.pad-key, .pad-name {
  position: absolute;
  left: 9px;
  z-index: 1;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events: none;
}

.pad-key { top: 9px; color: var(--ink-soft); opacity: .7; }
.pad-name { bottom: 9px; right: 6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pad[data-hit] .pad-name, .pad[data-hit] .pad-key { transition: color .3s; }

/* Key labels only make sense with a keyboard. */
@media (hover: none), (pointer: coarse) {
  .pad-key { display: none; }
}

@media (max-width: 400px) {
  .pad-name { font-size: 9.5px; left: 7px; bottom: 7px; }
}

.device-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding: 0 2px;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #57515b;
}

/* ---------- Nudge ---------- */

.nudge {
  position: relative;
  max-width: 580px;
  margin: 16px 0 0;
  padding: 18px 44px 18px 20px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-raised));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s, transform .4s cubic-bezier(.2, .8, .2, 1);
}
.nudge.is-in { opacity: 1; transform: none; }
.hero-device .nudge { margin-inline: auto; }
.nudge p { margin: 0 0 12px; color: var(--ink-soft); font-size: 15px; }
.nudge .nudge-title { margin-bottom: 6px; font: 900 24px/1 var(--font-display); text-transform: uppercase; color: var(--ink); }
.nudge-desktop { display: flex; align-items: center; gap: 16px; }
.nudge-desktop p { margin: 0; }
.nudge-desktop .qr-pair { flex: none; }

.nudge-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.nudge-close:hover { color: var(--ink); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--ink);
  font: 600 15px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .12s, background-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-accent { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; }

/* App download button. Deliberately unlike .btn: taller, store-badge shape, glow, download icon,
   so "get the app" reads as the main action wherever it appears. */
.btn-app {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 9px 24px 9px 16px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  text-align: left;
  box-shadow: 0 12px 32px -12px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .28);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .12s, filter .2s, box-shadow .2s, background-color .4s;
}
.btn-app:hover { transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 16px 40px -12px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn-app:active { transform: translateY(1px); }
.btn-app:focus-visible, .nav-app:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn-app-icon { flex: none; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-app-text { display: grid; gap: 4px; }
.btn-app-text small { font: 500 11px/1 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; opacity: .8; }
.btn-app-text b { font: 900 23px/.95 var(--font-display); letter-spacing: .01em; text-transform: uppercase; }
/* On phones there is one button per spot, so make it a full-width target. */
[data-platform='mobile'] .btn-app { display: flex; width: 100%; justify-content: center; }

/* ---------- Sections ---------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) var(--gutter);
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 16px;
  font: 900 clamp(32px, 5vw, 52px)/.95 var(--font-display);
  text-transform: uppercase;
}

.section p { color: var(--ink-soft); }

.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head p { margin: 0; }

/* ---------- First beat ---------- */

.hero-beat { grid-area: beat; min-width: 0; animation: rise .7s .2s cubic-bezier(.2, .8, .2, 1) both; }
.hero-beat h2 { margin: 0 0 6px; font: 900 clamp(24px, 3vw, 30px)/1 var(--font-display); text-transform: uppercase; }
.hero-beat > p { margin: 0 0 14px; font-size: 15px; color: var(--ink-soft); max-width: 36em; }

.beat-box {
  display: grid;
  gap: 16px;
  justify-items: start;
  padding: clamp(14px, 2.4vw, 22px);
  border-radius: var(--radius);
  background: var(--bg-raised);
  border: 1px solid var(--line);
}

.seq { display: grid; gap: 8px; width: 100%; }

.seq-row {
  display: grid;
  grid-template-columns: clamp(84px, 26%, 128px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.seq-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 34px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: 500 12px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  touch-action: manipulation;
}
.seq-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seq-label kbd { font-size: 10px; }
@media (hover: none), (pointer: coarse) { .seq-label kbd { display: none; } }
.seq-label[aria-pressed='true'] { color: var(--muted); border-style: dashed; }

.seq-cells {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 3px;
}

.seq-cell {
  aspect-ratio: 1 / 1.3;
  max-height: 34px;
  border-radius: 4px;
  background: #242127;
}
.seq-cell:nth-child(4n + 1) { background: #2c2830; }
.seq-cell:nth-child(4n):not(:last-child) { margin-right: 4px; }
.seq-cell.is-on { background: color-mix(in srgb, var(--accent) 70%, #2c2830); }
.is-muted .seq-cell.is-on { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, transparent); }
.seq-cell.is-now { outline: 1.5px solid var(--ink); outline-offset: 1px; }
.seq-cell.is-on.is-now { background: var(--accent); box-shadow: 0 0 12px var(--accent); }

@media (max-width: 520px) {
  .seq-cells { gap: 2px; }
  .seq-cell:nth-child(4n):not(:last-child) { margin-right: 2px; }
}

/* ---------- Prose ---------- */

.prose {
  display: grid;
  gap: 40px;
}
@media (min-width: 900px) {
  .prose { grid-template-columns: 1fr 1fr; gap: 64px; }
}
.prose-col p { margin: 0 0 16px; }

.tips { margin: 0; padding: 0; list-style: none; counter-reset: tip; }
.tips li {
  position: relative;
  margin-bottom: 14px;
  padding-left: 44px;
  color: var(--ink-soft);
  counter-increment: tip;
}
.tips li::before {
  content: counter(tip, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font: 500 13px/1.6 var(--font-mono);
  color: var(--accent);
}
.tips strong { color: var(--ink); font-weight: 600; }

/* ---------- App CTA ---------- */

.app-cta {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 760px) {
  .app-cta { grid-template-columns: 1fr auto; }
}

.app-features { margin: 0 0 24px; padding: 0; list-style: none; }
.app-features li {
  padding: 8px 0 8px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  background: linear-gradient(var(--accent), var(--accent)) 0 50% / 8px 8px no-repeat;
}
.store-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* Under the hero pad: the first app CTA a visitor sees, once they've tried the pads. */
.hero-app { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 22px; }
.hero-app-note { font: 500 12px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
[data-platform='mobile'] .hero-app-note { display: none; }

/* Slim CTA: a line of copy and the app button. */
.app-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 40px 0 8px;
  padding: 18px 18px 18px 22px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-raised));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.section-strip { padding-block: 0 40px; border-top: 0; }
.section-strip .app-strip { margin: 0; }
.app-strip p { flex: 1 1 260px; margin: 0; color: var(--ink-soft); }
.app-strip strong { display: block; margin-bottom: 4px; font: 900 24px/1.05 var(--font-display); text-transform: uppercase; color: var(--ink); }

.qr { margin: 0; text-align: center; }
.qr img { display: block; border-radius: 14px; box-shadow: 0 0 0 8px var(--ink); margin: 8px auto 18px; }
.qr figcaption { font: 500 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Desktop QR codes: App Store and Google Play side by side, labelled by phone. */
.qr-pair { display: flex; gap: 28px; }
.qr-pair .qr figcaption { color: var(--ink-soft); }
.qr-sm { gap: 20px; }
.qr-sm .qr img { border-radius: 8px; box-shadow: 0 0 0 5px var(--ink); margin: 5px auto 12px; }
.qr-sm .qr figcaption { font-size: 11px; }

/* ---------- FAQ ---------- */

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 500 20px/1 var(--font-mono); color: var(--accent); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 18px; }

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ==========================================================================
   Practice page
   ========================================================================== */

.site-nav a[aria-current='page'] { color: var(--ink); }
.hw-btn:disabled { opacity: .45; cursor: default; }
.prose h3 { margin: 24px 0 6px; font-size: 18px; }
.prose-col > h2 + h3 { margin-top: 8px; }
.prose-col > h2:not(:first-child) { margin-top: 40px; }

/* Shared with the controllers page headline. */
.play-intro h1 { margin: 0; font: inherit; }
/* Headlines with a long word: scale to the column so they never run into the device. */
.hero-title--long { container-type: inline-size; }
.hero-title--long h1 { font-size: min(1em, 14cqi); }

/* Each game has its own colour; the page takes it on while that game is open. */
[data-game='groove'] { --accent: #ff5b1f; --accent-ink: #1a0b04; }
[data-game='orbit'] { --accent: #35d6c2; --accent-ink: #03201c; }
[data-game='ladder'] { --accent: #e4f24a; --accent-ink: #1a1d00; }
[data-game='echo'] {
  --accent: #ff4f9a;
  --accent-ink: #2a0514;
  --q0: #ff4f9a;
  --q1: #ffc247;
  --q2: #f3ede2;
  --q3: #35d6c2;
}

.practice { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.practice-head {
  display: grid;
  gap: 12px;
  padding: 4px 0 20px;
}
@media (min-width: 960px) {
  .practice-head {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: end;
    column-gap: 56px;
    padding: 28px 0 32px;
  }
}
.practice-title { grid-area: auto; font-size: clamp(44px, 11vw, 96px); }
.practice-title h1 { margin: 0; font: inherit; }
.practice-head .lede { margin: 0; }

/* ---------- Game picker ---------- */

.game-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
@media (min-width: 860px) {
  .game-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
}

.game-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-raised);
  color: var(--ink);
  text-decoration: none;
  touch-action: manipulation;
  transition: border-color .2s, background-color .2s, transform .15s;
}
.game-card:hover { transform: translateY(-2px); }
.game-card[aria-current='true'] {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, var(--bg-raised));
}
.game-card svg { width: 40px; height: 40px; overflow: visible; }
.gc-text { display: grid; gap: 3px; min-width: 0; }
.gc-name { font: 900 22px/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; }
.gc-skill { font-size: 13px; line-height: 1.3; color: var(--muted); }
.gc-best {
  grid-column: 1 / -1;
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (max-width: 520px) {
  .game-card { grid-template-columns: 30px minmax(0, 1fr); column-gap: 10px; padding: 11px 12px; border-radius: 14px; }
  .game-card svg { width: 30px; height: 30px; }
  .gc-name { font-size: 19px; }
  .gc-skill { font-size: 12px; }
}

.ic-faint { fill: none; stroke: rgba(243, 237, 226, .14); stroke-width: 1.5; }
.ic-line { fill: none; stroke: rgba(243, 237, 226, .45); stroke-width: 2; }
.ic-acc { fill: var(--accent); }
.ic-ink { fill: var(--ink); }
.ic-soft { fill: var(--muted); }
.ic-ring { fill: none; stroke: var(--accent); stroke-width: 1.8; }
.ic-acc-s { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; opacity: .6; }
.ic-ink-s { fill: none; stroke: var(--ink); stroke-width: 2; opacity: .5; }
.ic-sweep { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.ic-q0 { fill: var(--q0); }
.ic-q1 { fill: var(--q1); }
.ic-q2 { fill: var(--q2); }
.ic-q3 { fill: var(--q3); }
.ic-hub { fill: var(--bg-raised); stroke: rgba(243, 237, 226, .2); stroke-width: 1.5; }

/* ---------- Stage ---------- */

.stage {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: min(780px, calc(100svh - 20px));
  min-height: 540px;
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--chassis-hi), var(--chassis-lo) 60%);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 40px 80px -30px rgba(0, 0, 0, .8),
    0 0 0 1px rgba(0, 0, 0, .4);
  scroll-margin-top: 10px;
  transition: box-shadow .3s;
}
.stage.is-playing {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent),
    0 40px 80px -30px rgba(0, 0, 0, .8);
}

@media (max-width: 700px) {
  .stage {
    height: calc(100svh - 10px);
    min-height: 480px;
    margin-inline: calc(6px - var(--gutter));
    padding: 8px;
    border-radius: 20px;
    scroll-margin-top: 5px;
  }
}

.stage-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px 12px;
  padding: 0 0 10px;
  min-width: 0;
}
.stage-options { display: flex; flex-wrap: wrap; gap: 6px 14px; flex: 1 1 auto; min-width: 0; }
.opt-group { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.opt-label {
  flex: none;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.opt-chips {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.opt-chips::-webkit-scrollbar { display: none; }
/* Fade the edge when the chips scroll, so a cut-off chip reads as "more this way". */
.opt-chips.is-overflowing { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 20px; }
.opt-chips.is-overflowing.at-end { -webkit-mask-image: none; mask-image: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: 600 13px/1 var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}
.chip:hover { color: var(--ink); }
.chip[aria-checked='true'] { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.chip small { font: 500 10px/1 var(--font-mono); opacity: .7; }
.stage-tools { display: flex; gap: 6px; flex: none; margin-left: auto; }
.stage-tools .hw-btn { flex: none; min-height: 32px; }
#calib-val { color: var(--accent); }

@media (max-width: 700px) {
  .stage-bar { flex-wrap: wrap; padding-bottom: 8px; }
  .stage-options { order: 2; flex-basis: 100%; }
  .stage-tools { order: 1; width: 100%; }
  .stage-tools .hw-btn { flex: 1; }
  .opt-label { display: none; }
  .chip { min-height: 30px; padding: 0 11px; font-size: 12.5px; }
}

/* HUD: three readouts plus the groove meter and combo charge. */
.hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 12px;
  margin-bottom: 10px;
  padding: 9px 14px 8px;
  border-radius: 12px;
  background: #0a0a0b;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .05);
}
.hud-cell { display: grid; gap: 3px; min-width: 0; }
.hud-cell:nth-child(2) { text-align: center; }
.hud-cell:nth-child(3) { text-align: right; }
.hud-label, .hud-value { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hud-label {
  min-height: 10px;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hud-value {
  font: 900 clamp(20px, 3.4vw, 26px)/1 var(--font-display);
  letter-spacing: .03em;
  color: var(--accent);
  text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 45%, transparent);
}
.hud-meters {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  row-gap: 3px;
  margin-top: 8px;
}
.hud-meter-label {
  grid-row: span 2;
  font: 500 9.5px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.hud-meter { grid-column: 2; height: 4px; border-radius: 2px; background: rgba(243, 237, 226, .08); overflow: hidden; }
.stage.no-meter .hud-meters { display: none; }
.hud-meter i { display: block; height: 100%; background: var(--ink); transform-origin: left; transition: transform .15s, background-color .2s; }
.hud-charge { height: 2px; }
.hud-charge i { background: var(--accent); }
.hud-health.is-low i { background: #ff5a5a; }

.stage-body { position: relative; min-height: 0; }
.game-root {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  height: 100%;
  min-height: 0;
}
.stage-noscript { margin: auto; color: var(--ink-soft); }

.screen {
  position: relative;
  min-height: 0;
  border-radius: 14px;
  background: #0b0a0d;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .04);
  overflow: hidden;
}
.screen canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

/* ---------- Game pads ---------- */

.gpads {
  display: grid;
  gap: 10px;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* Lanes line up with the Groove highway above them. */
.gpads-lanes { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 560px); height: clamp(88px, 24svh, 150px); margin: 0 auto; }
.gpads-hands { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 640px); height: clamp(110px, 28svh, 190px); margin: 0 auto; }

.gpad {
  --glow: var(--accent);
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(165deg, var(--pad-hi), var(--pad-lo));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    inset 0 -3px 6px rgba(0, 0, 0, .35),
    0 3px 0 #0c0b0e,
    0 6px 14px rgba(0, 0, 0, .45);
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.gpad::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--glow) 95%, white) 0%, var(--glow) 35%, color-mix(in srgb, var(--glow) 30%, transparent) 75%);
  opacity: 0;
}
.gpad[data-hit='a']::before { animation: glow-a .3s ease-out; }
.gpad[data-hit='b']::before { animation: glow-b .3s ease-out; }
.gpad[data-hit='a'] { animation: press-a .12s ease-out; }
.gpad[data-hit='b'] { animation: press-b .12s ease-out; }
.gpad:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.gpad-key, .gpad-name {
  position: absolute;
  z-index: 1;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events: none;
}
.gpad-key { top: 10px; left: 10px; color: var(--ink-soft); opacity: .7; }
.gpad-name { bottom: 10px; left: 10px; right: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
.gpad-count {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font: 900 clamp(34px, 7vw, 60px)/1 var(--font-display);
  pointer-events: none;
}
.gpad-left { --glow: var(--ink); }
.gpad-left .gpad-count { color: var(--ink); }
.gpad-right .gpad-count { color: var(--accent); }
.gpad.is-auto { opacity: .4; }
.gpad.is-auto .gpad-name::after { content: ' · plays itself'; }

/* A strip on each lane pad in the colour of its notes. */
.gpads-lanes .gpad::after {
  content: '';
  position: absolute;
  top: 0;
  left: 22%;
  right: 22%;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--lane);
}
.gpads-lanes .gpad:nth-child(1) { --lane: var(--accent); }
.gpads-lanes .gpad:nth-child(2) { --lane: var(--ink); --glow: var(--ink); }
.gpads-lanes .gpad:nth-child(3) { --lane: var(--muted); --glow: var(--ink-soft); }
.gpads-lanes .gpad:nth-child(4) { --lane: transparent; }
.gpads-lanes .gpad:nth-child(4)::after { box-shadow: inset 0 0 0 1.5px var(--accent); }

@media (hover: none), (pointer: coarse) {
  .gpad-key { display: none; }
}

@media (max-width: 700px) {
  /* Phones: pads fill the bottom of the screen, under your thumbs. */
  .gpads-lanes { height: clamp(100px, 28svh, 230px); }
  .gpads-hands { height: clamp(110px, 27svh, 240px); }
}

@media (max-width: 520px) {
  .gpads { gap: 8px; }
  .gpad-name { font-size: 9.5px; left: 8px; bottom: 8px; }
}

/* ---------- Echo: a disc of four hand drums ---------- */

.stage[data-game='echo'] .game-root { grid-template-rows: auto minmax(0, 1fr); }

.echo-strips {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #0b0a0d;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, .85);
}
.echo-strip { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; }
.echo-strip > span { font: 500 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.echo-cells { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; }
.echo-cells i { height: 16px; border-radius: 4px; background: rgba(243, 237, 226, .05); transition: background-color .08s; }
.echo-cells i:nth-child(4n + 1) { background: rgba(243, 237, 226, .1); }
.echo-cells i[data-pad='0'].is-on { background: var(--q0); }
.echo-cells i[data-pad='1'].is-on { background: var(--q1); }
.echo-cells i[data-pad='2'].is-on { background: var(--q2); }
.echo-cells i[data-pad='3'].is-on { background: var(--q3); }
.echo-cells i.is-missed { opacity: .35; box-shadow: inset 0 0 0 2px #ff5a5a; }
.echo-cells i.is-extra { box-shadow: inset 0 0 0 2px #ff5a5a; }
/* While you answer from memory the call is covered. */
.echo-strip.is-masked .echo-cells i { background: rgba(243, 237, 226, .05) !important; }
.echo-strip.is-masked > span::after { content: ' ?'; color: var(--accent); }

.echo-wrap { container-type: size; display: grid; place-items: center; min-height: 0; }

.echo-disc {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  width: min(100cqw, 100cqh);
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 50%;
  background: #0b0a0d;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, .85), 0 0 0 1px var(--line);
  transition: box-shadow .2s;
}
.game-root[data-phase='answer'] .echo-disc {
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, .85),
    0 0 0 2px var(--accent),
    0 0 44px -6px color-mix(in srgb, var(--accent) 60%, transparent);
}

.echo-q {
  --glow: var(--qc);
  border-radius: 6px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--qc) 24%, var(--pad-hi)), color-mix(in srgb, var(--qc) 10%, var(--pad-lo)));
}
.echo-q[data-q='0'] { --qc: var(--q0); border-top-left-radius: 100%; }
.echo-q[data-q='1'] { --qc: var(--q1); border-top-right-radius: 100%; }
.echo-q[data-q='2'] { --qc: var(--q2); border-bottom-left-radius: 100%; }
.echo-q[data-q='3'] { --qc: var(--q3); border-bottom-right-radius: 100%; }
.echo-q .gpad-name { right: auto; font-size: 12px; color: var(--ink-soft); }
.echo-q .gpad-key { font-size: 13px; opacity: .6; }
.echo-q[data-q='0'] .gpad-name, .echo-q[data-q='2'] .gpad-name { left: 26%; }
.echo-q[data-q='1'] .gpad-name, .echo-q[data-q='3'] .gpad-name { left: auto; right: 26%; }
.echo-q[data-q='0'] .gpad-name, .echo-q[data-q='1'] .gpad-name { top: 44%; bottom: auto; }
.echo-q[data-q='2'] .gpad-name, .echo-q[data-q='3'] .gpad-name { bottom: 44%; }
.echo-q[data-q='0'] .gpad-key, .echo-q[data-q='2'] .gpad-key { left: 26%; }
.echo-q[data-q='1'] .gpad-key, .echo-q[data-q='3'] .gpad-key { left: auto; right: 26%; }
.echo-q[data-q='0'] .gpad-key, .echo-q[data-q='1'] .gpad-key { top: 30%; }
.echo-q[data-q='2'] .gpad-key, .echo-q[data-q='3'] .gpad-key { top: auto; bottom: 30%; }

.echo-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  width: 36%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0a0a0b;
  box-shadow: 0 0 0 8px #0b0a0d, inset 0 2px 10px rgba(0, 0, 0, .9);
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.echo-phase { font: 900 clamp(18px, 5.5cqmin, 34px)/1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; color: var(--accent); }
.echo-sub { min-height: 10px; font: 500 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.echo-beats { display: flex; gap: 5px; margin-top: 3px; }
.echo-beats i { width: 6px; height: 6px; border-radius: 50%; background: #2e2a31; }
.echo-beats i.is-on { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.game-root[data-phase='listen'] .echo-phase { color: var(--ink); }
.game-root[data-phase='fail'] .echo-phase { color: #ff5a5a; }

/* ---------- Overlay: start, results, calibration ---------- */

.overlay {
  position: absolute;
  inset: -2px;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: 16px;
  background: rgba(15, 14, 17, .86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  overflow: auto;
}
.overlay[hidden] { display: none; }

.ov-card { display: grid; justify-items: center; gap: 10px; max-width: 440px; text-align: center; }
.ov-card[hidden] { display: none; }
.ov-kicker { margin: 0; font: 500 12px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ov-title { margin: 0; font: 900 clamp(36px, 7vw, 56px)/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; overflow-wrap: anywhere; }
.ov-desc, .res-stats { margin: 0; color: var(--ink-soft); font-size: 15px; }
.ov-hint { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
#ov-result .ov-title { color: var(--accent); }
.res-best {
  margin: -2px 0 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.res-coach {
  display: grid;
  gap: 5px;
  width: 100%;
  margin: 2px 0 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
}
.res-coach > span:first-child { font: 500 10.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.res-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.res-actions .btn { min-height: 42px; }
.res-cta { width: 100%; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.res-cta p { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); }
.res-cta-desktop { display: flex; align-items: center; justify-content: center; gap: 20px; text-align: left; }
.res-cta-desktop p { margin: 0 0 8px; max-width: 280px; font-size: 13px; }
.res-cta .btn-app { min-height: 50px; padding: 7px 18px 7px 13px; gap: 10px; border-radius: 13px; }
.res-cta .btn-app-icon { width: 22px; height: 22px; }
.res-cta .btn-app-text b { font-size: 19px; }
.res-cta-desktop .qr-pair { flex: none; }

.calib-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; min-height: 10px; margin: 4px 0; }
.calib-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(243, 237, 226, .12); transition: background-color .1s; }
.calib-dots i.is-on { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

@media (max-width: 440px) {
  .ov-card { gap: 8px; }
  .ov-desc, .res-stats { font-size: 14px; }
  .res-coach { font-size: 14px; padding: 10px 12px; }
  .res-cta { padding-top: 8px; }
  .res-cta p { font-size: 13px; margin-bottom: 8px; }
  .res-actions .btn { min-height: 38px; padding: 0 16px; font-size: 14px; }
}

/* Landscape phones: everything has to fit in ~375px of height. */
@media (orientation: landscape) and (max-height: 560px) {
  .stage { height: calc(100svh - 8px); min-height: 0; padding: 6px 8px; border-radius: 16px; scroll-margin-top: 4px; }
  .stage-bar { flex-wrap: nowrap; padding-bottom: 6px; }
  .stage-options { order: 0; flex-basis: auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .stage-tools { order: 0; width: auto; }
  .opt-label { display: none; }
  .chip { min-height: 28px; padding: 0 10px; font-size: 12px; }
  .stage-tools .hw-btn { min-height: 28px; }
  .hud { padding: 5px 12px 5px; margin-bottom: 6px; }
  .hud-label { display: none; }
  .hud-value { font-size: 18px; }
  .hud-meters { margin-top: 5px; }
  .game-root { gap: 6px; }
  .gpads-lanes { height: 24svh; }

  /* Two-hand games: a pad for each hand on either side of the screen. */
  .stage[data-game='orbit'] .game-root,
  .stage[data-game='ladder'] .game-root {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .stage[data-game='orbit'] .gpads-hands,
  .stage[data-game='ladder'] .gpads-hands { display: contents; }
  .stage[data-game='orbit'] .screen,
  .stage[data-game='ladder'] .screen { grid-column: 2; grid-row: 1; }
  .stage[data-game='orbit'] .gpad-left,
  .stage[data-game='ladder'] .gpad-left { grid-column: 1; grid-row: 1; }
  .stage[data-game='orbit'] .gpad-right,
  .stage[data-game='ladder'] .gpad-right { grid-column: 3; grid-row: 1; }

  /* Echo: strips beside the disc. */
  .stage[data-game='echo'] .game-root { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .echo-strips { align-self: center; }
  .echo-cells i { height: 14px; }
}

.key-map li { margin-bottom: 10px; padding-left: 26px; }
.key-map li::before { content: '→'; }

/* ==========================================================================
   Learn page (article)
   ========================================================================== */

.article {
  --measure: 760px;
  --hand-r: #6fb6ff;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 16px var(--gutter) 40px;
}

.article-head { padding: 24px 0 8px; animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.article-kicker { margin: 0 0 12px; font: 500 12px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.article-head h1 {
  margin: 0 0 20px;
  font: 900 clamp(48px, 10vw, 88px)/.88 var(--font-display);
  text-transform: uppercase;
}
.article-head h1 em { display: block; font-style: normal; color: var(--accent); transition: color .4s; }
.article-head .lede { max-width: none; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin: 24px 0 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.facts div { padding: 12px 16px; box-shadow: 1px 1px 0 var(--line); }
.facts dt { font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 15px; }

.toc { margin: 32px 0 8px; padding: 18px 20px; border-radius: 14px; background: var(--bg-raised); border: 1px solid var(--line); }
.toc-title { margin: 0 0 8px; font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding-left: 20px; columns: 2 220px; column-gap: 24px; }
.toc li { margin: 3px 0; color: var(--muted); }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.article-section { padding-top: 48px; scroll-margin-top: 16px; }
.article-section h2 {
  margin: 0 0 16px;
  font: 900 clamp(30px, 5vw, 44px)/.95 var(--font-display);
  text-transform: uppercase;
}
.article-section > p { color: var(--ink-soft); }
.article-section strong { color: var(--ink); font-weight: 600; }
.article-section a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); text-underline-offset: 3px; }

.bullets { margin: 16px 0; padding: 0; list-style: none; }
.bullets li { position: relative; margin: 0 0 10px; padding-left: 22px; color: var(--ink-soft); }
.bullets li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }

/* Hand map */

.hand-map { margin: 24px 0; }
.hand-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 420px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--chassis-hi), var(--chassis-lo));
  border: 1px solid var(--line);
}
.hand-pad {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 10px;
  background: linear-gradient(165deg, var(--pad-hi), var(--pad-lo));
  font: 500 10.5px/1.1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.hand-pad span { color: var(--ink-soft); opacity: .7; }
.hand-l { box-shadow: inset 0 0 0 2px var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 16%, var(--pad-lo)); }
.hand-r { box-shadow: inset 0 0 0 2px var(--hand-r); color: var(--ink); background: color-mix(in srgb, var(--hand-r) 14%, var(--pad-lo)); }
.hand-map figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); max-width: 520px; }
.legend { font-weight: 600; color: var(--ink); }
.legend::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.legend-l::before { background: var(--accent); }
.legend-r::before { background: var(--hand-r); }
.legend-any::before { background: var(--pad-hi); box-shadow: inset 0 0 0 1px var(--line); }

/* Lessons with exercises */

.lesson { margin-top: 40px; }
.lesson h3 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 10px; font-size: 22px; line-height: 1.25; }
.lesson-num { font: 500 14px/1 var(--font-mono); color: var(--accent); }
.lesson > p { color: var(--ink-soft); }
.focus { margin: 10px 0 0; font-size: 15px; }

.exercise {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: clamp(14px, 2.4vw, 20px);
  border-radius: 18px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  transition: border-color .2s;
}
.exercise.is-playing { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

.ex-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ex-play { min-width: 92px; min-height: 40px; }
.ex-tempo { display: flex; align-items: center; gap: 6px; }
.ex-bpm-wrap { min-width: 68px; text-align: center; font: 500 12px/1 var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.ex-bpm { color: var(--ink); font-size: 14px; }
.ex-toolbar .hw-btn { flex: none; }
.ex-click[aria-pressed='true'] .led { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.ex-pads {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--chassis-hi), var(--chassis-lo));
  border: 1px solid var(--line);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.ex-pads .pad { animation: none; border-radius: 12px; }

.ex-note { margin: 0; font-size: 13.5px; color: var(--muted); }
.ex-note a { color: var(--ink-soft); }

/* Mid-article CTA */

.article-cta {
  display: grid;
  gap: 24px;
  align-items: center;
  margin: 56px 0 8px;
  padding: clamp(20px, 4vw, 32px);
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-raised));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
@media (min-width: 720px) { .article-cta { grid-template-columns: 1fr auto; } }
.article-cta h2 { margin: 0 0 8px; font: 900 32px/1 var(--font-display); text-transform: uppercase; }
.article-cta p { margin: 0 0 16px; color: var(--ink-soft); }
.article-cta .qr img { margin-bottom: 14px; }

/* Glossary and plan */

.glossary { display: grid; gap: 1px; margin: 20px 0 0; border-radius: 14px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.glossary div { display: grid; gap: 4px 20px; padding: 14px 18px; background: var(--bg); }
@media (min-width: 640px) { .glossary div { grid-template-columns: 150px 1fr; } }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 0; color: var(--ink-soft); font-size: 15px; }

.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 14px; }
.plan { width: 100%; border-collapse: collapse; font-size: 15px; }
.plan th, .plan td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.plan tr:last-child td { border-bottom: 0; }
.plan th { font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg-raised); }
.plan td { color: var(--ink-soft); }
.plan td:first-child { font: 500 15px/1.4 var(--font-mono); color: var(--accent); }
.plan td:nth-child(2) { color: var(--ink); font-weight: 600; min-width: 130px; }

.article .faq { max-width: none; }

.next-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 56px; }
.next-card {
  display: grid;
  gap: 2px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  text-decoration: none;
  transition: border-color .2s, transform .15s;
}
.next-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); transform: translateY(-2px); }
.next-kicker { font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.next-title { font: 900 26px/1.05 var(--font-display); text-transform: uppercase; }
.next-desc { font-size: 14px; color: var(--muted); }

/* ==========================================================================
   Controllers page
   ========================================================================== */

.steps { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; margin-bottom: 10px; padding-left: 34px; color: var(--ink-soft); font-size: 15px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 12px/1 var(--font-mono);
}
.steps strong { color: var(--ink); }
.hero-copy .hint a { color: var(--ink-soft); }

.notice {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #ffb020 50%, transparent);
  background: color-mix(in srgb, #ffb020 10%, var(--bg));
  font-size: 14px;
  color: var(--ink);
}

#lcd-note { margin-left: auto; }
.lcd-vel-row { align-items: center; }
.vel-meter {
  flex: 1;
  height: 7px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  overflow: hidden;
}
.vel-meter i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transition: width .08s;
}

.pad.is-target {
  box-shadow:
    inset 0 0 0 2.5px var(--accent),
    0 3px 0 #0c0b0e,
    0 0 18px -2px color-mix(in srgb, var(--accent) 60%, transparent);
  animation: target-pulse 1s ease-in-out infinite;
}
.pad.is-target .pad-name { color: var(--ink); }
@keyframes target-pulse { 50% { box-shadow: inset 0 0 0 2.5px var(--accent), 0 3px 0 #0c0b0e, 0 0 4px -2px var(--accent); } }

.gear { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.gear h3 { margin: 0 0 4px; font: 900 30px/1 var(--font-display); text-transform: uppercase; }
.gear-meta { margin: 0 0 12px; font: 500 12.5px/1.5 var(--font-mono); color: var(--accent); }
.gear p { color: var(--ink-soft); }
.gear strong { color: var(--ink); }

.compare td:first-child { font: 600 15px/1.4 var(--font-body); color: var(--ink); white-space: nowrap; }
.compare td:nth-child(2) { font-weight: 400; color: var(--ink-soft); min-width: 0; }
.table-wrap + .article-section { padding-top: 32px; }

/* ==========================================================================
   Learn course: layout, navigation, widgets
   ========================================================================== */

.course {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px var(--gutter) 48px;
}
@media (min-width: 1000px) {
  .course { grid-template-columns: 250px minmax(0, 760px); justify-content: center; gap: 56px; }
}

.course-side { display: none; }
@media (min-width: 1000px) {
  .course-side { display: block; }
  .course-nav { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 8px 4px 24px 0; }
  .course-mobile-nav { display: none; }
}

.course-home { display: block; margin-bottom: 18px; font: 900 22px/1 var(--font-display); text-transform: uppercase; text-decoration: none; }
.course-part { margin: 18px 0 6px; font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.course-nav ol, .course-mobile-nav ol { margin: 0; padding: 0; list-style: none; }
.course-nav li a, .course-mobile-nav li a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.35;
  text-decoration: none;
}
.course-nav li a:hover, .course-mobile-nav li a:hover { background: var(--bg-raised); color: var(--ink); }
.course-nav li a[aria-current='page'], .course-mobile-nav li a[aria-current='page'] { background: var(--bg-raised); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.cn-num { flex: none; font: 500 11px/1 var(--font-mono); color: var(--muted); }
li.is-done .cn-num { color: var(--accent); }
li.is-done .cn-num::after { content: ' ✓'; }

.course-mobile-nav { margin: 8px 0 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); }
.course-mobile-nav summary { padding: 12px 16px; cursor: pointer; font: 500 12px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.course-mobile-nav[open] { padding-bottom: 10px; }
.course-mobile-nav .course-part, .course-mobile-nav ol { padding: 0 8px; }
.course-mobile-nav .course-part { padding: 0 16px; }

.chapter { min-width: 0; }
.chapter-head { padding-top: 16px; }
.chapter-head .article-kicker a { color: inherit; }
.chapter-head h1 { margin: 0 0 18px; font: 900 clamp(44px, 8vw, 76px)/.9 var(--font-display); text-transform: uppercase; }
.chapter .lede { max-width: none; }
.chapter .article-section:first-of-type { padding-top: 24px; }

.chapter-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 56px; }
.pager-link {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-raised);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s;
}
.pager-link span { font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pager-link:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.pager-next { text-align: right; }
.pager-next span { color: var(--accent); }
@media (max-width: 520px) { .chapter-pager { grid-template-columns: 1fr; } .pager-next { text-align: left; } }

/* Hub */

.hub-start { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; }
.hub-progress { font: 500 12px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.curriculum-part { margin-top: 28px; }
.curriculum-part h3 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 4px; font: 900 28px/1 var(--font-display); text-transform: uppercase; }
.curriculum-part h3 span { font: 500 12px/1 var(--font-mono); letter-spacing: .08em; color: var(--accent); }
.curriculum-part > p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.curriculum-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.curriculum-list a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .2s, background-color .2s;
}
.curriculum-list a:hover { background: var(--bg-raised); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.cl-num { font: 500 13px/1 var(--font-mono); color: var(--muted); }
.cl-text { display: grid; }
.cl-title { font-weight: 600; }
.cl-sum { font-size: 14px; color: var(--muted); }
.cl-done { color: var(--accent); opacity: 0; font-weight: 700; }
.is-done .cl-done { opacity: 1; }
.is-done .cl-num { color: var(--accent); }

/* Beat grid additions: count row, editable cells, levels */

.seq-count .seq-cell {
  aspect-ratio: auto;
  height: 16px;
  background: none !important;
  box-shadow: none !important;
  outline: none !important;
  text-align: center;
  font: 500 10.5px/16px var(--font-mono);
  color: var(--muted);
}
.seq-count .seq-cell.is-beat { color: var(--ink-soft); }
.seq-count .seq-cell.is-now { color: var(--accent); }

.seq.is-editable button.seq-cell { padding: 0; border: 0; cursor: pointer; touch-action: manipulation; }
.seq.is-editable button.seq-cell:hover { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent); }
.seq-cell.lvl-a { background: var(--accent) !important; box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent); }
.seq-cell.lvl-g { background: color-mix(in srgb, var(--accent) 28%, #2c2830) !important; }
.seq-cell.is-on:not(.lvl-a):not(.lvl-g) { background: color-mix(in srgb, var(--accent) 70%, #2c2830); }

/* Swing control */

.w-swing { display: flex; align-items: center; gap: 10px; font: 500 12px/1 var(--font-mono); letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.w-swing b { color: var(--ink); font-weight: 500; }
.w-swing input { width: 120px; accent-color: var(--accent); }

/* Pulse trainer */

.pulse-body { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px; }
.pulse-body .ex-pads { width: auto; min-width: 96px; }
.pulse-meter { min-width: 0; }
.pulse-track {
  position: relative;
  height: 44px;
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent calc(50% - 20%), color-mix(in srgb, var(--accent) 10%, transparent) calc(50% - 20%), color-mix(in srgb, var(--accent) 10%, transparent) calc(50% + 20%), transparent calc(50% + 20%)),
    #121114;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.pulse-zero { position: absolute; left: 50%; top: 6px; bottom: 6px; width: 2px; margin-left: -1px; background: var(--ink); opacity: .5; }
.pulse-dot {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #ff7a59;
  opacity: .85;
  animation: dot-in .25s ease-out;
}
.pulse-dot.is-good { background: #7ee08a; }
@keyframes dot-in { from { transform: scale(2.2); opacity: 0; } }
.pulse-scale { display: flex; justify-content: space-between; margin-top: 6px; font: 500 10.5px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pulse-status { margin: 0; font-size: 15px; color: var(--ink); min-height: 1.5em; }
@media (max-width: 520px) {
  .pulse-body { grid-template-columns: 1fr; }
  .pulse-body .ex-pads { max-width: 220px !important; }
}

/* Layout quiz */

.quiz-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.quiz-prompt { flex: 1 1 220px; margin: 0; font-size: 17px; }
.quiz-prompt strong { color: var(--accent); text-transform: uppercase; font: 900 22px/1 var(--font-display); letter-spacing: .02em; }
.quiz-score { font: 500 12px/1 var(--font-mono); color: var(--muted); }
.quiz-grid {
  max-width: 420px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--chassis-hi), var(--chassis-lo));
  border: 1px solid var(--line);
}
.quiz-grid .pad { animation: none; }
.quiz.is-running .quiz-grid .pad-name { opacity: 0; }
.pad[data-answer='right'] { box-shadow: inset 0 0 0 2.5px #7ee08a, 0 3px 0 #0c0b0e; }
.pad[data-answer='wrong'] { box-shadow: inset 0 0 0 2.5px #ff4d4d, 0 3px 0 #0c0b0e; }
.pad[data-answer='wrong'] .pad-name { opacity: 1 !important; color: #ff8a8a; }

/* Controller illustrations (inline SVG) */

.controller-drawing { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .55)); }
.cd-body { fill: #1f1d22; }
.cd-edge { fill: none; stroke: rgba(255, 255, 255, .09); stroke-width: .8; }
.cd-pad { fill: #34303a; stroke: #0c0b0e; stroke-width: .5; }
.cd-pad-lit { fill: var(--accent); }
.cd-pad-soft { fill: color-mix(in srgb, var(--accent) 38%, #34303a); }
.cd-screen { fill: #0a0a0b; stroke: #000; stroke-width: .4; }
.cd-screen-bar { fill: var(--accent); opacity: .65; }
.cd-knob circle { fill: #2e2a33; stroke: #0d0c0f; stroke-width: .6; }
.cd-knob line { stroke: var(--ink-soft); stroke-width: .7; stroke-linecap: round; }
.cd-btn { fill: #2c2930; stroke: #0d0c0f; stroke-width: .4; }
.cd-lit-btn { fill: color-mix(in srgb, var(--accent) 70%, #2c2930); }
.cd-grille { fill: #151417; }
.cd-holes circle { fill: #070608; }
.cd-strip { fill: #2a272e; stroke: #0d0c0f; stroke-width: .4; }
.cd-fader { fill: #0c0b0e; }
.cd-fader-cap { fill: #8f877c; }
.cd-light .cd-body { fill: #e8e4dc; }
.cd-light .cd-edge { stroke: rgba(0, 0, 0, .12); }
.cd-light .cd-pad { fill: #f6f3ee; stroke: #b9b3a8; }
.cd-light .cd-pad-lit { fill: var(--accent); }
.cd-light .cd-pad-soft { fill: color-mix(in srgb, var(--accent) 35%, #f6f3ee); }
.cd-light .cd-btn { fill: #d9d4ca; stroke: #b0a99d; }
.cd-light .cd-grille { fill: #d3cec4; }
.cd-light .cd-holes circle { fill: #8f887c; }

/* Controllers: quick picks and model cards */

.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 18px; }
.pick {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-raised);
  text-decoration: none;
  transition: border-color .2s, transform .15s;
}
.pick:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-2px); }
.pick-for { font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pick-name { font: 900 22px/1.05 var(--font-display); text-transform: uppercase; color: var(--ink); }
.pick-why { font-size: 14px; color: var(--muted); }

.family { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.family h3 { margin: 0 0 10px; font: 900 34px/1 var(--font-display); text-transform: uppercase; }
.family > p { color: var(--ink-soft); }
.family-tips { padding: 12px 16px; border-left: 2px solid var(--accent); background: var(--bg-raised); border-radius: 0 10px 10px 0; font-size: 15px; }
.family-tips strong, .family strong { color: var(--ink); }

.model {
  display: grid;
  gap: 24px;
  margin-top: 24px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%),
    var(--bg-raised);
  scroll-margin-top: 16px;
}
@media (min-width: 760px) {
  .model { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; }
}
.model-art { display: grid; place-items: center; padding: 8px; }
.model-art .controller-drawing { max-height: 340px; width: auto; max-width: 100%; }
.model-info h4 { margin: 0; font: 900 30px/1 var(--font-display); text-transform: uppercase; }
.model-price { margin: 6px 0 10px; font: 500 14px/1.4 var(--font-mono); color: var(--accent); }
.model-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.model-tags li { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font: 500 11.5px/1.3 var(--font-mono); color: var(--ink-soft); }
.model-verdict { margin: 0 0 14px; color: var(--ink); }
.model-specs { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.model-specs div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.model-specs dt { font: 500 11.5px/1.5 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.model-specs dd { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
@media (max-width: 440px) { .model-specs div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pad-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-title, .hero-copy, .hero-beat, .device, .pad, .article-head { animation: none; }
  .gpad[data-hit='a'], .gpad[data-hit='b'] { animation: none; }
  .pad.is-target { animation: none; }
  .pad[data-hit='a'], .pad[data-hit='b'] { animation: none; }
}
