/* ═════════════════════════════════════════════════════════════════
   SoloDial Design System
   Dark-first. Fraunces display serif + DM Sans body + JetBrains Mono.
   Components: sd-btn, sd-input, sd-card, sd-badge, sd-stat, sd-tabs,
   sd-section, sd-empty, sd-form-group, sd-breadcrumb, sd-hero, sd-chip.
   ═════════════════════════════════════════════════════════════════ */

:root {
  /* — Surface tokens (dark-first) — */
  --bg-body: #09090c;
  --bg-sidebar: #0b0b10;
  --bg-sidebar-hover: rgba(82,82,91,0.18);
  --bg-active: rgba(129,140,248,0.12);
  --bg-active-border: rgba(129,140,248,0.55);
  --bg-card: #101017;
  --bg-card-hover: #14141c;
  --bg-card-raised: #17171f;
  --bg-input: #12121a;
  --bg-input-hover: #161622;
  --bg-topbar: rgba(9,9,12,0.85);
  --bg-overlay: rgba(3,3,6,0.72);

  /* — Text tokens — */
  --text-primary: #f5f5f7;
  --text-secondary: #c4c4cc;
  --text-tertiary: #8a8a95;
  --text-muted: #5b5b67;
  --text-faint: #3d3d47;
  --text-accent: #a5b4fc;
  --text-accent-bright: #c7d2fe;
  --text-on-accent: #ffffff;
  --text-link: #a5b4fc;
  --text-link-hover: #c7d2fe;

  /* — Border tokens — */
  --border-default: rgba(80,80,95,0.22);
  --border-subtle: rgba(80,80,95,0.12);
  --border-strong: rgba(120,120,140,0.40);
  --border-focus: rgba(129,140,248,0.65);

  /* — Accent palette —
     Primary: deep indigo/violet
     Signal: electric lime (success / live state)
     Warm: honey amber (warning / info)
     Alert: coral rose (error)                     */
  --accent: #6366f1;
  --accent-bright: #818cf8;
  --accent-deep: #4338ca;
  --signal: #a3e635;
  --signal-deep: #65a30d;
  --warm: #fbbf24;
  --warm-deep: #d97706;
  --alert: #fb7185;
  --alert-deep: #e11d48;

  /* — Status surface pairs (bg / text / border) — */
  --status-success-bg: rgba(163,230,53,0.10);
  --status-success-fg: #bef264;
  --status-success-bd: rgba(163,230,53,0.28);
  --status-warn-bg: rgba(251,191,36,0.10);
  --status-warn-fg: #fcd34d;
  --status-warn-bd: rgba(251,191,36,0.28);
  --status-error-bg: rgba(251,113,133,0.12);
  --status-error-fg: #fda4af;
  --status-error-bd: rgba(251,113,133,0.30);
  --status-info-bg: rgba(129,140,248,0.12);
  --status-info-fg: #a5b4fc;
  --status-info-bd: rgba(129,140,248,0.30);
  --status-neutral-bg: rgba(113,113,122,0.14);
  --status-neutral-fg: #d4d4d8;
  --status-neutral-bd: rgba(113,113,122,0.30);

  /* — Shadows — */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.35);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.40);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.55);
  --shadow-glow: 0 0 48px rgba(99,102,241,0.28);
  --shadow-focus: 0 0 0 3px rgba(129,140,248,0.25);

  /* — Radii — */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 9999px;

  /* — Typographic scale —
     Using a 1.22 ratio from 14 → display sizes.        */
  --fs-micro: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-lg: 17px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  --fs-3xl: 34px;
  --fs-4xl: 46px;
  --fs-5xl: 62px;
  --fs-6xl: 82px;

  /* — Spacing scale — */
  --sp-0: 0;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 44px;
  --sp-9: 60px;
  --sp-10: 88px;

  /* — Legacy tokens (back-compat for existing markup) — */
  --flash-success-bg: var(--status-success-bg);
  --flash-success-border: var(--status-success-bd);
  --flash-success-text: var(--status-success-fg);
  --flash-error-bg: var(--status-error-bg);
  --flash-error-border: var(--status-error-bd);
  --flash-error-text: var(--status-error-fg);
  --shadow-sidebar: 1px 0 0 var(--border-default);
  --logo-accent: var(--accent-bright);
  --logo-text: #ffffff;
  --logo-filter: none;
  --user-avatar-bg: rgba(99,102,241,0.20);
  --user-avatar-text: var(--accent-bright);

  /* — Font families — */
  --ff-display: "Fraunces", "Iowan Old Style", "Palatino", Georgia, serif;
  --ff-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --ff-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* — Marketing-surface tokens (dark default) — */
  --mkt-body-bg: #09090c;
  --mkt-body-gradient:
    radial-gradient(1000px 500px at 50% -10%, rgba(99,102,241,0.14), transparent 60%),
    radial-gradient(700px 400px at 85% 40%, rgba(163,230,53,0.06), transparent 70%),
    radial-gradient(600px 300px at 10% 60%, rgba(251,113,133,0.05), transparent 70%);
  --mkt-nav-bg: rgba(9,9,12,0.55);
  --mkt-grain-opacity: 0.06;
  --mkt-glass: rgba(17,17,24,0.55);
  --mkt-glass-strong: rgba(17,17,24,0.65);
  --mkt-glass-deep: rgba(17,17,24,0.85);
  --mkt-eyebrow-bg: rgba(17,17,24,0.55);
  --mkt-row-art-bg: linear-gradient(140deg, rgba(99,102,241,0.16), rgba(17,17,24,0.7));
  --mkt-row-art-glow: radial-gradient(circle at 20% 20%, rgba(129,140,248,0.28), transparent 40%);
  --mkt-phone-frame-bg: linear-gradient(180deg, rgba(17,17,24,0.95), rgba(9,9,12,0.95));
  --mkt-phone-frame-border: rgba(129,140,248,0.35);
  --mkt-waveform-color: var(--signal);
}

/* ═════════ LIGHT MODE (clean CSS-var inversion) ═════════ */
html.light {
  --bg-body: #f7f7f9;
  --bg-sidebar: #ffffff;
  --bg-sidebar-hover: rgba(17,17,24,0.04);
  --bg-active: rgba(99,102,241,0.08);
  --bg-active-border: rgba(99,102,241,0.55);
  --bg-card: #ffffff;
  --bg-card-hover: #fafafb;
  --bg-card-raised: #ffffff;
  --bg-input: #ffffff;
  --bg-input-hover: #fafafb;
  --bg-topbar: rgba(255,255,255,0.88);
  --bg-overlay: rgba(17,17,24,0.45);

  --text-primary: #0f0f14;
  --text-secondary: #2a2a33;     /* was #35353f — darker for better card contrast */
  --text-tertiary: #4b4b55;      /* was #5b5b67 — darker on white */
  --text-muted: #6a6a74;         /* was #8a8a95 — now ~6.4:1 on white */
  --text-faint: #9a9aa3;         /* was #b8b8c0 */
  --text-accent: #4338ca;
  --text-accent-bright: #3730a3;
  --text-link: #4f46e5;
  --text-link-hover: #3730a3;

  --border-default: rgba(17,17,24,0.10);
  --border-subtle: rgba(17,17,24,0.05);
  --border-strong: rgba(17,17,24,0.18);

  /* Semantic accents — the dark-mode lime / coral / amber are too pale on
     white. Override to WCAG-friendly versions so every pulse dot, chip,
     waveform, icon, and badge that uses these tokens stays readable. */
  --signal: #15803d;        /* was #a3e635 (lime) */
  --signal-deep: #14532d;
  --alert: #dc2626;         /* was #fb7185 (coral) */
  --alert-deep: #991b1b;
  --warm: #b45309;          /* was #fbbf24 (amber) */
  --warm-deep: #78350f;
  --accent-bright: #4f46e5; /* was #818cf8 — brighter-on-dark variant */

  --status-success-fg: #166534;
  --status-success-bg: rgba(22,163,74,0.10);
  --status-success-bd: rgba(22,163,74,0.35);
  --status-warn-fg: #92400e;
  --status-warn-bg: rgba(217,119,6,0.10);
  --status-warn-bd: rgba(217,119,6,0.35);
  --status-error-fg: #991b1b;
  --status-error-bg: rgba(220,38,38,0.10);
  --status-error-bd: rgba(220,38,38,0.35);
  --status-info-fg: #3730a3;
  --status-info-bg: rgba(99,102,241,0.10);
  --status-info-bd: rgba(99,102,241,0.35);
  --status-neutral-fg: #3f3f46;
  --status-neutral-bg: rgba(113,113,122,0.10);
  --status-neutral-bd: rgba(113,113,122,0.30);

  --shadow-xs: 0 1px 2px rgba(17,17,24,0.05);
  --shadow-sm: 0 2px 6px rgba(17,17,24,0.06);
  --shadow-md: 0 10px 30px rgba(17,17,24,0.08);
  --shadow-lg: 0 24px 60px rgba(17,17,24,0.12);
  --shadow-glow: 0 0 48px rgba(99,102,241,0.20);

  --logo-filter: invert(1);

  /* — Marketing-surface tokens (light mode) — */
  --mkt-body-bg: #fafbfc;
  --mkt-body-gradient:
    radial-gradient(1100px 520px at 50% -10%, rgba(99,102,241,0.10), transparent 55%),
    radial-gradient(720px 420px at 85% 35%, rgba(34,197,94,0.07), transparent 70%),
    radial-gradient(640px 320px at 10% 55%, rgba(251,113,133,0.06), transparent 70%);
  --mkt-nav-bg: rgba(255,255,255,0.78);
  --mkt-grain-opacity: 0.04;
  --mkt-glass: rgba(255,255,255,0.75);
  --mkt-glass-strong: #ffffff;
  --mkt-glass-deep: #ffffff;
  --mkt-eyebrow-bg: rgba(255,255,255,0.85);
  --mkt-row-art-bg: linear-gradient(140deg, rgba(99,102,241,0.10), rgba(255,255,255,0.92));
  --mkt-row-art-glow: radial-gradient(circle at 20% 20%, rgba(99,102,241,0.18), transparent 45%);
  --mkt-phone-frame-bg: linear-gradient(180deg, #ffffff, #f5f5f7);
  --mkt-phone-frame-border: rgba(99,102,241,0.25);
  --mkt-waveform-color: #16a34a;
}

/* ═════════════════════ BASE ═════════════════════ */

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

html, body { background: var(--bg-body); color: var(--text-primary); }

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

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

/* Selection */
::selection { background: rgba(129,140,248,0.35); color: var(--text-primary); }

/* Focus ring — subtle and consistent */
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-color: var(--border-focus);
}

/* ═════════════════════ TYPOGRAPHY ═════════════════════ */

.sd-display {
  font-family: var(--ff-display);
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.025em;
  line-height: 1.02;
  font-variation-settings: "SOFT" 25, "WONK" 0, "opsz" 144;
  color: var(--text-primary);
}
.sd-display em {
  font-style: italic;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 144;
  color: var(--text-accent-bright);
}

.sd-h1 { font-size: var(--fs-4xl); line-height: 1.08; letter-spacing: -0.02em; font-weight: 600; color: var(--text-primary); }
.sd-h2 { font-size: var(--fs-3xl); line-height: 1.12; letter-spacing: -0.018em; font-weight: 600; color: var(--text-primary); }
.sd-h3 { font-size: var(--fs-2xl); line-height: 1.2; letter-spacing: -0.012em; font-weight: 600; color: var(--text-primary); }
.sd-h4 { font-size: var(--fs-xl); line-height: 1.3; font-weight: 600; color: var(--text-primary); }
.sd-lede { font-size: var(--fs-lg); color: var(--text-secondary); line-height: 1.55; }
.sd-body { font-size: var(--fs-base); color: var(--text-secondary); line-height: 1.6; }
.sd-body-tight { font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.55; }
.sd-caption { font-size: var(--fs-xs); color: var(--text-tertiary); line-height: 1.5; }
.sd-micro { font-size: var(--fs-micro); color: var(--text-muted); line-height: 1.4; }
.sd-eyebrow {
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-tertiary);
}

.sd-mono { font-family: var(--ff-mono); }

.sd-text-muted    { color: var(--text-muted); }
.sd-text-tertiary { color: var(--text-tertiary); }
.sd-text-secondary{ color: var(--text-secondary); }
.sd-text-primary  { color: var(--text-primary); }
.sd-text-accent   { color: var(--text-accent); }
.sd-text-signal   { color: var(--signal); }
.sd-text-warm     { color: var(--warm); }
.sd-text-alert    { color: var(--alert); }

/* ═════════════════════ LAYOUT & SURFACES ═════════════════════ */

.sd-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-bottom: var(--sp-7);
}
.sd-page-header__title { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.012em; color: var(--text-primary); margin: 0; }
.sd-page-header__subtitle { margin: 6px 0 0; color: var(--text-tertiary); font-size: var(--fs-sm); }
.sd-page-header__actions { display: flex; gap: var(--sp-3); align-items: center; flex-shrink: 0; }

.sd-section-title {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 var(--sp-3);
}

/* — Cards — */
.sd-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  position: relative;
}
.sd-card--flush { padding: 0; overflow: hidden; }
.sd-card--tight { padding: var(--sp-5); }
.sd-card--raised { background: var(--bg-card-raised); box-shadow: var(--shadow-sm); }
.sd-card--interactive { transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease; }
.sd-card--interactive:hover { border-color: var(--border-strong); background: var(--bg-card-hover); }
a.sd-card, button.sd-card { display: block; text-align: left; cursor: pointer; color: inherit; }

.sd-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border-default);
}
.sd-card__title { font-size: var(--fs-lg); font-weight: 600; color: var(--text-primary); margin: 0; }
.sd-card__body { padding: var(--sp-6); }

.sd-divider { height: 1px; background: var(--border-default); border: 0; margin: var(--sp-6) 0; }

/* — Stat cards — */
.sd-stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
  overflow: hidden;
}
.sd-stat:hover { border-color: var(--border-strong); background: var(--bg-card-hover); }
.sd-stat__label { font-size: var(--fs-xs); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.sd-stat__value { font-family: var(--ff-display); font-weight: 500; font-size: var(--fs-3xl); letter-spacing: -0.02em; color: var(--text-primary); line-height: 1; font-variation-settings: "opsz" 144; }
.sd-stat__delta { font-size: var(--fs-xs); color: var(--text-tertiary); }
.sd-stat__delta--up { color: var(--signal); }
.sd-stat__delta--down { color: var(--alert); }
.sd-stat--accent::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129,140,248,0.25), transparent 70%);
  pointer-events: none;
}

/* — Empty states — */
.sd-empty {
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--sp-9) var(--sp-6);
  text-align: center;
  background: var(--bg-card);
}
.sd-empty__icon {
  width: 56px; height: 56px;
  margin: 0 auto var(--sp-4);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-active);
  color: var(--text-accent);
}
.sd-empty__title { font-family: var(--ff-display); font-size: var(--fs-xl); color: var(--text-primary); margin: 0 0 var(--sp-2); font-weight: 500; }
.sd-empty__body { color: var(--text-tertiary); font-size: var(--fs-sm); max-width: 32em; margin: 0 auto var(--sp-5); }

/* — Breadcrumbs — */
.sd-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}
.sd-breadcrumb a {
  color: var(--text-tertiary);
  text-decoration: none;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  transition: background 0.12s ease, color 0.12s ease;
}
.sd-breadcrumb a:hover { color: var(--text-primary); background: var(--bg-sidebar-hover); }
.sd-breadcrumb__sep { color: var(--text-faint); user-select: none; }
.sd-breadcrumb__current { color: var(--text-secondary); padding: 2px 8px; }

/* — Section headers (inline) — */
.sd-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.sd-section__title { font-size: var(--fs-lg); font-weight: 600; color: var(--text-primary); margin: 0; }

/* ═════════════════════ BUTTONS ═════════════════════ */

.sd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: 550;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.08s ease, box-shadow 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-default);
}
.sd-btn:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }
.sd-btn:active { transform: translateY(0.5px); }
.sd-btn:disabled, .sd-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.sd-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.sd-btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 10px 30px -12px rgba(99,102,241,0.55);
}
.sd-btn--primary:hover { background: var(--accent-bright); }

.sd-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
.sd-btn--ghost:hover { background: var(--bg-sidebar-hover); color: var(--text-primary); border-color: transparent; }

.sd-btn--outline {
  background: transparent;
  border-color: var(--border-default);
  color: var(--text-primary);
}
.sd-btn--outline:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }

.sd-btn--signal {
  background: var(--signal);
  color: #1a2d03;
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 10px 30px -14px rgba(163,230,53,0.55);
}
.sd-btn--signal:hover { background: #b4ef47; }

.sd-btn--danger {
  background: rgba(251,113,133,0.12);
  color: var(--alert);
  border-color: rgba(251,113,133,0.35);
}
.sd-btn--danger:hover { background: rgba(251,113,133,0.18); border-color: rgba(251,113,133,0.55); }

.sd-btn--lg { padding: 14px 26px; font-size: var(--fs-base); border-radius: var(--radius-md); }
.sd-btn--xl { padding: 18px 34px; font-size: var(--fs-lg); border-radius: var(--radius-lg); }
.sd-btn--sm { padding: 7px 12px; font-size: var(--fs-xs); border-radius: var(--radius-sm); }
.sd-btn--block { width: 100%; }
.sd-btn--icon { padding: 10px; aspect-ratio: 1; }

/* — Icon button (square) — */
.sd-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.sd-icon-btn:hover { color: var(--text-primary); border-color: var(--border-strong); background: var(--bg-card-hover); }
.sd-icon-btn svg { width: 16px; height: 16px; }

/* ═════════════════════ FORMS ═════════════════════ */

.sd-form-group { display: flex; flex-direction: column; gap: 6px; }
.sd-form-group + .sd-form-group { margin-top: var(--sp-5); }
.sd-label {
  font-size: var(--fs-xs);
  font-weight: 550;
  color: var(--text-secondary);
  letter-spacing: 0.005em;
}
.sd-label .sd-required { color: var(--alert); }
.sd-help { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.sd-error { font-size: var(--fs-xs); color: var(--alert); margin-top: 2px; }

.sd-input,
.sd-select,
.sd-textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  line-height: 1.4;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.sd-input::placeholder,
.sd-textarea::placeholder { color: var(--text-muted); }
.sd-input:hover,
.sd-select:hover,
.sd-textarea:hover { background: var(--bg-input-hover); border-color: var(--border-strong); }
.sd-input:focus,
.sd-select:focus,
.sd-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
  background: var(--bg-input-hover);
}
.sd-textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.sd-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%238a8a95' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.sd-input--lg { padding: 14px 18px; font-size: var(--fs-base); }
.sd-input--mono { font-family: var(--ff-mono); font-size: var(--fs-xs); }

.sd-checkbox {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sd-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.sd-checkbox:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.25' d='m3.5 8.5 3 3 6-6'/%3E%3C/svg%3E") center no-repeat;
}

.sd-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.sd-toggle-row:hover { border-color: var(--border-strong); background: var(--bg-input-hover); }
.sd-toggle-row__title { font-size: var(--fs-sm); font-weight: 550; color: var(--text-primary); display: block; }
.sd-toggle-row__desc  { font-size: var(--fs-xs); color: var(--text-tertiary); display: block; margin-top: 2px; }

.sd-input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  overflow: hidden;
  transition: border-color 0.15s;
}
.sd-input-group:focus-within { border-color: var(--border-focus); box-shadow: var(--shadow-focus); }
.sd-input-group__prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
  border-right: 1px solid var(--border-subtle);
}
.sd-input-group input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: var(--fs-sm);
  outline: none;
}

/* ═════════════════════ BADGES & CHIPS ═════════════════════ */

.sd-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: var(--fs-micro);
  font-weight: 550;
  border-radius: var(--radius-pill);
  border: 1px solid var(--status-neutral-bd);
  background: var(--status-neutral-bg);
  color: var(--status-neutral-fg);
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.sd-badge--success { background: var(--status-success-bg); color: var(--status-success-fg); border-color: var(--status-success-bd); }
.sd-badge--warn    { background: var(--status-warn-bg);    color: var(--status-warn-fg);    border-color: var(--status-warn-bd); }
.sd-badge--error   { background: var(--status-error-bg);   color: var(--status-error-fg);   border-color: var(--status-error-bd); }
.sd-badge--info    { background: var(--status-info-bg);    color: var(--status-info-fg);    border-color: var(--status-info-bd); }
.sd-badge__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06);
}
.sd-badge--pulse .sd-badge__dot {
  animation: sd-pulse 2s ease-in-out infinite;
}
@keyframes sd-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

.sd-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}
.sd-chip--active { border-color: var(--accent-bright); background: var(--bg-active); color: var(--text-accent-bright); }

.sd-kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-bottom-width: 2px;
  border-radius: 4px;
}

/* ═════════════════════ TABLES ═════════════════════ */

.sd-table-wrap {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}
.sd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.sd-table thead th {
  text-align: left;
  padding: 12px 18px;
  font-size: var(--fs-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-default);
  background: rgba(255,255,255,0.01);
}
.sd-table tbody td {
  padding: 13px 18px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.sd-table tbody tr:last-child td { border-bottom: 0; }
.sd-table tbody tr { transition: background 0.12s; }
.sd-table tbody tr:hover { background: var(--bg-card-hover); cursor: pointer; }

/* ═════════════════════ TABS ═════════════════════ */

.sd-tabs {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  gap: 2px;
}
.sd-tabs__item {
  padding: 8px 16px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-tertiary);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.sd-tabs__item:hover { color: var(--text-primary); }
.sd-tabs__item[aria-selected="true"],
.sd-tabs__item.active {
  background: var(--bg-card-raised);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* ═════════════════════ SIDEBAR ═════════════════════ */

.sd-sidebar { background: var(--bg-sidebar); box-shadow: var(--shadow-sidebar); }
.sd-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  transition: all 0.12s ease;
  border-left: 2px solid transparent;
  position: relative;
  text-decoration: none;
}
.sd-nav-link:hover { background: var(--bg-sidebar-hover); color: var(--text-primary); }
.sd-nav-link.active {
  background: var(--bg-active);
  color: var(--text-accent-bright);
  border-left-color: var(--bg-active-border);
  font-weight: 600;
}
.sd-nav-link.active svg { color: var(--text-accent-bright); }

.sd-section-label {
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.sd-user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--user-avatar-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--user-avatar-text);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sd-theme-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: transparent;
}
.sd-theme-btn:hover { background: var(--bg-sidebar-hover); color: var(--text-primary); }

/* ═════════════════════ FLASH / ALERTS ═════════════════════ */

.sd-flash-success,
.sd-flash-error {
  padding: 12px 24px;
  font-size: var(--fs-sm);
  border-bottom: 1px solid;
}
.sd-flash-success { background: var(--status-success-bg); border-color: var(--status-success-bd); color: var(--status-success-fg); }
.sd-flash-error   { background: var(--status-error-bg);   border-color: var(--status-error-bd);   color: var(--status-error-fg); }

.sd-impersonation-bar {
  background: var(--warm-deep);
  color: white;
  text-align: center;
  padding: 8px;
  font-size: var(--fs-sm);
  font-weight: 500;
}

/* ═════════════════════ MOBILE OVERLAY ═════════════════════ */

.sd-overlay { background: var(--bg-overlay); backdrop-filter: blur(4px); }
.sd-sidebar nav::-webkit-scrollbar { display: none; }
.sd-sidebar nav { -ms-overflow-style: none; scrollbar-width: none; }

/* ═════════════════════ VOICE CONFIG (existing) ═════════════════════ */

.sd-voice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-default);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  min-width: 0;
}
.sd-voice-card:hover { border-color: rgba(129,140,248,0.35); }
.sd-voice-selected {
  border-color: var(--accent-bright) !important;
  background: var(--bg-active) !important;
  box-shadow: 0 0 0 1px var(--accent-bright);
}
.sd-voice-unselected { opacity: 0.7; }
.sd-voice-unselected:hover { opacity: 1; }
.sd-voice-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

/* Sliders */
.sd-slider-container { position: relative; padding: 24px 0 40px; user-select: none; touch-action: none; }
.sd-slider-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--border-default);
  cursor: pointer;
}
.sd-slider-track::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-bright), rgba(129,140,248,0.3));
  opacity: 0.4;
}
.sd-slider-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px var(--bg-body), 0 0 0 5px var(--accent-bright);
  pointer-events: none;
  transition: left 0.1s ease;
}
.sd-slider-label {
  position: absolute;
  top: 100%;
  transform: translateX(-50%);
  margin-top: 12px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent-bright);
  white-space: nowrap;
  pointer-events: none;
  transition: left 0.1s ease;
}
.sd-slider-endpoints {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-micro);
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═════════════════════ CHAT BUBBLES ═════════════════════ */

.sd-chat { display: flex; flex-direction: column; gap: 12px; max-width: 100%; }
.sd-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  line-height: 1.5;
  word-wrap: break-word;
}
.sd-bubble-caller {
  align-self: flex-start;
  background: var(--bg-input);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.sd-bubble-agent {
  align-self: flex-end;
  background: var(--bg-active);
  color: var(--text-accent-bright);
  border-bottom-right-radius: 4px;
}
.sd-bubble-label {
  font-size: var(--fs-micro);
  font-weight: 600;
  margin-bottom: 4px;
}
.sd-bubble-caller .sd-bubble-label { color: var(--text-muted); }
.sd-bubble-agent .sd-bubble-label  { color: var(--text-accent); }

/* Integration logos — white chip for transparent PNGs */
.sd-integration-logo {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
}

/* ═════════════════════ LIVE WAVEFORM (hero) ═════════════════════ */

.sd-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 28px;
}
.sd-wave span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.85;
  animation: sd-wave-bounce 1.2s ease-in-out infinite;
}
.sd-wave span:nth-child(1) { height: 30%; animation-delay: -1.1s; }
.sd-wave span:nth-child(2) { height: 60%; animation-delay: -0.9s; }
.sd-wave span:nth-child(3) { height: 90%; animation-delay: -0.7s; }
.sd-wave span:nth-child(4) { height: 45%; animation-delay: -0.5s; }
.sd-wave span:nth-child(5) { height: 75%; animation-delay: -0.3s; }
.sd-wave span:nth-child(6) { height: 55%; animation-delay: -0.1s; }
.sd-wave span:nth-child(7) { height: 85%; animation-delay:  0.1s; }
.sd-wave span:nth-child(8) { height: 35%; animation-delay:  0.3s; }
@keyframes sd-wave-bounce {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* ═════════════════════ MARKETING — global helpers ═════════════════════ */

.sd-mkt-body {
  background: var(--mkt-body-bg);
  color: var(--text-primary);
  background-image: var(--mkt-body-gradient);
  background-attachment: fixed;
}

/* Subtle grain overlay (SVG noise, inline) */
.sd-grain::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--mkt-grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.sd-mkt-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  backdrop-filter: saturate(1.3) blur(18px);
  -webkit-backdrop-filter: saturate(1.3) blur(18px);
  background: var(--mkt-nav-bg);
  border-bottom: 1px solid var(--border-subtle);
}
.sd-mkt-nav__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.sd-mkt-nav__links {
  display: none;
  gap: 28px;
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}
@media (min-width: 900px) { .sd-mkt-nav__links { display: flex; } }
.sd-mkt-nav__links a { color: inherit; text-decoration: none; transition: color 0.15s; }
.sd-mkt-nav__links a:hover { color: var(--text-primary); }

.sd-hero {
  position: relative;
  padding: 160px 24px 110px;
  max-width: 1240px;
  margin: 0 auto;
  z-index: 1;
}
.sd-hero__inner { max-width: 900px; }
.sd-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  background: var(--mkt-eyebrow-bg);
  backdrop-filter: blur(8px);
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
  margin-bottom: 28px;
}
.sd-hero__eyebrow .sd-badge__dot { background: var(--signal); box-shadow: 0 0 8px var(--signal); }
.sd-hero__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(44px, 7.5vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.028em;
  margin: 0 0 28px;
  font-variation-settings: "SOFT" 30, "opsz" 144;
  color: var(--text-primary);
}
.sd-hero__title em {
  font-style: italic;
  color: var(--text-accent-bright);
  font-variation-settings: "SOFT" 80, "WONK" 1, "opsz" 144;
}
.sd-hero__lede {
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--text-tertiary);
  max-width: 620px;
  line-height: 1.55;
  margin: 0 0 36px;
}
.sd-hero__cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.sd-hero__trust {
  display: flex;
  gap: 24px 36px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.sd-hero__trust > span { display: inline-flex; align-items: center; gap: 8px; }
.sd-hero__trust svg { color: var(--signal); width: 14px; height: 14px; }

.sd-hero-demo {
  position: absolute;
  right: 24px;
  top: 180px;
  width: 380px;
  padding: 0;
  border: 1px solid var(--mkt-phone-frame-border);
  border-radius: var(--radius-xl);
  background: var(--mkt-phone-frame-bg);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg), 0 0 80px rgba(99,102,241,0.18);
  display: none;
  overflow: hidden;
}
@media (min-width: 1100px) { .sd-hero-demo { display: block; } }
.sd-hero-demo__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}
.sd-hero-demo__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 600; font-size: 14px;
}
.sd-hero-demo__title { font-size: var(--fs-sm); font-weight: 600; color: var(--text-primary); }
.sd-hero-demo__sub { font-size: var(--fs-xs); color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.sd-hero-demo__sub::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal); animation: sd-pulse 2s ease-in-out infinite; }

.sd-mkt-section {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 110px 24px;
  z-index: 1;
}
.sd-mkt-section--tight { padding: 64px 24px; }
.sd-mkt-section__header { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.sd-mkt-section__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 54px);
  letter-spacing: -0.022em;
  line-height: 1.06;
  color: var(--text-primary);
  margin: 0 0 18px;
}
.sd-mkt-section__title em { font-style: italic; color: var(--text-accent-bright); font-variation-settings: "SOFT" 80, "WONK" 1, "opsz" 144; }
.sd-mkt-section__lede {
  font-size: var(--fs-lg);
  color: var(--text-tertiary);
  line-height: 1.55;
  margin: 0;
}

.sd-mkt-feature {
  padding: 28px;
  background: var(--mkt-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
html.light .sd-mkt-feature { box-shadow: var(--shadow-sm); }
html.light .sd-mkt-feature:hover { box-shadow: var(--shadow-md); }
.sd-mkt-feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.sd-mkt-feature__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-active);
  color: var(--text-accent-bright);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.sd-mkt-feature__title { font-family: var(--ff-display); font-weight: 500; font-size: var(--fs-xl); color: var(--text-primary); margin: 0 0 10px; }
.sd-mkt-feature__body  { font-size: var(--fs-sm); color: var(--text-tertiary); line-height: 1.6; margin: 0; }

/* Price card (marketing) */
.sd-price {
  padding: 32px;
  background: var(--mkt-glass-strong);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  position: relative;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.sd-price:hover { border-color: var(--border-strong); transform: translateY(-2px); }
html.light .sd-price { box-shadow: var(--shadow-sm); }
html.light .sd-price:hover { box-shadow: var(--shadow-md); }
.sd-price--featured {
  border-color: rgba(99,102,241,0.55);
  background: linear-gradient(180deg, rgba(99,102,241,0.08), var(--mkt-glass-strong) 60%);
  box-shadow: 0 0 64px -24px rgba(99,102,241,0.55);
}
html.light .sd-price--featured { box-shadow: 0 24px 60px -28px rgba(99,102,241,0.45), var(--shadow-sm); }
.sd-price__tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}
.sd-price__name { font-size: var(--fs-sm); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; margin: 0 0 14px; }
.sd-price__value {
  font-family: var(--ff-display);
  font-size: 56px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
}
.sd-price__unit { color: var(--text-muted); font-size: var(--fs-sm); }
.sd-price__note { font-size: var(--fs-xs); color: var(--text-muted); margin: 8px 0 28px; }
.sd-price__features { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.sd-price__features li { font-size: var(--fs-sm); color: var(--text-secondary); display: flex; align-items: flex-start; gap: 10px; }
.sd-price__features svg { color: var(--signal); flex-shrink: 0; margin-top: 3px; }

/* Feature-detail (marketing Features page) */
.sd-mkt-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  padding: 80px 0;
  border-top: 1px solid var(--border-subtle);
}
.sd-mkt-row:first-of-type { border-top: 0; }
@media (min-width: 900px) { .sd-mkt-row { grid-template-columns: 5fr 6fr; gap: 72px; } .sd-mkt-row--flip > :first-child { order: 2; } }
.sd-mkt-row__copy .sd-eyebrow { margin-bottom: 16px; display: inline-block; }
.sd-mkt-row__copy h3 {
  font-family: var(--ff-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 18px;
}
.sd-mkt-row__copy p { font-size: var(--fs-lg); color: var(--text-tertiary); line-height: 1.6; margin: 0 0 20px; }
.sd-mkt-row__art {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--mkt-row-art-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
html.light .sd-mkt-row__art { box-shadow: var(--shadow-md); }
.sd-mkt-row__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--mkt-row-art-glow);
  pointer-events: none;
}

/* Marketing footer */
.sd-mkt-footer {
  border-top: 1px solid var(--border-subtle);
  margin-top: 80px;
  padding: 64px 24px 40px;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}
.sd-mkt-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 800px) { .sd-mkt-footer__grid { grid-template-columns: 1fr 1fr; } }
.sd-mkt-footer h4 {
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 16px;
  font-weight: 600;
}
.sd-mkt-footer a {
  display: block;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: var(--fs-sm);
  padding: 4px 0;
  transition: color 0.15s;
}
.sd-mkt-footer a:hover { color: var(--text-primary); }
.sd-mkt-footer__bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

/* ═════════════════════ ANIMATIONS ═════════════════════ */

@keyframes sd-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sd-fade-in { animation: sd-fade-in 0.6s cubic-bezier(0.2,0.7,0.1,1) both; }
.sd-stagger > * { animation: sd-fade-in 0.6s cubic-bezier(0.2,0.7,0.1,1) both; }
.sd-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.sd-stagger > *:nth-child(2) { animation-delay: 0.12s; }
.sd-stagger > *:nth-child(3) { animation-delay: 0.19s; }
.sd-stagger > *:nth-child(4) { animation-delay: 0.26s; }
.sd-stagger > *:nth-child(5) { animation-delay: 0.33s; }
.sd-stagger > *:nth-child(6) { animation-delay: 0.40s; }
.sd-stagger > *:nth-child(7) { animation-delay: 0.47s; }
.sd-stagger > *:nth-child(8) { animation-delay: 0.54s; }

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

/* ═════════════════════ LEGACY TAILWIND REMAPPING ═════════════════════
   Existing pages still use zinc-* classes. Keep them looking right
   in both themes via a minimal compat layer (no !important spray). */

.bg-zinc-900\/50,
.bg-zinc-900\/40,
.bg-zinc-900\/60 { background-color: var(--bg-card); }
.bg-zinc-900       { background-color: var(--bg-card); }
.bg-zinc-800,
.bg-zinc-800\/80   { background-color: var(--bg-input); }
.bg-zinc-800\/30,
.bg-zinc-800\/50   { background-color: var(--bg-card-hover); }
.bg-\[\#0a0a0f\],
.bg-\[\#0c0c12\],
.bg-\[\#0c0c14\]   { background-color: var(--bg-body); }

.text-zinc-100 { color: var(--text-primary); }
.text-zinc-200 { color: var(--text-primary); }
.text-zinc-300 { color: var(--text-secondary); }
.text-zinc-400 { color: var(--text-tertiary); }
.text-zinc-500 { color: var(--text-muted); }
.text-zinc-600 { color: var(--text-faint); }
.text-white    { color: var(--text-primary); }

.border-zinc-800,
.border-zinc-800\/50,
.border-zinc-800\/30 { border-color: var(--border-default); }
.border-zinc-700,
.border-zinc-700\/30 { border-color: var(--border-strong); }
.border-zinc-600     { border-color: var(--border-strong); }

.hover\:border-zinc-700:hover,
.hover\:border-zinc-600:hover { border-color: var(--border-strong); }
.hover\:bg-zinc-800\/30:hover,
.hover\:bg-zinc-800\/50:hover { background-color: var(--bg-card-hover); }
.hover\:bg-zinc-700:hover     { background-color: var(--bg-input-hover); }

/* Status surface classes used across app */
.bg-emerald-900\/50,
.bg-emerald-900\/30  { background: var(--status-success-bg); }
.text-emerald-400    { color: var(--status-success-fg); }
.border-emerald-700\/30 { border-color: var(--status-success-bd); }

.bg-amber-900\/50    { background: var(--status-warn-bg); }
.text-amber-400      { color: var(--status-warn-fg); }
.border-amber-700\/30{ border-color: var(--status-warn-bd); }

.bg-red-900\/50,
.bg-red-900\/30      { background: var(--status-error-bg); }
.text-red-400        { color: var(--status-error-fg); }
.border-red-700\/30  { border-color: var(--status-error-bd); }

.bg-blue-900\/50     { background: var(--status-info-bg); }
.text-blue-400       { color: var(--status-info-fg); }

.bg-violet-900\/50   { background: rgba(167,139,250,0.12); }
.text-violet-400     { color: #c4b5fd; }

.bg-indigo-950\/30   { background: var(--bg-active); }
.bg-indigo-900\/30   { background: var(--bg-active); }
.text-indigo-400     { color: var(--text-accent-bright); }
.text-indigo-300     { color: var(--text-accent-bright); }
.hover\:text-indigo-300:hover { color: var(--text-accent-bright); }
.border-indigo-500\/50,
.border-indigo-500\/30,
.border-indigo-800\/30 { border-color: rgba(129,140,248,0.45); }
.bg-indigo-600       { background-color: var(--accent); }
.bg-indigo-600:hover,
.hover\:bg-indigo-500:hover { background-color: var(--accent-bright); }

.text-cyan-400       { color: #67e8f9; }

/* Old gradient-text helper used by marketing — redirect to display-em look */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-bright), var(--signal) 60%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Glow used by featured price card */
.glow { box-shadow: 0 0 64px -24px rgba(129,140,248,0.55); }

/* ═════════════════════════════════════════════════════════════════
   VOICE-FIRST MOCKUP COMPONENTS
   Call cards, call transcripts, SIP panels, call-log rows, waveforms.
   These replace the chat-bubble imagery so every visual reads as
   "phone call," not "text chat."
   ═════════════════════════════════════════════════════════════════ */

/* — Phone-frame: a window styled like the app's call-detail view — */
.sd-phone-frame {
  background: var(--mkt-phone-frame-bg);
  border: 1px solid var(--mkt-phone-frame-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
html.light .sd-phone-frame { box-shadow: var(--shadow-md); }

.sd-phone-frame__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(128,128,140,0.06), transparent);
}
.sd-phone-frame__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(128,128,140,0.35);
}
.sd-phone-frame__dot:nth-child(1) { background: #ff5f57; }
.sd-phone-frame__dot:nth-child(2) { background: #ffbd2e; }
.sd-phone-frame__dot:nth-child(3) { background: #28c840; }
.sd-phone-frame__title {
  margin-left: 10px;
  font-size: var(--fs-micro);
  color: var(--text-muted);
  font-family: var(--ff-mono);
  letter-spacing: 0.03em;
}

/* — Live call card: header + waveform + transcript + footer — */
.sd-callcard {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sd-callcard__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.sd-callcard__phoneicon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-active);
  color: var(--text-accent-bright);
  flex-shrink: 0;
}
.sd-callcard__direction {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}
.sd-callcard__from {
  font-family: var(--ff-mono);
  font-size: var(--fs-sm);
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-top: 2px;
}
.sd-callcard__caller {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.sd-callcard__timer {
  margin-left: auto;
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sd-callcard__timer::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
  animation: sd-pulse 1.8s ease-in-out infinite;
}

/* — The big waveform that says "this is audio, not text" — */
.sd-bigwave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 48px;
  padding: 0 4px;
}
.sd-bigwave span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--mkt-waveform-color);
  opacity: 0.9;
  animation: sd-wave-bounce 1.2s ease-in-out infinite;
}
.sd-bigwave span:nth-child(1)  { height: 40%; animation-delay: -1.10s; }
.sd-bigwave span:nth-child(2)  { height: 70%; animation-delay: -1.00s; }
.sd-bigwave span:nth-child(3)  { height: 90%; animation-delay: -0.85s; }
.sd-bigwave span:nth-child(4)  { height: 55%; animation-delay: -0.70s; }
.sd-bigwave span:nth-child(5)  { height: 80%; animation-delay: -0.55s; }
.sd-bigwave span:nth-child(6)  { height: 45%; animation-delay: -0.40s; }
.sd-bigwave span:nth-child(7)  { height: 95%; animation-delay: -0.25s; }
.sd-bigwave span:nth-child(8)  { height: 60%; animation-delay: -0.10s; }
.sd-bigwave span:nth-child(9)  { height: 75%; animation-delay:  0.05s; }
.sd-bigwave span:nth-child(10) { height: 40%; animation-delay:  0.20s; }
.sd-bigwave span:nth-child(11) { height: 85%; animation-delay:  0.35s; }
.sd-bigwave span:nth-child(12) { height: 55%; animation-delay:  0.50s; }
.sd-bigwave span:nth-child(13) { height: 70%; animation-delay:  0.65s; }
.sd-bigwave span:nth-child(14) { height: 35%; animation-delay:  0.80s; }
.sd-bigwave span:nth-child(15) { height: 90%; animation-delay:  0.95s; }
.sd-bigwave span:nth-child(16) { height: 50%; animation-delay:  1.10s; }

/* — Call transcript (timestamps, speaker labels — NOT chat bubbles) — */
.sd-transcript {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: var(--fs-xs);
}
.sd-transcript__row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.55;
}
.sd-transcript__ts {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  padding-top: 1px;
}
.sd-transcript__speaker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding-top: 1px;
  min-width: 56px;
}
.sd-transcript__speaker--agent  { color: var(--accent-bright); }
.sd-transcript__speaker--caller { color: var(--text-tertiary); }
.sd-transcript__line {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
}
html.light .sd-transcript__speaker--agent { color: var(--accent-deep); }

/* — Call badge strip under transcript: "Recording · Transcribing · PCI masked" — */
.sd-callbadges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
.sd-callbadges .sd-badge { font-size: 10px; padding: 3px 9px; }

/* — Call-log row: inline rows that look like the dashboard's recent-calls table — */
.sd-callog {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
}
.sd-callog__row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-xs);
}
.sd-callog__row:last-child { border-bottom: 0; }
.sd-callog__dir {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sd-callog__dir--in  { background: var(--status-info-bg); color: var(--status-info-fg); }
.sd-callog__dir--out { background: rgba(167,139,250,0.15); color: #a78bfa; }
html.light .sd-callog__dir--out { color: #6d28d9; background: rgba(109,40,217,0.10); }
.sd-callog__num {
  font-family: var(--ff-mono);
  color: var(--text-primary);
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sd-callog__dur {
  font-family: var(--ff-mono);
  color: var(--text-tertiary);
  font-size: 10px;
}
.sd-callog__status {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* — SIP / PBX panel: shows the "we register as an extension" story — */
.sd-sip {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sd-sip__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-xs);
}
.sd-sip__label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  font-weight: 600;
}
.sd-sip__value {
  font-family: var(--ff-mono);
  color: var(--text-primary);
  font-weight: 500;
}
.sd-sip__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}
.sd-sip__name {
  font-family: var(--ff-display);
  font-weight: 500;
  color: var(--text-primary);
  font-size: var(--fs-base);
}

/* — Stats strip mimicking the redesigned dashboard — */
.sd-mkt-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.sd-mkt-stats__cell {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px;
}
.sd-mkt-stats__label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.sd-mkt-stats__value {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 144;
}

/* — Phone handset icon container (used in incoming-call visuals) — */
.sd-handset {
  width: 56px; height: 56px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--accent-bright), var(--accent));
  color: white;
  box-shadow: 0 10px 28px -10px rgba(99,102,241,0.6), inset 0 1px 0 rgba(255,255,255,0.25);
  flex-shrink: 0;
}
.sd-handset--ringing { animation: sd-ring 1.2s ease-in-out infinite; }
@keyframes sd-ring {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
  50%      { transform: rotate(0); }
}

/* — Dial pad (for outbound campaign visual) — */
.sd-dialpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.sd-dialpad__key {
  aspect-ratio: 1.25;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: var(--ff-display);
  font-weight: 500;
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
}
.sd-dialpad__key small {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 3px;
}
.sd-dialpad__key--call {
  background: var(--signal);
  color: #1a2d03;
  border-color: transparent;
}

/* — Theme-aware logo wrapper —
   Both logo variants are in the DOM at all times; CSS shows the one
   matching the current theme so there's no FOUC when toggling. */
.sd-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.sd-logo__dark, .sd-logo__light { display: none; }
html:not(.light) .sd-logo__dark { display: inline-block; }
html.light        .sd-logo__light { display: inline-block; }

/* — Theme toggle button (used on marketing nav) — */
.sd-theme-toggle {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: var(--mkt-eyebrow-bg);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.sd-theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.sd-theme-toggle svg { width: 16px; height: 16px; }
html.light .sd-theme-toggle .sd-icon-moon { display: block; }
html.light .sd-theme-toggle .sd-icon-sun  { display: none; }
html:not(.light) .sd-theme-toggle .sd-icon-moon { display: none; }
html:not(.light) .sd-theme-toggle .sd-icon-sun  { display: block; }
