/* Betty demo — clean minimal styles for the SDK-only trainer.
   Walmart Insurance Services / Sunfire palette per docs/SUNFIRE_DESIGN_SPEC.md
   in the monorepo: navy #2b71da, soft borders, white cards on light bg. */

:root {
  --navy: #2b71da;
  --navy-dark: #1f56b0;
  --bg: #f4f7fb;
  --card-bg: #ffffff;
  --border: #d9e3ef;
  --text: #1b2333;
  --text-soft: #5b6679;
  --danger: #d9342b;
  --danger-soft: #fff0ee;
  --ok: #2f9d63;
  --ok-soft: #eaf7ef;
  --warn: #d49814;
  --warn-soft: #fbf5e6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 50, 0.04), 0 8px 24px rgba(20, 30, 50, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.brand-header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.brand-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-mark .brand-walmart {
  font-weight: 800;
  font-size: 22px;
  color: var(--navy);
}

.brand-mark .brand-insurance {
  font-weight: 700;
  font-size: 22px;
  color: #fdbb2f;
  margin-left: 6px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-soft);
  max-width: 480px;
}

.brand-product {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.brand-name {
  font-weight: 800;
  font-size: 17px;
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-soft);
}

/* ── Main layout ───────────────────────────────────────────────────── */

main {
  max-width: 1300px;
  margin: 30px auto;
  padding: 0 28px 60px;
}

/* ── Pre-call: scenario picker grid ───────────────────────────────── */

.pre-call {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.picker-header {
  text-align: center;
  max-width: 640px;
}

.picker-header h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.picker-header .picker-subtitle {
  color: var(--text-soft);
  font-size: 14px;
  margin: 0;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1240px;
}

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

@media (max-width: 580px) {
  .scenario-grid { grid-template-columns: 1fr; }
}

.scenario-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.05s, box-shadow 0.15s;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 240px;
}

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

.scenario-card:active {
  transform: translateY(0);
}

.scenario-card.is-selected {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(43, 113, 218, 0.20), var(--shadow);
}

.scenario-card--safety {
  border-color: var(--danger);
}

.scenario-card--safety:hover {
  border-color: var(--danger);
}

.scenario-tag--safety {
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
}

.scenario-card-top {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.scenario-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 50px;
  white-space: nowrap;
}

.scenario-badge--inbound  { background: #e6f2ff; color: #1f56b0; }
.scenario-badge--outbound { background: #fff5e6; color: #8a5a0c; }
.scenario-badge--easy     { background: var(--ok-soft);     color: var(--ok); }
.scenario-badge--medium   { background: var(--warn-soft);   color: var(--warn); }
.scenario-badge--hard     { background: var(--danger-soft); color: var(--danger); }

.scenario-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.scenario-emoji {
  margin-right: 6px;
  font-size: 18px;
}

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

.scenario-blurb {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  flex: 1;
}

.scenario-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.scenario-tag {
  background: var(--bg);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 50px;
  white-space: nowrap;
}

/* ── Start area — appears after a scenario is picked ─────────────── */

.start-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.start-area.hidden {
  display: none;
}

/* ── Buttons ───────────────────────────────────────────────────────── */

button {
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  padding: 12px 20px;
  transition: background 0.15s, transform 0.05s;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.primary {
  background: var(--navy);
  color: white;
}

button.primary:hover:not(:disabled) {
  background: var(--navy-dark);
}

button.primary.big {
  font-size: 18px;
  padding: 16px 36px;
  border-radius: 50px;
}

button.danger {
  background: var(--danger);
  color: white;
}

button.danger:hover:not(:disabled) {
  background: #b32a22;
}

/* ── Status pill ───────────────────────────────────────────────────── */

.status-row {
  display: flex;
  justify-content: center;
}

.status-pill {
  background: white;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  color: var(--text-soft);
}

.status-pill.connecting {
  background: var(--warn-soft);
  border-color: var(--warn);
  color: var(--warn);
}

.status-pill.active {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok);
}

.status-pill.error {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

/* ── Header history button ────────────────────────────────────────── */

.history-button-slot {
  margin-left: auto;
}

.history-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.history-btn:hover {
  background: white;
  border-color: var(--navy);
}

.history-btn-count {
  background: var(--navy);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 50px;
  margin-left: 4px;
}

/* ── History modal ────────────────────────────────────────────────── */

.modal-body--wide {
  max-width: 820px;
}

.history-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.history-modal-actions {
  display: flex;
  gap: 8px;
}

button.small {
  padding: 6px 14px;
  font-size: 13px;
}

.history-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.history-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  margin-bottom: -1px;
}

.history-tab:hover { color: var(--text); }

.history-tab.is-active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.history-list.hidden,
.analytics-view.hidden {
  display: none;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Analytics view ──────────────────────────────────────────────── */

.analytics-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-soft);
}

.analytics-empty-sub {
  font-size: 13px;
  opacity: 0.75;
}

.analytics-header {
  margin-bottom: 14px;
}

.analytics-trainee-name {
  font-weight: 800;
  font-size: 16px;
}

.analytics-trainee-role {
  font-size: 12px;
  color: var(--text-soft);
}

.analytics-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.analytics-tile {
  background: var(--bg);
  border-radius: 8px;
  padding: 14px 16px;
}

.analytics-tile-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.analytics-tile-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.trend-up   { color: var(--ok); }
.trend-down { color: var(--danger); }
.trend-flat { color: var(--text-soft); }

.analytics-view h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin: 20px 0 8px;
}

.analytics-view .dim { color: var(--text-soft); font-weight: 500; }

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.analytics-table th {
  text-align: left;
  padding: 6px 8px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-soft);
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
}

.analytics-table td {
  padding: 8px;
  border-bottom: 1px solid var(--bg);
}

.grade-cell { font-weight: 700; }
.grade-a { color: var(--ok); }
.grade-b { color: var(--ok); opacity: 0.85; }
.grade-c { color: var(--warn); }
.grade-d { color: var(--warn); opacity: 0.85; }
.grade-f { color: var(--danger); }
.grade-n { color: var(--text-soft); }

.analytics-disclosure {
  display: grid;
  grid-template-columns: 1fr 180px 50px;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}

.analytics-disclosure-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.analytics-disclosure-bar {
  background: var(--bg);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.analytics-disclosure-fill {
  height: 100%;
  transition: width 0.5s;
}

.analytics-disclosure-pct {
  font-weight: 700;
  text-align: right;
}

.analytics-end-reasons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.analytics-end-row {
  display: grid;
  grid-template-columns: 200px 1fr 40px;
  gap: 12px;
  align-items: center;
}

.analytics-end-bar {
  background: var(--bg);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.analytics-end-bar > span {
  display: block;
  height: 100%;
  background: var(--navy);
}

.analytics-end-count {
  font-weight: 700;
  text-align: right;
}

/* ── Phase 15A: progress + sparklines ─────────────────────────── */

.analytics-progress-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.analytics-sparkline {
  display: block;
}

.analytics-sparkline-dash {
  font-size: 12px;
}

.analytics-table--progress td:last-child {
  width: 110px;
}

/* ── Phase 15B: Easy Mode toggle + pre-call brief ──────────────── */

.easy-mode-toggle {
  background: rgba(0,0,0,0.05);
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 6px;
}

.easy-mode-toggle:hover { background: rgba(0,0,0,0.08); }

.easy-mode-toggle.is-on {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: var(--ok);
}

.easy-mode-state {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-left: 4px;
}

.precall-brief-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
}

.precall-brief-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.precall-brief-body {
  position: relative;
  background: white;
  margin: 4vh auto;
  width: min(640px, 92vw);
  max-height: 90vh;
  border-radius: 14px;
  padding: 24px 30px;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

.precall-brief-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ok);
  margin-bottom: 4px;
}

.precall-brief-title {
  margin: 0;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.precall-brief-diff {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
}

.precall-brief-diff--easy { background: var(--ok-soft); color: var(--ok); }
.precall-brief-diff--medium { background: var(--warn-soft); color: var(--warn); }
.precall-brief-diff--hard { background: var(--danger-soft); color: var(--danger); }

.precall-brief-dir {
  font-size: 12px;
  color: var(--text-soft);
}

.precall-brief-location {
  font-size: 12px;
  margin-top: 4px;
}

.precall-brief-section {
  margin-top: 18px;
}

.precall-brief-section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin: 0 0 6px;
}

.precall-brief-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.precall-brief-tests {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
}

.precall-brief-tests li { margin-bottom: 3px; }

.precall-brief-history {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px 14px;
}

.precall-brief-history-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.precall-brief-history-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 800;
  border: 2px solid;
}

.precall-brief-history-grade--a { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.precall-brief-history-grade--b { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); opacity: 0.8; }
.precall-brief-history-grade--c { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.precall-brief-history-grade--d { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); opacity: 0.8; }
.precall-brief-history-grade--f { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.precall-brief-history-grade--n { background: white; color: var(--text-soft); border-color: var(--border); }

.precall-brief-history-tips {
  margin-top: 8px;
  font-size: 13px;
}

.precall-brief-history-tips ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.precall-brief-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

/* ── Phase 15D: scorecard coaching tips ────────────────────────── */

.sc-tips {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.sc-tip {
  background: var(--bg);
  border-left: 4px solid;
  border-radius: 6px;
  padding: 10px 14px;
}

.sc-tip--high   { border-left-color: var(--danger); }
.sc-tip--medium { border-left-color: var(--warn); }
.sc-tip--low    { border-left-color: var(--text-soft); }

.sc-tip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 14px;
}

.sc-tip-sev {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 1px 7px;
  border-radius: 4px;
}

.sc-tip-sev--high   { background: var(--danger-soft); color: var(--danger); }
.sc-tip-sev--medium { background: var(--warn-soft); color: var(--warn); }
.sc-tip-sev--low    { background: rgba(0,0,0,0.06); color: var(--text-soft); }

.sc-tip-script {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 14px;
}

.sc-tip-script-quote {
  flex: 1;
  font-style: italic;
  color: var(--text);
  background: white;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.sc-tip-copy {
  font-size: 11px;
  padding: 4px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.sc-tip-copy:hover {
  background: rgba(0,0,0,0.04);
}

/* ── Phase 16A: phone-sales framework dashboard ────────────────── */

.sc-frameworks {
  margin: 18px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  background: var(--bg);
}

.sc-frameworks summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.sc-frameworks-avg {
  background: rgba(99, 102, 241, 0.15);
  color: rgb(99, 102, 241);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 50px;
}

.sc-frameworks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.sc-framework {
  background: white;
  border-left: 4px solid;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
}

.sc-framework--ok   { border-left-color: var(--ok); }
.sc-framework--warn { border-left-color: var(--warn); }
.sc-framework--bad  { border-left-color: var(--danger); }
.sc-framework--n    { border-left-color: var(--border); opacity: 0.7; }

.sc-framework-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sc-framework-icon { font-size: 20px; flex-shrink: 0; }
.sc-framework-title { flex: 1; }

.sc-framework-score {
  font-weight: 800;
  font-size: 14px;
  padding: 2px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}

.sc-framework-score--ok   { background: var(--ok-soft); color: var(--ok); }
.sc-framework-score--warn { background: var(--warn-soft); color: var(--warn); }
.sc-framework-score--bad  { background: var(--danger-soft); color: var(--danger); }
.sc-framework-score--n    { background: rgba(0,0,0,0.06); color: var(--text-soft); }

.sc-framework-summary { margin-top: 6px; }

.sc-framework-quote {
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.04);
  border-radius: 4px;
  font-style: italic;
  font-size: 12px;
  color: var(--text-soft);
}

.sc-framework-tip {
  margin-top: 6px;
  font-size: 12px;
}

/* ── Phase 16C: pre-call brief framework chips ─────────────────── */

.precall-brief-frameworks { }

.precall-brief-framework-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.precall-brief-framework-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 50px;
  background: rgba(99, 102, 241, 0.10);
  color: rgb(99, 102, 241);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(99, 102, 241, 0.3);
  cursor: help;
}

.precall-brief-framework-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════ */
/* Phase 17 — alert-first in-call UX (sunfire-newui.purlpal.ai)    */
/* ═══════════════════════════════════════════════════════════════ */

/* ── 17A: Top-of-screen alert banner ────────────────────────── */

.alert-banner-host {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  width: min(720px, calc(100vw - 24px));
  pointer-events: none;          /* let clicks pass through gaps */
}

.alert-banner {
  position: relative;
  pointer-events: auto;          /* but banners themselves are interactive */
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px 16px;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  line-height: 1.4;
  animation: alert-slide-in 0.20s ease-out;
  overflow: hidden;
}

.alert-banner--critical {
  background: rgb(239, 68, 68);
  color: white;
}

.alert-banner--warning {
  background: rgb(245, 158, 11);
  color: rgb(28, 25, 23);
}

.alert-banner--info {
  background: rgb(59, 130, 246);
  color: white;
}

.alert-banner-body { flex: 1; }
.alert-banner-title { display: block; font-size: 15px; font-weight: 800; }
.alert-banner-detail { display: block; margin-top: 3px; opacity: 0.95; }

.alert-banner-close {
  background: rgba(255, 255, 255, 0.2);
  border: 0;
  color: inherit;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.alert-banner-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Phase 17.3 — the TTL bar used to update every 250ms which read as
   flashing/twitching. Make it a soft, very low-contrast hairline and
   transition slowly so it just slides instead of jittering. */
.alert-banner-ttl {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
  transition: width 1.6s linear;
}

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

/* ── 17C: 70/30 talk-balance bar ───────────────────────────── */

.talk-balance {
  margin-top: 10px;
}

.tb-shell {
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.tb-shell--idle .tb-label {
  font-size: 11px;
  color: var(--text-soft);
  font-style: italic;
}

.tb-shell--ok   { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.06); }
.tb-shell--warn { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); }
.tb-shell--bad  { border-color: rgba(239, 68, 68, 0.5); background: rgba(239, 68, 68, 0.10); }

.tb-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.tb-fill-agent    { background: rgb(99, 102, 241); transition: width 0.3s; }
.tb-fill-customer { background: rgb(34, 197, 94);  transition: width 0.3s; }
.tb-shell--bad .tb-fill-agent { background: rgb(239, 68, 68); }

.tb-ratio {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
}

.tb-ratio-agent    { color: rgb(99, 102, 241); }
.tb-ratio-customer { color: rgb(34, 197, 94); }
.tb-shell--bad .tb-ratio-agent { color: rgb(239, 68, 68); }

.tb-label {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-soft);
}

.tb-shell--bad .tb-label { color: rgb(239, 68, 68); font-weight: 600; }

/* ── 17E: Aggressive disclosure timing ─────────────────────── */

/* Phase 17.1 — only one chip pulses at a time. The rest just show their
   color so the agent gets the "where am I" picture at a glance without
   the strobe-light feel of every overdue chip pulsing in sync. */

.cc-chip.is-warn {
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.45);
  color: rgb(180, 83, 9);
}

.cc-chip.is-crit {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.65);
  color: rgb(185, 28, 28);
  font-weight: 700;
}

/* Only the single most-overdue unmet disclosure animates. */
.cc-chip.is-warn.is-urgent {
  animation: cc-warn-pulse 3.5s ease-in-out infinite;
}

.cc-chip.is-crit.is-urgent {
  animation: cc-crit-pulse 2.2s ease-in-out infinite;
}

@keyframes cc-warn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.25); }
  50%      { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.0); }
}

@keyframes cc-crit-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
  50%      { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.0); }
}

/* ── Admin view (cross-trainee dashboard, opt-in via ?admin) ────── */

.admin-view.hidden, .history-tab.hidden { display: none; }

.admin-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-soft);
}

.admin-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.admin-title {
  font-size: 16px;
  font-weight: 800;
}

.admin-meta {
  font-size: 12px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

button.xsmall {
  padding: 3px 10px;
  font-size: 11px;
}

.admin-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.admin-tile {
  background: var(--bg);
  border-radius: 8px;
  padding: 14px 16px;
}

.admin-tile-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.admin-tile-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.admin-view h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin: 20px 0 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th {
  text-align: left;
  padding: 6px 8px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-soft);
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 8px;
  border-bottom: 1px solid var(--bg);
}

.score-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 12px;
}

.score-pill--a { background: var(--ok-soft); color: var(--ok); }
.score-pill--b { background: var(--ok-soft); color: var(--ok); opacity: 0.85; }
.score-pill--c { background: var(--warn-soft); color: var(--warn); }
.score-pill--f { background: var(--danger-soft); color: var(--danger); }
.score-pill--n { background: var(--bg); color: var(--text-soft); }

.admin-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 8px;
}

.admin-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
  flex: 1;
}

.admin-filters input, .admin-filters select {
  flex: 1;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font-family: inherit;
  font-size: 12px;
}

.admin-sessions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
}

.admin-session {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 12px;
}

.admin-session-grade {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  border: 2px solid;
  flex-shrink: 0;
}

.admin-session-grade--a { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.admin-session-grade--b { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); opacity: 0.85; }
.admin-session-grade--c { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.admin-session-grade--d { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); opacity: 0.85; }
.admin-session-grade--f { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.admin-session-grade--n { background: white; color: var(--text-soft); border-color: var(--border); }

.admin-session-main { flex: 1; min-width: 0; }

.admin-session-line1 { font-size: 14px; }
.admin-session-line2 {
  font-size: 12px;
  margin-top: 2px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-session-pill {
  font-size: 10px;
  padding: 1px 8px;
  border-radius: 50px;
  background: white;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-weight: 600;
}

.admin-live-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.10), rgba(34, 197, 94, 0.02));
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  flex-wrap: wrap;
}

.admin-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: live-pulse 1.4s ease-out infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.admin-live-pill {
  padding: 2px 10px;
  border-radius: 50px;
  background: white;
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.admin-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.admin-session { cursor: pointer; transition: background 0.15s; }
.admin-session:hover { background: rgba(0,0,0,0.04); }

.admin-seed-tag, .admin-real-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
}
.admin-seed-tag { background: rgba(0,0,0,0.06); color: var(--text-soft); }
.admin-real-tag { background: rgba(59, 130, 246, 0.15); color: rgb(37, 99, 235); }

.admin-session-pill--link {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: rgb(37, 99, 235);
}

/* ── Session detail modal ──────────────────────────────────────── */

.admin-detail-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.admin-detail-modal.is-open { display: block; }

.admin-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.admin-detail-body {
  position: relative;
  background: white;
  margin: 5vh auto;
  width: min(880px, 92vw);
  max-height: 88vh;
  border-radius: 12px;
  padding: 22px 28px;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.admin-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.admin-detail-summary {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.admin-detail-grade {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  border: 3px solid;
  flex-shrink: 0;
}

.admin-detail-grade--a { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.admin-detail-grade--b { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); opacity: 0.85; }
.admin-detail-grade--c { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.admin-detail-grade--d { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); opacity: 0.85; }
.admin-detail-grade--f { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.admin-detail-grade--n { background: white; color: var(--text-soft); border-color: var(--border); }

.admin-detail-title { font-size: 16px; font-weight: 700; }
.admin-detail-scores { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.admin-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono, "SF Mono", Menlo, monospace);
  font-size: 12px;
  background: var(--bg);
  border-radius: 8px;
  padding: 12px 14px;
  max-height: 50vh;
  overflow-y: auto;
}

.admin-timeline-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  line-height: 1.4;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-left-color 0.15s;
  border-left: 3px solid transparent;
}

.admin-timeline-row:hover {
  background: rgba(99, 102, 241, 0.08);
}

.admin-timeline-row.is-playing {
  background: rgba(99, 102, 241, 0.18);
  border-left-color: rgb(99, 102, 241);
  font-weight: 600;
}

.admin-timeline-row.is-annotation {
  background: rgba(234, 179, 8, 0.10);
  border-left-color: rgb(202, 138, 4);
}

.admin-timeline-row.is-annotation.is-playing {
  background: rgba(234, 179, 8, 0.22);
}

.admin-timeline-offset {
  color: var(--text-soft);
  font-weight: 600;
  flex-shrink: 0;
  width: 44px;
}

.admin-timeline-icon { width: 18px; flex-shrink: 0; }

.admin-timeline-body { flex: 1; }
.admin-timeline-body em { font-style: italic; color: var(--text-soft); }
.admin-timeline-body strong { font-weight: 700; }

/* ── 14B: coach review block ──────────────────────────────────── */

.admin-coach-review {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.03);
}

.admin-coach-review summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.admin-coach-count {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  background: rgba(99, 102, 241, 0.15);
  color: rgb(99, 102, 241);
  padding: 1px 8px;
  border-radius: 50px;
  font-weight: 700;
}

.admin-coach-notes {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-coach-note {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}

.admin-coach-note-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
}

.admin-coach-note-body {
  margin-top: 6px;
  white-space: pre-wrap;
}

.admin-coach-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 1px 7px;
  background: rgba(99, 102, 241, 0.15);
  color: rgb(99, 102, 241);
  border-radius: 4px;
}

.admin-coach-tag--redo {
  background: rgba(244, 63, 94, 0.15);
  color: rgb(225, 29, 72);
}

.admin-coach-new {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
}

.admin-coach-new textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-sizing: border-box;
}

.admin-coach-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

.admin-coach-actions input[type="text"],
.admin-coach-actions select {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
}

.admin-coach-redo-toggle {
  font-size: 12px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.admin-grade-override-tag,
.admin-needs-redo-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 1px 7px;
  margin-left: 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.admin-grade-override-tag {
  background: rgba(99, 102, 241, 0.15);
  color: rgb(99, 102, 241);
}

.admin-needs-redo-tag {
  background: rgba(244, 63, 94, 0.15);
  color: rgb(225, 29, 72);
}

/* ── 14C: system health modal ─────────────────────────────────── */

.admin-health-content { font-size: 13px; }

.admin-health-overall {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(0,0,0,0.04);
}

.admin-health-overall--ok   { background: var(--ok-soft); color: var(--ok); }
.admin-health-overall--warn { background: var(--warn-soft); color: var(--warn); }
.admin-health-overall--down { background: var(--danger-soft); color: var(--danger); }

.admin-health-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 6px;
}

.admin-health-row--ok   { border-left-color: var(--ok); }
.admin-health-row--warn { border-left-color: var(--warn); }
.admin-health-row--down { border-left-color: var(--danger); }

.admin-health-status {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.admin-health-status--ok   { background: var(--ok-soft); color: var(--ok); }
.admin-health-status--warn { background: var(--warn-soft); color: var(--warn); }
.admin-health-status--down { background: var(--danger-soft); color: var(--danger); }

.admin-health-row-body { flex: 1; }
.admin-health-row-details { color: var(--text-soft); font-size: 12px; margin-top: 2px; }
.admin-health-detail-pair { margin-right: 8px; }

.admin-detail-recording {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.02));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 14px 0;
}

/* ── Recording-consent modal ─────────────────────────────────── */

.recording-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.recording-consent-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.recording-consent-body {
  position: relative;
  background: white;
  margin: 18vh auto;
  width: min(440px, 92vw);
  padding: 26px 28px;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.recording-consent-body h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.recording-consent-body p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
}

.recording-consent-body .dim {
  color: var(--text-soft);
  font-size: 13px;
}

.recording-consent-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
}

.analytics-plans {
  background: var(--bg);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13px;
}

.analytics-plan-stat strong {
  font-size: 22px;
  color: var(--navy);
  font-weight: 800;
  margin-right: 8px;
}

.analytics-plan-top {
  margin-top: 12px;
}

.analytics-plan-top ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.analytics-plan-top li {
  margin: 2px 0;
}

.analytics-plan-top code {
  background: white;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text);
}

.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-soft);
}

.history-empty-sub {
  font-size: 13px;
  opacity: 0.7;
}

.history-row {
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.history-row:hover {
  background: white;
  border-color: var(--border);
}

.history-row.is-expanded {
  background: white;
  border-color: var(--navy);
  cursor: default;
}

.history-row-summary {
  display: flex;
  align-items: center;
  gap: 14px;
}

.history-row-grade {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  border: 2px solid;
  flex-shrink: 0;
}

.history-grade--a { background: var(--ok-soft);     color: var(--ok);    border-color: var(--ok);    }
.history-grade--b { background: var(--ok-soft);     color: var(--ok);    border-color: var(--ok);    opacity: 0.85; }
.history-grade--c { background: var(--warn-soft);   color: var(--warn);  border-color: var(--warn);  }
.history-grade--d { background: var(--warn-soft);   color: var(--warn);  border-color: var(--warn);  opacity: 0.85; }
.history-grade--f { background: var(--danger-soft); color: var(--danger);border-color: var(--danger);}
.history-grade--n { background: var(--bg);          color: var(--text-soft); border-color: var(--border);}

.history-row-main {
  flex: 1;
  min-width: 0;
}

.history-row-name {
  font-weight: 700;
  font-size: 15px;
}

.history-row-meta {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.history-row-attempt {
  background: var(--bg);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 50px;
  margin-left: 8px;
  text-transform: lowercase;
  letter-spacing: 0.2px;
}

.history-row-chevron {
  font-size: 14px;
  color: var(--text-soft);
}

.history-detail {
  padding: 16px 4px 4px;
  border-top: 1px dashed var(--border);
  margin-top: 12px;
}

.history-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.history-detail h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin: 16px 0 6px;
}

.history-detail ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.history-detail li {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.5;
}

.history-disclosures {
  list-style: none !important;
  padding-left: 0 !important;
}

.history-disclosures li {
  padding: 4px 0;
  font-weight: 600;
}

.history-disclosures li.is-met    { color: var(--ok); }
.history-disclosures li.is-missed { color: var(--text-soft); opacity: 0.6; }

.history-disclosure-time {
  color: var(--text-soft);
  font-weight: 500;
  font-size: 12px;
}

.history-plans-discussed {
  list-style: none !important;
  padding-left: 0 !important;
}

.history-plans-discussed li {
  padding: 3px 0;
}

.history-plans-discussed code {
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text);
}

.history-transcript-details {
  margin-top: 12px;
  font-size: 13px;
}

.history-transcript-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.history-transcript {
  background: var(--bg);
  padding: 12px 14px;
  border-radius: 8px;
  margin-top: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.history-turn {
  margin: 6px 0;
  line-height: 1.45;
}

.history-turn-speaker {
  font-weight: 700;
  color: var(--navy);
  margin-right: 6px;
}

.history-turn--customer .history-turn-speaker { color: var(--warn); }

/* ── Header trainee pill ──────────────────────────────────────────── */

.trainee-pill-slot {
  margin-left: 14px;
}

.trainee-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.trainee-pill:hover {
  background: white;
  border-color: var(--navy);
}

.trainee-pill-hi {
  color: var(--text-soft);
}

.trainee-pill-name {
  font-weight: 700;
  color: var(--text);
}

.trainee-pill-role {
  color: var(--text-soft);
  font-size: 12px;
}

.trainee-pill--guest {
  border-style: dashed;
  color: var(--text-soft);
}

/* ── Trainee onboarding modal ─────────────────────────────────────── */

.modal-body--narrow {
  max-width: 480px;
}

.trainee-modal-intro {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 18px;
}

.trainee-field {
  display: block;
  margin-bottom: 14px;
}

.trainee-field > span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.trainee-field .required {
  color: var(--danger);
  font-style: normal;
}

.trainee-field .optional {
  color: var(--text-soft);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}

.trainee-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: white;
}

.trainee-field input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(43, 113, 218, 0.15);
}

.trainee-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.trainee-modal-actions .primary {
  flex: 1;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
}

button.ghost:hover {
  border-color: var(--text-soft);
  color: var(--text);
}

/* ── Error card (mic denied, mic missing, mic busy, token, unknown) ─── */

.error-card {
  display: flex;
  gap: 16px;
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 16px;
  max-width: 640px;
  box-shadow: var(--shadow);
  align-items: flex-start;
}

.error-card.hidden {
  display: none;
}

.error-card-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.error-card-body {
  flex: 1;
}

.error-card-title {
  font-weight: 800;
  color: var(--danger);
  margin-bottom: 4px;
  font-size: 15px;
}

.error-card-help {
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.error-card-help code {
  background: white;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── Call area ─────────────────────────────────────────────────────── */

/* 17.11 — call area is ALWAYS rendered so scrollTo works the moment
   Start is clicked. Before the call begins it sits visible but mostly
   empty (panels show "Listening…" placeholders, timer reads 00:00).
   The .active class only adds the highlight ring, no longer toggles
   visibility. */
.call-area {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: stretch;
  opacity: 0.55;                 /* dimmer when no active call */
  transition: opacity 0.25s;
  pointer-events: none;          /* not interactive until active */
}

.call-area.active {
  opacity: 1;
  pointer-events: auto;
}

.call-area:not(.active) #end-btn {
  visibility: hidden;            /* End-call button hidden pre-call */
}

.speaker-panel {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}

.speaker-panel.speaking {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(43, 113, 218, 0.18);
}

.speaker-label {
  font-size: 18px;
  font-weight: 800;
}

.speaker-status {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 600;
}

.speaker-transcript {
  flex: 1;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
}

.call-middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 200px;
}

.call-timer {
  font-size: 42px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.call-active-pill {
  background: var(--ok-soft);
  color: var(--ok);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
}

.compliance-indicator {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
  min-height: 24px;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}

.compliance-indicator.pulse {
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
  transform: scale(1.05);
}

/* ── Live CMS disclosures checklist (mid-call) ───────────────────── */

.compliance-checklist {
  width: 220px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 8px 0;
}

.cc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cc-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cc-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 50px;
}

.cc-chips {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cc-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg);
  transition: background 0.2s, color 0.2s, transform 0.3s, box-shadow 0.3s;
}

.cc-chip .cc-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  color: var(--text-soft);
}

.cc-chip.is-met {
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 600;
}

.cc-chip.is-met .cc-icon {
  background: var(--ok);
  border-color: var(--ok);
  color: white;
  font-weight: 700;
}

.cc-chip.cc-pulse {
  transform: scale(1.04);
  box-shadow: 0 0 0 2px rgba(47, 157, 99, 0.30);
}

/* ── Plans panel (slide-out drawer during call) ──────────────────── */

.plans-toggle-btn {
  position: fixed;
  top: 90px;
  right: 0;
  background: var(--navy);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px 0 0 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(20, 30, 50, 0.15);
  transition: padding 0.15s, background 0.15s;
}

.plans-toggle-btn:hover {
  background: var(--navy-dark);
  padding-right: 22px;
}

.call-area:not(.active) .plans-toggle-btn {
  display: none;
}

.plans-panel {
  position: fixed;
  top: 80px;
  right: 0;
  bottom: 20px;
  width: 420px;
  background: white;
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 18px rgba(20, 30, 50, 0.10);
  z-index: 49;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s;
  border-radius: 12px 0 0 12px;
}

.plans-panel.is-closed {
  transform: translateX(100%);
}

.plans-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.plans-title {
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plans-live-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 50px;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok);
  animation: live-pulse 1.6s ease-out infinite;
}

.plans-loading-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 50px;
  background: rgba(0,0,0,0.06);
  color: var(--text-soft);
  font-style: italic;
}

.plans-mock-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 50px;
  background: rgba(0,0,0,0.06);
  color: var(--text-soft);
}

.plan-drug-tiers {
  margin-top: 10px;
  padding: 8px 10px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.08), rgba(168, 85, 247, 0.02));
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 6px;
}

.plan-drug-tiers-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.plan-drug-tier {
  display: inline-block;
  margin: 2px 4px 2px 0;
  font-size: 11px;
  padding: 2px 6px;
  background: white;
  border-radius: 4px;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

/* ── Drug-lookup card in the plans drawer (Phase 11D) ──────── */

.plans-drug-lookup {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.05), rgba(168, 85, 247, 0.01));
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0 14px;
}

.plans-drug-lookup-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 5px;
}

.plans-drug-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.plans-drug-input {
  flex: 1;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font-family: inherit;
  font-size: 13px;
}

.plans-drug-input:focus {
  outline: none;
  border-color: rgb(168, 85, 247);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.plans-drug-card {
  margin-top: 8px;
  background: white;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
}

.plans-drug-canonical { font-size: 14px; }
.plans-drug-meta { color: var(--text-soft); margin-top: 2px; font-size: 11px; }

.plans-drug-combo {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(168, 85, 247, 0.15);
  color: rgb(126, 34, 206);
  border-radius: 4px;
}

.plans-drug-source {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 4px;
  vertical-align: middle;
}

.plans-drug-source--bundle {
  background: var(--ok-soft);
  color: var(--ok);
}

.plans-drug-source--live {
  background: rgba(168, 85, 247, 0.15);
  color: rgb(126, 34, 206);
}

.plans-drug-tiers-head {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
}

.plans-drug-tiers-list {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 12px;
}

.plans-drug-tiers-list li { margin-bottom: 2px; }

.plans-drug-not-found {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.04);
  color: var(--text-soft);
  font-size: 12px;
  border-radius: 6px;
}

/* ── Provider / pharmacy network lookup cards (Phases 11F, 11G) ── */

.plans-net-lookup {
  border: 1px solid;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
}

.plans-net-lookup--provider {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.01));
  border-color: rgba(59, 130, 246, 0.25);
}

.plans-net-lookup--pharmacy {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.05), rgba(34, 197, 94, 0.01));
  border-color: rgba(34, 197, 94, 0.25);
}

.plans-net-lookup-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 5px;
}

.plans-net-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.plans-net-input {
  flex: 1;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font-family: inherit;
  font-size: 13px;
}

.plans-net-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 13px;
}

.plans-net-list li {
  background: white;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 4px;
  border: 1px solid var(--border);
}

.plans-net-meta {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 2px;
}

.plans-net-empty {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.04);
  color: var(--text-soft);
  font-size: 12px;
  border-radius: 6px;
}

.plans-subtitle {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.plans-close {
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.plans-close:hover { background: var(--bg); }

.plans-filters {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.plans-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.plans-filter-row:last-child { margin-bottom: 0; }

.plans-filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  width: 80px;
}

.plans-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.plans-chip {
  background: white;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 3px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.plans-chip:hover { border-color: var(--navy); color: var(--text); }

.plans-chip.is-active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.plans-select {
  flex: 1;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
}

.plans-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px 18px;
}

.plans-empty {
  padding: 30px 18px;
  color: var(--text-soft);
  text-align: center;
  font-size: 13px;
}

.plan-row {
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 8px;
  margin-bottom: 6px;
  transition: border-color 0.15s;
}

.plan-row.was-discussed {
  border-color: var(--ok);
  background: var(--ok-soft);
}

.plan-row-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.plan-row:hover { border-color: var(--navy); }

.plan-row-main { flex: 1; min-width: 0; }

.plan-row-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-snp-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.plan-snp-badge--dsnp { background: #e6f2ff; color: #1f56b0; }
.plan-snp-badge--csnp { background: var(--warn-soft); color: var(--warn); }
.plan-snp-badge--isnp { background: var(--ok-soft); color: var(--ok); }

.plan-row-meta {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 1px;
}

.plan-row-price { text-align: right; flex-shrink: 0; }

.plan-price {
  font-weight: 800;
  font-size: 14px;
}

.plan-moop {
  font-size: 10px;
  color: var(--text-soft);
}

.plan-row-detail {
  border-top: 1px dashed var(--border);
  padding: 10px 12px;
  font-size: 12px;
}

.plan-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin-bottom: 8px;
}

.plan-detail-grid .dim { color: var(--text-soft); font-weight: 600; }

.plan-benefits { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

.plan-benefit-chip {
  background: white;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 1px 8px;
  font-size: 10px;
  color: var(--text-soft);
}

.plan-discussed-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--ok);
  font-weight: 700;
}

/* ── Scorecard modal ───────────────────────────────────────────────── */

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 30, 50, 0.45);
}

.modal-body {
  position: relative;
  background: white;
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 720px;
  width: calc(100% - 40px);
  margin: 60px auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.sc-grade {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.sc-grade-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--warn-soft);
  color: var(--warn);
  border: 3px solid var(--warn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 800;
}

.sc-reason {
  font-size: 17px;
  color: var(--text-soft);
}

.sc-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.sc-bar {
  display: grid;
  grid-template-columns: 160px 1fr 50px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.sc-bar-label {
  color: var(--text-soft);
  font-weight: 600;
}

.sc-bar-track {
  background: var(--bg);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.sc-bar-fill {
  background: var(--ok);
  height: 100%;
  transition: width 0.5s;
}

.sc-bar-val {
  font-weight: 700;
  text-align: right;
}

.sc-disclosures {
  background: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin: 16px 0;
}

.modal-body h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin: 20px 0 6px;
}

.modal-body ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.modal-body li {
  margin: 6px 0;
  line-height: 1.5;
}

.modal-body pre {
  background: var(--bg);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
}

.modal.loading .modal-body {
  position: relative;
}

#close-scorecard-btn {
  margin-top: 18px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* Phase 18 — plan shortlist + AI search + voice search            */
/* ═══════════════════════════════════════════════════════════════ */

.plans-aisearch {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
}

.plans-aisearch-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.plans-ai-input {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  background: var(--bg);
}

.plans-ai-input:focus {
  outline: none;
  border-color: rgb(99, 102, 241);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: white;
}

.plans-ai-mic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.plans-ai-mic:hover { background: rgba(99, 102, 241, 0.1); }

.plans-ai-mic.is-listening {
  background: rgb(239, 68, 68);
  border-color: rgb(239, 68, 68);
  animation: mic-pulse 0.9s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50%      { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.plans-aisearch-status {
  margin-top: 6px;
  font-size: 12px;
}

.plans-aisearch-status--ok {
  color: var(--ok);
  font-weight: 600;
}

.plans-aisearch-status--error { color: var(--danger); }

.plans-aisearch-warning {
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(245, 158, 11, 0.15);
  color: rgb(180, 83, 9);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.plan-shortlist-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 1px dashed var(--border);
  font-size: 14px;
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.plan-shortlist-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgb(99, 102, 241);
  border-style: solid;
}

.plan-shortlist-btn.is-on {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgb(99, 102, 241);
  border-style: solid;
}

.plan-row.is-shortlisted {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), transparent);
  border-left: 3px solid rgb(99, 102, 241);
}

/* 17.4 — editable transcript styling */

.speaker-edit-hint {
  font-size: 10px;
  color: var(--text-soft);
  font-weight: 500;
  margin-left: 8px;
  opacity: 0.6;
}

.speaker-transcript[contenteditable="true"] {
  cursor: text;
  outline: none;
  transition: background 0.15s, box-shadow 0.15s;
  border-radius: 6px;
  padding: 4px;
  margin: -4px;          /* keep the visual padding consistent */
}

.speaker-transcript[contenteditable="true"]:hover {
  background: rgba(99, 102, 241, 0.04);
}

.speaker-transcript[contenteditable="true"]:focus {
  background: rgba(99, 102, 241, 0.07);
  box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.4);
}

/* 17.9 — older banners (>2s) get a subtle opacity drop so the newest at
   the top stands out. Hover restores full opacity. */
.alert-banner--older {
  opacity: 0.82;
  transition: opacity 0.2s;
}

.alert-banner--older:hover {
  opacity: 1;
}

/* 17.10 — persistent disclosure teleprompter under the chip grid */
.cc-helper {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.02));
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: 12px;
  line-height: 1.4;
}

.cc-helper-label {
  font-size: 11px;
  font-weight: 600;
  color: rgb(99, 102, 241);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cc-helper-label strong {
  font-weight: 800;
}

.cc-helper-phrase {
  margin-top: 4px;
  font-style: italic;
  color: var(--text);
  font-size: 13px;
}

.cc-helper--done {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok);
  font-weight: 600;
  font-style: normal;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════ */
/* Phase 19 — first-visit coach marks tour                         */
/* ═══════════════════════════════════════════════════════════════ */

.coachmarks-trigger {
  background: rgba(99, 102, 241, 0.10);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: rgb(99, 102, 241);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 6px;
}

.coachmarks-trigger:hover {
  background: rgba(99, 102, 241, 0.18);
}

.coachmarks-overlay {
  /* Set inline by JS — position, size, box-shadow halo */
  transition: top 0.25s ease-out, left 0.25s ease-out,
              width 0.25s ease-out, height 0.25s ease-out;
}

.coachmarks-tooltip {
  background: white;
  border-radius: 12px;
  padding: 18px 20px 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  font-size: 14px;
  line-height: 1.5;
  animation: coachmarks-pop-in 0.22s ease-out;
}

@keyframes coachmarks-pop-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.coachmarks-progress {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-soft);
  text-transform: uppercase;
}

.coachmarks-title {
  font-size: 17px;
  font-weight: 800;
  margin-top: 4px;
  margin-bottom: 8px;
}

.coachmarks-body { color: var(--text); margin-bottom: 16px; }

.coachmarks-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.coachmarks-nav {
  display: flex;
  gap: 6px;
}

.coachmarks-skip,
.coachmarks-prev,
.coachmarks-next,
.coachmarks-done {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}

.coachmarks-skip { color: var(--text-soft); border: 0; background: transparent; }
.coachmarks-skip:hover { color: var(--text); text-decoration: underline; }

.coachmarks-next,
.coachmarks-done {
  background: rgb(99, 102, 241);
  color: white;
  border-color: rgb(99, 102, 241);
}

.coachmarks-next:hover,
.coachmarks-done:hover {
  background: rgb(79, 82, 220);
}

/* Tooltip arrow pointing back at the target. The CSS pseudo-element
   creates the triangle; data-arrow attr says which side. */

.coachmarks-tooltip::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border: 8px solid transparent;
}

.coachmarks-tooltip[data-arrow="up"]::before {
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: white;
}

.coachmarks-tooltip[data-arrow="down"]::before {
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: white;
}

.coachmarks-tooltip[data-arrow="left"]::before {
  left: -16px;
  top: 24px;
  border-right-color: white;
}

.coachmarks-tooltip[data-arrow="right"]::before {
  right: -16px;
  top: 24px;
  border-left-color: white;
}
