:root {
  --color-bg: #f9f3d9;
  --color-surface: #ffffff;
  --color-surface-muted: #f9f3d9;
  --color-text: #161616;
  --color-text-muted: #7f7f7f;
  --color-primary: #e04507;
  --color-primary-hover: #b57629;
  --color-accent: #2201b2;
  --color-accent-soft: #9b6fd3;
  --color-success: #006466;
  --color-warning: #b57629;
  --color-danger: #e04507;
  --color-border: #e5dec1;
  --font-body: "Poppins", Arial, sans-serif;
  --font-heading: "Times New Roman", Times, serif;
  --shadow-card: 0 18px 42px rgba(22, 22, 22, 0.1);
  --shadow-soft: 0 8px 24px rgba(22, 22, 22, 0.08);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --focus-ring: 0 0 0 3px rgba(155, 111, 211, 0.22);
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(229, 222, 193, 0.92), transparent 30%),
    linear-gradient(180deg, #f9f3d9 0%, #f3ecd0 100%);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

h1,
h2,
h3,
.section-title,
.prebrief-title,
.prebrief-card-title,
.prebrief-section-title,
.learner-guide-title,
.learner-guide-section-title,
.score-section-title,
.faculty-summary-title,
.faculty-summary-card-title,
.score-item-title {
  font-family: var(--font-heading);
  color: var(--color-text);
  letter-spacing: 0.01em;
}

button,
input,
label,
.label,
.value,
.transcript,
.message,
.message-label,
.voice-status,
.score-total,
.score-item-meta,
.score-item-line,
.summary-stat-label,
.summary-stat-value,
.faculty-summary-impression,
.faculty-summary-list,
.learner-guide-help,
.learner-guide-item,
.learner-guide-item-title,
.learner-guide-badge,
.learner-guide-evidence,
.session-box,
.score-box,
.error {
  font-family: var(--font-body);
}

.card {
  max-width: 1220px;
  margin: 40px auto;
  padding: 32px;
  background: linear-gradient(180deg, #ffffff 0%, #fffdf6 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  line-height: 1.1;
}

.label {
  margin-bottom: 6px;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.value {
  margin-bottom: 22px;
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 400;
}

.section-title {
  margin-top: 36px;
  margin-bottom: 14px;
  font-size: 1.7rem;
  line-height: 1.2;
}

.app-view.is-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

.prebrief-shell {
  padding: 10px 0 6px;
}

.prebrief-intro {
  max-width: 680px;
  margin-bottom: 22px;
}

.prebrief-title {
  margin-top: 0;
  margin-bottom: 8px;
}

.prebrief-kicker {
  margin: 0;
  color: #4f4a43;
  font-size: 1rem;
  line-height: 1.7;
}

.prebrief-card {
  padding: 28px;
  background: linear-gradient(180deg, #fffefb 0%, #fdf8eb 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.prebrief-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.prebrief-card-title {
  margin: 6px 0 0;
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  line-height: 1.15;
}

.prebrief-time-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(34, 1, 178, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(34, 1, 178, 0.06);
  color: var(--color-accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.prebrief-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.prebrief-meta-item {
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.prebrief-meta-label {
  margin-bottom: 4px;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prebrief-meta-value {
  color: var(--color-text);
  font-size: 0.98rem;
  line-height: 1.5;
}

.prebrief-section + .prebrief-section {
  margin-top: 18px;
}

.prebrief-section-title {
  margin-bottom: 8px;
  font-size: 1.18rem;
  line-height: 1.2;
}

.prebrief-list {
  margin: 0;
  padding-left: 20px;
  color: #2f2b26;
}

.prebrief-list li + li {
  margin-top: 8px;
}

.prebrief-note-card {
  padding: 12px 14px;
  border: 1px solid rgba(0, 100, 102, 0.18);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(246, 252, 250, 0.98) 0%, rgba(238, 248, 245, 0.98) 100%);
  color: var(--color-text);
  line-height: 1.6;
}

.prebrief-note-card-subtle {
  border-color: rgba(127, 127, 127, 0.18);
  background: rgba(255, 255, 255, 0.84);
}

.prebrief-support-line {
  margin-top: 22px;
  padding: 14px 16px;
  border-left: 4px solid rgba(224, 69, 7, 0.55);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(224, 69, 7, 0.07);
  color: #6a2f10;
  line-height: 1.65;
}

.prebrief-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 22px;
}

.prebrief-actions .primary-button {
  min-width: 200px;
}

.progress-panel {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.progress-panel-prebrief {
  margin-top: 8px;
}

.progress-panel-summary {
  margin-bottom: 18px;
}

.progress-panel-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.progress-panel-label,
.progress-mini-title,
.progress-detail-title,
.progress-stat-label {
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-panel-copy,
.progress-panel-subtle,
.progress-stat-meta,
.progress-attempt-meta,
.progress-empty-state {
  color: #4f4a43;
  font-size: 0.85rem;
  line-height: 1.55;
}

.progress-panel-subtle {
  white-space: nowrap;
}

.progress-stat-grid,
.progress-detail-grid,
.progress-mini-columns {
  display: grid;
  gap: 12px;
}

.progress-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.progress-stat-card,
.progress-detail-card,
.progress-mini-column {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  min-width: 0;
}

.progress-stat-value,
.progress-attempt-score {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 700;
}

.progress-stat-value {
  margin-top: 6px;
}

.progress-detail-grid,
.progress-mini-columns {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 14px;
}

.progress-attempt-list,
.mastery-tier-history {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.progress-attempt-row,
.mastery-tier-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(229, 222, 193, 0.95);
  border-radius: var(--radius-sm);
  background: rgba(249, 243, 217, 0.32);
}

.progress-attempt-main,
.mastery-tier-row-main {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.progress-tier-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(34, 1, 178, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(34, 1, 178, 0.06);
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.progress-domain-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.progress-domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(0, 100, 102, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(0, 100, 102, 0.06);
  color: var(--color-text);
  font-size: 0.74rem;
  line-height: 1.35;
}

.progress-domain-pill.is-unavailable {
  border-color: rgba(127, 127, 127, 0.18);
  background: rgba(127, 127, 127, 0.08);
  color: #4f4a43;
}

.progress-domain-pill-label,
.progress-domain-pill-value {
  white-space: nowrap;
}

.progress-domain-pill-label {
  color: var(--color-text-muted);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.progress-domain-pill-value {
  font-weight: 700;
}

.progress-variant-card {
  border-style: dashed;
}

.progress-variant-summary,
.summary-variant-title {
  margin-top: 6px;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 700;
}

.progress-variant-current,
.progress-variant-cleared,
.progress-variant-hint,
.variant-progress-row-meta,
.summary-variant-current,
.summary-variant-hint {
  margin-top: 8px;
  color: #4f4a43;
  font-size: 0.85rem;
  line-height: 1.55;
}

.variant-progress-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.variant-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(229, 222, 193, 0.95);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
}

.variant-progress-row-main {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.variant-progress-row-label {
  color: var(--color-text);
  font-size: 0.94rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.variant-progress-row-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(224, 69, 7, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(224, 69, 7, 0.08);
  color: #a53a10;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.variant-progress-row-status.is-cleared {
  border-color: rgba(0, 100, 102, 0.18);
  background: rgba(0, 100, 102, 0.1);
  color: var(--color-success);
}

.progress-attempt-score,
.progress-attempt-meta,
.variant-progress-row-meta,
.progress-variant-summary,
.progress-variant-current,
.progress-variant-cleared,
.progress-variant-hint {
  overflow-wrap: anywhere;
}

.conversation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 360px);
  gap: 24px;
  align-items: start;
  min-height: 0;
}

.conversation-main,
.conversation-sidebar {
  min-width: 0;
}

.conversation-main {
  display: block;
  min-height: auto;
  max-height: none;
}

.conversation-sidebar {
  display: flex;
}

.sidebar-panel {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, #fffefb 0%, #fdf8eb 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.patient-climate-panel {
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(229, 222, 193, 0.95);
  background: rgba(255, 255, 255, 0.74);
}

.patient-climate-panel[data-climate-tone='positive'] {
  background: linear-gradient(180deg, rgba(246, 252, 250, 0.98) 0%, rgba(239, 248, 245, 0.98) 100%);
}

.patient-climate-panel[data-climate-tone='negative'] {
  background: linear-gradient(180deg, rgba(255, 249, 246, 0.98) 0%, rgba(252, 243, 238, 0.98) 100%);
}

.patient-climate-kicker,
.patient-reflection-kicker {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.patient-climate-title,
.patient-reflection-title {
  margin-top: 6px;
  color: var(--color-text);
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
}

.patient-climate-title {
  font-size: 1.12rem;
  line-height: 1.2;
}

.patient-climate-note,
.patient-reflection-copy {
  margin-top: 8px;
  color: #3f3a33;
  font-size: 0.9rem;
  line-height: 1.55;
}

.live-nudge-panel {
  padding: 14px 18px 16px;
  border-bottom: 1px solid rgba(229, 222, 193, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(251, 247, 236, 0.94) 100%);
}

.live-nudge-kicker {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-nudge-copy {
  margin-top: 6px;
  color: #4f4a43;
  font-size: 0.84rem;
  line-height: 1.55;
}

.live-nudge-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.live-nudge-item {
  padding: 10px 11px;
  border: 1px solid rgba(229, 222, 193, 0.92);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.74);
  color: #37322d;
  font-size: 0.85rem;
  line-height: 1.5;
}

.learner-guide-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.voice-controls,
.composer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
}

.checkbox-row input {
  inline-size: 18px;
  block-size: 18px;
}

.milestone-banner-region {
  min-height: 0;
  margin-bottom: 14px;
}

.milestone-banner-region:empty {
  display: none;
}

.milestone-banner {
  padding: 12px 14px;
  border: 1px solid rgba(0, 100, 102, 0.18);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(246, 252, 250, 0.98) 0%, rgba(238, 248, 245, 0.98) 100%);
  box-shadow: var(--shadow-soft);
  animation: milestoneBannerIn 0.28s ease;
}

.milestone-banner-kicker {
  margin-bottom: 4px;
  color: var(--color-success);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.milestone-banner-message {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.milestone-banner-discovery {
  border-color: rgba(34, 1, 178, 0.18);
  background: linear-gradient(180deg, rgba(250, 248, 255, 0.98) 0%, rgba(243, 239, 252, 0.98) 100%);
}

.milestone-banner-discovery .milestone-banner-kicker {
  color: var(--color-accent);
}

@keyframes milestoneBannerIn {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.bottom-controls {
  position: static;
  z-index: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 16px;
  background: transparent;
}

.conversation-bottom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.timer-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fffefb 0%, #fdf8eb 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.timer-display {
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.timer-display.is-urgent {
  color: var(--color-danger);
}

.timer-container.is-urgent {
  background: linear-gradient(180deg, rgba(255, 245, 240, 0.98) 0%, rgba(255, 237, 228, 0.98) 100%);
  border-color: rgba(224, 69, 7, 0.35);
  box-shadow: 0 12px 28px rgba(224, 69, 7, 0.14);
}

.end-conversation-button {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
}

.transcript {
  display: block;
  width: 100%;
  height: auto;
  min-height: calc(100vh - 260px);
  max-height: none;
  flex: none;
  margin-bottom: 18px;
  padding: 18px 18px 28px;
  background: linear-gradient(180deg, rgba(249, 243, 217, 0.55) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: visible;
}

.transcript.is-empty {
  min-height: 88px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(249, 243, 217, 0.38) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.transcript.is-empty .message {
  margin-bottom: 0;
  padding: 10px 12px;
}

.message {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  line-height: 1.55;
}

.message.learner {
  background: rgba(34, 1, 178, 0.08);
  border-color: rgba(155, 111, 211, 0.28);
  color: var(--color-text);
}

.message.patient {
  background: rgba(0, 100, 102, 0.09);
  border-color: rgba(0, 100, 102, 0.22);
  color: var(--color-text);
}

.message.system {
  background: rgba(229, 222, 193, 0.45);
  border-color: rgba(127, 127, 127, 0.18);
  color: #4f4a43;
}

.message-label {
  margin-bottom: 4px;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.traffic-light {
  --traffic-light-yellow: #ffd400;
  --traffic-light-yellow-core: #fff06a;
  --traffic-light-yellow-halo: rgba(255, 212, 0, 0.78);
  --traffic-light-green: #3dcf78;
  --traffic-light-green-core: #a6ffcb;
  --traffic-light-green-halo: rgba(61, 207, 120, 0.84);
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 5px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(42, 42, 42, 0.18) 0%, rgba(22, 22, 22, 0.08) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.traffic-light-bulb {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  opacity: 0.2;
  transform: scale(1);
  filter: saturate(0.9) brightness(0.78);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.24),
    inset 0 -1px 1px rgba(0, 0, 0, 0.18);
  transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.traffic-light-bulb::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.78);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.traffic-light-bulb.red {
  background: var(--color-danger);
}

.traffic-light-bulb.yellow {
  background: radial-gradient(circle at 35% 35%, var(--traffic-light-yellow-core) 0%, #ffe14a 38%, var(--traffic-light-yellow) 68%, #d6a800 100%);
}

.traffic-light-bulb.green {
  background: radial-gradient(circle at 35% 35%, var(--traffic-light-green-core) 0%, #6ff0a3 34%, var(--traffic-light-green) 68%, #1f8c4d 100%);
}

.traffic-light.red .traffic-light-bulb.red,
.traffic-light.yellow .traffic-light-bulb.yellow,
.traffic-light.green .traffic-light-bulb.green {
  opacity: 1;
  transform: scale(1.08);
  filter: saturate(1.18) brightness(1.05);
}

.traffic-light.red .traffic-light-bulb.red {
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.32),
    0 0 0 1px rgba(140, 24, 24, 0.16),
    0 0 14px rgba(190, 52, 52, 0.26);
}

.traffic-light.yellow .traffic-light-bulb.yellow {
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.42),
    0 0 0 1px rgba(191, 145, 0, 0.22),
    0 0 16px rgba(255, 212, 0, 0.48);
  animation: trafficLightPulseYellow 3.6s ease-in-out infinite;
}

.traffic-light.yellow .traffic-light-bulb.yellow::after {
  opacity: 0.62;
  box-shadow: 0 0 14px 4px var(--traffic-light-yellow-halo);
  animation: trafficLightHaloYellow 3.6s ease-in-out infinite;
}

.traffic-light.green .traffic-light-bulb.green {
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.44),
    0 0 0 1px rgba(29, 116, 58, 0.22),
    0 0 18px rgba(61, 207, 120, 0.54);
  animation: trafficLightPulseGreen 2.9s ease-in-out infinite;
}

.traffic-light.green .traffic-light-bulb.green::after {
  opacity: 0.68;
  box-shadow: 0 0 16px 5px var(--traffic-light-green-halo);
  animation: trafficLightHaloGreen 2.9s ease-in-out infinite;
}

@keyframes trafficLightPulseYellow {
  0%,
  100% {
    opacity: 0.86;
    transform: scale(1.04);
    filter: saturate(1.08) brightness(0.98);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, 0.34),
      0 0 0 1px rgba(191, 145, 0, 0.18),
      0 0 11px rgba(255, 212, 0, 0.32);
  }
  50% {
    opacity: 1;
    transform: scale(1.28);
    filter: saturate(1.22) brightness(1.16);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, 0.5),
      0 0 0 2px rgba(191, 145, 0, 0.28),
      0 0 28px rgba(255, 212, 0, 0.78);
  }
}

@keyframes trafficLightPulseGreen {
  0%,
  100% {
    opacity: 0.88;
    transform: scale(1.05);
    filter: saturate(1.1) brightness(1);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, 0.36),
      0 0 0 1px rgba(29, 116, 58, 0.18),
      0 0 12px rgba(61, 207, 120, 0.36);
  }
  50% {
    opacity: 1;
    transform: scale(1.34);
    filter: saturate(1.26) brightness(1.18);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, 0.54),
      0 0 0 2px rgba(29, 116, 58, 0.3),
      0 0 34px rgba(61, 207, 120, 0.9);
  }
}

@keyframes trafficLightHaloYellow {
  0%,
  100% {
    opacity: 0.34;
    transform: scale(0.9);
    box-shadow: 0 0 8px 2px rgba(255, 212, 0, 0.36);
  }
  50% {
    opacity: 0.82;
    transform: scale(1.4);
    box-shadow: 0 0 18px 8px rgba(255, 212, 0, 0.72);
  }
}

@keyframes trafficLightHaloGreen {
  0%,
  100% {
    opacity: 0.38;
    transform: scale(0.94);
    box-shadow: 0 0 10px 3px rgba(61, 207, 120, 0.42);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.5);
    box-shadow: 0 0 22px 9px rgba(61, 207, 120, 0.84);
  }
}

.live-tally {
  width: 100%;
  padding: 14px;
  background: linear-gradient(180deg, #fffefb 0%, #fdf8eb 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.transcript-live-tally-wrap {
  margin: 6px 0 4px;
  padding-left: 0;
}

.transcript-live-tally {
  max-width: 100%;
}

.live-tally-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.live-tally-title {
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  line-height: 1.2;
}

.live-tally-score {
  color: var(--color-text);
  font-size: 1.3rem;
  font-weight: 700;
  white-space: nowrap;
}

.live-tally-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.live-tally-stat {
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.live-tally-stat.is-met {
  color: var(--color-success);
  background: rgba(0, 100, 102, 0.08);
  border-color: rgba(0, 100, 102, 0.18);
}

.live-tally-stat.is-close {
  color: #8b571c;
  background: rgba(181, 118, 41, 0.1);
  border-color: rgba(181, 118, 41, 0.2);
}

.live-tally-stat.is-not-yet {
  color: #ad3607;
  background: rgba(224, 69, 7, 0.08);
  border-color: rgba(224, 69, 7, 0.18);
}

.live-tally-stat-label {
  margin-bottom: 2px;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-tally-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
}

.live-progress {
  margin-bottom: 8px;
}

.live-progress-bar {
  height: 14px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(249, 243, 217, 0.34) 52%, rgba(229, 222, 193, 0.22) 100%),
    linear-gradient(90deg, rgba(249, 243, 217, 0.78) 0%, rgba(255, 253, 246, 0.94) 48%, rgba(229, 222, 193, 0.74) 100%);
  border-radius: var(--radius-pill);
  box-shadow:
    inset 0 1px 2px rgba(22, 22, 22, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.42),
    0 0 0 1px rgba(229, 222, 193, 0.65);
}

.live-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(234, 250, 247, 0.34) 0%, rgba(234, 250, 247, 0.12) 30%, rgba(234, 250, 247, 0) 100%),
    linear-gradient(180deg, rgba(0, 128, 128, 0.18) 0%, rgba(0, 100, 102, 0.04) 54%, rgba(0, 100, 102, 0) 100%),
    linear-gradient(90deg, #0c6f70 0%, #006f73 38%, #006466 72%, #0b585a 100%);
  transition: width 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow:
    inset 0 1px 0 rgba(241, 255, 253, 0.22),
    inset 0 -1px 0 rgba(0, 73, 75, 0.28);
}

.live-progress-wave {
  position: absolute;
  top: -18%;
  bottom: -24%;
  left: -32%;
  width: 232%;
  pointer-events: none;
  will-change: transform;
  mix-blend-mode: screen;
}

.live-progress-wave::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background-repeat: repeat;
  will-change: transform, opacity;
}

.live-progress-wave-back {
  opacity: 0.12;
  animation: liveProgressWaterBase 16s linear infinite;
}

.live-progress-wave-back::before {
  background:
    radial-gradient(ellipse at 18px 14px, rgba(184, 241, 233, 0.14) 0 34%, rgba(184, 241, 233, 0) 38%) 0 0 / 54px 24px repeat,
    radial-gradient(ellipse at 34px 18px, rgba(214, 248, 242, 0.08) 0 30%, rgba(214, 248, 242, 0) 36%) 18px 10px / 78px 30px repeat,
    linear-gradient(180deg, rgba(205, 246, 239, 0.06) 0%, rgba(205, 246, 239, 0) 100%);
  transform: translateY(3%);
}

.live-progress-wave-mid {
  opacity: 0.18;
  animation: liveProgressWaterMid 10.4s ease-in-out infinite;
}

.live-progress-wave-mid::before {
  background:
    radial-gradient(ellipse at 24px 14px, rgba(219, 252, 246, 0.16) 0 32%, rgba(219, 252, 246, 0) 36%) 0 2px / 48px 21px repeat,
    radial-gradient(ellipse at 46px 18px, rgba(170, 234, 226, 0.12) 0 30%, rgba(170, 234, 226, 0) 36%) 24px 12px / 72px 28px repeat,
    linear-gradient(180deg, rgba(226, 251, 247, 0.12) 0%, rgba(226, 251, 247, 0) 72%);
  transform: translateY(-1%);
}

.live-progress-wave-front {
  top: -28%;
  bottom: -30%;
  left: -20%;
  width: 182%;
  opacity: 0.34;
  animation: liveProgressWaterFront 5.4s cubic-bezier(0.42, 0.08, 0.22, 1) infinite;
}

.live-progress-wave-front::before {
  background:
    radial-gradient(ellipse at 14px 8px, rgba(233, 255, 251, 0.26) 0 30%, rgba(233, 255, 251, 0) 36%) 0 0 / 30px 14px repeat,
    radial-gradient(ellipse at 26px 12px, rgba(182, 241, 233, 0.2) 0 28%, rgba(182, 241, 233, 0) 36%) 12px 6px / 38px 18px repeat,
    linear-gradient(180deg, rgba(232, 255, 251, 0.2) 0%, rgba(232, 255, 251, 0.04) 62%, rgba(232, 255, 251, 0) 100%);
  transform: translateY(-12%);
}

.live-progress-front-zone {
  position: absolute;
  top: -24%;
  right: -6px;
  width: clamp(44px, 30%, 78px);
  height: 158%;
  pointer-events: none;
  border-radius: 999px 999px 999px 999px;
  background:
    radial-gradient(ellipse at 82% 48%, rgba(240, 255, 252, 0.7) 0 18%, rgba(240, 255, 252, 0) 44%),
    radial-gradient(ellipse at 34% 58%, rgba(0, 83, 84, 0.42) 0 34%, rgba(0, 83, 84, 0) 70%),
    linear-gradient(90deg, rgba(0, 100, 102, 0) 0%, rgba(26, 137, 126, 0.24) 36%, rgba(216, 252, 246, 0.34) 100%);
  mix-blend-mode: screen;
  transform-origin: right center;
  animation: liveProgressFrontZone 4.4s cubic-bezier(0.4, 0.06, 0.18, 1) infinite;
}

.live-progress-front-zone::before,
.live-progress-front-zone::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.live-progress-front-zone::before {
  background:
    radial-gradient(ellipse at 86% 34%, rgba(255, 255, 255, 0.86) 0 16%, rgba(255, 255, 255, 0) 38%),
    radial-gradient(ellipse at 64% 68%, rgba(200, 250, 242, 0.32) 0 20%, rgba(200, 250, 242, 0) 54%);
  animation: liveProgressFrontFoam 4.1s cubic-bezier(0.44, 0.06, 0.22, 1) infinite;
}

.live-progress-front-zone::after {
  background:
    linear-gradient(90deg, rgba(0, 77, 79, 0) 0%, rgba(0, 77, 79, 0.1) 38%, rgba(0, 77, 79, 0.36) 100%);
  mix-blend-mode: multiply;
  animation: liveProgressFrontWake 4.7s cubic-bezier(0.4, 0.08, 0.22, 1) infinite;
}

.live-progress-pressure-head {
  position: absolute;
  top: -22%;
  right: -8px;
  width: clamp(36px, 24%, 66px);
  height: 152%;
  pointer-events: none;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 72% 44%, rgba(233, 255, 251, 0.58) 0 18%, rgba(233, 255, 251, 0) 46%),
    radial-gradient(ellipse at 32% 60%, rgba(0, 84, 85, 0.34) 0 38%, rgba(0, 84, 85, 0) 70%),
    linear-gradient(90deg, rgba(0, 100, 102, 0) 0%, rgba(18, 126, 121, 0.22) 42%, rgba(175, 239, 231, 0.28) 100%);
  box-shadow:
    -10px 0 18px rgba(0, 73, 75, 0.14),
    inset -3px 0 10px rgba(0, 77, 79, 0.14),
    inset 2px 0 0 rgba(235, 255, 252, 0.26);
  transform-origin: right center;
  animation: liveProgressPressureHead 4.3s cubic-bezier(0.38, 0.05, 0.18, 1) infinite;
  opacity: 0.92;
}

.live-progress-crest {
  position: absolute;
  top: 50%;
  right: -18px;
  width: 32px;
  height: 144%;
  pointer-events: none;
  border-radius: 999px;
  background:
    radial-gradient(circle at 60% 22%, rgba(255, 255, 255, 0.92) 0 14%, rgba(255, 255, 255, 0.34) 24%, rgba(255, 255, 255, 0) 52%),
    radial-gradient(ellipse at 60% 46%, rgba(196, 250, 242, 0.54) 0 30%, rgba(196, 250, 242, 0) 56%),
    linear-gradient(180deg, rgba(246, 255, 253, 0.86) 0%, rgba(214, 252, 245, 0.42) 34%, rgba(42, 174, 152, 0.22) 68%, rgba(0, 100, 102, 0.08) 100%);
  box-shadow:
    -14px 0 18px rgba(214, 252, 246, 0.28),
    -5px 0 0 rgba(0, 75, 76, 0.28),
    inset 3px 0 0 rgba(255, 255, 255, 0.58),
    inset -3px 0 6px rgba(0, 100, 102, 0.14);
  transform-origin: center;
  animation: liveProgressCrestPush 4.1s cubic-bezier(0.36, 0.04, 0.18, 1) infinite;
  opacity: 0.96;
  filter: saturate(1.02);
}

.live-progress-text,
.live-tally-helper {
  color: var(--color-text-muted);
  font-size: 0.76rem;
}

.live-domain-summary,
.guide-domain-summary,
.domain-summary-grid {
  display: grid;
  gap: 10px;
}

.live-domain-summary,
.guide-domain-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-domain-summary {
  margin-bottom: 8px;
}

.guide-domain-summary {
  margin-bottom: 16px;
}

.live-domain-pill,
.guide-domain-pill,
.domain-summary-card {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.76);
}

.live-domain-pill,
.guide-domain-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.live-domain-label,
.guide-domain-label,
.domain-summary-title {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-domain-value,
.guide-domain-value,
.domain-summary-score {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.live-progress-text {
  margin-top: 8px;
}

.live-tally-updated,
.transcript-live-tally-updated {
  box-shadow: 0 10px 24px rgba(22, 22, 22, 0.08);
}

@keyframes liveProgressWaterBase {
  0% {
    transform: translate3d(0, 0, 0) scaleY(1);
  }

  100% {
    transform: translate3d(-26%, 1px, 0) scaleY(1.03);
  }
}

@keyframes liveProgressWaterMid {
  0% {
    transform: translate3d(0, 0, 0) scaleY(1);
  }

  25% {
    transform: translate3d(-8%, -1px, 0) scaleY(1.05);
  }

  50% {
    transform: translate3d(-16%, 1px, 0) scaleY(0.98);
  }

  75% {
    transform: translate3d(-24%, -1px, 0) scaleY(1.04);
  }

  100% {
    transform: translate3d(-32%, 0, 0) scaleY(1);
  }
}

@keyframes liveProgressWaterFront {
  0% {
    transform: translate3d(0, 0, 0) scaleX(0.98) scaleY(0.98);
  }

  18% {
    transform: translate3d(-4%, -1px, 0) scaleX(1.02) scaleY(1.06);
  }

  42% {
    transform: translate3d(-10%, 1px, 0) scaleX(1.08) scaleY(1.04);
  }

  58% {
    transform: translate3d(-14%, -1px, 0) scaleX(1.18) scaleY(1.12);
  }

  76% {
    transform: translate3d(-19%, 0, 0) scaleX(1.06) scaleY(1.02);
  }

  100% {
    transform: translate3d(-24%, 0, 0) scaleX(0.98) scaleY(0.98);
  }
}

@keyframes liveProgressFrontZone {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scaleX(0.9) scaleY(0.94);
    opacity: 0.78;
  }

  22% {
    transform: translate3d(4px, -1px, 0) scaleX(1.04) scaleY(1);
    opacity: 0.92;
  }

  52% {
    transform: translate3d(11px, -1px, 0) scaleX(1.3) scaleY(1.14);
    opacity: 1;
  }

  66% {
    transform: translate3d(13px, 0, 0) scaleX(1.36) scaleY(1.18);
    opacity: 1;
  }

  84% {
    transform: translate3d(5px, 1px, 0) scaleX(1.06) scaleY(0.98);
    opacity: 0.86;
  }
}

@keyframes liveProgressFrontFoam {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.88);
    opacity: 0.54;
  }

  34% {
    transform: translate3d(6px, -1px, 0) scale(1.08);
    opacity: 0.82;
  }

  62% {
    transform: translate3d(12px, -2px, 0) scale(1.28);
    opacity: 1;
  }

  80% {
    transform: translate3d(4px, -1px, 0) scale(1.04);
    opacity: 0.72;
  }
}

@keyframes liveProgressFrontWake {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scaleX(0.9);
    opacity: 0.42;
  }

  36% {
    transform: translate3d(4px, 0, 0) scaleX(1.06);
    opacity: 0.6;
  }

  64% {
    transform: translate3d(10px, 0, 0) scaleX(1.26);
    opacity: 0.82;
  }

  82% {
    transform: translate3d(4px, 0, 0) scaleX(1.02);
    opacity: 0.56;
  }
}

@keyframes liveProgressPressureHead {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scaleX(0.92) scaleY(0.96);
    opacity: 0.76;
  }

  24% {
    transform: translate3d(6px, -1px, 0) scaleX(1.02) scaleY(1);
    opacity: 0.9;
  }

  52% {
    transform: translate3d(14px, 0, 0) scaleX(1.34) scaleY(1.14);
    opacity: 1;
  }

  68% {
    transform: translate3d(16px, 0, 0) scaleX(1.42) scaleY(1.18);
    opacity: 1;
  }

  84% {
    transform: translate3d(6px, 1px, 0) scaleX(1.04) scaleY(1);
    opacity: 0.84;
  }
}

@keyframes liveProgressCrestPush {
  0%,
  100% {
    transform: translate3d(0, -50%, 0) scaleX(0.86) scaleY(0.9) rotate(-3deg);
    opacity: 0.68;
  }

  24% {
    transform: translate3d(7px, -50%, 0) scaleX(1.06) scaleY(1.04) rotate(-1deg);
    opacity: 0.86;
  }

  52% {
    transform: translate3d(16px, -50%, 0) scaleX(1.42) scaleY(1.2) rotate(1deg);
    opacity: 1;
  }

  66% {
    transform: translate3d(18px, -50%, 0) scaleX(1.52) scaleY(1.24) rotate(2deg);
    opacity: 1;
  }

  84% {
    transform: translate3d(7px, -50%, 0) scaleX(1.08) scaleY(1.02) rotate(0deg);
    opacity: 0.88;
  }
}

.learner-guide-box {
  min-height: 100%;
  height: 100%;
}

.learner-guide-inner {
  padding: 18px;
}

.learner-guide-title {
  font-size: 1.5rem;
  line-height: 1.2;
}

.learner-guide-help {
  margin-top: 8px;
  margin-bottom: 16px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.learner-guide-section + .learner-guide-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.learner-guide-section-title {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.learner-guide-item {
  padding: 12px 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.learner-guide-item + .learner-guide-item {
  margin-top: 10px;
}

.learner-guide-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.learner-guide-item-title {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}

.learner-guide-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.learner-guide-evidence {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(127, 127, 127, 0.24);
  color: #37322d;
  font-size: 0.82rem;
  line-height: 1.5;
}

.learner-guide-item-updated {
  animation: learnerGuidePulse 0.42s ease;
  box-shadow: 0 12px 26px rgba(22, 22, 22, 0.1);
}

@keyframes learnerGuidePulse {
  0% {
    opacity: 0.8;
    transform: translateY(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.composer input {
  flex: 1 1 280px;
  min-width: 0;
  padding: 13px 14px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.composer input::placeholder {
  color: var(--color-text-muted);
}

.composer input:hover {
  border-color: rgba(34, 1, 178, 0.35);
}

.composer input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: var(--focus-ring);
}

.composer input:disabled {
  background: #f5f2e7;
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.composer button,
.primary-button {
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-surface);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.composer button:hover,
.primary-button:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 10px 18px rgba(181, 118, 41, 0.18);
  transform: translateY(-1px);
}

.composer button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.composer button:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.secondary-button {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff 0%, #faf6e9 100%);
  color: var(--color-text);
  font-size: 0.96rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.secondary-button:hover {
  border-color: rgba(34, 1, 178, 0.32);
  background: rgba(249, 243, 217, 0.88);
  transform: translateY(-1px);
}

.secondary-button.active {
  border-color: var(--color-accent);
  background: rgba(155, 111, 211, 0.12);
  color: var(--color-accent);
  font-weight: 600;
}

.voice-panel,
.session-box,
.score-box,
.faculty-summary,
.summary-stat,
.score-item,
.learner-guide-box,
.sidebar-panel {
  background: linear-gradient(180deg, #fffefb 0%, #fdf8eb 100%);
}

.voice-panel {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.voice-controls {
  align-items: center;
  margin-bottom: 8px;
}

.voice-status {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.voice-status.idle {
  color: var(--color-text-muted);
}

.voice-status.listening {
  color: var(--color-success);
  font-weight: 600;
}

.voice-status.patient-speaking {
  color: var(--color-accent);
  font-weight: 600;
}

.voice-status.disconnected {
  color: var(--color-warning);
  font-weight: 600;
}

.voice-status.error-state {
  color: var(--color-danger);
  font-weight: 600;
}

.session-box,
.score-box {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.95rem;
  box-shadow: var(--shadow-soft);
}

.score-total {
  margin-bottom: 14px;
  color: var(--color-text);
  font-size: 1.7rem;
  font-weight: 700;
}

.summary-hero-shell {
  margin-top: 22px;
  margin-bottom: 22px;
}

.patient-reflection-shell {
  margin-bottom: 18px;
}

.patient-reflection-card {
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 247, 239, 0.96) 100%);
  box-shadow: var(--shadow-soft);
}

.patient-reflection-title {
  font-size: 1.4rem;
  line-height: 1.15;
}

.summary-hero-card {
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 1, 178, 0.08), transparent 26%),
    linear-gradient(180deg, #fffefb 0%, #f8f0df 100%);
  border: 1px solid rgba(34, 1, 178, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 40px rgba(22, 22, 22, 0.12);
}

.summary-hero-placeholder {
  padding: 20px 24px;
}

.summary-hero-topline,
.summary-restart-area,
.summary-near-miss-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.summary-hero-kicker,
.summary-hero-label,
.summary-near-miss-meta {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-hero-title,
.summary-near-miss-title {
  font-family: var(--font-heading);
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.summary-hero-title {
  margin-top: 6px;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.08;
}

.summary-tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(34, 1, 178, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(34, 1, 178, 0.08);
  color: var(--color-accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.summary-domain-pill-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.summary-domain-pill {
  padding: 12px 14px;
  border: 1px solid rgba(0, 100, 102, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.summary-domain-pill.is-unavailable {
  border-color: rgba(127, 127, 127, 0.18);
  background: rgba(255, 255, 255, 0.62);
}

.summary-domain-pill-label {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-domain-pill-value {
  margin-top: 4px;
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.summary-hero-score-grid,
.summary-near-miss-grid {
  display: grid;
  gap: 14px;
}

.summary-hero-score-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 22px;
}

.summary-hero-score-block {
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(229, 222, 193, 0.95);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.summary-hero-score {
  margin-top: 6px;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  line-height: 1.05;
}

.summary-hero-subtext,
.summary-near-miss-subtitle,
.summary-near-miss-focus,
.summary-restart-copy,
.summary-near-miss-empty {
  color: #3f3a33;
  font-size: 0.94rem;
  line-height: 1.6;
}

.summary-hero-subtext {
  margin-top: 6px;
}

.summary-message-pill {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.summary-message-pill-benchmark {
  background: rgba(34, 1, 178, 0.08);
  border-color: rgba(34, 1, 178, 0.14);
  color: var(--color-accent);
}

.summary-message-pill-celebration {
  background: rgba(0, 100, 102, 0.1);
  border-color: rgba(0, 100, 102, 0.18);
  color: var(--color-success);
}

.summary-message-pill-matched {
  background: rgba(181, 118, 41, 0.1);
  border-color: rgba(181, 118, 41, 0.18);
  color: #8b571c;
}

.summary-message-pill-chase {
  background: rgba(224, 69, 7, 0.08);
  border-color: rgba(224, 69, 7, 0.16);
  color: #a53a10;
}

.summary-variant-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed rgba(34, 1, 178, 0.2);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(252, 250, 255, 0.96) 0%, rgba(248, 244, 253, 0.96) 100%);
}

.summary-variant-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.summary-variant-kicker {
  color: var(--color-accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-variant-callout {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid rgba(0, 100, 102, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(0, 100, 102, 0.1);
  color: var(--color-success);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.summary-near-miss-section {
  margin-top: 22px;
}

.summary-near-miss-header {
  margin-bottom: 14px;
}

.summary-near-miss-title {
  font-size: 1.45rem;
  line-height: 1.15;
}

.summary-near-miss-subtitle {
  margin-top: 6px;
}

.summary-near-miss-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.summary-near-miss-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.summary-near-miss-item {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.summary-near-miss-meta {
  margin-top: 4px;
  letter-spacing: 0.08em;
}

.summary-near-miss-points {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(0, 100, 102, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(0, 100, 102, 0.08);
  color: var(--color-success);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

.summary-near-miss-focus {
  margin-top: 10px;
}

.summary-near-miss-empty {
  padding: 14px;
  border: 1px dashed rgba(127, 127, 127, 0.28);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.summary-restart-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(229, 222, 193, 0.95);
}

.summary-restart-area .primary-button {
  min-width: 220px;
}

.summary-restart-copy {
  max-width: 660px;
}

.discovery-summary-section {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(252, 250, 255, 0.96) 0%, rgba(247, 243, 252, 0.96) 100%);
}

.discovery-summary-header {
  margin-bottom: 12px;
}

.discovery-summary-kicker {
  color: var(--color-accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.discovery-summary-copy,
.discovery-summary-label,
.discovery-summary-text {
  color: #3f3a47;
}

.discovery-summary-copy {
  margin-top: 6px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.discovery-summary-list {
  display: grid;
  gap: 12px;
}

.discovery-summary-card {
  padding: 14px;
  border: 1px solid rgba(34, 1, 178, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
}

.discovery-summary-label {
  margin-bottom: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discovery-summary-text {
  font-size: 0.95rem;
  line-height: 1.55;
}

.score-summary-grid,
.faculty-summary-grid {
  display: grid;
  gap: 12px;
}

.score-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 16px;
}

.domain-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 16px;
}

.domain-summary-meta {
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.summary-stat {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.summary-stat-label {
  margin-bottom: 4px;
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-stat-value {
  color: var(--color-text);
  font-size: 1.55rem;
  font-weight: 700;
}

.faculty-summary {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.faculty-summary-title {
  margin-bottom: 10px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.faculty-summary-impression {
  margin-bottom: 14px;
  color: #2b2b2b;
  line-height: 1.6;
}

.faculty-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.faculty-summary-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.faculty-summary-card-title {
  margin-bottom: 8px;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.2;
  text-transform: none;
}

.faculty-summary-list {
  margin: 0;
  padding-left: 18px;
}

.faculty-summary-list li {
  margin-bottom: 6px;
}

.faculty-next-step {
  border-left: 4px solid var(--color-accent);
}

.score-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.score-section:first-of-type {
  padding-top: 0;
  border-top: none;
}

.score-section-title {
  margin-bottom: 10px;
  font-size: 1.28rem;
  line-height: 1.25;
}

.score-item {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.score-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.score-item-title {
  font-size: 1.12rem;
  line-height: 1.25;
}

.score-item-meta {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

.score-item-line {
  margin-top: 6px;
  color: #37322d;
  font-size: 0.85rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-met {
  background: rgba(0, 100, 102, 0.12);
  border-color: rgba(0, 100, 102, 0.22);
  color: var(--color-success);
}

.status-partial {
  background: rgba(181, 118, 41, 0.13);
  border-color: rgba(181, 118, 41, 0.22);
  color: #8b571c;
}

.status-notyet {
  background: rgba(224, 69, 7, 0.12);
  border-color: rgba(224, 69, 7, 0.2);
  color: #ad3607;
}

.error {
  margin-top: 16px;
  padding: 14px;
  background: rgba(224, 69, 7, 0.09);
  border: 1px solid rgba(224, 69, 7, 0.22);
  border-radius: var(--radius-md);
  color: #8c2d08;
}

.voice-audio {
  display: none;
}

code {
  font-family: "Courier New", Courier, monospace;
}

@media (max-width: 960px) {
  .conversation-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 0;
  }

  .sidebar-panel {
    position: static;
    top: auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .learner-guide-scroll {
    flex: none;
    min-height: auto;
    overflow: visible;
  }

  .learner-guide-box {
    min-height: auto;
    height: auto;
  }

  .bottom-controls {
    position: static;
    z-index: auto;
    padding-top: 0;
    background: transparent;
  }
}

@media (max-width: 1080px) {
  .progress-panel-prebrief .progress-mini-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .progress-panel-prebrief .progress-mini-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  body {
    padding: 16px;
  }

  .card {
    margin: 20px auto;
    padding: 22px;
  }

  h1 {
    margin-bottom: 22px;
    font-size: 2rem;
  }

  .section-title {
    margin-top: 30px;
    font-size: 1.45rem;
  }

  .prebrief-card {
    padding: 22px;
  }

  .prebrief-card-header {
    flex-direction: column;
  }

  .summary-hero-card,
  .score-box {
    padding: 20px;
  }

  .summary-hero-topline,
  .summary-restart-area,
  .summary-near-miss-card-top {
    flex-direction: column;
  }

  .summary-tier-badge {
    white-space: normal;
  }

  .progress-panel-topline,
  .progress-attempt-row,
  .mastery-tier-row,
  .variant-progress-row,
  .summary-variant-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-domain-pill-group {
    grid-template-columns: 1fr;
  }

  .progress-panel-subtle {
    white-space: normal;
  }

  .live-tally-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .timer-container {
    width: 100%;
  }

  .conversation-bottom-row {
    flex-direction: column;
  }

  .live-tally-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .live-domain-summary,
  .guide-domain-summary {
    grid-template-columns: 1fr;
  }

  .score-item-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .learner-guide-item-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .message-row {
    gap: 10px;
  }

  .transcript-live-tally-wrap {
    margin-bottom: 12px;
    padding-left: 0;
  }

  .transcript-live-tally {
    max-width: 100%;
  }

  .traffic-light {
    padding: 5px 4px;
  }

  .traffic-light-bulb {
    width: 10px;
    height: 10px;
  }

  .composer {
    flex-direction: column;
  }

  .prebrief-actions {
    display: block;
  }

  .composer input,
  .composer button,
  .prebrief-actions .primary-button,
  .primary-button,
  .secondary-button,
  .summary-restart-area .primary-button {
    width: 100%;
  }

  .end-conversation-button {
    width: auto;
  }

  .admin-wizard-hero {
    padding: 20px;
  }

  .admin-intake-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-generate-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .traffic-light-bulb,
  .live-tally,
  .live-tally-stat,
  .live-progress-fill,
  .learner-guide-item {
    transition: none;
  }

  .live-progress-wave-back,
  .live-progress-wave-mid,
  .live-progress-wave-front,
  .live-progress-front-zone,
  .live-progress-pressure-head,
  .live-progress-crest {
    animation: none;
    display: none;
  }

  .live-tally-updated .live-tally-score,
  .live-tally-updated .live-tally-stat,
  .transcript-live-tally-updated .live-tally-score,
  .transcript-live-tally-updated .live-tally-stat,
  .learner-guide-item-updated,
  .milestone-banner {
    animation: none;
  }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(34, 1, 178, 0.1), transparent 26%),
    linear-gradient(180deg, #fffefb 0%, #f7efdf 100%);
}

.auth-card {
  width: min(100%, 430px);
  padding: 30px 28px;
  border: 1px solid rgba(34, 1, 178, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
}

.auth-kicker {
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-title {
  margin: 10px 0 8px;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.4rem);
  line-height: 1.05;
}

.auth-copy {
  margin: 0 0 18px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-status {
  min-height: 24px;
  margin-top: 14px;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.auth-status.is-error {
  color: var(--color-danger);
}

.page-link-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.case-picker-panel,
.admin-panel {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fffefb 0%, #fdf8eb 100%);
  box-shadow: var(--shadow-soft);
}

.case-picker-row {
  display: grid;
  gap: 8px;
}

.case-select,
.field-input,
.field-select,
.field-textarea {
  width: 100%;
  padding: 13px 14px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.case-select:hover,
.field-input:hover,
.field-select:hover,
.field-textarea:hover {
  border-color: rgba(34, 1, 178, 0.35);
}

.case-select:focus,
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: var(--focus-ring);
}

.field-textarea {
  resize: vertical;
  min-height: 56px;
}

.case-picker-help,
.admin-inline-help,
.admin-subtitle {
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.admin-inline-help.is-error,
#adminAuthStatus.is-error,
#adminSaveStatus.is-error {
  color: var(--color-danger);
}

.admin-card {
  max-width: 1560px;
}

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

.admin-sidebar,
.admin-main {
  min-width: 0;
}

.admin-sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.admin-panel-title {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.35rem;
}

.admin-panel-header,
.admin-repeatable-header,
.admin-page-header,
.admin-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.admin-page-header {
  align-items: flex-start;
}

.admin-section-heading {
  margin-bottom: 14px;
  align-items: flex-start;
}

.admin-auth-actions,
.admin-toolbar {
  margin-top: 12px;
}

.admin-form {
  display: grid;
  gap: 20px;
}

.admin-view.is-hidden {
  display: none;
}

.admin-view {
  min-width: 0;
}

.admin-wizard-hero {
  margin-bottom: 18px;
  padding: 24px 26px;
  border: 1px solid rgba(34, 1, 178, 0.16);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(34, 1, 178, 0.08), transparent 28%),
    linear-gradient(180deg, #fffefb 0%, #f8f0df 100%);
  box-shadow: var(--shadow-soft);
}

.admin-view-kicker,
.admin-panel-eyebrow {
  color: var(--color-accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-view-title {
  margin: 8px 0 10px;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1.08;
}

.admin-view-subtitle {
  max-width: 760px;
  margin: 0;
  color: #4f4a43;
  font-size: 0.98rem;
  line-height: 1.65;
}

.admin-intake-form {
  display: grid;
  gap: 18px;
}

.admin-intake-fieldset {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.admin-intake-fieldset:disabled {
  opacity: 0.7;
}

.admin-intake-panel {
  margin-bottom: 0;
}

.admin-intake-panel .admin-panel-title {
  margin-bottom: 0;
}

.admin-intake-subsection {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-intake-variant-count {
  max-width: 220px;
}

.admin-intake-textarea {
  min-height: 120px;
}

.admin-grid-span-two {
  grid-column: span 2;
}

.admin-intake-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}

.admin-intake-footer-copy {
  max-width: 720px;
}

.admin-generate-button {
  min-width: 220px;
}

.admin-view-status {
  margin-top: 6px;
}

.admin-editor-form {
  gap: 0;
}

.admin-editor-shell {
  display: grid;
  gap: 18px;
}

.admin-editor-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(34, 1, 178, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 1, 178, 0.09), transparent 26%),
    linear-gradient(180deg, #fffefb 0%, #f7efdf 100%);
  box-shadow: var(--shadow-soft);
}

.admin-editor-hero-copy {
  min-width: 0;
}

.admin-editor-title {
  margin-bottom: 8px;
}

.admin-editor-hero-actions {
  margin-top: 0;
  justify-content: flex-end;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-editor-status {
  grid-column: 1 / -1;
  padding-top: 4px;
}

.admin-editor-meta-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.admin-editor-meta-editable,
.admin-editor-meta-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(229, 222, 193, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.admin-editor-meta-editable .label,
.admin-editor-meta-item .label {
  margin-bottom: 8px;
}

.admin-editor-meta-editable .field-input {
  width: 100%;
  min-width: 0;
}

.admin-editor-meta-value {
  min-width: 0;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-editor-layout {
  min-width: 0;
}

.admin-sidebar-editor-nav {
  position: sticky;
  top: 24px;
}

.admin-editor-rail-nav {
  display: grid;
  gap: 8px;
}

.admin-editor-rail-link {
  display: block;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #4f4a43;
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1.4;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.admin-editor-rail-link:hover,
.admin-editor-rail-link:focus-visible {
  border-color: rgba(34, 1, 178, 0.18);
  background: rgba(34, 1, 178, 0.06);
  transform: translateX(1px);
}

.admin-editor-content {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.admin-editor-section {
  margin-bottom: 0;
  scroll-margin-top: 112px;
}

.admin-editor-subcard {
  padding: 16px;
  border: 1px solid rgba(229, 222, 193, 0.86);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.admin-editor-subcard + .admin-editor-subcard {
  margin-top: 14px;
}

.admin-editor-subcard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-editor-section .repeatable-card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(229, 222, 193, 0.95);
}

.admin-editor-rubric-builder {
  background:
    radial-gradient(circle at top right, rgba(34, 1, 178, 0.05), transparent 28%),
    rgba(255, 255, 255, 0.78);
}

.admin-rubric-sections-shell {
  display: grid;
  gap: 16px;
}

.admin-rubric-sections-header {
  margin-bottom: 0;
}

.admin-rubric-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-rubric-tab {
  display: grid;
  gap: 4px;
  min-width: 160px;
  padding: 12px 14px;
  border: 1px solid rgba(229, 222, 193, 0.96);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.admin-rubric-tab:hover,
.admin-rubric-tab:focus-visible {
  border-color: rgba(34, 1, 178, 0.24);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.admin-rubric-tab.is-active {
  border-color: rgba(34, 1, 178, 0.3);
  background: rgba(34, 1, 178, 0.08);
}

.admin-rubric-tab-title {
  font-weight: 600;
}

.admin-rubric-tab-meta {
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.admin-rubric-section-card {
  padding: 18px;
}

.admin-rubric-item-card {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 247, 239, 0.96) 100%);
}

.admin-rubric-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-rubric-item-title-display {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.admin-editor-footer {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(229, 222, 193, 0.96);
  border-radius: 20px;
  background: rgba(255, 253, 246, 0.95);
  box-shadow: 0 14px 30px rgba(22, 22, 22, 0.12);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.admin-editor-footer-copy {
  max-width: 620px;
}

.admin-editor-footer-actions {
  margin-top: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-editor-header {
  align-items: flex-start;
}

.admin-grid {
  display: grid;
  gap: 14px;
}

.admin-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-grid {
  align-items: end;
}

.admin-repeatable-block + .admin-repeatable-block {
  margin-top: 18px;
}

.repeatable-list {
  display: grid;
  gap: 12px;
}

.repeatable-list-spaced {
  margin-top: 10px;
}

.repeatable-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.repeatable-input {
  flex: 1;
}

.repeatable-card {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
}

.nested-header {
  margin-top: 12px;
  margin-bottom: 12px;
}

.admin-align-end {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.rubric-items-list {
  display: grid;
  gap: 12px;
}

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

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

.admin-list-item {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-list-item:hover {
  border-color: rgba(34, 1, 178, 0.32);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.admin-list-item-title,
.admin-list-item-meta {
  display: block;
}

.admin-list-item-title {
  color: var(--color-text);
  font-weight: 600;
}

.admin-list-item-meta,
.admin-empty-state {
  color: var(--color-text-muted);
  font-size: 0.86rem;
}

@media (max-width: 1180px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar-editor-nav {
    position: static;
  }

  .admin-editor-meta-band {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .admin-editor-rail-nav {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 860px) {
  .page-header,
  .admin-panel-header,
  .admin-repeatable-header,
  .admin-page-header,
  .admin-section-heading,
  .repeatable-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-grid-two,
  .admin-grid-three,
  .admin-grid-four {
    grid-template-columns: 1fr;
  }

  .admin-grid-span-two {
    grid-column: span 1;
  }

  .admin-editor-hero,
  .admin-editor-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .admin-editor-meta-band {
    grid-template-columns: 1fr;
  }

  .admin-editor-rail-nav {
    grid-template-columns: 1fr;
  }

  .admin-editor-footer {
    position: static;
    bottom: auto;
  }

  .admin-editor-footer-actions,
  .admin-editor-hero-actions {
    justify-content: stretch;
  }
}
