/**
 * Benchmark dashboard — light theme (MIN-175).
 *
 * Tokens vendored from packages/web design_system `_tokens.css` (the two apps
 * deploy independently, so no cross-app static imports). Same visual
 * language: white canvas, subtle surfaces, restrained blue accents.
 */

:root {
  --va-bg: #ffffff;
  --va-surface: #f8f9fc;
  --va-surface-2: #f0f2f8;
  --va-surface-3: #e8ebf4;
  --va-border: rgba(0, 0, 0, 0.08);
  --va-border-soft: rgba(0, 0, 0, 0.05);
  --va-accent: #4d65ff;
  --va-accent-hover: #3a52e8;
  --va-accent-dim: rgba(77, 101, 255, 0.1);
  --va-accent-ring: rgba(77, 101, 255, 0.25);
  --va-green: #16a34a;
  --va-green-dim: rgba(22, 163, 74, 0.12);
  --va-red: #dc2626;
  --va-red-dim: rgba(220, 38, 38, 0.1);
  --va-amber: #d97706;
  --va-amber-dim: rgba(217, 119, 6, 0.12);
  --va-sky: #0ea5e9;
  --va-sky-dim: rgba(14, 165, 233, 0.12);
  --va-text: #111827;
  --va-text-muted: #6b7280;
  --va-text-dim: #9ca3af;
  --va-font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --va-radius-sm: 4px;
  --va-radius-md: 6px;
  --va-radius-lg: 10px;
  --va-radius-xl: 14px;
  --va-radius-pill: 9999px;
  --va-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --va-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --va-transition: 0.18s ease;
  /* Chart series (mandated by MIN-175) */
  --chart-pantheon: #3b82f6;
  --chart-elevenlabs: #f59e0b;
  --chart-elevenlabs-text: #92400e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--va-bg);
  color: var(--va-text);
  font-family: var(--va-font-sans);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--va-accent); }

/* ── Top navigation ─────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--va-bg);
  border-bottom: 1px solid var(--va-border);
}

.topbar-brand {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--va-text);
  text-decoration: none;
  white-space: nowrap;
}

.topbar-actions { display: flex; align-items: center; gap: 0.6rem; }

.signout-link {
  font-size: 0.8rem;
  color: var(--va-text-muted);
  text-decoration: none;
}
.signout-link:hover { color: var(--va-text); }

/* Language toggle — same pattern as the Pantheon docs selector */
.lang-toggle {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--va-border);
  border-radius: var(--va-radius-md);
  background: var(--va-surface);
  padding: 2px;
}
.lang-toggle button {
  border: 0;
  background: transparent;
  border-radius: calc(var(--va-radius-md) - 2px);
  padding: 0.25rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--va-text-muted);
  cursor: pointer;
  transition: background var(--va-transition), color var(--va-transition);
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--va-accent-dim);
  color: var(--va-accent);
}

/* ── Layout ─────────────────────────────────────── */

.page {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

.page-narrow { max-width: 44rem; }

.page-configure { max-width: 78rem; }
.config-header, .section-heading, .test-card-header, .form-actions, .test-card-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.config-header { align-items: flex-start; margin-bottom: 1.5rem; }
.eyebrow { margin: 0 0 0.25rem; color: var(--va-accent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.config-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.8fr); gap: 1.5rem; align-items: start; }
.config-form-card, .test-list-section { min-width: 0; }
.config-form-card { padding: 1.25rem; }
.section-heading { align-items: flex-start; }
.section-heading h2 { margin-top: 0; }
.step-indicator, .count-badge { border-radius: var(--va-radius-pill); background: var(--va-accent-dim); color: var(--va-accent); padding: 0.25rem 0.65rem; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.form-intro { margin-top: -0.25rem; margin-bottom: 1.25rem; }
.form-section { border: 0; border-top: 1px solid var(--va-border); margin: 1.25rem 0 0; padding: 1.25rem 0 0; }
.form-section legend { padding: 0; font-weight: 700; }
.legend-number { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; margin-right: 0.4rem; border-radius: 50%; background: var(--va-accent); color: #fff; font-size: 0.75rem; }
.form-grid { display: grid; gap: 0.85rem; margin-top: 0.85rem; }
.form-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { min-width: 0; margin-top: 0.85rem; }
.form-grid .field { margin-top: 0; }
.field label { display: block; margin-bottom: 0.25rem; color: var(--va-text-muted); font-size: 0.8rem; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--va-border); border-radius: var(--va-radius-md); background: var(--va-bg); color: var(--va-text); font: inherit; font-size: 0.9rem; padding: 0.55rem 0.65rem; }
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--va-accent-ring); }
.help-text { display: block; margin-top: 0.25rem; color: var(--va-text-muted); font-size: 0.75rem; }
.error-text, .form-errors { display: block; margin-top: 0.25rem; color: var(--va-red); font-size: 0.78rem; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--va-red); }
.agent-pair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-top: 0.85rem; }
.provider-panel { border: 1px solid var(--va-border); border-radius: var(--va-radius-lg); padding: 0.9rem; }
.provider-pantheon { background: rgba(77, 101, 255, 0.04); }
.provider-elevenlabs { background: rgba(245, 158, 11, 0.05); }
.provider-heading { display: flex; align-items: center; gap: 0.5rem; }
.provider-heading h3 { margin: 0; }
.provider-mark { display: inline-flex; align-items: center; justify-content: center; width: 1.65rem; height: 1.65rem; border-radius: 50%; background: var(--va-accent); color: #fff; font-size: 0.8rem; font-weight: 700; }
.provider-elevenlabs .provider-mark { background: var(--va-amber); }
.config-messages { margin-bottom: 1rem; }
.message { border-radius: var(--va-radius-md); padding: 0.65rem 0.8rem; font-size: 0.88rem; }
.message-success { background: var(--va-green-dim); color: var(--va-green); }
.message-error { background: var(--va-red-dim); color: var(--va-red); }
.form-actions { justify-content: flex-end; margin-top: 1.5rem; }
.test-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.85rem; }
.test-config-card { padding: 1rem; }
.test-card-header { align-items: flex-start; }
.test-config-card h3 { margin: 0; font-size: 1rem; }
.test-config-card p { margin: 0.2rem 0 0; }
.status-badge { border-radius: var(--va-radius-pill); background: var(--va-green-dim); color: var(--va-green); padding: 0.2rem 0.55rem; font-size: 0.68rem; font-weight: 700; white-space: nowrap; }
.test-summary { font-size: 0.85rem; }
.agent-summary { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.agent-chip { border: 1px solid var(--va-border); border-radius: var(--va-radius-pill); padding: 0.22rem 0.55rem; color: var(--va-text-muted); font-size: 0.72rem; }
.agent-chip strong { color: var(--va-text); }
.test-card-actions { justify-content: flex-end; margin-top: 0.85rem; }
.test-card-actions .btn { font-size: 0.8rem; padding: 0.4rem 0.7rem; }
.test-card-actions form { margin: 0; }
.empty-config { margin-top: 0.85rem; text-align: center; }
@media (max-width: 860px) { .config-layout { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .config-header { flex-direction: column; } .form-grid-two, .form-grid-three, .agent-pair-grid { grid-template-columns: 1fr; } .config-form-card { padding: 1rem; } }

h1 { font-size: 1.4rem; margin: 0.5rem 0 0.75rem; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
h3 { font-size: 0.95rem; margin: 1rem 0 0.4rem; }
p { margin: 0.4rem 0; }
.muted { color: var(--va-text-muted); font-size: 0.9rem; }

.card {
  background: var(--va-surface);
  border: 1px solid var(--va-border);
  border-radius: var(--va-radius-lg);
  padding: 1rem;
}

/* ── Buttons & inputs ───────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: var(--va-radius-md);
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--va-transition), color var(--va-transition);
}
.btn:focus-visible,
.lang-toggle button:focus-visible,
input:focus-visible,
[role="tab"]:focus-visible,
.likert input:focus-visible + span {
  outline: none;
  box-shadow: 0 0 0 3px var(--va-accent-ring);
}
.btn-primary { background: var(--va-accent); color: #fff; }
.btn-primary:hover { background: var(--va-accent-hover); }
.btn-secondary {
  background: var(--va-bg);
  color: var(--va-text);
  border-color: var(--va-border);
}
.btn-secondary:hover { background: var(--va-surface-2); }
.btn-danger-ghost { background: var(--va-red-dim); color: var(--va-red); }
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--va-text-muted);
  margin-bottom: 0.25rem;
}
input[type="tel"] {
  width: 100%;
  border: 1px solid var(--va-border);
  border-radius: var(--va-radius-md);
  background: var(--va-bg);
  color: var(--va-text);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.7rem;
}
input[type="tel"]:disabled { background: var(--va-surface-2); color: var(--va-text-dim); cursor: not-allowed; }

.phone-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--va-border);
  border-radius: var(--va-radius-md);
  background: var(--va-bg);
  overflow: hidden;
}
.phone-group input[type="tel"] {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0;
}
.phone-group input[type="tel"]:focus-visible { box-shadow: none; }
.phone-prefix-wrap {
  position: relative;
  flex: 0 0 auto;
  border-right: 1px solid var(--va-border);
}
.phone-prefix {
  /* Sized for the collapsed label ("+420" is the longest code) plus the
     browser's own arrow, not for the full option text (which is only
     ever shown open) — a wider box here just reads as a blank gap. */
  width: 3.6rem;
  border: none;
  border-radius: 0;
  background: var(--va-bg);
  /* The collapsed box shows only the dial code via .phone-prefix-label
     below — mutating <option> text on focus/blur to fake this was
     unreliable (Chrome doesn't always repaint the closed box on change).
     The real, full-text options are still what the opened dropdown and
     screen readers see; this only hides the redundant closed-box text. */
  color: transparent;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0 0.5rem 0.35rem;
  overflow: hidden;
  text-overflow: clip;
}
.phone-prefix option { color: var(--va-text); }
.phone-prefix:disabled { background: var(--va-surface-2); cursor: not-allowed; }
.phone-prefix-label {
  position: absolute;
  left: 0;
  width: 100%;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
  color: var(--va-text);
  font-size: 0.95rem;
  pointer-events: none;
  white-space: nowrap;
}
.phone-prefix:disabled + .phone-prefix-label { color: var(--va-text-dim); }

textarea {
  width: 100%;
  border: 1px solid var(--va-border);
  border-radius: var(--va-radius-md);
  background: var(--va-bg);
  color: var(--va-text);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.7rem;
  resize: vertical;
}
textarea:disabled { background: var(--va-surface-2); color: var(--va-text-dim); cursor: not-allowed; }

.phone-call-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}
.field-group { flex: 1; min-width: 10rem; }
.field-group .field-label { margin-bottom: 0.25rem; }
.btn-icon { flex-shrink: 0; }
.icon-phone { width: 1rem; height: 1rem; flex-shrink: 0; }

/* ── Tabs (ARIA tabs pattern) ───────────────────── */

.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--va-border);
  margin: 1rem 0 1.25rem;
  overflow-x: auto;
}
[role="tab"] {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--va-text-muted);
  padding: 0.55rem 0.9rem;
  border-radius: var(--va-radius-md) var(--va-radius-md) 0 0;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
[role="tab"][aria-selected="true"] {
  color: var(--va-accent);
  background: var(--va-accent-dim);
  box-shadow: inset 0 -2px 0 var(--va-accent);
}
.tab-check { color: var(--va-green); font-weight: 700; }
.tab-index {
  flex-shrink: 0;
  width: 1.25rem; height: 1.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--va-text-muted);
  color: #fff;
  font-size: 0.7rem; font-weight: 700;
}
[role="tab"][aria-selected="true"] .tab-index { background: var(--va-accent); }

/* ── Domain panel ───────────────────────────────── */

.domain-context {
  background: var(--va-sky-dim);
  border-radius: var(--va-radius-md);
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 720px) {
  .columns { grid-template-columns: 1fr; }
}

.option-card {
  background: var(--va-surface);
  border: 1px solid var(--va-border);
  border-radius: var(--va-radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.option-title { font-size: 1rem; font-weight: 600; margin: 0; }

.badge {
  display: inline-block;
  border-radius: var(--va-radius-pill);
  padding: 0.1rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-outbound { background: var(--va-accent-dim); color: var(--va-accent); }
.badge-inbound { background: var(--va-amber-dim); color: var(--va-amber); }
.badge-heuristic { background: var(--va-surface-2); color: var(--va-text-muted); text-transform: none; letter-spacing: normal; }

.rag-questions-details { margin: 0.75rem 0 1.25rem; }
.rag-questions-details summary { cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--va-text); }
.rag-questions-details summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--va-accent-ring); border-radius: var(--va-radius-sm); }
.rag-questions-help { margin: 0.5rem 0 0; }
.rag-questions-list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.rag-question {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--va-border);
  padding-bottom: 0.5rem;
}
.rag-question-number {
  flex: 0 0 1.5rem;
  color: var(--va-accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}
.rag-question-text { flex: 1; }
.rag-questions-toggle {
  margin-top: 0.75rem;
  border: 0;
  padding: 0.25rem 0;
  background: transparent;
  color: var(--va-accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.rag-questions-toggle:hover { color: var(--va-accent-hover); }
.rag-questions-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--va-accent-ring); border-radius: var(--va-radius-sm); }
@media (max-width: 720px) {
  .rag-question { align-items: flex-start; flex-wrap: wrap; }
  .rag-question .badge-heuristic { margin-left: 2.25rem; }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: var(--va-radius-pill);
  padding: 0.15rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--va-surface-3);
  color: var(--va-text-muted);
}
.status-pill[data-status="calling"],
.status-pill[data-status="in_progress"] { background: var(--va-sky-dim); color: var(--va-sky); }
.status-pill[data-status="completed"] { background: var(--va-green-dim); color: var(--va-green); }
.status-pill[data-status="failed"] { background: var(--va-red-dim); color: var(--va-red); }

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .pulse-dot { animation: none; } }

.inbound-number {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.call-error {
  background: var(--va-red-dim);
  color: var(--va-red);
  border-radius: var(--va-radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

/* ── Likert questionnaire ───────────────────────── */

.questionnaire { display: flex; flex-direction: column; gap: 0.65rem; border: 0; margin: 0; padding: 0; }
.questionnaire:disabled .likert-btn { opacity: 0.5; }
.likert-group {
  border: 0;
  margin: 0;
  padding: 0.7rem 0.8rem;
  background: var(--va-surface);
  border-radius: var(--va-radius-md);
}
.likert-legend {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0;
  margin-bottom: 0.45rem;
}
.likert-index {
  flex-shrink: 0;
  width: 1.4rem; height: 1.4rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--va-accent);
  color: #fff;
  font-size: 0.72rem; font-weight: 700;
}
.likert-legend-text { flex: 1; }
.likert-scale { display: flex; align-items: stretch; gap: 0.35rem; }
.likert { display: flex; flex: 1; }
.likert input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.likert-btn {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 3.4rem;
  padding: 0.3rem 0.2rem;
  border: 1px solid var(--va-border);
  border-radius: var(--va-radius-md);
  background: var(--va-bg);
  color: var(--va-text-muted);
  cursor: pointer;
  text-align: center;
  transition: background var(--va-transition), color var(--va-transition);
}
.likert-value { font-size: 0.9rem; font-weight: 700; }
.likert-anchor-label { font-size: 0.68rem; line-height: 1.15; }
.likert input:checked + .likert-btn {
  background: var(--va-accent);
  border-color: var(--va-accent);
  color: #fff;
}
.likert input:disabled + .likert-btn { cursor: not-allowed; opacity: 0.5; }

/* ── Submit bar & modal ─────────────────────────── */

.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.domain-locked {
  background: var(--va-green-dim);
  color: var(--va-green);
  border-radius: var(--va-radius-md);
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
}

dialog.confirm-modal {
  border: 1px solid var(--va-border);
  border-radius: var(--va-radius-xl);
  box-shadow: var(--va-shadow-md);
  padding: 1.25rem;
  max-width: 26rem;
  width: calc(100vw - 2rem);
}
dialog.confirm-modal::backdrop { background: rgba(17, 24, 39, 0.45); }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1rem; }

.submit-summary { display: flex; flex-direction: column; gap: 0.9rem; margin: 0.75rem 0; }
.submit-summary-label { margin: 0 0 0.3rem; font-size: 0.8rem; font-weight: 600; color: var(--va-text-muted); }
.submit-summary-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.submit-summary-list li { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; font-weight: 500; }
.submit-summary-current .submit-summary-list li { color: var(--va-accent); }
.submit-summary-done .submit-summary-list li { color: var(--va-green); }
.submit-summary-pending .submit-summary-list li { color: var(--va-red); }
.submit-summary-icon { font-weight: 700; }

/* ── Landing ────────────────────────────────────── */
/*
 * No card chrome here on purpose (aesthetic & minimalist design): a
 * one-time, read-first briefing reads better as plain copy on an ambient
 * background than as boxed panels. The gradient wash + larger type give the
 * page enough presence to fill the viewport without needing a bordered
 * shape to anchor it.
 */

body.landing-page {
  background:
    radial-gradient(60rem 32rem at 15% -10%, var(--va-accent-dim), transparent 60%),
    radial-gradient(50rem 30rem at 100% 0%, rgba(14, 165, 233, 0.08), transparent 55%),
    var(--va-bg);
}

.page-landing {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 64rem;
  min-height: calc(100dvh - 3.75rem);
  padding: 2rem clamp(1rem, 5vw, 5rem);
}

.landing-hero { width: 100%; }

.landing-hero h1 {
  font-size: clamp(1.15rem, 4.5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  text-align: center;
  white-space: nowrap;
}

.onboarding-matchup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
  margin: 0 0 1rem;
  color: var(--va-text);
  font-size: clamp(1rem, 3vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}
.onboarding-matchup-rauda { color: #0b3d91; }
.onboarding-matchup-elevenlabs { color: #c44810; }
.onboarding-matchup-vs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.82em;
  font-style: italic;
  letter-spacing: 0;
  transform: skewX(-7deg);
}
.onboarding-matchup-vs::before,
.onboarding-matchup-vs::after {
  content: "";
  width: 1.35rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}
.onboarding-matchup-vs::after { background: linear-gradient(90deg, currentColor, transparent); }

.landing-lede {
  font-size: 1.05rem;
  line-height: 1.6;
}

.domain-list { display: grid; gap: 1rem; margin: 1.5rem 0; padding: 1.25rem 0; list-style: none; border-top: 1px solid var(--va-border); border-bottom: 1px solid var(--va-border); }
.domain-list li { display: flex; gap: 1rem; align-items: baseline; }
.domain-languages {
  display: block;
  margin-top: 0.2rem;
  color: var(--va-text-muted);
  font-size: 0.82rem;
}
.domain-index {
  flex-shrink: 0;
  width: 2rem; height: 2rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--va-accent-dim);
  color: var(--va-accent);
  font-size: 0.9rem; font-weight: 700;
}
.landing-cta { margin-top: 2rem; display: flex; justify-content: flex-end; gap: 0.75rem; flex-wrap: wrap; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }

/* ── First-visit cinematic trailer ─────────────── */

body.trailer-active { overflow: hidden; }
body.trailer-active .topbar { display: none; }
body.trailer-active .landing-hero { opacity: 0; }
.landing-hero { transition: opacity 0.65s ease; }

.trailer-experience {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #02040a;
  color: #f8fbff;
  isolation: isolate;
}

.trailer-experience::before,
.trailer-experience::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.trailer-experience::before {
  z-index: -2;
  background:
    radial-gradient(circle at 50% 105%, rgba(34, 119, 255, 0.42), transparent 40%),
    radial-gradient(circle at 18% 30%, rgba(255, 102, 31, 0.18), transparent 27%),
    linear-gradient(145deg, #02040a 15%, #07101f 52%, #02040a 85%);
}

.trailer-experience::after {
  z-index: 4;
  opacity: 0.16;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.05) 4px);
  mix-blend-mode: soft-light;
}

.trailer-gate {
  position: relative;
  z-index: 5;
  width: min(44rem, calc(100vw - 2rem));
  padding: 2rem;
  text-align: center;
}

.trailer-kicker,
.trailer-title-overline {
  margin: 0 0 1rem;
  color: #8ab8ff;
  font-size: clamp(0.68rem, 1.5vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.32em;
}

.trailer-gate h1 {
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-wrap: balance;
  text-shadow: 0 0 3rem rgba(77, 145, 255, 0.3);
}

.trailer-intro {
  max-width: 34rem;
  margin: 1.5rem auto 2rem;
  color: #aebcd0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.trailer-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.25rem;
  border: 1px solid rgba(138, 184, 255, 0.65);
  border-radius: 2px;
  padding: 0.75rem 1.5rem;
  background: rgba(16, 61, 126, 0.45);
  box-shadow: 0 0 2rem rgba(39, 119, 255, 0.22), inset 0 0 1.5rem rgba(69, 145, 255, 0.1);
  color: #fff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--va-transition), box-shadow var(--va-transition), transform var(--va-transition);
}

.trailer-enter:hover { background: rgba(25, 91, 190, 0.62); transform: translateY(-1px); }
.trailer-enter:focus-visible { outline: 3px solid #8ab8ff; outline-offset: 4px; }
.trailer-enter:disabled { opacity: 0.55; cursor: wait; transform: none; }
.trailer-enter-icon { font-size: 0.78em; }
.trailer-auth-status { min-height: 1.5rem; margin-top: 1rem; color: #aebcd0; font-size: 0.85rem; }

.trailer-title { display: none; }

.trailer-experience[data-phase="title"] { background: #fff; color: #07101f; }
.trailer-experience[data-phase="title"]::before {
  opacity: 1;
  background:
    radial-gradient(ellipse at 50% 50%, #fff 20%, rgba(235, 242, 252, 0.72) 56%, rgba(210, 225, 244, 0.58) 100%),
    #fff;
}
.trailer-experience[data-phase="title"] .trailer-gate { display: none; }
.trailer-experience[data-phase="title"] .trailer-title {
  position: relative;
  z-index: 5;
  display: block;
  width: min(88rem, calc(100vw - 2rem));
  text-align: center;
  animation: trailer-title-in 0.9s 0.18s both;
}

.trailer-contenders {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vh, 1.5rem);
}

.trailer-contenders strong {
  position: relative;
  z-index: 2;
  font-size: clamp(4.2rem, 12vw, 11.5rem);
  line-height: 0.78;
  letter-spacing: -0.085em;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-style: italic;
  text-transform: uppercase;
  -webkit-text-stroke: clamp(6px, 0.65vw, 12px) #fff;
  paint-order: stroke fill;
  filter:
    drop-shadow(0 0 3px rgba(15, 23, 42, 0.9))
    drop-shadow(0 7px 0 rgba(15, 23, 42, 0.18));
}

.trailer-experience[data-phase="title"] .trailer-title-overline { color: #315d9f; }
.trailer-rauda { color: #0b3d91; text-shadow: 0 0 2.5rem rgba(50, 143, 255, 0.48); }
.trailer-elevenlabs { color: #c44810; text-shadow: 0 0 2.5rem rgba(255, 108, 35, 0.42); }
.trailer-experience[data-phase="title"] .trailer-rauda { animation: trailer-fighter-left 1.1s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
.trailer-experience[data-phase="title"] .trailer-elevenlabs { animation: trailer-fighter-right 1.1s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.trailer-versus {
  position: relative;
  z-index: 3;
  color: #101827;
  font-size: clamp(1.2rem, 3.3vw, 3rem);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.08em;
  transform: skewX(-8deg);
  text-shadow: 0 0 1.3rem rgba(255, 255, 255, 0.95), 0 0 2.5rem rgba(93, 154, 255, 0.45);
}
.trailer-versus::before,
.trailer-versus::after {
  content: "";
  display: inline-block;
  width: clamp(3rem, 11vw, 10rem);
  height: 2px;
  margin: 0 1rem;
  vertical-align: middle;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
}

.trailer-title-subtitle { margin: 1.5rem 0 0; color: #475569; letter-spacing: 0.08em; }

.trailer-experience[data-phase="exit"] {
  pointer-events: none;
  animation: trailer-exit 1.2s both;
}
.trailer-experience[data-phase="exit"] .trailer-title {
  position: relative;
  z-index: 5;
  display: block;
  width: min(88rem, calc(100vw - 2rem));
  text-align: center;
  animation: trailer-title-out 1.2s both;
}
@keyframes trailer-title-in {
  0% { opacity: 0; filter: blur(24px) brightness(3); transform: scale(1.45); }
  68% { opacity: 1; filter: blur(0) brightness(1.35); transform: scale(0.96); }
  100% { opacity: 1; filter: blur(0) brightness(1); transform: scale(1); }
}

@keyframes trailer-fighter-left {
  from { opacity: 0; filter: blur(14px); transform: translate3d(-32vw, 0, 0) skewX(-8deg); }
  to { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0) skewX(-4deg); }
}

@keyframes trailer-fighter-right {
  from { opacity: 0; filter: blur(14px); transform: translate3d(32vw, 0, 0) skewX(-8deg); }
  to { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0) skewX(-4deg); }
}

@keyframes trailer-title-out {
  from { opacity: 1; filter: blur(0); transform: scale(1); }
  to { opacity: 0; filter: blur(14px); transform: scale(1.12); }
}

@keyframes trailer-exit {
  from { opacity: 1; background: #fff; }
  to { opacity: 0; background: transparent; }
}

@media (max-width: 640px) {
  .trailer-gate { padding: 1.25rem; }
  .trailer-contenders { gap: 0.85rem; }
  .trailer-contenders strong { font-size: clamp(3.4rem, 17vw, 5rem); }
  .trailer-title-subtitle { margin-top: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero,
  .trailer-enter { transition: none; }
  .trailer-experience[data-phase="title"],
  .trailer-experience[data-phase="title"] .trailer-title,
  .trailer-experience[data-phase="exit"] .trailer-title,
  .trailer-experience[data-phase="exit"] { animation-duration: 0.01ms; animation-delay: 0s; }
}

@media (max-width: 560px) {
  .landing-cta { justify-content: center; }
  .landing-cta .btn { width: 100%; }
}

/* ── Results & charts ───────────────────────────── */

.reveal-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 1rem 0; }
.reveal-card { font-size: 0.9rem; }
.platform-name { font-weight: 600; }
.platform-name.pantheon { color: var(--chart-pantheon); }
.platform-name.elevenlabs { color: var(--chart-elevenlabs-text); }

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--va-border);
  border-radius: var(--va-radius-md);
  background: var(--va-surface);
  padding: 2px;
  margin: 0.75rem 0;
}
.view-toggle button {
  border: 0;
  background: transparent;
  border-radius: calc(var(--va-radius-md) - 2px);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--va-text-muted);
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}
.view-toggle button[aria-pressed="true"] {
  background: var(--va-accent);
  color: #fff;
}

.chart-legend {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--va-text-muted);
  margin: 0.5rem 0 1rem;
}
.legend-swatch {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  margin-right: 0.35rem;
  vertical-align: -1px;
}

.chart-block { margin: 1rem 0 2rem; }
.objective-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: -0.25rem 0 0.8rem;
}
.objective-metadata-row {
  color: var(--va-text-muted);
  font-size: 0.78rem;
  margin: 0;
}
.objective-metadata-row.stale {
  color: var(--va-text);
  font-weight: 600;
}
.comments-summary-block { margin-top: 1rem; }
.comments-summary-group { margin: 0.6rem 0; }
.comments-summary {
  background: var(--va-accent-dim);
  border-radius: var(--va-radius-md);
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
  margin: 0.3rem 0;
}
.chart-svg-wrap { overflow-x: auto; }
.chart-svg-wrap svg { display: block; max-width: 100%; height: auto; }
.chart-svg-wrap svg rect[data-tooltip] { cursor: default; }

.chart-tooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  background: var(--va-text);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.55rem;
  border-radius: var(--va-radius-sm);
  box-shadow: var(--va-shadow-md);
  white-space: nowrap;
}

.chart-table-details { margin-top: 0.5rem; }
.chart-table-details summary { cursor: pointer; font-size: 0.8rem; color: var(--va-text-muted); }
.chart-table { border-collapse: collapse; font-size: 0.82rem; margin-top: 0.5rem; width: 100%; }
.chart-table th, .chart-table td {
  border: 1px solid var(--va-border);
  padding: 0.3rem 0.6rem;
  text-align: left;
}
.chart-table th { background: var(--va-surface-2); font-weight: 600; }
.chart-table-comment {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}
.hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--va-text-muted);
  background: var(--va-accent-dim);
  border-radius: var(--va-radius-md);
  padding: 0.5rem 0.7rem;
  display: inline-flex;
  gap: 0.4rem;
}

.empty-state {
  text-align: center;
  color: var(--va-text-muted);
  padding: 2.5rem 1rem;
}

/* ── Utilities ──────────────────────────────────── */

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

[hidden] { display: none !important; }
