﻿:root {
  --app-header-height: 68px;
  --app-footer-min-height: 64px;
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --text: #0f1f35;
  --muted: #65758f;
  --border: rgba(15, 31, 53, 0.12);
  --primary: #145dff;
  --primary-2: #19c2ff;
  --accent: #0bb8a8;
  --footer: #091224;
  --shadow: 0 18px 45px rgba(10, 23, 48, 0.12);
  --sidebar: #091224;
  --sidebar-2: #111c33;
  --sidebar-text: #edf4ff;
  --icon-gradient: linear-gradient(135deg, #145dff 0%, #19c2ff 36%, #0bb8a8 68%, #ffbe45 100%);
}

body.theme-dark {
  --bg: #07111f;
  --panel: rgba(10, 18, 32, 0.9);
  --panel-strong: #0f172a;
  --text: #eff5ff;
  --muted: #9fb0cc;
  --border: rgba(255, 255, 255, 0.09);
  --primary: #58a6ff;
  --primary-2: #26d0ff;
  --accent: #ffbe45;
  --footer: #020617;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  --sidebar: #020617;
  --sidebar-2: #0b1120;
  --sidebar-text: #edf4ff;
  --icon-gradient: linear-gradient(135deg, #58a6ff 0%, #26d0ff 34%, #8b5cf6 70%, #ffbe45 100%);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

html {
  font-size: 15px;
}

#analytics,
#questions {
  scroll-margin-top: 120px;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(104, 132, 184, 0.1), transparent 30%),
    radial-gradient(circle at top right, rgba(142, 167, 206, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(132, 174, 170, 0.05), transparent 30%),
    var(--bg);
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

body::before {
  content: "";
  position: fixed;
  inset: -18% auto auto -12%;
  width: 38vw;
  height: 38vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(156, 181, 218, 0.14), rgba(196, 210, 231, 0.05) 55%, transparent 70%);
  filter: blur(12px);
  pointer-events: none;
  z-index: 0;
  animation: smartDrift 18s ease-in-out infinite;
}

body.section-dashboard {
  --icon-gradient: linear-gradient(135deg, #145dff 0%, #19c2ff 36%, #0bb8a8 68%, #ffbe45 100%);
}

body.section-dashboard .content-area {
  padding-top: 94px;
  padding-bottom: 120px;
}

body.section-interview {
  --icon-gradient: linear-gradient(135deg, #0f9d58 0%, #22c55e 36%, #84cc16 68%, #facc15 100%);
}

/* Follow the fixed application header; do not add a second empty band
   above the Interview Mentor workspace. */
body.section-interview .content-area {
  padding-top: var(--app-header-height);
}

body.section-account {
  --icon-gradient: linear-gradient(135deg, #0bb8a8 0%, #22c55e 38%, #19c2ff 72%, #145dff 100%);
}

body.section-billing {
  --icon-gradient: linear-gradient(135deg, #b8860b 0%, #f2c14e 38%, #ffbe45 72%, #ff7a18 100%);
}

body.section-admin {
  --icon-gradient: linear-gradient(135deg, #5b47f5 0%, #8b5cf6 40%, #d946ef 70%, #f472b6 100%);
}

body.section-settings {
  --icon-gradient: linear-gradient(135deg, #5b47f5 0%, #145dff 40%, #19c2ff 70%, #ffbe45 100%);
}

body.section-guide {
  --icon-gradient: linear-gradient(135deg, #145dff 0%, #19c2ff 34%, #0bb8a8 70%, #f2c14e 100%);
}

body.section-error {
  --icon-gradient: linear-gradient(135deg, #ef4444 0%, #f97316 35%, #ffbe45 72%, #fb7185 100%);
}

a {
  text-decoration: none;
}

:where(.app-shell, .footerbar, .error-page, .hero-panel, .panel-card, .sim-card, .billing-plan, .settings-hero, .voice-popup-card) :is(i.fa-solid, i.fa-regular, i.fa-brands, i.bi) {
  display: inline-block;
  background: var(--icon-gradient) !important;
  background-image: var(--icon-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  filter: drop-shadow(0 1px 2px rgba(10, 23, 48, 0.16));
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

body.theme-dark :where(.app-shell, .footerbar, .error-page, .hero-panel, .panel-card, .sim-card, .billing-plan, .settings-hero, .voice-popup-card) :is(i.fa-solid, i.fa-regular, i.fa-brands, i.bi) {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.38));
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 290px;
  top: var(--app-header-height);
  bottom: 0;
  left: 0;
  height: calc(100vh - var(--app-header-height));
  height: calc(100dvh - var(--app-header-height));
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: var(--sidebar-text);
  padding: 22px 18px;
  position: fixed;
  display: flex;
  flex-direction: column;
  z-index: 30;
  overflow: hidden;
  transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1), transform 240ms ease;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
  will-change: width, transform;
  --primary: #b8860b;
  --primary-2: #f2c14e;
  --accent: #8a6510;
  --icon-gradient: linear-gradient(135deg, #f2c14e 0%, #ffbe45 45%, #ff7a18 100%);
}

.sidebar-backdrop {
  display: none;
}

.sidebar.collapsed {
  width: 92px;
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
}

.sidebar.collapsed .brand-copy,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-footer .status-row div:last-child,
.sidebar.collapsed .sidebar-footer-actions,
.sidebar.collapsed .brand-badges {
  opacity: 0;
  transform: translateX(-12px);
  max-width: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
  overflow: hidden;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding-inline: 0;
  gap: 0;
}

.sidebar.collapsed .nav-item i {
  transform: scale(1.05);
}

.sidebar-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
  overflow: hidden;
  transition: opacity 240ms ease, transform 240ms ease, max-width 260ms ease, max-height 260ms ease;
  max-width: 220px;
  max-height: 140px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-size: 1.25rem;
  overflow: hidden;
  box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.35);
  animation: smartPulse 3.8s ease-in-out infinite;
}

.brand-mark img {
  display: block;
  width: auto;
  height: 100%;
  max-width: none;
}

.brand-flag-mark {
  position: relative;
  display: block;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: repeating-linear-gradient(to bottom, #b22234 0 8%, #fff 8% 16%);
  box-shadow: 0 0 0 5px rgba(20, 35, 66, .72), 0 9px 20px rgba(0, 0, 0, .24);
}

.brand-flag-mark span {
  position: absolute;
  inset: 0 auto auto 0;
  width: 53%;
  height: 55%;
  background-color: #3c3b6e;
  background-image: radial-gradient(circle, #fff 0 1px, transparent 1.25px);
  background-size: 6px 6px;
}

.brand-title {
  font-weight: 800;
  line-height: 1.2;
  color: #f2c14e;
}

.brand-subtitle {
  font-size: 0.82rem;
  color: rgba(255, 248, 230, 0.7);
}

.brand-badges {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-top: 10px;
  transition: opacity 240ms ease, transform 240ms ease, max-width 260ms ease, max-height 260ms ease;
  overflow: hidden;
  max-height: 84px;
}

.brand-badge-mini {
  display: inline-flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(237, 244, 255, 0.92);
  font-size: 0.64rem;
  font-weight: 700;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 5px 18px 0;
  margin-right: -7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 193, 78, 0.6) transparent;
}

.sidebar-mode-group {
  margin: 0.4rem 0 0.75rem;
  padding: 0.55rem;
  border: 1px solid rgba(224, 173, 49, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.sidebar-mode-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.2rem 0.7rem 0.45rem;
  color: #e7bd4c;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-mode-group .nav-item {
  margin: 0.18rem 0;
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
}

.sidebar-exam-group {
  border-color: rgba(114, 92, 238, 0.32);
  background: linear-gradient(135deg, rgba(72, 86, 220, 0.08), rgba(224, 173, 49, 0.035));
}

.sidebar-exam-group .sidebar-mode-label {
  color: #a99cff;
}

/* Exam Mode is one continuous flow. Keep its single navigation entry compact
   so the sidebar never clips or pushes the dashboard layout. */
.sidebar-exam-group .nav-item-complete-exam {
  min-height: 46px;
  white-space: nowrap;
}

.sidebar-exam-group .nav-item-complete-exam span {
  max-width: 150px;
  font-weight: 700;
}

.sidebar.collapsed .sidebar-mode-group {
  padding: 0.35rem;
}

.sidebar.collapsed .sidebar-mode-label span {
  display: none;
}

.sidebar.collapsed .sidebar-mode-label {
  justify-content: center;
  padding: 0.25rem 0 0.4rem;
}

.sidebar-nav::-webkit-scrollbar {
  width: 7px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(242, 193, 78, 0.55);
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-scroll-controls {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
}

.sidebar-scroll-button {
  display: none;
  width: 27px;
  height: 27px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(242, 193, 78, .34);
  border-radius: 50%;
  background: rgba(15, 24, 48, .92);
  color: #f2c14e;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
}

.sidebar-scroll-button.is-visible { display: grid; }
.sidebar-scroll-button:hover { background: rgba(242, 193, 78, .18); color: #fff4bf; }
.sidebar-scroll-button:disabled { opacity: .34; cursor: default; }
.sidebar-scroll-button:disabled:hover { background: rgba(15, 24, 48, .92); color: #f2c14e; }
.sidebar-scroll-button i { font-size: .7rem; }
.sidebar.collapsed .sidebar-scroll-controls { display: none; }

.sidebar-nav .nav-item .nav-selected-check {
  margin-left: auto;
  color: #70db89;
  font-size: 16px;
  font-weight: 800;
  flex: 0 0 auto;
}
.sidebar-nav .nav-selected-check[hidden] { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--sidebar-text);
  padding: 14px 16px;
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-item span {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  max-width: 180px;
  transition: opacity 220ms ease, transform 220ms ease, max-width 260ms ease, margin 220ms ease;
}

.nav-item .sidebar-flashcard-progress {
  display: none;
  margin-left: auto;
  min-width: 0;
  max-width: none;
  padding: 2px 6px;
  overflow: visible;
  border: 1px solid rgba(242, 193, 78, .38);
  border-radius: 999px;
  background: rgba(242, 193, 78, .15);
  color: #ffe48a;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.25;
}

.nav-item .sidebar-flashcard-progress.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: sidebar-flashcard-running 1.8s ease-in-out infinite;
}

.nav-item:has(.sidebar-flashcard-progress.is-visible) {
  border-color: rgba(242, 193, 78, .34);
  background: linear-gradient(90deg, rgba(242, 193, 78, .18), rgba(255, 255, 255, .05));
}
.nav-flashcards-running { margin-bottom: 4px; }

@keyframes sidebar-flashcard-running {
  50% { box-shadow: 0 0 0 4px rgba(242, 193, 78, .1); }
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(184, 134, 11, 0.28), rgba(255, 255, 255, 0.08));
  box-shadow: inset 3px 0 0 #f2c14e;
}

.nav-item i {
  width: 18px;
  text-align: center;
  color: #f2c14e;
}

.sidebar-footer {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

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

.sidebar-footer .status-row div:last-child {
  min-width: 0;
  overflow: hidden;
  transition: opacity 220ms ease, transform 220ms ease, max-width 260ms ease, max-height 260ms ease;
  max-height: 56px;
}

.sidebar-divider {
  height: 1px;
  margin: 10px 6px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.sidebar-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 220ms ease, transform 220ms ease, max-height 260ms ease;
  overflow: hidden;
  max-height: 60px;
}

.sidebar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-color: rgba(255, 255, 255, 0.18);
  color: #eef4ff;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.icon-btn-sidebar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15);
}

.app-main {
  margin-left: 290px;
  width: calc(100% - 290px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 320ms cubic-bezier(0.22, 1, 0.36, 1), width 320ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: margin-left, width;
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 25;
  height: var(--app-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
  transition: left 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar-start {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.header-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 16px;
  border: 1px solid rgba(242, 193, 78, 0.34);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 22px rgba(10, 23, 48, 0.14);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.header-logo-link:hover,
.header-logo-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(242, 193, 78, 0.58);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(10, 23, 48, 0.18);
}

.header-logo-link:focus-visible {
  outline: none;
}

.header-brand-copy {
  min-width: 0;
  animation: smartRise 0.55s ease both;
}

.header-logo {
  display: block;
  width: auto;
  max-width: 156px;
  height: clamp(34px, 2.8vw, 48px);
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.24));
  animation: headerLogoDrift 7s ease-in-out infinite;
}

body.theme-dark .header-logo-link {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(242, 193, 78, 0.24);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

body.theme-dark .header-logo-link:hover,
body.theme-dark .header-logo-link:focus-visible {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(242, 193, 78, 0.42);
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #f2c14e;
  padding: 4px 8px;
  margin-bottom: 3px;
  border-radius: 999px;
  background: rgba(242, 193, 78, 0.12);
  border: 1px solid rgba(242, 193, 78, 0.2);
  animation: brandShimmer 6.5s ease-in-out infinite;
}

.page-title {
  font-size: 1rem;
  font-weight: 750;
  color: #f7d36a;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-shadow: 0 0 12px rgba(242, 193, 78, 0.12);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.user-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(15, 31, 53, 0.12);
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 800;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.user-logout-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.global-search-wrap {
  position: relative;
  width: min(410px, 38vw);
}

.topbar .icon-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.topbar .icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-btn:hover {
  border-color: rgba(25, 194, 255, 0.35);
  color: var(--primary);
}

.top-search {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(25, 194, 255, 0.08);
  border: 1px solid rgba(25, 194, 255, 0.12);
  box-shadow: none;
}

.top-search input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--sidebar-text);
}

.top-search i {
  color: rgba(25, 194, 255, 0.8);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 80;
  border-radius: 18px;
  border: 1px solid rgba(25, 194, 255, 0.12);
  background: rgba(9, 18, 36, 0.98);
  box-shadow: 0 24px 38px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  max-height: min(60vh, 560px);
  overflow-y: auto;
}

.global-search-results.empty {
  padding: 16px;
  color: rgba(237, 244, 255, 0.82);
  font-size: 0.92rem;
}

.global-search-empty {
  padding: 16px;
  color: rgba(237, 244, 255, 0.82);
  font-size: 0.92rem;
}

.global-search-result {
  display: block;
  width: 100%;
  padding: 12px 14px;
  color: #edf4ff;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.global-search-result:hover,
.global-search-result:focus {
  background: rgba(20, 93, 255, 0.18);
  color: #ffffff;
}

.global-search-result:last-child {
  border-bottom: 0;
}

.global-search-result .search-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(25, 194, 255, 0.9);
}

.global-search-result .search-title {
  font-weight: 800;
  line-height: 1.35;
  color: #f7faff;
}

.global-search-result .search-subtitle {
  margin-top: 4px;
  font-size: 0.83rem;
  color: rgba(237, 244, 255, 0.78);
}

/* Buttons use the browser's light default background unless it is explicitly
   cleared; keep every search result readable in either application theme. */
body.theme-light .global-search-results {
  border-color: rgba(33, 72, 137, 0.2);
  background: #ffffff;
  box-shadow: 0 20px 38px rgba(15, 32, 64, 0.2);
}
body.theme-light .global-search-result { color: #14213d; border-bottom-color: #dfe6f2; }
body.theme-light .global-search-result .search-title { color: #14213d; }
body.theme-light .global-search-result .search-subtitle { color: #56657d; }
body.theme-light .global-search-results.empty,
body.theme-light .global-search-empty { color: #34425c; }
body.theme-light .global-search-result:hover,
body.theme-light .global-search-result:focus { background: #eaf1ff; color: #14213d; }

.topbar .text-secondary {
  color: rgba(237, 244, 255, 0.72) !important;
}

.topbar .lang-wrap {
  color: var(--sidebar-text);
}

.topbar .lang-wrap .small {
  color: rgba(237, 244, 255, 0.72) !important;
}

.topbar .dropdown-menu {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 18, 36, 0.98);
  color: var(--sidebar-text);
  box-shadow: 0 24px 36px rgba(0, 0, 0, 0.22);
}

.topbar .dropdown-item {
  color: var(--sidebar-text);
}

.topbar .dropdown-item:hover,
.topbar .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #edf4ff;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.icon-btn:hover {
  transform: translateY(-1px);
  color: var(--primary);
  border-color: rgba(20, 93, 255, 0.35);
}

.content-area {
  padding: calc(var(--app-header-height) + 26px) 20px 132px;
}

.footerbar {
  position: fixed;
  bottom: 0;
  left: 290px;
  right: 0;
  min-height: var(--app-footer-min-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 20px;
  background: var(--footer);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  z-index: 20;
  transition: left 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.footerbar-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-copy {
  max-width: min(760px, 100%);
  line-height: 1.35;
}

.footer-legal {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.73rem;
}

.footer-legal a {
  color: #bdeeff;
  font-weight: 750;
  text-decoration: none;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.footer-legal-note {
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.6);
}

.mfa-method-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mfa-method-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(20, 93, 255, .025);
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.mfa-method-option input { position: absolute; opacity: 0; pointer-events: none; }
.mfa-method-option:hover { transform: translateY(-1px); border-color: rgba(20, 93, 255, .34); }
.mfa-method-option.is-selected { border-color: rgba(20, 93, 255, .58); background: rgba(20, 93, 255, .09); box-shadow: 0 8px 18px rgba(20, 93, 255, .09); }
.mfa-method-icon { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; background: rgba(20, 93, 255, .1); color: var(--primary); }
.mfa-method-option strong, .mfa-method-option small { display: block; }
.mfa-method-choice { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.mfa-method-option .mfa-disable-btn { flex-shrink: 0; min-height: 28px; padding: 3px 8px; border-radius: 8px; font-size: .68rem; }
.mfa-method-option:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.mfa-enabled-status { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; padding: 3px 8px; border-radius: 999px; font-size: .68rem; font-weight: 750; }
.mfa-enabled-status.is-enabled { color: #176b3a; background: #e7f6ed; }
.mfa-enabled-status.is-disabled { color: #a82535; background: #fdecef; }
.mfa-enabled-status i { color: inherit !important; background: none !important; -webkit-text-fill-color: currentColor; }
.mfa-method-option strong { font-size: .8rem; }
.mfa-method-option small { margin-top: 2px; color: var(--muted); font-size: .68rem; line-height: 1.3; }
.mfa-setup-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr); align-items: start; gap: 18px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255, 255, 255, .48); }
.mfa-setup-panel[hidden] { display: none !important; }
body.theme-dark .mfa-method-option { background: rgba(255, 255, 255, .03); }
body.theme-dark .mfa-method-option.is-selected { background: rgba(20, 93, 255, .18); }
body.theme-dark .mfa-setup-panel { background: rgba(255, 255, 255, .035); }

@media (max-width: 760px) {
  .mfa-method-picker { grid-template-columns: 1fr; }
  .mfa-setup-panel { grid-template-columns: 1fr; }
}

/* Public legal pages: clear reading width, section anchors, and responsive navigation. */
.legal-page {
  max-width: 1180px;
  margin: 0 auto;
}

.legal-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(20, 93, 255, 0.14);
  border-radius: 24px;
  background: linear-gradient(128deg, rgba(255, 255, 255, 0.98), rgba(237, 246, 255, 0.9));
  box-shadow: var(--shadow);
}

.legal-hero h1 {
  margin: 5px 0 10px;
  color: var(--text);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.legal-hero p {
  max-width: 66ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.legal-date {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  min-width: 176px;
  padding: 13px 15px;
  border: 1px solid rgba(20, 93, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.legal-date i { grid-row: span 2; align-self: center; color: var(--primary); font-size: 1.1rem; }
.legal-date span { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.legal-date strong { color: var(--text); font-size: .82rem; }

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

.legal-nav {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 3px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(10, 23, 48, .04);
}

.legal-nav strong { margin: 0 0 6px; color: var(--text); font-size: .84rem; }
.legal-nav a { padding: 7px 8px; border-radius: 9px; color: var(--muted); font-size: .79rem; font-weight: 700; text-decoration: none; }
.legal-nav a:hover, .legal-nav a:focus-visible { background: rgba(20, 93, 255, .08); color: var(--primary); }

.legal-content {
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.legal-content section { scroll-margin-top: 94px; padding: 0 0 22px; margin: 0 0 22px; border-bottom: 1px solid var(--border); }
.legal-content section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.legal-content h2 { margin: 0 0 10px; color: var(--text); font-size: 1.08rem; font-weight: 850; }
.legal-content p, .legal-content li { color: var(--muted); font-size: .94rem; line-height: 1.68; }
.legal-content p { margin: 0 0 12px; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-content ul { margin: 0; padding-left: 1.2rem; }
.legal-content a { color: var(--primary); font-weight: 750; }

.legal-notice { display: flex; gap: 10px; margin-bottom: 24px; padding: 13px 15px; border: 1px solid rgba(224, 173, 49, .32); border-radius: 14px; background: rgba(255, 248, 226, .78); color: #594617; font-size: .87rem; line-height: 1.55; }
.legal-notice i { margin-top: 3px; color: #b77a08; }

body.theme-dark .legal-hero, body.theme-dark .legal-date, body.theme-dark .legal-nav, body.theme-dark .legal-content { border-color: rgba(113, 158, 229, .18); background: rgba(13, 27, 54, .92); }
body.theme-dark .legal-notice { border-color: rgba(242, 193, 78, .26); background: rgba(96, 66, 11, .24); color: #ffe8a4; }

@media (max-width: 840px) {
  .legal-hero { display: grid; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-nav strong { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .legal-page { margin: 0 -2px; }
  .legal-hero, .legal-content { padding: 20px; border-radius: 18px; }
  .legal-nav { grid-template-columns: 1fr; }
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-social .list-inline-item {
  margin-right: 0;
}

.footer-social a {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, background-color 180ms ease, opacity 180ms ease, border-color 180ms ease;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  opacity: 1;
}

.footer-social a:focus-visible,
.user-logout-btn:focus-visible {
  outline: 2px solid rgba(25, 194, 255, 0.6);
  outline-offset: 2px;
}

body.sidebar-collapsed .app-main {
  margin-left: 92px;
  width: calc(100% - 92px);
}

body.sidebar-collapsed .topbar {
  left: 0;
}

body.sidebar-collapsed .footerbar {
  left: 92px;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .sidebar-footer .status-row div:last-child,
body.sidebar-collapsed .sidebar-footer-actions,
body.sidebar-collapsed .brand-badges {
  opacity: 0;
  transform: translateX(-12px);
  max-width: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
  overflow: hidden;
}

.sidebar-tooltip .tooltip-inner {
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: rgba(9, 18, 36, 0.96);
  color: #edf4ff;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
}

body.theme-dark .sidebar-tooltip .tooltip-inner {
  background: rgba(15, 13, 9, 0.96);
  color: #edf4ff;
}

.sidebar-tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: rgba(9, 18, 36, 0.96);
}

body.theme-dark .sidebar-tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: rgba(239, 245, 255, 0.96);
}

.translate-widget {
  position: fixed;
  top: 92px;
  right: 24px;
  z-index: 35;
}

.hero-panel,
.panel-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-card,
.stat-card,
.accordion-item,
.billing-plan,
.sim-card {
  animation: smartRise 0.45s ease both;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  gap: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto 20px 18px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(242, 193, 78, 0.14), transparent 68%);
  pointer-events: none;
  filter: blur(2px);
}

.hero-power-pill,
.hero-pass-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-power-pill {
  background: rgba(25, 194, 255, 0.12);
  color: #106b8f;
  border: 1px solid rgba(25, 194, 255, 0.22);
}

.hero-pass-pill {
  border-color: rgba(242, 193, 78, 0.34);
  background: linear-gradient(135deg, rgba(242, 193, 78, 0.18), rgba(255, 243, 192, 0.16));
  color: #8f6200;
  box-shadow: 0 10px 24px rgba(167, 119, 13, 0.12);
}

.hero-power-pill i,
.hero-pass-pill i {
  font-size: 0.8rem;
  margin-top: 0;
}

.hero-title {
  font-size: clamp(1.45rem, 2.3vw, 2.1rem);
  font-weight: 900;
  line-height: 1.02;
  margin: 8px 0 6px;
  letter-spacing: -0.05em;
  animation: heroTitleLift 0.7s ease both;
}

.hero-title span {
  display: block;
  background: linear-gradient(90deg, #f2c14e 0%, #fff3c0 45%, #f2c14e 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: heroTitleShimmer 5.2s linear infinite;
}

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

.benefit-card {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(10, 23, 48, 0.04);
}

.benefit-card i {
  color: var(--primary);
  font-size: 1.15rem;
  margin-top: 2px;
}

.benefit-card strong {
  display: block;
  font-size: 0.96rem;
  margin-bottom: 2px;
}

.benefit-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 14px 0;
}

.hero-copy p,
.panel-head p {
  color: var(--muted);
  max-width: 66ch;
}

.pill,
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(25, 194, 255, 0.12);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hero-actions .hero-exam-year {
  display: inline-grid;
  min-width: 34px;
  min-height: 23px;
  margin-left: 2px;
  padding: 2px 6px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 7px;
  background: rgba(10, 31, 101, .18);
  color: #fff;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .03em;
  line-height: 1;
}
.hero-actions .hero-flashcard-next {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 3px;
  font-size: .76rem;
  font-weight: 800;
  opacity: .9;
}
.hero-actions .hero-flashcard-next i { font-size: .68rem; }

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

.stat-card {
  border-radius: 22px;
  padding: 16px;
  color: white;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card.accent-blue { background: linear-gradient(135deg, #145dff, #19c2ff); }
.stat-card.accent-green { background: linear-gradient(135deg, #0b8f8a, #0bb8a8); }
.stat-card.accent-orange { background: linear-gradient(135deg, #ff7a18, #ffbe45); }
.stat-card.accent-purple { background: linear-gradient(135deg, #5b47f5, #8b5cf6); }

.stat-icon {
  font-size: 1.15rem;
  opacity: 0.95;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
}

body.section-dashboard .hero-stats {
  gap: 6px;
}

body.section-dashboard .dashboard-stat-card,
body.section-admin .dashboard-stat-card,
body.section-billing .dashboard-stat-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 98px;
  padding: 11px 12px 10px;
  border-radius: 24px;
  box-shadow: 0 18px 38px rgba(7, 15, 30, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

body.section-dashboard .dashboard-stat-card {
  min-height: 104px;
  padding: 11px 13px 10px;
}

body.section-dashboard .dashboard-stat-card::before,
body.section-dashboard .dashboard-stat-card::after,
body.section-admin .dashboard-stat-card::before,
body.section-admin .dashboard-stat-card::after,
body.section-billing .dashboard-stat-card::before,
body.section-billing .dashboard-stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body.section-dashboard .dashboard-stat-card::before,
body.section-admin .dashboard-stat-card::before,
body.section-billing .dashboard-stat-card::before {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.26), transparent 34%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.14), transparent 28%);
  opacity: 0.95;
}

body.section-dashboard .dashboard-stat-card::after,
body.section-admin .dashboard-stat-card::after,
body.section-billing .dashboard-stat-card::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 42%, rgba(255, 255, 255, 0.08));
}

body.section-dashboard .dashboard-stat-card:hover,
body.section-admin .dashboard-stat-card:hover,
body.section-billing .dashboard-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 44px rgba(7, 15, 30, 0.24);
}

body.section-dashboard .dashboard-stat-head,
body.section-dashboard .dashboard-stat-foot,
body.section-admin .dashboard-stat-head,
body.section-admin .dashboard-stat-foot,
body.section-billing .dashboard-stat-head,
body.section-billing .dashboard-stat-foot {
  position: relative;
  z-index: 1;
}

body.section-dashboard .dashboard-stat-head,
body.section-admin .dashboard-stat-head,
body.section-billing .dashboard-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.section-dashboard .dashboard-stat-icon,
body.section-admin .dashboard-stat-icon,
body.section-billing .dashboard-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 22px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
}

body.section-dashboard .dashboard-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

body.section-dashboard .dashboard-stat-icon i,
body.section-admin .dashboard-stat-icon i,
body.section-billing .dashboard-stat-icon i {
  font-size: 1.05rem;
}

body.section-dashboard .dashboard-stat-icon i {
  font-size: 0.98rem;
}

body.section-dashboard .dashboard-stat-chip,
body.section-admin .dashboard-stat-chip,
body.section-billing .dashboard-stat-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.section-dashboard .dashboard-stat-chip {
  padding: 5px 9px;
  font-size: 0.66rem;
}

body.section-dashboard .dashboard-stat-copy,
body.section-admin .dashboard-stat-copy,
body.section-billing .dashboard-stat-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

body.section-dashboard .dashboard-stat-copy .stat-label,
body.section-admin .dashboard-stat-copy .stat-label,
body.section-billing .dashboard-stat-copy .stat-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.95;
}

body.section-dashboard .dashboard-stat-copy .stat-value,
body.section-admin .dashboard-stat-copy .stat-value,
body.section-billing .dashboard-stat-copy .stat-value {
  font-size: clamp(1.34rem, 1.75vw, 1.7rem);
  line-height: 1;
}

body.section-dashboard .dashboard-stat-foot,
body.section-admin .dashboard-stat-foot,
body.section-billing .dashboard-stat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  font-size: 0.73rem;
  font-weight: 700;
  opacity: 0.92;
}

body.section-dashboard .dashboard-stat-foot i,
body.section-admin .dashboard-stat-foot i,
body.section-billing .dashboard-stat-foot i {
  font-size: 0.92rem;
}

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

.analytics-group-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
}

.analytics-group-panel::before,
.flashcard-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(20, 93, 255, 0.06), transparent 34%),
    linear-gradient(315deg, rgba(25, 194, 255, 0.05), transparent 36%);
  opacity: 0.85;
}

.analytics-group-panel > .panel-head {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  align-items: flex-start;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.analytics-group-panel > .panel-head p {
  margin-bottom: 0;
}

.analytics-trend-panel {
  grid-column: 1 / -1;
}

.analytics-group-grid,
.analytics-split {
  display: grid;
  grid-template-columns: minmax(clamp(280px, 32vw, 440px), 0.88fr) minmax(0, 1.12fr);
  gap: 14px;
  align-items: start;
}

.analytics-subpanel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(20, 93, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(247, 250, 255, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.analytics-subpanel .panel-head {
  margin-bottom: 0;
}

.analytics-subpanel .panel-head h2 {
  font-size: 1.08rem;
}

.analytics-subpanel .panel-head p {
  margin-bottom: 0;
}

.analytics-group-panel > .panel-head h2,
.flashcard-panel > .panel-head h2 {
  font-size: clamp(1.16rem, 1.05vw + 0.98rem, 1.44rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.glossary-panel {
  position: sticky;
  top: 114px;
  align-self: start;
}

@media (max-width: 1400px) {
  .analytics-group-grid {
    grid-template-columns: 1fr;
  }

  .glossary-panel {
    position: static;
    top: auto;
  }
}

.panel-card {
  padding: 18px;
}

.panel-card canvas {
  width: 100% !important;
}

.chart-box {
  position: relative;
  width: 100%;
}

.chart-box-donut {
  position: relative;
  overflow: hidden;
  height: clamp(320px, 36vw, 480px);
  min-height: 320px;
  padding: 14px;
  border-radius: 28px;
  border: 1px solid rgba(20, 93, 255, 0.1);
  background:
    radial-gradient(circle at 18% 16%, rgba(20, 93, 255, 0.12), transparent 42%),
    radial-gradient(circle at 82% 82%, rgba(25, 194, 255, 0.1), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 255, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 18px 38px rgba(10, 23, 48, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.chart-box-donut::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  border: 1px solid rgba(20, 93, 255, 0.08);
  pointer-events: none;
}

.chart-box-donut:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 24px 44px rgba(10, 23, 48, 0.1);
}

.chart-box-trend {
  height: clamp(160px, 18vw, 220px);
  min-height: 160px;
}

.chart-box-donut canvas {
  position: relative;
  z-index: 1;
  height: 100% !important;
  max-height: 100% !important;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.panel-head h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.trend-panel .panel-head {
  margin-bottom: 10px;
}

.trend-panel .panel-head p {
  margin-bottom: 0;
}

.trend-panel .chart-box-trend {
  height: clamp(150px, 16vw, 208px);
  min-height: 150px;
}

.flashcard-panel {
  overflow: hidden;
}

.flashcard-head {
  align-items: flex-start;
}

.topic-filter-tools {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.topic-filter-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  max-width: 240px;
}

.topic-filter-control span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.topic-filter-control .form-select {
  width: 100%;
  min-height: 38px;
  border-radius: 14px;
  border-color: var(--border);
}

.flashcard-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Structured control box for the Flash Cards dashboard. */
body.section-dashboard .flashcard-head {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  align-items: start;
  gap: 18px;
}

body.section-dashboard .flashcard-toolbar {
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(20, 93, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(20, 93, 255, 0.035), rgba(255, 255, 255, 0.68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

body.section-dashboard .flashcard-toolbar-row {
  justify-content: flex-start;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(20, 93, 255, 0.1);
}

body.section-dashboard .flashcard-toolbar-row::before {
  flex: 0 0 100%;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body.section-dashboard .flashcard-deck-row {
  padding-top: 0;
  border-top: 0;
}

body.section-dashboard .flashcard-deck-row::before {
  content: "Deck settings";
}

body.section-dashboard .flashcard-session-row::before {
  content: "Timing & voice";
}

body.section-dashboard .flashcard-toolbar-row-playback::before {
  content: "Playback controls";
}

body.section-dashboard .flashcard-control {
  min-width: 128px;
  max-width: 188px;
  flex: 1 1 128px;
  gap: 4px;
}

body.section-dashboard .flashcard-control span {
  font-size: 0.65rem;
}

body.section-dashboard .flashcard-control .form-select,
body.section-dashboard .flashcard-control .form-control {
  min-height: 34px;
  border-radius: 10px;
}

body.section-dashboard .flashcard-control small {
  display: none;
}

body.section-dashboard .flashcard-reset-btn {
  width: 36px;
  height: 36px;
  align-self: flex-end;
  border-radius: 10px;
}

body.section-dashboard .flashcard-auto-pill {
  align-self: flex-end;
  padding: 6px 10px;
  font-size: 0.7rem;
}

body.section-dashboard .flashcard-toolbar-row-playback .btn {
  min-height: 34px;
  padding: 0.3rem 0.5rem;
  font-size: 0.74rem;
}

body.section-dashboard .flashcard-audio-toggle {
  font-size: 0.68rem;
}

@media (max-width: 1100px) {
  body.section-dashboard .flashcard-head {
    grid-template-columns: 1fr;
  }

  body.section-dashboard .flashcard-toolbar {
    width: 100%;
  }
}

.flashcard-toolbar-row {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.flashcard-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 168px;
  flex: 1 1 168px;
  max-width: 240px;
}

.flashcard-control span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.flashcard-control .form-select,
.flashcard-control .form-control {
  width: 100%;
  min-height: 38px;
  border-radius: 14px;
  border-color: var(--border);
}

.flashcard-reset-btn {
  flex: 0 0 auto;
}

.flashcard-reset-btn.is-active {
  color: var(--primary);
  border-color: rgba(20, 93, 255, 0.35);
  background: rgba(20, 93, 255, 0.1);
}

.flashcard-reset-btn.is-active i {
  transform: rotate(-18deg);
}

.icon-btn.is-active {
  color: var(--primary);
  border-color: rgba(20, 93, 255, 0.35);
  background: rgba(20, 93, 255, 0.1);
}

.icon-btn.is-active i {
  transform: rotate(-18deg);
}

.flashcard-auto-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 93, 255, 0.08);
  border: 1px solid rgba(20, 93, 255, 0.14);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.flashcard-auto-pill i {
  color: var(--primary);
}

.flashcard-online-pill-wrap {
  margin-top: 10px;
}

.flashcard-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(11, 184, 168, 0.1);
  border: 1px solid rgba(11, 184, 168, 0.18);
  color: #0b726a;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.flashcard-online-pill i {
  color: #0b8f8a;
}

.flashcard-toolbar-row-playback {
  align-items: center;
  justify-content: flex-start;
}

.flashcard-toolbar-row-playback .btn,
.flashcard-toolbar-row-playback .flashcard-audio-toggle {
  flex: 0 0 auto;
}

.flashcard-audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.flashcard-audio-toggle .form-check-input {
  margin: 0;
}

.flashcard-flip-toggle {
  margin-left: 4px;
}

.flashcard-phase {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 93, 255, 0.08);
  border: 1px solid rgba(20, 93, 255, 0.14);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.flashcard-countdown.is-urgent,
.flashcard-shell[data-urgent="1"] .flashcard-countdown {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.22);
  background: radial-gradient(circle at 30% 30%, rgba(239, 68, 68, 0.2), rgba(255, 255, 255, 0.95) 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 18px 34px rgba(220, 38, 38, 0.16);
}

.flashcard-phase.is-urgent,
.flashcard-shell[data-urgent="1"] .flashcard-phase {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.18);
}

.flashcard-shell {
  display: grid;
  gap: 14px;
}

#flashcardShell .flashcard-grid.flashcard-unified {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface, #f8faff);
}
#flashcardShell .flashcard-unified .flashcard-timer-card {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  justify-content: flex-start;
  gap: 10px 16px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#flashcardShell .flashcard-unified .flashcard-countdown {
  width: 54px;
  height: 54px;
  border-width: 4px;
  font-size: 1.3rem;
  flex-shrink: 0;
}
#flashcardShell .flashcard-unified .flashcard-timer-card > * { flex-shrink: 0; }
#flashcardShell .flashcard-unified .flashcard-progress { flex: 1 0 90px; width: auto; max-width: 200px; height: 6px; }
#flashcardShell .flashcard-unified .flashcard-meta-line { margin: 0; width: auto; }
#flashcardShell .flashcard-unified .flashcard-meta-footer { width: auto; flex: 0 0 auto; margin: 0 0 0 auto; padding: 0; border: 0; gap: 8px; }
#flashcardShell .flashcard-unified-navigation { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
#flashcardShell .flashcard-unified-navigation .flashcard-inline-playback { flex: 1 1 300px; margin: 0; }
#flashcardShell .flashcard-unified-navigation > .flashcard-next-btn { color: var(--primary); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; }

.flashcard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 14px;
  align-items: stretch;
}

.flashcard-question-card,
.flashcard-timer-card {
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.88));
  border: 1px solid var(--border);
  box-shadow: 0 16px 38px rgba(10, 23, 48, 0.08);
}

.flashcard-question-card {
  min-height: 320px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  perspective: 1600px;
  overflow: visible;
  display: flex;
  transition: transform 220ms ease, filter 220ms ease;
  will-change: transform;
}

.flashcard-card-inner {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 320px;
  transform-origin: center center;
  transform-style: preserve-3d;
  transition: transform 820ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.flashcard-question-card.is-flipped .flashcard-card-inner {
  transform: rotateY(180deg);
}

.flashcard-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.92));
  border: 1px solid var(--border);
  box-shadow: 0 16px 38px rgba(10, 23, 48, 0.08);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: box-shadow 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.flashcard-card-face-front {
  transform: rotateY(0deg);
}

.flashcard-card-face-back {
  transform: rotateY(180deg);
}

.flashcard-card-face-back {
  justify-content: space-between;
}

.flashcard-question-card.no-flip .flashcard-card-inner {
  transform: none !important;
}

.flashcard-question-card.no-flip .flashcard-card-face-front,
.flashcard-question-card.no-flip .flashcard-card-face-back {
  transform: none;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
  transition: opacity 220ms ease;
}

.flashcard-question-card.no-flip .flashcard-card-face-back {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.flashcard-question-card.no-flip[data-face="back"] .flashcard-card-face-front {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.flashcard-question-card.no-flip[data-face="back"] .flashcard-card-face-back {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
  .flashcard-question-card:hover,
  .flashcard-question-card:focus-within {
    transform: translateY(-6px);
  }

  .flashcard-question-card:hover .flashcard-card-face,
  .flashcard-question-card:focus-within .flashcard-card-face {
    border-color: rgba(20, 93, 255, 0.22);
    box-shadow: 0 22px 46px rgba(10, 23, 48, 0.12);
  }

  .flashcard-question-card:hover .flashcard-language-panel,
  .flashcard-question-card:focus-within .flashcard-language-panel {
    box-shadow: 0 12px 26px rgba(10, 23, 48, 0.06);
  }
}

.voice-popup-exam-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #b9d9f0;
  border-radius: 12px;
  background: #edf7ff;
  color: #245477;
  font-size: .85rem;
  font-weight: 700;
  max-width: 100%;
}
.voice-popup-exam-type i { color: #287fba; }

#resetInterviewBtn {
  background: #fff3cd;
  color: #765200;
  border: 1px solid #e2b338;
  border-radius: 14px;
  padding: 10px 18px;
  font-weight: 700;
  white-space: normal;
  box-shadow: 0 3px 10px #ad7c0014;
  transition: background-color .18s ease, box-shadow .18s ease;
}
#resetInterviewBtn i { color: #765200; }
#resetInterviewBtn:hover { background: #ffe69c; color: #604300; box-shadow: 0 4px 14px #ad7c0026; }
#resetInterviewBtn:focus-visible { outline: 3px solid #846000; outline-offset: 3px; }
#resetInterviewBtn:active { background: #ffda6a; }
@media (prefers-reduced-motion: reduce) { #resetInterviewBtn { transition: none; } }

.interview-report-drawer { --bs-offcanvas-width: 540px; max-width: 100vw; background: #f8faff; color: #1c2941; border-left: 3px solid #6078ee !important; box-shadow: -12px 0 48px #172b4d26; }
.interview-report-drawer .offcanvas-header { background: linear-gradient(120deg, #edf1ff, #e5f6f7); border-bottom: 1px solid #dce4f2; padding: 22px; }
.report-detail-eyebrow { display: block; color: #536bc4; font-size: .75rem; font-weight: 700; margin-bottom: 8px; }
.interview-report-drawer .offcanvas-body { padding: 22px; overflow-wrap: anywhere; }
.report-detail-block { background: #fff; border: 1px solid #dde5f2; border-radius: 14px; padding: 16px; margin: 16px 0; }
.report-detail-block.answer { border-left: 4px solid #26a780; }
.report-detail-block.feedback { border-left: 4px solid #8770db; }
.report-detail-block h4 { font-size: .85rem; color: #516382; font-weight: 700; }
.report-detail-block p { margin: 0; white-space: pre-wrap; line-height: 1.6; }
.report-detail-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.report-detail-metrics > div { padding: 14px; background: #eef2ff; border-radius: 12px; }
.report-detail-metrics > div:nth-child(even) { background: #e9f6f4; }
.report-detail-metrics span { display: block; font-size: .8rem; color: #53617a; }
.report-detail-metrics strong { display: block; font-size: 1.2rem; margin-top: 4px; }
.report-detail-navigation { display: flex; justify-content: space-between; padding: 16px 22px; border-top: 1px solid #dce4f2; background: #fff; gap: 12px; }
.report-detail-row { cursor: pointer; }
.report-detail-row:hover > td { background: #edf4ff !important; }
.report-detail-row:focus-visible { outline: 3px solid #5677e8; outline-offset: -3px; }

@media (prefers-reduced-motion: reduce) {
  .chart-box-donut,
  .flashcard-question-card,
  .flashcard-card-face {
    transition: none;
  }

  .chart-box-donut:hover,
  .flashcard-question-card:hover,
  .flashcard-question-card:focus-within {
    transform: none;
  }
}

.flashcard-bilingual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 12px;
  align-items: stretch;
}

.flashcard-question-card[data-translation="0"] .flashcard-bilingual-grid {
  grid-template-columns: 1fr;
}

.flashcard-language-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(20, 93, 255, 0.12);
  background: rgba(20, 93, 255, 0.05);
}

.flashcard-language-panel-english {
  background: linear-gradient(180deg, rgba(20, 93, 255, 0.06), rgba(20, 93, 255, 0.03));
  border-color: rgba(20, 93, 255, 0.12);
}

.flashcard-language-panel-translation {
  background: linear-gradient(180deg, rgba(11, 143, 138, 0.1), rgba(11, 184, 168, 0.06));
  border-color: rgba(11, 143, 138, 0.16);
}

.flashcard-language-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.flashcard-language-label-english {
  color: var(--primary);
}

.flashcard-language-label-translation {
  color: #0b8f8a;
}

.flashcard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.flashcard-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(20, 93, 255, 0.08);
  color: var(--primary);
  border: 1px solid rgba(20, 93, 255, 0.15);
}

.flashcard-tag-answer {
  background: rgba(11, 143, 138, 0.1);
  color: #0b8f8a;
  border-color: rgba(11, 143, 138, 0.16);
}

.flashcard-question {
  font-size: clamp(.88rem, 1vw, 1.06rem);
  font-weight: 700;
  line-height: 1.32;
  margin: 0;
}

.flashcard-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  white-space: pre-line;
}

.flashcard-translation-text {
  color: #0b8f8a;
  font-size: clamp(.82rem, .94vw, .94rem);
  font-weight: 700;
  line-height: 1.4;
  white-space: pre-line;
}

.flashcard-question-card .flashcard-answer-wrap {
  margin-top: 0;
}

.flashcard-timer-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 9px;
}

.flashcard-timer-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.flashcard-countdown {
  width: clamp(84px, 13vw, 108px);
  height: clamp(84px, 13vw, 108px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 750;
  color: var(--primary);
  background: radial-gradient(circle at 30% 30%, rgba(25, 194, 255, 0.2), rgba(255, 255, 255, 0.95) 60%);
  border: 8px solid rgba(20, 93, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 12px 24px rgba(20, 93, 255, 0.12);
}

.flashcard-timer-caption {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  font-weight: 550;
}

.flashcard-progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(20, 93, 255, 0.1);
  overflow: hidden;
}

.flashcard-progress-bar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #145dff, #19c2ff 60%, #0bb8a8);
  transition: width 240ms linear;
}

.flashcard-meta-line {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.flashcard-meta-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.flashcard-meta-footer strong {
  color: var(--text);
  font-weight: 900;
}

.flashcard-answer-wrap {
  border-radius: 22px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(11, 143, 138, 0.12), rgba(11, 184, 168, 0.08));
  border: 1px solid rgba(11, 143, 138, 0.16);
  box-shadow: 0 14px 30px rgba(10, 23, 48, 0.06);
}

.flashcard-card-face-back .flashcard-answer-wrap {
  margin-top: 6px;
}

.flashcard-answer-wrap.is-hidden {
  display: none;
}

.flashcard-front-hint,
.flashcard-back-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(20, 93, 255, 0.08);
  border: 1px solid rgba(20, 93, 255, 0.12);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  align-self: flex-start;
}

.flashcard-front-hint > span { display: inline-flex; align-items: center; gap: 8px; }
.flashcard-next-btn { margin: -5px -8px -5px 2px; padding: 5px 8px; border: 0; border-left: 1px solid rgba(20, 93, 255, .18); background: transparent; color: #2866de; font: inherit; font-size: .68rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.flashcard-next-btn:hover:not(:disabled) { color: #174eb6; background: rgba(20, 93, 255, .08); }
.flashcard-next-btn:disabled { cursor: not-allowed; opacity: .45; }

.flashcard-inline-playback { width: 100%; margin-top: 12px; padding: 10px; border: 1px solid rgba(20, 93, 255, .13); border-radius: 12px; background: rgba(20, 93, 255, .035); }
.flashcard-inline-playback-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flashcard-inline-playback-actions .btn { min-height: 30px; padding: .26rem .46rem; font-size: .7rem; }
.flashcard-inline-playback-actions .flashcard-audio-toggle { margin-left: 2px; font-size: .66rem; }
body.theme-dark .flashcard-inline-playback { border-color: rgba(148, 163, 184, .18); background: rgba(15, 23, 42, .42); }

.see-more-button {
  position: fixed;
  z-index: 1040;
  right: 22px;
  bottom: 86px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid rgba(20, 93, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 24px rgba(10, 23, 48, .16);
  color: #2458ca;
  font-size: .72rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}

.see-more-button.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.see-more-button:hover { background: #fff; color: #174eb6; }
.see-more-button i { font-size: .64rem; }
body.theme-dark .see-more-button { border-color: rgba(148, 163, 184, .24); background: rgba(15, 23, 42, .94); color: #d9e8ff; }
@media (max-width: 992px) { .see-more-button { right: 14px; bottom: 86px; padding: 8px 10px; } }

.page-scroll-controls {
  position: fixed;
  z-index: 1040;
  top: 50%;
  right: 18px;
  display: none;
  flex-direction: column;
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
}

.page-scroll-controls.is-visible { display: flex; }

.page-scroll-controls::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 24px;
  bottom: 24px;
  left: 50%;
  width: 2px;
  background: rgba(63, 92, 244, .26);
  transform: translateX(-50%);
}

.page-scroll-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(63, 92, 244, .25);
  border-radius: 50%;
  background: rgba(11, 22, 47, .9);
  color: rgba(242, 193, 78, .46);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
}

.page-scroll-button:hover { border-color: rgba(242, 193, 78, .58); background: rgba(15, 28, 58, .98); }
.page-scroll-button:not(:disabled) {
  border-color: rgba(242, 193, 78, .38);
  background: rgba(11, 22, 47, .94);
  color: #f2c14e;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .24);
}
.page-scroll-button:disabled { opacity: 1; cursor: default; }
.page-scroll-button i { font-size: .8rem; }
body.theme-dark .page-scroll-button { border-color: rgba(242, 193, 78, .3); background: rgba(8, 17, 36, .94); }
body.theme-dark .page-scroll-controls::before { background: rgba(242, 193, 78, .32); }
@media (max-width: 992px) { .page-scroll-controls { right: 12px; } .page-scroll-button { width: 36px; height: 36px; } }

@media (max-width: 1024px) {
  .app-main, .content-area, .panel-card, .row > *, .chart-box { min-width: 0; }
  .content-area { padding: 16px; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topbar-start, .topbar-actions { min-width: 0; flex-wrap: wrap; }
  .panel-head { flex-wrap: wrap; gap: 12px; }
  .table-responsive, .dataTables_wrapper, .dataTables_scrollBody { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .chart-box { max-width: 100%; position: relative; }
  .chart-box canvas { max-width: 100%; }
  .voice-popup:not(.hidden) { max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .voice-popup .voice-popup-card { min-width: 0; max-height: calc(100dvh - 16px); overflow-y: auto; }
  .voice-popup .voice-popup-actions { flex-wrap: wrap; justify-content: flex-start; }
  .exam-credit-status { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .content-area { padding: 10px; }
  .content-area .panel-card { padding: 14px; }
  .topbar-actions { width: 100%; }
  .global-search-wrap { min-width: 0; max-width: 100%; }
  .report-compact-summary, .exam-records-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voice-popup .voice-popup-actions .btn { min-height: 44px; }
  .voice-popup .voice-popup-spoken { overflow-wrap: anywhere; font-size: 1rem; }
  .content-area input, .content-area select, .content-area textarea { max-width: 100%; font-size: 16px; }
}

.telegram-floating-launcher {
  position: fixed;
  z-index: 1050;
  right: 22px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 7px 11px 7px 7px;
  border: 1px solid rgba(50, 180, 234, .62);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(10, 35, 70, .96), rgba(21, 111, 167, .94));
  color: #fff;
  box-shadow: 0 12px 28px rgba(8, 28, 60, .32);
  text-decoration: none;
  touch-action: none;
  user-select: none;
  cursor: grab;
  transition: transform .18s ease, box-shadow .18s ease;
}

.telegram-floating-launcher-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: inherit;
  text-decoration: none;
}

.telegram-floating-launcher:hover,
.telegram-floating-launcher:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(8, 28, 60, .4);
}

.telegram-floating-launcher.is-dragging { cursor: grabbing; transition: none; opacity: .94; }
.telegram-floating-launcher img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #fff; }
.telegram-floating-launcher-copy { display: grid; line-height: 1.08; }
.telegram-floating-launcher-copy strong { font-size: .78rem; letter-spacing: .01em; }
.telegram-floating-launcher-copy small { font-size: .62rem; opacity: .85; margin-top: 3px; }
.telegram-floating-launcher > .fa-telegram { color: #66d9ff; font-size: 1.06rem; }
.telegram-floating-launcher-link > .fa-telegram { color: #66d9ff; font-size: 1.06rem; }
.telegram-launcher-collapse { width: 16px; min-width: 16px; height: 20px; padding: 0; border: 0; border-radius: 5px; color: rgba(255, 255, 255, .78); background: transparent; font-size: 1rem; font-weight: 900; line-height: 1; cursor: pointer; }
.telegram-launcher-collapse:hover, .telegram-launcher-collapse:focus-visible { color: #fff; background: rgba(255, 255, 255, .16); outline: none; }
.telegram-floating-launcher.is-collapsed { right: 18px; bottom: 0; gap: 0; min-height: 24px; padding: 2px 10px; border-radius: 9px 9px 0 0; cursor: pointer; }
.telegram-floating-launcher.is-collapsed .telegram-floating-launcher-link { display: none; }
.telegram-floating-launcher.is-collapsed .telegram-launcher-collapse { width: 26px; min-width: 26px; height: 20px; color: #d8f4ff; font-size: .9rem; }

/* The live Practice and Exam workspace needs an unobstructed microphone,
   question, and emergency-exit area.  Keep Telegram available elsewhere. */
body.section-interview .telegram-floating-launcher { display: none !important; }

@media (max-width: 680px) {
  .telegram-floating-launcher { right: 12px; bottom: 14px; min-height: 48px; padding-right: 9px; }
  .telegram-floating-launcher img { width: 34px; height: 34px; }
  .telegram-floating-launcher-copy small { display: none; }
}

/* Flash cards use the same navy-and-gold visual system as the authentication panels. */
body.section-dashboard .flashcard-card-face {
  border-color: rgba(242, 193, 78, .2);
  background: linear-gradient(145deg, #111a31 0%, #20283d 100%);
  box-shadow: 0 16px 36px rgba(6, 12, 28, .2);
  overflow: hidden;
}

/* Keep the answer side in the same navy system as the question side. */
body.section-dashboard .flashcard-card-face-back {
  border-color: rgba(242, 193, 78, .24);
  background: linear-gradient(145deg, #18233d 0%, #0d162a 100%);
}

body.section-dashboard .flashcard-card-face::after {
  content: "";
  position: absolute;
  inset: -45% auto -45% -62%;
  width: 34%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 246, 192, .04) 25%, rgba(242, 193, 78, .43) 50%, rgba(255, 122, 24, .08) 72%, transparent 100%);
  transform: skewX(-20deg);
  transition: left .55s ease;
}

#flashcardShell.is-running .flashcard-card-face {
  animation: flashcard-frame-pulse 3.8s ease-in-out infinite;
}

@keyframes flashcard-frame-pulse {
  0%, 100% {
    border-color: rgba(242, 193, 78, .28);
    box-shadow: 0 16px 36px rgba(6, 12, 28, .2), 0 0 0 1px rgba(242, 193, 78, .04);
  }
  50% {
    border-color: rgba(105, 201, 255, .72);
    box-shadow: 0 18px 42px rgba(6, 12, 28, .24), 0 0 0 2px rgba(105, 201, 255, .12);
  }
}

@media (hover: hover) and (pointer: fine) {
  body.section-dashboard .flashcard-question-card:hover,
  body.section-dashboard .flashcard-question-card:focus-within {
    transform: translateY(-6px) scale(1.005);
  }

  body.section-dashboard .flashcard-question-card:hover .flashcard-card-face,
  body.section-dashboard .flashcard-question-card:focus-within .flashcard-card-face {
    border-color: rgba(242, 193, 78, .45);
    background: linear-gradient(145deg, #1f2a43 0%, #091222 100%);
    box-shadow: 0 0 0 1px rgba(242, 193, 78, .18), 0 18px 46px rgba(0, 0, 0, .34), 0 0 28px rgba(242, 193, 78, .14);
  }

  body.section-dashboard .flashcard-question-card:hover .flashcard-card-face-back,
  body.section-dashboard .flashcard-question-card:focus-within .flashcard-card-face-back {
    background: linear-gradient(145deg, #223253 0%, #111b31 100%);
  }

  body.section-dashboard .flashcard-question-card:hover .flashcard-card-face::after,
  body.section-dashboard .flashcard-question-card:focus-within .flashcard-card-face::after { left: 132%; }

  body.section-dashboard .flashcard-question-card:hover .flashcard-tag:first-child i,
  body.section-dashboard .flashcard-question-card:focus-within .flashcard-tag:first-child i {
    color: #fff4bf;
    transform: rotate(-8deg) scale(1.12);
  }
}

body.section-dashboard .flashcard-tag:first-child i { transition: transform 180ms ease, color 180ms ease; }

body.section-dashboard .flashcard-language-panel {
  border-color: rgba(242, 193, 78, .18);
  background: rgba(255, 255, 255, .045);
}

body.section-dashboard .flashcard-language-panel-english,
body.section-dashboard .flashcard-language-panel-translation {
  background: rgba(255, 255, 255, .045);
}

body.section-dashboard .flashcard-language-label-english,
body.section-dashboard .flashcard-language-label-translation,
body.section-dashboard .flashcard-answer-label,
body.section-dashboard .flashcard-answer-detail-label {
  color: #f2c14e;
}

body.section-dashboard .flashcard-question,
body.section-dashboard .flashcard-answer-text,
body.section-dashboard .flashcard-translation-text,
body.section-dashboard .flashcard-answer-detail p {
  color: #f2f5ff;
}

body.section-dashboard .flashcard-tag {
  border-color: rgba(242, 193, 78, .28);
  background: rgba(242, 193, 78, .1);
  color: #ffe48a;
}

body.section-dashboard .flashcard-tag-answer {
  background: rgba(242, 193, 78, .16);
  color: #ffe48a;
}

body.section-dashboard .flashcard-answer-wrap,
body.section-dashboard .flashcard-answer-details {
  border-color: rgba(242, 193, 78, .18);
  background: rgba(10, 20, 42, .74);
}

body.section-dashboard .flashcard-answer-details { border-top-color: rgba(242, 193, 78, .18); }
body.section-dashboard .flashcard-answer-detail {
  border-color: rgba(242, 193, 78, .16);
  background: rgba(31, 45, 72, .92);
}
body.section-dashboard .flashcard-front-hint { border-color: rgba(242, 193, 78, .22); background: rgba(242, 193, 78, .1); color: #ffe48a; }
body.section-dashboard .flashcard-back-hint { border-color: rgba(242, 193, 78, .2); background: rgba(242, 193, 78, .08); color: #ffe48a; }
body.section-dashboard .flashcard-next-btn { border-left-color: rgba(242, 193, 78, .22); color: #ffe48a; }
body.section-dashboard .flashcard-next-btn:hover:not(:disabled) { color: #fff4bf; background: rgba(242, 193, 78, .12); }
body.section-dashboard .flashcard-inline-playback { border-color: rgba(242, 193, 78, .16); background: rgba(255, 255, 255, .035); }

.flashcard-back-hint {
  background: rgba(11, 143, 138, 0.09);
  border-color: rgba(11, 143, 138, 0.14);
  align-self: flex-end;
}

.flashcard-answer-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0b8f8a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.flashcard-answer-text {
  margin-top: 10px;
  color: #085e59;
  font-size: clamp(1.02rem, 1.75vw, 1.4rem);
  font-weight: 800;
  line-height: 1.55;
  white-space: pre-line;
}

.flashcard-answer-details {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(11, 143, 138, 0.18);
}

.flashcard-answer-detail {
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(11, 143, 138, 0.12);
}

.flashcard-answer-detail-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #0b8f8a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flashcard-answer-detail p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

body.theme-dark .flashcard-answer-detail {
  background: rgba(15, 23, 42, 0.48);
}

/* FAQ and help center */
.faq-hero { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:24px; align-items:center; }
.faq-hero h1 { margin:0; font-size:clamp(1.55rem,2.5vw,2.2rem); font-weight:850; }
.faq-hero p { margin:9px 0 0; color:var(--muted); }
.faq-verified { display:inline-flex; align-items:center; gap:7px; padding:6px 10px; border-radius:999px; color:#3561d8; background:rgba(20,93,255,.08); font-size:.76rem; font-weight:800; }
.faq-alert { display:flex; gap:10px; margin-top:16px; padding:12px 14px; border:1px solid rgba(224,173,49,.34); border-radius:14px; background:rgba(255,248,226,.75); color:#594617; font-size:.88rem; line-height:1.5; }
.faq-alert i { margin-top:3px; color:#c28b08; }
.faq-jump { display:grid; grid-template-columns:repeat(2,auto); gap:8px; }
.faq-jump a { display:inline-flex; align-items:center; gap:7px; padding:9px 12px; border:1px solid var(--border); border-radius:11px; color:var(--text); background:var(--panel-strong); font-size:.8rem; font-weight:750; text-decoration:none; transition:.18s ease; }
.faq-jump a:hover { border-color:#dfad35; color:#9a6a00; transform:translateY(-1px); }
.faq-layout { display:grid; grid-template-columns:245px minmax(0,1fr); gap:18px; align-items:start; margin-top:18px; }
.faq-summary { position:sticky; top:88px; padding:18px; }
.faq-summary h2 { margin:0 0 12px; font-size:1rem; font-weight:850; }
.faq-summary div { display:grid; gap:2px; padding:11px 0; border-top:1px solid var(--border); }
.faq-summary strong { font-size:.82rem; }
.faq-summary span { color:var(--muted); font-size:.76rem; line-height:1.4; }
.faq-content { display:grid; gap:18px; min-width:0; }
.faq-section { scroll-margin-top:88px; padding:22px; }
.faq-section-heading { display:flex; align-items:flex-start; gap:13px; margin-bottom:16px; }
.faq-section-heading>i { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; border-radius:12px; color:#dba621; background:rgba(224,173,49,.12); }
.faq-section-heading h2 { margin:0; font-size:1.18rem; font-weight:850; }
.faq-section-heading p { margin:4px 0 0; color:var(--muted); font-size:.86rem; }
.faq-accordion .accordion-item { overflow:hidden; border-color:var(--border); background:transparent; }
.faq-accordion .accordion-button { padding:13px 15px; color:var(--text); background:var(--panel-strong); font-size:.88rem; font-weight:780; box-shadow:none; }
.faq-accordion .accordion-button:not(.collapsed) { color:#315bea; background:rgba(20,93,255,.07); }
.faq-accordion .accordion-body { color:var(--muted); background:var(--panel); font-size:.86rem; line-height:1.65; }
.faq-card-grid,.faq-support-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.faq-card-grid article,.faq-support-grid article { padding:15px; border:1px solid var(--border); border-radius:15px; background:linear-gradient(145deg,rgba(20,93,255,.035),transparent); }
.faq-card-grid h3,.faq-support-grid h3 { margin:0 0 7px; font-size:.9rem; font-weight:820; }
.faq-card-grid h3 i { margin-right:6px; color:#dba621; }
.faq-card-grid p,.faq-support-grid p { margin:0; color:var(--muted); font-size:.82rem; line-height:1.6; }
.faq-definition-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.faq-definition-grid>div { display:grid; gap:4px; padding:13px 14px; border-left:3px solid #5c7df0; border-radius:10px; background:rgba(20,93,255,.045); }
.faq-definition-grid strong { font-size:.84rem; }
.faq-definition-grid span { color:var(--muted); font-size:.79rem; line-height:1.5; }
.faq-legal ul { margin:0; padding-left:1.15rem; color:var(--muted); font-size:.84rem; line-height:1.65; }
.faq-legal li+li { margin-top:8px; }
.faq-official-links { display:flex; flex-wrap:wrap; gap:9px; margin-top:18px; }
.faq-official-links .btn { display:inline-flex; align-items:center; gap:7px; font-size:.8rem; }
body.theme-dark .faq-alert { color:#f5df9a; background:rgba(91,61,7,.34); }
body.theme-dark .faq-accordion .accordion-button,body.theme-dark .faq-accordion .accordion-body { color:var(--sidebar-text); background:rgba(15,23,42,.72); }
@media (max-width:900px) { .faq-hero,.faq-layout { grid-template-columns:1fr; } .faq-summary { position:static; } .faq-jump { grid-template-columns:repeat(3,1fr); } }
@media (max-width:620px) { .faq-card-grid,.faq-support-grid,.faq-definition-grid { grid-template-columns:1fr; } .faq-jump { grid-template-columns:repeat(2,1fr); } .faq-section { padding:16px; } }

.flashcard-shell[data-phase="answer"] .flashcard-countdown {
  color: #0b8f8a;
  border-color: rgba(11, 143, 138, 0.18);
  background: radial-gradient(circle at 30% 30%, rgba(11, 143, 138, 0.18), rgba(255, 255, 255, 0.96) 60%);
}

.flashcard-shell[data-phase="answer"] .flashcard-progress-bar {
  background: linear-gradient(90deg, #0b8f8a, #0bb8a8 55%, #19c2ff);
}

body.theme-dark .benefit-card {
  background: rgba(15, 23, 42, 0.82);
}

body.theme-dark .hero-power-pill {
  background: rgba(242, 193, 78, 0.16);
  color: #b8ecff;
  border-color: rgba(242, 193, 78, 0.24);
}

body.theme-dark .hero-pass-pill {
  background: linear-gradient(135deg, rgba(242, 193, 78, 0.24), rgba(255, 243, 192, 0.12));
  border-color: rgba(242, 193, 78, 0.34);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

body.theme-dark .flashcard-timer-card {
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

body.theme-dark .flashcard-question-card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.theme-dark .flashcard-card-face {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.92));
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

body.theme-dark .flashcard-language-panel {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.14);
}

body.theme-dark .flashcard-language-panel-english {
  background: linear-gradient(180deg, rgba(20, 93, 255, 0.1), rgba(20, 93, 255, 0.04));
}

body.theme-dark .flashcard-language-panel-translation {
  background: linear-gradient(180deg, rgba(11, 143, 138, 0.16), rgba(11, 184, 168, 0.08));
}

body.theme-dark .flashcard-language-label-english {
  color: #d9e8ff;
}

body.theme-dark .flashcard-language-label-translation {
  color: #b8f7ef;
}

body.theme-dark .analytics-subpanel {
  background: linear-gradient(180deg, rgba(10, 18, 32, 0.94), rgba(10, 18, 32, 0.88));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.theme-dark .analytics-group-panel::before,
body.theme-dark .flashcard-panel::before {
  background:
    linear-gradient(135deg, rgba(88, 166, 255, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(38, 208, 255, 0.06), transparent 36%);
  opacity: 0.55;
}

body.theme-dark .analytics-group-panel > .panel-head,
body.theme-dark .flashcard-panel > .panel-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .chart-box-donut {
  border-color: rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at 18% 16%, rgba(25, 194, 255, 0.14), transparent 42%),
    radial-gradient(circle at 82% 82%, rgba(20, 93, 255, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 38px rgba(0, 0, 0, 0.24);
}

body.theme-dark .chart-box-donut::before {
  border-color: rgba(148, 163, 184, 0.12);
}

body.theme-dark .chart-box-donut:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 44px rgba(0, 0, 0, 0.28);
}

body.theme-dark .flashcard-question-card:hover .flashcard-card-face,
body.theme-dark .flashcard-question-card:focus-within .flashcard-card-face {
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.28);
}

body.theme-dark .flashcard-auto-pill {
  background: rgba(25, 194, 255, 0.12);
  border-color: rgba(25, 194, 255, 0.18);
  color: #d8f6ff;
}

body.theme-dark .flashcard-online-pill {
  background: rgba(11, 184, 168, 0.16);
  border-color: rgba(11, 184, 168, 0.24);
  color: #b8f7ef;
}

body.theme-dark .flashcard-online-pill i {
  color: #7ff1e2;
}

body.theme-dark .flashcard-phase {
  background: rgba(25, 194, 255, 0.12);
  border-color: rgba(25, 194, 255, 0.18);
  color: #d8f6ff;
}

body.theme-dark .flashcard-countdown.is-urgent,
body.theme-dark .flashcard-shell[data-urgent="1"] .flashcard-countdown {
  color: #ff9a9a;
  border-color: rgba(239, 68, 68, 0.24);
  background: radial-gradient(circle at 30% 30%, rgba(239, 68, 68, 0.24), rgba(15, 23, 42, 0.96) 60%);
}

body.theme-dark .flashcard-phase.is-urgent,
body.theme-dark .flashcard-shell[data-urgent="1"] .flashcard-phase {
  color: #ff9a9a;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.24);
}

body.theme-dark .flashcard-tag {
  background: rgba(20, 93, 255, 0.14);
  color: #d9e8ff;
  border-color: rgba(20, 93, 255, 0.2);
}

body.theme-dark .flashcard-tag-answer {
  background: rgba(11, 143, 138, 0.14);
  color: #b8f7ef;
  border-color: rgba(11, 143, 138, 0.22);
}

body.theme-dark .flashcard-front-hint {
  background: rgba(20, 93, 255, 0.12);
  border-color: rgba(20, 93, 255, 0.18);
  color: #d8f6ff;
}

body.theme-dark .flashcard-back-hint {
  background: rgba(11, 143, 138, 0.14);
  border-color: rgba(11, 143, 138, 0.22);
  color: #b8f7ef;
}

body.theme-dark .flashcard-countdown {
  background: radial-gradient(circle at 30% 30%, rgba(25, 194, 255, 0.2), rgba(15, 23, 42, 0.96) 60%);
  border-color: rgba(25, 194, 255, 0.18);
  color: #d9f4ff;
}

body.theme-dark .flashcard-timer-caption,
body.theme-dark .flashcard-meta-line,
body.theme-dark .flashcard-meta-footer {
  color: rgba(226, 232, 240, 0.78);
}

body.theme-dark .flashcard-meta-footer strong {
  color: #fff;
}

body.theme-dark .flashcard-answer-wrap {
  background: linear-gradient(135deg, rgba(11, 143, 138, 0.22), rgba(11, 184, 168, 0.12));
  border-color: rgba(11, 143, 138, 0.28);
}

body.theme-dark .flashcard-translation-text {
  color: #b8f7ef;
}

body.theme-dark .flashcard-answer-label {
  color: #8cf5eb;
}

body.theme-dark .flashcard-answer-text {
  color: #9ef8ef;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
  padding: 22px;
  margin-bottom: 18px;
}

.guide-hero-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 72ch;
}

.guide-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.guide-hero-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(20, 93, 255, 0.08);
  border: 1px solid rgba(20, 93, 255, 0.12);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.guide-hero-note a {
  color: var(--primary);
  font-weight: 900;
}

.guide-hero-aside {
  display: flex;
  align-items: stretch;
}

.guide-tip-card {
  width: 100%;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(20, 93, 255, 0.08), rgba(11, 184, 168, 0.06));
  border: 1px solid rgba(20, 93, 255, 0.12);
}

.guide-tip-label {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.guide-tip-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.65;
}

.guide-section-card {
  margin-bottom: 18px;
  padding: 4px 0 18px;
}

.guide-step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 20px 4px;
}

.guide-step-card {
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 255, 0.9));
  border: 1px solid var(--border);
  box-shadow: 0 14px 30px rgba(10, 23, 48, 0.06);
}

.guide-step-number {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(20, 93, 255, 0.16), rgba(11, 184, 168, 0.16));
  color: var(--primary);
  font-weight: 900;
}

.guide-step-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 900;
}

.guide-step-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.guide-screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0 20px 8px;
}

.guide-screenshot-card {
  margin: 0;
  border-radius: 24px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.9));
  border: 1px solid var(--border);
  box-shadow: 0 16px 36px rgba(10, 23, 48, 0.08);
}

.guide-screenshot-frame {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(20, 93, 255, 0.12);
  background: #06121f;
}

.guide-screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.guide-screenshot-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.guide-screenshot-card figcaption strong {
  font-size: 1rem;
  font-weight: 900;
}

.guide-screenshot-card figcaption span {
  color: var(--muted);
  line-height: 1.6;
}

.guide-accordion .accordion-item {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 28px rgba(10, 23, 48, 0.05);
}

.guide-accordion .accordion-button {
  font-weight: 900;
  color: var(--text);
  background: rgba(20, 93, 255, 0.05);
}

.guide-accordion .accordion-button:not(.collapsed) {
  color: var(--primary);
  background: rgba(20, 93, 255, 0.1);
}

.guide-accordion .accordion-body {
  color: var(--text);
  line-height: 1.7;
}

body.theme-dark .guide-hero,
body.theme-dark .guide-step-card,
body.theme-dark .guide-screenshot-card,
body.theme-dark .guide-accordion .accordion-item {
  background: rgba(10, 18, 32, 0.92);
}

body.theme-dark .guide-tip-card {
  background: linear-gradient(180deg, rgba(20, 93, 255, 0.12), rgba(11, 184, 168, 0.08));
  border-color: rgba(148, 163, 184, 0.16);
}

body.theme-dark .guide-hero-note {
  background: rgba(25, 194, 255, 0.12);
  border-color: rgba(25, 194, 255, 0.18);
}

body.theme-dark .guide-screenshot-frame {
  background: #081224;
  border-color: rgba(148, 163, 184, 0.16);
}

body.theme-dark .guide-accordion .accordion-button {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
}

body.theme-dark .guide-accordion .accordion-button:not(.collapsed) {
  background: rgba(20, 93, 255, 0.14);
  color: #d9e8ff;
}

body.theme-dark .guide-accordion .accordion-body {
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
}

.panel-info-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(20, 93, 255, 0.14);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(20, 93, 255, 0.08);
  color: var(--primary);
  padding: 0;
  line-height: 1;
  flex: 0 0 auto;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.panel-info-btn:hover {
  transform: translateY(-1px);
  background: rgba(20, 93, 255, 0.14);
  border-color: rgba(20, 93, 255, 0.28);
}

.error-page {
  max-width: 760px;
  margin: 24px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 28px;
}

.error-hero {
  align-items: center;
}

.error-hero .hero-copy h2 {
  margin: 12px 0 10px;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 900;
}

.error-hero .hero-copy p {
  max-width: 58ch;
}

.error-panel {
  padding: 18px 20px;
}

.error-icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.error-icon-warning {
  background: linear-gradient(135deg, #ff7a18, #ffbe45);
}

.error-icon-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.error-code {
  font-size: 4rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.error-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 900;
}

.error-message {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  line-height: 1.65;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.error-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.error-panel .error-actions {
  justify-content: flex-start;
}

.table-panel {
  overflow: hidden;
}

.table-filters,
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-toolbar {
  justify-content: space-between;
  margin-bottom: 12px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.icon-btn:hover {
  color: var(--primary);
  border-color: rgba(25, 194, 255, 0.4);
}

.table-search-wrap {
  flex: 1 1 280px;
  max-width: 420px;
}

.column-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.column-toggles .btn {
  font-size: 0.8rem;
}

.enterprise-table thead th {
  background: rgba(20, 93, 255, 0.08);
  color: var(--text);
  border-bottom: 1px solid var(--border) !important;
}

.enterprise-table tbody tr {
  background: transparent;
}

.enterprise-table tbody td {
  border-color: var(--border) !important;
  vertical-align: top;
}

.dataTables_wrapper .dataTables_filter {
  display: none;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  color: var(--text) !important;
}

.dataTables_wrapper .dt-button {
  border-radius: 10px !important;
  border: 1px solid var(--border) !important;
  background: var(--panel-strong) !important;
  color: var(--text) !important;
}

.dataTables_wrapper .datatable-footer {
  margin-top: 12px;
}

.dataTables_wrapper .dataTables_length select {
  min-height: 36px;
  border-radius: 10px;
  border-color: var(--border);
  background: var(--panel-strong);
  color: var(--text);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  margin-left: 4px !important;
  padding: 0.45rem 0.75rem !important;
  color: var(--text) !important;
  background: var(--panel-strong) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, rgba(255, 190, 69, 0.22), rgba(20, 93, 255, 0.18)) !important;
  color: var(--text) !important;
  border-color: rgba(255, 190, 69, 0.35) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.45 !important;
}

.simulator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(280px, 0.58fr);
  gap: 16px;
}

.interview-current-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 12px;
  align-items: start;
}

.interview-question-column,
.interview-side-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.interview-side-column {
  gap: 10px;
}

.interview-page {
  padding: 16px;
}

.interview-page .panel-head {
  margin-bottom: 12px;
}

.interview-page .panel-head h2 {
  margin-bottom: 4px;
}

.interview-page .panel-head p {
  margin-bottom: 0;
  font-size: clamp(.78rem, .95vw, .96rem);
  line-height: 1.25;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .interview-page .panel-head p { white-space: normal; }
}

.interview-page .simulator-layout {
  gap: 12px;
  grid-template-columns: 1fr;
}

.interview-page .question-queue-panel {
  margin-top: 16px;
}

.interview-page .question-meta-row {
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 5px 0 7px;
}

.interview-page .question-chip-row {
  margin-bottom: 8px;
}

.interview-page .question-timer-wrap {
  flex: 0 1 230px;
  min-width: 180px;
  width: min(230px, 100%);
  margin-left: 0;
}

.interview-current-grid .question-timer-wrap {
  flex-basis: 220px;
  width: min(220px, 100%);
}

.interview-page .live-overlay {
  margin-top: 8px;
  gap: 10px;
}

.interview-page .metric-panel {
  margin-top: 8px;
  gap: 8px;
}

.interview-page .result-panel {
  margin-top: 8px;
}

.interview-question-column .interview-result-panel {
  margin-top: 0;
  margin-bottom: 4px;
}

.interview-page .mode-start-banner {
  margin: 7px 0 9px;
  padding: 9px 11px;
}

.interview-question-column .sim-step {
  margin: 5px 0 2px;
  font-size: .68rem;
  letter-spacing: .09em;
}

.interview-question-column h3 {
  margin-top: 0;
  margin-bottom: 2px;
  font-size: clamp(1rem, 1.35vw, 1.35rem);
  font-weight: 750;
  line-height: 1.26;
  letter-spacing: -0.018em;
}

.interview-question-column #simDescription,
.interview-question-column #simAnswer {
  margin-bottom: 4px;
}

.dashboard-performance-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-block: 20px;
}
.dashboard-performance-card {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 18px; border: 1px solid var(--metric-color); border-radius: 22px;
  background: var(--panel, #f8faff); color: var(--text, #20283e);
}
.dashboard-performance-icon { color: var(--metric-color); display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--metric-color) 12%, transparent); }
.dashboard-performance-card > span:not(.dashboard-performance-icon) { font-size: .8rem; font-weight: 700; text-transform: uppercase; }
.dashboard-performance-card strong { font-size: 1.4rem; }
.dashboard-performance-track { height: 8px; background: rgba(128, 138, 160, .18); border-radius: 8px; overflow: hidden; }
.dashboard-performance-track > span { display: block; height: 100%; width: 0; background: var(--metric-color); border-radius: inherit; }
@media (max-width: 700px) { .dashboard-performance-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#simDescription.question-guidance {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  margin-bottom: 12px;
}

#simDescription .question-guidance-line {
  display: block;
  padding: 7px 9px;
  border-left: 3px solid rgba(20, 93, 255, .55);
  border-radius: 0 9px 9px 0;
  background: rgba(20, 93, 255, .055);
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.42;
}

#simDescription .question-guidance-line:nth-child(2) { border-left-color: rgba(11, 184, 168, .7); background: rgba(11, 184, 168, .05); }
#simDescription .question-guidance-line:nth-child(3) { border-left-color: rgba(242, 193, 78, .78); background: rgba(242, 193, 78, .07); }
#simDescription .question-guidance-line strong { color: var(--text); }

body.theme-dark #simDescription .question-guidance-line { background: rgba(255, 255, 255, .04); }

.interview-question-column .sim-controls {
  margin-top: 4px;
}

.interview-correctness-card {
  margin: 6px 0 10px;
  padding: 12px 14px;
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(10, 23, 48, 0.08);
}

.interview-correctness-card .metric-card-head {
  margin-bottom: 2px;
}

.interview-correctness-card .metric-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.interview-correctness-card strong {
  font-size: 1.22rem;
}

.interview-correctness-card .metric-track {
  height: 10px;
}

.interview-side-column .live-overlay,
.interview-side-column .metric-panel,
.interview-side-column .result-panel {
  margin-top: 0;
}

.interview-side-column .metric-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Put the four answer-quality indicators directly above the user transcript. */
.interview-side-column .metric-panel {
  order: -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(20, 93, 255, 0.1);
  border-radius: 16px;
  background: rgba(20, 93, 255, 0.035);
}

.interview-side-column .metric-card {
  min-height: 104px;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
}

.interview-side-column .metric-card-head {
  gap: 6px;
}

.interview-side-column .metric-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.interview-side-column .metric-card-icon i {
  font-size: 0.78rem;
}

.interview-side-column .metric-card-head > span:last-child,
.interview-side-column .metric-card-head .metric-card-title {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.interview-side-column .metric-info-btn {
  display: none;
}

.interview-side-column .metric-card strong {
  font-size: 1.02rem;
}

.interview-side-column .metric-track {
  height: 6px;
}

@media (max-width: 1200px) {
  .interview-side-column .metric-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.interview-side-column .overlay-card,
.interview-side-column .metric-card,
.interview-side-column .result-panel {
  padding-top: 12px;
  padding-bottom: 12px;
}

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.interview-page .sim-controls {
  gap: 8px;
  margin-top: 6px;
}

.sim-controls-row {
  display: grid;
  gap: 8px;
}

.sim-controls-row .btn {
  width: 100%;
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.sim-controls-row .btn .me-2 {
  margin-right: 0.4rem !important;
}

.sim-controls-row-primary .btn-primary {
  --bs-btn-bg: #17805c;
  --bs-btn-border-color: #17805c;
  --bs-btn-hover-bg: #126849;
  --bs-btn-hover-border-color: #126849;
  --bs-btn-active-bg: #0d563c;
  --bs-btn-active-border-color: #0d563c;
}

.sim-controls-row-primary #startRecordingBtn {
  --bs-btn-bg: #14718a;
  --bs-btn-border-color: #14718a;
  --bs-btn-hover-bg: #105c70;
  --bs-btn-hover-border-color: #105c70;
  --bs-btn-active-bg: #0c4d5e;
  --bs-btn-active-border-color: #0c4d5e;
}

.sim-controls-row .btn-outline-secondary {
  --bs-btn-color: #52616b;
  --bs-btn-border-color: #b8c2c9;
  --bs-btn-hover-bg: #eef5f2;
  --bs-btn-hover-border-color: #8fa99e;
  --bs-btn-hover-color: #1f513e;
}

.sim-controls-row-primary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sim-controls-row-secondary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.manual-answer-control {
  padding: 10px;
  border: 1px solid rgba(20, 93, 255, 0.14);
  border-radius: 12px;
  background: rgba(20, 93, 255, 0.035);
}

.manual-answer-control .form-label {
  margin-bottom: 6px;
  color: var(--text);
  font-size: .82rem;
  font-weight: 700;
}

.manual-answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.manual-answer-row textarea {
  min-height: 44px;
  resize: vertical;
}

.manual-answer-row .btn {
  min-height: 44px;
  white-space: nowrap;
}

.sim-controls-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(20, 93, 255, 0.12);
  background: rgba(20, 93, 255, 0.05);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
}

.sim-controls-note i {
  color: var(--primary);
  margin-top: 2px;
}

.sim-controls-reset {
  display: flex;
  justify-content: flex-start;
}

.sim-controls-reset .btn {
  min-width: 220px;
}

@media (max-width: 1200px) {
  .sim-controls-row-primary,
  .sim-controls-row-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sim-controls-row-primary,
  .sim-controls-row-secondary {
    grid-template-columns: 1fr;
  }

  .sim-controls-reset .btn {
    width: 100%;
    min-width: 0;
  }

  .manual-answer-row {
    grid-template-columns: 1fr;
  }

  .manual-answer-row .btn {
    width: 100%;
  }

  .question-meta-top {
    flex-direction: column;
    align-items: stretch;
  }

  .question-timer-wrap {
    width: 100%;
    margin-left: 0;
  }

  .question-meta-actions {
    width: 100%;
  }

  .question-meta-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

.interview-toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 10px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94)),
    var(--panel-strong);
  box-shadow: var(--shadow);
  align-items: end;
}

@media (min-width: 992px) {
  .interview-toolbar {
    position: sticky;
    top: 102px;
    z-index: 18;
    backdrop-filter: blur(18px);
  }
}

body.theme-dark .interview-toolbar {
  background:
    linear-gradient(180deg, rgba(10, 18, 32, 0.98), rgba(8, 16, 30, 0.94)),
    var(--panel-strong);
}

.interview-toolbar > div {
  min-width: 0;
}

.interview-toolbar .form-select,
.interview-toolbar .form-control,
.practice-section-toggle {
  min-height: 40px;
}

.interview-toolbar .form-label {
  margin-bottom: 0.28rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.interview-toolbar .form-select,
.interview-toolbar .form-control {
  border-radius: 12px;
  font-size: 0.92rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.interview-toolbar #statusBadge {
  background: rgba(20, 93, 255, 0.06);
  color: var(--text);
  font-weight: 700;
}

.interview-toolbar .exam-skip-toggle {
  align-self: stretch;
  justify-content: flex-end;
}

.interview-toolbar .exam-skip-toggle .form-check {
  min-height: 40px;
}

@media (max-width: 1400px) {
  .interview-toolbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .interview-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.practice-section-picker {
  position: relative;
}

.practice-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: var(--shadow);
  text-align: left;
}

.practice-section-toggle::after {
  margin-left: auto;
}

.practice-section-menu {
  width: 100%;
  min-width: 100%;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.practice-section-menu-hint {
  margin-bottom: 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.practice-section-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.practice-section-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(20, 93, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.practice-section-option input {
  margin-top: 0;
  flex: 0 0 auto;
}

.practice-section-name {
  flex: 1 1 auto;
  font-weight: 700;
}

.practice-section-count {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(20, 93, 255, 0.08);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
}

.practice-section-empty {
  padding: 8px 2px;
  color: var(--muted);
}

.interview-card {
  position: relative;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94)),
    var(--panel-strong);
  box-shadow: 0 18px 44px rgba(10, 23, 48, 0.08);
}

body.theme-dark .interview-card {
  background:
    linear-gradient(180deg, rgba(10, 18, 32, 0.98), rgba(8, 16, 30, 0.94)),
    var(--panel-strong);
}

.interview-question-column {
  padding-right: 2px;
}

.interview-side-column {
  padding-left: 2px;
}

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

.overlay-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background: rgba(20, 93, 255, 0.05);
}

.overlay-card h5 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 800;
}

.overlay-card .overlay-text {
  line-height: 1.5;
  font-size: 1.02rem;
}

.overlay-card.spoken-card .overlay-text {
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 1.06rem;
  letter-spacing: 0.01em;
}

.overlay-card.spoken-card {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 40%),
    rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.16);
}

.overlay-card.spoken-card.spoken-answer-mode {
  border-color: rgba(34, 197, 94, 0.38);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.12), var(--shadow);
}

.overlay-card.spoken-card.spoken-answer-mode .overlay-text {
  min-height: 72px;
  max-height: 190px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  color: #16a34a;
  font-size: clamp(1.18rem, 2.2vw, 1.6rem);
  line-height: 1.95;
  font-weight: 900;
}

.spoken-answer-word {
  display: inline-block;
  margin: 0 0.22rem 0.4rem 0;
  padding: 0.08rem 0.18rem;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.spoken-placeholder {
  color: var(--muted);
  font-style: italic;
  font-weight: 700;
}

.overlay-card.translated-card .overlay-text {
  font-family: "Noto Sans Ethiopic", "Inter", sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
}

.overlay-card.translated-card {
  cursor: help;
}

.overlay-card.transcript-card {
  background:
    radial-gradient(circle at top right, rgba(25, 194, 255, 0.12), transparent 38%),
    rgba(20, 93, 255, 0.05);
}

.overlay-card.transcript-card.has-live-transcript {
  border-color: rgba(25, 194, 255, 0.42);
  box-shadow: 0 0 0 1px rgba(25, 194, 255, 0.12), var(--shadow);
}

.overlay-card.transcript-card .overlay-text {
  min-height: 60px;
  max-height: 170px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 1.04rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.overlay-card.status-card .overlay-text {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
}

.transcript-placeholder {
  color: var(--muted);
  font-style: italic;
}

.transcript-final {
  display: inline-block;
  padding: 0 3px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 700;
  animation: transcriptCommitPulse 0.42s ease;
}

.transcript-live {
  color: var(--primary-2);
  font-weight: 800;
  text-shadow: 0 0 18px rgba(25, 194, 255, 0.18);
}

.transcript-cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--primary);
  font-weight: 900;
  animation: transcriptBlink 1s steps(2, end) infinite;
}

body.theme-dark .overlay-card.spoken-card {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), transparent 40%),
    rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.24);
}

body.theme-dark .overlay-card.spoken-card.spoken-answer-mode .overlay-text {
  color: #86efac;
}

body.theme-dark .spoken-answer-word {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
}

@keyframes transcriptBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes transcriptCommitPulse {
  0% { background-color: rgba(25, 194, 255, 0.22); transform: translateY(-1px); }
  100% { background-color: transparent; transform: translateY(0); }
}

.voice-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(20, 93, 255, 0.08);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.7rem;
  margin-right: 6px;
  margin-bottom: 6px;
}

.question-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.question-meta-row {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 7px;
}

.question-meta-top {
  align-items: center;
}

.question-meta-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.question-meta-actions .btn {
  min-width: 142px;
  min-height: 33px;
  padding: .32rem .55rem;
  font-size: .7rem;
}

.question-timer-wrap {
  flex: 0 1 230px;
  min-width: 180px;
  width: min(230px, 100%);
  margin-left: 0;
}

.question-timer-wrap .form-label {
  margin-bottom: 0.35rem;
}

.question-timer {
  width: 100%;
  min-height: 33px;
  border-radius: 11px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: center;
  background: rgba(20, 93, 255, 0.06);
  color: var(--primary);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.question-timer.timer-warning,
#voicePopupTimer.timer-warning,
.voice-popup-timer.timer-warning {
  border-color: rgba(255, 190, 69, 0.55);
  color: #b45309;
  background: rgba(255, 190, 69, 0.08);
}

.question-timer.timer-critical,
#voicePopupTimer.timer-critical,
.voice-popup-timer.timer-critical {
  border-color: rgba(239, 68, 68, 0.75);
  color: #dc2626;
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 0 0.15rem rgba(239, 68, 68, 0.12);
}

.question-create-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(20, 93, 255, 0.08), rgba(25, 194, 255, 0.05)),
    var(--panel-strong);
}

.question-bank-editor-accordion { border: 1px solid #dce5f7; border-radius: 16px; background: linear-gradient(135deg, #f8faff, #fff); overflow: hidden; }
.question-bank-editor-accordion > summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .9rem 1rem; color: #213153; cursor: pointer; list-style: none; }
.question-bank-editor-accordion > summary::-webkit-details-marker { display: none; }
.question-bank-editor-summary-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #eaf0ff; color: #486cf0; }
.question-bank-editor-accordion summary strong { display: block; font-size: .9rem; }
.question-bank-editor-accordion summary small { display: block; margin-top: 2px; color: #74819a; font-size: .76rem; }
.question-bank-editor-chevron { color: #586b91; transition: transform .2s ease; }
.question-bank-editor-accordion[open] .question-bank-editor-chevron { transform: rotate(180deg); }
.question-bank-editor-content { padding: 0 1rem 1rem; border-top: 1px solid #e4ebf8; }
.question-bank-editor-content .question-create-card { margin-top: 1rem; }

.question-bank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-bank-empty-state {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(20, 93, 255, 0.06), rgba(25, 194, 255, 0.03)),
    var(--panel-strong);
}

.question-bank-empty-state i {
  font-size: 1.5rem;
  color: var(--warning);
}

.question-bank-empty-state h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 800;
}

.question-bank-empty-state p {
  margin: 0;
  color: var(--muted);
}

.question-bank-pagination {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(20, 93, 255, 0.04), rgba(25, 194, 255, 0.02)),
    var(--panel-strong);
}

.question-bank-page-info {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.question-bank-page-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.question-bank-page-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.question-bank-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.question-bank-page-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(20, 93, 255, 0.35);
}

.question-bank-page-btn.is-active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(20, 93, 255, 0.24);
}

.question-bank-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.question-bank-page-ellipsis {
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 767px) {
  .question-bank-pagination {
    justify-content: center;
  }

  .question-bank-page-info {
    width: 100%;
    text-align: center;
  }

  .question-bank-page-controls {
    width: 100%;
    justify-content: center;
  }
}

.question-edit-item {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.question-edit-item[open] {
  border-color: rgba(25, 194, 255, 0.35);
}

.question-edit-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(20, 93, 255, 0.05), rgba(25, 194, 255, 0.03));
}

.question-edit-summary::-webkit-details-marker {
  display: none;
}

.question-edit-summary-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}

.question-edit-id {
  flex: 0 0 auto;
  min-width: 54px;
  text-align: center;
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(20, 93, 255, 0.1);
  color: var(--primary);
  font-weight: 800;
}

.question-edit-title {
  font-weight: 800;
  line-height: 1.35;
}

.question-edit-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

.question-edit-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.question-edit-created {
  font-size: 0.78rem;
  color: var(--muted);
}

.question-edit-body {
  padding: 18px;
  border-top: 1px solid var(--border);
}

.question-edit-form .form-label {
  font-weight: 700;
  color: var(--text);
}

.question-edit-form textarea,
.question-edit-form input {
  background: rgba(20, 93, 255, 0.03);
}

.question-edit-form textarea:focus,
.question-edit-form input:focus {
  box-shadow: 0 0 0 0.15rem rgba(25, 194, 255, 0.18);
  border-color: rgba(25, 194, 255, 0.45);
}

.metric-panel {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(20, 93, 255, 0.08), rgba(25, 194, 255, 0.04)),
    rgba(20, 93, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto -18px -18px auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25, 194, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.metric-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.metric-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(20, 93, 255, 0.1);
}

.metric-card-icon i {
  font-size: 0.92rem;
}

.metric-card-head > span:last-child,
.metric-card-head .metric-card-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.3;
  min-width: 0;
  flex: 1 1 auto;
}

.metric-info-btn {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(20, 93, 255, 0.12);
  border-radius: 999px;
  background: rgba(20, 93, 255, 0.08);
  color: var(--muted);
  box-shadow: none;
  cursor: help;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

.metric-info-btn:hover,
.metric-info-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(20, 93, 255, 0.14);
  border-color: rgba(20, 93, 255, 0.22);
  color: var(--primary);
}

.metric-info-btn i {
  font-size: 0.78rem;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
  color: currentColor !important;
  filter: none !important;
}

.metric-info-btn:hover i,
.metric-info-btn:focus-visible i {
  color: var(--primary) !important;
}

body.theme-dark .metric-info-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .metric-info-btn:hover,
body.theme-dark .metric-info-btn:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
}

.metric-card strong {
  font-size: 1.32rem;
  line-height: 1;
}

.metric-card-correctness {
  background:
    linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(34, 197, 94, 0.05)),
    rgba(20, 93, 255, 0.05);
  border-color: rgba(34, 197, 94, 0.16);
}

.metric-card-correctness .metric-card-icon {
  background: rgba(34, 197, 94, 0.14);
}

.metric-card-accent {
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(20, 93, 255, 0.05)),
    rgba(20, 93, 255, 0.05);
  border-color: rgba(14, 165, 233, 0.16);
}

.metric-card-accent .metric-card-icon {
  background: rgba(14, 165, 233, 0.14);
}

.metric-card-fluency {
  background:
    linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(20, 93, 255, 0.05)),
    rgba(20, 93, 255, 0.05);
  border-color: rgba(168, 85, 247, 0.16);
}

.metric-card-fluency .metric-card-icon {
  background: rgba(168, 85, 247, 0.14);
}

.metric-card-speed {
  background:
    linear-gradient(135deg, rgba(255, 190, 69, 0.14), rgba(20, 93, 255, 0.05)),
    rgba(20, 93, 255, 0.05);
  border-color: rgba(255, 190, 69, 0.2);
}

.metric-card-speed .metric-card-icon {
  background: rgba(255, 190, 69, 0.18);
}

.metric-card-confidence {
  background:
    linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(20, 93, 255, 0.05)),
    rgba(20, 93, 255, 0.05);
  border-color: rgba(236, 72, 153, 0.16);
}

.metric-card-confidence .metric-card-icon {
  background: rgba(236, 72, 153, 0.14);
}

.metric-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.metric-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #145dff, #19c2ff);
  transition: width 0.35s ease;
}

.metric-card.metric-good .metric-fill {
  background: linear-gradient(90deg, #16a34a, #84cc16);
}

.metric-card.metric-warn .metric-fill {
  background: linear-gradient(90deg, #ffbe45, #fb7185);
}

.metric-card.metric-bad .metric-fill {
  background: linear-gradient(90deg, #ef4444, #fb7185);
}

.result-panel {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  border: 1px solid var(--border);
  background: rgba(20, 93, 255, 0.05);
}

.result-badge {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: .95rem;
  color: white;
  align-self: start;
}

.result-badge.neutral {
  background: linear-gradient(135deg, #64748b, #94a3b8);
}

.result-badge.success {
  background: linear-gradient(135deg, #ffbe45, #ff7a18);
  box-shadow: 0 0 0 0 rgba(255, 190, 69, 0.5);
  animation: goldenPulse 1.35s infinite;
}

.result-badge.golden {
  background: linear-gradient(135deg, #ffbe45, #f59e0b);
  color: #111827;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.42);
  animation: goldenPulse 1.35s infinite;
}

.result-badge.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.result-title {
  font-weight: 900;
  font-size: .82rem;
  margin-bottom: 2px;
}

.result-summary {
  color: var(--muted);
  margin-bottom: 4px;
  font-size: .72rem;
  line-height: 1.3;
}

.result-description,
.result-recommendation {
  line-height: 1.5;
}

.result-explanation {
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: 12px;
  background: rgba(255, 247, 220, .72);
}

.result-explanation > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9a6700;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.result-explanation .result-description {
  margin: 6px 0 0;
  color: #4b3a14;
  font-size: .84rem;
  white-space: pre-line;
}

body.theme-dark .result-explanation {
  border-color: rgba(251, 191, 36, .3);
  background: rgba(96, 66, 8, .22);
}

body.theme-dark .result-explanation .result-description { color: #f6e7b4; }

.result-recommendation {
  margin-top: 8px;
  font-weight: 700;
}

.coach-answer-callout {
  display: inline-block;
  margin-top: 4px;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.45;
  color: #0f8a2b;
}

.result-debug {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  word-break: break-word;
}

.result-panel.result-pass {
  border-color: rgba(255, 190, 69, 0.35);
  background: rgba(255, 190, 69, 0.08);
}

.result-panel.result-golden {
  border-color: rgba(245, 158, 11, 0.38);
  background:
    radial-gradient(circle at top right, rgba(247, 211, 106, 0.2), transparent 34%),
    rgba(245, 158, 11, 0.08);
}

body.theme-dark .result-panel.result-golden {
  background:
    radial-gradient(circle at top right, rgba(247, 211, 106, 0.16), transparent 34%),
    rgba(17, 12, 2, 0.42);
}

.result-panel.result-fail {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

.golden-buzzer-celebration {
  position: fixed;
  z-index: 1200;
  top: 14px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border: 2px solid #f2b84b;
  border-radius: 999px;
  color: #6f4700;
  background: linear-gradient(135deg, #fff8d8, #f2b84b);
  box-shadow: 0 12px 32px rgba(180, 119, 10, .28);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -130px) scale(.75);
}
.golden-buzzer-celebration.is-visible { animation: goldenBuzzerFly 1.25s cubic-bezier(.2,.8,.2,1) forwards; }
.golden-buzzer-celebration i { font-size: 1.25rem; }
@keyframes goldenBuzzerFly {
  0% { opacity: 0; transform: translate(-50%, -130px) scale(.75) rotate(-6deg); }
  55% { opacity: 1; transform: translate(-50%, 0) scale(1.08) rotate(2deg); }
  78% { transform: translate(-50%, -5px) scale(1) rotate(0); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.result-panel.result-pass .result-title {
  color: #d97706;
}

.result-panel.result-fail .result-title {
  color: #dc2626;
}

.result-panel.result-pass .result-description,
.result-panel.result-fail .result-description {
  margin-top: 4px;
}

.result-panel.result-pass .result-recommendation {
  color: #92400e;
}

.result-panel.result-fail .result-recommendation {
  color: #991b1b;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.result-actions .btn {
  min-height: 38px;
}

.mode-start-banner {
  margin: 10px 0 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(25, 194, 255, 0.22);
  background: linear-gradient(135deg, rgba(20, 93, 255, 0.12), rgba(25, 194, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.mode-start-banner strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.mode-start-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mode-start-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.mode-start-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(20, 93, 255, 0.12);
  overflow: hidden;
}

.mode-start-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #145dff, #19c2ff, #ffbe45);
}

.mode-start-banner.play .mode-start-track span {
  animation: modeStartSweep 2.4s ease-in-out forwards;
}

@keyframes modeStartSweep {
  0% { width: 0; }
  55% { width: 72%; }
  100% { width: 100%; }
}

.voice-popup-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  cursor: move;
  user-select: none;
  touch-action: none;
}

.voice-popup-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.voice-popup-heading-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.voice-popup-citizenship-brand { display: inline-flex; align-items: center; gap: 6px; color: #1b3f86; font: 900 .76rem/1 Inter, sans-serif; letter-spacing: -.02em; }.voice-popup-citizenship-brand i { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: #fff; background: linear-gradient(145deg, #2d65e8, #65c6ec); box-shadow: 0 3px 9px rgba(37, 88, 204, .25); }.voice-popup-citizenship-brand > span { display: grid; gap: 2px; }.voice-popup-citizenship-brand small { color: #7786a4; font-size: .48rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.interview-intro-preference { display: none; align-items: center; gap: .42rem; margin-top: .65rem; color: #66748f; font-size: .72rem; font-weight: 700; cursor: pointer; user-select: none; }.interview-intro-preference input { width: .9rem; height: .9rem; accent-color: #4169e1; }
.exam-credit-status { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .65rem; padding: .55rem .7rem; border: 1px solid rgba(193, 140, 20, .38); border-radius: .75rem; color: #72550b; background: linear-gradient(90deg, #fff9dd, #fffdf4); font-size: .76rem; font-weight: 750; }
.exam-credit-status span { display: inline-flex; align-items: center; gap: .38rem; }.exam-credit-status strong { color: #8b6205; font-size: .9rem; }.exam-credit-status.credit-empty { border-color: rgba(209, 68, 68, .38); color: #9d3030; background: #fff4f4; }.exam-credit-status.credit-empty strong { color: #b32626; }.exam-credit-status .btn { white-space: nowrap; font-weight: 800; }
body.theme-dark .exam-credit-status { color: #f8dd87; border-color: rgba(240, 197, 80, .35); background: rgba(110, 81, 10, .24); } body.theme-dark .exam-credit-status strong { color: #ffe58f; }

.voice-popup-heading-row .voice-popup-label { margin-bottom: 0; }

.voice-popup-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .055em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 5px 14px rgba(27, 49, 92, .08);
}

.voice-popup-mode-badge.is-study {
  border-color: rgba(43, 112, 238, .24);
  color: #245dc7;
  background: linear-gradient(135deg, #edf4ff, #e7fbf7);
}

.voice-popup-mode-badge.is-exam {
  border-color: rgba(217, 151, 12, .32);
  color: #875700;
  background: linear-gradient(135deg, #fff6cf, #ffe8ad);
}

.voice-popup-mode-badge.is-study i { color: #3478ee; }
.voice-popup-mode-badge.is-exam i { color: #d9980b; }

body.theme-dark .voice-popup-mode-badge.is-study {
  border-color: rgba(88, 166, 255, .32);
  color: #a9d3ff;
  background: rgba(25, 76, 133, .34);
}

body.theme-dark .voice-popup-mode-badge.is-exam {
  border-color: rgba(255, 190, 69, .35);
  color: #ffd97f;
  background: rgba(112, 72, 4, .34);
}

.voice-popup-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(20, 93, 255, 0.08);
  color: var(--primary);
  font-weight: 800;
}

.voice-popup-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

/* Keep the movable interview controls compact at large display scaling. */
.voice-popup-timer {
  padding: 6px 10px;
  font-size: .82rem;
}

.voice-popup-actions .btn {
  min-height: 34px;
  padding: .38rem .62rem;
  font-size: .8rem;
}

.voice-popup-actions .btn i { font-size: .78rem; }

/* Keep the close action fixed in the card's upper-right corner. */
.voice-popup-card { position: relative; }
.voice-popup-top { padding-right: 3.4rem; }
#voicePopup #popupExitBtn { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 2.55rem; min-width: 2.55rem; height: 2.55rem; min-height: 2.55rem; padding: 0; border: 1.5px solid #c92334; border-radius: .7rem; color: #fff; background: #c92334; box-shadow: 0 5px 14px rgba(185, 32, 48, .14); }
#voicePopup #popupExitBtn:hover, #voicePopup #popupExitBtn:focus-visible { color: #fff; background: #a51d2b; border-color: #a51d2b; }
#voicePopup #popupExitBtn:focus-visible { outline: 3px solid #c92334; outline-offset: 3px; }
#voicePopup #popupExitBtn .close-symbol { color: #fff; font: 700 1.5rem/1 Arial, sans-serif; }

/* Remove the retired introduction preference and place credits at the end. */
.interview-intro-preference { display: none !important; }
.voice-popup.exam-welcome .exam-credit-status { order: 10; width: 100%; margin-top: 1rem; }

.voice-popup-evaluation-mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(117, 74, 224, .2);
  border-radius: 999px;
  background: rgba(117, 74, 224, .08);
  color: #7045cf;
  font-size: .68rem;
  font-weight: 800;
  white-space: nowrap;
}

.voice-popup-evaluation-mode small {
  padding-left: 5px;
  border-left: 1px solid rgba(117, 74, 224, .24);
  color: #815de0;
  font-size: .61rem;
  font-weight: 800;
}

.settings-form .panel-card {
  box-shadow: 0 18px 40px rgba(10, 23, 48, 0.08);
}

.settings-page {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.settings-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  padding: 32px;
  background:
    radial-gradient(circle at top left, rgba(20, 93, 255, 0.12), transparent 42%),
    radial-gradient(circle at top right, rgba(25, 194, 255, 0.11), transparent 35%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 255, 0.86));
  border: 1px solid rgba(20, 93, 255, 0.12);
}

body.theme-dark .settings-hero {
  background:
    radial-gradient(circle at top left, rgba(20, 93, 255, 0.16), transparent 42%),
    radial-gradient(circle at top right, rgba(25, 194, 255, 0.12), transparent 35%),
    linear-gradient(135deg, rgba(10, 18, 32, 0.96), rgba(8, 16, 30, 0.88));
  border-color: rgba(255, 255, 255, 0.08);
}

.settings-hero-copy h1 {
  font-size: clamp(2rem, 3.2vw, 3.15rem);
  font-weight: 900;
  line-height: 1.06;
  margin: 14px 0 12px;
}

.settings-hero-copy p {
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.6;
}

.settings-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.settings-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(20, 93, 255, 0.08);
  border: 1px solid rgba(20, 93, 255, 0.12);
  color: var(--text);
  font-weight: 700;
  font-size: 0.84rem;
}

.settings-chip i {
  color: var(--primary);
}

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

.settings-mini-card {
  border-radius: 20px;
  padding: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-mini-card span {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.settings-mini-card strong {
  font-size: 1.3rem;
  font-weight: 900;
}

.settings-mini-card small {
  color: var(--muted);
  font-weight: 600;
}

.settings-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.92));
  box-shadow: 0 18px 40px rgba(10, 23, 48, 0.08);
}

body.theme-dark .settings-card {
  background: linear-gradient(180deg, rgba(10, 18, 32, 0.96), rgba(8, 16, 30, 0.92));
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.settings-card-head h3 {
  margin: 0;
}

.settings-card-head p {
  color: var(--muted);
}

.settings-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 24px rgba(20, 93, 255, 0.24);
  flex: 0 0 auto;
}

.settings-card .form-control,
.settings-card .form-select,
.settings-card textarea {
  border-radius: 14px;
  border-color: rgba(20, 93, 255, 0.12);
  background: rgba(255, 255, 255, 0.84);
  padding: 0.86rem 1rem;
}

body.theme-dark .settings-card .form-control,
body.theme-dark .settings-card .form-select,
body.theme-dark .settings-card textarea {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.settings-card .form-control:focus,
.settings-card .form-select:focus,
.settings-card textarea:focus {
  box-shadow: 0 0 0 0.18rem rgba(25, 194, 255, 0.18);
  border-color: rgba(25, 194, 255, 0.45);
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 3.75rem;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  transform: translateY(-50%);
  padding: 0;
  z-index: 2;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus-visible {
  background: rgba(20, 93, 255, 0.08);
  color: var(--primary-2);
  outline: none;
  box-shadow: none;
}

.password-toggle-btn:focus-visible {
  box-shadow: 0 0 0 0.18rem rgba(25, 194, 255, 0.2);
}

body.theme-dark .password-toggle-btn {
  color: var(--primary-2);
}

body.theme-dark .password-toggle-btn:hover,
body.theme-dark .password-toggle-btn:focus-visible {
  background: rgba(38, 208, 255, 0.12);
  color: #ffffff;
}

.settings-notes {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.stripe-plan-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stripe-plan-row {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  background: rgba(20, 93, 255, 0.04);
}

.plan-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.plan-row-head strong {
  font-size: 1rem;
}

.stripe-plan-row .form-label {
  margin-bottom: 0.35rem;
}

.stripe-plans-table-wrap {
  border: 1px solid rgba(74, 102, 165, .18);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--panel-strong);
}

.stripe-plans-table { min-width: 780px; }
.stripe-plans-table th { padding: .72rem .8rem; color: #63708a; background: #f4f7ff; font-size: .68rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.stripe-plans-table td { padding: .72rem .8rem; color: var(--ink); font-size: .79rem; border-color: rgba(74, 102, 165, .11); vertical-align: middle; }
.stripe-plans-table code { display: inline-block; max-width: 190px; overflow: hidden; color: #4057ae; font-size: .69rem; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.stripe-plan-description-cell { max-width: 260px; overflow: hidden; color: var(--muted) !important; text-overflow: ellipsis; white-space: nowrap; }
.stripe-price-code { padding: .22rem .38rem; border-radius: .35rem; background: rgba(77, 103, 223, .08); }
body.theme-dark .stripe-plans-table-wrap { border-color: rgba(144, 162, 221, .2); background: rgba(16, 24, 46, .82); }
body.theme-dark .stripe-plans-table th { color: #b9c4e2; background: rgba(43, 55, 92, .82); }
body.theme-dark .stripe-plans-table td { border-color: rgba(144, 162, 221, .13); }
body.theme-dark .stripe-plans-table code { color: #a9b8ff; background: rgba(91, 113, 235, .13); }

.subscription-status-locked { color: #a36a00; }
.profile-pending-email { display: flex; gap: .65rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid rgba(44, 115, 187, .2); border-radius: .75rem; color: #47617d; background: rgba(235, 245, 255, .78); font-size: .78rem; line-height: 1.4; }
.profile-pending-email i { margin-top: .15rem; color: #3275c7; }.profile-pending-email small { display: block; margin-top: .18rem; color: #68758c; }
body.theme-dark .profile-pending-email { color: #cbd8ef; border-color: rgba(113, 166, 234, .28); background: rgba(33, 58, 95, .4); }.subscription-status-locked { color: #c88b19; }

.billing-plan {
  --plan-accent: #5874e8;
  --plan-accent-rgb: 88, 116, 232;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.billing-plan::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--plan-accent); }
.billing-plan:hover { transform: translateY(-4px); border-color: rgba(var(--plan-accent-rgb), .55); box-shadow: 0 16px 36px rgba(var(--plan-accent-rgb), .18); }
.billing-plan-basic { --plan-accent: #29a873; --plan-accent-rgb: 41, 168, 115; background: linear-gradient(150deg, rgba(41,168,115,.09), var(--panel-strong) 44%); }
.billing-plan-pro { --plan-accent: #6555e8; --plan-accent-rgb: 101, 85, 232; background: linear-gradient(150deg, rgba(101,85,232,.12), var(--panel-strong) 46%); }
.billing-plan-enterprise { --plan-accent: #d79616; --plan-accent-rgb: 215, 150, 22; background: linear-gradient(150deg, rgba(215,150,22,.12), var(--panel-strong) 46%); }
.billing-plan-individual_basic { --plan-accent: #2f9c71; --plan-accent-rgb: 47, 156, 113; background: linear-gradient(150deg, rgba(47,156,113,.10), var(--panel-strong) 46%); }
.billing-plan-individual_pro { --plan-accent: #5f61db; --plan-accent-rgb: 95, 97, 219; background: linear-gradient(150deg, rgba(95,97,219,.12), var(--panel-strong) 46%); }
.billing-plan-family_basic { --plan-accent: #2e9ab2; --plan-accent-rgb: 46, 154, 178; background: linear-gradient(150deg, rgba(46,154,178,.11), var(--panel-strong) 46%); }
.billing-plan-family_pro { --plan-accent: #c38919; --plan-accent-rgb: 195, 137, 25; background: linear-gradient(150deg, rgba(195,137,25,.14), var(--panel-strong) 46%); }

.billing-plan-icon { display: inline-grid; place-items: center; width: 2.35rem; height: 2.35rem; margin-bottom: .65rem; border-radius: .75rem; color: var(--plan-accent); background: rgba(var(--plan-accent-rgb), .13); }
.billing-plan-price { display: flex; align-items: baseline; gap: .35rem; margin: .85rem 0 1rem; color: var(--plan-accent); }
.billing-plan-price strong { font-size: 2rem; line-height: 1; font-weight: 900; letter-spacing: -.04em; }
.billing-plan-price span { color: var(--muted); font-size: .78rem; font-weight: 750; }
.billing-seat-badge { display: inline-flex; align-items: center; gap: .4rem; margin: -.35rem 0 .85rem; padding: .38rem .68rem; border: 1px solid rgba(var(--plan-accent-rgb), .28); border-radius: 999px; color: var(--plan-accent); background: rgba(var(--plan-accent-rgb), .1); font-size: .72rem; font-weight: 850; }
.billing-recommended-badge { display: inline-flex; align-items: center; gap: .35rem; margin: -.3rem 0 .85rem; padding: .35rem .62rem; border-radius: 999px; color: #805b08; background: #fff3c9; font-size: .7rem; font-weight: 850; }
.current-entitlement-bar { --plan-accent: #5874e8; --plan-accent-rgb: 88, 116, 232; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .65rem; padding: .85rem; border: 1px solid rgba(var(--plan-accent-rgb), .28); border-radius: 1rem; background: linear-gradient(135deg, rgba(var(--plan-accent-rgb), .1), rgba(255,255,255,.65)); }
.current-entitlement-bar.billing-plan-basic { --plan-accent: #29a873; --plan-accent-rgb: 41, 168, 115; }
.current-entitlement-bar.billing-plan-pro { --plan-accent: #6555e8; --plan-accent-rgb: 101, 85, 232; }
.current-entitlement-bar.billing-plan-enterprise { --plan-accent: #d79616; --plan-accent-rgb: 215, 150, 22; }
.current-entitlement-bar.billing-plan-individual_basic { --plan-accent: #2f9c71; --plan-accent-rgb: 47, 156, 113; }
.current-entitlement-bar.billing-plan-individual_pro { --plan-accent: #5f61db; --plan-accent-rgb: 95, 97, 219; }
.current-entitlement-bar.billing-plan-family_basic { --plan-accent: #2e9ab2; --plan-accent-rgb: 46, 154, 178; }
.current-entitlement-bar.billing-plan-family_pro { --plan-accent: #c38919; --plan-accent-rgb: 195, 137, 25; }
.current-entitlement-bar > div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: .45rem; min-width: 0; padding: .55rem; border-radius: .75rem; background: rgba(255,255,255,.68); }
.current-entitlement-bar i { grid-row: span 2; color: var(--plan-accent); }
.current-entitlement-bar span { color: var(--muted); font-size: .64rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.current-entitlement-bar strong { color: var(--ink); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; }
body.theme-dark .current-entitlement-bar { background: linear-gradient(135deg, rgba(var(--plan-accent-rgb), .18), rgba(12,18,38,.74)); }
body.theme-dark .current-entitlement-bar > div { background: rgba(16,22,43,.68); }
@media (max-width: 1100px) { .current-entitlement-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 650px) { .current-entitlement-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.billing-plan-action { color: #fff; border-color: var(--plan-accent); background: var(--plan-accent); font-weight: 800; }
.billing-plan-action:hover, .billing-plan-action:focus { color: #fff; border-color: var(--plan-accent); background: var(--plan-accent); filter: brightness(.92); box-shadow: 0 8px 20px rgba(var(--plan-accent-rgb), .25); }

.billing-plan-active {
  border-color: rgba(var(--plan-accent-rgb), .72);
  box-shadow: 0 0 0 2px rgba(var(--plan-accent-rgb), .17), var(--shadow);
}

.plan-price-id {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(20, 93, 255, 0.08);
  color: var(--primary);
  font-weight: 700;
  word-break: break-all;
}

.subscription-comparison-wrap {
  border: 1px solid rgba(78, 111, 245, .2);
  border-radius: 1.15rem;
  overflow: hidden;
  background: rgba(248, 250, 255, .84);
}

.subscription-comparison-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(78, 111, 245, .14);
}

.subscription-comparison-heading h3 { margin: 0 0 .25rem; font-size: 1rem; font-weight: 850; }
.subscription-comparison-heading p { margin: 0; color: #6b7892; font-size: .8rem; }
.subscription-comparison-table { min-width: 760px; }
.subscription-comparison-table th,
.subscription-comparison-table td { padding: .72rem .9rem; font-size: .78rem; border-color: rgba(76, 100, 154, .12); }
.subscription-comparison-table thead th { color: #26385f; background: #edf2ff; font-weight: 850; white-space: nowrap; }
.subscription-comparison-table tbody th { color: #26334e; font-weight: 780; width: 28%; }
.subscription-comparison-table td { color: #5c6981; }
.subscription-comparison-table td .fa-check { color: #65b83d; margin-right: .25rem; }
.subscription-comparison-note { padding: .85rem 1.15rem; color: #6a7285; background: rgba(255, 247, 224, .7); font-size: .74rem; }
body.theme-dark .subscription-comparison-wrap { background: rgba(12, 18, 38, .76); border-color: rgba(130, 112, 255, .32); }
body.theme-dark .subscription-comparison-heading { border-color: rgba(150, 137, 255, .2); }
body.theme-dark .subscription-comparison-heading p,
body.theme-dark .subscription-comparison-table td { color: #b5bdd0; }
body.theme-dark .subscription-comparison-table thead th { color: #f4f5ff; background: #171d35; }
body.theme-dark .subscription-comparison-table tbody th { color: #edf0ff; }
body.theme-dark .subscription-comparison-note { color: #d2c89f; background: rgba(116, 86, 13, .16); }

.billing-information-panel { border-color: rgba(70, 103, 183, .18); }
.billing-info-tile { display: flex; gap: .8rem; height: 100%; padding: 1rem; border: 1px solid rgba(77, 109, 187, .15); border-radius: 1rem; background: linear-gradient(135deg, rgba(239,245,255,.9), rgba(255,255,255,.78)); }
.billing-info-icon { display: grid; place-items: center; flex: 0 0 auto; width: 2.5rem; height: 2.5rem; border-radius: .8rem; color: #317a62; background: rgba(50,169,119,.14); }
.billing-info-icon-ai { color: #536de1; background: rgba(83,109,225,.14); }
.billing-info-tile h3, .billing-add-on-wrap h3, .billing-protection-grid h3 { margin: 0 0 .25rem; color: var(--ink); font-size: .92rem; font-weight: 850; }
.billing-info-tile p, .billing-add-on-wrap p { margin: 0; color: var(--muted); font-size: .79rem; line-height: 1.5; }
.billing-add-on-wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; padding: 1rem; border: 1px solid rgba(205,157,38,.28); border-radius: 1rem; background: linear-gradient(135deg, rgba(255,248,222,.9), rgba(255,255,255,.86)); }
.billing-add-on-grid { display: grid; grid-template-columns: repeat(3, minmax(88px, 1fr)); gap: .55rem; min-width: 310px; }
.billing-add-on-grid > div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: .28rem; padding: .55rem .65rem; border: 1px solid rgba(201,151,29,.22); border-radius: .72rem; background: rgba(255,255,255,.76); }
.billing-add-on-grid strong { color: #9b6c08; font-size: 1.12rem; }.billing-add-on-grid span { color: var(--muted); font-size: .67rem; font-weight: 700; }.billing-add-on-grid b { grid-column: 1 / -1; color: var(--ink); font-size: .78rem; }
.billing-protection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }.billing-protection-grid > div { padding: 1rem; border-radius: 1rem; background: rgba(84,103,149,.055); }.billing-protection-grid h3 { font-size: .86rem; }.billing-protection-grid .settings-notes { font-size: .76rem; line-height: 1.48; }.billing-policy-note { margin-top: 1rem; color: var(--muted); font-size: .73rem; }
body.theme-dark .billing-info-tile { background: linear-gradient(135deg, rgba(27,40,71,.94), rgba(17,25,46,.8)); border-color: rgba(146,165,228,.2); } body.theme-dark .billing-add-on-wrap { background: linear-gradient(135deg, rgba(82,62,17,.3), rgba(20,28,49,.8)); } body.theme-dark .billing-add-on-grid > div, body.theme-dark .billing-protection-grid > div { background: rgba(21,31,55,.78); } body.theme-dark .billing-recommended-badge { color: #f9d86d; background: rgba(128,91,8,.35); }
@media (max-width: 900px) { .billing-add-on-wrap { align-items: stretch; flex-direction: column; }.billing-add-on-grid { min-width: 0; width: 100%; }.billing-protection-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .billing-add-on-grid { grid-template-columns: 1fr; }.billing-add-on-grid > div { grid-template-columns: auto 1fr auto; }.billing-add-on-grid b { grid-column: auto; } }

.billing-gate-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(242, 193, 78, 0.22);
  background: linear-gradient(135deg, rgba(242, 193, 78, 0.18), rgba(255, 122, 24, 0.12));
  box-shadow: var(--shadow);
}

.billing-gate-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.24);
  font-size: 1.15rem;
}

.billing-gate-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.billing-gate-title {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 4px;
}

.billing-gate-copy p {
  color: var(--muted);
  line-height: 1.55;
}

.billing-gate-banner .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

body.theme-dark .billing-gate-banner {
  border-color: rgba(242, 193, 78, 0.24);
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.2), rgba(255, 122, 24, 0.16));
}

body.theme-dark .billing-gate-icon {
  background: rgba(2, 6, 23, 0.32);
}

.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-exam-version-control {
  display: grid;
  gap: 3px;
  min-width: 150px;
  color: #63718c;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dashboard-exam-version-control .form-select {
  min-height: 32px;
  border-color: #d7e0fa;
  color: #263958;
  font-size: .75rem;
  font-weight: 700;
}

.hero-exam-version-control {
  grid-template-columns: auto auto;
  align-items: center;
  min-width: 0;
  gap: 6px;
  padding: .22rem .5rem;
  border: 1px solid rgba(65, 105, 238, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
}

.hero-exam-version-control .form-select {
  min-height: 27px;
  width: 110px;
  padding-top: .15rem;
  padding-bottom: .15rem;
  border: 0;
  background-color: transparent;
}

.glossary-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(20, 93, 255, 0.04);
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.glossary-item:hover,
.glossary-item.active {
  transform: translateY(-2px);
  border-color: rgba(25, 194, 255, 0.4);
  background: rgba(25, 194, 255, 0.11);
}

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

.glossary-item-metrics {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  text-align: right;
}

.glossary-item-percent {
  font-weight: 700;
}

.glossary-item-count {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.glossary-item-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}

.glossary-item-performance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(20, 93, 255, .1);
  font-size: .72rem;
  font-weight: 800;
}

.glossary-item-accuracy,
.glossary-item-improvement {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.glossary-item-accuracy { color: #2872dd; }
.glossary-item-improvement.good { color: #1d9850; }
.glossary-item-improvement.practice { color: #bc7900; }
.glossary-item-improvement.priority { color: #d13b45; }

.glossary-unpracticed-link,
.glossary-practice-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2866de;
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
}

.glossary-unpracticed-link { margin-top: 7px; }
.glossary-practice-link { color: #168447; }
.glossary-unpracticed-link:hover,
.glossary-practice-link:hover { text-decoration: underline; }
.glossary-item-actions { margin-top: 9px; }

.glossary-literacy-list { margin-top: 10px; }
.glossary-literacy-item { cursor: default; }
.glossary-literacy-item:hover { transform: none; }
.glossary-literacy-icon { margin-right: 7px; color: #2d73e5; }
.glossary-literacy-icon.writing { color: #168447; }

.exam-readiness-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-color: rgba(56, 104, 255, .2);
  background: linear-gradient(135deg, #ffffff, #f5f8ff);
}

.exam-english-options { min-width: 230px; }
.exam-english-options .form-check {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 1.6rem;
  padding-left: 0;
}
.exam-english-options .form-switch .form-check-input {
  flex: 0 0 auto;
  float: none;
  width: 2.65rem;
  height: 1.42rem;
  margin: 0;
  border: 2px solid #5075f6;
  border-radius: 999px;
  opacity: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: radial-gradient(circle at .58rem 50%, #5075f6 0, #5075f6 .37rem, transparent .4rem);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: inset 0 1px 2px rgba(23, 45, 91, .1);
  transition: background-color .18s ease, background-image .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.exam-english-options .form-switch .form-check-input:checked {
  border-color: #4169f5;
  background-color: #4169f5;
  background-image: radial-gradient(circle at calc(100% - .58rem) 50%, #fff 0, #fff .37rem, transparent .4rem);
}
.exam-english-options .form-switch .form-check-input:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 .22rem rgba(65, 105, 245, .24);
}
.exam-english-options .form-check-label {
  display: inline-flex;
  align-items: center;
  gap: .18rem;
  color: #263655;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
}
.exam-english-options .form-check-label::after {
  content: "Off";
  margin-left: .22rem;
  padding: .08rem .38rem;
  border-radius: 999px;
  color: #66748e;
  background: #edf1f8;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.exam-english-options .form-check-input:checked + .form-check-label::after {
  content: "On";
  color: #206c3b;
  background: #e5f6e9;
}
body.theme-dark .exam-english-options .form-check-label { color: #edf4ff; }
body.theme-dark .exam-english-options .form-check-label::after { color: #c8d3e7; background: #27334a; }
body.theme-dark .exam-english-options .form-check-input:checked + .form-check-label::after { color: #a9efbd; background: #173d2a; }
.exam-english-panel { margin-top: 1rem; padding: 1rem; border: 1px solid #d8e4ff; border-radius: 16px; background: linear-gradient(135deg, #f8faff, #fff); }
.exam-english-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .85rem; }
.exam-english-heading span { display: block; color: #5972a7; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.exam-english-heading h4 { margin: .12rem 0; color: #182746; font-size: 1.05rem; }
.exam-english-heading p { margin: 0; color: #6f7d96; font-size: .8rem; }
.exam-english-heading > i { display: grid; place-items: center; width: 37px; height: 37px; color: #4169f5; background: #eaf0ff; border-radius: 12px; }
.exam-english-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.exam-literacy-card { border: 1px solid #dce6ff; border-radius: 13px; padding: .85rem; background: #fff; min-width: 0; }
.exam-literacy-card-title { display: flex; align-items: center; gap: .45rem; color: #213253; font-size: .86rem; }
.exam-literacy-card-title > i { color: #4b73f5; }.exam-literacy-card:nth-child(2) .exam-literacy-card-title > i { color: #2f9555; }
.exam-literacy-card-title .btn { margin-left: auto; font-size: .69rem; padding: .22rem .42rem; }
.exam-literacy-card > p { margin: .48rem 0; color: #72809a; font-size: .76rem; line-height: 1.35; }
.exam-literacy-prompt { min-height: 48px; padding: .66rem .72rem; border: 1px solid #dce5ff; border-radius: 10px; color: #263859; background: #f6f8ff; font-size: .88rem; font-weight: 700; }
.exam-literacy-feedback { display: flex; gap: .4rem; align-items: flex-start; margin-top: .65rem; padding: .55rem .65rem; border-radius: 10px; font-size: .76rem; }.exam-literacy-feedback.passed { color: #277b43; background: #eef9ee; border: 1px solid #c9ebcf; }.exam-literacy-feedback.review { color: #986709; background: #fff7e6; border: 1px solid #f1d69a; }
.exam-english-note { margin: .75rem 0 0; color: #71809a; font-size: .72rem; }
@media (max-width: 760px) { .exam-english-grid { grid-template-columns: 1fr; } }

/* The learner report follows the Topic Distribution chart on the dashboard. */
.topic-distribution-panel > .topic-readiness-panel {
  width: 100%;
  margin-top: 2px;
  padding: 13px;
  border-radius: 16px;
  box-shadow: none;
}

.topic-distribution-panel > .topic-readiness-panel .panel-head h2 {
  font-size: 1rem;
}

.topic-distribution-panel > .topic-readiness-panel .panel-head p {
  font-size: .78rem;
}

/* Reading and Writing practice */
.literacy-hero{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;margin-bottom:1.25rem;padding:1.5rem}.literacy-hero h1{font-size:1.75rem;margin:.55rem 0}.literacy-hero p{max-width:720px;margin:0;color:var(--text-secondary,#6d7892)}.literacy-hero-actions{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;justify-content:flex-end}.literacy-voice-control{display:flex;align-items:center;gap:.45rem;margin:0;color:#576780;font-size:.78rem;font-weight:800}.literacy-voice-control i{color:#4d73e8}.literacy-voice-control .form-select{width:168px;min-height:38px;font-size:.82rem}.literacy-progress-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin-bottom:1.25rem}.literacy-progress-card{border:1px solid #dfe6fb;border-radius:18px;background:#fff;padding:1.15rem;display:grid;grid-template-columns:auto 1fr;column-gap:.75rem;align-items:center;box-shadow:0 8px 24px rgba(28,51,97,.05)}.literacy-progress-card i{grid-row:span 2;width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#eef3ff;color:#4264ff}.literacy-progress-card.writing i{background:#ecf9ed;color:#319b59}.literacy-progress-card.status i{background:#fff7dd;color:#b38100}.literacy-progress-card span,.literacy-progress-card small{color:#71809d;font-size:.8rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.literacy-progress-card strong{font-size:1.2rem;color:#1d2a48}.literacy-practice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem}.literacy-practice-card{padding:1.5rem}.literacy-practice-card>p{color:#6d7892;min-height:42px}.literacy-prompt{border:1px solid #dbe5ff;background:linear-gradient(135deg,#f3f6ff,#fff);border-radius:14px;padding:1.1rem;font-size:1.15rem;font-weight:700;color:#1f3155;margin:1rem 0}.literacy-feedback{margin-top:1rem;border-radius:12px;padding:.9rem 1rem;display:flex;gap:.5rem;align-items:center}.literacy-feedback.passed{background:#eef9ee;color:#277c42;border:1px solid #c8ebcc}.literacy-feedback.review{background:#fff7e6;color:#946509;border:1px solid #f3d89a}.literacy-note{color:#77839c;font-size:.85rem;margin:1rem 0}@media(max-width:900px){.literacy-progress-grid,.literacy-practice-grid{grid-template-columns:1fr}.literacy-hero{align-items:flex-start;flex-direction:column}.literacy-hero-actions{justify-content:flex-start}}

.literacy-next,
.exam-literacy-next {
  border: 1px solid #4169ee;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #4169ee, #19a7e8);
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.literacy-next:hover,
.exam-literacy-next:hover {
  color: #fff;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(65, 105, 238, .24);
}

.exam-readiness-panel .panel-head {
  margin-bottom: 0;
  gap: 10px;
}

.exam-readiness-panel .panel-head h2 { font-size: 1.08rem; margin-bottom: 4px; }
.exam-readiness-panel .panel-head p { margin-bottom: 0; font-size: .84rem; line-height: 1.45; }

.readiness-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.readiness-head-actions .btn {
  min-height: 34px;
  padding: .35rem .58rem;
  font-size: .74rem;
  line-height: 1.2;
}

.readiness-literacy-summary {
  display: grid;
  gap: 8px;
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid #dce5fb;
}

.readiness-literacy-summary .panel-head {
  margin: 0;
}

.flashcard-report-stat.correct span,
.flashcard-report-stat.wrong span {
  font-size: 0;
}

.flashcard-report-stat.correct span::after,
.flashcard-report-stat.wrong span::after {
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.flashcard-report-stat.correct span::after { content: "At / above 60%"; }
.flashcard-report-stat.wrong span::after { content: "Below 60%"; }

.literacy-dashboard-panel { padding: 1.25rem; }
.literacy-dashboard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.literacy-dashboard-stats > div { border: 1px solid #e0e7f8; border-radius: 13px; padding: .75rem; display: grid; grid-template-columns: auto 1fr; column-gap: .5rem; align-items: center; }
.literacy-dashboard-stats i { color: #5480ef; grid-row: span 2; }
.literacy-dashboard-stats span { font-size: .74rem; text-transform: uppercase; color: #78849d; font-weight: 700; }
.literacy-dashboard-stats strong { font-size: 1.08rem; color: #1b2945; }
.literacy-dashboard-stats small { grid-column: 2; color: #78849d; font-size: .64rem; font-weight: 700; }

.literacy-pass-chart {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dce5fb;
  border-radius: 14px;
  background: rgba(255, 255, 255, .64);
}

.literacy-pass-chart-head,
.literacy-pass-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.literacy-pass-chart-head strong { color: #263958; font-size: .8rem; }
.literacy-pass-chart-head span { color: #5572b2; font-size: .68rem; font-weight: 800; }
.literacy-pass-row { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 16px; align-items: center; }
.literacy-pass-label { display: grid; grid-template-columns: 14px 4.5rem 6ch; gap: 8px; white-space: nowrap; color: #52617e; font-size: .72rem; font-weight: 750; }
.literacy-pass-label i { color: #5480ef; width: 14px; text-align: center; }
.literacy-pass-row:nth-of-type(3) .literacy-pass-label i { color: #319b59; }
.literacy-pass-label strong { margin-left: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: #263958; font-size: .72rem; }
@media (max-width: 480px) {
  .literacy-pass-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .literacy-pass-label { grid-template-columns: 14px minmax(0, 1fr) max-content; }
}
.literacy-pass-track { position: relative; height: 10px; overflow: visible; border-radius: 999px; background: #e7edff; }
.literacy-pass-track::after { content: ""; position: absolute; z-index: 2; top: -3px; bottom: -3px; left: 60%; width: 2px; border-radius: 2px; background: #d5a22f; box-shadow: 0 0 0 1px rgba(255, 255, 255, .76); }
.literacy-pass-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4169ee, #65b5ff); transition: width .5s ease; }
.literacy-pass-track.writing span { background: linear-gradient(90deg, #269b63, #68c98c); }
.literacy-pass-chart p { margin: 0; color: #78849d; font-size: .66rem; line-height: 1.35; }
@media (max-width: 700px) { .literacy-dashboard-stats { grid-template-columns: 1fr; } }

@media (max-width: 760px) {
  .readiness-head-actions { justify-content: flex-start; width: 100%; }
  .readiness-head-actions .btn { flex: 1 1 0; }
}

.exam-readiness-content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 74px;
}

.exam-readiness-score {
  display: grid;
  place-items: center;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border: 6px solid #dce6ff;
  border-top-color: #426cff;
  border-radius: 50%;
  color: #1748d2;
  font-size: .94rem;
  font-weight: 900;
  letter-spacing: -.04em;
}

.exam-readiness-content strong {
  display: block;
  color: var(--ink);
  font-size: .98rem;
}

.exam-readiness-content p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .81rem;
  line-height: 1.45;
}

/* Readiness is already shown beside Topic Distribution. Hide the former
   duplicate progress shell so it cannot leave an empty panel-sized gap before
   Practice & Exam Records. */
.exam-readiness-progress-panel { display: none; }
.exam-records-panel.mt-4 { margin-top: 14px !important; }
.exam-readiness-progress-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.exam-readiness-progress-head h2 { margin: 0; color: var(--text); font-size: 1.05rem; }
.exam-readiness-progress-head h2 i { color: #f2b84b; }
.exam-readiness-progress-head p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.exam-readiness-progress-head strong { color: #4169ee; font-size: 1.35rem; line-height: 1; }
.exam-readiness-progress-track { height: 12px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--border) 60%, transparent); }
.exam-readiness-progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4169ee, #19c2ff, #f2b84b); transition: width .6s ease; }
.exam-readiness-literacy-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 9px; color: var(--muted); font-size: .74rem; }
.exam-readiness-literacy-meta span { display: inline-flex; align-items: center; gap: 5px; }
.exam-readiness-literacy-meta i { color: #5480ef; }
.exam-readiness-literacy-meta span:nth-child(2) i { color: #319b59; }
.exam-readiness-literacy-meta strong { color: var(--text); }

.exam-readiness-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flashcard-report-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 3px;
}

.flashcard-report-stat,
.flashcard-report-list {
  border: 1px solid #dce5fb;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
}

.flashcard-report-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 7px;
  align-items: center;
  padding: 7px 9px;
}

.flashcard-report-stat i { grid-row: span 2; color: #496ff5; font-size: 1rem; }
.flashcard-report-stat span { color: #74819a; font-size: .67rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.flashcard-report-stat strong { color: #182746; font-size: .98rem; line-height: 1; }
.flashcard-report-stat.correct i { color: #25864e; }
.flashcard-report-stat.wrong i { color: #cf4c5a; }
.flashcard-report-stat.literacy i { color: #a97700; }

.flashcard-report-list {
  grid-column: span 2;
  min-width: 0;
  padding: 9px 11px;
  display: grid;
  gap: 3px;
}

.flashcard-report-list strong { color: #9d383d; font-size: .75rem; }
.flashcard-report-list.uncovered strong { color: #2764d6; }
.flashcard-report-list span { color: #64718b; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flashcard-report-details.is-unavailable { display: none; }

@media (max-width: 640px) {
  .exam-readiness-content { align-items: flex-start; }
  .exam-readiness-score { flex-basis: 70px; width: 70px; height: 70px; font-size: .92rem; }
  .flashcard-report-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flashcard-report-list { grid-column: span 2; }
}

@keyframes goldenPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 190, 69, 0.42); }
  70% { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(255, 190, 69, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 190, 69, 0); }
}

@keyframes voiceWave {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1.5); }
}

@keyframes smartPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(25, 194, 255, 0.28); transform: translateY(0); }
  50% { box-shadow: 0 0 0 12px rgba(25, 194, 255, 0); transform: translateY(-1px); }
}

@keyframes smartDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(1.5vw, 1vw, 0) scale(1.06); }
}

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

@keyframes headerLogoDrift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

@keyframes brandShimmer {
  0%, 100% {
    background-position: 0% 50%;
    box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.12);
  }
  50% {
    background-position: 100% 50%;
    box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.22);
  }
}

@keyframes titleGlow {
  0%, 100% {
    text-shadow: 0 0 18px rgba(242, 193, 78, 0.12);
    transform: translateY(0);
  }
  50% {
    text-shadow: 0 0 24px rgba(242, 193, 78, 0.24);
    transform: translateY(-1px);
  }
}

@keyframes heroTitleLift {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroTitleShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.voice-popup {
  position: fixed;
  right: 24px;
  bottom: 70px;
  width: auto;
  z-index: 60;
  padding: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.voice-popup.hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.voice-popup-card {
  width: min(560px, calc(100vw - 32px));
  border-radius: 24px;
  padding: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  resize: both;
  overflow: auto;
  min-width: 360px;
  min-height: 280px;
  max-width: calc(100vw - 24px);
  max-height: 80vh;
}

.voice-popup-label {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.voice-popup-state {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
}

.voice-popup-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-basis: 100%;
  margin: 2px 0 0;
}

.voice-popup-progress span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #dfe7f7;
  border-radius: 999px;
  background: #f8fbff;
  color: #70809b;
  font-size: .69rem;
  font-weight: 750;
}

.voice-popup-progress i { color: #4775e9; }
.voice-popup-progress span:nth-child(1) i { color: #22a353; }
.voice-popup-progress span:nth-child(2) i { color: #c58a13; }
.voice-popup-progress strong { color: #17233d; font-weight: 900; }
.voice-popup-progress .voice-popup-left-pill { gap: 5px; }
.voice-popup-progress #voicePopupTimer { display: inline-flex; align-items: center; gap: 4px; margin-left: 3px; padding-left: 7px; border-left: 1px solid #d9e2f3; color: #4169ee; font-size: .69rem; font-weight: 900; }
.voice-popup-progress #voicePopupTimer i { color: #7ac943; font-size: .66rem; }
.voice-popup-progress .voice-popup-left-pill.timer-warning { border-color: rgba(255, 190, 69, .65); background: rgba(255, 190, 69, .09); }
.voice-popup-progress .voice-popup-left-pill.timer-critical { border-color: rgba(239, 68, 68, .7); background: rgba(239, 68, 68, .08); }
.voice-popup-progress .voice-popup-left-pill.timer-critical #voicePopupTimer { color: #dc2626; }

.voice-popup-pass-progress {
  flex-basis: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(71, 117, 233, .2);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(239, 244, 255, .96), rgba(250, 252, 255, .96));
}

.voice-popup-pass-progress-head,
.voice-popup-pass-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.voice-popup-pass-progress-head {
  margin-bottom: 6px;
  color: #52627d;
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.voice-popup-pass-progress-head i { margin-right: 4px; color: #d8a323; }
.voice-popup-pass-progress-head strong { color: #315bea; font-size: .78rem; letter-spacing: 0; }

.voice-popup-pass-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7f7;
}

.voice-popup-pass-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4775e9, #68bfea, #7ac943);
  transition: width .45s ease;
}

.voice-popup-pass-progress-meta {
  margin-top: 5px;
  color: #71809b;
  font-size: .66rem;
}

.voice-popup-pass-progress-meta strong { color: #253653; }
.voice-popup-pass-progress.target-reached { border-color: rgba(75, 169, 76, .4); background: rgba(238, 250, 238, .96); }
.voice-popup-pass-progress.target-reached .voice-popup-pass-progress-head strong,
.voice-popup-pass-progress.target-reached .voice-popup-pass-progress-meta strong { color: #328241; }
.voice-popup-pass-progress.target-failed { border-color: rgba(211, 63, 73, .42); background: rgba(255, 242, 243, .97); }
.voice-popup-pass-progress.target-failed .voice-popup-pass-progress-head strong,
.voice-popup-pass-progress.target-failed .voice-popup-pass-progress-meta strong { color: #b82f3a; }
.voice-popup-pass-progress.target-failed .voice-popup-pass-track > span {
  background: linear-gradient(90deg, #d34b55, #ed8a73);
}

.result-structured-details {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(49, 85, 157, .14);
}

.result-structured-head { display: flex; align-items: center; gap: 8px; text-transform: capitalize; color: #263653; }
.result-structured-details > div > span { display: block; margin-bottom: 2px; color: #71809b; font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.result-structured-details p { margin: 0; color: #263653; font-size: .82rem; line-height: 1.45; }
.result-structured-details .accepted-answer { color: #16823e; font-weight: 750; }

.voice-activity {
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 34px;
  margin: 14px 0 16px;
}

.voice-activity span {
  display: block;
  width: 8px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #19c2ff, #0bb8a8);
  transform-origin: bottom center;
  opacity: 0.35;
}

.voice-popup.speaking .voice-activity span,
.voice-popup.listening .voice-activity span {
  animation: voiceWave 0.9s ease-in-out infinite;
  opacity: 1;
}

.voice-popup.speaking .voice-activity span:nth-child(2),
.voice-popup.listening .voice-activity span:nth-child(2) {
  animation-delay: 0.08s;
}

.voice-popup.speaking .voice-activity span:nth-child(3),
.voice-popup.listening .voice-activity span:nth-child(3) {
  animation-delay: 0.16s;
}

.voice-popup.speaking .voice-activity span:nth-child(4),
.voice-popup.listening .voice-activity span:nth-child(4) {
  animation-delay: 0.24s;
}

.voice-popup.listening .voice-activity span {
  background: linear-gradient(180deg, #22c55e, #84cc16);
}

.voice-popup-spoken {
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 18px;
  line-height: 1.35;
}

/* Exam Mode is voice-first: do not disclose profile or civics prompts on
   screen. Reading and Writing intentionally clear this state so their
   database sentences and input controls remain visible. */
.voice-popup.exam-voice-only .voice-popup-spoken,
.voice-popup.exam-voice-only .voice-popup-user-answer,
.voice-popup.exam-voice-only .voice-popup-answer,
.voice-popup.exam-voice-only .voice-popup-explanation,
.voice-popup.exam-voice-only .voice-popup-translated,
.voice-popup.exam-voice-only #voicePopupTranslatedLabel,
.voice-popup.exam-voice-only .voice-popup-metrics {
  display: none !important;
}

.exam-voice-only-hidden {
  display: none !important;
}

body.exam-live-overlays-suppressed .interview-page .live-overlay {
  display: none !important;
}

/* During a live exam, the simulator is still present for accessibility and
   recovery, but it should not compete with the voice-first exam console. */
body.exam-live-overlays-suppressed .interview-page {
  filter: blur(7px) saturate(.76);
  opacity: .28;
  pointer-events: none;
  user-select: none;
  transition: filter .22s ease, opacity .22s ease;
}

/* A compact welcome card is shown whenever the learner opens Exam Mode. */
.voice-popup.exam-welcome { isolation: isolate; }
.voice-popup.exam-welcome::before { content: ""; position: fixed; z-index: -1; inset: -100vmax; background: rgba(223, 234, 249, .32); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.voice-popup.exam-welcome .voice-popup-card { display: flex; flex-direction: column; width: min(520px, calc(100vw - 28px)); min-width: 0; padding: 22px; border-color: rgba(107, 157, 255, .42); background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(245,249,255,.98)); box-shadow: 0 24px 70px rgba(23, 54, 111, .22); }
.voice-popup.exam-welcome .voice-popup-progress,
.voice-popup.exam-welcome .voice-popup-pass-progress,
.voice-popup.exam-welcome .voice-popup-user-answer,
.voice-popup.exam-welcome .voice-popup-answer,
.voice-popup.exam-welcome .voice-popup-explanation,
.voice-popup.exam-welcome .voice-popup-translated,
.voice-popup.exam-welcome #voicePopupTranslatedLabel,
.voice-popup.exam-welcome .voice-popup-metrics,
.voice-popup.exam-welcome .exam-office-scene { display: none !important; }
.voice-popup-practice-notice {
  order: 0;
  margin: 0 42px 16px 0;
  color: #667383;
  font-size: .8rem;
  line-height: 1.5;
  font-weight: 400;
}
.voice-popup.exam-welcome .voice-popup-card {
  width: min(770px, calc(100vw - 24px));
  min-height: min(505px, calc(100dvh - 24px));
  padding: 28px 22px;
}
.voice-popup.exam-welcome .voice-popup-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding-right: 0;
}
.voice-popup.exam-welcome .voice-popup-actions {
  justify-content: center;
  gap: 8px;
  margin: 0 0 28px;
}
.voice-popup.exam-welcome .exam-credit-status {
  margin-top: 16px;
  margin-bottom: 34px;
  font-size: .78rem;
}
.voice-popup #popupExitBtn i { color: #fff; }
body.theme-dark .voice-popup:not(.exam-welcome) .voice-popup-practice-notice { color: #c5cfdf; }
@media (max-width: 480px) {
  .voice-popup.exam-welcome .voice-popup-card { padding: 20px 14px; }
  .voice-popup.exam-welcome .voice-popup-actions { gap: 6px; margin-bottom: 12px; }
  .voice-popup-practice-notice { font-size: .75rem; }
}
.exam-welcome-identity { display: none; }
.voice-popup.exam-welcome .voice-popup-top { order: 1; }
.voice-popup.exam-welcome .voice-activity { order: 2; }
.voice-popup.exam-welcome .voice-popup-spoken { order: 3; }
.voice-popup.exam-welcome .exam-welcome-identity { order: 4; display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px auto 0; padding: 15px 20px; border: 1px solid rgba(61, 101, 223, .2); border-radius: 16px; background: linear-gradient(135deg, rgba(238, 246, 255, .98), rgba(255, 250, 230, .96)); box-shadow: 0 8px 24px rgba(36, 79, 157, .09); }
.exam-welcome-flag { position: relative; display: block; width: 58px; height: 40px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(26, 46, 88, .2); border-radius: 5px; background: repeating-linear-gradient(to bottom, #b22234 0 3px, #fff 3px 6px); box-shadow: 0 6px 14px rgba(22, 43, 79, .22); animation: examWelcomeFlagWave 3s ease-in-out infinite; }
.exam-welcome-flag > span { position: absolute; inset: 0 auto auto 0; width: 46%; height: 54%; background-color: #3c3b6e; background-image: radial-gradient(circle, #fff 0 1px, transparent 1.3px); background-size: 6px 6px; }
.exam-welcome-copy { display: grid; gap: 3px; text-align: left; }
.exam-welcome-copy strong { color: #1f3d85; font: 800 .94rem/1.2 Poppins, Inter, sans-serif; letter-spacing: -.018em; }
.exam-welcome-copy small { color: #6a7895; font: 650 .68rem/1.2 Inter, sans-serif; }
@keyframes examWelcomeFlagWave { 0%, 100% { transform: perspective(80px) rotateY(0deg) translateY(0); } 50% { transform: perspective(80px) rotateY(-12deg) translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .voice-popup.exam-voice-only.speaking .exam-office-photo, .voice-popup.exam-voice-only.speaking .exam-officer-expression, .voice-popup.exam-voice-only.speaking .exam-officer-gesture, .voice-popup.exam-ready-to-start #popupStartBtn, .voice-popup.exam-ready-to-start .exam-start-cue, .voice-popup.speaking .voice-popup-card, .voice-popup.exam-voice-only.speaking .exam-office-scene { animation: none; } }
.voice-popup.exam-welcome .voice-popup-spoken { margin: 15px 0 0; text-align: center; color: #2553bc; font-size: 1.16rem; }
.voice-popup.exam-welcome .voice-activity { justify-content: center; margin: 14px 0 0; }
.exam-start-cue { display: none; align-items: center; gap: .34rem; margin-left: -.15rem; color: #dce9ff; font: 800 .66rem/1 Inter, sans-serif; letter-spacing: .02em; white-space: nowrap; text-transform: uppercase; }
.exam-start-cue i { color: #b9ee69; }
.voice-popup.exam-ready-to-start #popupStartBtn { position: relative; overflow: visible; animation: examStartButtonPulse 1.45s ease-in-out infinite; }
.voice-popup.exam-ready-to-start .exam-start-cue { display: inline-flex; animation: examStartCueBlink 1.45s ease-in-out infinite; }

.settings-default-note { display: flex; align-items: flex-start; gap: .7rem; margin: 0 0 1rem; padding: .8rem 1rem; border: 1px solid #d9e2ff; border-radius: .8rem; background: linear-gradient(110deg, #f5f8ff, #fbfcff); color: #55647f; font-size: .86rem; line-height: 1.45; }
.settings-default-note i { margin-top: .12rem; color: #4669ee; }
.settings-default-note strong { color: #1f315a; }
.system-default-setting { position: relative; }
.system-default-setting::after { content: "System default"; position: absolute; top: -.25rem; right: 0; padding: .14rem .45rem; border-radius: 999px; background: #edf2ff; color: #5269bd; font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.system-default-setting .form-select:disabled, .system-default-setting .form-check-input:disabled { opacity: .8; cursor: not-allowed; }

/* Keep the study deck compact: the question stays prominent without pushing
   the controls below the fold on a standard laptop screen. */
body.section-dashboard .flashcard-language-label { font-size: .68rem; }
body.section-dashboard .flashcard-tag { padding: 6px 10px; font-size: .64rem; }
body.section-dashboard .flashcard-question { font-size: clamp(.92rem, 1.02vw, 1.08rem); }
body.section-dashboard .flashcard-translation-text { font-size: clamp(.84rem, .9vw, .96rem); }
body.section-dashboard .flashcard-front-hint, body.section-dashboard .flashcard-back-hint { font-size: .72rem; }
body.section-dashboard .flashcard-toolbar-row-playback .btn { min-height: 34px; padding: .34rem .58rem; font-size: .74rem; }
@keyframes examStartButtonPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(65,105,238,.2); } 50% { box-shadow: 0 0 0 8px rgba(65,105,238,.13), 0 8px 16px rgba(65,105,238,.24); } }
@keyframes examStartCueBlink { 0%, 100% { opacity: .52; } 50% { opacity: 1; } }
@keyframes examStartPointer { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-5px,-5px) scale(1.12); } }
@media (max-width: 760px) { .exam-start-cue { display: none !important; } }

/* Square, voice-first Exam Mode office scene. */
.exam-office-scene { display: none; }
.voice-popup.exam-voice-only .voice-popup-card {
  width: min(760px, calc(100vw - 32px));
  min-width: 0;
  min-height: 640px;
  max-height: 90dvh;
  padding: 18px;
  overflow: hidden;
  background: linear-gradient(155deg, #07162d 0%, #132f50 55%, #0a1d35 100%);
  border-color: rgba(108, 229, 255, .58);
  box-shadow: 0 24px 60px rgba(3, 14, 34, .4), inset 0 0 0 1px rgba(255,255,255,.07);
}
.voice-popup.exam-voice-only .voice-popup-top { position: relative; z-index: 3; }
.voice-popup.exam-voice-only::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: -100vmax;
  background: rgba(233, 241, 251, .46);
  backdrop-filter: blur(10px) saturate(.88);
  -webkit-backdrop-filter: blur(10px) saturate(.88);
  pointer-events: none;
}
.voice-popup.exam-voice-only .voice-popup-progress,
.voice-popup.exam-voice-only .voice-popup-pass-progress { display: none; }
.voice-popup.exam-voice-only .voice-popup-label,
.voice-popup.exam-voice-only .voice-popup-state,
.voice-popup.exam-voice-only .voice-popup-mode-badge { color: #e8f5ff; }
.voice-popup.exam-voice-only .voice-popup-mode-badge { background: rgba(244, 193, 58, .17); border-color: rgba(255, 220, 115, .45); }
.voice-popup.exam-voice-only .exam-office-scene {
  position: relative;
  display: block;
  height: 530px;
  margin: 12px 0 0;
  overflow: hidden;
  border: 1px solid rgba(190, 234, 255, .25);
  border-radius: 20px;
}
.exam-office-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.exam-office-shade { position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg, rgba(2, 19, 42, .04) 40%, rgba(2, 18, 43, .54) 100%); }
.exam-officer-expression { position: absolute; z-index: 2; left: 64.3%; top: 38.8%; width: 18px; height: 6px; border-bottom: 2px solid rgba(73, 36, 38, .38); border-radius: 0 0 50% 50%; opacity: .42; transform-origin: center; transition: opacity .2s ease; }
.exam-officer-expression i { display: block; width: 100%; height: 100%; border-radius: 50%; }
.exam-officer-gesture { position: absolute; z-index: 3; left: 60.5%; top: 60%; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: rgba(255,255,255,.88); background: rgba(24, 49, 83, .56); box-shadow: 0 4px 12px rgba(2, 14, 35, .24); font-size: .72rem; opacity: 0; transform: translateY(6px) rotate(-12deg); }
.exam-office-nameplate { position: absolute; z-index: 4; right: 20px; bottom: 76px; padding: 5px 9px; border-radius: 3px; color: #fff3cd; background: rgba(17, 32, 54, .82); box-shadow: 0 2px 0 rgba(0,0,0,.28); font: 800 .48rem/1 Inter, sans-serif; letter-spacing: .08em; }
.exam-office-live { position: absolute; z-index: 4; left: 50%; bottom: 29px; display: inline-flex; align-items: center; gap: 8px; transform: translateX(-50%); padding: 8px 14px; border: 1px solid rgba(184,241,255,.5); border-radius: 999px; color: #effcff; background: rgba(2, 26, 57, .7); font: 800 .72rem/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.exam-office-live i { color: #78e1f4; animation: officeMicPulse 1.1s ease-in-out infinite; }
.voice-popup.exam-voice-only .voice-activity { position: absolute; z-index: 5; left: 50%; bottom: 86px; width: 160px; margin: 0; transform: translateX(-50%); justify-content: center; }
.voice-popup.exam-voice-only .voice-activity span { width: 10px; background: linear-gradient(#97f0ff, #38a8e0); box-shadow: 0 0 12px rgba(105,229,255,.7); }
.voice-popup.exam-voice-only.speaking .exam-office-photo { animation: officerSpeaking .9s ease-in-out infinite alternate; }
.voice-popup.exam-voice-only.speaking .exam-officer-expression { opacity: .78; animation: officerMouthMovement .38s ease-in-out infinite alternate; }
.voice-popup.exam-voice-only.speaking .exam-officer-gesture { animation: officerDeskGesture 1.55s ease-in-out infinite; }
.voice-popup.exam-voice-only.speaking .exam-office-live { border-color: #8ff4ff; box-shadow: 0 0 20px rgba(91,223,255,.52); }
.voice-popup.speaking .voice-popup-card { border-color: #73dfff; box-shadow: 0 0 0 2px rgba(115,223,255,.34), 0 0 28px rgba(70,186,255,.38), 0 18px 48px rgba(5,19,47,.28); animation: interviewerBorderPulse 1.25s ease-in-out infinite; }
.voice-popup.exam-voice-only.speaking .exam-office-scene { outline: 2px solid rgba(115,223,255,.9); outline-offset: -2px; box-shadow: inset 0 0 0 2px rgba(115,223,255,.28), 0 0 28px rgba(70,186,255,.35); animation: interviewerBorderPulse 1.25s ease-in-out infinite; }
@keyframes interviewerBorderPulse { 0%,100% { border-color: rgba(115,223,255,.58); box-shadow: 0 0 0 1px rgba(115,223,255,.18), 0 0 14px rgba(70,186,255,.22); } 50% { border-color: #d7fbff; box-shadow: 0 0 0 3px rgba(115,223,255,.45), 0 0 34px rgba(70,186,255,.56); } }
.voice-popup.exam-voice-only.listening .exam-office-photo { filter: saturate(1.08) brightness(1.04); animation: applicantListening 1s ease-in-out infinite; }
.voice-popup.exam-voice-only.listening .exam-office-live { color: #d9ffcd; border-color: #b7ef9a; }.voice-popup.exam-voice-only.listening .exam-office-live i { color: #9cec62; }
@keyframes officerSpeaking { to { transform: scale(1.012); } } @keyframes applicantListening { 50% { transform: scale(1.008); } }
@keyframes officerMouthMovement { from { transform: scaleX(.9) scaleY(.65); } to { transform: scaleX(1.08) scaleY(1.55); } }
@keyframes officerDeskGesture { 0%, 100% { opacity: 0; transform: translateY(6px) rotate(-12deg); } 35%, 65% { opacity: .9; transform: translateY(0) rotate(8deg); } }
@keyframes officeMicPulse { 50% { transform: scale(1.35); filter: drop-shadow(0 0 7px #94ecff); } }

/* Reading and Writing become calm, focused exam workstations after civics. */
.exam-english-panel { border: 0; border-radius: 22px; padding: 1.25rem; background: linear-gradient(135deg, #eff7ff, #fffaf0); box-shadow: 0 16px 38px rgba(33, 64, 107, .13); }
.exam-english-heading { padding: .2rem .3rem .85rem; }.exam-english-heading h4 { font-size: 1.25rem; }.exam-english-grid { gap: 1rem; }
.exam-literacy-card { padding: 1rem; border: 1px solid rgba(70, 114, 180, .2); border-radius: 18px; box-shadow: 0 8px 20px rgba(37, 69, 116, .08); }
.exam-literacy-card:first-child { border-top: 4px solid #4776f5; }.exam-literacy-card:nth-child(2) { border-top: 4px solid #32a866; }
.exam-literacy-prompt { min-height: 68px; padding: .85rem 1rem; border-radius: 13px; background: #f4f8ff; font-size: 1rem; }
.exam-literacy-card textarea { min-height: 76px; border-radius: 12px; }.exam-literacy-card .btn { border-radius: 10px; font-weight: 750; }
.exam-read-circle { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; min-width: 108px; min-height: 48px; border: 2px solid #4d72f5; border-radius: 999px; color: #fff; background: radial-gradient(circle at 30% 25%, #86b9ff, #4169ee 62%, #2848bb); box-shadow: 0 7px 18px rgba(65, 105, 238, .26); font-weight: 800; }
.exam-read-circle i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.2); }.exam-read-circle.is-awaiting-read { animation: examReadPulse 1.15s ease-in-out infinite; }.exam-read-circle:hover { color: #fff; filter: brightness(1.06); }
.exam-writing-label { display: flex; align-items: center; gap: .4rem; margin-top: .85rem; color: #287b47; font-size: .78rem; font-weight: 800; }.exam-writing-label i { color: #35a463; }.exam-literacy-card textarea.is-awaiting-write { border: 2px solid #48a96c; background: #f3fff6; box-shadow: 0 0 0 4px rgba(71, 177, 109, .14); }.exam-literacy-card .btn.is-awaiting-write { animation: examWritePulse 1.25s ease-in-out infinite; }
@keyframes examReadPulse { 0%,100% { transform: scale(1); box-shadow: 0 7px 18px rgba(65,105,238,.26); } 50% { transform: scale(1.045); box-shadow: 0 0 0 9px rgba(78,116,247,.14), 0 12px 26px rgba(65,105,238,.36); } } @keyframes examWritePulse { 50% { box-shadow: 0 0 0 6px rgba(47,149,85,.16); } }
.voice-popup.exam-literacy-workstation .voice-popup-card { width: min(980px, calc(100vw - 30px)); min-width: 0; max-height: 90dvh; overflow: auto; padding: 18px; background: linear-gradient(150deg, #0b1d39, #193f69); border-color: rgba(112, 207, 255, .68); }.voice-popup.exam-literacy-workstation .voice-popup-top { position: sticky; top: -18px; z-index: 8; margin: -18px -18px 14px; padding: 18px; background: rgba(9, 28, 57, .96); border-bottom: 1px solid rgba(163,224,255,.22); }.voice-popup.exam-literacy-workstation .voice-popup-label,.voice-popup.exam-literacy-workstation .voice-popup-state { color: #e7f6ff; }.voice-popup.exam-literacy-workstation .voice-popup-progress,.voice-popup.exam-literacy-workstation .voice-popup-pass-progress,.voice-popup.exam-literacy-workstation .exam-welcome-identity,.voice-popup.exam-literacy-workstation .exam-office-scene,.voice-popup.exam-literacy-workstation .voice-activity,.voice-popup.exam-literacy-workstation .voice-popup-spoken,.voice-popup.exam-literacy-workstation .voice-popup-user-answer,.voice-popup.exam-literacy-workstation .voice-popup-answer,.voice-popup.exam-literacy-workstation .voice-popup-explanation,.voice-popup.exam-literacy-workstation .voice-popup-translated,.voice-popup.exam-literacy-workstation #voicePopupTranslatedLabel,.voice-popup.exam-literacy-workstation .voice-popup-metrics { display: none !important; }.voice-popup.exam-literacy-workstation .exam-english-panel { display: block !important; margin: 0; border: 1px solid rgba(168,223,255,.52); background: linear-gradient(135deg, #f4f9ff, #fffdf5); }.voice-popup.exam-literacy-workstation .exam-literacy-card { opacity: .58; transition: opacity .2s ease, box-shadow .2s ease, transform .2s ease; }.voice-popup.exam-literacy-workstation .exam-literacy-card.is-active-task { opacity: 1; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(24, 77, 146, .2); }
.exam-office-monitor-status { position: absolute; z-index: 5; right: 18px; bottom: 15px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; max-width: calc(100% - 36px); }.exam-office-monitor-status span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid rgba(188,238,255,.42); border-radius: 999px; color: #effcff; background: rgba(3, 25, 55, .76); font: 700 .62rem/1 Inter, sans-serif; }.exam-office-monitor-status i { color: #8cdbf5; }.exam-office-live { bottom: 56px; }
@media (max-width: 820px) { .voice-popup.exam-voice-only .voice-popup-card { width: min(640px, calc(100vw - 28px)); min-height: 550px; }.voice-popup.exam-voice-only .exam-office-scene { height: min(450px, 62vh); }.exam-office-monitor-status { left: 18px; justify-content: center; } }
@media (max-width: 620px) { .voice-popup.exam-voice-only .voice-popup-card { min-height: 500px; }.voice-popup.exam-voice-only .exam-office-scene { height: 375px; } }

.voice-popup-translated {
  font-family: "Noto Sans Ethiopic", "Inter", sans-serif;
  font-size: 1.2rem;
  line-height: 1.6;
}

.chart-box-ai-usage {
  min-height: 280px;
}

/* AI Usage Monitor: preserve a compact admin page even for many users. */
.ai-usage-table-scroll { max-height: 390px; overflow: auto; border: 1px solid #e1e8f5; border-radius: 13px; }
.ai-usage-users-table { min-width: 760px; margin-bottom: 0; table-layout: fixed; }
.ai-usage-users-table thead th { position: sticky; z-index: 2; top: 0; padding: .58rem .65rem; background: #eef4ff; color: #30466e; font-size: .67rem; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.ai-usage-users-table tbody td { padding: .52rem .65rem; font-size: .78rem; vertical-align: middle; }
.ai-usage-users-table th:first-child, .ai-usage-users-table td:first-child { width: 28%; }
.ai-usage-users-table th:nth-child(2), .ai-usage-users-table td:nth-child(2) { width: 9%; }
.ai-usage-users-table th:nth-child(3), .ai-usage-users-table td:nth-child(3) { width: 10%; }
.ai-usage-users-table tbody tr:hover { background: #f6f9ff; }
.ai-usage-table-scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.ai-usage-table-scroll::-webkit-scrollbar-thumb { border: 2px solid #f7f9fd; border-radius: 999px; background: #b8c8e7; }

.sim-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  background: var(--panel-strong);
}

.interview-page .sim-card {
  padding: 14px;
}

.interview-card h3 {
  margin: 0 0 4px;
  line-height: 1.32;
  font-size: clamp(1.06rem, 1.55vw, 1.38rem);
}

.sim-step {
  color: var(--primary);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  margin-bottom: 2px;
}

.interview-card #simDescription,
.interview-card #simAnswer {
  margin-bottom: 6px;
}

.sim-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.interview-page .sim-controls {
  margin-top: 6px;
  gap: 7px;
}

.exam-skip-toggle {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.exam-skip-toggle .form-check {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.exam-skip-toggle .form-check-label {
  line-height: 1.25;
}

.sim-sidebar {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px;
  background: var(--panel-strong);
}

.queue-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.queue-head-copy {
  min-width: 0;
}

.question-queue-panel .queue-head-copy h4 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.question-queue-panel #queueCount {
  margin-top: 3px;
  color: var(--muted) !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.queue-note {
  margin-top: 4px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.queue-head-tools {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.queue-practice-picker {
  width: min(280px, 100%);
}

.queue-practice-picker .practice-section-toggle {
  min-width: 240px;
}

.queue-practice-picker .practice-section-menu {
  min-width: 280px;
}

.sim-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
  max-height: min(65vh, 620px);
  overflow: auto;
  padding: 2px;
}

.sim-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 64px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 14px;
  padding: 9px 12px;
  background: color-mix(in srgb, var(--panel-strong) 94%, transparent);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.sim-item:not(:disabled):hover {
  border-color: rgba(25, 194, 255, 0.35);
  background: rgba(25, 194, 255, 0.065);
  box-shadow: 0 7px 18px rgba(20, 41, 87, 0.08);
  transform: translateX(2px);
}

.sim-item.active {
  border-color: rgba(61, 100, 242, 0.48);
  background: linear-gradient(90deg, rgba(67, 101, 245, .13), rgba(25, 194, 255, .055));
  box-shadow: inset 3px 0 0 #4776f5;
}

.sim-item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.sim-item:disabled.active {
  border-color: rgba(25, 194, 255, 0.18);
  background: rgba(25, 194, 255, 0.05);
}

.sim-item-index {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(20, 93, 255, 0.12);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.sim-item-body {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.sim-item-title {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  color: #536889;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: .075em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sim-item-text {
  overflow: hidden;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 720;
  letter-spacing: -0.012em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-item.active .sim-item-index { background: #4776f5; color: #fff; }
.sim-item.active .sim-item-title { color: #355bc4; }
@media (max-width: 640px) { .sim-item { min-height: 58px; padding: 8px 10px; }.sim-item-text { font-size: .78rem; } }

.session-report-panel {
  margin-top: 20px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(25, 194, 255, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(246, 250, 255, 0.94));
  box-shadow: var(--shadow);
}

body.theme-dark .session-report-panel {
  background:
    radial-gradient(circle at top right, rgba(25, 194, 255, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(10, 18, 32, 0.97), rgba(8, 16, 30, 0.94));
}

.session-report-head {
  margin-bottom: 18px;
}

.session-report-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 93, 255, 0.08);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-compact-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.report-compact-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(25, 194, 255, 0.08), rgba(20, 93, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.report-compact-item span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}

.report-compact-item strong {
  display: block;
  font-size: 1.06rem;
  font-weight: 900;
}

/* Completed interview scorecards share the Flash Card navy-and-gold style. */
.session-report-panel .report-compact-item {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: rgba(242, 193, 78, .22);
  background: linear-gradient(145deg, #111a31 0%, #20283d 100%);
  box-shadow: 0 12px 28px rgba(6, 12, 28, .18);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.session-report-panel .report-compact-item::after {
  position: absolute;
  z-index: -1;
  top: -45%;
  bottom: -45%;
  left: -68%;
  width: 36%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(242, 193, 78, .22), transparent);
  content: "";
  transition: left .55s ease;
}

.session-report-panel .report-compact-item span,
.session-report-panel .report-compact-item strong {
  position: relative;
  z-index: 1;
}

.session-report-panel .report-compact-item span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 240, 173, .8);
}

.session-report-panel .report-compact-item span i {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: rgba(242, 193, 78, .14);
  color: #ffe48a;
  font-size: .72rem;
}

.session-report-panel .report-compact-item strong { color: #fff; }

.report-exam-status { margin: 14px 0; padding: 14px 16px; border: 1px solid rgba(63, 106, 201, .22); border-radius: 16px; background: linear-gradient(115deg, rgba(235, 244, 255, .94), rgba(246, 250, 255, .94)); }
.report-exam-status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #52617f; font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.report-exam-status-head strong { color: #17366f; font-size: .95rem; letter-spacing: normal; }
.report-exam-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 11px; }
.report-exam-status-grid span { display: grid; gap: 3px; min-width: 0; padding: 9px 10px; border-radius: 10px; background: rgba(255,255,255,.72); }
.report-exam-status-grid b { color: #233250; font-size: .76rem; }
.report-exam-status-grid em { color: #5b6d8d; font-size: .75rem; font-style: normal; line-height: 1.25; }
@media (max-width: 720px) { .report-exam-status-grid { grid-template-columns: 1fr 1fr; } }

@media (hover: hover) and (pointer: fine) {
  .session-report-panel .report-compact-item:hover {
    transform: translateY(-6px);
    border-color: rgba(242, 193, 78, .5);
    background: linear-gradient(145deg, #1f2a43 0%, #091222 100%);
    box-shadow: 0 0 0 1px rgba(242, 193, 78, .16), 0 18px 36px rgba(0, 0, 0, .28), 0 0 24px rgba(242, 193, 78, .12);
  }

  .session-report-panel .report-compact-item:hover::after { left: 132%; }

  .session-report-panel .report-compact-item:hover span i {
    transform: translateY(-2px) scale(1.08);
  }
}

/* Keep the completed-session summary concise and calm instead of visually loud. */
.session-report-panel .report-compact-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.session-report-panel .report-meta-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.session-report-panel .report-compact-item {
  min-height: 112px;
  padding: 13px 15px;
  border-color: rgba(77, 99, 160, .2);
  background: linear-gradient(145deg, #1a233c 0%, #252d42 100%);
  box-shadow: 0 8px 18px rgba(9, 18, 36, .12);
}

.session-report-panel .report-compact-item::after { opacity: .35; }
.session-report-panel .report-compact-item strong { font-size: 1.24rem; }

@media (hover: hover) and (pointer: fine) {
  .session-report-panel .report-compact-item:hover {
    transform: translateY(-3px);
    border-color: rgba(242, 193, 78, .32);
    background: linear-gradient(145deg, #202a43 0%, #151e33 100%);
    box-shadow: 0 11px 22px rgba(9, 18, 36, .18);
  }
}

@media (max-width: 1400px) {
  .session-report-panel .report-compact-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .session-report-panel .report-meta-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .session-report-panel .report-compact-summary,
  .session-report-panel .report-meta-grid { grid-template-columns: 1fr 1fr; }
  .session-report-panel .report-compact-item { min-height: 0; }
}

.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.report-meta-item,
.report-stat {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(20, 93, 255, 0.04);
}

.report-meta-item span,
.report-stat span {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}

.report-meta-item strong,
.report-stat strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 900;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.exam-records-panel {
  overflow: hidden;
}

.exam-records-panel > .panel-head {
  display: block;
}

.exam-records-panel > .panel-head > div:first-child {
  margin-bottom: 16px;
}

.records-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  align-items: flex-end;
  justify-content: stretch;
  gap: 12px;
  width: 100%;
}

.records-toolbar-heading {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.records-toolbar-heading i { color: var(--primary); }

.records-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.records-control span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.records-control .form-select {
  width: 100%;
  min-height: 38px;
  border-radius: 14px;
  border-color: var(--border);
}

.records-page-size-control {
  min-width: 0;
}

.records-search-control .form-control {
  width: 100%;
  min-height: 38px;
  border-radius: 14px;
  border-color: var(--border);
}

.records-date-control {
  min-width: 0;
}

.records-search-control {
  min-width: 0;
}


.records-user-filter .form-select {
  min-height: 38px;
}

.records-user-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.records-user-dropdown-toggle > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-user-dropdown-menu { width: min(280px, calc(100vw - 30px)); }

.records-user-options { max-height: 190px; overflow-y: auto; }

.records-user-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 5px;
  color: var(--text);
  font-size: .8rem;
  cursor: pointer;
}

.records-user-option input { accent-color: var(--primary); }

.records-user-filter small {
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.2;
}

.records-toolbar > .d-flex {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.flashcard-title-icon {
  display: inline-grid;
  width: 1.6em;
  height: 1.6em;
  margin-right: .35rem;
  place-items: center;
  vertical-align: .1em;
  border-radius: .45em;
  background: linear-gradient(135deg, #4169f5, #6cb8ff);
  box-shadow: 0 4px 10px rgba(65, 105, 245, .22);
  color: #fff;
  font-size: .7em;
}

.flashcard-quick-action {
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .flashcard-quick-action:hover,
  .flashcard-quick-action:focus-visible {
    transform: translateY(-1px);
    border-color: #4169f5;
    background: linear-gradient(135deg, rgba(65, 105, 245, .13), rgba(103, 185, 255, .16));
    box-shadow: 0 7px 16px rgba(65, 105, 245, .16);
  }
}

.records-date-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.records-date-inputs .form-control {
  min-width: 0;
  min-height: 38px;
  border-radius: 14px;
  border-color: var(--border);
}

.records-date-inputs .icon-btn {
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
}

.records-date-inputs .icon-btn i {
  font-size: 0.95rem;
}

.records-columns-dropdown {
  align-self: flex-end;
}

.records-columns-dropdown .dropdown-menu {
  min-width: 240px;
  max-height: 320px;
  overflow: auto;
}

.records-columns-dropdown .dropdown-item {
  border-radius: 10px;
  font-size: 0.9rem;
  padding-block: 0.55rem;
}

.records-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.admin-record-group-row td {
  background: linear-gradient(90deg, rgba(20, 93, 255, 0.12), rgba(11, 184, 168, 0.07));
  color: var(--primary);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.panel-card:has(> .admin-table-accordion-content) > .panel-head {
  align-items: center;
}

.admin-table-accordion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: .46rem .7rem;
  border: 1px solid rgba(20, 93, 255, .34);
  border-radius: 10px;
  background: rgba(20, 93, 255, .06);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 800;
}

.admin-table-accordion-toggle i {
  transition: transform .18s ease;
}

.is-admin-table-open .admin-table-accordion-toggle i {
  transform: rotate(180deg);
}

.admin-table-accordion-content {
  padding-top: 4px;
}

.database-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}

.database-table-toolbar .input-group {
  width: min(100%, 340px);
}

.database-table-count {
  color: var(--text-secondary);
  font-size: .78rem;
  font-weight: 700;
}

.raw-db-table {
  min-width: max-content;
  table-layout: auto;
  border-color: rgba(148, 163, 184, .22);
}

.raw-db-table th,
.raw-db-table td {
  padding: .42rem .52rem;
  vertical-align: top;
  font-size: .78rem;
  line-height: 1.35;
  white-space: nowrap;
  word-break: break-word;
}

.raw-db-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(20, 93, 255, .14), rgba(11, 184, 168, .1));
}

.database-column-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.database-column-sort:hover,
.database-column-sort.is-sorted {
  color: var(--primary);
}

body.theme-dark .admin-table-accordion-toggle {
  border-color: rgba(88, 166, 255, .45);
  background: rgba(88, 166, 255, .11);
  color: #bcd9ff;
}

.records-columns-dropdown .dropdown-item:hover {
  background: rgba(20, 93, 255, 0.08);
}

.exam-records-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.records-metric-card {
  position: relative;
  overflow: hidden;
  padding-left: 48px;
}

.records-metric-card .report-compact-icon {
  position: absolute;
  top: 13px;
  left: 14px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #edf2ff, #d8f3ff);
  color: #4169f5;
  font-size: .78rem;
}

.records-metric-card:nth-child(2) .report-compact-icon { color: #2676bf; }
.records-metric-card:nth-child(3) .report-compact-icon { color: #2d9563; }
.records-metric-card:nth-child(4) .report-compact-icon { color: #b77a08; }
.records-metric-card:nth-child(5) .report-compact-icon { color: #7a55d7; }

/* Compact, scan-friendly records controls and summary. */
.exam-records-panel > .panel-head > div:first-child { margin-bottom: 10px; }
.exam-records-panel > .panel-head > div:first-child p { margin-bottom: 0; font-size: .88rem; }
.records-toolbar { grid-template-columns: repeat(6, minmax(126px, 1fr)); gap: 8px; }
.records-control { gap: 4px; }
.records-control span { font-size: .66rem; letter-spacing: .065em; }
.records-control .form-select, .records-search-control .form-control, .records-user-filter .form-select { min-height: 34px; border-radius: 10px; font-size: .82rem; }
.records-date-inputs { gap: 5px; }
.records-date-inputs .form-control { min-height: 34px; font-size: .8rem; }
.records-toolbar > .d-flex { grid-column: auto / span 2; align-self: end; gap: 7px !important; }
.records-columns-dropdown { align-self: end; }
.records-columns-dropdown .btn { min-height: 34px; padding: .3rem .65rem; font-size: .78rem; }
.exam-records-summary-grid { gap: 9px; margin-top: 10px; }
.records-metric-card { min-height: 76px; padding: 11px 12px 10px 44px; border-radius: 14px; }
.records-metric-card .report-compact-icon { top: 12px; left: 12px; width: 23px; height: 23px; font-size: .72rem; }
.records-metric-card span { font-size: .63rem; letter-spacing: .07em; }
.records-metric-card strong { margin-top: 2px; font-size: 1.05rem; }

/* A restrained study-deck finish: clear hierarchy, consistent controls, and
   no oversized decorative surfaces competing with the question. */
body.section-dashboard .flashcard-panel { border-color: rgba(75, 108, 184, .24); box-shadow: 0 14px 36px rgba(12, 26, 56, .08); }
body.section-dashboard .flashcard-head { gap: 14px; }
body.section-dashboard .flashcard-toolbar { padding: 10px; border-radius: 14px; background: linear-gradient(135deg, rgba(20, 93, 255, .055), rgba(247, 250, 255, .92)); }
body.section-dashboard .flashcard-toolbar-row { gap: 7px; }
body.section-dashboard .flashcard-control { gap: 3px; }
body.section-dashboard .flashcard-control span { font-size: .62rem; letter-spacing: .06em; }
body.section-dashboard .flashcard-control .form-select, body.section-dashboard .flashcard-control .form-control { min-height: 32px; border-radius: 9px; font-size: .78rem; }
body.section-dashboard .flashcard-question-card { border-radius: 18px; }
body.section-dashboard .flashcard-card-face { border-radius: 18px; }
body.section-dashboard .flashcard-language-panel { border-radius: 13px; padding: 12px; }
@media (max-width: 1200px) { .records-toolbar { grid-template-columns: repeat(3, minmax(150px, 1fr)); } .records-toolbar > .d-flex { grid-column: auto / span 2; } }

.records-summary-table {
  min-width: 0;
  table-layout: fixed;
}
.records-summary-table thead th { position: relative; }
.records-summary-table :is(th, td) { white-space: normal; overflow-wrap: anywhere; }
.records-summary-table .table-sort-btn { width: 100%; padding-right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.records-summary-table .record-column-resizer { touch-action: none; }
.exam-records-summary-grid .records-metric-card { background: var(--panel-strong); border: 1px solid var(--border); border-top: 3px solid var(--primary); box-shadow: 0 4px 14px rgba(15, 31, 53, .05); }
.exam-records-summary-grid .records-metric-card strong { color: var(--text); font-variant-numeric: tabular-nums; }
.exam-records-summary-grid .records-metric-card span { color: var(--muted); }
.exam-records-summary-grid .records-metric-card:hover { border-top-color: var(--accent); box-shadow: 0 6px 18px rgba(15, 31, 53, .1); }

.records-summary-table .table-selection-cell {
  width: 48px;
  min-width: 48px;
  text-align: center;
}

.records-summary-table tbody tr.is-record-user-selected > * {
  background-color: rgba(20, 93, 255, 0.10) !important;
}

.records-summary-table .admin-exam-user-select,
.records-summary-table #adminExamSelectAllUsers {
  cursor: pointer;
  width: 1.1rem;
  height: 1.1rem;
}

.records-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.records-pagination-top {
  margin: 12px 0 8px;
  padding-top: 0;
  padding-bottom: 10px;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

.records-pagination-info {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.records-pagination .pagination {
  flex-wrap: wrap;
}

.records-pagination .page-link {
  border-radius: 10px;
  color: var(--primary);
}

.records-pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.records-pagination .page-item.disabled .page-link {
  color: var(--muted);
}

.records-summary-table thead th {
  white-space: nowrap;
  background: linear-gradient(135deg, rgba(20, 93, 255, 0.16), rgba(25, 194, 255, 0.12));
  color: var(--text);
  border-bottom: 0;
}

.records-summary-table thead th:first-child {
  border-top-left-radius: 18px;
}

.records-summary-table thead th:last-child {
  border-top-right-radius: 18px;
}

.table-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-sort-btn i {
  font-size: 0.85rem;
  opacity: 0.72;
}

.table-sort-btn.is-sorted {
  color: var(--primary);
}

.answer-records-table thead th,
.answer-records-table thead th button {
  color: var(--text);
}

.answer-records-table thead th {
  background: linear-gradient(135deg, rgba(20, 93, 255, 0.18), rgba(11, 184, 168, 0.14));
  border-bottom: 0;
}

.answer-records-table thead th:first-child {
  border-top-left-radius: 18px;
}

.answer-records-table thead th:last-child {
  border-top-right-radius: 18px;
}

.answer-records-table[data-hidden-columns~="created_at"] [data-column-key="created_at"],
.answer-records-table[data-hidden-columns~="user_name"] [data-column-key="user_name"],
.answer-records-table[data-hidden-columns~="mode"] [data-column-key="mode"],
.answer-records-table[data-hidden-columns~="practice_id"] [data-column-key="practice_id"],
.answer-records-table[data-hidden-columns~="exam_id"] [data-column-key="exam_id"],
.answer-records-table[data-hidden-columns~="exam_version"] [data-column-key="exam_version"],
.answer-records-table[data-hidden-columns~="exam_result"] [data-column-key="exam_result"],
.answer-records-table[data-hidden-columns~="question_text"] [data-column-key="question_text"],
.answer-records-table[data-hidden-columns~="correct_answers"] [data-column-key="correct_answers"],
.answer-records-table[data-hidden-columns~="your_answer"] [data-column-key="your_answer"],
.answer-records-table[data-hidden-columns~="correctness_score"] [data-column-key="correctness_score"],
.answer-records-table[data-hidden-columns~="fluency_score"] [data-column-key="fluency_score"],
.answer-records-table[data-hidden-columns~="accent_score"] [data-column-key="accent_score"],
.answer-records-table[data-hidden-columns~="speed_wpm"] [data-column-key="speed_wpm"],
.answer-records-table[data-hidden-columns~="confidence_score"] [data-column-key="confidence_score"],
.answer-records-table[data-hidden-columns~="ai_feedback"] [data-column-key="ai_feedback"] {
  display: none;
}

.report-table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.62);
}

body.theme-dark .report-table-wrap {
  background: rgba(15, 23, 42, 0.72);
}

.report-table {
  margin-bottom: 0;
  min-width: 1100px;
}

.report-table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: rgba(20, 93, 255, 0.05);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.report-table tbody td {
  vertical-align: top;
  font-size: 0.82rem;
  white-space: normal;
  word-break: break-word;
  line-height: 1.38;
}

.report-table tbody td .fw-semibold { font-size: .85rem; line-height: 1.35; }
.report-table tbody td .small { font-size: .72rem !important; }

.report-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.report-result-badge.pass {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.report-result-badge.fail {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.report-result-badge.neutral {
  background: rgba(20, 93, 255, 0.1);
  color: var(--primary);
}

.answer-records-table {
  min-width: 2240px;
  table-layout: fixed;
}

.answer-records-table th,
.answer-records-table td {
  padding: .55rem .6rem;
}

.answer-records-table [data-column-key="created_at"] { width: 128px; }
.answer-records-table [data-column-key="user"],
.answer-records-table [data-column-key="user_name"] { width: 170px; }
.answer-records-table [data-column-key="mode"] { width: 100px; }
.answer-records-table [data-column-key="practice_id"],
.answer-records-table [data-column-key="exam_id"] { width: 104px; }
.answer-records-table [data-column-key="exam_version"] { width: 132px; }
.answer-records-table [data-column-key="exam_result"] { width: 128px; }
.answer-records-table [data-column-key="question_text"] { width: 255px; }
.answer-records-table [data-column-key="correct_answers"] { width: 220px; }
.answer-records-table [data-column-key="your_answer"] { width: 200px; }
.answer-records-table [data-column-key="correctness_score"] { width: 178px; }
.answer-records-table [data-column-key="fluency_score"] { width: 125px; }
.answer-records-table [data-column-key="accent_score"] { width: 120px; }
.answer-records-table [data-column-key="speed_wpm"] { width: 125px; }
.answer-records-table [data-column-key="confidence_score"] { width: 145px; }
.answer-records-table [data-column-key="ai_feedback"] { width: 260px; }
.record-session-id { display: inline-block; padding: .22rem .42rem; border: 1px solid #dbe3f4; border-radius: .42rem; background: #f6f8fd; color: #354a7c; font-size: .72rem; font-weight: 800; white-space: nowrap; }

/* Once a single civics-test version is selected, no extra column is needed
   for switching versions. Let the remaining answer columns use the space. */
.answer-records-table[data-filtered-exam-version="1"] { min-width: 1880px; }
.answer-records-table[data-filtered-exam-version="1"] [data-column-key="exam_version"] { width: 96px; }
.answer-records-table[data-filtered-exam-version="1"] [data-column-key="question_text"] { width: 290px; }
.answer-records-table[data-filtered-exam-version="1"] [data-column-key="correct_answers"] { width: 250px; }
.records-summary-scroll-area { border: 1px solid #e3e9f7; border-radius: 14px; }

.records-table-scroll-shell {
  position: relative;
}

.records-table-scroll-area {
  margin-bottom: 0;
  scroll-behavior: smooth;
}

.records-scroll-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #d7e1f5;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 20px rgba(29, 51, 92, .18);
  color: #3963dd;
  transform: translateY(-50%);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.records-scroll-arrow:hover:not(:disabled) {
  box-shadow: 0 10px 24px rgba(29, 51, 92, .26);
  transform: translateY(-50%) scale(1.06);
}

.records-scroll-arrow:disabled {
  cursor: default;
  opacity: .4;
}

.records-scroll-arrow-left { left: .6rem; }
.records-scroll-arrow-right { right: .6rem; }

/* Keep headers readable and scores compact while the table scrolls horizontally. */
.answer-records-table thead .table-sort-btn {
  display: flex;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.answer-records-table tbody [data-column-key="correctness_score"],
.answer-records-table tbody [data-column-key="exam_result"],
.answer-records-table tbody [data-column-key="fluency_score"],
.answer-records-table tbody [data-column-key="accent_score"],
.answer-records-table tbody [data-column-key="speed_wpm"],
.answer-records-table tbody [data-column-key="confidence_score"] {
  white-space: nowrap;
  word-break: normal;
}

.quick-practice-groups-toggle {
  display: flex;
  align-items: center;
  min-height: 38px;
}

.quick-practice-groups-menu {
  min-width: 260px;
  max-height: 310px;
  overflow-y: auto;
}

.quick-practice-group-option {
  cursor: pointer;
  white-space: normal;
}

.quick-practice-group-copy {
  display: grid;
  gap: .1rem;
}

.quick-practice-group-copy strong {
  color: var(--text);
  font-size: .88rem;
  font-weight: 700;
}

.quick-practice-group-copy small {
  color: var(--text-secondary);
  font-size: .72rem;
}

/* Compact action controls in the Interview Mentor workspace. */
.interview-page .sim-controls-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: .5rem;
}

.interview-page .sim-controls-row .btn {
  width: auto;
  min-height: 38px;
  padding: .42rem .72rem;
  border-radius: 9px;
  font-size: .84rem;
  font-weight: 700;
}

.interview-page #startInterviewBtn i { color: #b9ee69; }
.interview-page #startRecordingBtn i { color: #6ce7e4; }
.interview-page #replayQuestionBtn i { color: #9e8bff; }
.interview-page #replayMyAnswerBtn i { color: #5dbbe9; }
.interview-page #replayCorrectAnswerBtn i { color: #62c889; }
.interview-page #nextQuestionBtn i { color: #e5a62f; }
.interview-page #exitInterviewBtn i { color: #d95a63; }

@media (max-width: 640px) {
  .interview-page .sim-controls-row .btn {
    flex: 1 1 calc(50% - .5rem);
  }
}

/* Compact, readable typography for the movable agent-speaking popup. */
.voice-popup {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  transform: translate(-50%, -50%);
}

.voice-popup.hidden {
  transform: translate(-50%, calc(-50% + 10px));
}

.voice-popup-card {
  width: min(1180px, calc(100vw - 32px));
  min-width: min(680px, calc(100vw - 32px));
  height: fit-content;
  min-height: 0;
  max-width: calc(100vw - 24px);
  max-height: 92vh;
  padding: 20px 22px;
  border-radius: 18px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--panel-strong), var(--panel-strong)) padding-box,
    linear-gradient(110deg, #4268f6, #18b8e6, #75c936, #f2b84b, #d75bd5, #4268f6) border-box;
  background-size: auto, 320% 100%;
  animation: voicePopupBorderShift 6s linear infinite;
  box-shadow: 0 18px 42px rgba(20, 93, 255, .16);
}

/* Let the console follow its visible content instead of reserving an empty
   desktop-sized canvas. Long question results still scroll within the card. */
.voice-popup-card > :last-child {
  margin-bottom: 0;
}

@media (max-width: 780px) {
  .voice-popup-card {
    width: calc(100vw - 16px);
    min-width: 0;
    max-width: calc(100vw - 16px);
    max-height: 94vh;
    padding: 15px;
    resize: vertical;
  }
}

@keyframes voicePopupBorderShift {
  from { background-position: 0 0, 0% 50%; }
  to { background-position: 0 0, 320% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .voice-popup-card { animation: none; }
}

/* Study Mode opens with a compact, purposeful practice welcome instead of the
   full-width response console. The full console is restored after Start. */
.voice-popup.study-welcome {
  isolation: isolate;
}

.voice-popup.study-welcome::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: -100vmax;
  background: rgba(232, 240, 252, .24);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.voice-popup.study-welcome .voice-popup-card {
  width: min(620px, calc(100vw - 28px));
  min-width: 0;
  min-height: 0;
  max-height: min(620px, calc(100vh - 28px));
  padding: 20px;
  overflow: auto;
  resize: none;
  border-color: rgba(91, 129, 239, .42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .99), rgba(245, 249, 255, .98)) padding-box,
    linear-gradient(110deg, #4c72ee, #34b7d6, #7bc84f, #e7bd4d) border-box;
  box-shadow: 0 24px 68px rgba(25, 57, 122, .22);
}

.voice-popup.study-welcome .voice-popup-top {
  gap: 13px;
}

.voice-popup.study-welcome .voice-popup-head {
  min-width: 0;
}

.voice-popup.study-welcome .voice-popup-actions {
  gap: 7px;
}

.voice-popup.study-welcome .voice-popup-actions .btn {
  min-height: 35px;
}

.voice-popup.study-welcome .voice-popup-progress {
  margin-top: 2px;
  padding: 9px 11px;
}

.voice-popup.study-welcome .voice-popup-pass-progress {
  margin-top: 10px;
  padding: 11px 12px;
}

.voice-popup.study-welcome .voice-popup-pass-progress-meta {
  font-size: .76rem;
}

.voice-popup.study-welcome .voice-popup-user-answer,
.voice-popup.study-welcome .voice-popup-answer,
.voice-popup.study-welcome .voice-popup-explanation,
.voice-popup.study-welcome .voice-popup-translated,
.voice-popup.study-welcome #voicePopupTranslatedLabel,
.voice-popup.study-welcome .voice-popup-metrics,
.voice-popup.study-welcome .exam-welcome-identity,
.voice-popup.study-welcome .exam-office-scene {
  display: none !important;
}
.voice-popup.study-welcome .interview-intro-preference,
.voice-popup.exam-welcome .interview-intro-preference { display: inline-flex; }
body.theme-dark .voice-popup-citizenship-brand { color: #dce9ff; } body.theme-dark .voice-popup-citizenship-brand small, body.theme-dark .interview-intro-preference { color: #b6c5e2; }

.voice-popup.study-welcome .voice-activity {
  justify-content: center;
  margin: 15px 0 5px;
}

.voice-popup.study-welcome .voice-popup-spoken {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(93, 130, 235, .18);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(238, 246, 255, .94), rgba(251, 253, 255, .98));
  color: #264da9;
  font-size: clamp(1.04rem, 2.4vw, 1.28rem);
  line-height: 1.35;
  text-align: center;
}

body.theme-dark .voice-popup.study-welcome::before {
  background: rgba(4, 11, 28, .48);
}

body.theme-dark .voice-popup.study-welcome .voice-popup-card {
  background:
    linear-gradient(145deg, rgba(18, 31, 62, .99), rgba(13, 25, 51, .99)) padding-box,
    linear-gradient(110deg, #587cff, #36bddb, #8bd160, #e9c550) border-box;
}

body.theme-dark .voice-popup.study-welcome .voice-popup-spoken {
  color: #d9e6ff;
  background: rgba(67, 97, 164, .18);
  border-color: rgba(122, 160, 255, .25);
}

/* Keep the learner's attention on the active Study Practice conversation and
   answer review without changing the underlying dashboard state. */
.voice-popup:not(.hidden):not(.exam-welcome):not(.exam-voice-only) {
  isolation: isolate;
}

.voice-popup:not(.hidden):not(.exam-welcome):not(.exam-voice-only)::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: -100vmax;
  background: rgba(234, 241, 252, .34);
  backdrop-filter: blur(8px) saturate(.92);
  -webkit-backdrop-filter: blur(8px) saturate(.92);
}

body.theme-dark .voice-popup:not(.hidden):not(.exam-welcome):not(.exam-voice-only)::before {
  background: rgba(4, 11, 28, .5);
}

@media (max-width: 620px) {
  .voice-popup.study-welcome .voice-popup-card {
    padding: 16px;
  }

  .voice-popup.study-welcome .voice-popup-top {
    gap: 10px;
  }

  .voice-popup.study-welcome .voice-popup-actions {
    width: 100%;
  }

  .voice-popup.study-welcome .voice-popup-actions .popup-settings-btn {
    margin-left: auto;
  }
}

.voice-popup-label {
  margin-bottom: 5px;
  font-family: "Inter", sans-serif;
  font-size: .68rem;
  letter-spacing: .12em;
}

.voice-popup-state {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Inter", sans-serif;
  font-size: .8rem;
}

.voice-popup-state i {
  background: none !important;
  color: #5d9f3c !important;
  font-size: .88rem;
  -webkit-text-fill-color: currentColor !important;
}

.voice-popup.speaking .voice-popup-state i {
  color: #2e80e9 !important;
  animation: voiceStatePulse 1.1s ease-in-out infinite;
}

.voice-popup.listening .voice-popup-state i {
  color: #75b92e !important;
  animation: voiceStatePulse .8s ease-in-out infinite;
}

/* The light practice popup needs a darker Listening label; the inherited
   muted color was nearly invisible against its warm background. */
.voice-popup:not(.exam-voice-only).listening .voice-popup-state,
.voice-popup:not(.exam-voice-only).listening .voice-popup-state span {
  color: #173d68 !important;
  font-weight: 900;
}

@keyframes voiceStatePulse {
  50% { transform: scale(1.18); filter: drop-shadow(0 0 5px rgba(117, 185, 46, .45)); }
}

.voice-popup-spoken {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 14px;
}

.voice-popup-user-answer {
  margin: -4px 0 12px;
  padding: 8px 10px;
  border: 1px solid;
  border-radius: 10px;
  font-family: "Inter", sans-serif;
}

.voice-popup-user-answer > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.voice-popup-user-answer > small {
  display: block;
  margin-top: 3px;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.35;
}

.voice-popup-user-answer.is-correct {
  border-color: rgba(34, 163, 83, .3);
  background: rgba(34, 197, 94, .08);
  color: #207a40;
}

.voice-popup-user-answer.is-incorrect {
  border-color: rgba(220, 66, 74, .3);
  background: rgba(239, 68, 68, .07);
  color: #bb3742;
}

.voice-popup-answer {
  margin: -2px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 197, 94, .22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 197, 94, .1), rgba(132, 204, 22, .06));
}

.voice-popup-answer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  color: #278a4a;
  font-family: "Inter", sans-serif;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.voice-popup-answer span i {
  color: #22a353;
  font-size: .9rem;
}

.voice-popup-answer strong {
  display: block;
  margin-top: 4px;
  color: #16823e;
  font-family: "Inter", sans-serif;
  font-size: clamp(.95rem, 1.8vw, 1.12rem);
  line-height: 1.4;
}

.voice-popup-explanation {
  margin: -2px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, .3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 247, 220, .95), rgba(255, 252, 241, .9));
}

.voice-popup-explanation > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a66b00;
  font-family: "Inter", sans-serif;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.voice-popup-explanation p {
  margin: 6px 0 0;
  color: #4f401d;
  font-family: "Inter", sans-serif;
  font-size: clamp(.76rem, 1.4vw, .9rem);
  line-height: 1.52;
  white-space: pre-line;
}

body.theme-dark .voice-popup-explanation {
  border-color: rgba(251, 191, 36, .28);
  background: linear-gradient(135deg, rgba(91, 61, 7, .42), rgba(39, 31, 16, .52));
}

body.theme-dark .voice-popup-explanation p { color: #f7e7b3; }

.voice-popup-translated {
  font-family: "Noto Sans Ethiopic", "Inter", sans-serif;
  font-size: clamp(.98rem, 1.8vw, 1.12rem);
  line-height: 1.55;
}

.voice-activity {
  min-height: 26px;
  margin: 10px 0 12px;
}

.voice-popup-metrics {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(20, 93, 255, .12);
}

.voice-popup-report-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding-top: 0.9rem;
  margin-top: 0.9rem;
  border-top: 1px solid rgba(63, 99, 238, 0.16);
}

.voice-popup-report-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

.voice-popup-report-actions small {
  color: var(--muted);
  font-size: 0.78rem;
}

.voice-popup-metrics-title {
  margin-bottom: 8px;
  color: #66738e;
  font-family: "Inter", sans-serif;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.voice-popup-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.voice-popup-metric {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(20, 93, 255, .12);
  border-radius: 13px;
  background: rgba(247, 250, 255, .86);
}

.voice-popup-metric-icon {
  display: inline-grid;
  width: 25px;
  height: 25px;
  margin-bottom: 5px;
  border-radius: 8px;
  place-items: center;
}

.voice-popup-metric-icon i {
  font-size: .8rem;
}

.voice-popup-metric > span:not(.voice-popup-metric-icon) {
  display: block;
  overflow: hidden;
  color: #72809b;
  font-family: "Inter", sans-serif;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.voice-popup-metric strong {
  display: block;
  margin-top: 2px;
  color: #17213a;
  font-family: "Inter", sans-serif;
  font-size: .84rem;
  font-variant-numeric: tabular-nums;
}

.voice-popup-metric-track {
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .2);
}

.voice-popup-metric-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 240ms ease;
}

.voice-popup-metric-correctness { border-color: rgba(34, 197, 94, .24); }
.voice-popup-metric-correctness .voice-popup-metric-icon { background: rgba(34, 197, 94, .13); }
.voice-popup-metric-correctness .voice-popup-metric-icon :is(i, svg) { color: #22a353; }
.voice-popup-metric-correctness .voice-popup-metric-track > span { background: linear-gradient(90deg, #22c55e, #84cc16); }
.voice-popup-metric-accent { border-color: rgba(14, 165, 233, .24); }
.voice-popup-metric-accent .voice-popup-metric-icon { background: rgba(14, 165, 233, .13); }
.voice-popup-metric-accent .voice-popup-metric-icon :is(i, svg) { color: #218ed1; }
.voice-popup-metric-accent .voice-popup-metric-track > span { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.voice-popup-metric-fluency { border-color: rgba(168, 85, 247, .24); }
.voice-popup-metric-fluency .voice-popup-metric-icon { background: rgba(168, 85, 247, .13); }
.voice-popup-metric-fluency .voice-popup-metric-icon :is(i, svg) { color: #8b5cf6; }
.voice-popup-metric-fluency .voice-popup-metric-track > span { background: linear-gradient(90deg, #a855f7, #c084fc); }
.voice-popup-metric-speed { border-color: rgba(234, 179, 8, .28); }
.voice-popup-metric-speed .voice-popup-metric-icon { background: rgba(234, 179, 8, .15); }
.voice-popup-metric-speed .voice-popup-metric-icon :is(i, svg) { color: #c99111; }
.voice-popup-metric-speed .voice-popup-metric-track > span { background: linear-gradient(90deg, #65a30d, #a3d331); }
.voice-popup-metric-confidence { border-color: rgba(236, 72, 153, .24); }
.voice-popup-metric-confidence .voice-popup-metric-icon { background: rgba(236, 72, 153, .13); }
.voice-popup-metric-confidence .voice-popup-metric-icon :is(i, svg) { color: #d9488d; }
.voice-popup-metric-confidence .voice-popup-metric-track > span { background: linear-gradient(90deg, #db3f3f, #e56d83); }

@media (max-width: 520px) {
  .voice-popup-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.theme-dark .records-scroll-arrow {
  border-color: #435170;
  background: rgba(27, 38, 58, .94);
  color: #91b0ff;
}

@media (max-width: 640px) {
  .records-scroll-arrow {
    width: 36px;
    height: 36px;
  }
  .records-scroll-arrow-left { left: .35rem; }
  .records-scroll-arrow-right { right: .35rem; }
}

.answer-records-table thead th {
  white-space: nowrap;
  padding: .42rem .5rem;
  font-size: .7rem;
  line-height: 1.15;
  letter-spacing: .015em;
  position: relative;
}

.table-column-resize-handle {
  position: absolute;
  z-index: 3;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.table-column-resize-handle::after {
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: 4px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  content: "";
  transition: background-color 150ms ease;
}

.answer-records-table thead th:hover .table-column-resize-handle::after,
.table-column-resize-handle:focus-visible::after {
  background: var(--primary);
}

body.is-resizing-table-column,
body.is-resizing-table-column * {
  cursor: col-resize !important;
  user-select: none !important;
}

.answer-records-table thead .table-sort-btn {
  gap: 4px;
  font-size: .7rem;
  letter-spacing: .015em;
}

.answer-records-table thead .table-sort-btn i {
  font-size: .62rem;
}

.answer-records-table tbody td {
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  font-size: .82rem;
  height: 58px;
  padding: .48rem .6rem;
}

.answer-records-table tbody tr.answer-record-compact-row {
  height: 58px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.answer-records-table tbody tr.answer-record-compact-row:hover {
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 22px rgba(29, 53, 104, .14);
}

.answer-records-table tbody tr.answer-record-compact-row:hover > td {
  background: linear-gradient(90deg, rgba(70, 99, 255, .10), rgba(92, 203, 190, .06)) !important;
}

.answer-record-user-line,
.answer-record-question,
.answer-record-answer {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.answer-record-user-line,
.answer-record-question {
  display: flex;
  align-items: center;
  gap: 7px;
}

.answer-record-user-line > span:last-child,
.answer-record-question > span {
  overflow: hidden;
  color: var(--muted);
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.answer-record-question > span::before { content: "•"; margin-right: 7px; }

.answer-record-feedback {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.answer-record-hover-preview {
  position: fixed;
  z-index: 1100;
  display: none;
  max-width: min(480px, calc(100vw - 28px));
  padding: .65rem .78rem;
  border: 1px solid rgba(88, 111, 255, .35);
  border-radius: 12px;
  background: rgba(16, 27, 54, .96);
  box-shadow: 0 14px 32px rgba(7, 18, 42, .25);
  color: #f6f8ff;
  font-size: .8rem;
  line-height: 1.42;
  pointer-events: none;
  white-space: normal;
}

.answer-record-hover-preview.is-visible { display: block; }

body.theme-dark .answer-record-hover-preview {
  border-color: rgba(235, 193, 64, .45);
  background: rgba(9, 18, 36, .98);
}

.answer-record-role {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(63, 92, 244, .12);
  color: #4264ff;
  font-size: .68rem;
}

.answer-record-role.role-admin { background: rgba(242, 193, 78, .18); color: #b8860b; }
.answer-record-role.role-user { background: rgba(72, 166, 110, .14); color: #358253; }
.answer-record-role.role-other { background: rgba(124, 91, 214, .14); color: #7258ca; }

.answer-record-clickable {
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.answer-record-clickable:hover > *,
.answer-record-clickable:focus-visible > * {
  background-color: rgba(20, 93, 255, .08) !important;
}

.answer-record-clickable:focus-visible {
  outline: 2px solid rgba(20, 93, 255, .62);
  outline-offset: -2px;
}

.answer-record-drawer-backdrop {
  position: fixed;
  z-index: 1060;
  inset: 0;
  visibility: hidden;
  background: rgba(9, 18, 36, .34);
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.answer-record-drawer-backdrop.is-open {
  visibility: visible;
  opacity: 1;
}

.answer-record-drawer {
  position: fixed;
  z-index: 1061;
  top: 0;
  right: 0;
  display: flex;
  width: min(440px, 94vw);
  height: 100dvh;
  flex-direction: column;
  padding: 22px;
  overflow-y: auto;
  border-left: 1px solid rgba(20, 93, 255, .16);
  background: linear-gradient(155deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: -18px 0 48px rgba(9, 18, 36, .2);
  transform: translateX(105%);
  transition: transform 220ms ease;
}

.answer-record-drawer.is-open { transform: translateX(0); }
body.answer-record-drawer-open { overflow: hidden; }

.answer-record-drawer-head,
.answer-record-drawer-heading,
.answer-record-drawer-meta,
.answer-record-drawer-user {
  display: flex;
  align-items: center;
}

.answer-record-drawer-head {
  justify-content: space-between;
  gap: 14px;
}

.answer-record-drawer-heading { gap: 11px; }

.answer-record-drawer-icon {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(20, 93, 255, .12);
  color: #2563eb;
  font-size: 1.1rem;
  place-items: center;
}

.answer-record-drawer-icon.good { background: rgba(34, 197, 94, .14); color: #159947; }
.answer-record-drawer-icon.warn { background: rgba(245, 158, 11, .15); color: #cc8100; }
.answer-record-drawer-icon.bad { background: rgba(239, 68, 68, .13); color: #d33636; }

.answer-record-drawer-heading span,
.answer-record-drawer-label {
  display: block;
  color: #6b7893;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.answer-record-drawer h2 {
  margin: 2px 0 0;
  color: #17213a;
  font-size: 1.15rem;
  font-weight: 800;
}

.answer-record-drawer-close {
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(20, 93, 255, .14);
  border-radius: 10px;
  background: #fff;
  color: #5b6780;
  place-items: center;
}

.answer-record-drawer-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 2px;
  padding: 7px 8px;
  border: 1px solid rgba(20, 93, 255, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .66);
}

.answer-record-drawer-back,
.answer-record-drawer-nav-button {
  border: 0;
  background: transparent;
  color: #3869d9;
  font-size: .72rem;
  font-weight: 800;
}

.answer-record-drawer-back { padding: 4px; }
.answer-record-drawer-back i { margin-right: 5px; }
.answer-record-drawer-position { color: #71809b; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.answer-record-drawer-navigation-buttons { display: inline-flex; gap: 3px; }
.answer-record-drawer-nav-button { display: grid; width: 26px; height: 26px; border: 1px solid rgba(20, 93, 255, .15); border-radius: 8px; background: #fff; place-items: center; }
.answer-record-drawer-nav-button:hover:not(:disabled), .answer-record-drawer-back:hover { color: #174eb6; background: rgba(20, 93, 255, .07); }
.answer-record-drawer-nav-button:disabled { cursor: not-allowed; opacity: .36; }

.answer-record-drawer-meta {
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
  color: #77839a;
  font-size: .78rem;
}

.answer-record-drawer-user {
  gap: 7px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(20, 93, 255, .1);
  color: #53617a;
  font-size: .84rem;
  font-weight: 700;
}

.answer-record-drawer-user i { color: #2f71e9; }

.answer-record-drawer-section {
  padding: 16px 0;
  border-bottom: 1px solid rgba(20, 93, 255, .1);
}

.answer-record-drawer-section p {
  margin: 7px 0 0;
  color: #1b2741;
  font-size: .94rem;
  line-height: 1.5;
  white-space: pre-line;
}

.answer-record-drawer-section small { color: #71809b; font-weight: 700; }
.answer-record-drawer-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer-record-drawer-answers .answer-record-drawer-section { border: 0; }
.answer-record-drawer-answers .correct { border-left: 3px solid #22a353; padding-left: 10px; }
.answer-record-drawer-answers .response { border-left: 3px solid #4a74eb; padding-left: 10px; }
.answer-record-drawer-answers .correct .answer-record-drawer-label { color: #20874a; }
.answer-record-drawer-answers .response .answer-record-drawer-label { color: #3869d9; }

.answer-record-drawer-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.drawer-metric {
  min-width: 0;
  padding: 9px 7px;
  border: 1px solid rgba(20, 93, 255, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  text-align: center;
}

.drawer-metric i { display: block; margin-bottom: 3px; color: #3175e7; font-size: .82rem; }
.drawer-metric span { display: block; overflow: hidden; color: #74819a; font-size: .55rem; font-weight: 800; letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.drawer-metric strong { display: block; margin-top: 2px; color: #17213a; font-size: .84rem; }
.drawer-metric.correctness i { color: #20a354; }.drawer-metric.fluency i { color: #8b5cf6; }.drawer-metric.accent i { color: #2591d6; }.drawer-metric.speed i { color: #c99311; }.drawer-metric.confidence i { color: #d9488d; }
.answer-record-drawer-section.feedback { margin-top: auto; }.answer-record-drawer-section.feedback .answer-record-drawer-label { color: #8059d7; }

@media (max-width: 480px) {
  .answer-record-drawer { padding: 18px; }
  .answer-record-drawer-answers { grid-template-columns: 1fr; gap: 0; }
  .answer-record-drawer-navigation { gap: 5px; padding: 6px; }
  .answer-record-drawer-position { font-size: .62rem; }
  .answer-record-drawer-back { font-size: .66rem; }
}

.answer-records-table tbody tr.answer-record-row-good td:first-child {
  box-shadow: inset 4px 0 0 rgba(34, 197, 94, 0.9);
}

.answer-records-table tbody tr.answer-record-row-good > * {
  background: rgba(34, 197, 94, 0.045);
}

.answer-records-table tbody tr.answer-record-row-warn td:first-child {
  box-shadow: inset 4px 0 0 rgba(245, 158, 11, 0.9);
}

.answer-records-table tbody tr.answer-record-row-warn > * {
  background: rgba(245, 158, 11, 0.05);
}

.answer-records-table tbody tr.answer-record-row-bad td:first-child {
  box-shadow: inset 4px 0 0 rgba(239, 68, 68, 0.9);
}

.answer-records-table tbody tr.answer-record-row-bad > * {
  background: rgba(239, 68, 68, 0.045);
}

.answer-records-table tbody tr.answer-record-row-neutral td:first-child {
  box-shadow: inset 4px 0 0 rgba(20, 93, 255, 0.82);
}

.answer-records-table tbody tr.answer-record-row-neutral > * {
  background: rgba(20, 93, 255, 0.04);
}

.record-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.record-mode-training {
  background: rgba(20, 93, 255, 0.1);
  color: var(--primary);
}

.record-mode-exam {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.record-mode-all {
  background: rgba(11, 184, 168, 0.1);
  color: #0b726a;
}

.answer-record-question,
.answer-record-answer,
.answer-record-feedback {
  line-height: 1.55;
  white-space: pre-line;
}

.answer-record-question {
  max-width: 280px;
}

.answer-record-answer {
  max-width: 150px;
}

.answer-record-feedback {
  max-width: 190px;
  color: var(--muted);
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 5px 7px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
}

.score-pill.score-good {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.score-pill.score-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #d97706;
}

.score-pill.score-bad {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.score-pill.score-neutral {
  background: rgba(20, 93, 255, 0.1);
  color: var(--primary);
}

body.theme-dark .text-secondary {
  color: #a9b8d1 !important;
}

body.theme-dark .text-dark {
  color: var(--text) !important;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .practice-section-toggle,
body.theme-dark .practice-section-menu,
body.theme-dark .sim-card,
body.theme-dark .sim-sidebar,
body.theme-dark .metric-card,
body.theme-dark .result-panel,
body.theme-dark .report-meta-item,
body.theme-dark .report-stat,
body.theme-dark .report-compact-item,
body.theme-dark .question-create-card,
body.theme-dark .question-edit-item,
body.theme-dark .question-bank-pagination,
body.theme-dark .question-bank-empty-state {
  background-color: rgba(10, 18, 32, 0.9);
  color: var(--text);
}

body.theme-dark .question-bank-page-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

body.theme-dark .question-bank-page-btn.is-active {
  color: #ffffff;
}

body.theme-dark .metric-card {
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(37, 99, 235, 0.08)),
    rgba(15, 23, 42, 0.9);
}

body.theme-dark .metric-card-correctness {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(22, 163, 74, 0.1)),
    rgba(15, 23, 42, 0.9);
}

body.theme-dark .metric-card-accent {
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(20, 93, 255, 0.1)),
    rgba(15, 23, 42, 0.9);
}

body.theme-dark .metric-card-fluency {
  background:
    linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(20, 93, 255, 0.1)),
    rgba(15, 23, 42, 0.9);
}

body.theme-dark .metric-card-speed {
  background:
    linear-gradient(135deg, rgba(255, 190, 69, 0.2), rgba(20, 93, 255, 0.1)),
    rgba(15, 23, 42, 0.9);
}

body.theme-dark .metric-card-confidence {
  background:
    linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(20, 93, 255, 0.1)),
    rgba(15, 23, 42, 0.9);
}

body.theme-dark .metric-card-icon {
  background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .metric-card-correctness .metric-card-icon {
  background: rgba(34, 197, 94, 0.2);
}

body.theme-dark .metric-card-accent .metric-card-icon {
  background: rgba(14, 165, 233, 0.2);
}

body.theme-dark .metric-card-fluency .metric-card-icon {
  background: rgba(168, 85, 247, 0.2);
}

body.theme-dark .metric-card-speed .metric-card-icon {
  background: rgba(255, 190, 69, 0.22);
}

body.theme-dark .metric-card-confidence .metric-card-icon {
  background: rgba(236, 72, 153, 0.2);
}

body.theme-dark .form-control::placeholder {
  color: rgba(159, 176, 204, 0.82);
}

body.theme-dark .practice-section-option {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

body.theme-dark .practice-section-count {
  background: rgba(88, 166, 255, 0.12);
  color: #19c2ff;
}

body.theme-dark .practice-section-menu {
  background: rgba(10, 18, 32, 0.98);
}

body.theme-dark .practice-section-toggle {
  background: rgba(10, 18, 32, 0.9);
  color: var(--text);
}

body.theme-dark .practice-section-menu .btn-outline-secondary {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
}

body.theme-dark .practice-section-menu .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

body.theme-dark .report-table,
body.theme-dark .enterprise-table {
  color: var(--text);
}

body.theme-dark .report-table thead th,
body.theme-dark .enterprise-table thead th {
  background: rgba(255, 255, 255, 0.03);
  color: #c7d5eb;
}

body.theme-dark .report-table tbody td,
body.theme-dark .enterprise-table tbody td {
  color: var(--text);
}

body.theme-dark .answer-record-feedback {
  color: rgba(226, 232, 240, 0.76);
}

body.theme-dark .score-pill.score-good {
  background: rgba(34, 197, 94, 0.16);
  color: #8ff0af;
}

body.theme-dark .score-pill.score-warn {
  background: rgba(245, 158, 11, 0.18);
  color: #ffd27a;
}

body.theme-dark .score-pill.score-bad {
  background: rgba(239, 68, 68, 0.16);
  color: #ff9a9a;
}

body.theme-dark .score-pill.score-neutral {
  background: rgba(20, 93, 255, 0.18);
  color: #d2e0ff;
}

body.theme-dark .answer-records-table tbody tr.answer-record-row-good td:first-child {
  box-shadow: inset 4px 0 0 rgba(84, 214, 125, 0.92);
}

body.theme-dark .answer-records-table tbody tr.answer-record-row-good > * {
  background: rgba(84, 214, 125, 0.07);
}

body.theme-dark .answer-records-table tbody tr.answer-record-row-warn td:first-child {
  box-shadow: inset 4px 0 0 rgba(253, 186, 116, 0.92);
}

body.theme-dark .answer-records-table tbody tr.answer-record-row-warn > * {
  background: rgba(253, 186, 116, 0.07);
}

body.theme-dark .answer-records-table tbody tr.answer-record-row-bad td:first-child {
  box-shadow: inset 4px 0 0 rgba(248, 113, 113, 0.92);
}

body.theme-dark .answer-records-table tbody tr.answer-record-row-bad > * {
  background: rgba(248, 113, 113, 0.07);
}

body.theme-dark .answer-records-table tbody tr.answer-record-row-neutral td:first-child {
  box-shadow: inset 4px 0 0 rgba(96, 165, 250, 0.92);
}

body.theme-dark .answer-records-table tbody tr.answer-record-row-neutral > * {
  background: rgba(96, 165, 250, 0.06);
}

body.theme-dark .record-mode-training {
  background: rgba(88, 166, 255, 0.12);
  color: #d9e8ff;
}

body.theme-dark .record-mode-exam {
  background: rgba(245, 158, 11, 0.14);
  color: #ffd79a;
}

body.theme-dark .record-mode-all {
  background: rgba(11, 184, 168, 0.14);
  color: #b8f7ef;
}

body.theme-dark .records-control .form-select {
  background-color: rgba(15, 23, 42, 0.88);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.16);
}

body.theme-dark .records-search-control .form-control {
  background-color: rgba(15, 23, 42, 0.88);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.16);
}

body.theme-dark .records-date-inputs .form-control {
  background-color: rgba(15, 23, 42, 0.88);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.16);
}

body.theme-dark .records-date-inputs .icon-btn {
  background: rgba(148, 163, 184, 0.08);
}

body.theme-dark .records-columns-dropdown .dropdown-menu {
  background: rgba(10, 18, 32, 0.98);
  border-color: rgba(148, 163, 184, 0.18);
}

body.theme-dark .records-columns-dropdown .dropdown-item {
  color: var(--text);
}

body.theme-dark .records-columns-dropdown .dropdown-item:hover {
  background: rgba(88, 166, 255, 0.12);
}

body.theme-dark .sim-controls-note {
  background: rgba(88, 166, 255, 0.08);
  border-color: rgba(88, 166, 255, 0.16);
  color: rgba(226, 232, 240, 0.84);
}

body.theme-dark .sim-controls-note i {
  color: #8fb8ff;
}

body.theme-dark .queue-note {
  color: rgba(226, 232, 240, 0.74);
}

body.theme-dark .session-report-kicker {
  background: rgba(88, 166, 255, 0.12);
  color: #d9e8ff;
}

body.theme-dark .records-pagination {
  border-top-color: rgba(148, 163, 184, 0.16);
}

body.theme-dark .records-pagination-info {
  color: rgba(226, 232, 240, 0.74);
}

body.theme-dark .records-pagination .page-link {
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.16);
  color: #d9e8ff;
}

body.theme-dark .records-pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #145dff, #19c2ff);
  border-color: transparent;
  color: #fff;
}

body.theme-dark .records-pagination .page-item.disabled .page-link {
  background: rgba(15, 23, 42, 0.54);
  color: rgba(226, 232, 240, 0.5);
}

body.theme-dark .coach-answer-callout {
  color: #86efac;
}

body.theme-dark .hero-copy p,
body.theme-dark .panel-head p,
body.theme-dark .settings-hero-copy p,
body.theme-dark .result-summary,
body.theme-dark .result-description,
body.theme-dark .result-recommendation,
body.theme-dark .question-edit-meta,
body.theme-dark .question-edit-created,
body.theme-dark .sim-item-title,
body.theme-dark .sim-item-text,
body.theme-dark .report-meta-item span,
body.theme-dark .report-stat span,
body.theme-dark .report-compact-item span,
body.theme-dark .voice-popup-label,
body.theme-dark .voice-popup-state {
  color: var(--muted);
}

@media (max-width: 767.98px) {
  .billing-gate-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .billing-gate-banner .btn {
    width: 100%;
  }
}

@media print {
  body {
    background: white !important;
  }

  body * {
    visibility: hidden !important;
  }

  .session-report-panel,
  .session-report-panel * {
    visibility: visible !important;
  }

  .session-report-panel {
    position: absolute;
    inset: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
    background: white !important;
    color: #111827;
  }

  .report-actions {
    display: none !important;
  }

  .session-report-panel .report-table-wrap {
    overflow: visible;
  }

  .session-report-panel .report-table {
    min-width: 0;
  }
}

@media (max-width: 1200px) {
  .hero-panel,
  .panel-grid,
  .simulator-layout,
  .analytics-split,
  .analytics-group-grid {
    grid-template-columns: 1fr;
  }

  .interview-toolbar,
  .live-overlay {
    grid-template-columns: 1fr 1fr;
  }

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

  .report-compact-summary {
    grid-template-columns: 1fr;
  }

  .exam-records-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .global-search-wrap {
    width: 280px;
  }

  .glossary-panel {
    position: static;
    top: auto;
  }

  .settings-hero {
    grid-template-columns: 1fr;
  }

  .settings-form > .row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
  }

  .report-meta-grid,
  .report-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .chart-box-donut {
    height: clamp(320px, 44vw, 430px);
    min-height: 320px;
  }
}

@media (max-width: 900px) {
  .interview-current-grid {
    grid-template-columns: 1fr;
  }

  .interview-current-grid .question-timer-wrap {
    flex-basis: 100%;
    width: 100%;
  }

  .question-meta-top {
    flex-wrap: wrap;
  }

  .question-meta-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .question-meta-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1100;
  }

  .sidebar-toggle {
    display: none !important;
  }

  .mobile-sidebar-toggle {
    display: grid !important;
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .sidebar.open {
    transform: translateX(0);
    width: 290px;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 1090;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: rgba(4, 11, 25, .56);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open { overflow: hidden; }

  .app-main,
  .footerbar,
  .topbar {
    margin-left: 0;
    left: 0;
    width: 100%;
  }

  .content-area {
    padding-top: calc(var(--app-header-height) + 12px);
  }

  .topbar {
    padding: 0 16px;
  }

  .footerbar {
    padding: 8px 16px 10px;
  }

  .footerbar-inner {
    align-items: flex-start;
  }

  .header-logo {
    max-width: 140px;
    height: 34px;
  }

  .header-logo-link {
    padding: 3px 7px;
    border-radius: 14px;
  }

  .global-search-wrap {
    display: none;
  }

  .global-search-results {
    display: none !important;
  }

  .flashcard-grid {
    grid-template-columns: 1fr;
  }

  .topic-filter-tools {
    justify-content: flex-start;
  }

  .topic-filter-control,
  .flashcard-control {
    min-width: 0;
    flex: 1 1 100%;
    max-width: none;
  }

  .flashcard-toolbar {
    align-items: flex-start;
  }

  .records-toolbar {
    width: 100%;
    grid-template-columns: 1fr;
    justify-content: flex-start;
  }

  .records-toolbar > .d-flex {
    grid-column: auto;
    justify-content: flex-start;
  }

  .records-control {
    flex: 1 1 100%;
    min-width: 0;
  }

  .records-date-control {
    min-width: 0;
  }

  .records-search-control {
    min-width: 0;
  }

  .records-date-inputs {
    grid-template-columns: 1fr;
  }

  .records-date-inputs .icon-btn {
    width: 100%;
  }

  .records-columns-dropdown {
    width: 100%;
  }

  .records-columns-dropdown .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .chart-box-donut {
    height: clamp(300px, 54vw, 390px);
    min-height: 300px;
  }

  .chart-box-trend {
    height: 160px;
    min-height: 160px;
  }

  .trend-panel .chart-box-trend {
    height: 152px;
    min-height: 152px;
  }

  .content-area {
    padding: calc(var(--app-header-height) + 12px) 14px 126px;
  }

  .hero-panel,
  .panel-card {
    padding: 18px;
  }

  .hero-benefits {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(1.32rem, 4.8vw, 1.65rem);
  }

  .settings-hero {
    padding: 20px;
  }

  .settings-hero-cards {
    grid-template-columns: 1fr;
  }

  .header-logo {
    max-width: 128px;
    height: 32px;
  }

  .header-logo-link {
    padding: 3px 6px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .exam-records-summary-grid {
    grid-template-columns: 1fr;
  }

  .flashcard-card-face,
  .flashcard-timer-card,
  .flashcard-answer-wrap {
    padding: 16px;
  }

  .flashcard-bilingual-grid {
    grid-template-columns: 1fr;
  }

  .flashcard-language-panel {
    padding: 14px;
  }

  .flashcard-countdown {
    width: 92px;
    height: 92px;
  }

  .flashcard-phase {
    font-size: 0.7rem;
  }

  .interview-toolbar,
  .live-overlay,
  .analytics-split,
  .analytics-group-grid {
    grid-template-columns: 1fr;
  }

  .interview-toolbar {
    position: static;
    top: auto;
    z-index: auto;
  }

  .queue-head-row {
    flex-direction: column;
  }

  .queue-head-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .queue-practice-picker {
    width: 100%;
  }

  .queue-practice-picker .practice-section-toggle,
  .queue-practice-picker .practice-section-menu {
    min-width: 100%;
  }

  .question-timer-wrap {
    min-width: 0;
    width: 100%;
  }

  .question-timer {
    font-size: 0.84rem;
    letter-spacing: 0.01em;
  }

  .metric-panel {
    grid-template-columns: 1fr 1fr;
  }

  .settings-page {
    gap: 20px;
  }

  .settings-card {
    padding: 20px;
  }

  .report-meta-grid,
  .report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-compact-summary {
    grid-template-columns: 1fr;
  }

  .session-report-panel {
    padding: 18px;
  }

  .footer-copy {
    max-width: 100%;
    font-size: 0.74rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .footer-social a {
    width: 30px;
    height: 30px;
  }

  .footerbar {
    min-height: var(--app-footer-min-height);
    padding: 5px 12px 7px;
  }

  .footerbar-inner {
    gap: 6px;
  }

  .footer-social {
    gap: 6px;
  }
}

/* Compact dashboard analytics: retain the information without the oversized cards. */
body.section-dashboard .analytics-group-panel {
  padding: 14px;
}

body.section-dashboard .analytics-group-panel > .panel-head {
  padding-bottom: 10px;
}

body.section-dashboard .analytics-group-panel > .panel-head h2 {
  font-size: clamp(1rem, 0.85vw + 0.82rem, 1.24rem);
}

body.section-dashboard .analytics-group-panel > .panel-head p,
body.section-dashboard .analytics-subpanel .panel-head p {
  font-size: 0.88rem;
}

body.section-dashboard .analytics-group-grid {
  gap: 12px;
}

body.section-dashboard .analytics-subpanel {
  gap: 9px;
  padding: 12px;
  border-radius: 16px;
}

body.section-dashboard .analytics-subpanel .panel-head h2 {
  font-size: 1rem;
}

body.section-dashboard .glossary-list {
  gap: 8px;
}

body.section-dashboard .glossary-item {
  border-radius: 14px;
  padding: 10px 12px;
}

body.section-dashboard .glossary-item-top {
  margin-bottom: 3px;
}

body.section-dashboard .glossary-item-count {
  margin-bottom: 0;
  font-size: 0.76rem;
}

body.section-dashboard .glossary-item-desc {
  font-size: 0.82rem;
  line-height: 1.35;
}

body.section-dashboard .topic-filter-control .form-select {
  min-height: 34px;
  border-radius: 11px;
}

body.section-dashboard .topic-filter-control {
  min-width: 150px;
  max-width: 210px;
}

body.section-dashboard .topic-distribution-panel .chart-box-donut {
  height: clamp(170px, 13vw, 205px);
  min-height: 170px;
  padding: 6px;
  border-radius: 20px;
}

@media (max-width: 768px) {
  body.section-dashboard .topic-distribution-panel .chart-box-donut {
    height: 205px;
    min-height: 205px;
  }
}


/* CitizenshipAI dashboard refresh */
.brand-title {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand-title span {
  color: #fff1a8;
  background: linear-gradient(90deg, #f2c14e, #ffe78b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  margin-top: 5px;
  line-height: 1.35;
}

body.section-dashboard .topbar {
  height: var(--app-header-height);
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.22);
}

/* Dashboard dark-theme completion: every widget keeps the same dark surface
   instead of reverting to a light card, table, or chart panel. */
body.theme-dark.section-dashboard .analytics-subpanel,
body.theme-dark.section-dashboard .topic-readiness-panel,
body.theme-dark.section-dashboard .flashcard-report-stat,
body.theme-dark.section-dashboard .flashcard-report-list,
body.theme-dark.section-dashboard .literacy-dashboard-stats > div,
body.theme-dark.section-dashboard .literacy-pass-chart,
body.theme-dark.section-dashboard .records-metric-card {
  border-color: rgba(148, 163, 184, .18);
  background: linear-gradient(145deg, rgba(15, 23, 42, .96), rgba(10, 18, 32, .92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

body.theme-dark.section-dashboard .flashcard-report-stat strong,
body.theme-dark.section-dashboard .literacy-dashboard-stats strong,
body.theme-dark.section-dashboard .literacy-pass-chart strong,
body.theme-dark.section-dashboard .literacy-pass-label strong {
  color: #e7eefc;
}

body.theme-dark.section-dashboard .flashcard-report-stat span,
body.theme-dark.section-dashboard .flashcard-report-list span,
body.theme-dark.section-dashboard .literacy-dashboard-stats span,
body.theme-dark.section-dashboard .literacy-dashboard-stats small,
body.theme-dark.section-dashboard .literacy-pass-chart p,
body.theme-dark.section-dashboard .literacy-pass-label {
  color: #aebbd1;
}

body.theme-dark.section-dashboard .literacy-pass-track {
  background: #25324b;
}

body.theme-dark.section-dashboard .records-metric-card .report-compact-icon {
  background: linear-gradient(135deg, #1b2b49, #163d55);
}

body.theme-dark.section-dashboard .enterprise-table {
  --bs-table-bg: rgba(10, 18, 32, .9);
  --bs-table-striped-bg: rgba(30, 41, 59, .58);
  --bs-table-striped-color: #e7eefc;
  --bs-table-color: #e7eefc;
  --bs-table-border-color: rgba(148, 163, 184, .16);
}

body.theme-dark.section-dashboard .records-summary-table thead th,
body.theme-dark.section-dashboard .answer-records-table thead th {
  background: linear-gradient(135deg, rgba(44, 74, 136, .72), rgba(24, 67, 87, .72));
  color: #eff5ff;
}

body.theme-dark.section-dashboard .chart-box-donut {
  background:
    radial-gradient(circle at 18% 16%, rgba(88, 166, 255, .12), transparent 40%),
    linear-gradient(145deg, rgba(15, 23, 42, .96), rgba(10, 18, 32, .94));
}

/* Reserve the fixed header once, outside the content, then leave a compact
   12px gap above the dashboard frame (including on mobile). */
body.section-dashboard .app-main {
  padding-top: var(--app-header-height);
}

body.section-dashboard .content-area {
  padding: 12px 12px 90px;
  max-width: 1640px;
  width: 100%;
  margin: 0 auto;
}

body.section-dashboard .page-kicker {
  border-radius: 14px;
  padding: 4px 9px;
  letter-spacing: 0.12em;
  background: rgba(242, 193, 78, 0.08);
  border-color: rgba(242, 193, 78, 0.32);
}

body.section-dashboard .page-title {
  color: #ffe17a;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.header-utility-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
}

.notification-trigger {
  position: relative;
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sidebar);
  border-radius: 999px;
  color: #ffffff;
  background: #e35d4f;
  font-size: 0.54rem;
  font-weight: 800;
  line-height: 1;
}

.header-notification-menu {
  width: min(280px, calc(100vw - 28px));
  padding: 8px;
}

.header-notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-notification-head strong {
  font-size: 0.82rem;
}

.header-notification-head span {
  color: #8de3ae;
  font-size: 0.68rem;
  font-weight: 750;
}

.header-notification-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  color: rgba(237, 244, 255, 0.84);
  font-size: 0.76rem;
}

.header-notification-empty i {
  color: #7ed69a;
}

.header-notification-item {
  color: #f4c65d !important;
}

.header-notification-item:hover,
.header-notification-item:focus {
  color: #ffffff !important;
  background: rgba(242, 193, 78, 0.16) !important;
}

.header-information-menu {
  min-width: 236px;
}

.topbar-actions {
  gap: 10px;
}

/* Compact navigation chrome: preserve 44px navigation targets while removing
   the unused vertical space visible on desktop dashboards. */
.sidebar {
  padding: 16px 14px;
}

.sidebar-brand {
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 1.1rem;
}

.brand-badges {
  gap: 4px;
  margin-top: 4px;
}

.brand-badge-mini {
  gap: 5px;
  padding: 4px 7px;
  font-size: 0.66rem;
}

.sidebar-nav {
  gap: 6px;
  padding-bottom: 12px;
}

.sidebar-mode-group {
  margin: 0.2rem 0 0.45rem;
  padding: 0.45rem;
  border-radius: 16px;
}

.sidebar-mode-label {
  padding: 0.16rem 0.58rem 0.34rem;
}

.sidebar-mode-group .nav-item {
  margin: 0.1rem 0;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.nav-item {
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
}

.sidebar-footer {
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 14px;
}

.sidebar-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.mobile-sidebar-toggle {
  display: none;
}

.sidebar .brand-copy {
  max-width: 164px;
}

.sidebar .brand-subtitle {
  margin-top: 2px;
  font-size: .68rem;
  line-height: 1.2;
}

.sidebar.collapsed .sidebar-toggle {
  right: 50%;
  transform: translateX(50%);
}

.sidebar.collapsed .brand-mark {
  opacity: 0;
  pointer-events: none;
}

body.section-dashboard .header-logo {
  max-width: 128px;
  height: 40px;
}

body.section-dashboard .header-logo-link {
  padding: 3px 6px;
  border-radius: 13px;
}

body.section-dashboard .top-search {
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 14px;
}

body.section-dashboard .top-search {
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(50, 91, 155, 0.19);
  border-color: rgba(111, 158, 229, 0.22);
}

body.section-dashboard .hero-panel {
  grid-template-columns: minmax(0, 1.18fr) minmax(350px, 0.82fr);
  gap: 24px;
  padding: 30px;
  border-radius: 24px;
  align-items: stretch;
  background:
    linear-gradient(122deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.9)),
    var(--panel);
  border-color: rgba(30, 68, 128, 0.14);
}

body.theme-dark.section-dashboard .hero-panel {
  background: linear-gradient(122deg, rgba(13, 27, 54, 0.96), rgba(9, 20, 41, 0.93));
  border-color: rgba(113, 158, 229, 0.16);
}

body.section-dashboard .hero-title {
  max-width: none;
  font-size: clamp(1.05rem, 1.42vw, 1.42rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  white-space: normal;
}

body.section-dashboard .hero-copy > p {
  max-width: 780px;
  font-size: 1rem;
  line-height: 1.7;
}

body.section-dashboard .hero-stats {
  align-content: center;
  gap: 14px;
}

body.section-dashboard .dashboard-stat-card {
  min-height: 124px;
  height: 124px;
  padding: 10px 12px;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(15, 38, 78, 0.1);
}

body.section-dashboard .hero-stats {
  gap: 10px;
}

body.section-dashboard .dashboard-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

body.section-dashboard .dashboard-stat-chip {
  padding: 4px 8px;
  font-size: .62rem;
}

body.section-dashboard .dashboard-stat-copy {
  margin-top: 2px;
}

body.section-dashboard .dashboard-stat-copy .stat-label {
  font-size: .68rem;
}

body.section-dashboard .dashboard-stat-copy .stat-value {
  font-size: clamp(1.25rem, 1.55vw, 1.55rem);
}

body.section-dashboard .dashboard-stat-foot {
  margin-top: 3px;
  font-size: .67rem;
}

@media (max-width: 700px) {
  body.section-dashboard .dashboard-stat-card { height: 116px; min-height: 116px; }
}

body.section-dashboard .panel-card {
  border-radius: 20px;
}

@media (max-width: 1100px) {
  body.section-dashboard .hero-panel {
    grid-template-columns: 1fr;
  }

  body.section-dashboard .hero-title {
    white-space: normal;
  }
}

/* Compact translation and account controls in the application header. */
.translate-menu {
  position: relative;
}

.translate-icon-btn,
.profile-menu-trigger {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  padding: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.translate-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #edf4ff;
  font: 800 1rem/1 Arial, sans-serif;
  box-shadow: none;
}

.translate-icon-btn i {
  font-size: 0.82rem;
}

.profile-menu-trigger {
  background: rgba(255, 255, 255, 0.08);
  color: #edf4ff;
  box-shadow: none;
}

.profile-menu-trigger i {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
  color: currentColor !important;
  filter: none !important;
  font-size: 0.82rem;
}

.translate-icon-btn:hover,
.translate-icon-btn:focus-visible,
.profile-menu-trigger:hover,
.profile-menu-trigger:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.28);
  outline: none;
}

.translate-dropdown {
  min-width: 236px;
  margin-top: 12px !important;
  border-radius: 16px !important;
}

.translate-dropdown-title {
  margin-bottom: 10px;
  color: var(--sidebar-text);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.translate-dropdown .goog-te-gadget {
  color: transparent;
  font-size: 0;
}

.translate-dropdown .goog-te-gadget select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 0 9px;
  background: #ffffff;
  color: #0f1f35;
  font-size: 0.9rem;
}

.profile-dropdown {
  min-width: 216px;
  margin-top: 12px !important;
  padding: 8px;
  border-radius: 16px !important;
}

.profile-dropdown-head {
  display: grid;
  gap: 3px;
  padding: 9px 10px 7px;
  color: var(--sidebar-text);
}

.profile-role {
  color: rgba(237, 244, 255, 0.65);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.profile-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 9px 10px;
  font-weight: 700;
}

.profile-dropdown .dropdown-item i {
  width: 16px;
  text-align: center;
}

.profile-dropdown .profile-logout {
  color: #ff9e9e;
}

.profile-dropdown .profile-logout:hover,
.profile-dropdown .profile-logout:focus {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.24);
}

/* Phone and tablet header: keep navigation available and prevent header
   controls from wrapping or pushing the page title into a second row. */
@media (max-width: 992px) {
  :root {
    --app-header-height: 60px;
  }

  .sidebar {
    padding: 12px;
  }

  .sidebar-brand {
    gap: 8px;
    margin-bottom: 6px;
  }

  .sidebar .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 1rem;
  }

  .sidebar .brand-copy {
    max-width: 190px;
  }

  .sidebar .brand-title {
    font-size: .98rem;
    line-height: 1.12;
  }

  .sidebar .brand-subtitle {
    margin-top: 1px;
    font-size: .7rem;
    line-height: 1.18;
  }

  .sidebar .brand-badges {
    gap: 3px;
    margin-top: 3px;
  }

  .sidebar .brand-badge-mini {
    padding: 3px 6px;
    font-size: .61rem;
  }

  .topbar,
  body.section-dashboard .topbar {
    height: var(--app-header-height);
    padding: 0 12px;
  }

  .sidebar {
    top: var(--app-header-height);
    height: calc(100vh - var(--app-header-height));
    height: calc(100dvh - var(--app-header-height));
  }

  .mobile-sidebar-toggle {
    display: grid;
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .topbar-start,
  .header-brand {
    gap: 8px;
  }

  .header-brand-copy {
    display: none;
  }

  .header-logo {
    max-width: 96px;
    height: 30px;
  }

  body.section-dashboard .header-logo {
    max-width: 96px;
    height: 30px;
  }

  .header-logo-link,
  body.section-dashboard .header-logo-link {
    padding: 2px 5px;
    border-radius: 11px;
  }

  .topbar-actions {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .header-utility-btn,
  .translate-icon-btn,
  .profile-menu-trigger {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }

  .content-area {
    padding-top: calc(var(--app-header-height) + 12px);
  }

  body.section-dashboard .app-main {
    padding-top: var(--app-header-height);
  }

  body.section-dashboard .content-area {
    padding-top: 12px;
  }
}

@media (max-width: 390px) {
  .translate-menu {
    display: none;
  }

  .header-logo {
    max-width: 82px;
  }
}

/* Interview settings are intentionally kept out of the live practice workspace. */

/* Focused civics-practice workspace. This is separate from the dashboard flash cards. */
.section-civics-practice .content-area {
  max-width: 1440px;
}

.civics-practice-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid #dce5fa;
  border-radius: 22px;
  background: linear-gradient(120deg, #f7faff 0%, #ffffff 60%, #eef6ff 100%);
}

.civics-eyebrow {
  color: #4564d9;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.civics-practice-hero h1 {
  margin: .35rem 0 .5rem;
  color: #17233f;
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  font-weight: 800;
}

.civics-practice-hero p {
  max-width: 760px;
  margin: 0;
  color: #687793;
}

.civics-practice-layout {
  display: grid;
  grid-template-columns: minmax(225px, .75fr) minmax(0, 2fr) minmax(190px, .62fr);
  gap: 1.25rem;
  align-items: stretch;
}

.civics-practice-controls,
.civics-card-shell,
.civics-session-summary {
  border: 1px solid #dfe5f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(33, 57, 103, .06);
}

.civics-practice-controls {
  padding: 1.15rem;
}

.civics-controls-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: 1rem;
  color: #17233f;
  font-weight: 800;
}

.civics-practice-controls label {
  display: block;
  margin: .85rem 0 .35rem;
  color: #687793;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.civics-practice-controls .form-select {
  min-height: 42px;
  border-color: #dce3ef;
}

.civics-build-btn {
  width: 100%;
  margin-top: 1.25rem;
}

.civics-bank-note {
  margin: 1rem 0 0;
  color: #71809b;
  font-size: .8rem;
  line-height: 1.5;
}

.civics-bank-note i { color: #5a77dd; margin-right: .3rem; }

.civics-card-shell {
  display: flex;
  flex-direction: column;
  min-height: 430px;
  padding: 1.5rem;
}

.civics-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 1px solid #edf0f5;
  padding-bottom: 1rem;
}

.civics-topic-badge {
  border-radius: 999px;
  background: #edf2ff;
  color: #4564d9;
  padding: .38rem .7rem;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.civics-progress-text { color: #71809b; font-size: .86rem; font-weight: 700; }

.civics-empty-state {
  display: grid;
  place-content: center;
  flex: 1;
  min-height: 320px;
  text-align: center;
  color: #71809b;
}

.civics-empty-state i { color: #5674e8; font-size: 2.25rem; margin-bottom: .75rem; }
.civics-empty-state h2 { color: #1b2946; font-size: 1.35rem; font-weight: 800; }
.civics-empty-state p { margin: 0; }

#civicsQuestionContent { padding-top: 2.35rem; }
.civics-question-label { color: #5873db; font-size: .74rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.civics-card-shell h2 { max-width: 850px; margin: .6rem 0 .9rem; color: #17233f; font-size: clamp(1.55rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.22; }
.civics-description { color: #71809b; font-size: 1rem; }

.civics-answer-panel {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid #cdeadd;
  border-radius: 13px;
  background: #f1fcf6;
}

.civics-answer-panel span { display: block; color: #32845e; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.civics-answer-panel strong { display: block; margin-top: .35rem; color: #1c533e; font-size: 1.08rem; }

.civics-card-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: auto; padding-top: 1rem; }

.civics-session-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.4rem 1.1rem;
  text-align: center;
}

.civics-session-summary > span { color: #71809b; font-size: .73rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.civics-session-summary > strong { margin-top: .45rem; color: #4564d9; font-size: 3.15rem; line-height: 1; }
.civics-session-summary > small { margin-top: .4rem; color: #71809b; }
.civics-progress-track { width: 100%; height: 9px; margin: 1.25rem 0 .9rem; overflow: hidden; border-radius: 999px; background: #e8edf7; }
.civics-progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #456cf1, #20ba9c); transition: width .25s ease; }
.civics-session-summary p { margin: 0; color: #71809b; font-size: .82rem; line-height: 1.55; }

body.theme-dark .civics-practice-hero,
body.theme-dark .civics-practice-controls,
body.theme-dark .civics-card-shell,
body.theme-dark .civics-session-summary { border-color: #33415d; background: #1c263a; }
body.theme-dark .civics-practice-hero { background: linear-gradient(120deg, #1c263a, #172034); }
body.theme-dark .civics-practice-hero h1,
body.theme-dark .civics-controls-heading,
body.theme-dark .civics-card-shell h2,
body.theme-dark .civics-empty-state h2 { color: #edf3ff; }
body.theme-dark .civics-practice-hero p,
body.theme-dark .civics-description,
body.theme-dark .civics-progress-text,
body.theme-dark .civics-session-summary > small,
body.theme-dark .civics-session-summary p,
body.theme-dark .civics-bank-note { color: #aebbd1; }
body.theme-dark .civics-card-toolbar { border-color: #33415d; }
body.theme-dark .civics-practice-controls .form-select { border-color: #435170; background-color: #253149; color: #edf3ff; }

@media (max-width: 1100px) {
  .civics-practice-layout { grid-template-columns: minmax(210px, .8fr) minmax(0, 2fr); }
  .civics-session-summary { grid-column: 1 / -1; min-height: auto; }
  .civics-session-summary p { max-width: 370px; }
}

@media (max-width: 760px) {
  .civics-practice-hero { align-items: start; flex-direction: column; padding: 1.25rem; }
  .civics-practice-layout { grid-template-columns: 1fr; }
  .civics-session-summary { grid-column: auto; }
  .civics-card-shell { min-height: 360px; padding: 1.15rem; }
  .civics-card-toolbar { align-items: start; flex-direction: column; }
}
.interview-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.interview-header-loading {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 190px;
  padding: 8px 10px;
  border: 1px solid rgba(20, 93, 255, .22);
  border-radius: 12px;
  background: rgba(238, 244, 255, .9);
  color: #2453a6;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.interview-header-loading-track {
  width: 38px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 93, 255, .15);
}

.interview-header-loading-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3f67ef, #72c7ea);
  transition: width 160ms ease;
}

body.theme-dark .interview-header-loading {
  border-color: rgba(126, 164, 255, .3);
  background: rgba(35, 53, 90, .92);
  color: #c8dcff;
}

.interview-settings-trigger {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease;
}

.interview-settings-trigger:hover,
.interview-settings-trigger:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(20, 93, 255, 0.45);
  outline: none;
}

.interview-quick-settings {
  display: flex;
  align-items: end;
  gap: 9px;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(10, 23, 48, 0.07);
}

.interview-quick-settings > div {
  width: min(240px, 100%);
}

.interview-quick-settings .form-label,
.interview-settings-grid .form-label {
  margin-bottom: 0.25rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.interview-quick-settings .form-select,
.interview-settings-grid .form-select,
.interview-settings-grid .form-control {
  min-height: 38px;
  border-radius: 11px;
  font-size: .82rem;
}

.interview-settings-grid .form-select:not(:disabled),
.interview-settings-grid .form-control:not(:disabled),
.interview-settings-grid .form-check-input:not(:disabled) {
  background-color: #ffffff;
  color: #20283a;
  cursor: pointer;
  opacity: 1;
}

.interview-settings-grid .form-select:not(:disabled):focus,
.interview-settings-grid .form-control:not(:disabled):focus {
  border-color: #4770ff;
  box-shadow: 0 0 0 .22rem rgba(71, 112, 255, .16);
}

.quick-settings-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(20, 93, 255, 0.2);
  border-radius: 11px;
  background: rgba(20, 93, 255, 0.08);
  color: var(--text);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.quick-settings-button i { font-size: .84rem; }

/* Shared, compact control system: keeps toolbar actions uniform at every zoom
   level instead of allowing individual pages to produce oversized buttons. */
.btn,
.form-control,
.form-select,
.quick-settings-button {
  font-size: .84rem;
}

.btn {
  min-height: 36px;
  padding: .46rem .76rem;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.btn-sm {
  min-height: 32px;
  padding: .34rem .6rem;
  font-size: .78rem;
}

.quick-settings-button {
  min-height: 36px;
  padding: 0 .78rem;
  border-radius: 10px;
}

/* One sidebar toggle only. It remains in the sidebar at all breakpoints. */
.sidebar-toggle {
  display: grid !important;
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.header-utility-btn,
.translate-icon-btn,
.profile-menu-trigger {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 13px;
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
}

.header-utility-btn:hover,
.translate-icon-btn:hover,
.profile-menu-trigger:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .36);
}

@media (max-width: 992px) {
  .sidebar-toggle { display: none !important; }
  .mobile-sidebar-toggle { display: grid !important; }
}

@media (max-width: 620px) {
  html { font-size: 14px; }
  .header-utility-btn,
  .translate-icon-btn,
  .profile-menu-trigger { width: 34px; height: 34px; min-width: 34px; border-radius: 11px; }
}

.popup-settings-btn {
  min-height: 32px !important;
  padding: .3rem .5rem !important;
  border-color: rgba(20, 93, 255, .28) !important;
  color: #3561d8 !important;
  font-size: .72rem !important;
  font-weight: 800 !important;
}

.popup-settings-btn i { margin-right: .2rem; font-size: .72rem !important; }

.interview-settings-modal .modal-content {
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.28);
}

.interview-settings-modal .modal-header,
.interview-settings-modal .modal-footer {
  flex: 0 0 auto;
  border-color: var(--border);
  padding: 10px 16px;
}

.interview-settings-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 13px 16px;
}

.interview-settings-modal .modal-title {
  margin: 0;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  line-height: 1.2;
}

.interview-settings-modal .modal-dialog {
  width: min(1040px, calc(100vw - 28px));
  max-width: none;
  margin: 16px auto;
}

/* Keep the draggable interview overlay out of the settings dialog's backdrop. */
body.modal-open .voice-popup {
  visibility: hidden;
}

.modal-kicker {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.interview-settings-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px 12px;
  align-items: start;
}

.interview-settings-grid > div {
  min-width: 0;
}

.interview-settings-grid .exam-skip-toggle {
  grid-column: span 2;
}

.interview-settings-grid .form-text {
  margin-top: 5px;
  font-size: .7rem;
  line-height: 1.3;
}

.interview-settings-grid .form-label { margin-bottom: 5px; font-size: .68rem !important; letter-spacing: .08em; }
.interview-settings-grid .form-select,
.interview-settings-grid .form-control {
  min-height: 40px;
  padding: .42rem .65rem;
  font-size: .76rem !important;
  line-height: 1.25;
}
.settings-info { margin-left: 4px; color: #6c8ff5; cursor: help; font-size: .72rem; }
.settings-info:hover { color: #d79d25; }

.interview-settings-grid #statusBadge {
  background: rgba(20, 93, 255, 0.08);
  color: var(--text);
  font-weight: 800;
}

.settings-save-note {
  margin-right: auto;
  color: var(--muted);
  font-size: 0.84rem;
}

body.theme-dark .interview-quick-settings,
body.theme-dark .interview-settings-modal .modal-content {
  background: #0f1a2e;
}

body.theme-dark .interview-settings-modal .btn-close {
  filter: invert(1);
}

@media (max-width: 1200px) {
  .interview-settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .interview-head-actions {
    align-self: flex-start;
  }

  .interview-quick-settings {
    align-items: stretch;
    flex-direction: column;
  }

  .interview-quick-settings > div,
  .quick-settings-button {
    width: 100%;
  }

  .interview-settings-modal .modal-body,
  .interview-settings-modal .modal-header,
  .interview-settings-modal .modal-footer {
    padding: 14px 16px;
  }

  .interview-settings-modal .modal-dialog {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
  }

  .interview-settings-modal .modal-content {
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .interview-settings-grid {
    grid-template-columns: 1fr;
  }

  .interview-settings-grid .exam-skip-toggle {
    grid-column: auto;
  }

  .settings-save-note {
    display: none;
  }
}

@media (max-width: 1200px) {
  .guide-hero {
    grid-template-columns: 1fr;
  }

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

  .guide-screenshot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .guide-hero {
    padding: 18px;
  }

  .guide-hero-actions {
    flex-direction: column;
  }

  .guide-hero-actions .btn {
    width: 100%;
  }

  .guide-step-grid,
  .guide-screenshot-grid {
    grid-template-columns: 1fr;
    padding-left: 16px;
    padding-right: 16px;
  }

  .guide-tip-card {
    padding: 16px;
  }

  .guide-screenshot-card {
    padding: 12px;
  }
}

.session-report-panel .report-meta-grid,
.session-report-panel .report-summary-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.session-report-panel .report-meta-item,
.session-report-panel .report-stat { --report-accent: #4773d4; padding: 13px; min-width: 0; border-radius: 12px; border: 1px solid rgba(100, 135, 190, .2); border-top: 3px solid var(--report-accent); background: linear-gradient(150deg, rgba(100, 155, 240, .07), rgba(100, 155, 240, .02)); box-shadow: 0 3px 10px rgba(30, 55, 95, .04); }
.session-report-panel .report-stat:nth-child(3n+1),
.session-report-panel .report-meta-item:nth-child(3n+1) { --report-accent: #168a79; }
.session-report-panel .report-stat:nth-child(3n+2),
.session-report-panel .report-meta-item:nth-child(3n+2) { --report-accent: #8660c7; }
.session-report-panel .report-meta-item > span,
.session-report-panel .report-stat > span { display: flex; align-items: center; gap: 6px; letter-spacing: .025em; text-transform: none; font-size: .73rem; line-height: 1.4; }
.session-report-panel .report-meta-item > span i,
.session-report-panel .report-stat > span i { color: var(--report-accent); font-size: .9rem; }
.session-report-panel .report-meta-item strong,
.session-report-panel .report-stat strong { font-size: 1rem; line-height: 1.45; font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media (max-width: 1199px) { .session-report-panel .report-meta-grid, .session-report-panel .report-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .session-report-panel .report-meta-grid, .session-report-panel .report-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body:has(#voicePopup:not(.hidden)) #pageScrollControls { display: none !important; }
.voice-popup-learner { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 5px 9px; border: 1px solid rgba(90, 130, 200, .25); border-radius: 9px; color: inherit; font-size: .78rem; font-weight: 600; }
.voice-popup-info { order: 0; margin: 0 45px 12px 0; font-size: .8rem; }
.voice-popup-info summary { cursor: pointer; color: #3b69ca; font-weight: 650; width: fit-content; }
.voice-popup-info .voice-popup-practice-notice { margin: 8px 0 0; }

/* The interview scene is dark even when the surrounding site uses light mode. */
.voice-popup.exam-voice-only .voice-popup-card { color: #edf4ff; }
.voice-popup.exam-voice-only .voice-popup-learner {
  color: #edf4ff;
  background: #203653;
  border-color: #6984a6;
}
.voice-popup.exam-voice-only .voice-popup-citizenship-brand { color: #e4edff; }
.voice-popup.exam-voice-only .voice-popup-citizenship-brand small { color: #c0cfe5; }
.voice-popup.exam-voice-only .voice-popup-info summary { color: #b9d5ff; }
.voice-popup.exam-voice-only .voice-popup-practice-notice { color: #d7e4f7; }
.voice-popup.exam-voice-only .voice-popup-exam-type {
  background: #203c58;
  border-color: #7aa4c8;
  color: #e4f4ff;
}
.voice-popup.exam-voice-only .voice-popup-exam-type i { color: #a3dfff; }
.voice-popup.exam-voice-only .voice-popup-evaluation-mode {
  background: #352d58;
  border-color: #9581ca;
  color: #e0d2ff;
}
.voice-popup.exam-voice-only .voice-popup-evaluation-mode small { color: #e0d2ff; }
.voice-popup.exam-voice-only #popupResizeBtn,
.voice-popup.exam-voice-only .popup-settings-btn {
  color: #e6edff;
  background: #263a57;
  border-color: #91a8cb;
}
.voice-popup.exam-voice-only #popupResizeBtn:hover,
.voice-popup.exam-voice-only .popup-settings-btn:hover {
  color: #fff;
  background: #3b5276;
  border-color: #c1d5f7;
}
.voice-popup.exam-voice-only .voice-popup-actions button:focus-visible {
  outline: 3px solid #b9deff;
  outline-offset: 3px;
}
#voicePopup.is-expanded { inset: 8px !important; transform: none !important; width: auto !important; height: auto !important; max-width: none !important; }
#voicePopup.is-expanded .voice-popup-card { width: 100% !important; height: 100% !important; min-width: 0 !important; max-width: none !important; max-height: calc(100dvh - 16px) !important; overflow-y: auto; resize: none; }

/* Completed-report scorecards and actions use a deliberate navy, gold, and
   blue system so the final report reads like a polished study card set. */
.session-report-panel .report-compact-item {
  min-height: 132px;
  padding: 18px 22px;
  border: 1px solid rgba(132, 149, 203, .34);
  border-radius: 22px;
  background: linear-gradient(135deg, #161d38 0%, #262e4b 100%);
  box-shadow: 0 12px 24px rgba(15, 25, 55, .14);
}
.session-report-panel .report-compact-item span {
  color: #d8c77d;
  font-size: .74rem;
  letter-spacing: .13em;
}
.session-report-panel .report-compact-item strong {
  margin-top: 14px;
  color: #fff;
  font-size: 1.38rem;
}
.session-report-panel .report-meta-item,
.session-report-panel .report-stat {
  min-height: 106px;
  padding: 18px 20px;
  border-color: #dce5f5;
  background: linear-gradient(135deg, #fff 0%, #f4f7fe 100%);
  box-shadow: 0 7px 18px rgba(49, 78, 139, .07);
}
.session-report-panel .report-meta-item > span,
.session-report-panel .report-stat > span {
  color: #7a89a8;
  font-size: .78rem;
  text-transform: none;
}
.session-report-panel .report-meta-item strong,
.session-report-panel .report-stat strong { margin-top: 10px; color: #16213b; font-size: 1.05rem; }
.session-report-panel .report-session-details { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 780px; }
.report-actions { align-items: center; justify-content: flex-end; gap: 10px; }
.report-actions .btn {
  min-height: 46px;
  padding: 10px 17px;
  border-width: 2px;
  border-radius: 13px;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.report-actions #printReportBtn { color: #172033; border-color: #172033; background: #fff; }
.report-actions #downloadReportCsvBtn { color: #697386; border-color: #788393; background: #fff; }
.report-actions #downloadReportPdfBtn { color: #4268f6; border-color: #4268f6; background: #f8faff; }
.report-actions #downloadReportPdfBtn:hover { color: #fff; background: #4268f6; }
.report-translation-control {
  display: grid;
  grid-template-columns: auto minmax(145px, 190px);
  align-items: center;
  gap: 4px 9px;
  padding: 8px 11px;
  border: 1px solid #dce5f5;
  border-radius: 13px;
  background: #f8faff;
  color: #52627f;
  font-size: .76rem;
  font-weight: 700;
}
.report-translation-control small { grid-column: 1 / -1; color: #7b89a4; font-size: .68rem; font-weight: 500; }
.report-translation-control .form-select { min-height: 34px; border-color: #cfdaf0; color: #314564; font-weight: 700; }
@media (max-width: 820px) {
  .report-actions { justify-content: flex-start; }
  .report-translation-control { width: 100%; grid-template-columns: auto minmax(0, 1fr); }
}

/* Compact report flash cards: one clear icon, label, and score per card. */
.session-report-panel .report-compact-item {
  min-height: 104px;
  padding: 13px 16px;
  border-radius: 18px;
}
.session-report-panel .report-compact-heading { display: flex; align-items: center; gap: 8px; }
.session-report-panel .report-compact-heading .report-compact-icon {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  place-items: center;
  border-radius: 9px;
  background: rgba(242, 193, 78, .15);
  color: #ffe48a;
}
.session-report-panel .report-compact-heading .report-compact-icon i { margin: 0; color: inherit; font-size: .82rem; }
.session-report-panel .report-compact-heading .report-compact-label {
  margin: 0;
  color: #d8c77d;
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .11em;
  line-height: 1.15;
}
.session-report-panel .report-compact-item strong { margin-top: 10px; font-size: 1.2rem; }

/* Compact icon-only pagination keeps page navigation clean while the accessible
   name and hover title continue to describe each control. */
.question-bank-page-btn-nav,
.records-pagination .page-link:has(> i),
.admin-records-page-nav {
  display: inline-grid;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  place-items: center;
  border-radius: 13px;
}
.question-bank-page-btn-nav { gap: 0; }
.records-pagination .page-link:has(> i) { border: 1px solid #d8e1f1; background: #fff; }
.records-pagination .page-link:has(> i):hover:not(:disabled) { background: #f2f5ff; border-color: #93a9f9; }
.admin-records-page-nav i,
.question-bank-page-btn-nav i,
.records-pagination .page-link:has(> i) i { margin: 0; }

/* Keep first/previous/page/ellipsis/next/last controls visually balanced. */
.question-bank-page-btn,
.records-pagination .page-link {
  display: inline-grid;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  place-items: center;
  border-radius: 13px;
  line-height: 1;
}
.question-bank-page-buttons,
.records-pagination .pagination { gap: 5px; }
.records-pagination .page-item { display: inline-grid; }
.records-pagination .page-item.disabled .page-link { opacity: .7; }

/* Modern application navigation: a focused, scannable workspace sidebar with
   large touch targets, a clear current-page marker, and softer grouping. */
.sidebar {
  width: 276px;
  padding: 14px 12px;
  background:
    radial-gradient(circle at 18% 0%, rgba(66, 104, 246, .24), transparent 34%),
    linear-gradient(180deg, #111a35 0%, #0a1125 100%);
  border-right: 1px solid rgba(167, 188, 255, .13);
  box-shadow: 12px 0 34px rgba(5, 12, 31, .18);
  --primary: #83a0ff;
  --primary-2: #b38cff;
  --accent: #70d7c7;
  --icon-gradient: linear-gradient(135deg, #a9bcff, #80dbe7, #b48cff);
}
.sidebar::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent 0 45%, rgba(255, 255, 255, .025) 45% 46%, transparent 46% 100%);
  content: "";
  pointer-events: none;
}
.sidebar-brand { margin: 2px 6px 13px; padding: 9px 8px; align-items: center; }
.sidebar .brand-mark { width: 42px; height: 42px; border-radius: 14px; box-shadow: 0 7px 18px rgba(0, 0, 0, .25); }
.sidebar .brand-title { color: #fff; font-size: .98rem; letter-spacing: -.02em; }
.sidebar .brand-subtitle { color: #aebbd8; font-size: .66rem; }
.sidebar .brand-badges { display: none; }
.sidebar-toggle { top: 15px; right: 14px; border-color: rgba(172, 193, 255, .18); background: rgba(255, 255, 255, .06); }
.sidebar-nav { gap: 4px; padding: 2px 4px 12px; scrollbar-color: rgba(133, 157, 240, .55) transparent; }
.sidebar-nav-section {
  margin: 12px 8px 4px;
  color: #8495bd;
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.sidebar-mode-group {
  margin: 7px 0 5px;
  padding: 5px;
  border-color: rgba(151, 170, 245, .14);
  border-radius: 15px;
  background: rgba(255, 255, 255, .035);
}
.sidebar-mode-label { padding: 6px 8px 5px; color: #bdc9ed; font-size: .62rem; letter-spacing: .1em; }
.sidebar-exam-group { border-color: rgba(166, 140, 255, .25); background: linear-gradient(135deg, rgba(104, 91, 232, .15), rgba(74, 123, 217, .07)); }
.sidebar-exam-group .sidebar-mode-label { color: #d8caff; }
.nav-item,
.sidebar-mode-group .nav-item {
  position: relative;
  min-height: 44px;
  margin: 1px 0;
  padding: 10px 11px;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #eaf0ff;
}
.nav-item::before {
  position: absolute;
  left: -1px;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: transparent;
  content: "";
  transition: height .18s ease, background .18s ease;
}
.nav-item i {
  display: inline-grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .075);
  color: #b6c8ff;
  font-size: .79rem;
}
.nav-item span { font-size: .82rem; font-weight: 650; }
.nav-item:hover { background: rgba(148, 170, 255, .11); border-color: rgba(158, 179, 255, .16); transform: none; }
.nav-item:hover i { background: rgba(126, 154, 255, .19); color: #e6ebff; }
.nav-item.active {
  border-color: rgba(138, 163, 255, .3);
  background: linear-gradient(100deg, rgba(79, 111, 241, .34), rgba(126, 98, 226, .16));
  box-shadow: 0 7px 17px rgba(23, 37, 88, .22);
}
.nav-item.active::before { height: 28px; background: #8daaff; }
.nav-item.active i { background: rgba(255, 255, 255, .18); color: #fff; }
.sidebar-nav .nav-item .nav-selected-check { color: #8ee6c5; font-size: .75rem; }
.sidebar-footer { margin: 6px 4px 0; padding: 11px; border: 1px solid rgba(162, 181, 241, .12); background: rgba(255, 255, 255, .045); }
.sidebar-footer .small { color: #93a3c6 !important; }
.sidebar.collapsed { width: 76px; }
.sidebar.collapsed .sidebar-nav-section,
.sidebar.collapsed .sidebar-mode-label span { display: none; }
.sidebar.collapsed .sidebar-mode-group { padding: 4px; }
.sidebar.collapsed .sidebar-mode-label { padding: 5px; }
body.sidebar-collapsed .app-main { margin-left: 76px; width: calc(100% - 76px); }
@media (max-width: 992px) {
  .sidebar.open { width: min(316px, calc(100vw - 28px)); }
  .sidebar-nav { padding-bottom: 18px; }
  .nav-item, .sidebar-mode-group .nav-item { min-height: 48px; }
}
#aiUsage > .row.g-3 { --bs-gutter-x: 12px; --bs-gutter-y: 12px; }
#aiUsage .dashboard-stat-card { min-height: 0; height: auto; padding: 12px 14px; border-radius: 16px; gap: 4px; }
#aiUsage .dashboard-stat-head { margin-bottom: 4px; }
#aiUsage .dashboard-stat-icon { width: 28px; height: 28px; min-width: 28px; border-radius: 9px; }
#aiUsage .dashboard-stat-icon i { font-size: 14px; }
#aiUsage .dashboard-stat-chip { padding: 3px 7px; font-size: .6rem; }
#aiUsage .dashboard-stat-card .stat-label { font-size: .68rem; margin-bottom: 2px; }
#aiUsage .dashboard-stat-card .stat-value { font-size: 1.5rem; line-height: 1.1; margin: 0; }
#aiUsage .dashboard-stat-foot { margin-top: 5px; font-size: .7rem; gap: 6px; }
#aiUsage .dashboard-stat-foot i { font-size: 12px; }
.admin-compact-usage .admin-compact-usage-chart { height: 240px; min-height: 0; max-height: 240px; max-width: 800px; margin-inline: auto; padding: 12px; }
.admin-compact-usage .dashboard-stat-card { height: auto; min-height: 112px; padding: 14px; border-radius: 16px; }
.admin-compact-usage .dashboard-stat-card .stat-value { font-size: 1.55rem; line-height: 1.2; }
.admin-compact-usage .dashboard-stat-card .stat-label { font-size: .7rem; }
.admin-compact-usage .dashboard-stat-head { margin-bottom: 6px; }
.admin-compact-usage .dashboard-stat-icon { width: 28px; height: 28px; font-size: .9rem; }
.admin-compact-usage .dashboard-stat-foot { font-size: .7rem; margin-top: 6px; }
.admin-compact-usage .ai-usage-users-table { table-layout: auto; width: 100%; min-width: 800px; }
.admin-compact-usage .ai-usage-users-table th,
.admin-compact-usage .ai-usage-users-table td { width: auto; padding: 7px 9px; font-size: .74rem; }
.admin-compact-usage .ai-usage-users-table td { white-space: normal; overflow-wrap: anywhere; }
.admin-compact-usage .ai-usage-table-scroll { max-width: 100%; }
@media (max-width: 600px) { .admin-compact-usage .admin-compact-usage-chart { height: 210px; } }
.admin-header-tabs { display: flex; gap: 6px; overflow-x: auto; margin-top: 20px; padding: 8px 0; border-top: 1px solid rgba(100, 133, 180, .2); }
.admin-header-tabs button { flex: 0 0 auto; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text); padding: 10px 14px; font-size: .85rem; font-weight: 650; min-height: 44px; }
.admin-header-tabs button[aria-selected="true"] { color: #fff; background: #365ed8; box-shadow: 0 3px 10px rgba(54, 94, 216, .2); }
.admin-header-tabs button:focus-visible { outline: 2px solid #56b9dc; outline-offset: 2px; }
.admin-header-tabs button { transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
@media (hover: hover) {
  .admin-header-tabs button:hover { background: rgba(76, 118, 234, .13); color: #3861d9; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(40, 80, 160, .12); }
  .admin-header-tabs button[aria-selected="true"]:hover { background: #294bc4; color: #fff; }
}
.admin-header-metrics > div:nth-child(4n+1) { --metric-color: #4267e8; background: rgba(66, 103, 232, .09); border-color: rgba(66, 103, 232, .25); }
.admin-header-metrics > div:nth-child(4n+2) { --metric-color: #159b8a; background: rgba(21, 155, 138, .09); border-color: rgba(21, 155, 138, .25); }
.admin-header-metrics > div:nth-child(4n+3) { --metric-color: #a06b13; background: rgba(232, 170, 45, .1); border-color: rgba(232, 170, 45, .3); }
.admin-header-metrics > div:nth-child(4n+4) { --metric-color: #9851d3; background: rgba(152, 81, 211, .09); border-color: rgba(152, 81, 211, .25); }
.admin-metric-meter { display: block; width: 100%; height: 12px; margin-top: 5px; accent-color: var(--metric-color); }
.admin-metric-meter::-webkit-meter-bar { background: rgba(120, 140, 180, .15); border: 0; border-radius: 8px; }
.admin-metric-meter::-webkit-meter-optimum-value { background: var(--metric-color); border-radius: 8px; }
.admin-metric-meter::-moz-meter-bar { background: var(--metric-color); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .admin-header-tabs button { transition: none; transform: none !important; } }
.admin-tab-panel[hidden] { display: none !important; }
.admin-header-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.admin-header-metrics > div { min-width: 110px; padding: 8px 12px; border: 1px solid rgba(91, 133, 203, .22); border-radius: 10px; background: rgba(93, 148, 235, .06); }
.admin-header-metrics dt { color: var(--muted); font-size: .72rem; font-weight: 500; }
.admin-header-metrics dd { margin: 3px 0 0; color: var(--text); font-size: 1.05rem; font-weight: 750; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .admin-header-metrics > div { min-width: 95px; flex: 1 1 95px; } }
.admin-user-scroll-panel { overflow: auto; scrollbar-gutter: stable; border: 1px solid rgba(112, 144, 185, .25); border-radius: 12px; }
.admin-user-scroll-panel thead th { position: sticky; top: 0; z-index: 2; background: var(--panel-strong, #eef4ff); }
.admin-user-scroll-panel table { margin-bottom: 0; }

/* Readable records, with explicit draggable column boundaries. */
.answer-records-table { table-layout: fixed; }
.answer-records-table th { position: relative; }
.answer-records-table td,
.answer-records-table td .answer-record-question,
.answer-records-table td .answer-record-question strong,
.answer-records-table td .answer-record-question span,
.answer-records-table td .answer-record-answer,
.answer-records-table td .answer-record-feedback,
.answer-records-table td .answer-record-user-line,
.answer-records-table td .answer-record-user-line strong,
.answer-records-table td .answer-record-user-line span {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  max-width: none;
  max-height: none;
  -webkit-line-clamp: unset;
}
.answer-records-table td .answer-record-question,
.answer-records-table td .answer-record-answer,
.answer-records-table td .answer-record-feedback { display: block; }
.answer-records-table td .answer-record-user-line { flex-wrap: wrap; }
.record-column-resizer,
.answer-records-table .table-column-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 9px;
  cursor: col-resize;
  touch-action: none;
  z-index: 3;
  border-right: 2px solid #6ba6df;
}
.record-column-resizer:hover,
.record-column-resizer:focus-visible { background: #b6daf5; outline: 2px solid #2773cc; }

/* Keep the welcome panel's light surface while gently cycling its border. */
.voice-popup.exam-welcome .voice-popup-card,
.voice-popup.study-welcome .voice-popup-card {
  border: 2px solid #6095fa;
  animation: interviewWelcomeBorderColor 8s ease-in-out infinite;
}

@keyframes interviewWelcomeBorderColor {
  0%, 100% { border-color: #6095fa; }
  25% { border-color: #36bfc6; }
  50% { border-color: #83bd69; }
  75% { border-color: #a582df; }
}

@media (prefers-reduced-motion: reduce) {
  .voice-popup.exam-welcome .voice-popup-card,
  .voice-popup.study-welcome .voice-popup-card {
    animation: none;
    border-color: #6095fa;
  }
}


