/* ============================================================
   BREVET × CORPAY — AI Voice Role Play
   Design system + screen styles
   Drop-in CSS. No external deps except IBM Plex Mono via @import (below).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ============================================================
   BREVET × CORPAY — Voice Role Play
   Design system tokens + base
   ============================================================ */

:root {
  /* Brand palette — derived from the Brevet chevron */
  --brevet-blue:        #1AAEEF;
  --brevet-blue-deep:   #0E89C3;
  --brevet-gray:        #818286;
  --brevet-ink:         #0E1116;
  --brevet-paper:       #F5F4F0;
  --brevet-charcoal:    #1A1D22;
  --brevet-mist:        #E8E9EB;
  --brevet-line:        #D7D6D1;

  --signal-good:        #16A34A;
  --signal-danger:      #DC2626;
  --signal-warning:     #F59E0B;

  /* Light surfaces */
  --surface:            var(--brevet-paper);
  --surface-2:          #FFFFFF;
  --ink:                var(--brevet-ink);
  --ink-2:              #2A2E36;
  --ink-3:              #5A5F69;
  --rule:               var(--brevet-mist);

  /* Type */
  --font-sans:          Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-mono:          "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Motion */
  --ease-out-quint:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-quint:      cubic-bezier(0.7, 0, 0.84, 0);
  --ease-std:           cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --shell-max:          1440px;
  --gutter:             72px;
}

[data-mode="dark"] {
  --surface:            var(--brevet-ink);
  --surface-2:          #14171C;
  --ink:                var(--brevet-paper);
  --ink-2:              #C9CAC7;
  --ink-3:              #7E8088;
  --rule:               #25282E;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  overflow: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
}

input, select, textarea {
  font-family: inherit;
  color: inherit;
}

::selection { background: var(--brevet-blue); color: #fff; }

/* ============================================================
   Typography utilities
   ============================================================ */
.t-display-xl { font-weight: 900; font-size: clamp(72px, 9vw, 132px); line-height: 0.92; letter-spacing: -0.04em; }
.t-display-l  { font-weight: 900; font-size: clamp(56px, 6vw, 92px);  line-height: 0.96; letter-spacing: -0.035em; }
.t-display-m  { font-weight: 900; font-size: clamp(40px, 4vw, 64px);  line-height: 1.00; letter-spacing: -0.03em; }
.t-h1         { font-weight: 700; font-size: 32px; line-height: 1.08; letter-spacing: -0.02em; }
.t-h2         { font-weight: 700; font-size: 22px; line-height: 1.18; letter-spacing: -0.01em; }
.t-h3         { font-weight: 700; font-size: 16px; line-height: 1.25; letter-spacing: 0; }
.t-body-l     { font-size: 18px; line-height: 1.55; }
.t-body       { font-size: 15px; line-height: 1.6; }
.t-caption    { font-size: 11px; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.t-mono       { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

a, .link { color: var(--ink); text-underline-offset: 3px; }

/* ============================================================
   Shell + screen layout
   ============================================================ */
.shell {
  position: fixed;
  inset: 0;
  display: grid;
  background: var(--surface);
  color: var(--ink);
  transition: background 420ms var(--ease-std), color 420ms var(--ease-std);
}

.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms var(--ease-out-quint);
}
.screen.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   Lockup (Brevet × Corpay)
   ============================================================ */
.lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-sans);
}
.lockup .mark {
  width: 28px; height: 22px;
  position: relative;
  flex-shrink: 0;
}
.lockup .mark svg { width: 100%; height: 100%; display: block; }
.lockup .word {
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 16px;
  color: var(--ink);
}
.lockup .sep {
  width: 1px;
  height: 18px;
  background: var(--rule);
}
.lockup .for {
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--ink-3);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0;
  transition: transform 220ms var(--ease-out-quint), background 220ms, color 220ms, opacity 220ms;
  user-select: none;
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn .arrow {
  display: inline-block;
  transition: transform 280ms var(--ease-out-quint);
}
.btn:hover:not(:disabled) .arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--ink);
  color: var(--surface);
}
.btn-primary:hover:not(:disabled) { background: var(--brevet-blue); color: #fff; }

.btn-blue {
  background: var(--brevet-blue);
  color: #fff;
}
.btn-blue:hover:not(:disabled) { background: var(--brevet-blue-deep); }

.btn-ghost {
  color: var(--ink);
  padding: 12px 0;
  border-bottom: 1px solid var(--ink);
}
.btn-ghost:hover { color: var(--brevet-blue); border-bottom-color: var(--brevet-blue); }

.btn-danger-ghost {
  color: var(--signal-danger);
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* ============================================================
   Pills, chips, etc.
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.pill-blue   { background: var(--brevet-blue); color: #fff; border-color: var(--brevet-blue); }
.pill-good   { background: var(--signal-good); color: #fff; border-color: var(--signal-good); }
.pill-warn   { background: var(--signal-warning); color: #1A1D22; border-color: var(--signal-warning); }
.pill-poor   { background: var(--brevet-gray); color: #fff; border-color: var(--brevet-gray); }
.pill-ghost  { background: transparent; color: var(--ink-3); }

/* Bullet dot */
.dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* Divider with caption */
.rule-cap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.rule-cap::before,
.rule-cap::after {
  content: "";
  height: 1px;
  background: var(--rule);
}


/* ============================================================
   Screen-specific styles
   ============================================================ */

/* ------- Welcome / Picker ------- */
.picker {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 var(--gutter) 200px;             /* room for the fixed footer + buffer so rounds are reachable */
  overflow: auto;
  scroll-padding-bottom: 200px;
}
.picker-top { padding-top: 8px; }
@media (max-width: 1100px) {
  .picker-body { padding-bottom: 32px; }
}

.picker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.picker-top .right {
  display: flex; gap: 28px; align-items: center;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3);
}
.picker-top .right .pip { display: inline-block; width: 8px; height: 8px; background: var(--brevet-blue); margin-right: 8px; vertical-align: middle; }

.picker-body {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: start;
  /* CRITICAL: don't let the flex parent (.picker) compress this below its natural height,
     otherwise the form's bottom (round-select) overflows out of the scroll area. */
  flex-shrink: 0;
}

.picker-hero {
  display: flex; flex-direction: column; gap: 28px;
  align-self: center;
}
.picker-hero .eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3);
}
.picker-hero .eyebrow .bar { width: 36px; height: 1px; background: var(--ink); }

.picker-hero h1 {
  margin: 0;
  text-wrap: balance;
}
.picker-hero h1 .accent { color: var(--brevet-blue); }
.picker-hero h1 em {
  font-style: normal;
  display: inline-block;
  position: relative;
}
.picker-hero h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.08em;
  height: 0.18em;
  background: var(--brevet-blue);
  opacity: 0.18;
  z-index: -1;
}

.picker-hero .lede {
  max-width: 460px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.55;
}

.picker-hero .meta-row {
  display: grid;
  grid-template-columns: auto auto auto auto;
  gap: 24px 32px;
  align-items: start;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
}
.picker-hero .meta-row dt { color: var(--ink-3); letter-spacing: 0.14em; text-transform: uppercase; font-size: 10px; font-weight: 700; margin-bottom: 6px; }
.picker-hero .meta-row dd { margin: 0; font-weight: 700; }

/* Picker form column */
.picker-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  padding: 32px;
  position: relative;
}

.field-stack { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--ink-3);
}
.field-label .num { color: var(--brevet-blue); font-family: var(--font-mono); }
.field-label .hint { text-transform: none; letter-spacing: 0.02em; font-weight: 400; color: var(--ink-3); }

input[type="text"], input[type="email"], select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  transition: border-color 200ms;
  border-radius: 0;
}
input:focus, select:focus { border-bottom-color: var(--brevet-blue); }

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.role-grid--2 { grid-template-columns: repeat(2, 1fr); }

/* Track toggle: Field Sales / Inside Sales pill row, sits below role-grid */
.track-toggle {
  display: inline-flex;
  gap: 0;
  margin-top: 8px;
  border: 1px solid var(--rule);
  background: var(--surface-2);
  width: 100%;
}
.track-pill {
  flex: 1;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: transparent;
  cursor: pointer;
  transition: background 180ms, color 180ms;
  border: 0;
  font-family: inherit;
}
.track-pill:hover:not(.is-on) { color: var(--ink); }
.track-pill.is-on {
  background: var(--ink);
  color: var(--surface);
}
.role-card {
  border: 1px solid var(--rule);
  background: var(--surface-2);
  padding: 12px 14px;
  text-align: left;
  transition: border-color 200ms, background 200ms, transform 200ms;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
}
.role-card:hover:not([data-disabled="true"]) { border-color: var(--ink); }
.role-card.is-on {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}
.role-card .role-name { font-weight: 900; font-size: 15px; }
.role-card .role-blurb { font-size: 11px; color: var(--ink-3); line-height: 1.35; }
.role-card.is-on .role-blurb { color: rgba(255,255,255,0.6); }
.role-card[data-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(0,0,0,0.04) 8px 9px);
}
.role-card[data-disabled="true"]::after {
  content: attr(data-disabled-note);
  position: absolute;
  top: 8px; right: 10px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--signal-danger);
}

.lob-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.lob-card {
  border: 1px solid var(--rule);
  padding: 12px 14px;
  text-align: left;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 200ms, background 200ms;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
}
.lob-card:hover:not(.is-disabled) { border-color: var(--ink); }
.lob-card.is-on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.lob-card.is-disabled {
  opacity: 0.32;
  cursor: not-allowed;
  background: var(--brevet-mist);
  color: var(--ink-3);
  border-color: var(--rule);
  pointer-events: none;     /* belt-and-suspenders — JS guard also drops the click */
  position: relative;
}
.lob-card.is-disabled .lob-name { color: var(--ink-3); }
.lob-card.is-disabled::after {
  content: "Inside Sales N/A";
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-3);
  opacity: 0.7;
}
.lob-card { flex-direction: column; align-items: flex-start; gap: 2px; }
.lob-card .lob-name { font-weight: 900; font-size: 14px; letter-spacing: -0.005em; line-height: 1.15; }
.lob-card .lob-track {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brevet-blue);
}
.lob-card.is-on .lob-track { color: rgba(255,255,255,0.85); }
/* Legacy rows kept harmless for back-compat */
.lob-card .lob-row { display: flex; gap: 10px; margin-top: 4px; font-size: 11px; color: var(--ink-3); line-height: 1.35; }
.lob-card.is-on .lob-row { color: rgba(255,255,255,0.65); }
.lob-card .lob-row .k { color: var(--brevet-blue); font-weight: 700; min-width: 22px; }
.lob-card.is-on .lob-row .k { color: var(--brevet-blue); }

.round-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.round-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 200ms, background 200ms;
  min-height: 44px;
}
.round-row:hover { border-color: var(--ink); }
.round-row.is-on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.round-row .r-name { font-weight: 700; font-size: 14px; letter-spacing: 0.02em; }

/* Picker bottom — pinned to the viewport bottom (position: fixed) so the Start-the-call
   button is always reachable, regardless of how the user has scrolled the form. */
.picker-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 18px var(--gutter) 24px;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.05);
}

.persona-preview {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 64px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms var(--ease-out-quint), transform 400ms var(--ease-out-quint);
}
.persona-preview.is-ready { opacity: 1; transform: none; }

.persona-portrait {
  width: 64px; height: 64px;
  background: var(--ink);
  color: var(--surface);
  display: grid; place-items: center;
  font-weight: 900; font-size: 22px;
  letter-spacing: -0.02em;
  position: relative;
  overflow: hidden;
}
/* Removed decorative diagonal line — read as a visual artifact, not a brand mark. */

.persona-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.persona-meta .name { font-weight: 900; font-size: 18px; letter-spacing: -0.01em; }
.persona-meta .who { color: var(--ink-3); font-size: 12px; }
.persona-meta .pitch { font-size: 13px; color: var(--ink-2); margin-top: 4px; max-width: 520px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.picker-foot .cta { display: flex; align-items: center; gap: 18px; }
.progress-readout {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3);
}
.progress-readout .bars { display: inline-flex; gap: 3px; }
.progress-readout .bar { width: 14px; height: 6px; background: var(--rule); }
.progress-readout .bar.on { background: var(--ink); }

/* ------- Role Play ------- */
.roleplay {
  position: absolute; inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 32px var(--gutter);
  color: var(--ink);
}
.rp-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.rp-top .left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rp-top .crumbs { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); display: flex; gap: 10px; align-items: center; }
.rp-top .crumbs .div { width: 16px; height: 1px; background: var(--ink-3); }
.rp-top .persona-line { display: flex; align-items: baseline; gap: 14px; }
.rp-top .persona-line .name { font-weight: 900; font-size: 22px; letter-spacing: -0.01em; }
.rp-top .persona-line .desc { color: var(--ink-3); font-size: 13px; }
.rp-top .center { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; color: var(--ink-3); }
.rp-top .right { display: flex; justify-content: flex-end; gap: 18px; align-items: center; }

.rp-stage {
  display: grid;
  place-items: center;
  position: relative;
  min-height: 0;
}
.rp-stage .timer {
  position: absolute;
  bottom: 18%;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}
.rp-stage .state-cap {
  position: absolute;
  bottom: 13%;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-2);
  display: flex; gap: 12px; align-items: center;
}
.rp-stage .state-cap .pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brevet-blue);
  box-shadow: 0 0 12px var(--brevet-blue);
}

.rp-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
}
.rp-bottom .left .win-cond {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 540px;
}
.rp-bottom .left .win-cond .label {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--brevet-blue);
  text-transform: uppercase;
  font-weight: 700;
}
.rp-bottom .left .win-cond .round-name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--brevet-paper);
  line-height: 1.15;
}
.rp-bottom .left .win-cond .text {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(245, 244, 240, 0.78);
}
.rp-bottom .right { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }

.rp-end-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  font-weight: 700; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  transition: background 200ms, color 200ms;
}
.rp-end-btn:hover { background: var(--signal-danger); color: #fff; border-color: var(--signal-danger); }
.rp-end-btn .x { font-family: var(--font-mono); font-weight: 400; transform: translateY(-1px); }

/* Beat-reminders pull tab */
.beat-tab {
  position: absolute;
  top: 50%; right: 0;
  transform: translateY(-50%);
  width: 28px;
  height: 96px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-right: 0;
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 4;
  transition: background 200ms;
}
.beat-tab:hover { background: var(--ink); color: var(--surface); }
.beat-tab span { writing-mode: vertical-rl; font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase; font-weight: 700; }

.beat-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 38vw);
  background: var(--surface-2);
  border-left: 1px solid var(--rule);
  transform: translateX(100%);
  transition: transform 480ms var(--ease-out-quint);
  padding: 36px 36px 28px;
  display: flex; flex-direction: column; gap: 22px;
  z-index: 5;
  overflow: auto;
}
.beat-panel.is-open { transform: translateX(0); }
.beat-panel h3 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -0.01em; }
.beat-panel .close { align-self: flex-end; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.beat-item { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--rule); }
.beat-item:last-of-type { border-bottom: 1px solid var(--rule); }
.beat-item .n { font-family: var(--font-mono); font-size: 11px; color: var(--brevet-blue); }
.beat-item .body .t { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.beat-item .body .d { font-size: 13px; color: var(--ink-3); line-height: 1.5; }

/* ------- Feedback ------- */
.fb {
  position: absolute; inset: 0;
  overflow: auto;
  padding: 36px var(--gutter) 56px;
  background: var(--surface);
  color: var(--ink);
}
.fb-top {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.fb-top .crumbs { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }
.fb-hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: end;
  padding: 28px 0 36px;
  border-bottom: 1px solid var(--rule);
}
.fb-score {
  font-weight: 900;
  font-size: clamp(120px, 16vw, 232px);
  line-height: 0.86;
  letter-spacing: -0.06em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.fb-score .out {
  font-size: 0.22em;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--ink-3);
  font-family: var(--font-mono);
  margin-left: 6px;
}
.fb-summary { display: flex; flex-direction: column; gap: 16px; padding-bottom: 18px; }
.fb-summary .top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fb-summary .text { font-size: 18px; line-height: 1.5; max-width: 60ch; text-wrap: pretty; }

.beats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}
.beat-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  position: relative;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-out-quint), transform 600ms var(--ease-out-quint);
}
.beat-card.is-in { opacity: 1; transform: none; }
.beat-card .b-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.beat-card .b-num { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.beat-card .b-title { font-weight: 900; font-size: 18px; letter-spacing: -0.01em; }
.beat-card .b-quote {
  border-left: 2px solid var(--brevet-blue);
  padding-left: 14px;
  font-style: italic;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
  text-wrap: pretty;
}
.beat-card .b-feedback {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  text-wrap: pretty;
}

.fb-rubric {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 56px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
}
.fb-rubric h4 { margin: 0 0 14px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); }
.fb-rubric ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.fb-rubric li.rub-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--rule);
  font-weight: 700; font-size: 14px;
}
.fb-rubric li.point { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.fb-rubric li.point .arr { color: var(--brevet-blue); font-weight: 900; }

.fb-foot { display: flex; gap: 18px; padding-top: 32px; align-items: center; flex-wrap: wrap; }

/* ------- Dashboard ------- */
.dash {
  position: absolute; inset: 0; overflow: auto;
  padding: 36px var(--gutter) 56px;
  background: var(--surface);
  color: var(--ink);
}
.dash-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.dash-head {
  padding: 24px 0 20px;
}
.dash-head h1 { margin: 0; }
.dash-head .lede { color: var(--ink-2); font-size: 16px; max-width: 64ch; }

/* Horizontal filter bar across the top of the data */
.dash-filterbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.dash-filterbar .f { display: flex; flex-direction: column; gap: 4px; }
.dash-filterbar .f label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.dash-filterbar select { font-size: 14px; padding: 6px 0; }

@media (max-width: 900px) {
  .dash-filterbar { grid-template-columns: repeat(2, 1fr); }
}

.tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}
.tile { display: flex; flex-direction: column; gap: 8px; padding-right: 18px; border-right: 1px solid var(--rule); }
.tile:last-child { border-right: 0; }
.tile .k { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.tile .v { font-weight: 900; font-size: 56px; letter-spacing: -0.04em; line-height: 0.96; font-variant-numeric: tabular-nums; }
.tile .v .u { font-size: 0.32em; color: var(--ink-3); font-weight: 700; font-family: var(--font-mono); margin-left: 4px; }
.tile .v.accent { color: var(--brevet-blue); }

.section-h {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 36px 0 18px;
}
.section-h h2 { margin: 0; }
.section-h .lede { color: var(--ink-3); font-size: 13px; max-width: 50ch; }
.section-h::after { content: ""; height: 1px; background: var(--rule); align-self: center; }

.deficit-list { display: flex; flex-direction: column; }
.def-row {
  display: grid;
  grid-template-columns: 220px 1fr 80px;
  gap: 24px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.def-row .n { font-weight: 900; font-size: 18px; letter-spacing: -0.01em; }
.def-row .meter {
  position: relative;
  height: 6px;
  background: var(--rule);
}
.def-row .meter span {
  display: block; height: 100%;
  background: var(--brevet-blue);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 900ms var(--ease-out-quint);
}
.def-row.is-in .meter span { transform: scaleX(var(--pct)); }
.def-row .pct { font-family: var(--font-mono); text-align: right; font-weight: 700; font-size: 14px; }
.def-row .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.grid-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.grid-table th, .grid-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}
.grid-table th { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.grid-table td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.grid-table .cell-blue { color: var(--brevet-blue); font-weight: 700; }
.grid-table .cell-empty { color: var(--ink-3); }

/* Attempts table */
.attempts {
  width: 100%; border-collapse: collapse; margin-top: 8px;
}
.attempts th, .attempts td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}
.attempts th { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.attempts td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.attempts .score-cell { font-weight: 900; font-size: 18px; }
.attempts .actions { text-align: right; }
.attempts tr:hover td { background: var(--surface-2); }

/* Token gate */
.gate {
  position: absolute; inset: 0;
  background: var(--surface);
  display: grid;
  place-items: center;
  padding: 0 var(--gutter);
  z-index: 6;
  transition: opacity 380ms var(--ease-out-quint);
}
.gate.is-out {
  opacity: 0;
  pointer-events: none;
}
.gate-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1080px;
  width: 100%;
}
.gate-inner .left { display: flex; flex-direction: column; gap: 18px; }
.gate-inner .left .eyebrow { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.gate-inner .left h1 { margin: 0; }
.gate-inner .left p { color: var(--ink-2); font-size: 16px; max-width: 44ch; }
.gate-form { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.gate-form .row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }
.gate-form .err { color: var(--signal-danger); font-size: 12px; min-height: 16px; }

/* Cinematic transition layer */
.curtain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
}
.curtain .panel {
  position: absolute; left: 0; right: 0;
  background: var(--brevet-ink);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 520ms var(--ease-out-quint);
}
.curtain .panel.bottom { top: 50%; bottom: 0; transform-origin: bottom center; }
.curtain .panel.top { top: 0; bottom: 50%; }
.curtain.is-in .panel { transform: scaleY(1); }

/* Floating handoff name */
.handoff-name {
  position: fixed;
  inset: 0;
  display: grid; place-items: center;
  z-index: 101;
  pointer-events: none;
  color: var(--brevet-paper);
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: clamp(48px, 7vw, 96px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 480ms var(--ease-out-quint), transform 480ms var(--ease-out-quint);
}
.handoff-name.is-in { opacity: 1; transform: none; }

/* Nav strip (subtle prototype helper - hidden if not needed) */
.proto-nav {
  position: fixed;
  bottom: 14px; right: 14px;
  display: inline-flex;
  gap: 4px;
  z-index: 50;
  background: rgba(14, 17, 22, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 4px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}
.proto-nav button {
  color: rgba(255,255,255,0.66);
  padding: 6px 12px;
  letter-spacing: 0.16em;
  transition: background 180ms, color 180ms;
}
.proto-nav button:hover { color: #fff; }
.proto-nav button.is-on { background: var(--brevet-blue); color: #fff; }

/* Audio meter (demo helper) */
.amp-helper {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); font-weight: 700;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1100px) {
  :root { --gutter: 36px; }
  .picker-body, .fb-hero, .dash-head { grid-template-columns: 1fr; gap: 32px; }
  .beats { grid-template-columns: 1fr; }
  .fb-rubric { grid-template-columns: 1fr; gap: 24px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Lockup — production logos (PNG + SVG)
   Overrides the inline-SVG fallback from .lockup .mark / .lockup .word.
   ============================================================ */
.lockup-logo {
  display: block;
  width: auto;
  flex-shrink: 0;
  user-select: none;
}
.lockup-logo--brevet { height: 64px; }
.lockup-logo--corpay { height: 32px; opacity: 0.92; }

/* In dark mode, both logos are dark-on-white originals; invert them. */
[data-mode="dark"] .lockup-logo--brevet,
[data-mode="dark"] .lockup-logo--corpay {
  filter: invert(1) brightness(1.05);
}

/* ============================================================
   Role Play — post-call scoring overlay
   Sits on top of .rp-stage during the 20–40 sec score-and-load wait.
   ============================================================ */

.rp-scoring {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 10;
  padding: 24px;
  /* Solid near-opaque cover — was a radial gradient + backdrop-filter:blur which
     re-rasterized every frame against the animated voice-presence orb behind it
     and produced edge flicker. */
  background: #0E1116;
  transition: opacity 320ms var(--ease-out-quint), visibility 320ms;
  /* Promote to its own GPU layer so paint stays stable on every frame. */
  will-change: opacity;
}
.rp-scoring[hidden] { display: none; }
.rp-scoring.is-out  { opacity: 0; pointer-events: none; }

/* Scoring overlay content */
.rp-scoring__inner {
  text-align: center;
}
.rp-scoring__spinner {
  width: 56px;
  height: 56px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--brevet-blue);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: rp-scoring-spin 0.8s linear infinite;
}
.rp-scoring__title {
  font-weight: 900;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.01em;
  color: var(--brevet-paper);
  margin-bottom: 8px;
}
.rp-scoring__sub {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(245, 244, 240, 0.58);
  max-width: 360px;
  margin: 0 auto;
}
@keyframes rp-scoring-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   Side-panel briefing — replaces the "beat reminders" content
   ============================================================ */
.brief-header { padding-bottom: 12px; }
.brief-section {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.brief-section__label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brevet-blue);
  margin-bottom: 10px;
}
.brief-persona {
  font-size: 15px;
  font-weight: 900;
  color: var(--brevet-paper);
  line-height: 1.25;
  margin-bottom: 4px;
}
.brief-vibe {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(245, 244, 240, 0.78);
}
.brief-body {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 244, 240, 0.86);
}
.brief-body strong { color: var(--brevet-paper); font-weight: 700; }
.brief-footer { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.brief-notes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brief-notes li {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(245, 244, 240, 0.72);
  padding-left: 16px;
  position: relative;
}
.brief-notes li::before {
  content: "→";
  color: var(--brevet-blue);
  position: absolute;
  left: 0;
  top: 0;
}

/* ============================================================
   Compact picker — narrower window. Foot is already sticky (base rule);
   here we collapse the layout so it stays usable.
   ============================================================ */
@media (max-width: 900px) {
  .picker-foot { padding: 12px var(--gutter) 14px; gap: 16px; }
  .persona-preview { grid-template-columns: 44px 1fr; gap: 12px; min-height: 44px; }
  .persona-portrait { width: 44px; height: 44px; font-size: 16px; }
  .persona-meta .name { font-size: 15px; }
  .persona-meta .pitch { -webkit-line-clamp: 1; font-size: 12px; }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .picker-body { grid-template-columns: 1fr; gap: 28px; }
  .picker-hero h1 { font-size: clamp(36px, 8vw, 56px); }
  .picker-foot { grid-template-columns: 1fr; gap: 10px; padding: 10px var(--gutter) 12px; }
  .picker-foot .cta { flex-direction: column; align-items: stretch; gap: 8px; }
  .picker-foot .cta .btn { width: 100%; justify-content: center; }
  /* On phones the persona preview is just visual weight — hide it so the CTA is the only thing in the bar. */
  .persona-preview { display: none; }
}
/* Short-viewport heights also need the sticky foot to compress so it never eats more than ~18% of the screen. */
@media (max-height: 680px) {
  .picker-foot { padding: 10px var(--gutter) 12px; }
  .persona-preview { grid-template-columns: 40px 1fr; gap: 10px; min-height: 40px; }
  .persona-portrait { width: 40px; height: 40px; font-size: 15px; }
  .persona-meta .pitch { -webkit-line-clamp: 1; }
}

/* ============================================================
   "View past attempts" trigger + results modal (no auth, email-keyed)
   ============================================================ */
.results-trigger {
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brevet-blue);
  cursor: pointer;
  text-align: left;
}
.results-trigger:hover { text-decoration: underline; }

.results-modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.results-modal[hidden] { display: none; }
.results-modal__overlay {
  position: absolute; inset: 0;
  background: rgba(20, 23, 28, 0.55);
  backdrop-filter: blur(4px);
}
.results-modal__card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(82vh, 720px);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
}
.results-modal__close {
  position: absolute;
  top: 12px; right: 14px;
  background: none; border: 0;
  font-size: 28px; line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  padding: 4px 8px;
}
.results-modal__close:hover { color: var(--ink); }
.results-modal__header {
  padding: 28px 32px 16px;
  border-bottom: 1px solid var(--rule);
}
.results-modal__email {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-top: 6px;
  word-break: break-all;
}
.results-modal__body {
  padding: 16px 32px 28px;
  overflow: auto;
}
.results-modal__empty {
  padding: 36px 8px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.5;
}
.results-modal__error { color: var(--signal-danger); }

.results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.results-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--rule);
}
.results-row:last-child { border-bottom: 0; }
.results-row__meta { min-width: 0; }
.results-row__title {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.results-row__sub {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.results-row__score {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  min-width: 76px;
  text-align: center;
}
.results-row__score.is-great { background: var(--brevet-blue); color: #fff; border-color: var(--brevet-blue); }
.results-row__score.is-good  { background: var(--surface-2); }
.results-row__score.is-poor  { background: var(--brevet-gray); color: #fff; border-color: var(--brevet-gray); }
.results-row__score.is-pending,
.results-row__score.is-error { color: var(--ink-3); font-size: 11px; }

.results-row__win {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 8px;
  border: 1px solid var(--rule);
}
.results-row__win.is-win    { background: var(--signal-good); color: #fff; border-color: var(--signal-good); }
.results-row__win.is-no-win { color: var(--ink-3); }

.results-row__view {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brevet-blue);
  white-space: nowrap;
  text-decoration: none;
}
.results-row__view:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .results-modal__card { max-height: 92vh; }
  .results-modal__header { padding: 22px 20px 14px; }
  .results-modal__body   { padding: 12px 20px 22px; }
  .results-row {
    grid-template-columns: 1fr auto;
    gap: 6px 14px;
  }
  .results-row__win  { grid-column: 1 / 2; justify-self: start; }
  .results-row__view { grid-column: 2 / 3; }
}
