/* ============================================================
 * Supertonic 3 — Supertone-aligned technical landing
 * Hand-rolled, no framework. Manrope for brand/UI type, IBM Plex Mono
 * for code. Continuous reflow via clamp() + container queries.
 * ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Palette: close to Supertone's public web identity: black, white,
     Supertonic yellow, and Supertone blue. */
  --ink:        #090909;
  --ink-soft:   #202020;
  --muted:      #5D5D5D;
  --line:       #DBDBDB;
  --line-soft:  #F0F0F0;
  --page:       #F4F4F4;
  --page-edge:  #FFFFFF;
  --card:       #FFFFFF;
  --accent:     #F2FB41;
  --accent-ink: #090909;
  --accent-soft:#F4FB66;
  --info:       #227CFF;
  --info-soft:  #EEF6FF;

  --r-card:   10px;
  --r-chip:   999px;
  --r-btn:    8px;

  --shadow-card:    0 1px 2px rgba(9,9,9,.04), 0 10px 28px rgba(9,9,9,.05);
  --shadow-lift:    0 2px 4px rgba(9,9,9,.06), 0 18px 42px rgba(9,9,9,.08);
  --shadow-toast:   0 6px 24px rgba(9,9,9,.14);

  /* Type system. Official Supertone pages lean on geometric sans type;
     Manrope gives this page that same brand-adjacent confidence. */
  --font-display: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ui:      'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Fluid type ramp — every type size is a clamp() so reflow is continuous. */
  --t-display: clamp(2.4rem, 6.2vw + 0.4rem, 5.6rem);
  --t-h2:      clamp(1.6rem, 2.4vw + 0.6rem, 2.6rem);
  --t-h3:      clamp(1.05rem, 0.4vw + 0.95rem, 1.18rem);
  --t-body:    clamp(0.95rem, 0.2vw + 0.9rem, 1.05rem);
  --t-sub:     clamp(1rem, 0.5vw + 0.9rem, 1.15rem);
  --t-kicker:  clamp(0.72rem, 0.1vw + 0.7rem, 0.78rem);

  /* Fluid spacing */
  --space-section: clamp(3rem, 6vw, 5.5rem);
  --space-card:    clamp(1rem, 1.5vw + 0.5rem, 1.6rem);

  --measure: 64ch;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink:        #F7F8FA;
  --ink-soft:   #D8DCE3;
  --muted:      #9AA1AD;
  --line:       #2A3038;
  --line-soft:  #171C23;
  --page:       #050607;
  --page-edge:  #0A0D12;
  --card:       #11151B;
  --accent:     #F2FB41;
  --accent-ink: #090909;
  --accent-soft:#2A3010;
  --info:       #61A0FF;
  --info-soft:  #10213A;
  --shadow-card: 0 1px 2px rgba(0,0,0,.35), 0 18px 52px rgba(0,0,0,.36);
  --shadow-lift: 0 2px 4px rgba(0,0,0,.32), 0 22px 56px rgba(0,0,0,.46);
  --shadow-toast: 0 8px 28px rgba(0,0,0,.45);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto !important; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* Default before the inline theme script runs; overridden immediately for dark. */
  color-scheme: light;
}
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 110% -10%, rgba(34,124,255,.08), transparent 58%),
    linear-gradient(180deg, var(--page) 0%, var(--page-edge) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(980px 420px at 110% -12%, rgba(34,124,255,.18), transparent 58%),
    radial-gradient(720px 380px at -10% 24%, rgba(242,251,65,.09), transparent 62%),
    linear-gradient(180deg, var(--page) 0%, var(--page-edge) 100%);
}

/* Sections sit under a sticky header; offset anchor scrolls so headings
   don't get clipped when arriving from the in-page nav. */
section[id] { scroll-margin-top: 88px; }

/* Stop the iOS double-tap-to-zoom delay on interactive controls and kill
   the default tap-highlight rectangle. */
a, button, summary, .tab, .install-tab {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Skip-to-main link: visually hidden until focused, then docks under the
   header so keyboard users can bypass the nav. */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--accent);
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  transform: translateY(-160%);
  transition: transform .15s ease;
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
img, svg { max-width: 100%; display: block; }
a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 6px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 1px;
}
a:hover { background-size: 100% 100%; transition: background-size .2s ease; }
a.plain, .footer a, .nav a, .cta-link, .btn, .brand, .install-tab, .copy-pill, .filter-bar .tab, .stub-note a, .feature a, .lang-block a, .license-card a {
  background-image: none;
  padding-bottom: 0;
}
.stub-note a, .license-card a { color: var(--info); text-decoration: underline; text-underline-offset: 3px; }
.stub-note a:hover, .license-card a:hover { color: var(--ink); }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.024em;
  color: var(--ink);
  margin: 0 0 .4em;
  line-height: 1.08;
  text-wrap: balance;          /* prevent widows; falls back gracefully */
}
p { text-wrap: pretty; }
h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--t-h3);
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; color: var(--ink-soft); }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: .92em; }

/* Dark theme overrides keep "ink as
   text" and "ink as surface" from collapsing into the same color. */
html[data-theme="dark"] main a:hover {
  color: var(--accent-ink);
}
html[data-theme="dark"] section.block {
  border-top-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] .skip-link,
html[data-theme="dark"] .spec-highlight,
html[data-theme="dark"] .btn.primary,
html[data-theme="dark"] .sample-num,
html[data-theme="dark"] .audio-row.ours::before,
html[data-theme="dark"] .copy-btn.copied {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
html[data-theme="dark"] .btn.primary:hover,
html[data-theme="dark"] .btn.accent:hover {
  background: #DDE737;
  border-color: #DDE737;
  color: var(--accent-ink);
}
html[data-theme="dark"] .tab[aria-selected="true"] {
  background: var(--info);
  border-color: var(--info);
  color: #fff;
}
html[data-theme="dark"] .tab.chip-tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
html[data-theme="dark"] .quicklink.ql-code .ql-mark,
html[data-theme="dark"] .code-block,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .vb-callout {
  background: #050607;
  color: #fff;
}
html[data-theme="dark"] .chip-copy.copied .chip-prefix {
  background: #050607;
  color: var(--accent);
}
html[data-theme="dark"] .lang-block {
  background-image: linear-gradient(180deg, rgba(34,124,255,0) 0%, rgba(34,124,255,.07) 100%);
}
html[data-theme="dark"] .hero-waveform {
  color: rgba(242,251,65,.12);
}
html[data-theme="dark"] .quicklink:hover,
html[data-theme="dark"] .lang:hover {
  border-color: rgba(242,251,65,.35);
}
html[data-theme="dark"] .filter-bar {
  border-top-color: rgba(255,255,255,.08);
  border-bottom-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] .sample-quote {
  background: #0B0F15;
  border-left-color: var(--accent);
}
html[data-theme="dark"] .sample-quote code {
  background: var(--line-soft);
}
html[data-theme="dark"] .audio-row.reference {
  border-color: rgba(97,160,255,.24);
}
html[data-theme="dark"] .audio-row.ours {
  background: linear-gradient(90deg, rgba(242,251,65,.18) 0%, rgba(242,251,65,.06) 100%);
  border-color: rgba(242,251,65,.38);
  border-left-color: var(--accent);
}
html[data-theme="dark"] .audio-row.ours .row-label .sub {
  color: var(--accent);
}
html[data-theme="dark"] table.bench tr.row-accent td:first-child {
  border-left-color: var(--accent);
}
html[data-theme="dark"] table.bench tr.row-accent {
  border-top-color: var(--accent);
}
html[data-theme="dark"] .callout.is-accent {
  border-color: rgba(242,251,65,.42);
  background: linear-gradient(180deg, rgba(242,251,65,.13) 0%, rgba(242,251,65,.04) 100%);
}
html[data-theme="dark"] .install-tab[aria-selected="true"]::after {
  background: var(--accent);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px);
}

/* ---------- Reusable atoms ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-chip);
  background: var(--line-soft);
  color: var(--ink-soft);
  font-size: .82rem;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip.mono     { font-family: var(--font-mono); font-size: .76rem; letter-spacing: -0.01em; }
.chip.accent   { background: var(--accent-soft); color: var(--ink); border-color: rgba(11,12,14,.08); }
.chip.info     { background: var(--info-soft); color: var(--info); }
.chip.outline  { background: var(--card); border-color: var(--line); }

.spec-highlight {
  background: var(--ink);
  color: var(--accent);
  border-color: var(--ink);
  padding: 7px 14px;
  font-size: .85rem;
  font-weight: 600;
}
.chip-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,217,10,.22);
  display: inline-block;
}

/* Interactive chip variant: clicking copies its text to clipboard.
   Visually a sibling of .chip but with extra affordance — leading $
   prompt, trailing copy icon that brightens on hover, yellow flash on
   the "copied" state (the global toast also fires). */
.chip-copy {
  font: inherit;                              /* reset <button> defaults */
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 6px 11px;
  border-radius: var(--r-chip);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.1;
  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    transform .12s ease,
    box-shadow .15s ease;
}
.chip-copy:hover {
  border-color: rgba(11,12,14,.42);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(11,12,14,.06);
}
.chip-copy:active { transform: translateY(0); }
.chip-copy .chip-prefix {
  color: var(--accent-ink);
  font-weight: 700;
  background: var(--accent);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: .68rem;
  line-height: 1;
}
.chip-copy .chip-copy-icon {
  opacity: .42;
  transition: opacity .15s ease;
  flex-shrink: 0;
}
.chip-copy:hover .chip-copy-icon { opacity: 1; }
.chip-copy.copied {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.chip-copy.copied .chip-prefix {
  background: var(--ink);
  color: var(--accent);
}
.chip-copy.copied .chip-copy-icon { opacity: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-btn);
  border: 1px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  font-family: var(--font-ui);
  font-size: .95rem;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover  { background: var(--line-soft); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.accent  { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.accent:hover { background: #e9ce06; border-color: #e9ce06; }

/* ---------- Header / nav ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--page) 86%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  min-height: 64px;
  padding-block: 12px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark-img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
  display: block;
  /* Cropped slightly so the icon's transparent margins don't push the
     wordmark away from the visual edge of the logo. */
  object-fit: cover;
  object-position: center;
}
.brand-word { display: inline-flex; align-items: baseline; gap: 4px; }
.brand-num {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
  background: var(--line-soft);
  padding: 2px 7px;
  border-radius: 5px;
  align-self: center;
}
.nav {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.nav a {
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 6px;
  position: relative;
}
.nav a:hover { background: var(--line-soft); color: var(--ink); }
.nav a:hover::after {
  content: '';
  position: absolute;
  inset: auto 12px 4px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.header-ctas {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cta-link {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 4px;
}
.cta-link:hover { color: var(--ink); }
.cta-link.gh    { display: inline-flex; align-items: center; padding: 6px; border-radius: 6px; }
.cta-link.gh:hover { background: var(--line-soft); }

.theme-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.theme-toggle:hover {
  background: var(--line-soft);
  border-color: color-mix(in srgb, var(--ink) 26%, var(--line));
}
.theme-toggle:active { transform: translateY(1px); }
.theme-icon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: block; }
html:not([data-theme="dark"]) .theme-icon-moon { display: block; }

.nav-toggle { display: none; padding: 8px; }

@media (max-width: 980px) {
  .nav, .cta-link:not(.gh) { display: none; }
  .nav-toggle { display: inline-flex; }
}

details.mobile-menu { display: none; }
@media (max-width: 980px) {
  details.mobile-menu {
    display: block;
    border-bottom: 1px solid var(--line);
    background: var(--card);
  }
  details.mobile-menu[open] summary .chev { transform: rotate(180deg); }
  details.mobile-menu summary {
    list-style: none;
    padding: 12px clamp(16px, 3vw, 32px);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
  }
  details.mobile-menu summary::-webkit-details-marker { display: none; }
  details.mobile-menu .chev { transition: transform .2s ease; margin-left: auto; }
  details.mobile-menu .menu-body {
    padding: 4px clamp(16px, 3vw, 32px) 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  details.mobile-menu .menu-body a {
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink);
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.6rem);
  align-items: flex-start;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--t-kicker);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.eyebrow .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(245,217,10,.22);
}

.hero-headline {
  font-size: var(--t-display);
  letter-spacing: -0.045em;
  margin: 0;
  font-weight: 800;
  line-height: 0.98;
  max-width: 18ch;
}
.hero-headline .line { display: block; }
.hero-headline .line-prefix {
  font-size: clamp(.95rem, 1.4vw + 0.4rem, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--muted);
  line-height: 1.15;
  margin-bottom: clamp(8px, 1vw, 14px);
}
.hero-italic {
  font-style: normal;
  font-weight: 800;
  color: var(--info);
  padding: 0;
}
.hero-sub {
  font-size: var(--t-sub);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0;
  line-height: 1.5;
}
.spec-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: clamp(16px, 2.5vw, 28px);
  margin-top: 6px;
}
.hero-actions .action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 28ch;
}
.action-helper {
  font-size: .82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}
/* Rollout-status caveat under a hero CTA helper line. Typographically
   a sibling of .action-helper: same UI font, same muted color, just a
   touch smaller. A pseudo-element dot baseline-aligns naturally on the
   first wrapped line — no flex misalignment when the text wraps. */
.action-note {
  font-size: .78rem;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.45;
}
.action-note::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
  vertical-align: 1.5px;
}
@media (max-width: 640px) {
  .hero-actions { grid-template-columns: 1fr; }
  .hero-actions .action { max-width: none; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* Hero resource quicklinks — three pill-shaped anchors that mirror the
   badge row on the HF model card. Quiet enough to live under the primary
   CTAs without competing. Each pill: brand-color mark + key/value text. */
.hero-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(22px, 3vw, 32px);
}
.quicklink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  /* override global underline-gradient on <a> */
  background-image: none;
  transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}
.quicklink:hover {
  transform: translateY(-1px);
  border-color: rgba(11,12,14,.32);
  box-shadow: var(--shadow-card);
  background-image: none;
}
.quicklink .ql-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  line-height: 1;
}
.quicklink .ql-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  gap: 1px;
  min-width: 0;
}
.quicklink .ql-key {
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
}
.quicklink .ql-val {
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--muted);
  letter-spacing: .03em;
  white-space: nowrap;
}
/* Per-brand mark accents */
.quicklink.ql-demo .ql-mark { background: var(--accent); color: var(--ink); }
.quicklink.ql-code .ql-mark { background: var(--ink); color: #fff; }
.quicklink.ql-sdk  .ql-mark { background: var(--info); color: #fff; }

.hero-waveform {
  position: absolute;
  inset: auto 0 -1px 0;
  width: 100%;
  height: clamp(40px, 6vw, 80px);
  color: rgba(11,12,14,.14);
  pointer-events: none;
}

/* ---------- Section scaffolding ---------- */
section.block {
  padding: var(--space-section) 0;
  border-top: 1px solid rgba(11,12,14,.06);
}

.section-head {
  max-width: var(--measure);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.kicker {
  font-family: var(--font-mono);
  font-size: var(--t-kicker);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 12px;
}
.section-title {
  font-size: var(--t-h2);
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: .4em;
}
.section-title em {
  font-style: normal;
  font-weight: 800;
  color: var(--info);
}
.section-sub {
  font-size: var(--t-sub);
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ---------- Languages section ---------- */
.lang-block { background-image: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.4) 100%); }
.lang-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Continuous reflow: minmax clamp scales the floor with viewport. */
  grid-template-columns: repeat(auto-fill, minmax(clamp(7rem, 18vw, 9rem), 1fr));
  gap: 8px;
}
.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .92rem;
  color: var(--ink);
  font-weight: 500;
  transition: border-color .15s ease, transform .15s ease;
}
.lang:hover { transform: translateY(-1px); border-color: rgba(11,12,14,.18); }
.lang .lang-code {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-left: auto;
  background: var(--line-soft);
  padding: 2px 6px;
  border-radius: 4px;
}
.lang.has-samples {
  border-color: var(--accent);
  border-width: 1px;
  box-shadow: inset 3px 0 0 var(--accent);
  padding-left: 16px;
}
.lang.has-samples .lang-code { background: var(--accent-soft); color: var(--ink); }
.lang-legend {
  margin-top: clamp(1rem, 2vw, 1.4rem);
  font-size: .85rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lang-legend .legend-swatch {
  display: inline-block;
  width: 22px; height: 12px;
  background: var(--card);
  border: 1px solid var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
  border-radius: 3px;
}

/* ---------- Listening Samples ---------- */
.samples-intro .section-sub { font-size: var(--t-body); }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--r-chip);
  font-size: .78rem;
  color: var(--ink-soft);
}
.swatch       { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch-neutral { background: #bfc3cb; }

.filter-bar {
  position: sticky;
  top: 64px;
  z-index: 5;
  background: color-mix(in srgb, var(--page) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 12px 0;
  margin: clamp(1.4rem, 3vw, 2rem) 0 1rem;
  border-top: 1px solid rgba(11,12,14,.06);
  border-bottom: 1px solid rgba(11,12,14,.06);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.filter-row:last-child { margin-bottom: 0; }
.filter-row .filter-label {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: .68rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 500;
  margin-right: 8px;
  min-width: 68px;
  min-height: 34px;
}
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--r-chip);
  color: var(--ink-soft);
  font-weight: 500;
  font-family: var(--font-ui);
  font-size: .88rem;
  line-height: 1;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tab:hover { background: var(--line-soft); color: var(--ink); }
.tab[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.tab.chip-tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.no-results {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}

/* Sample cards */
.samples-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.sample-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.sample-more {
  min-width: 190px;
  justify-content: center;
}
.sample {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--space-card);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 14px;
  container-type: inline-size;
  container-name: card;
}
.sample-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.sample-num {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 600;
  background: var(--ink);
  color: var(--accent);
  padding: 5px 10px;
  border-radius: 6px;
  flex-shrink: 0;
  letter-spacing: 0;
}
.sample-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.sample-quote {
  position: relative;
  background: var(--page);
  border-left: 3px solid var(--ink);
  padding: 14px 18px 14px 44px;
  border-radius: 6px;
  font-size: 1rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.6;
  font-family: var(--font-ui);
}
.sample-quote .quote-mark {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 18px; height: 18px;
  color: var(--muted);
  opacity: .55;
}
.sample-quote code {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .78em;
  color: var(--info);
  font-family: var(--font-mono);
}

.audio-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
}
.audio-row.reference {
  background: var(--info-soft);
  border-color: rgba(42,75,201,.18);
}
.audio-row.ours {
  background: linear-gradient(90deg, var(--accent-soft) 0%, rgba(255,247,199,.4) 100%);
  border-color: rgba(245,217,10,.55);
  border-left: 3px solid var(--ink);
  position: relative;
}
.audio-row.ours::before {
  content: 'OURS';
  position: absolute;
  top: -8px; left: 12px;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .14em;
  background: var(--ink);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 4px;
}
.audio-row .row-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink);
}
.audio-row .row-label .sub {
  font-family: var(--font-mono);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 500;
  color: var(--muted);
}
.audio-row.ours      .row-label .sub { color: #8d7800; }
.audio-row.reference .row-label .sub { color: var(--info); }
.audio-row audio {
  width: 100%;
  min-width: 0;
  height: 36px;
}

/* Sample-card container query: when the card itself is narrow,
   stack the audio-row columns. NOT a viewport media query. */
@container card (max-width: 540px) {
  .audio-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .audio-row .row-label {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
}

.comparisons {
  display: grid;
  gap: 8px;
}

/* ---------- Voice Builder callout (dark band between samples and benchmark) ---------- */
.vb-callout {
  background: var(--ink);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.vb-callout::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 320px at 95% 0%, rgba(245,217,10,.18), transparent 60%),
    radial-gradient(600px 260px at 0% 100%, rgba(42,75,201,.18), transparent 65%);
  pointer-events: none;
  z-index: -1;
}
.vb-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
}
.vb-body { min-width: 0; }
.vb-logo {
  /* Wide Supertonic wordmark logo. Gray glyphs on transparent — reads well
     on the dark band. Capped small so it acts as a brand affordance, not
     a decorative banner. */
  height: clamp(22px, 2vw + 14px, 30px);
  width: auto;
  max-width: 260px;
  display: block;
  margin-bottom: 18px;
  opacity: .92;
}
.vb-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-kicker);
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 12px;
}
.vb-headline {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw + 0.5rem, 2.8rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.vb-headline em {
  font-style: normal;
  font-weight: 800;
  color: var(--accent);
}
.vb-text {
  font-size: var(--t-sub);
  color: rgba(255,255,255,.84);
  max-width: 56ch;
  margin: 0;
  line-height: 1.5;
}
.vb-text a {
  color: #fff;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
}
.vb-text a:hover { background-size: 100% 8px; }
.vb-btn { flex-shrink: 0; }
/* Rollout status row inside the Voice Builder band. Sits below vb-text,
   surfaces the current Supertonic 2 → 3 transition so the CTA doesn't
   set the wrong expectation. */
.vb-status {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: clamp(14px, 1.5vw, 20px);
  padding: 10px 14px;
  background: rgba(245, 217, 10, .08);
  border: 1px solid rgba(245, 217, 10, .35);
  border-radius: 10px;
  max-width: 64ch;
  line-height: 1.5;
}
.vb-status-pill {
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 2px;
}
.vb-status-text {
  font-size: .9rem;
  color: rgba(255, 255, 255, .9);
}
.vb-status-text strong {
  color: #fff;
  font-weight: 600;
}
@media (max-width: 720px) {
  .vb-inner { grid-template-columns: 1fr; }
}

/* ---------- Benchmark ---------- */
.bench-pill {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: var(--r-chip);
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

.bench-wrap {
  container-type: inline-size;
  container-name: bench;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
table.bench {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  /* Numeric columns stay aligned across rows. */
  font-variant-numeric: tabular-nums;
}
table.bench th,
table.bench td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
table.bench th {
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 500;
  background: var(--page);
  border-bottom: 1px solid var(--line);
}
table.bench td.num { font-family: var(--font-mono); }
table.bench tbody tr:last-child td { border-bottom: 0; }
table.bench tr.row-accent td {
  background: var(--accent-soft);
  font-weight: 700;
  position: relative;
}
table.bench tr.row-accent td:first-child {
  border-left: 3px solid var(--ink);
}

/* Bench container query: at narrow widths, retag table cells as labelled
   rows inside per-model cards. Table semantics preserved for AT. */
@container bench (max-width: 720px) {
  table.bench thead { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
  table.bench, table.bench tbody, table.bench tr, table.bench td {
    display: block;
    width: 100%;
  }
  table.bench tr {
    border-top: 1px solid var(--line);
    padding: 10px 14px 12px;
  }
  table.bench tr:first-child { border-top: 0; }
  table.bench td {
    border-bottom: 0;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
  }
  table.bench td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    font-weight: 500;
    flex-shrink: 0;
  }
  table.bench tr.row-accent {
    background: var(--accent-soft);
    border-top: 2px solid var(--ink);
  }
  table.bench tr.row-accent td { background: transparent; }
  table.bench tr.row-accent td:first-child { border-left: 0; padding-top: 8px; }
  table.bench tr td:first-child { font-size: 1rem; font-weight: 600; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
  table.bench tr td:first-child::before { display: none; }
}

.callouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(14rem, 22vw, 18rem), 1fr));
  gap: 14px;
  margin-top: 22px;
}
.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px;
}
.callout .big {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw + 0.5rem, 1.9rem);
  font-weight: 800;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.callout.is-accent { border-color: rgba(245,217,10,.55); background: linear-gradient(180deg, #fffcde 0%, #fff 100%); }
.callout .lbl { color: var(--muted); font-size: .88rem; }

.chart {
  margin-top: 28px;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.chart h3 { font-size: 1rem; margin-bottom: 4px; }
.chart .chart-sub { color: var(--muted); font-size: .85rem; margin-bottom: 18px; }
.chart svg { width: 100%; height: auto; display: block; }

details.methodology {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
  padding: 14px 18px;
}
details.methodology summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  list-style: none;
}
details.methodology summary::-webkit-details-marker { display: none; }
details.methodology summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform .15s ease;
  color: var(--muted);
}
details.methodology[open] summary::before { transform: rotate(90deg); }
details.methodology .body {
  margin-top: 12px;
  font-size: .92rem;
  color: var(--ink-soft);
}
details.methodology ul { margin: 8px 0 0 18px; padding: 0; }
details.methodology li { margin-bottom: 4px; }

/* ---------- Install tabs ---------- */
.install-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.install-tab {
  background: transparent;
  border: 0;
  padding: 10px 14px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--font-ui);
  position: relative;
}
.install-tab:hover { color: var(--ink); }
.install-tab[aria-selected="true"] { color: var(--ink); }
.install-tab[aria-selected="true"]::after {
  content: '';
  position: absolute;
  left: 10px; right: 10px; bottom: -1px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.install-panel { display: none; }
.install-panel.active { display: block; }
.code-block {
  position: relative;
  background: var(--ink);
  border-radius: 10px;
  padding: 14px 60px 14px 18px;
  color: #f3f3f5;
  overflow-x: auto;
}
.code-block pre { margin: 0; }
.code-block code { color: #f3f3f5; font-size: .85rem; line-height: 1.55; white-space: pre; }
.code-block .tok-kw  { color: #ffb86c; }
.code-block .tok-str { color: #c1ffce; }
.code-block .tok-com { color: #8a8f99; font-style: italic; }
.code-block .tok-fn  { color: #b6dbff; }
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,.08);
  color: #f3f3f5;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: .72rem;
  font-weight: 600;
  font-family: var(--font-ui);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.copy-btn:hover { background: rgba(255,255,255,.16); }
.copy-btn.copied { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.install-panel .stub-note {
  margin-top: 12px;
  font-size: .9rem;
  color: var(--muted);
}

/* ---------- License ---------- */
.license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(16rem, 30vw, 22rem), 1fr));
  gap: 18px;
}
.license-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1rem, 2vw, 1.5rem);
  box-shadow: var(--shadow-card);
}
.license-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.license-card .lic-chip {
  font-family: var(--font-mono);
  font-size: .68rem;
  padding: 3px 8px;
  border-radius: var(--r-chip);
  background: var(--line-soft);
  color: var(--ink-soft);
  font-weight: 600;
}
.license-card p { font-size: .94rem; color: var(--muted); margin-bottom: 12px; }
.license-card .disclaimer {
  font-size: .82rem;
  color: var(--muted);
  margin-top: 10px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-chip);
  font-size: .86rem;
  font-weight: 600;
  z-index: 100;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: var(--shadow-toast);
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  background: var(--card);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  font-size: .88rem;
  color: var(--muted);
}
.footer-built-by { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.footer-company {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-image: none;        /* override global underline-gradient on <a> */
  padding-bottom: 0;
}
.footer-company:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-company img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: block;
}
.footer .links { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- a11y / utility ---------- */
.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;
}
