/* ───────── Harmonica Bending · Inkwell / Lunar Eclipse / Creme Brulee / Au Lait ───────── */

/* ── Font (self-hosted variable font, SIL Open Font License; see fonts/OFL-LeagueSpartan.txt) ──
   League Spartan by The League of Moveable Type (Micah Rich, Tyler Finck), used for everything. */
@font-face { font-family: "League Spartan"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/league-spartan-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "League Spartan"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/league-spartan-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Light: cool frosted white glass. Dark: Octet "Low-light" navy (#5a6882 → #050304) with a blue glass glow.
   Dark surfaces follow Material's dark-theme guidance: no pure black or white, lighter = higher,
   desaturated accent for text, white text at ~87% / 60% / 38% emphasis. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg-1: #ffffff; --bg-2: #f1f1f3; --bg-3: #e3e4e9;
  --glow-a: rgba(55, 129, 252, 0.16); --glow-b: rgba(90, 104, 130, 0.12); --glow-good: rgba(31, 157, 107, 0.22);
  --card: rgba(255, 255, 255, 0.66); --card-solid: #fbfbfc; --card-fallback: #f7f7f9;
  --line: rgba(29, 41, 56, 0.08); --line-strong: rgba(29, 41, 56, 0.16);
  --ink: #1d2938; --ink-2: #3c475a; --ink-3: #5f6b80;
  --accent: #1951fc; --accent-text: #1546d8; --accent-soft: rgba(25, 81, 252, 0.09); --on-accent: #ffffff;
  --accent-grad: linear-gradient(180deg, #3781fc, #1951fc);
  --track: rgba(29, 41, 56, 0.07);
  --good: #1a8f61; --good-soft: rgba(26, 143, 97, 0.13);
  --bad: #d23f4c; --bad-soft: rgba(210, 63, 76, 0.10);
  --adv: #6f4ff0; --adv-soft: rgba(111, 79, 240, 0.10);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 30px 60px -32px rgba(29, 41, 56, 0.28), 0 2px 6px -2px rgba(29, 41, 56, 0.06);
  --inst-glow: radial-gradient(90% 55% at 50% 118%, rgba(55, 129, 252, 0.16), transparent 70%);
  --inst-glow-on: radial-gradient(90% 55% at 50% 118%, rgba(26, 143, 97, 0.18), transparent 70%);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-1: #13171f; --bg-2: #0c1015; --bg-3: #050304;
  --glow-a: rgba(25, 81, 252, 0.28); --glow-b: rgba(90, 104, 130, 0.14); --glow-good: rgba(87, 211, 155, 0.18);
  --card: rgba(29, 41, 56, 0.52); --card-solid: #18212d; --card-fallback: #151d28;
  --line: rgba(90, 104, 130, 0.26); --line-strong: rgba(122, 140, 172, 0.45);
  --ink: rgba(236, 241, 250, 0.92); --ink-2: rgba(236, 241, 250, 0.68); --ink-3: #8090ab;
  --accent: #2f6dfc; --accent-text: #8fbcfd; --accent-soft: rgba(55, 129, 252, 0.16); --on-accent: #ffffff;
  --accent-grad: linear-gradient(180deg, #4a8dfd, #1951fc);
  --track: rgba(90, 104, 130, 0.2);
  --good: #57d39b; --good-soft: rgba(87, 211, 155, 0.15);
  --bad: #f2828c; --bad-soft: rgba(242, 130, 140, 0.13);
  --adv: #b9a3ff; --adv-soft: rgba(185, 163, 255, 0.13);
  --shadow: 0 1px 0 rgba(203, 233, 253, 0.07) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  --inst-glow: radial-gradient(95% 62% at 50% 112%, rgba(55, 129, 252, 0.7), rgba(25, 81, 252, 0.2) 48%, transparent 76%);
  --inst-glow-on: radial-gradient(95% 62% at 50% 112%, rgba(87, 211, 155, 0.55), rgba(87, 211, 155, 0.14) 48%, transparent 76%);
}

:root {
  --radius: 24px; --radius-sm: 14px;
  --font: "League Spartan", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: var(--font);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--bg-2); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  /* League Spartan's lowercase is short (x-height 0.41), so scale body text up ~15% to read comfortably. */
  font-size-adjust: 0.47;
  -webkit-font-smoothing: antialiased;
  transition: background-color 300ms ease, color 300ms ease;
}
button { font: inherit; color: inherit; }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
h1, h2, h3, h4 { margin: 0; }

.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; font-size-adjust: none; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.lbl { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.display .acc { font-family: var(--font); font-weight: 500; font-size: 0.6em; vertical-align: 0.45em; margin-left: 0.02em; }

/* ── Background ── */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 80% 0%, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%); transition: background 300ms ease; }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); transition: opacity 600ms ease, background 300ms ease; }
.glow.a { width: 50vmax; height: 50vmax; right: -12vmax; top: -22vmax; background: var(--glow-a); }
.glow.b { width: 44vmax; height: 44vmax; left: -14vmax; bottom: -20vmax; background: var(--glow-b); }
.glow.good { width: 40vmax; height: 40vmax; left: 30vw; top: 10vh; background: var(--glow-good); opacity: 0; }
body[data-mood="on"] .glow.good { opacity: 1; }

/* ── Surfaces ── */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  transition: background-color 300ms ease, border-color 300ms ease;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .card { background: var(--card-fallback); } }

/* ── Buttons ── */
.btn, .pill, .step, .icon-btn, .key, .bend, .ri { cursor: pointer; transition: background-color 180ms, border-color 180ms, color 180ms, transform 120ms; }
.btn:active, .pill:active, .step:active, .key:active, .bend:active { transform: scale(0.97); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card-solid); font-weight: 600; font-size: 14px;
}
.btn:hover { border-color: var(--line-strong); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn-primary { background: var(--accent-grad); color: var(--on-accent); border-color: transparent; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 10px 26px -10px var(--accent); }
.btn-primary:hover { filter: brightness(1.06); border-color: transparent; }
.btn-primary.is-live { background: var(--bad); box-shadow: 0 10px 22px -12px var(--bad); }
.btn.is-recording { color: var(--bad); border-color: var(--bad); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-solid); font-weight: 600; font-size: 13px; }
.pill:hover { border-color: var(--line-strong); }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm svg { width: 14px; height: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); justify-self: start; }
.linkish:hover { color: var(--ink); }

.theme-toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--track); }
.theme-toggle button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; color: var(--ink-3); cursor: pointer; }
.theme-toggle button[aria-pressed="true"] { background: var(--card-solid); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
.theme-toggle svg { width: 15px; height: 15px; }

/* ── Layout ── */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#about, #holeMap, .qa { scroll-margin-top: 16px; }

/* Side menu: a floating pill on the left; becomes a bottom tab bar on small screens */
.rail { position: fixed; z-index: 30; left: 20px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; padding: 7px;
  border-radius: 40px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%); }
.ri { display: grid; place-content: center; justify-items: center; gap: 3px; width: 68px; height: 68px; padding: 0; border-radius: 50%; color: var(--ink-3); font-size: 12px; font-weight: 600; line-height: 1.1; text-align: center; text-decoration: none; }
.ri svg { width: 20px; height: 20px; }
.ri:hover { color: var(--ink); background: var(--track); }
.ri[aria-current="page"] { color: var(--on-accent); background: var(--accent-grad); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 8px 20px -8px var(--accent); }
.shell { width: min(1080px, 100% - 32px); margin: 0 auto; padding: 20px 0 48px; display: grid; gap: 16px; }
@media (min-width: 901px) { .shell /* leave room for the side menu */ { width: min(1080px, 100% - 232px); } }

.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; justify-self: start; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-grad); color: var(--on-accent); box-shadow: 0 8px 18px -10px var(--accent); }
.brand-mark svg { width: 18px; height: 18px; }
.top-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.pill.nav-link { text-decoration: none; color: var(--ink); min-height: 38px; }
.pill.nav-link svg { width: 14px; height: 14px; }

.steps { display: flex; gap: 6px; }
.step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 13px; white-space: nowrap; }
.step:hover { border-color: var(--line-strong); }
.step b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; }
.step em, .step i { font-style: normal; }
.step .chev { width: 12px; height: 12px; color: var(--ink-3); transition: transform 200ms; }
.step[aria-expanded="true"] { border-color: var(--accent); }
.step[aria-expanded="true"] .chev { transform: rotate(180deg); }
.step.is-on { background: var(--accent-grad); color: var(--on-accent); border-color: transparent; }
.step.is-on b { background: rgba(255, 255, 255, 0.22); color: inherit; }

/* Pickers */
.sheet { display: grid; gap: 14px; animation: sheet-in 220ms ease; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-6px); } }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-head h2 { font-size: 24px; line-height: 1.15; margin: 4px 0 6px; }
.sheet-head p { margin: 0; font-size: 14px; }
.keys { display: flex; flex-wrap: wrap; gap: 8px; }
.key { min-width: 48px; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-solid); font-weight: 600; font-size: 15px; }
.key:hover { border-color: var(--line-strong); }
.key[aria-pressed="true"] { background: var(--accent-grad); color: var(--on-accent); border-color: transparent; }
.feel { margin: 0; font-size: 14px; color: var(--ink-2); }
.feel strong { color: var(--ink); }

.map-key { margin: 0; }

/* Intro */
.intro { text-align: center; padding: 18px 0 4px; }
.intro h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.05; max-width: 16ch; margin: 0 auto; text-wrap: balance; }
.intro p { margin: 10px auto 0; max-width: 56ch; }

/* Instrument */
.instrument { padding: 24px; display: grid; gap: 18px; background: var(--inst-glow), var(--card); overflow: hidden; }
body[data-mood="on"] .instrument { background: var(--inst-glow-on), var(--card); }
:root[data-theme="dark"] .instrument { border-bottom-color: rgba(143, 188, 253, 0.55); }
:root[data-theme="dark"] .trace-wrap { background: rgba(5, 8, 14, 0.28); border: 1px solid rgba(143, 188, 253, 0.12); }
.inst-top { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: center; }
.inst-left { display: grid; gap: 12px; min-width: 0; }
.note-big { font-size: clamp(64px, 10vw, 96px); line-height: 0.95; min-height: 0.95em; font-variant-numeric: tabular-nums; transition: color 200ms; }
.note-big sub { font-family: var(--font); font-size: 0.3em; font-weight: 500; vertical-align: baseline; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.note-big.is-on { color: var(--good); }
.note-big .idle { font-weight: 300; color: var(--ink-3); opacity: 0.45; }
.status-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 30px; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; background: var(--card-solid); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.is-live { color: var(--good); }
.status.is-live .dot { animation: pulse 1.6s infinite; }
.status.is-on { color: var(--good); background: var(--good-soft); border-color: transparent; }
.status.is-error { color: var(--bad); }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .status.is-live .dot { animation: none; } }
.where { font-size: 14px; color: var(--ink-2); }
.where strong { color: var(--ink); font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.take-row { display: flex; gap: 14px; align-items: center; font-size: 13px; }

.gauge-wrap { position: relative; display: grid; justify-items: center; }
.gauge { width: 100%; max-width: 260px; display: block; overflow: visible; }
.g-track, .g-zone, .g-fill { fill: none; stroke-width: 16; }
.g-track { stroke: var(--track); stroke-linecap: round; }
.g-zone { stroke: var(--good-soft); }
.g-fill { stroke: var(--accent); stroke-linecap: round; transition: stroke 200ms; }
.g-knob { fill: var(--card-solid); stroke: var(--accent); stroke-width: 3; transition: stroke 200ms; }
.gauge.is-on .g-fill, .gauge.is-on .g-knob { stroke: var(--good); }
.gauge.is-over .g-fill, .gauge.is-over .g-knob { stroke: var(--bad); }
.gauge.is-idle .g-fill, .gauge.is-idle .g-knob { opacity: 0; }
.gauge-val { position: absolute; left: 0; right: 0; top: 46%; display: grid; justify-items: center; line-height: 1.1; font-size: 12px; }
.gauge-val .display { font-size: 30px; }
.gauge-ends { display: flex; justify-content: space-between; width: 100%; max-width: 260px; font-size: 12px; margin-top: 4px; }

.trace-wrap { position: relative; border-radius: 16px; overflow: hidden; background: var(--track); }
#trace { display: block; width: 100%; height: 170px; }
.trace-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--ink-3); font-size: 14px; padding: 16px; pointer-events: none; }

/* Hole map */
.holes-card { display: grid; gap: 12px; }
.holes-scroll { overflow-x: auto; margin: 0 -4px; padding: 2px 4px 4px; }
.holes { display: grid; grid-template-columns: repeat(10, minmax(46px, 1fr)); grid-template-rows: repeat(5, auto); gap: 4px 6px; min-width: 520px; }
.hole { display: grid; grid-template-rows: subgrid; grid-row: span 5; gap: 4px; }
.bends { display: flex; flex-direction: column; gap: 3px; }
.bends.up { justify-content: flex-end; }
.bend { border: 0; border-radius: 7px; padding: 3px 0; font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); }
.bend:hover { background: var(--accent); color: var(--on-accent); }
.bend.adv { background: var(--adv-soft); color: var(--adv); }
.bend.is-selected { background: var(--accent-grad); color: var(--on-accent); }
.reed { text-align: center; font-size: 12px; font-weight: 500; color: var(--ink-3); border-radius: 6px; transition: background-color 150ms, color 150ms; }
.num { text-align: center; padding: 11px 0; border-radius: 12px; background: var(--card-solid); border: 1px solid var(--line); font-weight: 700; font-size: 15px; transition: background-color 150ms, border-color 150ms, color 150ms; }
.hole.is-target .num { border-color: var(--accent); }
.is-hit { background: var(--good-soft) !important; color: var(--good) !important; }
.num.is-hit { border-color: var(--good) !important; }

/* Bottom trio */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.trio .card { display: grid; gap: 6px; align-content: start; }
.result h3 { font-size: 19px; line-height: 1.25; }
.result p { margin: 0; font-size: 14px; }
.result.good h3 { color: var(--good); }
.result.miss h3 { color: var(--bad); }
.result .stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--track); color: var(--ink-2); }
.session-score { display: flex; align-items: baseline; gap: 8px; }
.session-score .display { font-size: 30px; }
.pips { display: flex; gap: 4px; flex-wrap: wrap; min-height: 10px; }
.pips i { width: 10px; height: 10px; border-radius: 3px; background: var(--track); }
.pips i.good { background: var(--good); } .pips i.close { background: var(--accent); } .pips i.miss { background: var(--bad); }
.session .note { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }
.tip p { margin: 0; font-size: 14px; color: var(--ink-2); }
.tip .more { font-size: 13px; font-weight: 600; text-decoration: none; margin-top: 4px; }

.about { display: grid; gap: 10px; }
.about h2 { font-size: 22px; }
.about p { margin: 0; max-width: 75ch; }
.about-steps { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.about-steps li { counter-increment: s; font-size: 14px; color: var(--ink-2); display: grid; gap: 4px; align-content: start; }
.about-steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 700; }
.about-steps b { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .about-steps { grid-template-columns: minmax(0, 1fr); } }

.footer { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 8px; display: grid; justify-items: center; gap: 10px; }
.footer p { margin: 0; }
.kofi { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 14px; text-decoration: none; transition: background-color 180ms, color 180ms; }
.kofi:hover { background: var(--accent); color: var(--on-accent); }
.kofi svg { width: 16px; height: 16px; }
.footer a { color: var(--ink-2); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: min(520px, calc(100% - 32px)); padding: 14px 18px; font-size: 14px; border-radius: 16px; background: var(--card-solid);
  transform: translate(-50%, 20px); opacity: 0; visibility: hidden; transition: transform 300ms, opacity 300ms, visibility 0s 300ms; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform 300ms, opacity 300ms; }

/* Cookie banner */
.consent { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; width: min(560px, calc(100% - 32px));
  display: grid; gap: 12px; padding: 16px 18px; background: var(--card-solid); animation: sheet-in 220ms ease; }
.consent p { margin: 0; font-size: 14px; color: var(--ink-2); }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.footer-links { font-size: 12px; }
.credits { font-size: 12px; color: var(--ink-3); }
.credits a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.footer-links .linkish, .footer-links a { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.footer-links a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.footer-links a:hover, .footer-links .linkish:hover { color: var(--ink); }

/* Legal page */
.legal { padding: 28px 32px; max-width: 780px; color: var(--ink-2); }
.legal h2 { font-size: 22px; color: var(--ink); margin: 28px 0 8px; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--ink); }
.legal code { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--track); color: var(--ink); }
.legal .linkish { font-size: inherit; font-weight: 600; vertical-align: baseline; }
@media (max-width: 640px) { .legal { padding: 20px 18px; } }

/* ── FAQ page ── */
.faq-intro { padding: 18px 0 4px; }
.faq-intro h1 { font-size: clamp(34px, 5vw, 50px); line-height: 1.05; }
.faq-intro p { margin: 10px 0 0; max-width: 60ch; }
.faq-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.toc { position: sticky; top: 16px; padding: 18px; }
.toc ol { margin: 10px 0 0; padding: 0 0 0 20px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-3); }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent-text); }
.faq-list { display: grid; gap: 12px; }
.qa { padding: 0; overflow: hidden; }
.qa summary { list-style: none; cursor: pointer; padding: 18px 20px; display: flex; gap: 14px; align-items: center; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.015em; font-size-adjust: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa .qn { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font); font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent-text); }
.qa .chev { margin-left: auto; flex: none; width: 18px; height: 18px; color: var(--ink-3); transition: transform 250ms; }
.qa[open] .chev { transform: rotate(180deg); }
.qa .answer { padding: 0 20px 20px 64px; color: var(--ink-2); }
.qa .answer p { margin: 0 0 12px; }
.qa .answer ul { margin: 0 0 12px; padding-left: 20px; }
.qa .answer li { margin-bottom: 4px; }
.qa .answer strong { color: var(--ink); }
.resources { display: grid; gap: 8px; margin-top: 14px; }
.res { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; text-decoration: none; background: var(--card-solid); border: 1px solid var(--line); color: var(--ink); transition: border-color 150ms; }
.res:hover { border-color: var(--line-strong); }
.res-icon { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.res-icon.video { background: var(--bad-soft); color: var(--bad); }
.res-icon svg { width: 14px; height: 14px; }
.res-text { display: grid; min-width: 0; }
.res-text b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-text span { font-size: 12px; color: var(--ink-3); }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cta h3 { font-size: 22px; margin-bottom: 2px; }
.cta p { margin: 0; color: var(--ink-2); }
.cta .btn { text-decoration: none; }
.faq-note { text-align: center; color: var(--ink-3); font-size: 13px; margin: 4px 0 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .rail { top: auto; bottom: 12px; left: 50%; transform: translateX(-50%); flex-direction: row; justify-content: space-around; width: min(440px, calc(100% - 24px)); padding: 6px; border-radius: 999px; }
  .ri { flex: none; width: 60px; height: 60px; font-size: 11px; }
  .ri svg { width: 18px; height: 18px; }
  .shell { padding-bottom: 104px; }
  .consent, .toast { bottom: 92px; }
  .topbar { grid-template-columns: 1fr auto; }
  .steps { grid-column: 1 / -1; grid-row: 2; justify-content: center; flex-wrap: wrap; }
  .trio { grid-template-columns: minmax(0, 1fr); }
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 32px); padding-top: 14px; gap: 14px; }
  .brand-name { display: none; }
  .steps { flex-wrap: nowrap; gap: 6px; }
  .step { flex: 1 1 auto; justify-content: center; padding-right: 10px; gap: 6px; }
  .step i, .step .chev { display: none; }
  .intro { padding-top: 8px; }
  .instrument { padding: 18px; }
  .inst-top { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .gauge-wrap { order: -1; }
  .gauge, .gauge-ends { max-width: 210px; }
  .gauge-val .display { font-size: 26px; }
  .note-big { font-size: 64px; }
  .actions .btn { flex: 1 1 calc(50% - 4px); justify-content: center; padding: 0 10px; white-space: nowrap; font-size: 13px; }
  .actions .btn-primary { flex-basis: 100%; }
  #trace { height: 140px; }
  .card { padding: 16px; }
  .qa summary { font-size: 17px; padding: 16px; }
  /* Fit all 10 holes across a phone screen instead of scrolling sideways */
  .holes { min-width: 0; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
  .num { padding: 9px 0; font-size: 13px; border-radius: 9px; }
  .reed { font-size: 11px; }
  .bend { font-size: 10px; border-radius: 5px; padding: 3px 0; }
  .qa .answer { padding: 0 16px 18px; }
}
