/* Compliance Platform — design system
   Inter typography · slate palette · glass surfaces · 4px rhythm */

:root {
  /* Palette */
  --color-primary: #cbd5e1;
  --color-secondary: #0f172a;
  --color-tertiary: #e0e7ff;
  --color-neutral: #ffffff;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-2: #f1f5f9;
  --color-surface-3: #e2e8f0;
  --color-ink: #0f172a;
  --color-ink-2: #334155;
  --color-muted: #64748b;
  --color-line: #e2e8f0;
  --color-line-soft: #f1f5f9;
  --color-accent: #cbd5e1;

  /* Semantic */
  --color-success: #047857;
  --color-success-soft: #d1fae5;
  --color-warn: #92400e;
  --color-warn-soft: #fef3c7;
  --color-danger: #b91c1c;
  --color-danger-soft: #fee2e2;

  /* Radii */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-2xl: 32px;

  /* Shadows — recipe from the design spec */
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card:
    0 0 0 1px rgba(15, 23, 42, 0.06),
    0 1px 1px -0.5px rgba(15, 23, 42, 0.05),
    0 3px 3px -1.5px rgba(15, 23, 42, 0.04),
    0 6px 6px -3px rgba(15, 23, 42, 0.04),
    0 12px 12px -6px rgba(15, 23, 42, 0.04),
    0 24px 24px -12px rgba(15, 23, 42, 0.04);
  --shadow-glass:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 0 0 1px rgba(15, 23, 42, 0.05),
    0 18px 38px -24px rgba(15, 23, 42, 0.18);

  /* Motion */
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --t-fast: 160ms;
  --t-med: 200ms;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-size: 14px;
  line-height: 20px;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient bloom backdrop — pointer-reactive drift via CSS var fallback */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 800px at 18% 0%, rgba(224, 231, 255, 0.55), transparent 60%),
    radial-gradient(900px 600px at 92% 12%, rgba(203, 213, 225, 0.55), transparent 65%),
    radial-gradient(1000px 700px at 50% 100%, rgba(248, 250, 252, 0.9), transparent 70%),
    linear-gradient(180deg, #eef2f7 0%, #f8fafc 55%, #eef2f7 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -1;
  background-image:
    radial-gradient(circle at 25% 30%, rgba(255, 255, 255, 0.6), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(226, 232, 240, 0.5), transparent 45%);
  filter: blur(40px);
  pointer-events: none;
  animation: drift 22s var(--ease) infinite alternate;
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, 1.5%, 0) scale(1.04); }
}

a { color: inherit; text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--color-ink); }

h1, h2, h3, h4 { margin: 0 0 12px; font-family: "Inter", sans-serif; color: var(--color-ink); }
p { margin: 0 0 12px; }

h1 {
  font-size: clamp(40px, 4.5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 500;
}

h2 {
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.015em;
  font-weight: 500;
}

h3 {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 12.5px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  padding: 1px 6px;
  border-radius: var(--r-xs);
  color: var(--color-ink-2);
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-ink);
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: var(--r-sm);
  background:
    linear-gradient(135deg, #0f172a 0%, #334155 60%, #64748b 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    0 4px 10px -2px rgba(15, 23, 42, 0.3);
  display: inline-block;
}

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

.nav a, .ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  font: inherit;
  font-weight: 500;
  color: var(--color-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.nav a:hover, .ghost-btn:hover {
  color: var(--color-ink);
  background: rgba(15, 23, 42, 0.04);
}

.nav form { margin: 0; }

/* ---------- Page shell ---------- */

.page {
  width: min(1180px, calc(100vw - 32px));
  margin: 40px auto 96px;
  display: grid;
  gap: 24px;
}

.minimal-shell .page {
  min-height: 100vh;
  margin: 0 auto;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-ink-2);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.lead {
  color: var(--color-ink-2);
  font-size: 16px;
  line-height: 24px;
  max-width: 720px;
  letter-spacing: -0.005em;
}

.muted, .hint, small { color: var(--color-muted); }
.hint { font-size: 12.5px; margin-top: 12px; line-height: 18px; }

/* ---------- Auth ---------- */

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 20px;
  align-items: start;
}

.auth-shell--gate {
  min-height: calc(100vh - 220px);
  grid-template-columns: minmax(280px, 420px);
  justify-content: center;
  align-items: center;
}

.auth-shell--entry {
  grid-template-columns: minmax(280px, 420px);
  justify-content: center;
  align-items: center;
}

.auth-card--gate {
  width: 100%;
}

/* Surface families */
.intro-panel,
.panel,
.panel-wide,
.notice-row,
.final-strip,
.progress-band,
.result-head,
.reader-aside,
.reader-content,
.stat,
.lesson-row,
.audio-card,
.dialogue-note,
.question,
.result-row,
.audit-row,
.slot,
.table-wrap,
.voice-panel,
.score-card,
.transcript-item,
.event-item {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.7) 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.intro-panel,
.panel,
.panel-wide,
.notice-row,
.final-strip,
.progress-band,
.result-head,
.reader-aside,
.reader-content,
.voice-panel {
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}

.stat,
.lesson-row,
.audio-card,
.dialogue-note,
.question,
.result-row,
.audit-row,
.slot,
.score-card {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}

.transcript-item,
.event-item {
  border-radius: var(--r-md);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.table-wrap {
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.intro-panel {
  padding: 48px;
  min-height: 380px;
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(203, 213, 225, 0.45), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(224, 231, 255, 0.5), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.85) 100%);
}

.intro-panel h1 { margin-bottom: 18px; }
.intro-panel .lead { font-size: 17px; line-height: 26px; }

.auth-grid { display: grid; gap: 16px; }
.panel, .panel-wide { padding: 28px; }
.panel-wide { margin-top: 0; }

/* ---------- Forms ---------- */

.stack-form { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--color-ink);
}

input, textarea, select {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-ink);
  padding: 0 12px;
  font: 400 14px/20px "Inter", sans-serif;
  letter-spacing: -0.005em;
  transition:
    border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

textarea {
  height: auto;
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
}

select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--color-muted) 50%), linear-gradient(135deg, var(--color-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

input::placeholder, textarea::placeholder { color: var(--color-muted); }

input:hover, textarea:hover, select:hover {
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.9);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-ink);
  background: #fff;
  box-shadow:
    0 0 0 4px rgba(15, 23, 42, 0.08),
    0 1px 2px rgba(15, 23, 42, 0.06);
}

/* ---------- Buttons ---------- */

.primary-btn, .secondary-btn, .icon-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font: 600 13px/20px "Inter", sans-serif;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition:
    transform var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.primary-btn {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 2px rgba(15, 23, 42, 0.3),
    0 8px 16px -8px rgba(15, 23, 42, 0.4);
}

.primary-btn:hover {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 2px 4px rgba(15, 23, 42, 0.35),
    0 12px 22px -10px rgba(15, 23, 42, 0.45);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.8);
  color: var(--color-ink);
  border-color: rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-soft);
}

.secondary-btn:hover {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.icon-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--color-ink);
  border-color: transparent;
}

.icon-btn:hover {
  background: rgba(15, 23, 42, 0.1);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled,
.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.ghost-btn.bordered {
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--r-sm);
  color: var(--color-ink);
  background: rgba(255, 255, 255, 0.6);
}

.ghost-btn.bordered:hover { background: #fff; border-color: rgba(15, 23, 42, 0.18); }

.ghost-btn.is-disabled,
.ghost-btn.is-disabled:hover {
  opacity: 0.55;
  cursor: default;
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(15, 23, 42, 0.08);
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--color-ink);
  border-bottom: 1px solid rgba(15, 23, 42, 0.2);
  padding-bottom: 1px;
  transition: border-color var(--t-fast) var(--ease);
}

.ghost-link:hover { border-color: var(--color-ink); }

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* ---------- Alert ---------- */

.alert {
  padding: 12px 14px;
  background: var(--color-danger-soft);
  border: 1px solid rgba(185, 28, 28, 0.18);
  color: var(--color-danger);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- Dashboard head ---------- */

.dashboard-head {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 4px;
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat {
  min-width: 132px;
  padding: 16px 18px;
}

.stat b {
  display: block;
  font-size: 28px;
  line-height: 32px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--color-ink);
}

.stat span {
  display: block;
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* ---------- Progress band ---------- */

.progress-band { padding: 20px 24px; }

.progress-bar {
  height: 6px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f172a 0%, #475569 100%);
  border-radius: 999px;
  transition: width var(--t-med) var(--ease);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: var(--color-muted);
  font-size: 12.5px;
}

/* ---------- Notice / final strip ---------- */

.notice-row,
.final-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
}

.notice-row p,
.final-strip p {
  margin: 4px 0 0;
  color: var(--color-muted);
}

.final-strip { margin-top: 8px; }
.final-strip.is-locked {
  box-shadow: none;
  background: rgba(248, 250, 252, 0.72);
}

.final-strip.is-frozen {
  border-color: rgba(185, 28, 28, 0.18);
}

.course-list { gap: 12px; }

.reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reference-card {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.82));
  box-shadow: var(--shadow-soft);
  color: var(--color-ink);
  text-decoration: none;
  transition:
    border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.reference-card:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 12px 28px -18px rgba(15, 23, 42, 0.28);
}

.reference-card--locked {
  opacity: 0.56;
  box-shadow: none;
}

.reference-card--locked:hover {
  transform: none;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: none;
}

.reference-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  letter-spacing: -0.018em;
}

.reference-card p {
  margin: 0;
  max-width: 620px;
  color: var(--color-muted);
  font-size: 13.5px;
  line-height: 20px;
}

.reference-card-link {
  margin-top: 4px;
  color: var(--color-ink);
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- Modules ---------- */

.module-list { display: grid; gap: 28px; }

.module-group {
  padding: 0;
  position: relative;
}

.module-group::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), transparent);
}

.module-group { padding-left: 22px; }

.module-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.module-head h2 { margin-bottom: 0; }

.module-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--color-muted);
  font-size: 12.5px;
}

.lesson-list { display: grid; gap: 10px; }
.module-lessons { padding-top: 2px; }

.lesson-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.lesson-row:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.08),
    0 8px 24px -10px rgba(15, 23, 42, 0.18);
}

.lesson-row.locked { opacity: 0.55; }
.lesson-row.locked:hover { transform: none; box-shadow: var(--shadow-soft); }

.lesson-index {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.08));
  color: var(--color-ink);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.lesson-module {
  color: var(--color-ink-2);
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.lesson-main h2 {
  margin-bottom: 4px;
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -0.012em;
}

.lesson-main p {
  color: var(--color-muted);
  margin: 0;
  font-size: 13px;
  line-height: 18px;
}

.lesson-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.locked-label {
  color: var(--color-muted);
  font-weight: 500;
  font-size: 12.5px;
}

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.05);
  color: var(--color-ink-2);
  border: 1px solid rgba(15, 23, 42, 0.06);
  white-space: nowrap;
}

.badge.completed {
  background: var(--color-success-soft);
  color: var(--color-success);
  border-color: rgba(4, 120, 87, 0.15);
}

.badge.in_progress {
  background: var(--color-warn-soft);
  color: var(--color-warn);
  border-color: rgba(146, 64, 14, 0.15);
}

.badge.not_started {
  background: rgba(15, 23, 42, 0.05);
  color: var(--color-muted);
}

/* ---------- Reader ---------- */

.reader-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.reader-aside {
  position: sticky;
  top: 84px;
  padding: 26px;
}

.reader-aside h1 { font-size: 26px; line-height: 32px; }

.reader-aside dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 16px;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.reader-aside dt {
  color: var(--color-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reader-aside dd {
  margin: 0;
  font-weight: 600;
  font-size: 13px;
  color: var(--color-ink);
}

.side-actions { display: grid; gap: 8px; }

.reader-content {
  padding: 36px 40px;
  overflow: visible;
}

.material {
  max-width: 880px;
  font-size: 15px;
  line-height: 24px;
  color: var(--color-ink-2);
}

.material h2 {
  margin: 34px 0 14px;
  padding-top: 22px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 24px;
  line-height: 30px;
  color: var(--color-ink);
}

.material h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.material h3 {
  margin: 26px 0 10px;
  font-size: 17px;
  line-height: 24px;
  color: var(--color-ink);
}

.material p,
.material ul,
.material ol {
  margin-bottom: 14px;
}

.material ul,
.material ol {
  padding-left: 22px;
}

.material li {
  margin-bottom: 6px;
}

.material pre {
  margin: 14px 0 20px;
  padding: 14px 16px;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-left: 3px solid var(--color-secondary);
  border-radius: var(--r-sm);
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.material pre code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-ink-2);
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 22px;
}

.military-hierarchy {
  display: grid;
  gap: 10px;
  margin: 18px 0 28px;
  max-width: 760px;
}

.military-hierarchy-node {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88));
}

.military-hierarchy-node::after {
  content: "";
  position: absolute;
  left: 36px;
  bottom: -11px;
  width: 1px;
  height: 10px;
  background: rgba(15, 23, 42, 0.18);
}

.military-hierarchy-node:last-child::after { display: none; }

.military-hierarchy-level {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.military-hierarchy-node h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 21px;
}

.military-hierarchy-node p {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 19px;
}

.military-hierarchy-node--person {
  border-color: rgba(4, 120, 87, 0.16);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.88), rgba(255, 255, 255, 0.92));
}

.military-hierarchy-node--person .military-hierarchy-level {
  background: #047857;
}

.command-chain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 24px;
  max-width: 820px;
}

.command-chain-node {
  position: relative;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.82);
}

.command-chain-node:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 10px;
  height: 1px;
  background: rgba(15, 23, 42, 0.18);
}

.command-chain-node span {
  display: block;
  margin-bottom: 6px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.command-chain-node strong {
  display: block;
  color: var(--color-ink);
  font-size: 13.5px;
  line-height: 19px;
}

.material :not(pre) > code {
  white-space: normal;
}

.material table,
.table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  line-height: 20px;
}

.material th, .material td,
.table-wrap th, .table-wrap td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding: 10px 12px;
  vertical-align: top;
  text-align: left;
}

.material th, .table-wrap th {
  background: rgba(15, 23, 42, 0.03);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ink-2);
}

.region-conditions {
  margin: 18px 0 28px;
  max-width: 100%;
}

.region-table-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--color-ink-2);
}

.region-table-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 999px;
  background: #fff;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.18);
}

.legend-dot--ok { background: #93c47d; }
.legend-dot--no { background: #e06666; }
.legend-dot--warn { background: #ffe599; }
.legend-dot--individual { background: #d9ead3; }

.region-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 8px;
  background: #fff;
}

.material .region-conditions-table {
  min-width: 1360px;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 12.5px;
  line-height: 17px;
  color: #111827;
}

.material .region-conditions-table th,
.material .region-conditions-table td {
  border: 1px solid rgba(15, 23, 42, 0.72);
  padding: 5px 6px;
  vertical-align: middle;
  text-align: center;
}

.material .region-conditions-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #111827;
  font-size: 13px;
  line-height: 18px;
  text-transform: none;
  letter-spacing: 0;
}

.material .region-conditions-table th[scope="row"] {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 180px;
  min-width: 180px;
  background: #fff;
  color: #111827;
  font-size: 12.5px;
  line-height: 17px;
  text-transform: none;
  letter-spacing: 0;
  text-align: left;
}

.material .region-conditions-table thead th:first-child {
  left: 0;
  z-index: 3;
}

.material .region-cell--plain { background: #fff; }
.material .region-cell--ok { background: #93c47d; }
.material .region-cell--no { background: #e06666; }
.material .region-cell--warn { background: #ffe599; }
.material .region-cell--individual { background: #d9ead3; }

.material .region-cell--money {
  font-weight: 700;
  font-size: 17px;
  line-height: 22px;
}

.material .region-cell--small {
  font-size: 11px;
  line-height: 15px;
}

.material .region-cell--merged,
.material .region-table-footer {
  font-weight: 700;
  text-align: center;
}

.material .region-table-footer {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.72);
  font-size: 16px;
  line-height: 20px;
}

.material blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 2px solid var(--color-ink);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.04), transparent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--color-ink-2);
}

/* ---------- Lesson audio ---------- */

.lesson-audio {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.audio-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  margin-bottom: 14px;
}

.audio-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.audio-head h3 { margin-bottom: 0; }

.audio-card audio {
  width: 100%;
  border-radius: var(--r-sm);
}

.audio-speed {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  grid-auto-flow: column;
  grid-template-columns: auto auto;
  gap: 8px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
}

.audio-speed select {
  width: auto;
  min-width: 86px;
  height: 34px;
  padding: 0 28px 0 10px;
  font-size: 13px;
}

.audio-card p { color: var(--color-muted); margin: 0; font-size: 13px; line-height: 19px; }
.privacy-note { font-size: 12px; color: var(--color-muted); }

.audio-reflection-form {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.audio-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dialogue-note {
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(224, 231, 255, 0.4), rgba(248, 250, 252, 0.6));
}

.dialogue-note h3 { margin-bottom: 10px; }
.dialogue-note p:last-child, .dialogue-note ul:last-child { margin-bottom: 0; }

/* ---------- Quiz ---------- */

.quiz {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.question {
  padding: 20px;
  margin: 0 0 14px;
}

.question legend {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  padding: 0 8px;
  color: var(--color-ink);
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.choice:hover {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
}

.choice input { width: auto; height: auto; accent-color: var(--color-ink); }

.answer-list {
  display: grid;
  gap: 6px;
  padding-left: 0;
  list-style: none;
  margin: 12px 0;
}

.answer-list li {
  padding: 8px 12px;
  color: var(--color-muted);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--r-sm);
  font-size: 13px;
}

.answer-list .right-answer {
  color: var(--color-success);
  font-weight: 600;
  background: var(--color-success-soft);
  border-color: rgba(4, 120, 87, 0.15);
}

.rubric-box {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  margin-top: 12px;
  border-radius: var(--r-sm);
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.rubric-box p { margin: 0; font-size: 13px; }

/* ---------- Result page ---------- */

.result-head {
  text-align: center;
  padding: 40px 32px;
  margin-bottom: 8px;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  margin: 8px auto 20px;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  background:
    radial-gradient(closest-side, #fff 65%, transparent 66%),
    conic-gradient(var(--color-warn) 0%, var(--color-warn) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.06),
    0 8px 24px -12px rgba(15, 23, 42, 0.25);
}

.score-ring.pass {
  background:
    radial-gradient(closest-side, #fff 65%, transparent 66%),
    conic-gradient(var(--color-success) 0%, var(--color-success) 100%);
}

.score-ring.fail {
  background:
    radial-gradient(closest-side, #fff 65%, transparent 66%),
    conic-gradient(var(--color-danger) 0%, var(--color-danger) 100%);
}

.result-list { display: grid; gap: 10px; }

.result-row,
.audit-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  margin-bottom: 0;
}

.result-row p, .audit-row p {
  color: var(--color-muted);
  margin: 4px 0 0;
  font-size: 13px;
}

.audit-row.stacked {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.audit-row.stacked small {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--color-ink-2);
}

/* ---------- Slots ---------- */

.slot-grid {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.slot {
  min-width: 240px;
  padding: 16px;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.slot:hover { transform: translateY(-1px); border-color: rgba(15, 23, 42, 0.18); }
.slot input { width: auto; height: auto; accent-color: var(--color-ink); }
.slot b {
  display: block;
  margin-top: 6px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

.slot span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

/* ---------- Table ---------- */

.table-wrap {
  background: rgba(255, 255, 255, 0.85);
  overflow-x: auto;
}

.table-wrap table { min-width: 860px; }
.table-wrap th, .table-wrap td { padding: 14px 16px; }
.table-wrap tbody tr { transition: background-color var(--t-fast) var(--ease); }
.table-wrap tbody tr:hover { background: rgba(15, 23, 42, 0.02); }
.table-wrap tbody tr td { border-bottom-color: rgba(15, 23, 42, 0.05); }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap span { color: var(--color-muted); font-size: 12.5px; }

/* ---------- Memos ---------- */

.memo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.memo-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.memo-card {
  padding: 16px 18px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.74);
}

.memo-card h3 {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--color-ink);
}

.memo-card p,
.memo-list {
  margin: 0;
  font-size: 13px;
  line-height: 19px;
  color: var(--color-ink-2);
}

.memo-card p + p,
.memo-card p + .memo-list { margin-top: 10px; }

.memo-list {
  padding-left: 18px;
}

.memo-list li { margin-bottom: 6px; }
.memo-list li:last-child { margin-bottom: 0; }

.memo-quote {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.memo-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--r-sm);
}

.memo-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  line-height: 18px;
}

.memo-table th,
.memo-table td {
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.memo-table th {
  background: rgba(15, 23, 42, 0.04);
  color: var(--color-ink);
  font-weight: 600;
}

.memo-table tr:last-child td { border-bottom: 0; }

/* ---------- Split / compact ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.compact .lesson-row { padding: 14px 16px; }

/* ---------- Admin prompt viewer ---------- */

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.config-grid div {
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--r-md);
  background: rgba(15, 23, 42, 0.03);
}

.config-grid span {
  display: block;
  color: var(--color-muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.config-grid strong { overflow-wrap: anywhere; }

.prompt-box {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 12px 0 0;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--r-md);
  background: #11130f;
  color: #f4f5ee;
  font: 13px/1.55 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  max-height: 560px;
  overflow: auto;
}

/* ---------- Voice ---------- */

.voice-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.05fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.voice-stage[data-mode="exam"] .call-script-panel { display: none; }
.voice-stage[data-mode="exam"] .voice-grid { grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr); }

.voice-panel,
.score-card { padding: 24px; }

.voice-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.voice-head h2 { margin-bottom: 0; }

.voice-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 14px;
}

#remoteAudio { width: 100%; margin-top: 4px; }

.crm-fields { display: grid; gap: 4px; }

.crm-field {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.crm-field:last-child { border-bottom: 0; }
.crm-field span { color: var(--color-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.crm-field strong { font-size: 13.5px; overflow-wrap: anywhere; color: var(--color-ink); font-weight: 600; }

.transcript-box,
.event-log {
  min-height: 280px;
  max-height: 400px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 4px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: var(--r-md);
}

.transcript-item,
.event-item {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 18px;
}

.transcript-item b,
.event-item b {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  font-weight: 600;
}

.transcript-item.manager { background: linear-gradient(180deg, rgba(254, 243, 199, 0.4), rgba(254, 243, 199, 0.2)); border-color: rgba(146, 64, 14, 0.12); }
.transcript-item.candidate { background: linear-gradient(180deg, rgba(209, 250, 229, 0.4), rgba(209, 250, 229, 0.2)); border-color: rgba(4, 120, 87, 0.12); }

.score-card { margin-top: 14px; }
.score-card.hidden { display: none; }

/* ---------- Hero "Next step" ---------- */

.hero-next {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: stretch;
  padding: 44px 48px;
  border-radius: var(--r-xl);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(224, 231, 255, 0.5), transparent 60%),
    radial-gradient(500px 320px at 0% 100%, rgba(203, 213, 225, 0.35), transparent 65%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.85) 100%);
}

.hero-next.is-finished {
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(209, 250, 229, 0.55), transparent 60%),
    radial-gradient(500px 320px at 0% 100%, rgba(224, 231, 255, 0.3), transparent 65%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 253, 244, 0.7) 100%);
}

.hero-next.is-idle {
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(203, 213, 225, 0.4), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.85) 100%);
}

.hero-next.is-frozen {
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(254, 226, 226, 0.48), transparent 62%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.86) 100%);
}

.hero-next.is-frozen .eyebrow,
.hero-next.is-frozen h1 {
  color: var(--color-danger);
}

.hero-next-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.hero-next h1 {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.05;
  margin-bottom: 14px;
  max-width: 720px;
}

.hero-next .lead {
  margin-bottom: 28px;
  font-size: 16px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  width: 100%;
}

.hero-actions form { margin: 0; }

.primary-btn.primary-btn--lg {
  height: 52px;
  padding: 0 28px;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  border-radius: var(--r-md);
}

.primary-btn .arrow {
  display: inline-block;
  transition: transform var(--t-fast) var(--ease);
}

.primary-btn:hover .arrow { transform: translateX(3px); }

.hero-meta {
  color: var(--color-muted);
  font-size: 12.5px;
}

.hero-progress {
  display: grid;
  gap: 8px;
  width: min(440px, 100%);
}

.hero-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

.hero-progress .progress-bar {
  height: 5px;
}

.hero-timer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  padding-left: 32px;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  min-width: 160px;
}

.hero-timer-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.hero-timer strong {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 40px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--color-ink);
  font-variant-numeric: tabular-nums;
}

.hero-timer-unit {
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 0.06em;
}

.hero-timer.is-critical strong { color: var(--color-danger); }
.hero-timer.is-critical .hero-timer-label { color: var(--color-danger); }

/* ---------- Module accordion ---------- */

.module-group { padding-left: 24px; transition: opacity var(--t-fast) var(--ease); }

.module-group.is-locked { opacity: 0.5; }
.module-group.is-locked::before { opacity: 0.4; }

.module-group.is-done::before {
  background: linear-gradient(180deg, var(--color-success), transparent);
  opacity: 0.4;
}

.module-group.is-active::before {
  background: linear-gradient(180deg, var(--color-ink), transparent);
  width: 2px;
}

.module-group .module-head {
  transition: opacity var(--t-fast) var(--ease);
}

.module-group.is-done .module-head {
  cursor: pointer;
  user-select: none;
}

.module-group.is-done .module-head:hover h2 { color: var(--color-ink); }
.module-group.is-done .module-head:hover { opacity: 0.92; }

.module-group.is-collapsed .module-lessons { display: none; }
.module-group.is-collapsed .module-head {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.module-group.is-locked .module-head { cursor: default; }
.module-group.is-locked h2 { color: var(--color-muted); }

.module-summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.module-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(15, 23, 42, 0.05);
  color: var(--color-ink-2);
  border: 1px solid rgba(15, 23, 42, 0.06);
  letter-spacing: -0.005em;
}

.module-summary-pill .pill-glyph {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  font-size: 11px;
  line-height: 1;
}

.module-summary-pill--done {
  background: var(--color-success-soft);
  color: var(--color-success);
  border-color: rgba(4, 120, 87, 0.18);
}

.module-summary-pill--locked {
  background: transparent;
  color: var(--color-muted);
  border-style: dashed;
}

.module-chevron {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--color-muted);
  border-bottom: 1.5px solid var(--color-muted);
  transform: rotate(45deg);
  margin-left: 4px;
  margin-top: -4px;
  transition: transform var(--t-fast) var(--ease);
}

.module-group.is-collapsed .module-chevron {
  transform: rotate(-45deg);
  margin-top: 0;
}

/* ---------- Current lesson highlight ---------- */

.lesson-row.is-current {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(241, 245, 249, 0.8) 100%);
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow:
    inset 3px 0 0 var(--color-ink),
    0 0 0 1px rgba(15, 23, 42, 0.08),
    0 8px 24px -12px rgba(15, 23, 42, 0.18);
}

.lesson-row.is-current .lesson-module {
  color: var(--color-ink);
}

.lesson-row.is-current .lesson-index {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  color: #fff;
}

.icon-btn.icon-btn--primary {
  background: var(--color-ink);
  color: #fff;
}

.icon-btn.icon-btn--primary:hover {
  background: #020617;
}

/* ---------- Locked stub ---------- */

.locked-stub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: 1px dashed rgba(15, 23, 42, 0.14);
  border-radius: var(--r-lg);
  color: var(--color-muted);
  font-size: 12.5px;
  background: transparent;
  letter-spacing: -0.005em;
}

.locked-stub-glyph {
  font-size: 18px;
  line-height: 0;
  color: rgba(15, 23, 42, 0.3);
  letter-spacing: 2px;
}

/* ---------- Voice stage (3-phase UX) ---------- */

.voice-stage { display: grid; gap: 20px; }

.voice-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.voice-phases {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.phase-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-muted);
  letter-spacing: -0.005em;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.phase-pill .phase-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
  transition: all var(--t-fast) var(--ease);
}

.phase-pill.is-visited .phase-num {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.phase-pill.is-active {
  color: var(--color-ink);
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 4px 12px -6px rgba(15, 23, 42, 0.2);
}

.phase-pill.is-active .phase-num {
  background: var(--color-ink);
  color: #fff;
  box-shadow: 0 4px 10px -4px rgba(15, 23, 42, 0.45);
}

.phase-connector {
  display: inline-block;
  width: 14px;
  height: 1px;
  background: rgba(15, 23, 42, 0.15);
}

.voice-phase { display: none; }
.voice-stage[data-phase="brief"] .voice-phase--brief { display: block; }
.voice-stage[data-phase="live"] .voice-phase--workspace,
.voice-stage[data-phase="review"] .voice-phase--workspace { display: grid; gap: 16px; }

.voice-stage[data-phase="live"] [data-back-to-brief] { display: none; }

/* Brief */

.brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}

.brief-main h2 { font-size: 28px; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 12px; }
.brief-main .lead { margin-bottom: 24px; }

.brief-dl {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0 0 24px;
  padding: 18px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.brief-dl dt {
  color: var(--color-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.brief-dl dd {
  margin: 0;
  font-size: 14px;
  color: var(--color-ink);
}

.brief-block { margin-bottom: 22px; }
.brief-block h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ink-2);
  margin-bottom: 10px;
}

.brief-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.brief-list li {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 13.5px;
}

.brief-block--good {
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(209, 250, 229, 0.4), rgba(248, 250, 252, 0.3));
  border: 1px solid rgba(4, 120, 87, 0.18);
  border-radius: var(--r-md);
}

.brief-block--good h3 { color: var(--color-success); margin-bottom: 8px; }
.brief-block--good p { margin: 0; font-size: 13.5px; line-height: 20px; }

.mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mode-option {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.74);
  padding: 14px 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.mode-option strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--color-ink);
}

.mode-option span {
  display: block;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--color-muted);
}

.mode-option.is-active {
  border-color: rgba(15, 23, 42, 0.32);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
}

.brief-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.brief-cta .muted { margin: 0; font-size: 12.5px; max-width: 280px; }

.brief-checklist h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.checklist li {
  position: relative;
  padding: 0 0 0 28px;
  font-size: 13.5px;
  line-height: 19px;
  color: var(--color-ink-2);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 14px;
  height: 8px;
  border-left: 1.5px solid var(--color-ink);
  border-bottom: 1.5px solid var(--color-ink);
  transform: rotate(-45deg);
}

.brief-checklist .small { font-size: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(15, 23, 42, 0.06); }

/* Workspace bar (live + review) */

.workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 78px;
  z-index: 20;
  flex-wrap: wrap;
}

.workspace-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-scenario {
  font-size: 13px;
  color: var(--color-ink-2);
  font-weight: 500;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.voice-stage[data-phase="live"] .workspace-bar {
  border-color: rgba(4, 120, 87, 0.22);
  box-shadow: 0 0 0 1px rgba(4, 120, 87, 0.1), var(--shadow-soft);
}

.voice-stage[data-phase="live"] #voiceStatus {
  animation: livePulse 1.6s var(--ease) infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(4, 120, 87, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(4, 120, 87, 0); }
}

.voice-stage[data-phase="brief"] .voice-phase--workspace { display: none; }
.voice-stage[data-phase="brief"] .workspace-bar { display: none; }

.call-script-panel {
  position: sticky;
  top: 158px;
  align-self: start;
  max-height: calc(100vh - 180px);
  overflow: auto;
}

.script-note {
  margin: -4px 0 14px;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--color-muted);
}

.script-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.script-steps li {
  position: relative;
  padding: 14px 14px 14px 38px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--r-sm);
  background: rgba(248, 250, 252, 0.74);
}

.script-steps li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 15px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(15, 23, 42, 0.28);
  background: #fff;
}

.script-steps li.is-done {
  border-color: rgba(4, 120, 87, 0.2);
  background: rgba(209, 250, 229, 0.32);
}

.script-steps li.is-done::before {
  border-color: var(--color-success);
  background: var(--color-success);
  box-shadow: inset 0 0 0 3px #fff;
}

.script-steps b {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--color-ink);
}

.script-line,
.script-candidate {
  margin: 7px 0 0;
  font-size: 12.8px;
  line-height: 18px;
}

.script-line {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: var(--color-ink);
}

.script-candidate {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: rgba(254, 243, 199, 0.45);
  border: 1px solid rgba(146, 64, 14, 0.12);
  color: var(--color-ink-2);
  font-style: italic;
}

.script-responses {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.script-responses h3 {
  margin-bottom: 9px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ink-2);
}

.script-responses p {
  margin: 0 0 8px;
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.76);
  font-size: 12.6px;
  line-height: 18px;
  color: var(--color-ink-2);
}

.script-responses p:last-child { margin-bottom: 0; }
.script-responses b { color: var(--color-ink); }

.voice-history {
  padding: 16px 18px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.6);
}

.voice-history .eyebrow { margin-bottom: 12px; }

/* ---------- Auth tabs ---------- */

.auth-card { padding: 32px; }

.auth-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: -8px -8px 24px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.auth-tab {
  position: relative;
  z-index: 1;
  height: 32px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  cursor: pointer;
  border-radius: 999px;
  letter-spacing: -0.005em;
  transition: color var(--t-fast) var(--ease);
}

.auth-tab.is-active {
  color: var(--color-ink);
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 4px 12px -6px rgba(15, 23, 42, 0.2);
}

.auth-tab:hover { color: var(--color-ink); }

.auth-form { display: none; }
.auth-form.is-active { display: grid; }

.auth-intro {
  color: var(--color-muted);
  font-size: 13px;
  margin: 0 0 6px;
  line-height: 19px;
}

.auth-switch {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--color-muted);
  text-align: center;
}

.auth-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--color-ink);
  cursor: pointer;
  border-bottom: 1px solid rgba(15, 23, 42, 0.25);
  transition: border-color var(--t-fast) var(--ease);
}

.auth-link:hover { border-bottom-color: var(--color-ink); }

/* Numbered process strip */

.process-strip {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
}

.process-strip li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px 0 6px;
  margin: 0 6px 6px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-ink-2);
  backdrop-filter: blur(6px);
}

.process-strip .process-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--color-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Empty state ---------- */

.empty-state {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 56px 32px;
  border-radius: var(--r-xl);
  border: 1px dashed rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.4);
  gap: 12px;
}

.empty-state-glyph {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: rgba(15, 23, 42, 0.05);
  font-size: 22px;
  color: var(--color-muted);
}

.empty-state h2 {
  font-size: 20px;
  margin: 4px 0 0;
  letter-spacing: -0.018em;
}

.empty-state p {
  color: var(--color-muted);
  margin: 0;
  max-width: 420px;
  font-size: 13.5px;
  line-height: 20px;
}

.empty-state .empty-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  justify-content: center;
}

/* ---------- Admin filters ---------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.toolbar-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 360px;
}

.toolbar-search input {
  height: 36px;
  padding: 0 12px 0 36px;
  border-radius: var(--r-sm);
  background: #fff;
}

.toolbar-search::before {
  content: "⌕";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  font-size: 16px;
  pointer-events: none;
}

.toolbar-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toolbar-filter select {
  height: 36px;
  padding: 0 32px 0 12px;
  font-size: 13px;
}

.toolbar-meta {
  margin-left: auto;
  color: var(--color-muted);
  font-size: 12.5px;
}

.table-wrap tbody tr.is-hidden { display: none; }

.table-row-empty {
  text-align: center;
  color: var(--color-muted);
  padding: 32px;
  font-size: 13px;
}

.cell-progress {
  display: grid;
  gap: 6px;
  min-width: 140px;
}

.cell-progress span {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--color-ink-2);
}

.progress-bar--inline { height: 4px; max-width: 160px; }

/* ---------- Stepper (lesson) ---------- */

.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: -8px -8px 28px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(15, 23, 42, 0.025);
  border: 1px solid rgba(15, 23, 42, 0.05);
  flex-wrap: wrap;
}

.stepper .step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: transparent;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  color: var(--color-muted);
  cursor: pointer;
  border-radius: 999px;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.stepper .step-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-weight: 600;
  font-size: 12px;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
  transition: all var(--t-fast) var(--ease);
}

.stepper .step-label {
  letter-spacing: -0.005em;
}

.stepper .step:hover { color: var(--color-ink); }
.stepper .step:hover .step-num { background: rgba(15, 23, 42, 0.14); color: var(--color-ink); }

.stepper .step.is-visited .step-num {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.stepper .step.is-active {
  color: var(--color-ink);
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 4px 12px -6px rgba(15, 23, 42, 0.18);
}

.stepper .step.is-active .step-num {
  background: var(--color-ink);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 10px -4px rgba(15, 23, 42, 0.45);
}

.stepper .step-connector {
  flex: 0 0 24px;
  height: 1px;
  background: rgba(15, 23, 42, 0.12);
}

.step-section { display: none; }
.step-section.is-active {
  display: block;
  animation: stepFadeIn 220ms var(--ease);
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.step-head {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.step-head h2 {
  font-size: 24px;
  line-height: 30px;
  margin-bottom: 8px;
  letter-spacing: -0.018em;
}

.step-head p.muted {
  margin: 0;
  font-size: 13.5px;
  line-height: 20px;
  max-width: 640px;
}

.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.step-nav .ghost-btn.bordered {
  height: 44px;
  background: transparent;
}

.step-nav .primary-btn {
  height: 44px;
  padding: 0 22px;
}

.draft-indicator {
  background: var(--color-warn-soft);
  color: var(--color-warn);
  border-color: rgba(146, 64, 14, 0.18);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.reader-layout--single {
  display: block;
}

.final-review-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.final-review-grid small {
  display: block;
  white-space: pre-wrap;
  line-height: 1.55;
}

.protected-ui .protected-content,
.protected-ui .protected-content *:not(input):not(textarea):not(select):not(option):not(button):not(a) {
  -webkit-user-select: none;
  user-select: none;
}

.protected-ui .protected-content {
  -webkit-touch-callout: none;
}

.protected-ui .protected-content input,
.protected-ui .protected-content textarea,
.protected-ui .protected-content select {
  -webkit-user-select: text;
  user-select: text;
}

.review-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/* ---------- Scrollbar ---------- */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.3); background-clip: padding-box; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .page { margin: 28px auto 64px; }
  .topbar { padding: 0 18px; }
  .auth-shell,
  .dashboard-head,
  .reader-layout,
  .split,
  .voice-grid,
  .config-grid {
    grid-template-columns: 1fr;
    display: grid;
  }
  .reader-aside { position: static; }
  .stats-row { justify-content: flex-start; }
  .module-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .module-meta { justify-content: flex-start; }
  .audio-head { flex-direction: column; }
  .audit-row.stacked { grid-template-columns: 1fr; }
  .lesson-row { grid-template-columns: 44px minmax(0, 1fr); }
  .lesson-side { grid-column: 1 / -1; justify-content: flex-start; }
  .notice-row,
  .final-strip { align-items: flex-start; flex-direction: column; }
  .crm-field { grid-template-columns: 1fr; gap: 4px; }
  .intro-panel { padding: 28px; min-height: auto; }
  .reader-content { padding: 24px; }
  .hero-next {
    grid-template-columns: 1fr;
    padding: 28px;
    gap: 24px;
  }
  .hero-timer {
    align-items: flex-start;
    flex-direction: row;
    align-self: stretch;
    padding: 18px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    gap: 14px;
  }
  .hero-timer strong { font-size: 32px; }
  .module-summary { justify-content: flex-start; }
  .brief-grid { grid-template-columns: 1fr; }
	  .memo-grid,
	  .memo-grid--compact,
	  .reference-grid,
	  .command-chain { grid-template-columns: 1fr; }
	  .command-chain-node:not(:last-child)::after {
	    top: auto;
	    right: auto;
	    left: 22px;
	    bottom: -10px;
	    width: 1px;
	    height: 10px;
	  }
  .mode-toggle { grid-template-columns: 1fr; }
  .brief-dl { grid-template-columns: 1fr; }
  .brief-dl dt { margin-top: 8px; }
  .voice-header { flex-direction: column; align-items: flex-start; }
  .workspace-bar { position: static; flex-direction: column; align-items: stretch; }
  .workspace-status { justify-content: space-between; }
  .call-script-panel { position: static; }
  .voice-stage[data-mode="exam"] .voice-grid { grid-template-columns: 1fr; }
}
