/* VELA — human-centered live voice practice.
   Design language: near-black stage, precise editorial type, white pill CTAs,
   and a listening-to-voice gradient in violet, cyan, and warm coral. */

:root {
  --bg: #060607;
  --panel: #0b0b0e;
  --card: #0e0e12;
  --border: #1d1d24;
  --border-hi: #34343e;
  --text: #f2f2f5;
  --muted: #8b8b97;
  --faint: #55555f;
  --accent: #b18cff;
  --coral: #ff806f;
  --accent-soft: rgba(177, 140, 255, 0.14);
  --good: #4ade80;
  --bad: #ff5a5a;
  --warn: #e8b45a;
  --radius: 16px;
  --irid: conic-gradient(from 180deg, #7dd8ff, #b18cff, #ff8cd1, #7dd8ff);
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

::selection { background: rgba(177, 140, 255, 0.35); }

/* keyboard users get a clear ring; mouse clicks stay clean */
:focus-visible {
  outline: 2px solid rgba(177, 140, 255, 0.8);
  outline-offset: 2px;
  border-radius: 6px;
}
button:focus-visible { outline-offset: 3px; border-radius: 999px; }

/* the builder's floating dial bar must never cover a focused field */
html { scroll-padding-bottom: 140px; }

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

html { scrollbar-color: #26262e var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #26262e; border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.in-call { overflow: hidden; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 72px; padding: 12px 32px;
  background: rgba(6, 6, 7, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
body.in-call .topbar { opacity: 0; transform: translateY(-10px); pointer-events: none; }

.brand { display: flex; align-items: center; gap: 16px; }
.brand-button {
  flex-shrink: 0; padding: 6px 8px; margin-left: -8px;
  background: transparent; color: inherit; border: 0; border-radius: 10px;
  text-align: left;
}
.brand-button:hover { background: rgba(255, 255, 255, .04); }
.brand-logo { display: block; width: 116px; height: auto; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 700; font-size: 16px; letter-spacing: 0.3em; color: var(--text);
}
/* Legacy wordmark styling remains for saved/static screens; the production
   lockup is the reusable SVG in /brand. */
.wordmark .dot, .auth-title .dot {
  display: inline-block; width: 0.3em; height: 0.3em; margin-left: 0.16em;
  border-radius: 50%; overflow: hidden; color: transparent; letter-spacing: 0;
  background: var(--irid);
  box-shadow: 0 0 8px rgba(177, 140, 255, 0.5);
  animation: dot-live 3.6s ease-in-out infinite;
}
@keyframes dot-live {
  0%, 100% { box-shadow: 0 0 5px rgba(177, 140, 255, 0.35); }
  50% { box-shadow: 0 0 13px rgba(177, 140, 255, 0.8); }
}
/* approved copy keeps its full stops; the closing one of a display line wears
   the brand color — same period, brand weight */
.brand-period { color: var(--accent); -webkit-text-fill-color: var(--accent); }
.brand-tag {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--faint);
}
@media (max-width: 640px) { .brand-tag { display: none; } }

/* Authenticated navigation has two layers: stable product destinations and
   quieter account utilities. Persistent destinations are what make the app
   feel navigable instead of like a sequence of modal screens. */
.nav-authed {
  display: flex; align-items: center; justify-content: flex-end; gap: 20px;
  width: min(760px, 72vw);
}
.nav-primary, .nav-account { display: flex; align-items: center; gap: 5px; }
.nav-primary {
  padding: 4px; border: 1px solid var(--border); border-radius: 999px;
  background: rgba(10, 10, 13, .82);
}
.app-nav-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; background: transparent; color: var(--muted);
  border: 0; font-size: 12.5px; font-weight: 500;
}
.app-nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .045); }
.app-nav-item.active {
  color: var(--text); background: rgba(255, 255, 255, .09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .055);
}
.nav-icon { color: var(--accent); font-size: 11px; line-height: 1; }
.nav-account { gap: 10px; }
.minutes-button, .logout-button {
  padding: 7px 11px; background: transparent; color: var(--muted);
  border-color: transparent; font-size: 11.5px; font-weight: 500;
}
.minutes-button {
  color: #cbb6ff; border-color: rgba(177, 140, 255, .25);
  background: rgba(177, 140, 255, .07);
}
.minutes-button:hover { border-color: rgba(177, 140, 255, .5); background: var(--accent-soft); }
.logout-button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.user-chip-name {
  font-size: 12.5px; color: var(--muted); font-weight: 500;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding-left: 2px;
}
@media (max-width: 640px) { .user-chip-name { max-width: 96px; } }

/* ---------- boot + auth ---------- */
.boot-loading { display: grid; place-items: center; min-height: 60vh; }

.auth-wrap { position: relative; max-width: 400px; margin: 7vh auto 0; text-align: center; }
.auth-wrap .hero-glow { height: 300px; opacity: 0.4; }
.auth-title {
  font-family: var(--font-display);
  font-weight: 700; font-size: 34px; letter-spacing: 0.14em; margin: 6px 0 12px;
}
.auth-logo { display: block; width: 186px; height: auto; margin: 8px auto 18px; }
/* .auth-title .dot shares the wordmark's live-dot treatment (see top bar) */
.auth-sub { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 28px; }
.auth-form { text-align: left; }
.auth-form label { margin-bottom: 16px; }

.password-wrap { position: relative; display: block; }
.pass-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  padding: 5px 12px; font-size: 12px; font-weight: 500;
  background: transparent; color: var(--muted); border: none; border-radius: 8px;
}
.pass-toggle:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
/* keep the typed password clear of the toggle */
.password-wrap input { padding-right: 64px; }

.field-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--faint); }
.auth-form .error { margin: 2px 0 16px; }
.auth-form button.primary.big { width: 100%; padding: 14px 24px; }
.auth-managed button.primary.big { width: 100%; padding: 14px 24px; }
.auth-managed .field-hint { display: block; margin: 10px 0 0; text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.wallet-switch { display: flex; gap: 8px; margin: 18px 0; }
.wallet-switch button.active { border-color: var(--accent); color: var(--text); background: rgba(107, 92, 255, .12); }
.workspace-controls { display: flex; align-items: center; gap: 6px; }
.workspace-controls select { width: auto; max-width: 180px; min-height: 34px; padding: 6px 28px 6px 10px; font-size: 12px; }
.auth-toggle { margin-top: 22px; font-size: 13px; color: var(--muted); }
.linklike {
  background: none; border: none; padding: 0; margin-left: 4px;
  color: var(--accent); font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; border-radius: 4px;
}
.linklike:hover { filter: brightness(1.15); }

/* ---------- screens ---------- */
.screen { display: none; max-width: 1080px; margin: 0 auto; padding: 28px 32px 56px; }
/* fade only — a transform here would re-anchor sticky/fixed descendants and
   trips Chromium compositor bugs with backdrop-filter children */
.screen.active { display: block; animation: fade-in 0.25s ease; }

/* ---------- Product → buyer practice library ---------- */
#screen-builder {
  max-width: 1460px;
}
#screen-builder.active {
  display: grid;
  grid-template-columns: 272px minmax(0, 1080px);
  align-items: start;
  gap: 30px;
}
.practice-main { min-width: 0; }
.product-library {
  position: sticky; top: 92px;
  max-height: calc(100vh - 112px); overflow-y: auto;
  padding: 18px 14px 16px;
  border: 1px solid var(--border); border-radius: 18px;
  background: rgba(10, 10, 13, .92);
}
.product-library-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.product-library-head .overline { margin-bottom: 5px; color: var(--faint); }
.product-library-head h2 { font: 600 22px var(--font-display); letter-spacing: -.03em; }
.library-collapse { min-width: 32px; padding: 5px 9px; font-size: 19px; line-height: 1; }
.product-library-help {
  margin: 12px 2px 14px; color: var(--muted); font-size: 11.5px; line-height: 1.5;
}
.product-new-button {
  width: 100%; padding: 10px 12px; margin-bottom: 12px;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(177, 140, 255, .3); border-radius: 10px;
  text-align: left; font: 600 11.5px var(--font-body);
}
.product-library-list { display: grid; gap: 6px; }
.library-product {
  border: 1px solid transparent; border-radius: 12px; overflow: hidden;
}
.library-product.open, .library-product.active {
  border-color: var(--border); background: rgba(255, 255, 255, .025);
}
.library-product-button, .library-buyer-button {
  display: flex; align-items: center; width: 100%; color: var(--text);
  background: transparent; border: 0; border-radius: 0; text-align: left;
}
.library-product-heading { display: flex; align-items: center; gap: 2px; }
.library-product-button { flex: 1; min-width: 0; justify-content: space-between; gap: 10px; padding: 10px; }
.library-add-buyer {
  display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px;
  margin-right: 6px; padding: 0; border: 1px solid var(--border); border-radius: 8px;
  color: var(--accent); background: transparent; font-size: 18px; line-height: 1;
}
.library-add-buyer:hover { background: var(--accent-soft); border-color: rgba(177, 140, 255, .45); }
.library-product-button:hover, .library-buyer-button:hover { background: rgba(255, 255, 255, .045); }
.library-product-button strong {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 12.5px var(--font-display);
}
.library-product-button span { flex-shrink: 0; color: var(--faint); font-size: 10px; }
.library-buyers { display: none; padding: 0 5px 6px; }
.library-product.open .library-buyers { display: grid; gap: 3px; }
.library-buyer-button {
  gap: 9px; padding: 8px 9px; color: var(--muted); font-size: 11.5px; line-height: 1.35;
}
.library-buyer-button::before {
  content: ''; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%;
  background: var(--faint);
}
.library-buyer-button.selected { color: var(--text); background: var(--accent-soft); }
.library-buyer-button.selected::before { background: var(--accent); box-shadow: 0 0 8px rgba(177, 140, 255, .65); }
.product-library-label {
  margin: 20px 3px 8px; color: var(--faint);
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .14em;
}
.product-library-empty { padding: 12px 4px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.library-starters { padding-top: 2px; }
.library-mobile-toggle { display: none; margin: 4px 0 0; }
body.library-collapsed #screen-builder.active { grid-template-columns: 64px minmax(0, 1080px); }
body.library-collapsed .product-library { padding-inline: 9px; overflow: hidden; }
body.library-collapsed .product-library-head > div,
body.library-collapsed .product-library-help,
body.library-collapsed .product-new-button,
body.library-collapsed .product-library-list,
body.library-collapsed .product-library-empty,
body.library-collapsed .library-starters { display: none; }
body.library-collapsed .product-library-head { justify-content: center; }
body.library-collapsed .library-collapse { transform: rotate(180deg); }

.overline {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.24em;
  color: var(--muted); margin-bottom: 14px;
}
.overline.num { color: var(--faint); margin: 42px 0 18px; }
.overline.num::first-letter { color: var(--accent); }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 40px); font-weight: 600; letter-spacing: -0.03em;
  margin-bottom: 32px; max-width: 640px;
}
.page-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 28px;
  margin: 28px 0 8px;
}
.page-heading .page-title { margin-bottom: 20px; }
.page-heading-actions {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px;
}
.page-back {
  flex-shrink: 0; padding: 8px 13px;
  background: transparent; color: var(--muted); border-color: var(--border);
  font-size: 12px; font-weight: 500;
}
.page-back:hover { color: var(--text); border-color: var(--border-hi); background: rgba(255, 255, 255, .035); }
#screen-debrief > .page-back { margin: 20px 0 18px; }

/* ---------- hero ---------- */
/* compact: VELA is a tool used daily, not a landing page — the scenario
   builder should be reachable without a full viewport of scrolling */
.hero { position: relative; text-align: center; padding: 46px 0 14px; }
.hero .overline { color: var(--faint); }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 600; line-height: 1.02; letter-spacing: -0.04em;
  margin: 6px 0 18px;
}
.hero .grad {
  background: linear-gradient(180deg, #d9d9e3 10%, #4d4d58 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub {
  max-width: 560px; margin: 0 auto; color: var(--muted);
  font-size: 15px; line-height: 1.6;
}
.hero-glow {
  position: absolute; inset: -40px 0 auto; height: 420px; z-index: -1;
  pointer-events: none; filter: blur(80px); opacity: 0.5;
  background:
    radial-gradient(340px 220px at 38% 30%, rgba(124, 90, 255, 0.5), transparent 70%),
    radial-gradient(300px 200px at 62% 24%, rgba(60, 140, 255, 0.35), transparent 70%),
    radial-gradient(260px 180px at 50% 60%, rgba(255, 105, 200, 0.18), transparent 70%);
  animation: hero-drift 16s ease-in-out infinite alternate;
}
@keyframes hero-drift {
  from { transform: translateX(-30px) scale(1); }
  to { transform: translateX(30px) scale(1.12); }
}

/* returning users (any call in history) get a working tool, not a poster:
   one-line greeting, presets above the fold */
body.returning .hero { padding: 26px 0 4px; }
body.returning .hero h1 { font-size: clamp(24px, 3vw, 34px); }
body.returning .hero h1 br { display: none; }
body.returning .hero .sub, body.returning .hero .overline { display: none; }
body.returning .hero-glow { opacity: 0.28; height: 260px; }

/* one-time onboarding card for fresh accounts */
.first-call-hint {
  display: flex; align-items: center; gap: 18px; justify-content: space-between;
  margin: 6px 0 26px; padding: 16px 20px;
  background: var(--accent-soft); border: 1px solid rgba(177, 140, 255, 0.35);
  border-radius: var(--radius);
}
.first-call-hint p { font-size: 13.5px; line-height: 1.6; color: var(--text); }
.first-call-hint strong { font-weight: 600; }
.first-call-hint em { font-style: normal; color: var(--accent); }
.first-call-hint button { flex-shrink: 0; }

/* ---------- context → practice-set studio ---------- */
.context-studio {
  position: relative; display: grid; grid-template-columns: 82px 1fr; gap: 24px;
  margin: 28px 0 40px; padding: 28px;
  border: 1px solid transparent; border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(17, 16, 24, .98), rgba(10, 10, 14, .98)) padding-box,
    linear-gradient(135deg, rgba(125, 216, 255, .42), rgba(177, 140, 255, .55) 48%, rgba(255, 128, 111, .28)) border-box;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32), 0 10px 38px rgba(124, 90, 255, .08);
  overflow: hidden;
}
.context-disclosure {
  margin-top: 22px; border: 1px solid var(--border); border-radius: 18px;
  background: rgba(12, 12, 16, .55); overflow: hidden;
}
.context-disclosure > summary {
  cursor: pointer; padding: 17px 20px; color: var(--muted); font-size: 13px;
  font-weight: 600; letter-spacing: .01em;
}
.context-disclosure[open] > summary { border-bottom: 1px solid var(--border); }
.context-disclosure .context-studio { margin: 0; border: 0; border-radius: 0; }
.context-studio::after {
  content: ''; position: absolute; width: 340px; height: 220px; right: -130px; top: -130px;
  border-radius: 50%; background: rgba(177, 140, 255, .12); filter: blur(58px); pointer-events: none;
}
.context-studio-mark {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 72px; height: 72px; border-radius: 22px;
  background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}
.context-studio-mark img { width: 50px; height: 50px; }
.context-studio-body { position: relative; z-index: 1; min-width: 0; }
.context-studio-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.context-studio-head .overline { color: #a9a3b7; margin-bottom: 8px; }
.context-studio h2 {
  font: 600 clamp(22px, 3vw, 30px)/1.12 var(--font-display);
  letter-spacing: -.03em; max-width: 650px;
}
.context-ai-badge {
  flex-shrink: 0; padding: 6px 11px; border: 1px solid rgba(177, 140, 255, .32);
  border-radius: 999px; color: #cbb6ff; background: rgba(177, 140, 255, .08);
  font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em;
}
.context-lede { color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 760px; margin: 14px 0 20px; }
.context-lede strong { color: var(--text); font-weight: 600; }
.context-input-label { color: var(--text); font-weight: 600; margin-bottom: 0; }
#scenario-source {
  min-height: 152px; margin-top: 9px; padding: 16px 17px; line-height: 1.58;
  border-radius: 15px; background: rgba(4, 4, 7, .72); border-color: rgba(255, 255, 255, .1);
}
#scenario-source::placeholder { color: #5e5a67; }
.context-patterns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.context-patterns span {
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02); color: #777381; font-size: 10.5px;
}
.context-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.context-generate { padding: 12px 24px; }
.context-count { margin-left: auto; color: var(--faint); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.context-privacy { color: var(--faint); font-size: 10.5px; line-height: 1.5; margin-top: 14px; }

.generator-status {
  display: flex; align-items: center; gap: 13px; margin-top: 18px; padding: 13px 15px;
  border: 1px solid rgba(177, 140, 255, .22); border-radius: 14px;
  background: rgba(177, 140, 255, .055);
}
.generator-status strong, .generator-status span { display: block; }
.generator-status strong { font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }
.generator-status div span { color: var(--muted); font-size: 11.5px; }
.generator-orbit {
  flex-shrink: 0; width: 25px; height: 25px; border-radius: 50%;
  border: 2px solid rgba(177, 140, 255, .2); border-top-color: var(--accent); border-right-color: var(--coral);
  animation: generator-spin .9s linear infinite;
}
@keyframes generator-spin { to { transform: rotate(360deg); } }
#generator-error { margin-top: 14px; }

.generated-set {
  margin-bottom: 34px; padding: 22px; border-radius: 20px;
  background: linear-gradient(145deg, rgba(177, 140, 255, .075), rgba(255, 128, 111, .025));
  border: 1px solid rgba(177, 140, 255, .24);
}
.generated-set-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.generated-kicker, .preset-library-label {
  color: var(--accent); font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .17em;
}
.generated-set h3 { margin-top: 5px; font: 600 21px/1.2 var(--font-display); letter-spacing: -.02em; }
.generated-count { color: var(--muted); font-size: 11px; }
.generated-set-note { max-width: 760px; margin: 10px 0 18px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.generated-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.preset-library-label { color: var(--faint); margin: 0 0 13px; }
.preset-card.generated { position: relative; background: linear-gradient(145deg, #121019, #0d0d12); }
.preset-card.generated::after {
  content: 'Yours'; position: absolute; top: 14px; right: 14px;
  color: #cbb6ff; font-size: 8.5px; text-transform: uppercase; letter-spacing: .13em;
}
.preset-card.generated h4 { padding-right: 46px; }

@media (max-width: 800px) {
  .context-studio { grid-template-columns: 1fr; gap: 16px; padding: 22px; }
  .context-studio-mark { width: 58px; height: 58px; border-radius: 18px; }
  .context-studio-mark img { width: 40px; height: 40px; }
  .generated-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body.returning .hero { padding: 18px 0 0; }
  .context-studio { margin-top: 16px; padding: 17px; border-radius: 20px; gap: 12px; }
  .context-studio-mark { width: 50px; height: 50px; border-radius: 16px; }
  .context-studio-mark img { width: 35px; height: 35px; }
  .context-studio-head { display: block; }
  .context-ai-badge { display: inline-block; margin-top: 12px; }
  .context-lede { margin: 12px 0 15px; font-size: 13.5px; line-height: 1.58; }
  #scenario-source { min-height: 112px; padding: 13px 14px; }
  .context-patterns span:last-child { display: none; }
  .context-actions { align-items: stretch; }
  .context-actions button { width: 100%; }
  .context-count { width: 100%; margin-left: 0; text-align: right; }
  .generated-set { padding: 17px; }
}

/* ---------- presets ---------- */
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
#preset-grid { grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); }
.preset-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; cursor: pointer; text-align: left; color: var(--text); font: inherit;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}
.preset-card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.preset-card.selected {
  border-color: transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--irid) border-box;
}
.preset-card h4 { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.preset-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

.preset-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.preset-meta .chip {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
  color: var(--muted); border: 1px solid var(--border-hi); border-radius: 999px; padding: 3px 10px;
}
.preset-meta .dots { display: inline-flex; gap: 4px; margin-left: auto; }
.preset-meta .dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--border-hi);
}
.preset-meta .dots i.on { background: var(--accent); }

@media (max-width: 640px) {
  /* Five full-width cards created a long corridor before the call action.
     A snap row keeps comparison tactile and leaves the next buyer peeking in. */
  .presets { overflow: hidden; }
  .preset-grid, .generated-grid {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 12px; padding: 2px 18px 10px 0; scrollbar-width: none;
  }
  .preset-grid::-webkit-scrollbar, .generated-grid::-webkit-scrollbar { display: none; }
  .preset-card {
    flex: 0 0 min(80vw, 300px); scroll-snap-align: start;
  }
}

/* ---------- form ---------- */
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px) { .form-columns { grid-template-columns: 1fr; } }

fieldset {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px 12px; background: var(--panel); min-width: 0;
}
legend {
  padding: 0 10px; margin-left: -4px;
  font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.2em;
}
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
label small { color: var(--faint); }

input, textarea, select {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  background: #0a0a0d; color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: rgba(177, 140, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(177, 140, 255, 0.12);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row > .full-control { grid-column: 1 / -1; }

/* The selected preset is ready to call. Keep the exhaustive editor available
   without making every rep read through it before each practice session. */
.scenario-details {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(255, 255, 255, .015); overflow: hidden;
}
.scenario-details > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 18px 20px; cursor: pointer; list-style: none; color: var(--text);
}
.scenario-details > summary::-webkit-details-marker { display: none; }
.scenario-details > summary span { display: grid; gap: 4px; }
.scenario-details > summary strong { font-size: 14px; font-weight: 600; }
.scenario-details > summary small { color: var(--muted); font-size: 11.5px; }
.scenario-details > summary::after {
  content: 'Edit'; flex-shrink: 0; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border-hi); color: var(--muted); font-size: 11px;
}
.scenario-details[open] > summary { border-bottom: 1px solid var(--border); }
.scenario-details[open] > summary::after { content: 'Hide'; }
.scenario-details > .form-columns { padding: 20px 20px 0; }
.scenario-details > .spoiler { margin: 20px; }

/* buyer job title: select drives the payload input directly; Custom… reveals
   the free-text field right below it, same field rhythm as the rest of the form */
#f-buyer-title-custom-wrap { margin-top: -6px; }

/* follow-up-potential slider — dark cockpit track + thumb, no light-mode variant (app is
   dark-only). accent-color covers Firefox's native rendering; the pseudo-element
   rules give Chromium/Safari a matching hand-built thumb instead of the OS default. */
input[type="range"] {
  padding: 0; margin-top: 14px; accent-color: var(--accent);
  width: 100%; height: 4px; cursor: pointer; background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 999px; background: var(--border-hi);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; margin-top: -6px;
  width: 16px; height: 16px; border-radius: 50%; cursor: pointer;
  background: var(--accent); border: 2px solid #0a0a0d;
  box-shadow: 0 0 0 3px rgba(177, 140, 255, 0.14);
  transition: box-shadow 0.15s, transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.1); }
input[type="range"]::-moz-range-track {
  height: 4px; border-radius: 999px; background: var(--border-hi);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; cursor: pointer;
  background: var(--accent); border: 2px solid #0a0a0d;
  box-shadow: 0 0 0 3px rgba(177, 140, 255, 0.14);
}
input[type="range"]:focus-visible::-webkit-slider-thumb,
input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(177, 140, 255, 0.3);
}
.close-potential-badge {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #0a0a0d; font-size: 12px; font-weight: 700; margin-left: 6px;
}
.close-potential-name { color: var(--text); font-size: 12px; margin-left: 8px; letter-spacing: 0.02em; }

.spoiler {
  margin: 22px 0 0; border: 1px dashed rgba(232, 180, 90, 0.4);
  border-radius: var(--radius); padding: 16px 20px; background: rgba(232, 180, 90, 0.03);
}
.spoiler summary { cursor: pointer; color: var(--warn); font-size: 13.5px; }
.spoiler summary strong { font-weight: 600; }
.spoiler[open] summary { margin-bottom: 18px; }

/* ---------- buttons ---------- */
button {
  cursor: pointer; font: inherit; font-weight: 600;
  border-radius: 999px; border: 1px solid transparent; padding: 11px 24px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s, filter 0.15s;
}
button.primary { background: #fff; color: #08080a; }
button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(177, 140, 255, 0.35), 0 2px 10px rgba(0, 0, 0, 0.5);
}
button.big { font-size: 16px; padding: 16px 44px; letter-spacing: 0.01em; }
button.ghost { background: transparent; color: var(--text); border-color: var(--border-hi); }
button.ghost:hover { border-color: #4a4a56; background: rgba(255, 255, 255, 0.04); }
button.sm { padding: 7px 16px; font-size: 13px; font-weight: 500; }
button.danger { background: var(--bad); color: #fff; }
button.danger:hover { filter: brightness(1.12); box-shadow: 0 4px 24px rgba(255, 90, 90, 0.35); }
button:active:not(:disabled) { transform: scale(0.985); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.dial-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; margin-top: 42px; }
.dial-row.column { flex-direction: column; gap: 10px; }
/* The detail editor is collapsed by default, so the call action sits directly
   beneath it. Keeping this panel static prevents it covering nearby controls. */
.scenario-form .dial-row.column {
  position: static; z-index: 1;
  margin-top: 14px; padding: 16px 26px;
  background: rgba(13, 13, 18, 0.97);
  border: 1px solid var(--border-hi); border-radius: 24px;
}
.dial-hint { font-size: 12px; color: var(--faint); letter-spacing: 0.04em; }

.practice-launch {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  margin-bottom: 14px; padding: 18px 20px;
  border: 1px solid rgba(177, 140, 255, .36); border-radius: 20px;
  background: linear-gradient(135deg, rgba(177, 140, 255, .12), rgba(10, 10, 13, .98) 58%);
}
.practice-launch-copy { min-width: 0; }
.practice-launch-copy .overline { margin-bottom: 5px; color: var(--accent); }
.practice-launch-copy strong {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 19px/1.25 var(--font-display);
}
.practice-launch-copy > span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.practice-launch .big { flex-shrink: 0; }

/* ---------- recording opt-out (privacy P1: default ON, per-call toggle) ---------- */
.record-toggle {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  margin: 0; font-size: 13px; color: var(--text); user-select: none;
}
/* native checkbox stays in the accessibility tree (focusable, announces
   checked state); only its pixels are replaced by the switch */
.record-toggle input {
  position: absolute; width: 1px; height: 1px; margin: 0;
  opacity: 0; pointer-events: none;
}
.record-toggle .switch {
  flex-shrink: 0; position: relative; width: 34px; height: 20px;
  border-radius: 999px; background: var(--border-hi);
  transition: background 0.18s;
}
.record-toggle .switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%; background: #d9d9e0;
  transition: transform 0.18s, background 0.18s;
}
.record-toggle input:checked + .switch { background: var(--accent); }
.record-toggle input:checked + .switch::after { transform: translateX(14px); background: #0a0a0d; }
.record-toggle input:focus-visible + .switch {
  outline: 2px solid rgba(177, 140, 255, 0.8); outline-offset: 2px;
}
.record-note { font-size: 11.5px; color: var(--faint); letter-spacing: 0.03em; margin-top: -4px; }
.active-assignment-note {
  color: var(--accent); font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid rgba(177, 140, 255, .3);
}

/* Rep-visible preparation stays outside the classified persona brief. */
.account-brief-card {
  margin-top: 18px; padding: 22px;
  border: 1px solid rgba(125, 216, 255, .26); border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(125, 216, 255, .06), rgba(13, 13, 17, .96) 45%);
}
.account-brief-details > summary { cursor: pointer; list-style: none; }
.account-brief-details > summary::-webkit-details-marker { display: none; }
.account-brief-summary-meta { display: flex; align-items: center; gap: 9px; }
.account-brief-summary-meta small { color: #9ddffc; font-size: 11px; white-space: nowrap; }
.account-brief-details[open] .account-brief-summary-meta small { font-size: 0; }
.account-brief-details[open] .account-brief-summary-meta small::after { content: 'Close'; font-size: 11px; }
.account-brief-body { padding-top: 1px; }
.account-brief-heading {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px;
}
.account-brief-heading .overline { margin-bottom: 5px; color: #8aaebe; }
.account-brief-heading h3 { font: 600 20px var(--font-display); }
.brief-freshness {
  flex-shrink: 0; color: var(--muted); font-size: 10px;
  border: 1px solid var(--border-hi); border-radius: 999px; padding: 5px 9px;
}
.account-brief-intro, .call-brief-boundary {
  margin: 10px 0 17px; color: var(--muted); font-size: 12.5px; line-height: 1.55;
}
.account-brief-content { display: grid; gap: 15px; }
.brief-section h4 {
  margin-bottom: 6px; color: #b7cbd4; font-size: 9.5px;
  text-transform: uppercase; letter-spacing: .16em;
}
.brief-section p, .brief-section li { color: var(--text); font-size: 12.5px; line-height: 1.55; }
.brief-section ul { padding-left: 17px; display: grid; gap: 5px; }
.brief-section .brief-empty { color: var(--faint); font-style: italic; }
.brief-research-text {
  white-space: pre-wrap; color: #dedee5; font-size: 12px; line-height: 1.65;
}
.brief-research-text a {
  color: #9ddffc; text-decoration: underline; text-underline-offset: 2px;
}
.account-brief-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.account-brief-actions button { min-width: 190px; }
#account-brief-error { margin-top: 14px; }

.error {
  color: #ff9a9a; font-size: 13.5px;
  background: rgba(255, 90, 90, 0.08); border: 1px solid rgba(255, 90, 90, 0.35);
  border-radius: 12px; padding: 10px 16px;
}
.error::before { content: '⚠ '; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ---------- call stage ---------- */
#screen-call.active { display: block; max-width: none; padding: 0; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.stage {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 40px 24px 48px;
  background: radial-gradient(1100px 720px at 50% 44%, #0b0b13 0%, #050506 62%);
}
body.in-call .stage { right: 390px; }

.stage-top { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.stage-status { display: flex; align-items: center; gap: 16px; }
.timer {
  font-variant-numeric: tabular-nums; font-size: 13px; letter-spacing: 0.18em; color: var(--muted);
}
.stage .avatar { display: none; } /* app.js fills initials; the orb is the face */
.stage-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px); font-weight: 500; letter-spacing: -0.02em;
  margin-top: 8px;
}
.stage-sub { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em; }
#call-buyer-company:not(:empty)::before { content: '·'; margin: 0 10px; color: var(--faint); }

.stage-orb { flex: 1; width: min(92vw, 880px); min-height: 0; position: relative; }
#orb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.stage-bottom { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.speak-hint {
  font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.22em;
  min-height: 26px; display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 14px; border-radius: 999px; transition: color 0.2s, background 0.2s;
}
/* live states get a quiet pill so the eye finds them without hunting */
.speak-hint:not(:empty) { background: rgba(255, 255, 255, 0.04); color: var(--muted); }
.speak-hint:not(:empty)::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--good); animation: speak-blink 1.1s ease-in-out infinite;
}
@keyframes speak-blink { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.stage-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; align-items: center; }
.stage-controls .danger { padding: 13px 34px; }
.call-brief-mobile-button { display: none; }

.call-account-brief {
  position: fixed; z-index: 52; top: 0; right: 0; bottom: 0; width: 390px;
  overflow-y: auto; padding: 30px 25px;
  background: rgba(10, 10, 14, .97); border-left: 1px solid var(--border);
}
.call-account-brief header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 20px;
}
.call-account-brief header .overline { margin-bottom: 5px; color: #8aaebe; }
.call-account-brief header h3 { font: 600 23px var(--font-display); }
.call-brief-close { display: none; }
.call-account-brief .brief-section { padding-bottom: 13px; border-bottom: 1px solid var(--border); }
.call-brief-boundary { margin-top: 20px; color: var(--faint); }

/* muted is a state you must be able to read across the room */
#btn-mute.muted {
  background: rgba(255, 90, 90, 0.16); color: #ff8a8a;
  border-color: rgba(255, 90, 90, 0.55);
  animation: muted-pulse 2.2s ease-in-out infinite;
}
@keyframes muted-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 90, 0); }
  50% { box-shadow: 0 0 0 5px rgba(255, 90, 90, 0.12); }
}

/* ending a call is irreversible — first click arms, second confirms */
#btn-hangup.confirm { background: #fff; color: var(--bad); font-weight: 700; }

.shortcut-hint { font-size: 10.5px; color: var(--faint); letter-spacing: 0.08em; }
.shortcut-hint kbd {
  font: 600 10px var(--font-body); color: var(--muted);
  border: 1px solid var(--border-hi); border-bottom-width: 2px; border-radius: 4px;
  padding: 1px 5px; margin-right: 2px;
}
@media (max-width: 640px), (pointer: coarse) { .shortcut-hint { display: none; } }
.engine-tag {
  position: absolute; bottom: 18px; right: 24px;
  font-size: 10px; color: #3d3d46; text-transform: uppercase; letter-spacing: 0.16em;
}

/* status pill */
.pill {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600;
  background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(177, 140, 255, 0.4);
}
.pill.live { background: rgba(74, 222, 128, 0.12); color: var(--good); border-color: rgba(74, 222, 128, 0.45); }
.pill.ended { background: rgba(255, 90, 90, 0.12); color: var(--bad); border-color: rgba(255, 90, 90, 0.45); }

/* recording indicator on the call stage — readable, quiet, unambiguous */
.pill.rec {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 90, 90, 0.1); color: #ff8a8a; border-color: rgba(255, 90, 90, 0.4);
}
.pill.rec::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--bad); animation: speak-blink 1.6s ease-in-out infinite;
}

/* ---------- transcript drawer ---------- */
.transcript-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
  width: min(420px, 94vw);
  display: flex; flex-direction: column;
  padding: 22px;
  background: rgba(9, 9, 13, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  transform: translateX(103%);
  transition: transform 0.35s cubic-bezier(0.22, 0.9, 0.24, 1);
}
.transcript-drawer.open { transform: none; }
.transcript-drawer header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px;
}
.transcript-drawer h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); font-weight: 600;
}

.transcript { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 6px; }
.transcript.static { max-height: 420px; }
.bubble { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; }
.bubble.user { align-self: flex-end; background: #ececf1; color: #0a0a0d; border-bottom-right-radius: 4px; }
.bubble.assistant { align-self: flex-start; background: #131318; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble .who { display: block; font-size: 9.5px; opacity: 0.65; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 4px; font-weight: 600; }
.bubble.interim { opacity: 0.6; }

/* ---------- debrief ---------- */
.judging { text-align: center; padding: 120px 0; }
.judging p { color: var(--muted); }
.spinner {
  width: 44px; height: 44px; margin: 0 auto 20px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#debrief-content > .overline { margin-top: 26px; }

.debrief-head { display: flex; gap: 32px; align-items: center; margin-bottom: 30px; }
@media (max-width: 640px) { .debrief-head { flex-direction: column; text-align: center; } }
.score-ring-wrap { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 7; }
.ring-fg {
  fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.1s cubic-bezier(0.3, 0.8, 0.3, 1);
}
.score-number {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 38px; font-weight: 700; letter-spacing: -0.03em;
}
.score-number small { font-size: 12px; color: var(--faint); font-weight: 400; letter-spacing: 0; }
.debrief-headline p { margin-top: 14px; font-size: 16px; line-height: 1.65; max-width: 640px; }
.debrief-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: -8px 0 28px 182px; }
.transcript-details > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  cursor: pointer; list-style: none;
}
.transcript-details > summary::-webkit-details-marker { display: none; }
.transcript-details > summary h3 { margin-bottom: 0; }
.transcript-details > summary span { color: var(--accent); font-size: 11px; }
.transcript-details[open] > summary { margin-bottom: 14px; }
.transcript-details[open] > summary span { font-size: 0; }
.transcript-details[open] > summary span::after { content: 'Close'; font-size: 11px; }

.journey-next {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin: 18px 0; padding: 22px;
  border: 1px solid rgba(177, 140, 255, .42); border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(177, 140, 255, .13), rgba(11, 11, 15, .96) 62%);
}
.journey-next h3 { margin: 4px 0 6px; font: 600 22px var(--font-display); }
.journey-next p:not(.overline) { color: var(--muted); font-size: 13px; line-height: 1.55; }
.journey-next-actions { display: flex; gap: 9px; flex-shrink: 0; }

.score-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 26px; }
.score-bar { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.score-bar .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.score-bar .value { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.score-bar .track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.score-bar .fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, #7dd8ff, var(--accent));
  transition: width 0.9s cubic-bezier(0.3, 0.8, 0.3, 1);
}
/* weak dimensions must jump out — color encodes the verdict */
.score-bar .fill.high { background: linear-gradient(90deg, #4ade80, #86efac); }
.score-bar .fill.low { background: linear-gradient(90deg, #ff5a5a, #ff9a7a); }
.score-bar.low .value { color: var(--bad); }
.score-bar.high .value { color: var(--good); }

.debrief-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 800px) { .debrief-columns { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin-bottom: 14px;
}
.card h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--muted); font-weight: 600; margin-bottom: 14px;
}
.card.good h3 { color: var(--good); }
.card.bad h3 { color: var(--bad); }
.card ul { padding-left: 18px; display: flex; flex-direction: column; gap: 9px; font-size: 14px; line-height: 1.55; }
.card ul li::marker { color: var(--faint); }
.card.drill {
  border-color: transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--irid) border-box;
}
.card.drill p { font-size: 15px; line-height: 1.65; }

.moment { border-left: 2px solid var(--faint); padding: 4px 16px; margin-bottom: 16px; }
.moment.good { border-color: var(--good); }
.moment.mistake { border-color: var(--bad); }
.moment.missed_opportunity { border-color: var(--warn); }
.moment .speaker { font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); font-weight: 600; }
.moment blockquote { font-style: italic; font-size: 14px; margin: 6px 0 4px; color: var(--text); }
.moment p { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ---------- history ---------- */
.history-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px;
  margin-bottom: 22px;
}
.history-filters {
  display: flex; justify-content: flex-end; margin: -4px 0 16px;
}
.history-filters label { width: min(280px, 100%); margin: 0; }
.history-stats .stat {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px;
}
.history-stats .stat .label {
  font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.history-stats .stat .value {
  font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em;
}
.history-stats .stat .value small { font-size: 12px; color: var(--faint); font-weight: 400; margin-left: 2px; }
.history-stats .stat .value.up { color: var(--good); }
.history-stats .stat .value.down { color: var(--bad); }

.skeleton-row {
  height: 74px; border-radius: var(--radius); margin-bottom: 10px;
  background: linear-gradient(100deg, var(--card) 40%, #16161c 50%, var(--card) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -80% 0; } }

.history-stats .stat.focus { border-color: rgba(232, 180, 90, 0.4); }
.history-stats .stat .value.dim { font-size: 17px; line-height: 1.3; }
.history-stats .stat .value.dim small { display: block; font-size: 11px; color: var(--warn); margin: 2px 0 0; }

.history-empty {
  max-width: 560px; padding: 24px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--card);
}
.history-empty strong { display: block; font: 600 18px/1.3 var(--font-display); margin-bottom: 7px; }
.history-empty p { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
#screen-history > .dial-row { justify-content: flex-start; margin-top: 18px; }

.history-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.history-row .history-item { margin-bottom: 0; flex: 1; min-width: 0; }
.history-del {
  flex-shrink: 0; width: 34px; height: 34px; padding: 0; border-radius: 50%;
  background: transparent; color: var(--faint); border: 1px solid transparent;
  font-size: 14px; font-weight: 400; opacity: 0;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}
.history-row:hover .history-del, .history-del:focus-visible { opacity: 1; }
.history-del:hover { color: var(--bad); border-color: rgba(255, 90, 90, 0.4); }
/* no hover on touch — the delete affordance must always be visible there */
@media (pointer: coarse) { .history-del { opacity: 1; } }

/* play control on rows that have a recording — always visible (it's the
   feature, not housekeeping like delete) */
.history-play {
  flex-shrink: 0; width: 34px; height: 34px; padding: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; color: var(--muted); border: 1px solid var(--border-hi);
  font-size: 12px; font-weight: 400;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.history-play:hover { color: var(--accent); border-color: rgba(177, 140, 255, 0.6); }
.history-play.open { color: var(--accent); border-color: rgba(177, 140, 255, 0.6); background: var(--accent-soft); }

/* inline player expanded under a history row */
.inline-player {
  margin: -4px 42px 10px 0; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px;
}
.inline-player audio { width: 100%; }
.inline-player .rec-missing { font-size: 13px; }

/* native audio controls should render for a dark page */
audio { color-scheme: dark; }
#d-recording-body audio { width: 100%; }
#d-recording-body .rec-partial-note { margin-top: 8px; font-size: 12.5px; }

.history-item {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 10px; cursor: pointer; width: 100%;
  color: var(--text); font: inherit; text-align: left; font-weight: 400;
  transition: border-color 0.15s, transform 0.15s;
}
.history-item:hover { border-color: var(--border-hi); transform: translateY(-1px); }
.history-item strong { font-family: var(--font-display); font-weight: 600; }
.history-item .score { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.history-item .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- assigned work + manager workspace ---------- */
.section-heading-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
}
.section-heading-row h2, .manager-card h3 {
  font-family: var(--font-display); letter-spacing: -0.02em;
}
.count-badge, .role-badge, .status-badge {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  border: 1px solid var(--border-hi); border-radius: 999px; padding: 4px 10px;
  color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
}
.status-badge.done { color: var(--good); border-color: rgba(74, 222, 128, .35); }
.status-badge.open { color: var(--accent); border-color: rgba(177, 140, 255, .4); }
.status-badge.overdue { color: var(--bad); border-color: rgba(255, 90, 90, .4); }

.assigned-work {
  margin: 18px 0 32px; padding: 22px;
  border: 1px solid rgba(177, 140, 255, .36); border-radius: 20px;
  background: linear-gradient(145deg, rgba(177, 140, 255, .1), rgba(10, 10, 13, .92) 55%);
}
.assigned-work h2 { font-size: 24px; }
.assignment-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 18px; }
.assignment-card {
  padding: 17px; border: 1px solid var(--border); border-radius: 14px; background: rgba(8, 8, 10, .72);
}
.assignment-card h3 { font: 600 16px var(--font-display); margin-bottom: 6px; }
.assignment-card .assignment-meta, .assignment-card .assignment-note { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.assignment-card .assignment-note { color: var(--text); margin: 10px 0; }
.assignment-card button { margin-top: 14px; width: 100%; }
.progress-track { height: 7px; border-radius: 999px; background: var(--border); overflow: hidden; margin: 12px 0 7px; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #7dd8ff); }

.manager-screen { max-width: 1220px; }
.manager-title-row { align-items: center; margin: 28px 0 8px; }
.manager-title-row .page-title { margin: 4px 0 8px; }
.team-getting-started {
  display: grid; grid-template-columns: minmax(220px, .85fr) minmax(420px, 1.5fr) auto;
  gap: 24px; align-items: center; margin: 24px 0 34px; padding: 24px;
  border: 1px solid rgba(177, 140, 255, .42); border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(177, 140, 255, .12), rgba(10, 10, 13, .96) 58%);
}
.team-getting-started h3 { margin: 4px 0 7px; font: 600 23px var(--font-display); }
.team-getting-started-copy > p:not(.overline) { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.team-setup-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px;
  list-style: none; margin: 0; padding: 0;
}
.team-setup-steps li {
  display: flex; gap: 9px; min-width: 0; padding: 11px;
  border: 1px solid var(--border); border-radius: 11px; background: rgba(7, 7, 10, .62);
}
.team-setup-steps li > span {
  display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font: 600 10px var(--font-display);
}
.team-setup-steps li strong { display: block; font: 600 11.5px var(--font-display); }
.team-setup-steps li small { display: block; margin-top: 3px; color: var(--faint); font-size: 9.5px; line-height: 1.35; }
.team-setup-steps li.done { border-color: rgba(74, 222, 128, .3); }
.team-setup-steps li.done > span { background: rgba(74, 222, 128, .13); color: var(--good); font-size: 0; }
.team-setup-steps li.done > span::after { content: '✓'; font-size: 11px; }
.manager-metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.manager-metric, .manager-card, .roster-card, .usage-panel, .coaching-signal {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.manager-metric { padding: 18px; }
.manager-metric .label { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.manager-metric .value { font: 700 28px var(--font-display); margin-top: 7px; }
.manager-metric .value small { font: 400 12px var(--font-body); color: var(--faint); }
.usage-panel { padding: 17px 20px; margin-top: 12px; }
.usage-copy { display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 12.5px; }
.usage-copy strong { color: var(--text); }
.usage-panel .progress-track { margin-bottom: 0; }
.coaching-signal { margin-top: 12px; padding: 18px 20px; border-color: rgba(232, 180, 90, .32); }
.coaching-signal strong { font-family: var(--font-display); }
.coaching-signal p { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.dimension-overview {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px;
  margin-top: 12px; padding: 18px 20px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.dimension-row { display: grid; grid-template-columns: minmax(120px, 1fr) 1.5fr 32px; gap: 10px; align-items: center; }
.dimension-row > span { color: var(--muted); font-size: 11.5px; }
.dimension-row .progress-track { margin: 0; }
.dimension-row > b { text-align: right; font: 600 12px var(--font-display); }

.manager-section { margin-top: 44px; }
.section-lede { margin-top: -5px; font-size: 13px; }
.roster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 12px; margin-top: 16px; }
.roster-card { padding: 17px; }
.roster-card.pending { border-style: dashed; }
.roster-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.roster-head strong { display: block; font-family: var(--font-display); }
.roster-email { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.roster-numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.roster-number { border-top: 1px solid var(--border); padding-top: 10px; }
.roster-number b { display: block; font: 600 18px var(--font-display); }
.roster-number span { color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.trend-up { color: var(--good); } .trend-down { color: var(--bad); }
.roster-actions { display: flex; gap: 8px; margin-top: 14px; }
.roster-actions button { flex: 1; }

.manager-actions-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 44px; }
.manager-card { padding: 22px; }
.manager-card h3 { font-size: 22px; margin: -5px 0 8px; }
.manager-card > .muted { font-size: 13px; line-height: 1.55; margin-bottom: 18px; }
.compact-form button[type="submit"] { width: 100%; margin-top: 4px; }
.invite-result { margin-top: 18px; padding: 15px; border-radius: 12px; background: rgba(74, 222, 128, .08); border: 1px solid rgba(74, 222, 128, .28); }
.invite-result p, .invite-result small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.invite-link-row { display: flex; gap: 8px; margin: 10px 0 7px; }
.invite-link-row input { margin: 0; min-width: 0; }
.invite-link-row button { flex-shrink: 0; }
.scenario-preview { padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.scenario-preview strong { color: var(--text); }
.quick-assignment { margin: 24px 0 34px; border-color: rgba(177, 140, 255, .34); }
.quick-assignment-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 16px;
}
.quick-assignment-heading h3 { margin: -5px 0 0; }
.quick-assignment-heading .scenario-preview { max-width: 520px; margin: 0; }
.quick-assignment-form {
  display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px;
}
.quick-assignment-form > label { margin: 0; }
.quick-assignment-form > button[type="submit"] { width: auto; min-width: 180px; margin: 0 0 1px; }
.assignment-customize { grid-column: 1 / -1; margin-top: 2px; }
.assignment-customize > summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.assignment-customize[open] > summary { margin-bottom: 12px; }
.assignment-customize-fields {
  padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: rgba(5, 5, 8, .4);
}

.assignment-table { margin-top: 16px; }
.assignment-row, .team-call-row {
  display: grid; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 13px;
}
.assignment-row { grid-template-columns: minmax(180px, 1.3fr) minmax(130px, 1fr) minmax(130px, .8fr) auto; }
.assignment-row strong, .team-call-row strong { font-family: var(--font-display); }
.assignment-row small, .team-call-row small { display: block; color: var(--muted); margin-top: 4px; }
.assignment-progress { min-width: 120px; }
.assignment-progress .progress-track { margin: 0 0 5px; }
.assignment-progress small { text-align: right; }
.assignment-cancel { padding: 6px 11px; color: var(--muted); }

.manager-filters {
  display: grid; grid-template-columns: 1.15fr 1.15fr .9fr .9fr 1.1fr auto; gap: 10px;
  align-items: end; margin: 16px 0;
}
.manager-filters label { margin: 0; }
.manager-filters button { margin-bottom: 1px; }
.team-call-row {
  width: 100%; grid-template-columns: minmax(170px, 1.2fr) minmax(170px, 1fr) minmax(120px, .8fr) 56px;
  text-align: left; color: var(--text); font: inherit; cursor: pointer;
}
.team-call-row:hover { border-color: var(--border-hi); }
.team-call-row .call-score { text-align: right; font: 700 22px var(--font-display); }
.empty-state { color: var(--muted); border: 1px dashed var(--border-hi); border-radius: var(--radius); padding: 24px; text-align: center; }

/* ---------- prepaid minute bundles ---------- */
.billing-screen { max-width: 1000px; padding-top: 56px; }
.billing-screen .page-title { margin-bottom: 12px; }
.billing-screen > .sub { max-width: 660px; margin: 0 0 28px; text-align: left; }
.bundle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.bundle-card { padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.bundle-card h3 { margin: 7px 0 2px; font: 600 23px var(--font-display); }
.bundle-price { display: block; margin: 12px 0; font: 700 34px var(--font-display); }
.bundle-card > p:not(.overline) { min-height: 42px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.bundle-card button { width: 100%; margin-top: 18px; }
.auto-top-up-card {
  margin-top: 18px; padding: 22px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.auto-top-up-heading {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
}
.auto-top-up-heading h3 { margin: 5px 0 6px; font: 600 22px var(--font-display); }
.auto-top-up-heading .muted { font-size: 12.5px; }
.switch-row {
  display: flex; align-items: center; gap: 9px; margin: 0; padding: 9px 12px;
  border: 1px solid var(--border-hi); border-radius: 999px; white-space: nowrap;
  color: var(--text); font-size: 12px;
}
.switch-row input { width: auto; margin: 0; accent-color: var(--accent); }
.auto-top-up-fields {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  margin-top: 20px;
}
.auto-top-up-fields label { margin: 0; }
.auto-top-up-consent {
  margin-top: 15px; color: var(--muted); font-size: 11.5px; line-height: 1.55;
}
.auto-top-up-actions {
  display: flex; align-items: center; gap: 14px; margin-top: 16px;
}
.auto-top-up-actions small { color: var(--muted); line-height: 1.45; }
.billing-activity { margin-top: 36px; }
#billing-activity-list { margin-top: 12px; }
.billing-activity-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 13px 2px;
  border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.billing-activity-row strong { display: block; font-family: var(--font-display); }
.billing-activity-row small { display: block; margin-top: 3px; color: var(--muted); }
.billing-activity-row > span { text-align: right; font-weight: 600; }

@media (max-width: 850px) {
  .brand-tag, .user-chip-name { display: none; }
  .nav-authed { width: auto; gap: 10px; }
  .journey-next { align-items: flex-start; flex-direction: column; }
  .journey-next-actions { width: 100%; flex-wrap: wrap; }
  .journey-next-actions button { flex: 1; }
  .team-getting-started { grid-template-columns: 1fr; }
  .team-setup-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manager-metrics { grid-template-columns: repeat(2, 1fr); }
  .dimension-overview, .bundle-grid { grid-template-columns: 1fr; }
  .manager-actions-grid { grid-template-columns: 1fr; }
  .manager-filters { grid-template-columns: repeat(2, 1fr); }
  .assignment-row { grid-template-columns: 1fr 1fr; }
  .auto-top-up-fields { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  #screen-builder.active { grid-template-columns: 224px minmax(0, 1fr); gap: 18px; }
}

@media (max-width: 820px) {
  #screen-builder.active { display: block; }
  .library-mobile-toggle { display: inline-flex; }
  .product-library {
    position: fixed; z-index: 70; top: 0; left: 0; bottom: 0;
    width: min(320px, 92vw); max-height: none; border-radius: 0;
    transform: translateX(-103%); transition: transform .25s ease;
    box-shadow: 30px 0 70px rgba(0, 0, 0, .55);
  }
  body.library-mobile-open .product-library { transform: none; }
  body.library-collapsed .product-library {
    width: min(320px, 92vw); padding: 18px 14px 16px; overflow-y: auto;
  }
  body.library-collapsed .product-library-head > div,
  body.library-collapsed .product-library-help,
  body.library-collapsed .product-new-button,
  body.library-collapsed .product-library-list,
  body.library-collapsed .product-library-empty,
  body.library-collapsed .library-starters { display: initial; }
  body.library-collapsed .product-library-list { display: grid; }
  body.library-collapsed .product-library-head { justify-content: space-between; }
  body.library-collapsed .library-collapse { transform: none; }
}

@media (max-width: 920px) {
  body.in-call .stage { right: 0; }
  .call-account-brief {
    z-index: 61; width: min(430px, 94vw);
    transform: translateX(103%);
    transition: transform .3s cubic-bezier(.22,.9,.24,1);
  }
  .call-account-brief.open { transform: none; }
  .call-brief-mobile-button, .call-brief-close { display: inline-flex; }
}
@media (max-width: 580px) {
  .section-heading-row { align-items: flex-start; }
  .manager-title-row { align-items: flex-start; }
  .manager-title-row { flex-direction: column; }
  .page-heading-actions { width: 100%; justify-content: space-between; }
  .manager-metrics, .manager-filters { grid-template-columns: 1fr; }
  .team-setup-steps { grid-template-columns: 1fr; }
  .assignment-row, .team-call-row { grid-template-columns: 1fr; }
  .team-call-row .call-score { text-align: left; }
  .auto-top-up-heading, .auto-top-up-actions { align-items: stretch; flex-direction: column; }
  .practice-launch { align-items: stretch; flex-direction: column; }
  .practice-launch .big { width: 100%; }
  .account-brief-heading { align-items: flex-start; flex-direction: column; }
  .account-brief-summary-meta { width: 100%; justify-content: space-between; }
  .debrief-actions { margin-left: 0; }
  .debrief-actions button { flex: 1 1 100%; }
  .quick-assignment-heading { flex-direction: column; }
  .quick-assignment-heading .scenario-preview { max-width: none; width: 100%; }
  .quick-assignment-form { grid-template-columns: 1fr; }
  .quick-assignment-form > button[type="submit"] { width: 100%; }
  .assignment-customize { grid-column: auto; }
}

/* ---------- public landing (logged-out default view) ---------- */
/* Same visual language as the cockpit: near-black stage, grotesque display
   type, white pill CTAs, iridescent accents. Server-rendered in index.html so
   crawlers see it without JS; app.js swaps to the app once a session resolves. */

/* logged-out header nav; hidden by app.js once authed, and on the auth view */
.nav-public { display: flex; align-items: center; gap: 12px; }
/* no public nav on the auth view (redundant) or the boot spinner (a returning
   user's header must not flash logged-out controls during the session check) */
body[data-screen="auth"] .nav-public, body[data-screen="boot"] .nav-public { display: none; }
.nav-public button { white-space: nowrap; }
/* small screens: the hero CTA is right below — the header keeps only Sign in */
@media (max-width: 640px) { #nav-invite { display: none; } }

.landing-hero {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
  align-items: center; gap: clamp(34px, 5vw, 66px);
  padding: 62px 0 42px; text-align: left;
}
.landing-hero-copy { position: relative; z-index: 1; }
.landing-hero h1 {
  font-size: clamp(38px, 5vw, 64px); max-width: 650px;
  margin-left: 0; margin-right: 0;
}
.landing-hero .sub { max-width: 590px; margin-left: 0; margin-right: 0; font-size: 16px; }
/* landing overlines must clear WCAG AA — --faint (2.75:1) stays app-only */
.landing .overline { color: var(--muted); }
.hero-cta {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: flex-start;
  margin-top: 32px;
}
.hero-note { margin-top: 16px; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

.hero-portrait {
  position: relative; min-height: 520px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .54), 0 16px 58px rgba(124, 90, 255, .14);
}
.hero-portrait::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 54%, rgba(5, 5, 8, .76) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
}
.hero-portrait img {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: 64% center;
  filter: saturate(.9) contrast(1.03);
}
.hero-portrait figcaption {
  position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px;
  display: flex; flex-direction: column; gap: 8px;
}
.portrait-live {
  display: flex; align-items: center; gap: 8px; color: #d9d6e5;
  font-size: 10px; text-transform: uppercase; letter-spacing: .16em;
}
.portrait-live i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--coral);
  box-shadow: 0 0 0 5px rgba(255, 128, 111, .13);
}
.hero-portrait strong {
  font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -.02em;
}

/* hero waveform — a CSS-only echo of the in-call orb's audio-reactive life.
   Two voices in one strip: violet/cyan bars (the rep), and a pink burst around
   bar 17 (the buyer, cutting in). Decorative, aria-hidden. */
.hero-wave {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 34px; margin-bottom: 20px;
}
.hero-wave i {
  width: 3px; border-radius: 2px; transform-origin: center;
  background: linear-gradient(180deg, #7dd8ff, var(--accent));
  animation: wave-pulse 2.8s ease-in-out infinite;
}
.hero-wave i:nth-child(8n+1) { height: 18%; animation-delay: 0s; }
.hero-wave i:nth-child(8n+2) { height: 34%; animation-delay: -0.35s; }
.hero-wave i:nth-child(8n+3) { height: 52%; animation-delay: -0.7s; }
.hero-wave i:nth-child(8n+4) { height: 78%; animation-delay: -1.05s; }
.hero-wave i:nth-child(8n+5) { height: 100%; animation-delay: -1.4s; }
.hero-wave i:nth-child(8n+6) { height: 68%; animation-delay: -1.75s; }
.hero-wave i:nth-child(8n+7) { height: 46%; animation-delay: -2.1s; }
.hero-wave i:nth-child(8n+8) { height: 28%; animation-delay: -2.45s; }
.hero-wave i:nth-child(n+16):nth-child(-n+20) {
  background: linear-gradient(180deg, #ff8cd1, var(--accent));
}
@keyframes wave-pulse {
  0%, 100% { transform: scaleY(0.5); opacity: 0.65; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- "hear it" vignette: three lines of a call, the barge-in drawn.
   Bubble grammar borrowed from the live-call transcript drawer, scoped here so
   the cockpit styles stay untouched. ---------- */
.landing-vignette { margin-top: 72px; display: flex; justify-content: center; }
.call-vignette {
  width: min(600px, 100%); margin: 0; position: relative;
  border: 1px solid transparent; border-radius: 20px;
  background:
    linear-gradient(180deg, #101017, #0b0b0f) padding-box,
    linear-gradient(165deg, rgba(177, 140, 255, 0.55), rgba(125, 216, 255, 0.22) 38%, #22222b 80%) border-box;
  padding: 18px 22px 20px;
  box-shadow: 0 30px 90px rgba(124, 90, 255, 0.12), 0 10px 34px rgba(0, 0, 0, 0.55);
}
.cv-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cv-persona {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted);
}
.cv-wave { display: inline-flex; align-items: center; gap: 3px; height: 16px; }
.cv-wave i {
  width: 2px; border-radius: 1px; transform-origin: center;
  background: linear-gradient(180deg, #7dd8ff, var(--accent));
  animation: wave-pulse 1.6s ease-in-out infinite;
}
.cv-wave i:nth-child(1) { height: 35%; animation-delay: -0.2s; }
.cv-wave i:nth-child(2) { height: 65%; animation-delay: -0.5s; }
.cv-wave i:nth-child(3) { height: 100%; animation-delay: -0.8s; }
.cv-wave i:nth-child(4) { height: 60%; animation-delay: -1.1s; }
.cv-wave i:nth-child(5) { height: 30%; animation-delay: -1.4s; }
.cv-lines { display: flex; flex-direction: column; }
.cv-line {
  max-width: 86%; padding: 10px 14px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.55;
}
.cv-line + .cv-line { margin-top: 10px; }
.cv-line.rep {
  align-self: flex-end; background: #ececf1; color: #0a0a0d;
  border-bottom-right-radius: 4px;
}
.cv-line.buyer {
  align-self: flex-start; background: #15151c; color: var(--text);
  border: 1px solid rgba(177, 140, 255, 0.4); border-bottom-left-radius: 4px;
  position: relative; margin-left: 4px;
  /* the barge-in: the buyer's bubble lands ON the rep's unfinished sentence */
  margin-top: -12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}
.cv-who {
  display: block; font-size: 9.5px; opacity: 0.65; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 4px;
}
.cv-line.buyer .cv-who { color: var(--accent); opacity: 1; }
.cv-caption {
  margin-top: 18px; text-align: right;
  font-family: var(--font-display); font-size: 15.5px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--text);
}

.landing-section { margin-top: 92px; }
.landing-num { margin: 0 0 26px; }

/* feature rows: big index number gutter, display-type heading, prose */
.landing-features { margin-top: 72px; }
.feature {
  position: relative;
  display: grid; grid-template-columns: 96px 1fr; gap: 20px;
  padding: 38px 0; border-top: 1px solid var(--border);
}
.feature:last-child { border-bottom: 1px solid var(--border); }
/* each row starts with a violet hairline fading into the shared border */
.feature::before {
  content: ''; position: absolute; top: -1px; left: 0; width: 96px; height: 1px;
  background: linear-gradient(90deg, rgba(177, 140, 255, 0.6), transparent);
}
/* editorial ghost numerals: large, gradient-faded — an index, not a badge */
.feature-num {
  font-family: var(--font-display); font-size: clamp(34px, 4vw, 48px); font-weight: 700;
  line-height: 1; letter-spacing: 0.02em; padding-top: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(177, 140, 255, 0.22) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.feature h2 {
  font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 27px);
  font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px;
}
.feature p { font-size: 14.5px; line-height: 1.7; color: var(--muted); max-width: 720px; }
@media (max-width: 640px) {
  .feature { grid-template-columns: 1fr; gap: 6px; padding: 30px 0; }
  .feature-num { padding-top: 0; }
}

.care-story {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  align-items: center; gap: clamp(34px, 6vw, 72px);
}
.care-photo {
  position: relative; min-height: 470px; overflow: hidden; border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, .09); background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
}
.care-photo::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, transparent 60%, rgba(177, 140, 255, .14));
}
.care-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 58% center; filter: saturate(.88) contrast(1.02);
}
.care-copy h2 {
  font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.08; letter-spacing: -.035em; font-weight: 600; margin-bottom: 20px;
}
.care-copy > p:not(.overline) { color: var(--muted); font-size: 14.5px; line-height: 1.72; }
.care-points { list-style: none; display: grid; gap: 17px; margin-top: 26px; }
.care-points li { display: grid; gap: 4px; padding-left: 18px; position: relative; }
.care-points li::before {
  content: ''; position: absolute; left: 0; top: 7px; width: 7px; height: 7px;
  border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--coral));
}
.care-points strong { font-size: 13.5px; font-weight: 600; }
.care-points span { color: var(--muted); font-size: 13px; line-height: 1.55; }

@media (max-width: 820px) {
  .care-story { grid-template-columns: 1fr; }
  .care-photo { min-height: 420px; }
}

/* how it works: three step cards, same card grammar as the presets; a faint
   iridescent thread runs behind the row, surfacing in the gaps between cards */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps::before {
  content: ''; position: absolute; top: 38px; left: 32px; right: 32px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(177, 140, 255, 0.4), rgba(125, 216, 255, 0.35), transparent);
}
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } .steps::before { display: none; } }
.step-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform 0.18s, border-color 0.18s;
}
.step-card:hover { transform: translateY(-3px); border-color: var(--border-hi); }
.step-num {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--irid) border-box;
  border: 1px solid transparent;
  color: var(--text); font-family: var(--font-display); font-size: 13px; font-weight: 700;
  margin-bottom: 14px;
}
.step-card h3 {
  font-family: var(--font-display); font-size: 16px; font-weight: 600;
  letter-spacing: -0.01em; margin-bottom: 8px;
}
.step-card p { font-size: 13.5px; line-height: 1.65; color: var(--muted); }

/* languages: centered statement */
.languages { text-align: center; }
.languages h2 {
  font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 600; letter-spacing: -0.03em; margin-bottom: 14px;
}
.lang-lede { font-size: 15px; color: var(--text); margin-bottom: 14px; }
.lang-body { max-width: 640px; margin: 0 auto; font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.lang-body strong { color: var(--text); font-weight: 600; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.lang-chips .chip {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
  color: var(--muted); border: 1px solid var(--border-hi); border-radius: 999px; padding: 6px 16px;
  transition: border-color 0.18s, color 0.18s;
}
.lang-chips .chip:hover { border-color: rgba(177, 140, 255, 0.55); color: var(--text); }

/* FAQ: card-styled disclosure rows — real content in the HTML, crawlable */
.faq-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 10px;
  transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--border-hi); }
.faq-item[open] { border-color: rgba(177, 140, 255, 0.4); }
.faq-item summary {
  cursor: pointer; font-family: var(--font-display); font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em; list-style: none; position: relative; padding-right: 30px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 18px; font-weight: 400; transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item[open] summary { margin-bottom: 12px; }
.faq-item p { font-size: 14px; line-height: 1.7; color: var(--muted); }

/* final CTA + invite form */
.invite-cta { position: relative; text-align: center; padding-top: 30px; }
.invite-cta .hero-glow { height: 320px; opacity: 0.35; }
.invite-cta h2 {
  font-family: var(--font-display); font-size: clamp(26px, 3.8vw, 42px);
  font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 14px;
}
.invite-cta .sub { color: var(--muted); font-size: 14.5px; }
.invite-form {
  max-width: 420px; margin: 30px auto 0; text-align: left;
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  padding: 24px 24px 22px;
}
.invite-form label { margin-bottom: 16px; }
.invite-form .error { margin: 2px 0 16px; }
.invite-form button.primary.big { width: 100%; padding: 14px 24px; }
.invite-success {
  max-width: 400px; margin: 30px auto 0; padding: 16px 20px;
  background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: var(--radius); color: var(--good); font-size: 14.5px; font-weight: 500;
}

.landing-foot {
  margin-top: 96px; padding-top: 28px; border-top: 1px solid var(--border);
  overflow: hidden; /* the watermark bleeds off the bottom edge, clipped here */
}
.foot-row {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  align-items: baseline; justify-content: space-between;
}
.landing-foot .brand-logo { width: 104px; }
.foot-row p { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
/* quiet brand presence: a huge, near-invisible logotype sinking below the
   fold — the only vivid thing left is the dot */
.foot-watermark {
  font-family: var(--font-display); font-weight: 700; line-height: 1;
  white-space: nowrap; text-align: center; user-select: none;
  font-size: clamp(56px, 14vw, 150px); letter-spacing: 0.06em;
  margin: 44px 0 -0.3em;
  background: linear-gradient(180deg, rgba(242, 242, 245, 0.09), rgba(242, 242, 245, 0) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.foot-watermark .dot {
  display: inline-block; width: 0.3em; height: 0.3em; margin-left: 0.1em;
  border-radius: 50%; overflow: hidden; color: transparent; letter-spacing: 0;
  background: var(--irid); opacity: 0.5;
}

/* auth view: quiet way back to the public landing */
.auth-back { margin-top: 12px; font-size: 12.5px; }
.auth-back .linklike { color: var(--muted); font-weight: 500; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .screen { padding: 20px 18px 100px; }
  .hero { padding-top: 56px; }
  .page-heading { flex-direction: column; gap: 2px; margin-top: 14px; }
  .page-heading .page-back { order: -1; margin-bottom: 18px; }
  .first-call-hint { flex-direction: column; align-items: flex-start; gap: 12px; }
  .stage { padding: 28px 16px 32px; }
  .stage-bottom { width: 100%; }
  .stage-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 360px); }
  .stage-controls button { justify-content: center; padding-left: 13px; padding-right: 13px; }
  .stage-controls .danger { grid-column: 1 / -1; padding-left: 13px; padding-right: 13px; }
  .account-brief-heading { flex-direction: column; }
  .account-brief-actions { align-items: stretch; flex-direction: column; }
  .account-brief-actions button { width: 100%; min-width: 0; }
  .history-filters { justify-content: stretch; }
  .history-filters label { width: 100%; }
  .engine-tag { position: static; margin-top: 12px; text-align: center; }
}

@media (max-width: 820px) {
  .landing-hero { grid-template-columns: 1fr; gap: 34px; padding-top: 42px; }
  .landing-hero h1 { font-size: clamp(38px, 10.6vw, 54px); }
  .hero-portrait { min-height: 440px; }
}

@media (max-width: 520px) {
  .topbar { min-height: 62px; padding: 10px 14px; }
  .brand-logo { width: 96px; }
  .nav-authed { width: auto; }
  .nav-account { gap: 3px; }
  .workspace-controls select { max-width: 110px; }
  #btn-new-workspace { display: none; }
  .minutes-button, .logout-button { padding: 7px 9px; font-size: 10.5px; }
  .landing-hero { padding-top: 28px; }
  .landing-hero .overline { line-height: 1.55; }
  .hero-portrait { min-height: 390px; border-radius: 22px; }
  .hero-portrait figcaption { left: 18px; right: 18px; bottom: 18px; }
  .care-photo { min-height: 330px; border-radius: 22px; }
}

@media (max-width: 720px) {
  /* backdrop-filter creates a containing block for fixed descendants in
     Chromium. Disable it here so the mobile destination dock is anchored to
     the viewport bottom, not to the 62px header. */
  .topbar {
    background: rgba(6, 6, 7, .94);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .nav-primary {
    position: fixed; z-index: 55; left: 12px; right: 12px; bottom: 10px;
    justify-content: stretch; padding: 5px;
    border-color: rgba(255, 255, 255, .11);
    background: rgba(12, 12, 16, .94);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  }
  .app-nav-item {
    flex: 1; justify-content: center; min-height: 42px; padding: 8px 12px;
  }
}
