/* ═══════════════════════════════════════════════════
   CloserArena — Design System
   AI Sales Training Platform
═══════════════════════════════════════════════════ */

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

:root {
  /* Core palette */
  --bg:         #08080b;
  --bg-2:       #0f0f14;
  --bg-3:       #16161e;
  --bg-4:       #1e1e28;
  --surface:    #1a1a24;
  --surface-2:  #22222e;

  /* Text */
  --text:       #f0f0f4;
  --text-2:     #b0b3bd;
  --text-3:     #6b6e7a;

  /* Accent — matches Closing Arena logo blue */
  --accent:     #2166e8;
  --accent-hov: #1455cc;
  --accent-dim: rgba(33, 102, 232, 0.10);
  --accent-border: rgba(33, 102, 232, 0.25);

  /* Borders */
  --border:     rgba(255, 255, 255, 0.07);
  --border-2:   rgba(255, 255, 255, 0.12);

  /* Semantic */
  --green:  #34d399;
  --amber:  #fbbf24;
  --red:    #f87171;
  --purple: #a78bfa;
  --blue:   #60a5fa;

  /* Spacing */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Font */
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@supports (height: 100dvh) {
  html, body { min-height: 100dvh; }
}
@supports (-webkit-touch-callout: none) {
  html, body { min-height: -webkit-fill-available; }
}

.screen { height: 100%; }


/* ═══════════════════════════════════════════════════════════
   CLOSER ARENA — LANDING PAGE
   All landing-specific styles prefixed with .l-
═══════════════════════════════════════════════════════════ */

/* ── Layout ── */
.landing-screen {
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
}

/* ── Nav ── */
.l-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 0) max(40px, env(safe-area-inset-right, 0px)) 0 max(40px, env(safe-area-inset-left, 0px));
  min-height: calc(64px + env(safe-area-inset-top, 0px));
  height: auto;
  box-sizing: border-box;
  background: rgba(8, 8, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.l-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/* Logo image — replaces CA text mark */
.l-nav-logo-img {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
}
.l-nav-logo-img.small {
  height: 28px;
}

/* Kept for any fallback rendering */
.l-nav-mark {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.l-nav-mark.small { width: 26px; height: 26px; font-size: 10px; border-radius: 6px; }

.l-nav-brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.l-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* At mid-width, hide the plain anchor links but keep feature links */
@media (max-width: 960px) and (min-width: 769px) {
  .l-nav-links .l-nav-link:not(.l-nav-link-vault):not(.l-nav-link-builder) {
    display: none;
  }
}

.l-nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 150ms;
}
.l-nav-link:hover { color: var(--text); }

.l-nav-cta {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms, transform 120ms;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.l-nav-cta:hover { background: var(--accent-hov); transform: translateY(-1px); }

/* ── Hero ── */
.l-hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.l-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.l-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, black 30%, transparent 80%);
}

.l-hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(33, 102, 232, 0.13) 0%, transparent 70%);
  pointer-events: none;
}

.l-hero-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px 60px;
  width: 100%;
}

/* Copy side */
.l-hero-copy {
  flex: 0 0 520px;
  max-width: 520px;
}

.l-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.l-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(33, 102, 232, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.8); }
}

.l-hero-headline {
  font-size: clamp(40px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 24px;
}

.l-hero-highlight {
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.l-hero-sub {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 36px;
  max-width: 460px;
}

.l-hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.l-hero-trial-note {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-3);
  max-width: 440px;
  margin-bottom: 36px;
}

.l-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms, transform 120ms, box-shadow 150ms;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.l-btn-primary:hover {
  background: var(--accent-hov);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(33, 102, 232, 0.35);
}
.l-btn-primary.l-btn-xl {
  padding: 18px 40px;
  font-size: 17px;
  border-radius: var(--radius-lg);
}

.l-btn-arrow { font-size: 16px; }

.l-btn-ghost {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: color 150ms;
  letter-spacing: -0.01em;
}
.l-btn-ghost:hover { color: var(--text); }

/* Hero proof bar */
.l-hero-proof {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.l-proof-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.l-proof-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.l-proof-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.l-proof-div {
  width: 1px;
  height: 28px;
  background: var(--border-2);
}

/* ── Hero Mockup ── */
.l-hero-mockup {
  position: relative;
  flex: 0 0 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.l-mock-card {
  position: relative;
  z-index: 1;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  padding: 20px;
  width: 380px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  animation: mock-float 5s ease-in-out infinite;
}

@keyframes mock-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

.l-mockup-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 440px;
  height: 440px;
  background: radial-gradient(ellipse, rgba(33, 102, 232, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Mock header */
.l-mock-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.l-mock-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.l-mock-avatar.blue   { background: linear-gradient(135deg, #2f6bff 0%, #1a4fd8 100%); }
.l-mock-avatar.purple { background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%); }
.l-mock-avatar.amber  { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }

.l-mock-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.l-mock-meta {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 1px;
}

.l-mock-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.l-mock-pill.warm { background: rgba(251, 191, 36, 0.12); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.25); }
.l-mock-pill.hot  { background: rgba(52, 211, 153, 0.12); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.25); }

/* Mock phase tracker */
.l-mock-phases {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 12px;
  background: var(--bg-4);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.l-mock-phase {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-3);
  white-space: nowrap;
  text-transform: uppercase;
  padding: 2px 0;
}
.l-mock-phase.done   { color: var(--green); }
.l-mock-phase.active { color: var(--accent); font-weight: 700; }

.l-mock-phase-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 4px;
}
.l-mock-phase-line.done { background: var(--green); opacity: 0.4; }

/* Mock engagement */
.l-mock-eng-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.l-mock-eng-label { font-size: 10px; color: var(--text-3); font-weight: 500; flex-shrink: 0; }
.l-mock-eng-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-4);
  border-radius: 2px;
  overflow: hidden;
}
.l-mock-eng-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
}
.l-mock-eng-val { font-size: 11px; font-weight: 700; color: var(--green); }

/* Mock messages */
.l-mock-messages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.l-mock-msg {
  font-size: 11px;
  line-height: 1.5;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  max-width: 95%;
}
.l-mock-msg.prospect {
  background: var(--surface);
  color: var(--text-2);
  align-self: flex-start;
  border: 1px solid var(--border);
}
.l-mock-msg.rep {
  background: rgba(33, 102, 232, 0.1);
  color: var(--text);
  align-self: flex-end;
  border: 1px solid rgba(33, 102, 232, 0.2);
  text-align: right;
}

/* Mock notification */
.l-mock-notif {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 8px;
}
.l-mock-notif-icon { font-size: 13px; flex-shrink: 0; }
.l-mock-notif-icon.green { color: var(--green); }
.l-mock-notif-title { font-size: 10px; font-weight: 700; color: var(--text); }
.l-mock-notif-desc  { font-size: 9px; color: var(--text-2); margin-top: 2px; }

/* Mock floating badge */
.l-mock-badge {
  position: absolute;
  top: -14px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.l-mock-badge-icon { font-size: 9px; }

/* ── Trust bar ── */
.l-trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 40px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.l-trust-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.l-trust-divider {
  width: 1px;
  height: 16px;
  background: var(--border-2);
}

.l-trust-item {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

.l-trust-sep {
  color: var(--text-3);
  font-size: 12px;
}

/* ── Sections ── */
.l-section {
  padding: 100px 0;
}

.l-section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

.l-section-header {
  text-align: center;
  margin-bottom: 64px;
}

.l-section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.l-section-headline {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 16px;
}

.l-section-sub {
  font-size: 16px;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Features Section ── */
.l-features-section {
  background: var(--bg);
}

.l-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.l-feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}
.l-feature-card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

/* Pillar cards — row 1, the three headline features */
.l-feature-card--pillar {
  background: var(--bg-3);
  border-color: var(--border-2);
  position: relative;
  overflow: hidden;
}
.l-feature-card--pillar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--purple) 100%);
  opacity: 0.7;
}
.l-feature-card--pillar:hover {
  border-color: rgba(33, 102, 232, 0.35);
  box-shadow: 0 16px 48px rgba(33, 102, 232, 0.12);
}

/* Legacy large card — keep for backwards compat */
.l-feature-card--large {
  background: var(--bg-3);
  border-color: var(--border-2);
}

/* Icon row — icon + badge side by side */
.l-feature-icon-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.l-feature-icon-row .l-feature-icon {
  margin-bottom: 0;
}

.l-feature-new-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(33, 102, 232, 0.1);
  border: 1px solid rgba(33, 102, 232, 0.25);
  border-radius: 20px;
  padding: 3px 9px;
}

.l-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.l-feature-icon.blue   { background: rgba(33, 102, 232, 0.12); color: var(--accent); border: 1px solid rgba(33, 102, 232, 0.2); }
.l-feature-icon.green  { background: rgba(52, 211, 153, 0.10); color: var(--green);  border: 1px solid rgba(52, 211, 153, 0.18); }
.l-feature-icon.purple { background: rgba(167, 139, 250, 0.10); color: var(--purple); border: 1px solid rgba(167, 139, 250, 0.18); }
.l-feature-icon.amber  { background: rgba(251, 191, 36, 0.10); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.18); }

.l-feature-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.l-feature-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 16px;
}

.l-feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.l-ftag {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: 0.02em;
}

/* ── How It Works ── */
.l-steps-section {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.l-steps-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 56px;
}

.l-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 0 16px;
}
.l-step:first-child { padding-left: 0; }
.l-step:last-child  { padding-right: 0; }

.l-step-num {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 4px 12px;
  text-transform: uppercase;
}

.l-step-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.l-step-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

.l-step-connector {
  flex-shrink: 0;
  width: 48px;
  height: 2px;
  background: var(--border-2);
  margin-top: 20px;
  position: relative;
}
.l-step-connector::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--border-2);
  border-right: 2px solid var(--border-2);
  transform: rotate(45deg);
}

.l-steps-cta {
  text-align: center;
}

/* ── Difference Section ── */
.l-diff-section {
  background: var(--bg);
}

.l-diff-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.l-diff-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.l-diff-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.l-diff-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.l-diff-item-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.l-diff-item-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── Difference Visual (debrief card mockup) ── */
.l-diff-visual {
  display: flex;
  justify-content: center;
}

.l-diff-card {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 360px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

.l-diff-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.l-diff-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.l-diff-score {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

/* Score ring */
.l-diff-score-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
}

.l-score-ring {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.l-score-ring-bg {
  fill: none;
  stroke: var(--bg-4);
  stroke-width: 10;
}

.l-score-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s ease;
}

.l-score-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.l-score-big   { font-size: 28px; font-weight: 900; color: var(--text); letter-spacing: -0.04em; line-height: 1; }
.l-score-grade { font-size: 11px; font-weight: 600; color: var(--accent); }

/* Scorecard mini */
.l-diff-scorecard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.l-diff-dim {
  display: flex;
  align-items: center;
  gap: 10px;
}
.l-dim-name {
  font-size: 11px;
  color: var(--text-2);
  flex: 0 0 120px;
  font-weight: 500;
}
.l-dim-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--bg-4);
  border-radius: 2px;
  overflow: hidden;
}
.l-dim-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}
.l-dim-bar.amber { background: var(--amber); }
.l-dim-score {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0;
  min-width: 36px;
  text-align: right;
}

/* Coaching note */
.l-diff-coaching-note {
  background: rgba(33, 102, 232, 0.06);
  border: 1px solid rgba(33, 102, 232, 0.18);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.l-coaching-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.l-coaching-text {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.6;
  font-style: italic;
}

/* ── CTA Section ── */
.l-cta-section {
  position: relative;
  padding: 120px 40px;
  text-align: center;
  overflow: hidden;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.l-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
}

.l-cta-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.l-cta-headline {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 20px;
}

.l-cta-sub {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 40px;
}

.l-cta-secondary {
  display: inline-block;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.l-cta-secondary:hover {
  color: var(--accent);
  border-bottom-color: rgba(33, 102, 232, 0.4);
}

.l-cta-detail {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.l-cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(33, 102, 232, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Footer ── */
.l-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px;
}

.l-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.l-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.l-footer-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.l-footer-tagline {
  font-size: 12px;
  color: var(--text-3);
}

.l-footer-links {
  display: flex;
  gap: 24px;
}
.l-footer-link {
  font-size: 12px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 150ms;
}
.l-footer-link:hover { color: var(--text-2); }

.l-footer-copy {
  font-size: 12px;
  color: var(--text-3);
}

/* ── App Nav back button ── */
.nav-back-btn {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 150ms, color 150ms;
  margin-right: 4px;
  line-height: 1;
}
.nav-back-btn:hover { background: var(--border); color: var(--text); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .l-hero-inner { flex-direction: column; padding: 60px 32px; text-align: center; }
  .l-hero-copy  { flex: none; max-width: 600px; }
  .l-hero-ctas  { justify-content: center; }
  .l-hero-proof { justify-content: center; }
  .l-hero-mockup { display: none; }
  .l-features-grid { grid-template-columns: 1fr 1fr; }
  .l-diff-inner { grid-template-columns: 1fr; gap: 48px; }
  .l-diff-visual { order: -1; }
}

@media (max-width: 768px) {
  .l-nav {
    padding-top: env(safe-area-inset-top, 0);
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    padding-bottom: 0;
    min-height: calc(64px + env(safe-area-inset-top, 0px));
  }
  .l-nav-links { display: none; }
  .l-nav-burger { display: flex; }
  .l-features-grid { grid-template-columns: 1fr; }
  .l-steps-track { flex-direction: column; gap: 32px; }
  .l-step-connector { width: 2px; height: 24px; margin: 0; align-self: flex-start; margin-left: 24px; }
  .l-step-connector::after { display: none; }
  .l-section-inner { padding: 0 20px; }
  .l-trust-bar { flex-wrap: wrap; gap: 12px; }
  .l-diff-card { width: 100%; }
}

/* ── Mobile nav ── */
.l-nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
}
.l-nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: transform 200ms, opacity 200ms, background 200ms;
}
.l-nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.l-nav-burger.open span:nth-child(2) { opacity: 0; }
.l-nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.l-nav-burger:hover span { background: var(--text); }

.l-mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
  pointer-events: none;
}
.l-mobile-menu.open {
  display: block;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.l-mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 16px 20px 24px;
  gap: 4px;
}
.l-mobile-link {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 150ms, color 150ms;
}
.l-mobile-link:hover { background: var(--bg-3); color: var(--text); }
.l-mobile-link-vault {
  color: var(--purple) !important;
  background: rgba(167, 139, 250, 0.06);
}
.l-mobile-link-vault:hover { background: rgba(167, 139, 250, 0.12) !important; }
.l-mobile-link-builder {
  color: var(--amber) !important;
  background: rgba(251, 191, 36, 0.06);
}
.l-mobile-link-builder:hover { background: rgba(251, 191, 36, 0.12) !important; }
.l-mobile-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.l-mobile-cta {
  display: block;
  margin-top: 8px;
  padding: 14px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 150ms;
}
.l-mobile-cta:hover { background: var(--accent-hov); }

/* ═══════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════ */
.app-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  flex-shrink: 0;
}

.nav-brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-session {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.nav-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
}


/* ═══════════════════════════════════════════════
   START SCREEN — SETUP PANEL
═══════════════════════════════════════════════ */
.start-screen {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.setup-wrap {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 32px 60px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Hero */
.setup-hero { }

.hero-title {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-2);
  font-weight: 400;
  line-height: 1.6;
}

/* Setup block */
.setup-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setup-block-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.label-step {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 3px 8px;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
}

.label-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* ── Character cards ── */
.char-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.char-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  padding: 0;
  overflow: hidden;
  transition: border-color 150ms, transform 120ms, box-shadow 150ms;
}

.char-card:hover {
  border-color: var(--border-2);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.char-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.char-card-inner {
  display: flex;
  gap: 14px;
  padding: 18px;
}

.char-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}
.char-avatar-blue   { background: linear-gradient(135deg, #2f6bff 0%, #1a4fd8 100%); }
.char-avatar-purple { background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%); }
.char-avatar-amber  { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }

.char-info { flex: 1; min-width: 0; }

.char-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.char-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.char-personality {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}
.char-personality-passive   { background: rgba(96, 165, 250, 0.12); color: var(--blue); }
.char-personality-sceptical { background: rgba(167, 139, 250, 0.12); color: var(--purple); }
.char-personality-assertive { background: rgba(251, 191, 36, 0.12);  color: var(--amber); }

.char-role {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 8px;
  font-weight: 500;
}

.char-challenge {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
  margin-bottom: 10px;
}

.char-objections {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.obj-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-3);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
}

.char-select-indicator {
  height: 3px;
  background: transparent;
  transition: background 150ms;
}
.char-card.active .char-select-indicator {
  background: var(--accent);
}

/* ── Difficulty cards ── */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.diff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms, background 150ms, transform 120ms;
}

.diff-card:hover {
  border-color: var(--border-2);
  transform: translateY(-1px);
}

.diff-card.active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.diff-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.diff-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.diff-pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.diff-pip-green { background: var(--green); box-shadow: 0 0 6px rgba(52, 211, 153, 0.5); }
.diff-pip-blue  { background: var(--blue);  box-shadow: 0 0 6px rgba(96, 165, 250, 0.5); }
.diff-pip-amber { background: var(--amber); box-shadow: 0 0 6px rgba(251, 191, 36, 0.5); }
.diff-pip-red   { background: var(--red);   box-shadow: 0 0 6px rgba(248, 113, 113, 0.5); }

.diff-desc {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.5;
}

/* ── Scenario strip ── */
.scenario-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  gap: 16px;
  flex-wrap: wrap;
}

.scenario-strip-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.scenario-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.scenario-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.scenario-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  padding: 3px 9px;
  border-radius: 5px;
}

.scenario-desc {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

/* ── Launch button ── */
.btn-launch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px 32px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 150ms, transform 120ms, box-shadow 150ms;
}

.btn-launch:hover {
  background: var(--accent-hov);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(33, 102, 232, 0.3);
}

.btn-launch:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-launch-text { font-weight: 700; }
.btn-launch-arrow { font-size: 18px; }


/* ═══════════════════════════════════════════════
   CHAT SCREEN
═══════════════════════════════════════════════ */
.chat-screen {
  display: flex;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
}

/* ── Live Intel Panel ── */
.intel-panel {
  width: 220px;
  min-width: 220px;
  display: flex;
  align-items: flex-start;
  border-right: 1px solid var(--border);
  background: var(--bg-2);
  position: relative;
  flex-shrink: 0;
  transition: width 200ms ease, min-width 200ms ease;
  overflow: hidden;
}

.intel-panel.collapsed {
  width: 32px;
  min-width: 32px;
}

.intel-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  padding: 10px 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  color: var(--text-3);
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 120ms, background 120ms;
  z-index: 10;
}
.intel-toggle:hover { color: var(--text); background: var(--bg-4); }

.intel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 0 40px;
  min-width: 220px;
}

.intel-body::-webkit-scrollbar { width: 4px; }
.intel-body::-webkit-scrollbar-track { background: transparent; }
.intel-body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.intel-panel.collapsed .intel-body { opacity: 0; pointer-events: none; }

/* Intel sections */
.intel-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.intel-section:last-child { border-bottom: none; }

.intel-header-section {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.intel-logo {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.intel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.intel-sub {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 500;
}

.intel-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}

.intel-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.intel-label-row .intel-label { margin-bottom: 0; }

/* Profile */
.intel-profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.intel-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.intel-char-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.intel-char-diff {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.intel-diff-beginner    { color: var(--green); }
.intel-diff-intermediate { color: var(--blue); }
.intel-diff-advanced    { color: var(--amber); }
.intel-diff-elite       { color: var(--red); }

/* Engagement bar */
.intel-eng-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.intel-bar-bg {
  height: 6px;
  background: var(--bg-4);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.intel-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 400ms ease, background 400ms ease;
}

.intel-bar-fill.eng-high   { background: var(--green); }
.intel-bar-fill.eng-medium { background: var(--amber); }
.intel-bar-fill.eng-low    { background: var(--red); }

.intel-eng-trend {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 500;
}

/* State grid */
.intel-state-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.intel-state-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.intel-state-key {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

.intel-state-val {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}
.tp-high   { background: rgba(52, 211, 153, 0.12); color: var(--green); }
.tp-medium { background: rgba(251, 191, 36, 0.12);  color: var(--amber); }
.tp-low    { background: rgba(248, 113, 113, 0.12); color: var(--red); }
.tp-number { color: var(--text); font-size: 12px; }
.tp-good   { background: rgba(52, 211, 153, 0.12); color: var(--green); }
.tp-bad    { background: rgba(248, 113, 113, 0.12); color: var(--red); }
.tp-neutral { background: var(--bg-4); color: var(--text-3); }
.tp-llm    { background: rgba(33, 102, 232, 0.12); color: var(--blue); }
.tp-heuristic { background: var(--bg-4); color: var(--text-3); }

/* Analysis grid */
.intel-analysis-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.intel-analysis-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Flags */
.intel-flags {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.intel-flag {
  font-size: 10px;
  font-weight: 600;
  color: var(--red);
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 4px;
  padding: 3px 8px;
  letter-spacing: 0.04em;
}


/* ══════════════════════════════════════════════
   CALL PHASE TRACKER (Intel Panel)
══════════════════════════════════════════════ */

.intel-phase-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.phase-track {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 10px;
  padding-bottom: 2px;
}

.phase-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.phase-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--border);
  transition: background 300ms, border-color 300ms, transform 200ms;
}

/* State: completed */
.phase-dot.phase-done {
  background: var(--green);
  border-color: var(--green);
}

/* State: current (active) */
.phase-dot.phase-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(33, 102, 232, 0.25);
  transform: scale(1.2);
}

/* State: skipped — entered but not in normal order (rep rushed) */
.phase-dot.phase-skipped {
  background: var(--amber);
  border-color: var(--amber);
}

.phase-dot-label {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 300ms;
}

.phase-node[data-phase].phase-node-active .phase-dot-label {
  color: var(--accent);
}
.phase-node[data-phase].phase-node-done .phase-dot-label {
  color: var(--green);
}

/* Connector lines between nodes */
.phase-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin-bottom: 15px; /* offset to align with dots, not labels */
  transition: background 300ms;
}
.phase-line.phase-line-done {
  background: var(--green);
}
.phase-line.phase-line-active {
  background: var(--accent);
}


/* ── Chat main area ── */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Chat header */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  flex-shrink: 0;
  gap: 16px;
}

.chat-header-left { flex: 1; min-width: 0; }

.chat-prospect-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.chat-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.chat-context {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}

.chat-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Live metrics */
.live-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
}

.live-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.live-metric-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.live-metric-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.live-metric-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

/* End call button */
.btn-end {
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: border-color 120ms, color 120ms, background 120ms;
  white-space: nowrap;
}
.btn-end:hover {
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--red);
  background: rgba(248, 113, 113, 0.05);
}

/* Engagement strip */
.eng-strip {
  height: 3px;
  background: var(--bg-4);
  flex-shrink: 0;
  overflow: hidden;
}

.eng-strip-fill {
  height: 100%;
  background: var(--accent);
  transition: width 500ms ease, background 500ms ease;
}

/* ── Credibility Bar (Character Architecture) ── */
.cred-bar {
  height: 6px;
  background: var(--bg-4);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0 4px;
}
.cred-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 600ms ease, background 600ms ease;
  background: var(--accent-2);
}
.cred-bar-fill.cred-high { background: var(--positive, #39d97a); }
.cred-bar-fill.cred-mid  { background: var(--accent, #f5c842); }
.cred-bar-fill.cred-low  { background: #e05252; }
#credibilityScore.cred-high { color: var(--positive, #39d97a); }
#credibilityScore.cred-mid  { color: var(--accent, #f5c842); }
#credibilityScore.cred-low  { color: #e05252; }
.cred-hint {
  font-size: 0.72rem;
  color: var(--text-3);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.3;
}

/* ── Messages ── */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 10%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.messages::-webkit-scrollbar { width: 5px; }
.messages::-webkit-scrollbar-track { background: transparent; }
.messages::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

.msg {
  max-width: 72%;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.6;
  animation: msg-in 180ms ease-out;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-prospect {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.msg-user {
  align-self: flex-end;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--text);
  border-bottom-right-radius: 4px;
}

.msg-thinking {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-style: italic;
  font-size: 16px;
  padding: 10px 16px;
  border-bottom-left-radius: 4px;
}

/* ── Input bar ── */
.input-bar {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  flex-shrink: 0;
  align-items: flex-end;
}

.user-input {
  flex: 1;
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  resize: none;
  outline: none;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color 150ms;
}
.user-input:focus { border-color: var(--accent-border); }
.user-input::placeholder { color: var(--text-3); }

.btn-send {
  padding: 11px 22px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms, transform 120ms;
  letter-spacing: 0.01em;
}
.btn-send:hover { background: var(--accent-hov); }
.btn-send:disabled { opacity: 0.3; cursor: default; transform: none; }


/* ═══════════════════════════════════════════════
   END SCREEN
═══════════════════════════════════════════════ */
.end-screen {
  display: grid;
  place-items: center;
  padding: 24px;
}

.end-wrap {
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* End header */
.end-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.end-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-3);
  margin-top: 6px;
  flex-shrink: 0;
}
.end-status-dot.outcome-win  { background: var(--green); box-shadow: 0 0 8px rgba(52, 211, 153, 0.5); }
.end-status-dot.outcome-mid  { background: var(--amber); box-shadow: 0 0 8px rgba(251, 191, 36, 0.5); }
.end-status-dot.outcome-loss { background: var(--red);   box-shadow: 0 0 8px rgba(248, 113, 113, 0.5); }

.end-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

.end-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

/* End metrics row */
.end-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.end-metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.end-metric-val {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 4px;
}

.end-metric-key {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Verdict */
.end-verdict {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

/* End actions */
.end-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-debrief {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: background 150ms, transform 120ms, box-shadow 150ms;
}
.btn-debrief:hover {
  background: var(--accent-hov);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(33, 102, 232, 0.3);
}

.btn-debrief-main {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-debrief-sub {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.75;
}

.btn-run-again {
  width: 100%;
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 150ms, color 150ms;
}
.btn-run-again:hover { border-color: var(--border-2); color: var(--text); }


/* ═══════════════════════════════════════════════
   WIN CONDITION PILL
═══════════════════════════════════════════════ */
.win-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 20px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
  transition: background 400ms, border-color 400ms, color 400ms;
  cursor: default;
}

.win-pill[data-proximity="exploring"] {
  color: var(--blue);
  border-color: rgba(96,165,250,0.25);
  background: rgba(96,165,250,0.06);
}
.win-pill[data-proximity="warm"] {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}
.win-pill[data-proximity="close"] {
  color: var(--amber);
  border-color: rgba(251,191,36,0.3);
  background: rgba(251,191,36,0.07);
}
.win-pill[data-proximity="achieved"] {
  color: var(--green);
  border-color: rgba(52,211,153,0.4);
  background: rgba(52,211,153,0.08);
}
.win-pill[data-proximity="cooling"] {
  color: var(--red);
  border-color: rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.06);
}
.win-pill[data-proximity="lost"] {
  color: var(--red);
  border-color: rgba(248,113,113,0.4);
  background: rgba(248,113,113,0.08);
}

.win-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.win-pill[data-proximity="close"] .win-pill-dot,
.win-pill[data-proximity="achieved"] .win-pill-dot {
  animation: dot-pulse 1.4s infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* ═══════════════════════════════════════════════
   COACHING WHISPER
═══════════════════════════════════════════════ */
.coach-whisper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  background: rgba(33, 102, 232, 0.06);
  border-top: 1px solid rgba(33, 102, 232, 0.15);
  flex-shrink: 0;
  animation: msg-in 250ms ease-out;
}

.whisper-icon {
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
}

.whisper-text {
  flex: 1;
  font-size: 12px;
  color: var(--blue);
  line-height: 1.5;
  font-weight: 500;
}

.whisper-dismiss {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 16px;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 120ms;
}
.whisper-dismiss:hover { color: var(--text); }

/* ═══════════════════════════════════════════════
   DEAL SECURED OVERLAY
═══════════════════════════════════════════════ */
.deal-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(8, 8, 11, 0.97);
  display: grid;
  place-items: center;
  animation: overlay-in 350ms ease-out;
}
@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.deal-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 520px;
  width: 100%;
  padding: 40px 32px;
  position: relative;
  text-align: center;
}

/* Glow ring behind badge */
.deal-glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52,211,153,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Badge */
.deal-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: badge-in 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes badge-in {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.deal-badge-icon {
  font-size: 64px;
  color: var(--green);
  line-height: 1;
  text-shadow: 0 0 40px rgba(52,211,153,0.4);
}

.deal-badge-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}

/* Prospect closing quote */
.deal-quote-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  text-align: left;
  max-width: 440px;
}

.deal-quote-icon {
  font-size: 24px;
  color: var(--green);
  opacity: 0.4;
  flex-shrink: 0;
  line-height: 1;
  margin-top: -2px;
}

.deal-quote-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  font-style: italic;
}

/* Stats */
.deal-stats-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.deal-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.deal-stat-div {
  width: 1px;
  height: 28px;
  background: var(--border);
}
.deal-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.deal-stat-green { color: var(--green); }
.deal-stat-key {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Overlay actions */
.deal-overlay-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 380px;
}

.btn-start-postsale {
  width: 100%;
  background: var(--green);
  color: #0a0a0c;
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: opacity 150ms, transform 120ms, box-shadow 150ms;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.btn-start-postsale:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(52,211,153,0.25);
}
.btn-postsale-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.7;
}

.btn-skip-postsale {
  background: transparent;
  border: none;
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  padding: 6px;
  transition: color 150ms;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-skip-postsale:hover { color: var(--text-2); }

/* ═══════════════════════════════════════════════
   LIVE SIMULATION NOTIFICATIONS
═══════════════════════════════════════════════ */

.notif-stack {
  position: fixed;
  bottom: 88px;
  right: 24px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 288px;
  pointer-events: none;
}

/* Base notification card */
.notif {
  position: relative;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 14px 14px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  overflow: hidden;
  pointer-events: all;
  animation: notif-in 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes notif-in {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

.notif.notif-exit {
  animation: notif-out 200ms ease-in forwards;
}
@keyframes notif-out {
  from { opacity: 1; transform: translateX(0); max-height: 120px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(28px); max-height: 0; padding: 0; margin-bottom: -8px; }
}

/* Type-specific border colours */
.notif-pain      { border-left-color: var(--green); }
.notif-emotion   { border-left-color: var(--purple); }
.notif-signal    { border-left-color: var(--green); }
.notif-rapport   { border-left-color: var(--green); }
.notif-strong    { border-left-color: var(--blue); }
.notif-objection { border-left-color: var(--amber); }
.notif-price     { border-left-color: var(--amber); }
.notif-drop      { border-left-color: var(--red); }
.notif-momentum  { border-left-color: var(--red); }
.notif-phase     { border-left-color: var(--accent); }
.notif-control   { border-left-color: var(--green); }
.notif-warn      { border-left-color: var(--amber); }

/* Icon */
.notif-icon {
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1.4;
}
.notif-pain .notif-icon      { color: var(--green); }
.notif-emotion .notif-icon   { color: var(--purple); }
.notif-signal .notif-icon    { color: var(--green); }
.notif-rapport .notif-icon   { color: var(--green); }
.notif-strong .notif-icon    { color: var(--blue); }
.notif-objection .notif-icon { color: var(--amber); }
.notif-price .notif-icon     { color: var(--amber); }
.notif-drop .notif-icon      { color: var(--red); }
.notif-momentum .notif-icon  { color: var(--red); }
.notif-phase .notif-icon     { color: var(--accent); }
.notif-control .notif-icon   { color: var(--green); }
.notif-warn .notif-icon      { color: var(--amber); }

/* Content */
.notif-body-wrap  { flex: 1; min-width: 0; }

.notif-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 3px;
  line-height: 1.3;
}

.notif-desc {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.45;
}

/* Close button */
.notif-close {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 15px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  margin-top: -1px;
  transition: color 120ms;
}
.notif-close:hover { color: var(--text); }

/* Auto-dismiss progress bar */
.notif-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  opacity: 0.35;
  transform-origin: left;
  animation: notif-bar linear forwards;
}
@keyframes notif-bar {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}
.notif:hover .notif-bar { animation-play-state: paused; }

/* Bar colours by type */
.notif-pain .notif-bar,
.notif-rapport .notif-bar,
.notif-signal .notif-bar,
.notif-control .notif-bar   { background: var(--green); }
.notif-emotion .notif-bar   { background: var(--purple); }
.notif-strong .notif-bar,
.notif-phase .notif-bar     { background: var(--accent); }
.notif-objection .notif-bar,
.notif-price .notif-bar,
.notif-warn .notif-bar      { background: var(--amber); }
.notif-drop .notif-bar,
.notif-momentum .notif-bar  { background: var(--red); }

/* Mobile: smaller, no overlap with input */
@media (max-width: 600px) {
  .notif-stack {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    max-width: 240px;
  }
}

/* ============================================================
   AI SALES COACH BUBBLE
   Persistent during simulation — bottom-right floating panel
============================================================ */

.coach-bubble {
  position: fixed;
  bottom: 88px;        /* sits above the input bar */
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

/* Toggle button (collapsed state) */
.coach-toggle-btn {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 11px;
  background: #141419;
  border: 1px solid rgba(167,139,250,0.35);
  border-radius: 24px;
  color: #a78bfa;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 1px rgba(167,139,250,0.1);
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.coach-toggle-btn:hover {
  background: rgba(167,139,250,0.12);
  border-color: rgba(167,139,250,0.6);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(167,139,250,0.2);
}
.coach-toggle-icon { font-size: 0.85rem; }
.coach-toggle-label { letter-spacing: 0.02em; }

/* Unread notification dot */
.coach-unread-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  background: var(--green, #34d399);
  border-radius: 50%;
  border: 2px solid #08080b;
  animation: coach-pulse 1.5s ease-in-out infinite;
}
@keyframes coach-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.3); opacity: 0.7; }
}

/* Expanded panel */
.coach-panel {
  pointer-events: all;
  width: 320px;
  background: #0e0e13;
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(167,139,250,0.08);
  display: flex;
  flex-direction: column;
  max-height: 420px;
}

/* Panel header */
.coach-panel-header {
  padding: 12px 14px 10px;
  background: #141419;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.coach-panel-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.coach-panel-icon { font-size: 0.85rem; color: #a78bfa; }
.coach-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f0f0f4;
  letter-spacing: -0.01em;
}
.coach-panel-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--green, #34d399);
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.25);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 2px;
}
.coach-panel-sub {
  font-size: 0.68rem;
  color: #6b6e7a;
  line-height: 1.3;
}
.coach-panel-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #6b6e7a;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1;
  transition: all 0.12s;
}
.coach-panel-close:hover { background: rgba(248,113,113,0.1); color: #f87171; }

/* Message area */
.coach-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
}
.coach-messages::-webkit-scrollbar { width: 3px; }
.coach-messages::-webkit-scrollbar-thumb { background: #1a1a22; border-radius: 2px; }

/* Individual messages */
.coach-msg {
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 100%;
  word-break: break-word;
}
.coach-msg-system {
  background: rgba(167,139,250,0.06);
  border: 1px solid rgba(167,139,250,0.12);
  color: #9d9dbd;
  font-style: italic;
  font-size: 0.75rem;
}
.coach-msg-user {
  background: rgba(47,107,255,0.12);
  border: 1px solid rgba(47,107,255,0.2);
  color: #c7d3f8;
  align-self: flex-end;
  text-align: right;
}
.coach-msg-coach {
  background: #141419;
  border: 1px solid rgba(255,255,255,0.07);
  color: #e0e0ea;
  border-left: 2px solid #a78bfa;
}
.coach-msg-thinking {
  background: #141419;
  border: 1px solid rgba(255,255,255,0.05);
  color: #6b6e7a;
  font-style: italic;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.coach-thinking-dots {
  display: flex;
  gap: 3px;
}
.coach-thinking-dots span {
  width: 4px; height: 4px;
  background: #a78bfa;
  border-radius: 50%;
  animation: coach-dot 1.2s ease-in-out infinite;
}
.coach-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.coach-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes coach-dot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1.2); }
}

/* Error state */
.coach-msg-error {
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
  color: #f87171;
  font-size: 0.75rem;
}

/* Input row */
.coach-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: #0e0e13;
}
.coach-input {
  flex: 1;
  background: #141419;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: #f0f0f4;
  font-family: var(--font);
  font-size: 0.8rem;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}
.coach-input:focus { border-color: rgba(167,139,250,0.5); }
.coach-input::placeholder { color: #6b6e7a; }

.coach-send-btn {
  width: 30px;
  height: 30px;
  background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 6px;
  color: #a78bfa;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.coach-send-btn:hover { background: rgba(167,139,250,0.25); border-color: #a78bfa; }
.coach-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Footer / log counter */
.coach-panel-footer {
  padding: 5px 12px 6px;
  border-top: 1px solid rgba(255,255,255,0.04);
  background: #0a0a0d;
}
.coach-log-notice {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.67rem;
  color: #555;
}
.coach-log-dot {
  width: 5px;
  height: 5px;
  background: #a78bfa;
  border-radius: 50%;
  opacity: 0.5;
  flex-shrink: 0;
}

/* On mobile — shift above input */
@media (max-width: 600px) {
  .coach-bubble {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
  }
  .coach-panel  { width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); }
}

/* ── Transcript Vault nav link ── */
.l-nav-link-vault {
  color: #a78bfa !important;
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 4px;
  padding: 4px 10px !important;
  transition: background 0.15s, border-color 0.15s;
}
.l-nav-link-vault:hover {
  background: rgba(167,139,250,0.15) !important;
  border-color: rgba(167,139,250,0.4);
  color: #c4b5fd !important;
}

.l-nav-link-builder {
  color: #d4af37 !important;
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 4px;
  padding: 4px 10px !important;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}
.l-nav-link-builder:hover {
  background: rgba(212,175,55,0.15) !important;
  border-color: rgba(212,175,55,0.4);
  color: #f0cc55 !important;
}

/* ═══════════════════════════════════════════════
   LANGUAGE PICKER
═══════════════════════════════════════════════ */
.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 6px;
  color: var(--text-1, #e8eaf0);
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  white-space: nowrap;
  line-height: 1;
}

.lang-current:hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.22);
}

.lang-flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-code {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.lang-chevron {
  font-size: 0.62rem;
  opacity: 0.65;
  transition: transform 0.18s;
}

.lang-picker.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 168px;
  background: #141720;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  z-index: 9999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
  padding: 4px 0;
}

.lang-picker.open .lang-dropdown {
  display: block;
  animation: langDropIn 0.15s ease;
}

@keyframes langDropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: transparent;
  border: none;
  color: rgba(232,234,240,0.7);
  font-size: 0.87rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}

.lang-option:hover {
  background: rgba(255,255,255,0.06);
  color: #e8eaf0;
}

.lang-option.active {
  color: #d4af37;
  font-weight: 600;
  background: rgba(212,175,55,0.08);
}

/* ── Landing nav keeps picker visible ── */
.l-nav .lang-picker {
  flex-shrink: 0;
}

/* ── In scenario builder / vault nav ── */
.app-nav .lang-picker {
  margin-left: 8px;
}

/* ─────────────────────────────────────
   RTL SUPPORT
───────────────────────────────────── */
html[dir="rtl"] body.rtl {
  direction: rtl;
}

/* Flip nav layout for RTL */
html[dir="rtl"] .l-nav {
  flex-direction: row-reverse;
}
html[dir="rtl"] .l-nav-links {
  flex-direction: row-reverse;
}
html[dir="rtl"] .l-hero-inner {
  flex-direction: row-reverse;
}
html[dir="rtl"] .l-hero-copy {
  text-align: right;
}
html[dir="rtl"] .l-hero-ctas {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
html[dir="rtl"] .l-hero-proof {
  flex-direction: row-reverse;
}
html[dir="rtl"] .l-section-header {
  text-align: right;
}
html[dir="rtl"] .l-diff-inner {
  flex-direction: row-reverse;
}
html[dir="rtl"] .l-diff-item {
  flex-direction: row-reverse;
  text-align: right;
}
html[dir="rtl"] .l-diff-list {
  direction: rtl;
}
html[dir="rtl"] .l-footer-inner {
  text-align: center;
}
html[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}
html[dir="rtl"] .intel-panel {
  direction: rtl;
}
html[dir="rtl"] .chat-input-row {
  flex-direction: row-reverse;
}
html[dir="rtl"] .step-body {
  text-align: right;
}
html[dir="rtl"] .l-step-body {
  text-align: right;
}
html[dir="rtl"] .l-diff-copy {
  text-align: right;
}
html[dir="rtl"] .l-trust-bar {
  flex-direction: row-reverse;
}
html[dir="rtl"] .l-cta-inner {
  text-align: center;
}

/* Mobile picker */
@media (max-width: 700px) {
  .lang-current {
    padding: 5px 8px;
    gap: 3px;
  }
  .lang-code { display: none; }
  .lang-chevron { display: none; }
  .lang-dropdown { right: 0; min-width: 150px; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 860px) {
  .setup-wrap { padding: 24px 20px 48px; gap: 32px; }
  .char-grid  { grid-template-columns: 1fr; }
  .diff-grid  { grid-template-columns: repeat(2, 1fr); }
  .scenario-strip { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 600px) {
  .app-nav {
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
    padding-top: max(12px, env(safe-area-inset-top, 0px));
  }
  .nav-tag { display: none; }
  .intel-panel { display: none; }
  .messages {
    padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
  }
  .live-metrics { display: none; }
  .chat-header {
    padding: 10px max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px));
  }
  .end-metrics { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .end-metric-val { font-size: 18px; }
  .user-input { font-size: 16px; }
  .btn-send {
    min-height: 44px;
    min-width: 44px;
    padding: 11px 18px;
    box-sizing: border-box;
  }
  .btn-end {
    min-height: 44px;
    padding: 10px 16px;
    box-sizing: border-box;
  }
}

/* === Closing Arena logo lockup (bundled so deploy always has styles; mirrors ca-logo.css) === */
.ca-logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.ca-logo-lockup .ca-logo-icon {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.ca-logo-text {
  font-family: system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.ca-logo-closing {
  color: #f0f0f4;
}

.ca-logo-arena {
  color: #2166e8;
}

.ca-logo-lockup--nav .ca-logo-icon {
  width: 38px;
  height: 38px;
}

.ca-logo-lockup--nav .ca-logo-text {
  font-size: 1.28rem;
}

.ca-logo-lockup--sm .ca-logo-icon {
  width: 28px;
  height: 28px;
}

.ca-logo-lockup--sm .ca-logo-text {
  font-size: 1rem;
}

.ca-logo-lockup--tight {
  gap: 8px;
}

.ca-logo-lockup--tight .ca-logo-icon {
  width: 24px;
  height: 24px;
}

.ca-logo-lockup--tight .ca-logo-text {
  font-size: 0.95rem;
}

.ca-logo-lockup--card .ca-logo-icon {
  width: 34px;
  height: 34px;
}

.ca-logo-lockup--auth .ca-logo-icon {
  width: 36px;
  height: 36px;
}

.ca-logo-lockup--auth-lg .ca-logo-icon {
  width: 40px;
  height: 40px;
}
