/* =====================================================================
   AtlasVoice Design System (ds.css) — every atlasvoice.cloud page loads this.
   Layers: 1 primitives → 2 semantic tokens → 3 base → 4 layout → 5 components
   → 6 page sections → 7 aliases for older stylesheets (site.css, blog.css…).
   Rule: components use ONLY semantic tokens, never raw hex or px.
   Reference page: /design/ (noindex).
   ===================================================================== */

/* ---------- 0. Fonts (self-hosted, SIL OFL 1.1: assets/fonts/OFL.txt). The
   browser downloads only the subsets a page actually uses. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/plus-jakarta-sans-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/plus-jakarta-sans-latin-ext-800-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/jetbrains-mono-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- 1. Primitive tokens (the palette; never used directly by components) */
:root {
  /* Brand: Atlas Indigo */
  --indigo-50: #f0f1ff; --indigo-100: #e2e4ff; --indigo-200: #c9ccff; --indigo-300: #a5a8fd;
  --indigo-400: #8481f8; --indigo-500: #6a62f1; --indigo-600: #5646e5; --indigo-700: #4837c9;
  --indigo-800: #3b2fa2; --indigo-900: #332c80; --indigo-950: #1f1a4b;
  /* Signal: Aqua — the "sound" colour (waveforms, live, playing state) */
  --aqua-50: #ecfeff; --aqua-100: #cffafe; --aqua-300: #67e8f9; --aqua-400: #22d3ee;
  --aqua-500: #06b6d4; --aqua-600: #0891b2; --aqua-700: #0e7490;
  /* Neutral: Ink */
  --ink-0: #ffffff; --ink-25: #fbfbfe; --ink-50: #f5f6fb; --ink-100: #eceef6; --ink-200: #dfe2ee;
  --ink-300: #c4c8d9; --ink-400: #9298b3; --ink-500: #6b7193; --ink-600: #4f5574; --ink-700: #393e5a;
  --ink-800: #252941; --ink-850: #1b1f33; --ink-900: #13162a; --ink-950: #0b0d1c;
  /* Status */
  --green-500: #12b76a; --green-600: #039855; --green-50: #ecfdf3;
  --amber-500: #f79009; --amber-600: #dc6803; --amber-50: #fffaeb;
  --red-500: #f04438;   --red-600: #d92d20;   --red-50: #fef3f2;
  --star: #f5a524;

  /* Type */
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Type scale (1.250 major third, rounded) */
  --fs-xs: .75rem;   /* 12 */  --fs-sm: .875rem;  /* 14 */  --fs-md: 1rem;     /* 16 */
  --fs-lg: 1.125rem; /* 18 */  --fs-xl: 1.25rem;  /* 20 */  --fs-2xl: 1.5rem;  /* 24 */
  --fs-3xl: 1.875rem;/* 30 */  --fs-4xl: 2.25rem; /* 36 */  --fs-5xl: 3rem;    /* 48 */
  --fs-6xl: 3.75rem; /* 60 */
  --lh-tight: 1.08; --lh-snug: 1.25; --lh-body: 1.6;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700; --fw-black: 800;
  --tracking-tight: -.025em; --tracking-wide: .06em;

  /* Spacing (4px base) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --sp-10: 40px; --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px; --sp-32: 128px;

  /* Shape, depth, motion */
  --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-2xl: 28px; --r-full: 999px;
  --dur-fast: 120ms; --dur: 200ms; --dur-slow: 400ms; --ease: cubic-bezier(.2, .7, .2, 1);

  /* Layout */
  --container: 1200px; --container-narrow: 780px; --gutter: 16px;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }

/* ---------- 2. Semantic tokens: light (default) */
:root {
  --bg: var(--ink-25); --bg-subtle: var(--ink-50); --surface: var(--ink-0); --surface-2: var(--ink-50);
  --surface-inverse: var(--ink-950);
  --border: var(--ink-200); --border-strong: var(--ink-300);
  --text: var(--ink-900); --text-muted: var(--ink-600); --text-subtle: var(--ink-500); --text-inverse: var(--ink-0);
  --primary: var(--indigo-600); --primary-hover: var(--indigo-700); --primary-soft: var(--indigo-50);
  --primary-soft-2: var(--indigo-100); --on-primary: #fff; --primary-text: var(--indigo-700);
  --signal: var(--aqua-500); --signal-soft: var(--aqua-50);
  --success: var(--green-600); --success-soft: var(--green-50);
  --warning: var(--amber-600); --warning-soft: var(--amber-50);
  --danger: var(--red-600); --danger-soft: var(--red-50);
  --focus: var(--indigo-500);
  --shadow-1: 0 1px 2px rgba(19, 22, 42, .06);
  --shadow-2: 0 2px 6px rgba(19, 22, 42, .06), 0 1px 2px rgba(19, 22, 42, .04);
  --shadow-3: 0 12px 32px -12px rgba(19, 22, 42, .18), 0 2px 6px rgba(19, 22, 42, .05);
  --shadow-4: 0 30px 70px -30px rgba(40, 30, 140, .35), 0 8px 20px -10px rgba(19, 22, 42, .12);
  --hero-glow: radial-gradient(60% 60% at 70% 10%, rgba(106, 98, 241, .16), transparent 70%),
               radial-gradient(40% 50% at 10% 30%, rgba(6, 182, 212, .10), transparent 70%);
  --brand-gradient: linear-gradient(135deg, var(--indigo-600), #7c4dff 55%, var(--aqua-500));
  color-scheme: light;
}
/* Dark: follows the OS unless the page forces light; [data-theme=dark] forces dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink-950); --bg-subtle: var(--ink-900); --surface: var(--ink-900); --surface-2: var(--ink-850);
    --surface-inverse: var(--ink-0);
    --border: #262b45; --border-strong: #353b5c;
    --text: #eef0fa; --text-muted: #a9aecb; --text-subtle: #8a90b0; --text-inverse: var(--ink-950);
    --primary: var(--indigo-400); --primary-hover: var(--indigo-300); --primary-soft: #1d1a45;
    --primary-soft-2: #27235c; --on-primary: var(--ink-950); --primary-text: var(--indigo-300);
    --signal: var(--aqua-400); --signal-soft: #0b2a33;
    --success: #4ade80; --success-soft: #0d2a1b; --warning: #fbbf24; --warning-soft: #2b2110;
    --danger: #f87171; --danger-soft: #2d1414; --focus: var(--indigo-300);
    --shadow-1: none; --shadow-2: 0 1px 0 rgba(255, 255, 255, .03) inset;
    --shadow-3: 0 16px 40px -16px rgba(0, 0, 0, .6); --shadow-4: 0 30px 80px -30px rgba(0, 0, 0, .8);
    --hero-glow: radial-gradient(60% 60% at 70% 10%, rgba(106, 98, 241, .22), transparent 70%),
                 radial-gradient(40% 50% at 10% 30%, rgba(6, 182, 212, .12), transparent 70%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink-950); --bg-subtle: var(--ink-900); --surface: var(--ink-900); --surface-2: var(--ink-850);
  --surface-inverse: var(--ink-0);
  --border: #262b45; --border-strong: #353b5c;
  --text: #eef0fa; --text-muted: #a9aecb; --text-subtle: #8a90b0; --text-inverse: var(--ink-950);
  --primary: var(--indigo-400); --primary-hover: var(--indigo-300); --primary-soft: #1d1a45;
  --primary-soft-2: #27235c; --on-primary: var(--ink-950); --primary-text: var(--indigo-300);
  --signal: var(--aqua-400); --signal-soft: #0b2a33;
  --success: #4ade80; --success-soft: #0d2a1b; --warning: #fbbf24; --warning-soft: #2b2110;
  --danger: #f87171; --danger-soft: #2d1414; --focus: var(--indigo-300);
  --shadow-1: none; --shadow-2: 0 1px 0 rgba(255, 255, 255, .03) inset;
  --shadow-3: 0 16px 40px -16px rgba(0, 0, 0, .6); --shadow-4: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --hero-glow: radial-gradient(60% 60% at 70% 10%, rgba(106, 98, 241, .22), transparent 70%),
               radial-gradient(40% 50% at 10% 30%, rgba(6, 182, 212, .12), transparent 70%);
  color-scheme: dark;
}

/* ---------- 3. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: var(--fw-regular) var(--fs-md)/var(--lh-body) var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary-text); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--r-sm); }
a[href], button, [role="tab"], summary, label[for], select { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
.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; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Text styles */
.display { font-size: clamp(var(--fs-4xl), 6vw, var(--fs-6xl)); line-height: var(--lh-tight); letter-spacing: var(--tracking-tight); font-weight: var(--fw-black); }
.h1 { font-size: clamp(var(--fs-3xl), 4.4vw, var(--fs-5xl)); line-height: var(--lh-tight); letter-spacing: var(--tracking-tight); font-weight: var(--fw-black); }
.h2 { font-size: clamp(var(--fs-2xl), 3.4vw, var(--fs-4xl)); line-height: 1.12; letter-spacing: -.02em; font-weight: var(--fw-bold); }
.h3 { font-size: var(--fs-xl); line-height: var(--lh-snug); font-weight: var(--fw-bold); }
.h4 { font-size: var(--fs-lg); line-height: var(--lh-snug); font-weight: var(--fw-semibold); }
.lead { font-size: clamp(var(--fs-lg), 2vw, var(--fs-xl)); color: var(--text-muted); line-height: 1.55; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.small { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); }
.eyebrow { font: var(--fw-bold) var(--fs-xs)/1 var(--font-body); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--primary-text); }
.gradient-text { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--font-mono); }

/* ---------- 4. Layout */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: var(--container-narrow); }
.section { padding-block: clamp(var(--sp-16), 8vw, var(--sp-24)); }
.section.tight { padding-block: var(--sp-12); }
.section-head { max-width: 680px; margin-bottom: var(--sp-10); display: grid; gap: var(--sp-3); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.stack { display: grid; gap: var(--sp-4); }
.stack-lg { display: grid; gap: var(--sp-8); }
.row { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.band { background: var(--bg-subtle); border-block: 1px solid var(--border); }
/* Grid/flex children may always shrink: no horizontal page scroll on phones. */
.grid > *, .stack > *, .stack-lg > *, [class$="-grid"] > * { min-width: 0; }
body { overflow-x: clip; }

/* ---------- 5. Components */

/* Logo */
.logo { display: inline-flex; align-items: center; gap: var(--sp-2); text-decoration: none; color: var(--text); font: var(--fw-black) var(--fs-lg)/1 var(--font-display); letter-spacing: -.02em; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-gradient); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(86, 70, 229, .6); }
.logo-mark svg { width: 18px; height: 18px; }
.logo small { font: var(--fw-semibold) var(--fs-xs)/1 var(--font-body); color: var(--text-subtle); margin-left: 2px; }

/* Site header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--border); }
.site-header .container { height: 68px; display: flex; align-items: center; gap: var(--sp-6); }
.nav { display: flex; gap: var(--sp-1); align-items: center; flex: 1; }
.nav a { white-space: nowrap; color: var(--text-muted); text-decoration: none; font-size: var(--fs-sm); font-weight: var(--fw-medium); padding: 8px 12px; border-radius: var(--r-md); }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); font-weight: var(--fw-semibold); }
.header-actions { display: flex; gap: var(--sp-2); align-items: center; }
.header-actions .menu-btn { display: none; }
/* The phone menu: a visually hidden but focusable checkbox; its label is the button. */
.nav-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none; }
@media (min-width: 1181px) { .nav-toggle { display: none; } }
.nav-toggle:focus-visible ~ .header-actions .menu-btn { outline: 3px solid var(--focus); outline-offset: 3px; }
.nav-toggle:checked ~ .header-actions .menu-btn { background: var(--surface-2); }
@media (max-width: 1180px) {
  .nav, .header-actions .hide-sm { display: none; }
  .header-actions .menu-btn { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .nav-toggle:checked ~ .nav { display: grid; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: var(--sp-3) var(--gutter) var(--sp-5); box-shadow: var(--shadow-3); }
  .nav-toggle:checked ~ .nav a { padding: 12px; font-size: var(--fs-md); }
}

/* Buttons */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 44px; padding: 0 var(--sp-5); border-radius: var(--r-md); border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg); font: var(--fw-semibold) var(--fs-md)/1 var(--font-body);
  text-decoration: none; white-space: nowrap; transition: background var(--dur) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-bd: var(--primary); box-shadow: 0 8px 20px -10px rgba(86, 70, 229, .7); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border-strong); box-shadow: var(--shadow-1); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }
.btn-inverse { --btn-bg: var(--surface-inverse); --btn-fg: var(--text-inverse); --btn-bd: var(--surface-inverse); }
.btn-inverse:hover { background: var(--surface-inverse); opacity: .9; }
.btn-sm { height: 36px; padding: 0 var(--sp-3); font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn-lg { height: 52px; padding: 0 var(--sp-6); font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-full); font: var(--fw-bold) 11px/1 var(--font-body); letter-spacing: .03em; text-transform: uppercase; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; }
.badge-free { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-pro { background: var(--primary-soft); color: var(--primary-text); border-color: transparent; }
.badge-beta { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-live { background: var(--signal-soft); color: var(--signal); border-color: transparent; }
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* Announcement pill */
.announce { display: inline-flex; align-items: center; gap: var(--sp-2); max-width: 100%; line-height: 1.3; padding: 4px 12px 4px 4px; border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); font-size: var(--fs-sm); font-weight: var(--fw-medium); box-shadow: var(--shadow-1); }
.announce:hover { border-color: var(--primary); }
.announce .badge { height: 22px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-2); }
.card-pad { padding: var(--sp-6); }
.card-pad-lg { padding: var(--sp-8); }
.card-hover { transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.card-hover:hover { border-color: var(--border-strong); box-shadow: var(--shadow-3); transform: translateY(-2px); }
.feature .icon { width: 44px; height: 44px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); margin-bottom: var(--sp-4); }
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: var(--sp-2); }
.feature p { color: var(--text-muted); font-size: var(--fs-sm); }

/* Form controls */
.field { display: grid; gap: var(--sp-2); }
.label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.input, .select, .textarea {
  width: 100%; font: var(--fs-md)/1.5 var(--font-body); color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 10px 14px; transition: border-color var(--dur), box-shadow var(--dur);
}
.textarea { min-height: 140px; resize: vertical; line-height: var(--lh-body); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.hint { font-size: var(--fs-xs); color: var(--text-subtle); }
.counter { font: var(--fw-medium) var(--fs-xs) var(--font-mono); color: var(--text-subtle); }
.counter.over { color: var(--danger); }

/* Segmented tabs */
.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.tabs button { appearance: none; border: 0; background: transparent; color: var(--text-muted); font: var(--fw-semibold) var(--fs-sm)/1 var(--font-body); padding: 8px 12px; border-radius: 7px; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); }

/* Language chip */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: var(--fw-medium) var(--fs-sm)/1 var(--font-body); text-decoration: none; transition: border-color var(--dur), background var(--dur); }
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed="true"], .chip.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip .chip-meta { font: var(--fw-semibold) 10px/1 var(--font-mono); color: var(--text-subtle); }
.chip[aria-pressed="true"] .chip-meta, .chip.active .chip-meta { color: inherit; opacity: .8; }

/* ---- Audio player: the brand's signature component ---- */
.player { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); }
.player .play {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 18px -8px rgba(86, 70, 229, .8); transition: transform var(--dur-fast);
}
.player .play:hover { transform: scale(1.05); }
.player .play svg { width: 20px; height: 20px; }
.player .play .i-pause { display: none; }
.player.playing .play .i-play { display: none; }
.player.playing .play .i-pause { display: block; }
.player .meta { flex: 1; min-width: 0; display: grid; gap: 6px; }
.player .title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .title small { color: var(--text-subtle); font-weight: var(--fw-regular); }
.wave { --p: 0; position: relative; display: flex; align-items: center; gap: 2px; height: 28px; }
.wave i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--border-strong); height: var(--h, 40%); transition: background var(--dur); }
.wave i.on { background: var(--primary); }
.player.playing .wave i.on:last-of-type { background: var(--signal); }
.player .time { flex: none; font: var(--fw-medium) var(--fs-xs) var(--font-mono); color: var(--text-subtle); min-width: 36px; text-align: right; }
.player.lg { padding: var(--sp-4); }
.player.lg .play { width: 56px; height: 56px; }

/* Voice card */
.voice { display: grid; grid-template-columns: auto 1fr auto; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); transition: border-color var(--dur), box-shadow var(--dur); }
.voice:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.voice.selected { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.voice.playing { border-color: var(--signal); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: var(--fw-bold) var(--fs-sm)/1 var(--font-display); color: #fff; background: var(--av, var(--brand-gradient)); }
.voice .name { font-weight: var(--fw-semibold); font-size: var(--fs-md); line-height: 1.2; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.voice .desc { font-size: var(--fs-xs); color: var(--text-subtle); margin-top: 2px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary-text); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .i-pause { display: none; }
.voice.playing .icon-btn { background: var(--signal); border-color: var(--signal); color: #fff; }
.voice.playing .icon-btn .i-play { display: none; }
.voice.playing .icon-btn .i-pause { display: block; }

/* Stats / proof */
.proof { display: flex; flex-wrap: wrap; gap: var(--sp-6); align-items: center; color: var(--text-muted); font-size: var(--fs-sm); }
.proof strong { color: var(--text); }
.stars { color: var(--star); letter-spacing: 1px; }
.stat .num { font: var(--fw-black) var(--fs-4xl)/1 var(--font-display); letter-spacing: -.03em; }
.stat .lbl { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--sp-2); }

/* Placeholder for content the owner must supply (never ship fake proof) */
.placeholder { border: 1.5px dashed var(--warning); background: var(--warning-soft); color: var(--warning); border-radius: var(--r-lg); padding: var(--sp-4); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.ph-inline { border-bottom: 1.5px dashed var(--warning); color: var(--warning); }

/* Testimonial */
.quote { display: grid; gap: var(--sp-4); }
.quote blockquote { margin: 0; font: var(--fw-medium) var(--fs-lg)/1.5 var(--font-body); color: var(--text); }
.quote figcaption { display: flex; gap: var(--sp-3); align-items: center; font-size: var(--fs-sm); color: var(--text-muted); }

/* Pricing card */
.price-card { display: flex; flex-direction: column; gap: var(--sp-5); }
.price-card.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow-4); position: relative; }
.price-card .amount { font: var(--fw-black) var(--fs-5xl)/1 var(--font-display); letter-spacing: -.03em; }
.price-card .per { color: var(--text-muted); font-size: var(--fs-sm); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); font-size: var(--fs-sm); }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--success-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23039855' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat; }

/* FAQ */
.faq { display: grid; gap: var(--sp-3); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 0 var(--sp-5); }
.faq summary { list-style: none; padding: var(--sp-4) 0; font-weight: var(--fw-semibold); display: flex; justify-content: space-between; gap: var(--sp-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: var(--fw-regular) var(--fs-2xl)/1 var(--font-body); color: var(--text-subtle); transition: transform var(--dur); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--sp-5); color: var(--text-muted); }

/* Code block */
.code { background: #0b0d1c; color: #e6e8f7; border-radius: var(--r-lg); border: 1px solid #262b45; overflow: hidden; font: 13px/1.7 var(--font-mono); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #13162a; color: #9298b3; font-size: 12px; }
.code pre { margin: 0; padding: var(--sp-4) var(--sp-5); overflow-x: auto; }
.code .k { color: #b8b4ff; } .code .s { color: #8ef0c0; } .code .c { color: #6b7193; }

/* Steps */
.steps { counter-reset: s; display: grid; gap: var(--sp-6); }
.step { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: var(--sp-4); }
.step::before { content: counter(s); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); font: var(--fw-bold) var(--fs-md)/1 var(--font-display); }
.step h3 { font-size: var(--fs-lg); margin-bottom: 4px; }
.step p { color: var(--text-muted); font-size: var(--fs-sm); }

/* Breadcrumb */
.crumbs { display: flex; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-subtle); flex-wrap: wrap; }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

/* Alert */
.alert { display: grid; grid-template-columns: 20px 1fr; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--primary-soft); color: var(--text); font-size: var(--fs-sm); }
.alert svg { width: 20px; height: 20px; color: var(--primary-text); }
.alert.warn { background: var(--warning-soft); } .alert.warn svg { color: var(--warning); }

/* CTA panel */
.cta-panel { position: relative; overflow: hidden; border-radius: var(--r-2xl); padding: clamp(var(--sp-10), 6vw, var(--sp-16)); background: var(--ink-950); color: #fff; }
.cta-panel::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 80% at 85% 0%, rgba(124, 77, 255, .5), transparent 70%), radial-gradient(40% 60% at 0% 100%, rgba(6, 182, 212, .35), transparent 70%); }
.cta-panel > * { position: relative; }
.cta-panel h2 { color: #fff; }
.cta-panel p { color: #c4c8d9; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: var(--sp-16) 0 var(--sp-10); background: var(--bg-subtle); font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--sp-8); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.site-footer .footer-title { font: var(--fw-semibold) var(--fs-sm)/1 var(--font-body); margin: 0 0 var(--sp-4); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-bottom { margin-top: var(--sp-12); padding-top: var(--sp-6); border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; color: var(--text-subtle); }


/* Header extras: the site search button (styled by search.css) sits in the actions. */
.header-actions .search-open { margin: 0; }
.site-header .logo { margin-right: var(--sp-2); }
.nav .is-new { font-size: 10px; font-weight: 700; color: var(--signal); margin-left: 4px; vertical-align: 1px; }
.site-footer .footer-brand p { margin-top: var(--sp-3); }
.ext::after { content: "↗"; font-size: .8em; margin-left: 3px; color: var(--text-subtle); }

/* ---------- 6. Page sections (home, demo, language pages) */
.hero { position: relative; isolation: isolate; padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px); }
.hero::before { content: ""; position: absolute; inset: -80px 0 0; background: var(--hero-glow); pointer-events: none; z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { margin: 20px 0; }
.hear { padding: var(--sp-6); display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; box-shadow: var(--shadow-4); border-radius: var(--r-2xl); }
.hear-top { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); }
.say { font: var(--fw-medium) var(--fs-xl)/1.45 var(--font-body); color: var(--text); min-height: 2.9em; }
.say::before { content: "“"; color: var(--primary-text); } .say::after { content: "”"; color: var(--primary-text); }
.say:empty::before, .say:empty::after { content: none; }
.voice-pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.logos { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-6); align-items: center; }
@media (max-width: 760px) { .logos { grid-template-columns: minmax(0, 1fr); } }
.ba { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .ba { grid-template-columns: minmax(0, 1fr); } }
.ba .card { display: grid; gap: 14px; align-content: start; }
.robot { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3); border-radius: var(--r-lg); border: 1px dashed var(--border-strong); background: var(--surface-2); }
.robot.playing .icon-btn { background: var(--warning); border-color: var(--warning); color: #fff; }
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.bento .wide { grid-column: span 2; }
@media (max-width: 960px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .bento { grid-template-columns: minmax(0, 1fr); } .bento .wide { grid-column: auto; } }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--sp-3); }
.lang-cloud .chip { height: 38px; }
.two-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); }
@media (max-width: 900px) { .two-ways { grid-template-columns: minmax(0, 1fr); } }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 960px) { .price-grid { grid-template-columns: minmax(0, 1fr); max-width: 480px; margin-inline: auto; } }
.price-card .ribbon { position: absolute; top: -12px; left: 24px; }
.link-card { text-decoration: none; color: inherit; }
.link-strong { font-weight: var(--fw-semibold); text-decoration: none; }
.link-strong:hover { text-decoration: underline; }

/* ---------- 7. Aliases: older stylesheets (site.css, blog.css, search.css,
   consent.css, placements.css) use these names; they now follow the system. */
:root {
  --card: var(--surface); --ink: var(--text); --muted: var(--text-muted); --line: var(--border);
  --accent: var(--primary); --accent-ink: var(--on-primary); --accent-soft: var(--primary-soft);
  --ok: var(--success); --radius: var(--r-xl);
}

/* Language pages */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); }
.lang-card { display: grid; gap: 6px; text-decoration: none; color: inherit; }
.lang-native { font: var(--fw-bold) var(--fs-xl)/1.2 var(--font-display); color: var(--text); }
.lang-name { font-weight: var(--fw-semibold); color: var(--primary-text); }
.table-scroll { overflow-x: auto; border-radius: var(--r-lg); }
table.cmp { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
table.cmp th, table.cmp td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table.cmp th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--text-subtle); background: var(--surface-2); }
table.cmp td:nth-child(2) { color: var(--success); font-weight: var(--fw-semibold); }
table.cmp tr:last-child td { border-bottom: 0; }
/* Buttons on the dark CTA panel */
.btn-on-dark { --btn-bg: #fff; --btn-fg: var(--ink-950); --btn-bd: #fff; }
.btn-on-dark:hover { background: var(--ink-100); }
.btn-outline-on-dark { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .3); }
.btn-outline-on-dark:hover { background: rgba(255, 255, 255, .08); }
.voice .avatar { --av: var(--brand-gradient); }

/* Voice cards you can choose (radio inside a label) */
label.voice { cursor: pointer; }
.voice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Demo page */
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; padding-bottom: 96px; }
@media (max-width: 1020px) { .demo-grid { grid-template-columns: minmax(0, 1fr); } }
.stepcard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.stephead { display: flex; gap: 14px; align-items: center; }
.stephead .num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font: var(--fw-bold) var(--fs-sm)/1 var(--font-display); flex: none; }
.lang-list { max-height: 196px; overflow: auto; padding: 2px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; max-height: 440px; overflow: auto; padding: 4px; }
.result { position: sticky; top: 88px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.chosen { display: flex; gap: 12px; align-items: center; min-height: 40px; }
.gen .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: none; }
.gen.loading .spinner { display: block; }
.gen.loading .ic { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { border: 1px dashed var(--border-strong); border-radius: var(--r-lg); padding: 28px 16px; text-align: center; color: var(--text-subtle); font-size: var(--fs-sm); }
.divider { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.status.err { color: var(--danger); }

/* Header "Sign in" (class="signin": marketing header buttons are placed before it) */
.header-actions .signin { white-space: nowrap; display: inline-flex; align-items: center; height: 36px; padding: 0 var(--sp-3); border-radius: var(--r-sm); color: var(--text-muted); font: var(--fw-semibold) var(--fs-sm)/1 var(--font-body); text-decoration: none; }
.header-actions .signin:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 960px) { .header-actions .signin, .header-actions .av-header-btn { display: none; } }
.footer-links { display: grid; gap: var(--sp-2); }
