/* KeyBPMKit — Precision Studio Deck Design System (v2 · Crafted Hardware Pass)
 * Strict adherence to DESIGN.md, kb/playbooks/design.md & Vibe Design Tips (001/004/007/015/016/017/020/022/023):
 * - Zero raw color literals outside :root (Canvas/SVG also read :root tokens)
 * - 4px grid concentric radii (r = R - p) + progressive superellipse continuous corners
 * - Tactile matte Braun/TE hardware keycaps via neutral bevel shadows (zero neon glow, zero flashy gradients)
 * - All :hover isolated inside @media (hover: hover); zero iOS sticky hover or tap-highlight box
 * - Balanced headings, pretty prose, tabular numerals, View Transitions continuity
 */

@view-transition {
  navigation: auto;
}

@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/FamiljenGrotesk-Variable.woff2?v=1") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/IBMPlexMono-SemiBold.woff2?v=1") format("woff2");
}

:root {
  color-scheme: light;

  /* Light anodized workbench surfaces */
  --paper: #f2f3f5;
  --surface: #ffffff;
  --surface-subtle: #e7eaef;
  --line: #d1d6df;
  --ink: #111318;
  --muted: #4f5666;

  /* Matte dark hardware deck */
  --deck-bg: #181a1f;
  --deck-panel: #22252d;
  --deck-panel-alt: #2a2e39;
  --deck-panel-hover: #313644;
  --deck-line: #303540;
  --deck-line-strong: #3d4352;
  --deck-ink: #f4f6fa;
  --deck-muted: #9ca4b5;
  --deck-wave-idle: #4a5162;

  /* Precision oscilloscope cobalt accent & hardware status signals */
  --accent: #0052cc;
  --accent-hover: #0044ad;
  --accent-edge: #003485;
  --accent-bright: #4d94ff;
  --accent-tint: #e8f0fe;
  --on-accent: #ffffff;

  --signal-ok: #15803d;
  --signal-ok-edge: #0f5c2b;
  --signal-ok-tint: #e6f4ea;
  --signal-ok-bright: #4ade80;
  --signal-warn: #b45309;
  --signal-warn-tint: #fef3c7;
  --signal-warn-bright: #fbbf24;
  --signal-err: #b91c1c;
  --signal-err-tint: #fee2e2;
  --signal-err-bright: #f87171;

  /* Hardware keycap neutral lighting layers (no neon glow, no colorful shadows) */
  --key-hi-dark: rgba(255, 255, 255, 0.16);
  --key-lo-dark: rgba(0, 0, 0, 0.34);
  --key-press-dark: rgba(0, 0, 0, 0.45);
  --key-hi-light: rgba(255, 255, 255, 0.92);
  --key-lo-light: rgba(17, 19, 24, 0.08);
  --key-press-light: rgba(17, 19, 24, 0.14);
  --key-shadow-contact: rgba(17, 19, 24, 0.2);
  --key-shadow-lift: rgba(17, 19, 24, 0.24);
  --key-shadow-light: rgba(17, 19, 24, 0.08);

  /* Neutral elevation shadows */
  --shadow-sm: 0 1px 2px rgba(17, 19, 24, 0.06);
  --shadow-deck: 0 12px 32px -4px rgba(17, 19, 24, 0.16), 0 2px 6px rgba(17, 19, 24, 0.08);
  --shadow-toast: 0 16px 36px rgba(17, 19, 24, 0.12), 0 3px 10px rgba(17, 19, 24, 0.06);

  /* Typography */
  --font-display: "Familjen Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* 4px-grid Spacing Rhythm (8 / 12 / 16 / 24 / 36 / 64) */
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 36px;
  --space-6: 64px;

  /* 4px-grid Concentric Radii (r = R - p) */
  --radius-deck: 20px;  /* outer shell; padding 12/16 -> inner 8/12 */
  --radius-toast: 16px; /* toast outer; padding 8 -> icon 8 */
  --radius-panel: 12px; /* cards, meter boxes, segmented track (pad 4 -> btn 8) */
  --radius-ctrl: 8px;   /* buttons, waveform bay, inputs, segmented thumb */
  --radius-chip: 4px;   /* inner chips & badges (floor 4px) */
  --radius-pill: 999px;

  /* Motion tokens (011 / 015 / 001) */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-settle: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-press: 120ms;
  --dur-shadow: 140ms;
  --dur-color: 160ms;
  --dur-med: 240ms;
  --dur-enter: 340ms;
}

/* 004 Progressive Continuous Corners (Chrome/Edge 139+, clean fallback elsewhere) */
@supports (corner-shape: superellipse(1.25)) {
  :where(*) {
    corner-shape: superellipse(1.25);
  }
  .deck-led,
  .hw-switch-track,
  .hw-switch-thumb,
  .kbk-spinner {
    corner-shape: round;
  }
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

/* 007 Global Type Switches */
h1,
h2,
h3,
.dropzone-title,
.tool-link-row strong {
  text-wrap: balance;
}

p,
li,
.hero-lead,
.section-intro,
.faq-item p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

@media (hover: hover) {
  a:hover {
    color: var(--accent-hover);
  }
}

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

.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;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 3.2vw, 2.25rem);
}

/* Reusable Spacing / Typography Helpers (eliminating inline styles) */
.mt-sm { margin-top: var(--space-2); }
.mt-md { margin-top: var(--space-3); }
.mt-lg { margin-top: var(--space-4); }
.mt-xl { margin-top: 44px; }
.mb-sm { margin-bottom: var(--space-2); }
.mb-md { margin-bottom: var(--space-3); }
.mb-lg { margin-bottom: var(--space-4); }
.m-0 { margin: 0; }
.text-muted { color: var(--muted); }
.text-deck-muted { color: var(--deck-muted); }
.text-accent { color: var(--accent); }
.text-accent-bright { color: var(--accent-bright); }
.text-ok-bright { color: var(--signal-ok-bright); }
.text-warn-bright { color: var(--signal-warn-bright); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.8125rem; }
.flex-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.flex-col { display: flex; flex-direction: column; gap: var(--space-1); }

/* =========================================================================
 * HEADER & NAVIGATION
 * ========================================================================= */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  view-transition-name: site-header;
}

.header-primary {
  background: var(--surface);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

@media (hover: hover) {
  .brand:hover {
    color: var(--ink);
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.site-nav a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 8px 13px;
  border-radius: var(--radius-ctrl);
  transition: color var(--dur-color) var(--ease-out), background var(--dur-color) var(--ease-out);
  white-space: nowrap;
}

@media (hover: hover) {
  .site-nav a:hover {
    color: var(--ink);
    background: var(--surface-subtle);
  }
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-tint);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

/* Subordinate Secondary Tool Rack Strip */
.tool-subnav {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.tool-subnav-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tool-subnav-inner::-webkit-scrollbar {
  display: none;
}

.subnav-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.subnav-sep {
  width: 1px;
  height: 14px;
  background: var(--line-strong);
  margin-inline: 6px;
  flex-shrink: 0;
}

.subnav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-ctrl);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--dur-color) var(--ease-out), background var(--dur-color) var(--ease-out);
}

.subnav-link--mobile-only {
  display: none;
}

@media (hover: hover) {
  .subnav-link:hover {
    color: var(--ink);
    background: var(--surface);
  }
}

.subnav-link[aria-current="page"] {
  color: var(--accent);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* =========================================================================
 * 001 TACTILE HARDWARE KEYCAP BUTTONS (Zero Glow, Zero Gradient, 44px Floor)
 * ========================================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-ctrl);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition:
    transform var(--dur-press) var(--ease-out),
    box-shadow var(--dur-shadow) var(--ease-out),
    background var(--dur-color) var(--ease-out),
    border-color var(--dur-color) var(--ease-out);
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent-edge);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 1px 0 var(--key-hi-dark),
    inset 0 -1px 0 var(--key-lo-dark),
    0 1px 2px var(--key-shadow-contact),
    0 4px 8px -3px var(--key-shadow-lift);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
  background: var(--accent-hover);
  box-shadow:
    inset 0 1px 2px var(--key-press-dark),
    inset 0 0 0 transparent,
    0 1px 1px var(--key-shadow-contact),
    0 0 0 transparent;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow:
    inset 0 1px 0 var(--key-hi-light),
    inset 0 -1px 0 var(--key-lo-light),
    0 1px 2px var(--key-shadow-light),
    0 3px 6px -2px var(--key-shadow-light);
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(1px);
  background: var(--surface-subtle);
  box-shadow:
    inset 0 1px 2px var(--key-press-light),
    inset 0 0 0 transparent,
    0 1px 0 var(--key-hi-light),
    0 0 0 transparent;
}

.btn-deck {
  background: var(--deck-panel-alt);
  color: var(--deck-ink);
  border-color: var(--deck-line-strong);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
  box-shadow:
    inset 0 1px 0 var(--key-hi-dark),
    inset 0 -1px 0 var(--key-lo-dark),
    0 1px 2px var(--key-shadow-contact),
    0 3px 6px -2px var(--key-shadow-lift);
}

.btn-deck:active:not(:disabled) {
  transform: translateY(1px);
  background: var(--deck-panel);
  box-shadow:
    inset 0 1px 2px var(--key-press-dark),
    inset 0 0 0 transparent,
    0 1px 1px var(--key-shadow-contact),
    0 0 0 transparent;
}

.btn-deck[aria-pressed="true"],
.btn-deck.is-active {
  background: var(--accent);
  border-color: var(--accent-edge);
  color: var(--on-accent);
}

.btn-deck-ok[aria-pressed="true"],
.btn-deck-ok.is-active {
  background: var(--signal-ok);
  border-color: var(--signal-ok-edge);
  color: var(--on-accent);
}

@media (hover: hover) {
  .btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    color: var(--on-accent);
    box-shadow:
      inset 0 1px 0 var(--key-hi-dark),
      inset 0 -1px 0 var(--key-lo-dark),
      0 1px 2px var(--key-shadow-contact),
      0 6px 14px -4px var(--key-shadow-lift);
  }
  .btn-secondary:hover:not(:disabled) {
    background: var(--surface-subtle);
    color: var(--ink);
    box-shadow:
      inset 0 1px 0 var(--key-hi-light),
      inset 0 -1px 0 var(--key-lo-light),
      0 2px 4px var(--key-shadow-light),
      0 5px 10px -3px var(--key-shadow-light);
  }
  .btn-deck:hover:not(:disabled) {
    background: var(--deck-panel-hover);
    color: var(--deck-ink);
    box-shadow:
      inset 0 1px 0 var(--key-hi-dark),
      inset 0 -1px 0 var(--key-lo-dark),
      0 1px 2px var(--key-shadow-contact),
      0 5px 12px -3px var(--key-shadow-lift);
  }
}

.btn-sm {
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.875rem;
}

/* 017 Button In-Place Spinner (keeps label & width fixed) */
.kbk-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: kbk-spin 0.85s linear infinite;
  flex-shrink: 0;
}

@keyframes kbk-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================================
 * 020 HARDWARE CHOICE CONTROLS: SEGMENTED CONTROL & PHYSICAL SWITCH
 * ========================================================================= */
.seg-control {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--deck-bg);
  border: 1px solid var(--deck-line);
  border-radius: var(--radius-panel);
}

.seg-btn {
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-ctrl); /* 12 - 4 = 8 exact concentric */
  background: transparent;
  color: var(--deck-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--dur-color) var(--ease-out),
    color var(--dur-color) var(--ease-out),
    box-shadow var(--dur-shadow) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.seg-btn--mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  padding: 0 10px;
}

.seg-btn:active {
  transform: translateY(1px);
}

.seg-btn[aria-checked="true"],
.seg-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent-edge);
  color: var(--on-accent);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  box-shadow:
    inset 0 1px 0 var(--key-hi-dark),
    inset 0 -1px 0 var(--key-lo-dark),
    0 1px 2px var(--key-shadow-contact);
}

@media (hover: hover) {
  .seg-btn:hover:not([aria-checked="true"]):not([aria-pressed="true"]) {
    color: var(--deck-ink);
    background: var(--deck-panel);
  }
}

/* Physical Toggle Switch (role="switch" + aria-checked) */
.hw-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-ctrl);
  border: 1px solid var(--deck-line-strong);
  background: var(--deck-panel-alt);
  color: var(--deck-ink);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  box-shadow:
    inset 0 1px 0 var(--key-hi-dark),
    inset 0 -1px 0 var(--key-lo-dark),
    0 1px 2px var(--key-shadow-contact);
  transition:
    background var(--dur-color) var(--ease-out),
    border-color var(--dur-color) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.hw-switch:active {
  transform: translateY(1px);
}

.hw-switch-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: var(--radius-pill);
  background: var(--deck-bg);
  border: 1px solid var(--deck-line-strong);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
  transition: background var(--dur-color) var(--ease-out), border-color var(--dur-color) var(--ease-out);
}

.hw-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--deck-muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: transform 200ms var(--ease-settle), background var(--dur-color) var(--ease-out);
}

.hw-switch[aria-checked="true"] .hw-switch-track {
  background: var(--signal-ok);
  border-color: var(--signal-ok-bright);
}

.hw-switch--accent[aria-checked="true"] .hw-switch-track {
  background: var(--accent);
  border-color: var(--accent-bright);
}

.hw-switch[aria-checked="true"] .hw-switch-thumb {
  transform: translateX(14px);
  background: var(--on-accent);
}

@media (hover: hover) {
  .hw-switch:hover {
    background: var(--deck-panel-hover);
  }
}

/* =========================================================================
 * HERO & PRECISION STUDIO DECK (022 Standby Hardware Face + 015 Continuity)
 * ========================================================================= */
.hero {
  padding-top: var(--space-4);
  padding-bottom: var(--space-5);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

@media (hover: hover) {
  .breadcrumb a:hover {
    color: var(--accent);
    text-decoration: underline;
  }
}

.hero-head {
  margin-bottom: var(--space-3);
}

.hero-head h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.hero-lead {
  margin: 0;
  font-size: 1.03125rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 72ch;
}

.updated-line {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Matte Dark Hardware Deck Shell (Concentric 20px outer - 12/16 padding -> 8/12 inner) */
.studio-deck {
  background: var(--deck-bg);
  color: var(--deck-ink);
  border: 1px solid var(--deck-line);
  border-radius: var(--radius-deck);
  box-shadow: var(--shadow-deck);
  overflow: hidden;
  view-transition-name: studio-deck;
}

.deck-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 12px var(--space-4);
  border-bottom: 1px solid var(--deck-line);
  background: var(--deck-panel);
}

.deck-model-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--deck-muted);
  letter-spacing: 0.02em;
}

.deck-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal-ok-bright);
  flex-shrink: 0;
}

.studio-deck[data-state="standby"] .deck-led {
  background: var(--accent-bright);
}

.deck-privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--deck-muted);
}

.deck-privacy-note svg {
  color: var(--signal-ok-bright);
  flex-shrink: 0;
}

.deck-body {
  padding: var(--space-3);
}

/* Active & Standby Unified Console Grid (no jarring empty-to-active jump!) */
.deck-console {
  display: grid;
  grid-template-columns: minmax(264px, 324px) minmax(0, 1fr);
  gap: var(--space-3);
  align-items: stretch;
}

.meter-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.meter-box {
  background: var(--deck-panel);
  border: 1px solid var(--deck-line);
  border-radius: var(--radius-panel);
  padding: var(--space-3);
  transition: border-color var(--dur-med) var(--ease-out);
}

.studio-deck[data-state="standby"] .meter-value {
  color: var(--deck-muted);
}

.studio-deck[data-state="standby"] .camelot-badge {
  background: var(--deck-panel-alt);
  color: var(--deck-muted);
  border: 1px solid var(--deck-line-strong);
}

.meter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.meter-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--deck-muted);
}

.meter-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--deck-ink);
  transition: color var(--dur-med) var(--ease-out);
}

.meter-value--key {
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
}

.meter-sub {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--deck-muted);
}

.meter-pair {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.camelot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 6px 12px;
  border-radius: var(--radius-ctrl);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  font-weight: 600;
  transition: background var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}

.compat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--deck-line);
}

.compat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--radius-chip);
  background: var(--deck-panel-alt);
  border: 1px solid var(--deck-line);
  font-size: 0.75rem;
  color: var(--deck-ink);
}

.compat-chip strong {
  font-family: var(--font-mono);
  color: var(--accent-bright);
}

/* Standby Dropzone Inside Right Hardware Bay (022 Miniature Oscilloscope Wireframe) */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--deck-line-strong);
  border-radius: var(--radius-panel);
  background: var(--deck-panel);
  padding: 24px var(--space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 292px;
  transition: border-color var(--dur-color) var(--ease-out), background var(--dur-color) var(--ease-out);
}

.dropzone.is-dragover {
  border-color: var(--accent-bright);
  background: var(--deck-panel-alt);
}

.empty-wireframe {
  margin-bottom: 14px;
  opacity: 0.92;
}

.dropzone-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--deck-ink);
}

.dropzone-sub {
  margin: 0 0 var(--space-3);
  font-size: 0.9375rem;
  color: var(--deck-muted);
  max-width: 48ch;
}

.dropzone-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sample-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--deck-line);
  width: 100%;
}

.sample-label {
  font-size: 0.8125rem;
  color: var(--deck-muted);
}

/* 017 In-Place Stage Progress & Inline Error Banner */
.deck-progress {
  margin-top: var(--space-2);
  padding: 12px var(--space-3);
  background: var(--deck-panel);
  border: 1px solid var(--deck-line-strong);
  border-radius: var(--radius-ctrl);
}

.deck-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.875rem;
  color: var(--deck-ink);
}

.deck-progress-stage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.deck-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--deck-bg);
  overflow: hidden;
}

.deck-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: var(--accent-bright);
  transition: width 260ms var(--ease-out);
}

.deck-error-banner {
  margin-top: var(--space-2);
  padding: 12px var(--space-3);
  background: var(--deck-panel);
  border: 1px solid var(--signal-err-bright);
  border-radius: var(--radius-ctrl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--signal-err-bright);
}

/* Waveform & Transport Panel */
.wave-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.wave-panel {
  background: var(--deck-panel);
  border: 1px solid var(--deck-line);
  border-radius: var(--radius-panel);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.transport-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.transport-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.time-readout {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  color: var(--deck-ink);
  white-space: nowrap;
}

.track-filename {
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--deck-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.waveform-canvas-wrap {
  position: relative;
  width: 100%;
  height: 112px;
  background: var(--deck-bg);
  border: 1px solid var(--deck-line);
  border-radius: var(--radius-ctrl);
  overflow: hidden;
  cursor: pointer;
}

.waveform-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

#stemWaveformCanvas {
  touch-action: none;
  cursor: grab;
}

/* Quick Transpose & Next-Step Handoff Bar */
.quick-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--deck-line);
}

.slider-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.slider-control--grow {
  flex: 1;
  min-width: 220px;
}

.slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--deck-muted);
}

.slider-head output {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--deck-ink);
  font-weight: 600;
}

.deck-range {
  width: 100%;
  height: 28px;
  accent-color: var(--accent-bright);
  cursor: pointer;
}

.handoff-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: var(--space-2);
  border-top: 1px solid var(--deck-line);
}

.handoff-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Batch Queue Table */
.queue-section {
  margin-top: var(--space-3);
  border-top: 1px solid var(--deck-line);
  padding-top: var(--space-3);
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.queue-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--deck-ink);
}

.queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deck-table-wrap {
  overflow-x: auto;
  padding: 12px;
  border: 1px solid var(--deck-line);
  border-radius: var(--radius-panel);
  background: var(--deck-bg);
}

.deck-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.deck-table th,
.deck-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--deck-line);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.deck-table th {
  background: var(--deck-panel);
  color: var(--deck-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.deck-table tbody tr {
  cursor: pointer;
  transition: background var(--dur-color) var(--ease-out);
}

@media (hover: hover) {
  .deck-table tbody tr:hover {
    background: var(--deck-panel);
  }
}

.deck-table tbody tr.is-selected {
  background: var(--deck-panel-alt);
}

.deck-table tbody tr:last-child td {
  border-bottom: 0;
}

/* =========================================================================
 * TAP BPM DECK (001 Hardware Tap Pad)
 * ========================================================================= */
.tap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: var(--space-3);
  align-items: stretch;
}

.tap-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 228px;
  width: 100%;
  border-radius: var(--radius-panel);
  border: 1.5px solid var(--accent-bright);
  background: var(--deck-panel);
  color: var(--deck-ink);
  cursor: pointer;
  padding: var(--space-4);
  user-select: none;
  box-shadow:
    inset 0 1px 0 var(--key-hi-dark),
    inset 0 -2px 0 var(--key-lo-dark),
    0 2px 4px var(--key-shadow-contact),
    0 6px 14px -4px var(--key-shadow-lift);
  transition:
    background var(--dur-press) var(--ease-out),
    transform var(--dur-press) var(--ease-out),
    box-shadow var(--dur-shadow) var(--ease-out);
}

@media (hover: hover) {
  .tap-pad:hover {
    background: var(--deck-panel-alt);
  }
}

.tap-pad:active,
.tap-pad.is-pulse {
  background: var(--accent);
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 4px var(--key-press-dark),
    inset 0 0 0 transparent,
    0 1px 1px var(--key-shadow-contact),
    0 0 0 transparent;
}

.tap-bpm-number {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.8rem, 6vw, 4.25rem);
  font-weight: 600;
  line-height: 1;
}

.tap-hint {
  font-size: 0.9375rem;
  color: var(--deck-muted);
}

.tap-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.tap-telemetry-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  font-weight: 600;
}

.deck-input {
  flex: 1;
  min-width: 112px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-ctrl);
  border: 1px solid var(--deck-line-strong);
  background: var(--deck-bg);
  color: var(--deck-ink);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
}

/* =========================================================================
 * STEM MIXER HARDWARE FADERS (Vocal Remover & Stem Splitter)
 * ========================================================================= */
.stem-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: var(--space-3);
}

.stem-export-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.turnstile-slot {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.fader-rack {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--deck-line);
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: var(--deck-panel);
}

.fader-row {
  display: grid;
  grid-template-columns: 116px 96px minmax(0, 1fr) 54px auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--deck-line);
}

.fader-dl-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-ctrl);
  border: 1px solid var(--deck-line-strong);
  background: var(--deck-panel-alt);
  color: var(--deck-ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

@media (hover: hover) {
  .fader-dl-link:hover {
    background: var(--accent);
    border-color: var(--accent-edge);
    color: var(--on-accent);
  }
}

.dash-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-panel);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.9375rem;
  color: var(--ink);
}

.dash-status-banner.is-ok {
  border-color: var(--signal-ok);
  background: rgba(21, 128, 61, 0.06);
}

.dash-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-badge);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-subtle);
  color: var(--ink-soft);
}

.dash-badge.is-ok {
  background: rgba(21, 128, 61, 0.12);
  color: #166534;
}

.dash-badge.is-err {
  background: rgba(185, 28, 28, 0.12);
  color: #991b1b;
}

.dash-empty {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  color: var(--muted);
  font-size: 0.9375rem;
}

.fader-row:last-child {
  border-bottom: 0;
}

.fader-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--deck-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.fader-controls {
  display: flex;
  gap: 6px;
}

.fader-sm-btn {
  min-width: 40px;
  min-height: 36px;
  border-radius: var(--radius-ctrl);
  border: 1px solid var(--deck-line-strong);
  background: var(--deck-bg);
  color: var(--deck-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 var(--key-hi-dark), inset 0 -1px 0 var(--key-lo-dark);
  transition: transform var(--dur-press) var(--ease-out), background var(--dur-color) var(--ease-out);
}

.fader-sm-btn:active {
  transform: translateY(1px);
}

.fader-sm-btn[aria-pressed="true"].is-solo {
  background: var(--accent);
  border-color: var(--accent-bright);
  color: var(--on-accent);
}

.fader-sm-btn[aria-pressed="true"].is-mute {
  background: var(--signal-warn);
  border-color: var(--signal-warn-bright);
  color: var(--on-accent);
}

.fader-pct {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  color: var(--deck-muted);
  text-align: right;
}

.preview-window-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--deck-panel-alt);
  border: 1px solid var(--deck-line);
  border-radius: var(--radius-ctrl);
}

/* =========================================================================
 * LUFS METER GRID
 * ========================================================================= */
.lufs-readout-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: var(--space-3);
}

.lufs-card {
  background: var(--deck-panel);
  border: 1px solid var(--deck-line);
  border-radius: var(--radius-panel);
  padding: 14px 16px;
}

.lufs-card.is-warn {
  border-color: var(--signal-warn-bright);
}

.lufs-card.is-warn .meter-value {
  color: var(--signal-warn-bright);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-chip);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill-ok {
  background: var(--signal-ok-tint);
  color: var(--signal-ok);
}

.status-pill-warn {
  background: var(--signal-warn-tint);
  color: var(--signal-warn);
}

.status-pill-neutral {
  background: var(--surface-subtle);
  color: var(--muted);
}

/* =========================================================================
 * INTERACTIVE CAMELOT WHEEL
 * ========================================================================= */
.camelot-layout {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
}

.camelot-layout--embedded {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--deck-line);
}

.camelot-svg-wrap {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
}

.camelot-wedge {
  cursor: pointer;
  transition: opacity var(--dur-color) var(--ease-out);
}

@media (hover: hover) {
  .camelot-wedge:hover {
    opacity: 0.9;
  }
}

.camelot-detail-panel {
  background: var(--deck-panel);
  border: 1px solid var(--deck-line);
  border-radius: var(--radius-panel);
  padding: 20px;
}

.camelot-moves-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--deck-line);
}

.camelot-moves-list {
  display: grid;
  gap: 8px;
  font-size: 0.875rem;
}

.scale-notes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.note-pill {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: 5px 10px;
  border-radius: var(--radius-chip);
  background: var(--deck-bg);
  border: 1px solid var(--deck-line);
  color: var(--deck-ink);
}

/* =========================================================================
 * 016 TOP-CENTER STATUS TOAST (Clean Tokenized Layer)
 * ========================================================================= */
.kbk-toast-host {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  pointer-events: none;
  display: flex;
  justify-content: center;
  width: max-content;
  max-width: calc(100vw - 24px);
}

.kbk-toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--radius-toast); /* 16px outer; padding 8 -> icon tile 8px concentric */
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-toast);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  animation: kbk-toast-in var(--dur-enter) var(--ease-settle) both;
}

.kbk-toast.is-leaving {
  animation: kbk-toast-out 200ms ease-in forwards;
}

.kbk-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-ctrl); /* 16 - 8 = 8 concentric */
  background: var(--accent-tint);
  color: var(--accent);
  flex-shrink: 0;
}

.kbk-toast.is-ok .kbk-toast-icon {
  background: var(--signal-ok-tint);
  color: var(--signal-ok);
}

.kbk-toast.is-error .kbk-toast-icon {
  background: var(--signal-err-tint);
  color: var(--signal-err);
}

@keyframes kbk-toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes kbk-toast-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* =========================================================================
 * SEO / GEO CONTENT SECTIONS (100% SSR HTML, Light Workbench Surfaces)
 * ========================================================================= */
.content-section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.content-section--compact {
  padding: 36px 0;
}

.content-section h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.content-section h3 {
  margin: 22px 0 8px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.section-intro {
  margin: 0 0 var(--space-4);
  color: var(--muted);
  max-width: 70ch;
}

.prose {
  max-width: 70ch;
}

.prose p {
  margin: 0 0 14px;
}

/* Tables (007 tabular numerals + 004 concentric wrap) */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-sm);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}

.spec-table th,
.spec-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}

.spec-table th {
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.spec-table tbody tr:last-child td,
.spec-table tbody tr:last-child th {
  border-bottom: 0;
}

.spec-table .fact-key {
  width: 185px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-subtle);
}

.spec-table .col-brand {
  background: var(--accent-tint);
  color: var(--ink);
}

/* Numbered How-It-Works Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.step-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 20px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-ctrl);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.step-item h3 {
  margin: 0 0 6px;
  font-size: 1.0625rem;
}

.step-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.diagram-figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.diagram-figure img {
  width: 100%;
  height: auto;
}

.diagram-figure figcaption {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* Two-Column Fit / Not-Fit List */
.fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.fit-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 20px 24px;
}

.fit-box h3 {
  margin: 0 0 12px;
}

.fit-box ul {
  margin: 0;
  padding-left: 18px;
}

.fit-box li {
  margin-bottom: 8px;
}

/* FAQ List */
.faq-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
}

.faq-item:last-child {
  border-bottom: 0;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  color: var(--ink);
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
}

/* Internal Tool Cross-Links */
.tool-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tool-link-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--dur-color) var(--ease-out), transform var(--dur-press) var(--ease-out);
}

@media (hover: hover) {
  .tool-link-row:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    color: var(--ink);
  }
}

.tool-link-row strong {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--accent);
}

.tool-link-row span {
  font-size: 0.875rem;
  color: var(--muted);
}

/* =========================================================================
 * PRICING PAGE
 * ========================================================================= */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: stretch;
}

.pricing-promise-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 14px 18px;
  margin-bottom: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.pricing-promise-bar strong {
  color: var(--ink);
}

.plan-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: stretch;
}

@media (max-width: 1080px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.plan-box .meter-kicker {
  color: var(--muted);
}

.plan-box.is-featured .meter-kicker {
  color: var(--accent);
}

.plan-box--narrow {
  max-width: 520px;
}

.plan-box.is-featured {
  border-color: var(--accent);
  border-width: 2px;
}

.plan-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}

.plan-price span {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--muted);
}

.plan-box .btn {
  width: 100%;
  padding: 10px 14px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

.plan-features {
  margin: 0;
  padding-left: 18px;
  flex: 1;
}

.plan-features li {
  margin-bottom: 8px;
  font-size: 0.9375rem;
}

/* =========================================================================
 * FOOTER
 * ========================================================================= */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 44px 0 28px;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: 28px;
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 10px;
}

.footer-desc {
  margin: 0 0 10px;
  max-width: 36ch;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 7px;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
}

@media (hover: hover) {
  .footer-col a:hover {
    color: var(--accent);
    text-decoration: underline;
  }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
}

/* =========================================================================
 * RESPONSIVE BREAKPOINTS (Zero horizontal overflow at 375px)
 * ========================================================================= */
@media (max-width: 960px) {
  .site-nav,
  .subnav-kicker,
  .subnav-sep {
    display: none;
  }

  .subnav-link--mobile-only {
    display: inline-flex;
  }

  .tool-subnav-inner {
    padding-block: 6px;
  }

  .subnav-link {
    padding: 8px 12px;
  }

  .deck-console,
  .tap-grid,
  .camelot-layout,
  .pricing-grid,
  .dashboard-grid,
  .tool-links-grid {
    grid-template-columns: 1fr;
  }

  .lufs-readout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 16px;
  }

  .deck-topbar {
    padding: 12px 16px;
  }

  .deck-body {
    padding: 12px;
  }

  .quick-controls,
  .steps-grid,
  .fit-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .fader-row {
    grid-template-columns: 88px 82px minmax(0, 1fr) 44px auto;
    gap: 8px;
    padding: 10px 12px;
  }

  .header-cta {
    display: none;
  }

  .spec-table .fact-key {
    width: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
