/* Studio Music Tools — global stylesheet. Light-first, hand-written (no framework).
   V2 (visual/visualization pass): warm off-white base, dark used selectively for
   contrast on "device screen" panels (charts, room diagrams) to keep a studio-
   hardware/audio-software feel without the whole site reading as a dev dashboard. */

:root {
  /* --- warm light palette (the site's default look) --- */
  --smt-warm-bg: #FAF7F2;
  --smt-warm-surface: #FFFFFF;
  --smt-warm-surface-2: #F2EEE6;
  --smt-warm-border: #E4DFD3;
  --smt-warm-text: #17191C;
  --smt-warm-text-muted: #666B72;

  /* --- dark palette, used selectively (footer, device/scope panels) --- */
  --smt-ink: #0B0E11;
  --smt-surface: #12161B;
  --smt-surface-2: #1A2028;
  --smt-border: #262E38;
  --smt-text: #EDF1F5;
  --smt-text-muted: #9AA7B4;

  /* --- brand accents, unchanged --- */
  --smt-accent: #FF5A36;
  --smt-accent-2: #3DDC97;
  --smt-warn: #C97A11;
  --smt-light-bg: var(--smt-warm-bg);
  --smt-light-surface: var(--smt-warm-surface);

  /* role tokens — light is the default, everywhere, unless a panel opts into dark */
  --bg: var(--smt-warm-bg);
  --surface: var(--smt-warm-surface);
  --surface-2: var(--smt-warm-surface-2);
  --border: var(--smt-warm-border);
  --text: var(--smt-warm-text);
  --text-muted: var(--smt-warm-text-muted);
  --accent-ink: #1a0700;

  /* chart-specific tokens (kept distinct from role tokens so charts stay legible
     whether their card is light or dark) */
  --viz-axial: var(--smt-accent);
  --viz-tangential: #B8862F;
  --viz-oblique: #7C8591;
  --viz-grid: color-mix(in srgb, var(--text) 10%, transparent);
  --viz-grid-strong: color-mix(in srgb, var(--text) 22%, transparent);

  --font-heading: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-float: 0 4px 16px rgba(20, 16, 8, 0.06);
  --shadow-card: 0 1px 2px rgba(20, 16, 8, 0.04), 0 8px 24px rgba(20, 16, 8, 0.05);

  color-scheme: light;
}

/* Explicit theme overrides (infrastructure for a future toggle — the site does not
   auto-switch on OS preference, since the brand's default identity is the light
   theme; a visitor's OS dark-mode setting should not silently undo that). */
:root[data-theme="dark"] {
  --bg: var(--smt-ink);
  --surface: var(--smt-surface);
  --surface-2: var(--smt-surface-2);
  --border: var(--smt-border);
  --text: var(--smt-text);
  --text-muted: var(--smt-text-muted);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: var(--smt-warm-bg);
  --surface: var(--smt-warm-surface);
  --surface-2: var(--smt-warm-surface-2);
  --border: var(--smt-warm-border);
  --text: var(--smt-warm-text);
  --text-muted: var(--smt-warm-text-muted);
  color-scheme: light;
}

/* ---------- Dark panels used selectively for contrast ----------
   "Device screen" surfaces: chart cards, room diagrams, the hero preview panel.
   Scoped via CSS custom property re-declaration so every existing component
   (.card, .result-tile, table, .tag-*) that reads var(--surface)/var(--text)
   automatically renders correctly inside one of these, without duplicate rules. */
.panel-dark {
  --surface: var(--smt-ink);
  --surface-2: #171C23;
  --border: #2A323C;
  --text: var(--smt-text);
  --text-muted: var(--smt-text-muted);
  background: var(--smt-ink);
  color: var(--text);
  border-radius: var(--radius);
}
.panel-dark .viz-grid { --viz-grid: rgba(237,241,245,0.08); --viz-grid-strong: rgba(237,241,245,0.22); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img, svg { max-width: 100%; display: block; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  color: var(--text);
}
h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.1; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: clamp(19px, 2.4vw, 24px); }
h4 { font-size: 17px; }

p { margin: 0 0 var(--space-2); color: var(--text); }
a { color: var(--smt-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .caption { font-size: 13px; color: var(--text-muted); }
ul, ol { padding-left: 1.25em; }

.mono, code, .value, .num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--smt-accent);
  color: #fff; padding: 8px 16px; z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}
.container--narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
}
/* The frosted-glass background lives on a pseudo-element rather than on
   .site-header itself. backdrop-filter (like transform) establishes a
   containing block for any position:fixed descendant — and the mobile
   nav-open panel (.site-nav, fixed in the max-width:980px block below) is
   one of those descendants. With the filter directly on .site-header, the
   "fixed" panel was sized against the 72px-tall header instead of the
   viewport, collapsing it to a sliver instead of a full-screen menu. Kept
   as its own layer, backdrop-filter no longer sits between the nav panel
   and the viewport, and it looks identical. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
  gap: var(--space-4);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  height: 40px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--text);
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.wordmark__accent { color: var(--smt-accent); }
.wordmark--footer { font-size: 18px; }

/* Every interactive element in the header — nav links, the Shop trigger,
   the CTA button, the cart icon — shares one fixed height (40px) and is
   centered the same way (flex, align-items:center) within that box. That
   is the "consistent height/baseline/hover area" fix: one shared rule
   instead of nudging each element's own padding/margin until it looked
   right by eye. */
:root { --nav-item-height: 40px; }

.site-nav { display: flex; align-items: center; gap: var(--space-4); height: 100%; }
.site-nav__links { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; height: 100%; }
.site-nav__links > li { display: flex; align-items: center; height: 100%; }
.site-nav__links > li > a,
.nav-dropdown__trigger {
  display: flex;
  align-items: center;
  height: var(--nav-item-height);
  padding: 0 12px;
  border-radius: 8px;
  line-height: 1;
}
.site-nav a { color: var(--text-muted); font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.site-nav a:hover, .site-nav a.is-active { color: var(--text); text-decoration: none; }
.site-nav a.is-active { color: var(--smt-accent); background: color-mix(in srgb, var(--smt-accent) 10%, transparent); }
.site-nav__links > li > a:hover { color: var(--text); background: var(--surface-2); }

.nav-actions { display: flex; align-items: center; gap: var(--space-2); height: 100%; }
.nav-cta { white-space: nowrap; height: var(--nav-item-height); display: inline-flex; align-items: center; }
.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--nav-item-height);
  height: var(--nav-item-height);
  border-radius: 8px;
  color: var(--text-muted);
  flex: none;
}
.nav-cart:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-cart__count {
  position: absolute;
  top: 1px;
  right: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--smt-accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
}
/* Author-stylesheet `display` above beats the UA stylesheet's [hidden]
   rule on specificity ties, so the empty-cart badge was rendering as a
   visible "0" pill instead of disappearing — this reasserts it. */
.nav-cart__count[hidden] { display: none; }

/* ---------- Nav dropdown ("Shop": Acoustic Tools / Producer Tools / Bundles) ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown__trigger {
  gap: 5px;
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-weight: 500;
  font-size: 14.5px;
  cursor: pointer;
}
.nav-dropdown__trigger:hover { color: var(--text); background: var(--surface-2); }
.nav-dropdown__trigger.is-active { color: var(--smt-accent); }
.nav-dropdown__caret { flex: none; transition: transform 0.15s ease; }

/* Visibility is driven entirely by JS toggling .is-open on .nav-dropdown
   (see assets-src/nav-dropdown.js): pointerenter/leave with a short close
   delay so the cursor has time to travel from the trigger into the menu
   without the gap between them closing it first, plus Enter/ArrowDown to
   open and Escape to close from the keyboard. There's deliberately no
   plain CSS ":hover" or ":focus-within" rule here — ":hover" alone was
   the original bug (instant-hide the moment the cursor left the
   trigger's own box, before it reached the menu), and ":focus-within"
   re-opens the menu the instant Escape's own close() hands focus back to
   the trigger (which is still inside .nav-dropdown), undoing the close
   in the same tick. JS is already required for the cart/checkout flow
   elsewhere on this site, so a JS-only interaction here is consistent
   with the rest of the header, not a new requirement. */
.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -14px;
  /* Small and flush on purpose — the real fix for "cursor can't reach the
     menu" is the JS close-delay (nav-dropdown.js), not a padding bridge.
     A close-delay tolerates the cursor being briefly outside the
     hoverable region while crossing this gap; a zero-delay CSS :hover
     rule (removed above) did not, which was the actual bug. */
  margin-top: 6px;
  min-width: 420px;
  /* Shop sits near the left of the nav, so anchoring the menu to the
     trigger's left edge is normally fine — but on a ~1000-1100px desktop
     window (still above the 980px mobile breakpoint) three fixed-width
     columns could run past the right edge of the viewport. Capping the
     width and letting the group columns wrap keeps it fully on-screen at
     any width the desktop layout applies to, without hardcoding a
     viewport-specific pixel nudge. */
  max-width: calc(100vw - 32px);
  flex-wrap: wrap;
  z-index: 20;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 18, 15, 0.12);
  padding: 14px;
  gap: 18px 22px;
}
.nav-dropdown.is-open .nav-dropdown__menu {
  display: flex;
}
.nav-dropdown.is-open .nav-dropdown__caret {
  transform: rotate(180deg);
}
.nav-dropdown__group { display: flex; flex-direction: column; gap: 2px; flex: 1 1 140px; min-width: 140px; }
.nav-dropdown__heading {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 10px 6px;
}
.nav-dropdown__group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.nav-dropdown__group li a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 14px;
}
.nav-dropdown__group li a:hover,
.nav-dropdown__group li a:focus-visible {
  background: var(--surface-2);
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; cursor: pointer;
}
.nav-toggle__bar { width: 18px; height: 2px; background: var(--text); display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.05s ease, filter 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--smt-accent); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--smt-accent); filter: none; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Layout helpers ---------- */
.section { padding: var(--space-6) 0; }
.section--tight { padding: var(--space-5) 0; }
.stack { display: flex; flex-direction: column; gap: var(--space-2); }
.hero {
  padding: var(--space-6) 0 var(--space-6);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero--compact { padding: var(--space-5) 0 var(--space-4); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 460px);
  gap: var(--space-5);
  align-items: center;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__subhead { font-size: 18px; color: var(--text-muted); max-width: 640px; }
.hero__ctas { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-4); }
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--smt-accent);
  margin-bottom: var(--space-1);
  display: block;
}

/* Hero device panel: the one deliberately dark, "hardware screen" surface most
   visitors see first — this is where the site's studio-equipment character lives. */
.device-panel {
  background: var(--smt-ink);
  border-radius: 18px;
  padding: var(--space-3);
  box-shadow: var(--shadow-float);
  border: 1px solid #1D2329;
}
.device-panel__label {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em;
  text-transform: uppercase; color: #7C8894; margin-bottom: 10px;
}
.device-panel__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--smt-accent-2); display: inline-block; margin-right: 6px; box-shadow: 0 0 0 3px rgba(61,220,151,0.15); }

.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid > *, .field-row > *, .repeat-row > *, .tiers > *, .result-tiles > * { min-width: 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow-card);
}
.card h3 { margin-bottom: var(--space-1); }
.card p:last-child { margin-bottom: 0; }
.card--link { display: block; transition: border-color 0.15s ease, transform 0.1s ease; }
.card--link:hover { border-color: var(--smt-accent); text-decoration: none; transform: translateY(-1px); }
.card__eyebrow { color: var(--smt-accent); }

.cart-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}
.cart-row__info { flex: 1; min-width: 0; }
.cart-row__price { font-family: var(--font-mono); white-space: nowrap; }
.buy-added-note { margin-top: var(--space-2); margin-bottom: 0; }

.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card__preview { margin: 0 0 var(--space-2); border-radius: var(--radius-sm); overflow: hidden; }
.product-card__price {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  margin: var(--space-1) 0;
}
.product-card__price .strike {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 8px;
  font-weight: 400;
}
.product-card__badge {
  display: inline-block;
  background: var(--smt-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: var(--space-2);
  align-self: flex-start;
}
.product-card ul { margin: var(--space-2) 0; padding-left: 1.1em; color: var(--text-muted); font-size: 14.5px; }
.product-card .btn { margin-top: auto; }

/* Tool status badges (LIVE / BETA / COMING SOON) — see ToolStatusBadge
   in components/shared.tsx. Used on /audio-tools/ and anywhere else a
   tool that doesn't fully exist yet needs to say so plainly rather than
   linking as if it were finished. Green reuses the same "done/success"
   token as the audio-processing stepper (#1E9E6B) so "live" reads
   consistently across the site; amber reuses --smt-warn for "beta"; grey
   for "coming soon" deliberately looks the least prominent of the three. */
.tool-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.tool-status--live { color: #1E9E6B; background: color-mix(in srgb, #1E9E6B 12%, transparent); border-color: color-mix(in srgb, #1E9E6B 35%, transparent); }
.tool-status--beta { color: var(--smt-warn); background: color-mix(in srgb, var(--smt-warn) 12%, transparent); border-color: color-mix(in srgb, var(--smt-warn) 35%, transparent); }
.tool-status--soon { color: var(--text-muted); background: var(--surface-2); border-color: var(--border); }

.tool-family-section + .tool-family-section { margin-top: var(--space-5); }
.tool-family-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-3); }
.tool-family-section__head h2 { margin-bottom: 4px; }

/* ---------- Callouts ---------- */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 8px;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  margin: var(--space-2) 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout-info { border-left-color: var(--text-muted); }
.callout-warn { border-left-color: var(--smt-warn); background: color-mix(in srgb, var(--smt-warn) 8%, var(--surface)); }
.callout-warn strong { color: var(--smt-warn); }
.callout-success { border-left-color: #1E9E6B; }
.callout-success strong { color: #1E9E6B; }
.callout-owner {
  border: 1px dashed var(--smt-warn);
  border-radius: 8px;
  padding: var(--space-2) var(--space-3);
  background: color-mix(in srgb, var(--smt-warn) 10%, transparent);
  margin: var(--space-2) 0;
  font-size: 14.5px;
}
.callout-owner strong { color: var(--smt-warn); }

/* ---------- Forms ---------- */
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--text-muted); }
input[type="text"], input[type="number"], input[type="email"], select, textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 11px 12px;
  font-family: var(--font-mono);
  font-size: 15px;
}
select { font-family: var(--font-body); }
textarea { font-family: var(--font-body); min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--smt-accent);
  outline-offset: 1px;
}
.field { margin-bottom: var(--space-2); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-2); }
.field-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: var(--space-2); margin: 0 0 var(--space-2); }
legend { padding: 0 6px; font-size: 13px; color: var(--text-muted); }

.unit-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.unit-toggle button {
  background: var(--surface-2); color: var(--text-muted); border: none;
  padding: 9px 16px; font-family: var(--font-body); font-size: 14px; cursor: pointer;
}
.unit-toggle button.is-active { background: var(--smt-accent); color: #fff; }

/* Range slider (used by the interactive room diagrams) */
input[type="range"] {
  width: 100%; height: 4px; border-radius: 999px; background: var(--border);
  -webkit-appearance: none; appearance: none; margin: 10px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--smt-accent); cursor: pointer; border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--smt-accent);
  cursor: pointer; border: 2px solid var(--surface);
}
.slider-row { display: flex; align-items: center; gap: 10px; }
.slider-row output { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); min-width: 62px; text-align: right; }

/* Filter chips (mode-type toggles etc.) */
.chip-toggle { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted); border-radius: 999px; padding: 6px 12px 6px 8px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.chip-toggle input { margin: 0; width: 14px; height: 14px; accent-color: var(--smt-accent); }
.chip-toggle .chip-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chip-toggle[data-active="false"] { opacity: 0.45; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: var(--space-2) 0; }

/* ---------- Calculator ---------- */
.calc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
}
.calc__grid { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: var(--space-4); align-items: start; }
.calc__grid > * { min-width: 0; }
@media (max-width: 800px) { .calc__grid { grid-template-columns: 1fr; } }

.result-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-2); margin: var(--space-2) 0 var(--space-3); }
.result-tile {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: var(--space-2);
}
.result-tile__label { font-size: 12.5px; color: var(--text-muted); margin-bottom: 4px; }
.result-tile__value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--smt-accent); }
.result-tile__value.is-good { color: #1E9E6B; }
.result-tile__value.is-warn { color: var(--smt-warn); }
.result-tile__sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.table-wrap { overflow: auto; max-height: 480px; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th { position: sticky; top: 0; background: var(--surface-2); color: var(--text-muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.03em; }
tbody tr:last-child td { border-bottom: none; }
td.mono { font-family: var(--font-mono); }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.tag-axial { background: color-mix(in srgb, var(--viz-axial) 16%, transparent); color: var(--viz-axial); }
.tag-axial::before { background: var(--viz-axial); border-radius: 50%; }
.tag-tangential { background: color-mix(in srgb, var(--viz-tangential) 18%, transparent); color: var(--viz-tangential); }
.tag-tangential::before { background: var(--viz-tangential); transform: rotate(45deg); }
.tag-oblique { background: color-mix(in srgb, var(--viz-oblique) 20%, transparent); color: var(--viz-oblique); }
.tag-oblique::before { background: var(--viz-oblique); clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }

.diagram-room { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); padding: var(--space-3); }

.repeat-row {
  display: grid; grid-template-columns: 1fr 90px 1.6fr 80px auto; gap: 8px; align-items: end; margin-bottom: 8px;
}
@media (max-width: 700px) { .repeat-row { grid-template-columns: 1fr 1fr; } }
.repeat-row .field { margin-bottom: 0; }
.remove-row {
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  border-radius: 8px; width: 38px; height: 38px; cursor: pointer; font-size: 16px;
}
.remove-row:hover { border-color: var(--smt-warn); color: var(--smt-warn); }

/* ---------- Visualizations (charts + room diagrams) ---------- */
.viz-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin: var(--space-3) 0;
  background: var(--surface);
}
.viz-card--dark { background: var(--smt-ink); border-color: #1D2329; }
.viz-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; margin-bottom: 4px; }
.viz-card__title { font-family: var(--font-heading); font-weight: 600; font-size: 16px; margin: 0; }
.viz-card__note { font-size: 12.5px; color: var(--text-muted); margin: 0 0 var(--space-2); }
.viz-card__scale-note { font-size: 11.5px; color: var(--text-muted); font-family: var(--font-mono); }

.viz-svg-wrap { position: relative; width: 100%; }
.viz-svg-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-axis-label { fill: var(--text-muted); font-size: 10.5px; font-family: var(--font-mono); }
.viz-gridline { stroke: var(--viz-grid); stroke-width: 1; }
.viz-gridline--strong { stroke: var(--viz-grid-strong); stroke-width: 1; }
.viz-tick-label { fill: var(--text-muted); font-size: 10px; font-family: var(--font-mono); text-anchor: middle; }

.viz-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--smt-ink);
  color: var(--smt-text);
  border: 1px solid #2A323C;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.4;
  box-shadow: var(--shadow-float);
  z-index: 20;
  max-width: 220px;
  transform: translate(-50%, calc(-100% - 10px));
  opacity: 0;
  transition: opacity 0.1s ease;
  white-space: nowrap;
}
.viz-tooltip.is-visible { opacity: 1; }
.viz-tooltip strong { color: #fff; }
.viz-tooltip__row { color: var(--smt-text-muted); }

.viz-legend { display: flex; gap: var(--space-3); flex-wrap: wrap; margin: var(--space-2) 0; font-size: 12.5px; color: var(--text-muted); }
.viz-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend__swatch { width: 10px; height: 10px; display: inline-block; border-radius: 2px; }

.viz-summary { font-size: 13px; color: var(--text-muted); margin-top: var(--space-2); border-top: 1px solid var(--border); padding-top: var(--space-2); }
.viz-summary summary { cursor: pointer; color: var(--text); font-weight: 500; }

.mode-marker { cursor: pointer; }
.mode-marker:focus { outline: 2px solid var(--smt-accent); outline-offset: 2px; }

.mini-chart-wrap { background: var(--smt-ink); border-radius: var(--radius-sm); padding: 10px; }
.mini-chart-wrap svg { width: 100%; height: auto; display: block; }

/* ---------- Trust / founder line ---------- */
/* One compact strip under the homepage photo rather than its own bordered
   section with a repeated "About" button — /about/ is already one click
   away in the primary nav, so this just needed to read as a caption, not
   another full CTA. */
.trust-band {
  margin-top: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
@media (max-width: 600px) { .trust-band { flex-direction: column; align-items: flex-start; text-align: left; } }
.trust-band__icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--smt-ink);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.trust-band__icon svg { width: 20px; height: 20px; }
.trust-band__line { margin: 0; color: var(--text-muted); }
.trust-band__line strong { color: var(--text); }

/* ---------- Blog ---------- */
.post-meta { color: var(--text-muted); font-size: 14px; margin-bottom: var(--space-3); }
.prose { max-width: 720px; }
.prose h2 { margin-top: var(--space-5); }
.prose h3 { margin-top: var(--space-4); }
.prose p, .prose ul, .prose ol { color: var(--text); font-size: 17px; line-height: 1.7; }
.prose ul, .prose ol { margin: 0 0 var(--space-2); }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; }
.prose strong { color: var(--text); }
.prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }
.blog-card time { display: block; margin-bottom: 4px; }

.cta-band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-align: center;
  margin: var(--space-5) 0;
}
.cta-band h3 { margin-bottom: var(--space-2); }

/* ---------- Homepage journey steps (Speaker Placement -> Room Problems -> Treatment) ---------- */
.journey-steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  counter-reset: none;
}
.journey-steps > li { display: flex; gap: 14px; }
.journey-steps__num {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--smt-ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}
.journey-steps h3 { font-size: 17px; margin-bottom: 4px; }
.journey-steps p { color: var(--text-muted); font-size: 14.5px; margin-bottom: 8px; }
.journey-steps a { font-weight: 600; white-space: nowrap; }
@media (max-width: 800px) {
  .journey-steps { grid-template-columns: 1fr; }
}

/* ---------- Footer (deliberately dark: grounds the page, doubles as contrast) ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-6) 0 var(--space-4);
  background: var(--smt-ink);
  color: var(--smt-text);
  margin-top: var(--space-6);
}
.site-footer a { color: var(--smt-text); }
.site-footer a:hover { color: var(--smt-accent); }
.site-footer .wordmark { color: var(--smt-text); }
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: var(--space-5);
}
.site-footer__nav { display: flex; gap: var(--space-6); }
.site-footer__nav h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--smt-text-muted); margin-bottom: var(--space-2); }
.site-footer__nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer__nav a { color: var(--smt-text); font-size: 14.5px; }
.site-footer__tagline { color: var(--smt-text-muted); margin-top: 4px; }
.site-footer__disclaimer { grid-column: 1 / -1; font-size: 13.5px; color: var(--smt-text-muted); border-top: 1px solid var(--smt-border); padding-top: var(--space-3); margin-top: var(--space-2); margin-bottom: var(--space-1); }
.site-footer__copy { grid-column: 1 / -1; font-size: 12.5px; color: var(--smt-text-muted); margin: 0; }

@media (max-width: 700px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__nav { gap: var(--space-4); }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: 72px 0 0 0; background: var(--bg);
    flex-direction: column; align-items: stretch;
    padding: var(--space-3);
    display: none;
    overflow-y: auto;
  }
  .site-nav.is-open { display: flex; }
  .site-nav__links { flex-direction: column; align-items: stretch; gap: 0; height: auto; }
  .site-nav__links > li { height: auto; }
  .site-nav__links > li > a { height: auto; border-radius: 0; padding: 14px 4px; border-bottom: 1px solid var(--border); }

  /* Touch has no hover, so the trigger becomes a real tap-to-expand
     accordion (nav-dropdown.js toggles .is-open on click on every
     viewport — this block just restyles it for a stacked layout). */
  .nav-dropdown__trigger {
    width: 100%;
    height: auto;
    justify-content: space-between;
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }
  .nav-dropdown.is-open .nav-dropdown__caret { transform: rotate(180deg); }
  .nav-dropdown__menu {
    display: none; /* only .is-open reveals it — no more "always expanded" */
    position: static;
    margin: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0 10px var(--space-3);
    background: var(--surface-2);
  }
  .nav-dropdown.is-open .nav-dropdown__menu { display: flex; }
  .nav-dropdown__group { min-width: 0; }
  .nav-dropdown__menu li a { border-radius: 6px; }

  .nav-actions { flex-direction: column; align-items: stretch; height: auto; gap: var(--space-2); margin-top: var(--space-3); }
  .nav-cta { margin-top: 0; text-align: center; height: auto; padding-top: 12px; padding-bottom: 12px; }
  .nav-cart { align-self: center; }
}

/* ---------- Misc pages ---------- */
.legal .prose { max-width: 780px; }
.tiers { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
.tier-card { display: flex; flex-direction: column; }
.tier-card__price { font-family: var(--font-mono); font-size: 28px; font-weight: 600; margin: var(--space-1) 0 var(--space-2); }
.boundaries { background: var(--surface-2); border-radius: var(--radius); padding: var(--space-3); margin: var(--space-4) 0; }

.intake-form { display: grid; gap: var(--space-2); max-width: 720px; }

/* ---------- Responsive: charts on small screens ---------- */
@media (max-width: 640px) {
  .viz-card { padding: var(--space-2); }
  .viz-axis-label, .viz-tick-label { font-size: 9px; }
  .viz-legend { gap: var(--space-2); font-size: 11.5px; }
  .chip-row { gap: 6px; }
  .chip-toggle { padding: 5px 10px 5px 7px; font-size: 12px; }
}

/* ---------- Product detail page ---------- */
.product-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 860px) {
  .product-detail__grid { grid-template-columns: 1fr; }
}
.product-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.product-shots img {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.buy-box {
  position: sticky;
  top: 88px;
}
.buy-box__price {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 600;
  margin: var(--space-1) 0;
}
.buy-box__price .strike {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 8px;
}
.buy-box__meta { font-size: 13px; color: var(--text-muted); margin-bottom: var(--space-2); }
.buy-error { color: var(--smt-warn); margin-top: var(--space-2); }
.compat-list, .not-included-list { list-style: none; margin: var(--space-2) 0; padding: 0; }
.compat-list li, .not-included-list li {
  padding: 6px 0 6px 1.4em;
  position: relative;
  font-size: 14.5px;
  color: var(--text-muted);
}
.compat-list li::before {
  content: "✓";
  position: absolute; left: 0; color: #1E9E6B; font-weight: 700;
}
.not-included-list li::before {
  content: "–";
  position: absolute; left: 0.15em; color: var(--text-muted); font-weight: 700;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: var(--space-1);
  background: var(--surface);
}
.faq-item summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--text-muted); font-weight: 400; font-size: 20px; flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 16px 16px; margin: 0; color: var(--text-muted); }
.free-vs-paid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-3); margin: var(--space-3) 0; }
.free-vs-paid .card h3 { display: flex; align-items: center; gap: 8px; }
.free-vs-paid .card ul { padding-left: 1.1em; color: var(--text-muted); font-size: 14.5px; margin: var(--space-2) 0 0; }

/* ---------- Room Mode Calculator: Simple/Advanced + interpretation layer ---------- */
#rm-view-toggle { margin-bottom: var(--space-3); }
#rm-view-toggle button[data-view].is-active { background: var(--smt-accent); color: #fff; border-color: var(--smt-accent); }
#rm-summary { margin: var(--space-2) 0; font-size: 15px; }
#rm-summary strong { color: var(--text); }
#rm-attention { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--space-2); }
#rm-attention .callout { margin: 0; }
[data-view-mode="simple"] [data-advanced] { display: none; }
/* Was silently killing the keyboard focus ring set at line ~681
   (`.mode-marker:focus { outline: 2px solid var(--smt-accent); ... }`) —
   `outline: none` here won on the cascade for :focus, leaving keyboard
   users with only a brightness shift and no visible focus indicator on
   the Room Mode chart's clickable markers. Hover/focus keep the
   brightness cue; the outline property is left alone so the earlier
   rule's real focus ring shows again. */
.mode-marker:hover, .mode-marker:focus { filter: brightness(1.3); }
tr.is-highlighted { animation: rm-row-flash 1.6s ease; }
@keyframes rm-row-flash {
  0% { background: color-mix(in srgb, var(--smt-accent) 22%, transparent); }
  100% { background: transparent; }
}

/* ---------- Photo / Photo placeholder (see components/Photo.tsx) ---------- */
.photo {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
  background: var(--surface-2);
}
.photo-placeholder {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-2);
}
.photo-placeholder__label { font-size: 12.5px; font-weight: 600; }
.photo-placeholder__id { font-family: var(--font-mono); font-size: 11px; opacity: 0.75; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-2); margin: var(--space-3) 0; }

/* ---------- Audio Tools (Track Analyzer) ---------- */
.audio-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: var(--space-5) var(--space-3);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.audio-drop:hover, .audio-drop:focus-visible { border-color: var(--smt-accent); }
.audio-drop.is-dragover { border-color: var(--smt-accent); background: color-mix(in srgb, var(--smt-accent) 6%, var(--surface-2)); }
.audio-drop__icon { font-size: 28px; color: var(--smt-accent); margin-bottom: var(--space-1); }
.audio-drop__headline { font-family: var(--font-heading); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; margin-bottom: 4px; }
.audio-drop__sub { color: var(--text-muted); margin-bottom: var(--space-2); }
.audio-drop__hint { font-size: 12.5px; color: var(--text-muted); max-width: 46em; margin: 0 auto; }

.audio-filename { font-family: var(--font-mono); font-size: 14px; color: var(--text-muted); margin: var(--space-3) 0 var(--space-2); word-break: break-all; }
.audio-master-status-row { display: flex; align-items: center; gap: 10px; word-break: normal; }

/* Small inline spinner for "still polling" master-status states
   (checking payment / waiting for payment / queued-mastering-finalizing)
   — see setMasterSpinner() in audio-analyzer.js, which is the only thing
   that toggles its [hidden] attribute, always tied to a real in-flight
   poll and never shown for a terminal state. */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid color-mix(in srgb, var(--smt-accent) 25%, transparent);
  border-top-color: var(--smt-accent);
  border-radius: 50%;
  animation: smt-spin 0.7s linear infinite;
}
@keyframes smt-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.6s; }
}

/* The status panel is given an actual box (border/background) purely as
   a visual container for the preview player + stepper + progress bar
   inside it — the loading shine below deliberately does NOT live here;
   it wraps the individual "Analyzing" pill in the stepper instead (see
   that rule below), not this whole outer box. */
#audio-status-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: var(--space-3);
}

.audio-stepper {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3);
  gap: var(--space-1);
}
.audio-stepper li {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  position: relative;
}
.audio-stepper li.is-active { color: #fff; background: var(--smt-accent); border-color: var(--smt-accent); }
.audio-stepper li.is-done { color: #1E9E6B; border-color: #1E9E6B; background: color-mix(in srgb, #1E9E6B 10%, var(--surface-2)); }

/* Loading state — a thin animated shine sweeping AROUND the "Analyzing"
   pill specifically (not the uploading or ready pills, and not the
   panel that contains all three) — on for exactly as long as
   status === "analyzing" really is, via the existing `li[data-step=
   "analyzing"].is-active` combination setStep() already produces, so no
   extra JS state was needed for this. Same mask-composite "ring" trick
   as any animated-gradient-border: a padded gradient layer, punched out
   by a content-box mask so only the ring itself is visible. */
.audio-stepper li[data-step="analyzing"].is-active {
  position: relative;
  overflow: visible;
}
.audio-stepper li[data-step="analyzing"].is-active::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius-sm) + 3px);
  padding: 2px;
  background: linear-gradient(90deg, transparent 0%, #fff 45%, #fff 55%, transparent 100%);
  background-size: 250% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: audio-analyzing-shine 1.8s linear infinite;
  pointer-events: none;
}
@keyframes audio-analyzing-shine {
  0% { background-position: 250% 0; }
  100% { background-position: -150% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .audio-stepper li[data-step="analyzing"].is-active::after { animation: none; background-position: 50% 0; }
}

/* Real, byte-accurate upload progress — driven by the browser's own
   upload.onprogress event (see assets-src/audio-analyzer.js), never a
   synthesized number. Only ever shown during the "Uploading" stage. */
.audio-progress { margin: 0 0 var(--space-3); }
.audio-progress__track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.audio-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--smt-accent);
  border-radius: 999px;
  transition: width 0.15s ease-out;
}
.audio-progress__label {
  margin: 6px 0 0;
  font-size: 12.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.audio-waveform {
  width: 100%;
  height: 140px;
  display: block;
  background: var(--smt-ink);
  border-radius: var(--radius-sm);
  margin: var(--space-2) 0 var(--space-3);
}

/* ---------- Reusable inline audio player (assets-src/audio-player.js) ----------
   Deliberately generic, not "the analyzer's preview player" — the same
   markup/JS is meant to drop into any page that needs a short inline
   play/pause + seek control (Ableton racks and sample pack previews were
   the two call-outs when this was built; neither exists yet, so this
   only ships on the Track Analyzer page for now, but nothing here is
   analyzer-specific). One instance = one .audio-player container. */
.audio-player {
  margin: var(--space-2) 0 var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.audio-player__label {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.audio-player__row { display: flex; align-items: center; gap: var(--space-2); }
.audio-player__play {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--smt-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.audio-player__play:hover { filter: brightness(1.06); }
.audio-player__play svg { width: 15px; height: 15px; }
/* Higher specificity than the base input[type="range"] rule above (which
   only sets a flat --border background) — this is what lets the filled
   portion of the seek bar actually show progress, not just a plain thumb
   sliding over a static track. --seek-fill is set from JS on every
   timeupdate/input event (audio-player.js), same trick used for a
   filled-progress range slider anywhere no native ::part() exists. */
input[type="range"].audio-player__seek {
  flex: 1;
  min-width: 0;
  margin: 0;
  height: 6px;
  background: linear-gradient(
    to right,
    var(--smt-accent) 0%,
    var(--smt-accent) var(--seek-fill, 0%),
    var(--border) var(--seek-fill, 0%),
    var(--border) 100%
  );
}
.audio-player__time {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
@media (max-width: 420px) {
  .audio-player__time { display: none; } /* the seek bar + play/pause are enough on very narrow screens; time is a nice-to-have */
}

.audio-bands { margin: var(--space-2) 0 var(--space-3); }
.audio-band-row { display: grid; grid-template-columns: 140px 1fr 70px; align-items: center; gap: var(--space-2); margin-bottom: 8px; }
.audio-band-row__label { font-size: 13px; color: var(--text-muted); }
.audio-band-row__bar-wrap { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; height: 14px; overflow: hidden; }
.audio-band-row__bar { display: block; height: 100%; background: var(--smt-accent); border-radius: 999px; }
.audio-band-row__value { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); text-align: right; }
@media (max-width: 560px) { .audio-band-row { grid-template-columns: 100px 1fr 56px; } }

.audio-interpretation { margin: var(--space-2) 0 var(--space-3); padding-left: 1.2em; }
.audio-interpretation li { margin-bottom: 8px; color: var(--text); }

/* Same "equal-height card, button pinned to the bottom regardless of how
   much description text sits above it" pattern as .product-card (see
   that rule's own .btn override) — the 3 profile descriptions are
   different lengths, and without this the shortest card's button ends
   up floating mid-card with dead space below it instead of lining up
   with the other two, even though CSS Grid already stretches all 3
   cards to the same overall height. */
.audio-profile-card { position: relative; display: flex; flex-direction: column; height: 100%; }
.audio-profile-card[aria-disabled="true"] { opacity: 0.92; }
.audio-profile-card .btn { margin-top: auto; } /* disabled-button dimming is already handled by the global .btn[disabled] rule above */

.audio-master-status { margin-top: var(--space-3); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.audio-master-status .audio-filename { margin: 0 0 var(--space-2); }
.audio-master-status .btn { margin-top: var(--space-2); }
