:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --border: #e2e8f0;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --text: #0f172a;
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --teal: #0d9488;
  --teal-soft: #f0fdfa;
  --danger: #dc2626;
  --success: #059669;
  --shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
  --mobile-app-top-padding: calc(24px + env(safe-area-inset-top, 0px));
}

.final-portal-mobile-head,
.final-portal-mobile-tabbar {
  display: none;
}

body.final-portal-mode .shell {
  grid-template-columns: 260px minmax(0, 1fr);
  background: #f1f5f9;
}

body.final-portal-mode .topbar,
body.final-portal-mode .context-sidebar {
  display: none;
}

body.final-portal-mode .content-inner {
  width: 100%;
  max-width: none;
  padding: 40px 56px 56px;
}

body.final-portal-mode .home-panel {
  width: min(100%, 1020px);
  margin: 0 auto;
}

body.final-portal-mode .primary-sidebar {
  background: #ffffff;
  border-right-color: #e2e8f0;
}

body.final-portal-mode .brand-block {
  gap: 10px;
  padding: 20px 20px 18px;
  border-bottom: 0;
}

body.final-portal-mode .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 13px;
  box-shadow: none;
}

body.final-portal-mode .brand-block h1 {
  font-size: 14px;
  font-weight: 750;
}

body.final-portal-mode .brand-block p {
  margin-top: 1px;
  color: #94a3b8;
  font-size: 9.5px;
  letter-spacing: 0.12em;
}

body.final-portal-mode .main-nav {
  gap: 4px;
  padding: 0 14px 14px;
}

body.final-portal-mode .nav-item {
  min-height: 37px;
  gap: 10px;
  border-radius: 10px;
  color: #475569;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 550;
}

body.final-portal-mode .nav-item svg {
  width: 17px;
  height: 17px;
}

body.final-portal-mode .module-list-wrap {
  padding: 8px 14px 20px;
}

body.final-portal-mode .section-label-row {
  align-items: baseline;
  padding: 0 4px;
}

body.final-portal-mode .section-label-row h2 {
  color: #94a3b8;
  font-size: 10px;
  letter-spacing: 0.12em;
}

body.final-portal-mode .section-label-row span {
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 650;
}

body.final-portal-mode .module-list {
  gap: 8px;
}

body.final-portal-mode .profile-block {
  margin: 16px 14px;
  border-top: 1px solid #eef2f7;
  padding: 14px 6px 2px;
}

.final-sidebar-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 12px;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease;
}

.final-sidebar-card:hover,
.final-sidebar-card.is-active {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.final-sidebar-card:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.final-sidebar-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 850;
}

.final-sidebar-copy {
  min-width: 0;
}

.final-sidebar-copy strong,
.final-sidebar-copy small,
.final-sidebar-status {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.final-sidebar-copy strong {
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 700;
}

.final-sidebar-copy small {
  margin-top: 1px;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 500;
}

.final-sidebar-status {
  grid-column: 2;
  color: #2563eb;
  font-size: 10.5px;
  font-weight: 800;
}

.final-portal {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 24px;
}

.final-portal-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.final-portal-head span,
.final-portal-hero-copy span {
  color: #16a34a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.final-portal-head h1,
.final-portal-head p,
.final-portal-hero h2,
.final-portal-hero p,
.final-portal-list-head h2,
.final-portal-card h2,
.final-portal-card p {
  margin: 0;
}

.final-portal-head h1 {
  color: #0f172a;
  font-size: 31px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.08;
}

.final-portal-head p {
  color: #64748b;
  font-size: 14px;
}

.final-portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  overflow: hidden;
  border: 1px solid #111827;
  border-radius: 16px;
  background: #0f172a;
  color: #ffffff;
  padding: 34px 38px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.final-portal-hero h2 {
  margin-top: 10px;
  max-width: 560px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
}

.final-portal-hero p {
  margin-top: 14px;
  max-width: 620px;
  color: #cbd5e1;
  font-size: 14.5px;
  line-height: 1.65;
}

.final-portal-rules {
  display: grid;
  align-content: center;
  gap: 10px;
}

.final-portal-rules div {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  padding: 13px 14px;
  font-size: 13px;
  font-weight: 750;
}

.final-portal-rules svg {
  width: 16px;
  height: 16px;
  color: #60a5fa;
}

.final-portal-exam-list {
  display: grid;
  gap: 16px;
}

.final-portal-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.final-portal-list-head h2 {
  color: #0f172a;
  font-size: 18px;
  font-weight: 850;
}

.final-portal-list-head span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 650;
}

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

.final-portal-card {
  display: flex;
  min-height: 276px;
  flex-direction: column;
  gap: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.03);
}

.final-portal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.final-portal-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
}

.final-portal-icon svg {
  width: 22px;
  height: 22px;
}

.final-portal-status {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 850;
}

.final-portal-status-locked {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.final-portal-card-copy {
  display: grid;
  gap: 6px;
}

.final-portal-card-copy > span {
  color: #16a34a;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.final-portal-card h2 {
  color: #0f172a;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.22;
}

.final-portal-card p {
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.55;
}

.final-portal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.final-portal-stats div {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
}

.final-portal-stats span,
.final-portal-stats strong {
  display: block;
}

.final-portal-stats span {
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.final-portal-stats strong {
  margin-top: 5px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 850;
}

.final-portal-detail {
  min-height: 20px;
  color: #475569;
  font-size: 12.5px;
  font-weight: 650;
}

.final-portal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid #2563eb;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 850;
  transition: background 160ms ease, border-color 160ms ease;
}

.final-portal-action:not(:disabled):hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.final-portal-action:disabled {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

.final-portal-action svg {
  width: 16px;
  height: 16px;
}

body.final-exam-focus-mode .shell {
  display: block;
  min-height: 100vh;
  background: #f1f5f9;
}

body.final-exam-focus-mode .primary-sidebar,
body.final-exam-focus-mode .context-sidebar,
body.final-exam-focus-mode .topbar {
  display: none !important;
}

body.final-exam-focus-mode .workspace,
body.final-exam-focus-mode .content-scroll {
  min-height: 100vh;
}

body.final-exam-focus-mode .content-inner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 34px 32px 56px;
}

body.final-exam-focus-mode .final-exam-panel {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

body.final-exam-focus-mode .final-exam-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 16px 18px;
}

body.final-exam-focus-mode .final-exam-head span {
  color: #16a34a;
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.final-exam-focus-mode .final-exam-head h3 {
  margin: 4px 0;
  color: #0f172a;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
}

body.final-exam-focus-mode .final-exam-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.final-exam-head-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
}

body.final-exam-focus-mode .final-exam-head strong {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 850;
}

.final-exam-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #ffffff;
  color: #475569;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 800;
}

.final-exam-exit:hover {
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.final-exam-exit svg {
  width: 14px;
  height: 14px;
}

body.final-exam-focus-mode .final-exam-track {
  height: 5px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #dbe3ec;
}

body.final-exam-focus-mode .final-exam-track span {
  background: #2563eb;
}

body.final-exam-focus-mode .final-exam-steps {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 18px;
  padding: 4px 0 8px;
}

body.final-exam-focus-mode .final-step {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #ffffff;
}

body.final-exam-focus-mode .final-exam-question {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 30px 34px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

body.final-exam-focus-mode .final-exam-question h4 {
  margin: 0 0 22px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.42;
}

body.final-exam-focus-mode .answer-list {
  display: grid;
  gap: 12px;
}

body.final-exam-focus-mode .final-exam-question .answer-option {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 14px 16px;
  text-align: left;
  font-size: 15px;
  line-height: 1.45;
  transition: border-color 160ms ease, background 160ms ease;
}

body.final-exam-focus-mode .final-exam-question .answer-option:not(:disabled):hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

body.final-exam-focus-mode .final-exam-question .answer-option.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

body.final-exam-focus-mode .answer-letter {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 850;
}

body.final-exam-focus-mode .answer-option.is-selected .answer-letter {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

body.final-exam-focus-mode .answer-copy {
  min-width: 0;
}

body.final-exam-focus-mode .answer-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: transparent;
}

body.final-exam-focus-mode .answer-check svg {
  width: 15px;
  height: 15px;
}

body.final-exam-focus-mode .answer-option.is-selected .answer-check {
  background: #2563eb;
  color: #ffffff;
}

body.final-exam-focus-mode .final-exam-footer {
  margin-top: 18px;
  border: 0;
  background: transparent;
  padding: 0;
}

body.final-exam-focus-mode .final-exam-nav {
  width: 100%;
  justify-content: space-between;
}

body.final-exam-focus-mode .final-exam-nav .ghost-action,
body.final-exam-focus-mode .final-exam-nav .dark-action {
  min-height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 850;
}

.final-result-overview {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 34px 38px;
}

.final-result-ring {
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
  border-radius: 999px;
  background: conic-gradient(var(--result-color, #2563eb) var(--result-deg, 0deg), #e2e8f0 0deg);
}

.final-result-ring span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: inherit;
  background: #ffffff;
  color: var(--result-color, #2563eb);
  font-size: 27px;
  font-weight: 850;
}

.final-result-ring small {
  margin-top: -20px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.final-result-kicker {
  display: block;
  color: #16a34a;
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.final-result-summary.is-failed .final-result-kicker {
  color: #f97316;
}

.final-result-copy h4 {
  margin: 8px 0 0;
  color: #0f172a;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
}

.final-result-copy p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14.5px;
  line-height: 1.6;
}

.final-result-portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #2563eb;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 850;
}

.final-result-portal-button svg {
  width: 15px;
  height: 15px;
}

.final-result-lock {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e40af;
  padding: 14px 16px;
}

.final-result-lock svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.final-result-lock strong,
.final-result-lock span {
  display: block;
}

.final-result-lock strong {
  font-size: 14px;
  font-weight: 850;
}

.final-result-lock span {
  margin-top: 3px;
  color: #334155;
  font-size: 13px;
}

.final-result-review {
  border-top: 1px solid #e2e8f0;
  padding-top: 22px;
}

.final-result-review h5 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 850;
}

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

.final-review-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 16px 18px;
}

.final-review-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.final-review-row.is-correct .final-review-mark {
  background: #16a34a;
}

.final-review-row strong,
.final-review-row p,
.final-review-row small {
  margin: 0;
}

.final-review-row strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.final-review-row p {
  margin-top: 6px;
  color: #475569;
  font-size: 13.5px;
  line-height: 1.5;
}

.final-review-row small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 700;
}

@media (max-width: 940px) {
  body.final-portal-mode .shell,
  body.final-exam-focus-mode .shell {
    display: block;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }

  body.final-portal-mode .primary-sidebar,
  body.final-portal-mode .context-sidebar,
  body.final-portal-mode .topbar,
  body.final-exam-focus-mode .primary-sidebar,
  body.final-exam-focus-mode .context-sidebar,
  body.final-exam-focus-mode .topbar {
    display: none !important;
  }

  body.final-portal-mode .workspace,
  body.final-portal-mode .content-scroll,
  body.final-exam-focus-mode .workspace,
  body.final-exam-focus-mode .content-scroll {
    height: 100vh;
  }

  body.final-portal-mode .content-inner {
    width: 100%;
    padding: var(--mobile-app-top-padding) 18px 112px;
  }

  body.final-portal-mode .home-panel {
    width: 100%;
  }

  .final-portal {
    gap: 16px;
  }

  .final-portal-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .final-portal-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .final-portal-mobile-brand span,
  .final-portal-mobile-avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 11px;
    font-weight: 850;
  }

  .final-portal-mobile-brand strong {
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 780;
  }

  .final-portal-mobile-avatar {
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 10.5px;
  }

  .final-portal-head {
    gap: 4px;
    margin-top: 14px;
  }

  .final-portal-head span {
    font-size: 10.5px;
  }

  .final-portal-head h1 {
    font-size: 23px;
  }

  .final-portal-head p {
    font-size: 12px;
  }

  .final-portal-hero {
    grid-template-columns: 1fr;
    gap: 16px;
    border-radius: 14px;
    padding: 20px;
  }

  .final-portal-hero-copy span {
    font-size: 10px;
  }

  .final-portal-hero h2 {
    margin-top: 8px;
    font-size: 21px;
  }

  .final-portal-hero p {
    margin-top: 10px;
    font-size: 12.5px;
    line-height: 1.55;
  }

  .final-portal-rules {
    gap: 8px;
  }

  .final-portal-rules div {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
  }

  .final-portal-list-head h2 {
    font-size: 15px;
  }

  .final-portal-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .final-portal-card {
    min-height: 0;
    gap: 12px;
    border-radius: 12px;
    padding: 16px;
  }

  .final-portal-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .final-portal-icon svg {
    width: 18px;
    height: 18px;
  }

  .final-portal-card h2 {
    font-size: 16px;
  }

  .final-portal-card p {
    font-size: 12.5px;
  }

  .final-portal-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .final-portal-stats div {
    padding: 8px;
  }

  .final-portal-stats span {
    font-size: 8.5px;
  }

  .final-portal-stats strong {
    font-size: 13px;
  }

  .final-portal-action {
    width: 100%;
    min-height: 42px;
  }

  body.final-portal-mode .final-portal-mobile-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 8px calc(18px + env(safe-area-inset-bottom));
    backdrop-filter: blur(12px);
  }

  .final-portal-mobile-tab {
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 56px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 3px 2px 0;
    font-size: 9.5px;
    font-weight: 700;
  }

  .final-portal-mobile-tab svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.1;
  }

  .final-portal-mobile-tab.is-active {
    color: #1d4ed8;
    font-weight: 850;
  }

  body.final-exam-focus-mode .content-inner {
    width: 100%;
    max-width: none;
    padding: 14px 14px 28px;
  }

  body.final-exam-focus-mode .final-exam-panel {
    max-width: none;
  }

  body.final-exam-focus-mode .final-exam-head {
    align-items: flex-start;
    gap: 10px;
    border-radius: 12px;
    padding: 12px;
  }

  body.final-exam-focus-mode .final-exam-head h3 {
    font-size: 17px;
  }

  body.final-exam-focus-mode .final-exam-head p {
    display: none;
  }

  .final-exam-head-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }

  body.final-exam-focus-mode .final-exam-head strong {
    padding: 6px 9px;
    font-size: 11px;
  }

  .final-exam-exit {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 11px;
  }

  body.final-exam-focus-mode .final-exam-steps {
    margin-bottom: 12px;
  }

  body.final-exam-focus-mode .final-step {
    width: 28px;
    height: 28px;
    font-size: 10.5px;
  }

  body.final-exam-focus-mode .final-exam-question {
    border-radius: 14px;
    padding: 18px;
  }

  body.final-exam-focus-mode .final-exam-question h4 {
    margin-bottom: 16px;
    font-size: 16.5px;
  }

  body.final-exam-focus-mode .final-exam-question .answer-option {
    grid-template-columns: 26px minmax(0, 1fr) 20px;
    gap: 10px;
    min-height: 52px;
    padding: 11px 12px;
    font-size: 13px;
  }

  body.final-exam-focus-mode .answer-letter {
    width: 26px;
    height: 26px;
    font-size: 11.5px;
  }

  body.final-exam-focus-mode .answer-check {
    width: 20px;
    height: 20px;
  }

  body.final-exam-focus-mode .final-exam-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  body.final-exam-focus-mode .final-exam-nav button {
    width: 100%;
  }

  body.final-exam-focus-mode .final-exam-nav button[hidden] {
    display: none !important;
  }

  .final-result-overview {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
  }

  .final-result-ring {
    width: 104px;
    height: 104px;
  }

  .final-result-ring span {
    width: 78px;
    height: 78px;
    font-size: 22px;
  }

  .final-result-copy h4 {
    font-size: 19px;
  }

  .final-result-copy p,
  .final-result-lock span {
    font-size: 12.5px;
  }

  .final-result-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .final-review-row {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .final-review-mark {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .final-review-row strong,
  .final-review-row p,
  .final-review-row small {
    font-size: 12px;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

body.app-booting {
  overflow: hidden;
}

body.app-booting .shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

body.app-booting .app-boot-screen {
  display: grid;
}

.app-boot-card {
  width: min(100%, 320px);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 30px 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.app-boot-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: var(--primary);
  color: white;
  font-size: 16px;
  font-weight: 850;
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.2);
}

.app-boot-loader {
  width: 32px;
  height: 32px;
  margin-top: 4px;
  border: 3px solid #dbeafe;
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: bootSpin 900ms linear infinite;
}

.app-boot-card strong {
  color: var(--text);
  font-size: 16px;
}

.app-boot-card p {
  max-width: 230px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

@keyframes bootSpin {
  to {
    transform: rotate(360deg);
  }
}

.shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 336px;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  background: var(--surface);
  border-color: var(--border);
  min-height: 0;
}

.primary-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
  z-index: 30;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

.brand-block h1,
.brand-block p,
.profile-block p,
.profile-block span {
  margin: 0;
}

.brand-block h1 {
  font-size: 16px;
  line-height: 1.1;
}

.brand-block p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav {
  display: grid;
  gap: 4px;
  padding: 20px 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: #475569;
  background: transparent;
  font-weight: 600;
  text-align: left;
  transition: background 180ms ease, color 180ms ease;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  color: #94a3b8;
}

.nav-item:hover,
.nav-item.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-item:hover svg,
.nav-item.is-active svg {
  color: var(--primary);
}

.module-list-wrap {
  min-height: 0;
  flex: 1;
  padding: 6px 16px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.module-list-wrap[hidden] {
  display: none;
}

.module-list-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
}

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

.section-label-row h2 {
  margin: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-label-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

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

.module-card {
  position: relative;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  padding: 12px 58px 12px 12px;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.module-card:hover {
  background: var(--surface);
  border-color: var(--border);
}

.module-card:disabled,
.module-card.is-locked {
  cursor: not-allowed;
  opacity: 0.62;
}

.module-card.is-locked:hover {
  background: transparent;
  border-color: transparent;
}

.module-card.is-active {
  background: var(--surface);
  border-color: #bfdbfe;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.module-card.is-active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}

.module-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.module-number {
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
}

.module-progress-ring {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 54%, transparent 55%),
    conic-gradient(var(--teal) var(--module-progress-deg, 0deg), #dbe3ec 0deg);
}

.module-progress-ring .module-progress-value {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.module-progress-ring svg {
  width: 15px;
  height: 15px;
  color: #ffffff;
  stroke-width: 3;
}

.module-card.is-complete .module-progress-ring {
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.module-card.is-locked .module-progress-ring {
  background:
    radial-gradient(circle at center, var(--surface) 54%, transparent 55%),
    conic-gradient(#cbd5e1 var(--module-progress-deg, 0deg), #e2e8f0 0deg);
}

.module-card.is-locked .module-progress-ring span {
  color: var(--muted);
}

.module-card h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.profile-block {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.profile-block p {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.profile-block span {
  color: var(--muted);
  font-size: 12px;
}

.profile-block svg {
  width: 18px;
  height: 18px;
  color: var(--muted-2);
}

.auth-user-button {
  display: grid;
  place-items: center;
  min-width: 32px;
  min-height: 32px;
}

.auth-user-button .cl-userButtonBox {
  width: 32px;
  height: 32px;
}

.auth-user-button .cl-avatarBox {
  width: 32px;
  height: 32px;
}

.workspace {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 80px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  z-index: 12;
}

.topbar-title,
.topbar .meta-pills,
.topbar #quizButton {
  display: none !important;
}

.topbar-title {
  min-width: 0;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.breadcrumbs svg {
  width: 15px;
  height: 15px;
  color: var(--muted-2);
}

.topbar h2 {
  overflow: hidden;
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.meta-pills {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.meta-pills span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.meta-pills svg,
.primary-action svg,
.dark-action svg,
.ghost-action svg,
.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: #475569;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.icon-button:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.primary-action,
.dark-action,
.ghost-action,
.compact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.primary-action {
  background: var(--primary);
  color: white;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.18);
}

.primary-action:hover {
  background: #1d4ed8;
}

.dark-action {
  background: var(--text);
  color: white;
}

.dark-action:hover {
  background: #1e293b;
}

.ghost-action {
  background: transparent;
  color: #475569;
}

.ghost-action:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.compact-action {
  min-height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #475569;
  padding: 8px 11px;
  font-size: 13px;
  box-shadow: none;
}

.compact-action:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.compact-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.content-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.content-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.content-inner {
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: 32px 40px 88px;
}

body.module-milestone-mode .content-inner {
  width: min(100%, 1220px);
}

.home-panel {
  min-height: 100%;
}

.home-dashboard {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100%;
  background: #f8fafc;
  color: #0f172a;
  animation: home-dashboard-fade 180ms ease-out both;
}

.home-shell-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  align-self: start;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  height: 100vh;
  min-height: 620px;
  border-right: 1px solid #e7ecf2;
  background: rgba(255, 255, 255, 0.98);
  padding: 18px 16px;
}

.home-shell-sidebar-main {
  display: grid;
  gap: 26px;
  width: 100%;
  min-width: 0;
}

.home-shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.home-shell-sidebar .home-shell-brand {
  width: 100%;
  padding: 0 4px 18px;
  border-bottom: 1px solid #eef2f7;
}

.home-shell-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.home-shell-brand strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.home-shell-brand strong span {
  margin-left: 3px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 650;
}

.home-shell-tabs {
  display: grid;
  gap: 6px;
  width: 100%;
}

.home-shell-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5b6b84;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 650;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.home-shell-tab svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #94a3b8;
  stroke-width: 2.2;
  transition: color 160ms ease;
}

.home-shell-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-shell-tab:hover,
.home-shell-tab.is-active {
  background: #eff4ff;
  color: #1d4ed8;
}

.home-shell-tab:hover svg,
.home-shell-tab.is-active svg {
  color: #1d4ed8;
}

.home-shell-tab.is-disabled,
.home-shell-tab:disabled {
  color: #a7b3c3;
  cursor: not-allowed;
}

.home-shell-tab.is-disabled svg,
.home-shell-tab:disabled svg {
  color: #cbd5e1;
}

.home-shell-user {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  border: 1px solid #e7ecf2;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}

.home-shell-user > span,
.home-mobile-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10.5px;
  font-weight: 900;
}

.home-shell-user strong,
.home-shell-user small {
  display: block;
  overflow: hidden;
  max-width: 160px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-shell-user strong {
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 800;
}

.home-shell-user small {
  margin-top: 1px;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 650;
}

.home-dashboard-body {
  width: min(100%, 1120px);
  min-width: 0;
  margin: 0 auto;
  padding: 40px 48px 56px;
}

.home-mobile-head {
  display: none;
}

.home-dashboard-head {
  max-width: 560px;
}

.home-dashboard-head span,
.home-continue-copy span {
  display: inline-flex;
  margin-bottom: 7px;
  color: #8a97ab;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-dashboard-head h1,
.home-dashboard-head p,
.home-section-head h2,
.home-section-head p,
.home-continue h2,
.home-continue p,
.home-course-card h3,
.home-course-card p,
.home-quick-links h2,
.home-quick-links p {
  margin: 0;
}

.home-dashboard-head h1 {
  color: #0f172a;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.16;
}

.home-dashboard-head p {
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 28px;
  border: 1px solid #e7ecf2;
  border-radius: 12px;
  background: #ffffff;
}

.home-stat {
  min-width: 0;
  padding: 20px 24px;
}

.home-stat + .home-stat {
  border-left: 1px solid #eef2f7;
}

.home-stat p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #8a97ab;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-stat-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 2px;
}

.home-stat-dot.is-blue {
  background: #2563eb;
}

.home-stat-dot.is-green {
  background: #16a34a;
}

.home-stat-dot.is-purple {
  background: #7c3aed;
}

.home-stat-label-short {
  display: none;
}

.home-stat strong {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
  color: #0f172a;
  font-size: 27px;
  font-weight: 850;
  line-height: 1.05;
}

.home-stat small {
  color: #b3bfd0;
  font-size: 14px;
  font-weight: 800;
}

.home-continue {
  display: flex;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  border: 1px solid #e7ecf2;
  border-radius: 12px;
  background: #ffffff;
  padding: 22px 24px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.home-continue:hover {
  border-color: #bfd7fe;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.home-continue-copy {
  flex: 1;
  min-width: 0;
}

.home-continue-copy span {
  margin-bottom: 0;
  border-radius: 6px;
  background: #eff4ff;
  color: #1d4ed8;
  padding: 4px 9px;
  font-size: 10.5px;
}

.home-continue h2 {
  color: #0f172a;
  margin-top: 10px;
  font-size: 17.5px;
  font-weight: 800;
  line-height: 1.3;
}

.home-continue p {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.home-primary-action,
.home-course-action,
.home-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.home-primary-action {
  min-height: 42px;
  flex: 0 0 auto;
  background: var(--primary);
  color: #ffffff;
  padding: 11px 20px;
  font-size: 13.5px;
}

.home-primary-action:hover {
  background: #1d4ed8;
}

.home-primary-action svg,
.home-course-action svg,
.home-secondary-action svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 14px;
}

.home-section-head h2 {
  color: #0f172a;
  font-size: 17.5px;
  font-weight: 800;
}

.home-section-head p {
  max-width: 420px;
  color: #94a3b8;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: right;
}

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

.home-course-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  border: 1px solid #e7ecf2;
  border-radius: 12px;
  background: #ffffff;
  padding: 22px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.home-course-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.home-course-card.is-locked {
  background: #f8fafc;
}

.home-course-card.is-locked:hover {
  border-color: #e2e8f0;
  box-shadow: none;
}

.home-course-card.is-locked h3,
.home-course-card.is-locked p,
.home-course-card.is-locked .home-progress-row,
.home-course-card.is-locked .home-progress-track,
.home-course-card.is-locked .home-course-progress > small:not(.home-course-lock-note) {
  opacity: 0.62;
}

.home-course-card.is-locked .home-course-icon {
  background: #e2e8f0;
  color: #64748b;
}

.home-course-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.home-course-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #eff4ff;
  color: var(--primary);
}

.home-course-icon svg,
.home-quick-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.home-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 10px;
  background: #ffffff;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.home-status svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.7;
}

.home-status-active {
  border-color: #bfd7fe;
  background: #eff4ff;
  color: var(--primary);
}

.home-status-ready {
  background: #ffffff;
  color: #64748b;
}

.home-status-complete {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #059669;
}

.home-status-locked {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
}

.home-course-card h3 {
  color: #0f172a;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.home-course-card p {
  flex: 1;
  margin-top: 4px;
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.55;
}

.home-course-progress {
  display: grid;
  gap: 6px;
  margin: 16px 0;
}

.home-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #8a97ab;
  font-size: 12px;
  font-weight: 800;
}

.home-progress-row strong {
  color: var(--primary);
}

.home-progress-track {
  overflow: hidden;
  height: 4px;
  border-radius: 999px;
  background: #eef2f7;
}

.home-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 260ms ease;
}

.home-course-progress small {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.home-course-lock-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #dc2626 !important;
  font-weight: 800 !important;
  opacity: 1 !important;
}

.home-course-lock-note svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.5;
}

.home-course-action {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd8ea;
  background: #ffffff;
  color: #1d4ed8;
  padding: 10px 16px;
  font-size: 13.5px;
}

.home-course-action:hover {
  background: #eff6ff;
}

.home-course-action:disabled {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.home-course-action:disabled:hover {
  background: #f1f5f9;
}

.home-quick-links {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  border: 1px solid #e7ecf2;
  border-radius: 12px;
  background: #ffffff;
  padding: 16px 20px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.home-quick-links:hover {
  border-color: #d8c9f7;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.home-quick-copy {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.home-quick-copy strong {
  color: #0f172a;
  font-size: 14.5px;
  font-weight: 850;
}

.home-quick-copy small {
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.45;
}

.home-quick-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #f3eefe;
  color: #7c3aed;
}

.home-secondary-action {
  min-height: 38px;
  border: 1px solid #cbd8ea;
  background: #ffffff;
  color: #1d4ed8;
  padding: 9px 16px;
  font-size: 13px;
}

.home-secondary-action:hover {
  border-color: #bfdbfe;
  color: var(--primary);
}

.home-mobile-tabbar {
  display: none;
}

@media (max-width: 1020px) {
  .home-dashboard {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .home-shell-sidebar {
    padding-inline: 14px;
  }

  .home-shell-sidebar .home-shell-brand strong span {
    display: block;
    margin-top: 2px;
    margin-left: 0;
  }

  .home-shell-tab {
    padding-inline: 10px;
  }

  .home-dashboard-body {
    padding-inline: 28px;
  }
}

@media (max-width: 940px) {
  .home-dashboard {
    display: block;
    min-height: 100%;
  }

  .home-shell-sidebar {
    display: none;
  }

  .home-dashboard-body {
    padding: var(--mobile-app-top-padding) 18px 120px;
  }

  .home-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .home-mobile-head .home-shell-brand strong {
    font-size: 14px;
  }

  .home-dashboard-head {
    margin-top: 22px;
  }

  .home-dashboard-head span {
    font-size: 10px;
  }

  .home-dashboard-head h1 {
    font-size: 25px;
    line-height: 1.22;
  }

  .home-dashboard-head p {
    font-size: 13px;
    line-height: 1.55;
  }

  .home-stat-grid {
    margin-top: 18px;
  }

  .home-stat {
    padding: 13px 12px;
  }

  .home-stat p {
    gap: 6px;
    font-size: 9px;
  }

  .home-stat-dot {
    width: 6px;
    height: 6px;
  }

  .home-stat-label-full {
    display: none;
  }

  .home-stat-label-short {
    display: inline;
  }

  .home-stat strong {
    margin-top: 5px;
    font-size: 18px;
  }

  .home-stat small {
    font-size: 11px;
  }

  .home-continue {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
    padding: 16px;
  }

  .home-continue-copy span {
    font-size: 9.5px;
  }

  .home-continue h2 {
    font-size: 15px;
    line-height: 1.35;
  }

  .home-continue p {
    font-size: 11.5px;
  }

  .home-primary-action {
    width: 100%;
    min-height: 44px;
    font-size: 13px;
  }

  .home-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    margin: 22px 0 9px;
  }

  .home-section-head h2 {
    font-size: 16px;
  }

  .home-section-head p {
    font-size: 11px;
    text-align: left;
  }

  .home-course-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-course-card {
    padding: 16px;
  }

  .home-course-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .home-course-icon svg,
  .home-quick-icon svg {
    width: 16px;
    height: 16px;
  }

  .home-status {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 10px;
  }

  .home-course-card h3 {
    margin-top: 11px;
    font-size: 14.5px;
  }

  .home-course-card p {
    font-size: 12px;
    line-height: 1.5;
  }

  .home-course-progress {
    margin: 12px 0;
  }

  .home-progress-row {
    font-size: 11px;
  }

  .home-course-progress small {
    font-size: 10.5px;
  }

  .home-course-action {
    min-height: 42px;
    font-size: 12.5px;
  }

  .home-quick-links {
    gap: 12px;
    margin-top: 14px;
    padding: 14px 16px;
  }

  .home-quick-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .home-quick-copy strong {
    font-size: 13px;
  }

  .home-quick-copy small {
    font-size: 11px;
  }

  .home-secondary-action {
    min-height: auto;
    border: 0;
    padding: 0;
    color: #94a3b8;
  }

  .home-secondary-action span {
    display: none;
  }

  .home-secondary-action svg {
    width: 16px;
    height: 16px;
  }

  .home-mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    border-top: 1px solid #e7ecf2;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 6px calc(18px + env(safe-area-inset-bottom));
    backdrop-filter: blur(12px);
  }

  .home-mobile-tab {
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 56px;
    border: 0;
    background: transparent;
    color: #93a2b8;
    padding: 3px 2px 0;
    font-size: 9.5px;
    font-weight: 750;
  }

  .home-mobile-tab svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.1;
  }

  .home-mobile-tab.is-active {
    color: #1d4ed8;
    font-weight: 850;
  }

  .home-mobile-tab.is-disabled,
  .home-mobile-tab:disabled {
    color: #c2cad7;
    cursor: not-allowed;
  }
}

.final-portal {
  display: grid;
  gap: 24px;
  animation: home-dashboard-in 220ms ease-out both;
}

.final-portal-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.final-portal-head span,
.final-portal-card-copy > span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.final-portal-head h1,
.final-portal-head p,
.final-portal-card-copy h2,
.final-portal-card-copy p {
  margin: 0;
}

.final-portal-head h1 {
  color: #0f172a;
  font-size: 40px;
  font-weight: 850;
  line-height: 1.08;
}

.final-portal-head p {
  margin-top: 10px;
  max-width: 720px;
  color: #64748b;
  font-size: 16px;
  line-height: 1.55;
}

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

.final-portal-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.04);
}

.final-portal-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.final-portal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--primary);
}

.final-portal-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.35;
}

.final-portal-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 900;
}

.final-portal-status-ready,
.final-portal-status-complete {
  background: #ecfdf5;
  color: #059669;
}

.final-portal-status-active {
  background: #eff6ff;
  color: var(--primary);
}

.final-portal-status-submitted {
  background: #fff7ed;
  color: #c2410c;
}

.final-portal-status-locked {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.final-portal-card-copy h2 {
  color: #0f172a;
  font-size: 22px;
  font-weight: 850;
  line-height: 1.2;
}

.final-portal-card-copy p {
  min-height: 44px;
  margin-top: 10px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.final-portal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.final-portal-stats div {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}

.final-portal-stats span,
.final-portal-stats strong {
  display: block;
}

.final-portal-stats span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.final-portal-stats strong {
  margin-top: 5px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 850;
}

.final-portal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
  margin-top: auto;
  border: 2px solid var(--primary);
  border-radius: 10px;
  background: #ffffff;
  color: var(--primary);
  padding: 11px 16px;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.final-portal-action:hover {
  background: #eff6ff;
}

.final-portal-action:disabled {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

.final-portal-action svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.5;
}

@keyframes home-dashboard-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes home-dashboard-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 860px) {
  .final-portal-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .final-portal-grid {
    grid-template-columns: 1fr;
  }

  .final-portal-action {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .final-portal-card {
    border-radius: 13px;
    padding: 18px;
  }

  .final-portal-head h1 {
    font-size: 28px;
  }

  .final-portal-stats {
    grid-template-columns: 1fr;
  }

}

body.final-portal-mode .final-portal-head {
  display: grid;
  justify-items: start;
  text-align: left;
}

body.final-portal-mode .final-portal-head > div {
  width: min(100%, 720px);
  margin: 0;
}

body.final-portal-mode .final-portal-head span {
  color: #16a34a;
  letter-spacing: 0.12em;
}

body.final-portal-mode .final-portal-head h1 {
  font-size: 31px;
  letter-spacing: 0;
}

body.final-portal-mode .final-portal-head p {
  max-width: 640px;
  margin-top: 6px;
  font-size: 14px;
}

.empty-state-panel {
  display: grid;
  align-content: center;
  min-height: 280px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 34px;
}

.empty-state-panel span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.empty-state-panel h1 {
  margin: 8px 0 8px;
  color: var(--text);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
}

.empty-state-panel p {
  margin: 0;
  max-width: 520px;
  color: #64748b;
  font-size: 16px;
  line-height: 1.55;
}

.module-milestone-panel {
  position: relative;
  display: block;
  width: min(100%, 1080px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: clamp(42px, 4.4vw, 60px) clamp(48px, 5vw, 72px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
  animation: milestone-panel-in 240ms ease-out both;
}

.module-milestone-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--teal));
}

.module-milestone-copy {
  position: relative;
  min-width: 0;
  max-width: 940px;
}

.module-milestone-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #1d4ed8;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.module-milestone-kicker svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  stroke-width: 3;
}

.module-milestone-kicker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.module-milestone-copy h1 {
  margin: 0;
  max-width: 940px;
  color: #0f172a;
  font-size: clamp(40px, 4.3vw, 52px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: break-word;
  hyphens: manual;
}

.module-milestone-copy p {
  margin: 20px 0 0;
  max-width: 900px;
  color: #475569;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.62;
}

.module-milestone-outline {
  margin: 34px 0 42px;
  border: 1px solid #e8eef6;
  border-radius: 12px;
  background: #f8fafc;
  padding: 22px 24px;
}

.module-milestone-outline h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.module-milestone-outline h2 svg {
  width: 17px;
  height: 17px;
  color: var(--primary);
  stroke-width: 2.4;
}

.module-milestone-outline ul {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 980px) {
  .module-milestone-outline ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 30px;
  }

  .module-milestone-outline li.is-summary {
    grid-column: 1 / -1;
  }
}

.module-milestone-outline li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.module-milestone-outline li.is-summary {
  margin-top: 3px;
  border-top: 1px dashed #dbe3ee;
  padding-top: 14px;
  font-weight: 800;
}

.module-milestone-outline-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border: 1px solid #dbe8ff;
  border-radius: 6px;
  background: #ffffff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.module-milestone-outline li.is-summary .module-milestone-outline-index {
  border-color: transparent;
  border-radius: 999px;
  background: #eaf2ff;
}

.module-milestone-outline-index svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.module-milestone-details {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 100%;
  margin: 0 0 44px;
  border-top: 1px solid var(--border);
}

.module-milestone-details div {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 32px 30px 0 0;
}

.module-milestone-details div + div {
  border-left: 1px solid var(--border);
  padding-left: 22px;
}

.module-milestone-detail-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-milestone-detail-label svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 2.3;
}

.module-milestone-details strong {
  color: #0f172a;
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 800;
  line-height: 1.25;
}

.module-milestone-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  min-height: 64px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  padding: 18px 38px;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.module-milestone-start:hover {
  background: #1d4ed8;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.34);
  transform: translateY(-2px);
}

.module-milestone-start:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.18),
    0 18px 36px rgba(37, 99, 235, 0.3);
}

.module-milestone-start svg {
  width: 18px;
  height: 18px;
}

@keyframes milestone-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-panel[hidden],
.course-hub[hidden],
.quiz-overview-panel[hidden],
.module-milestone-panel[hidden],
.module-context-bar[hidden],
.meta-pills[hidden] {
  display: none;
}

body.quiz-overview-mode .shell {
  grid-template-columns: 272px minmax(0, 1fr);
}

body.home-mode .shell {
  grid-template-columns: minmax(0, 1fr);
}

body.home-mode .primary-sidebar,
body.quiz-overview-mode .context-sidebar,
body.home-mode .context-sidebar {
  display: none;
}

body.home-mode #openContextButton {
  display: none !important;
}

body.home-mode .topbar {
  display: none;
}

body.home-mode .content-inner {
  width: 100%;
  padding: 0;
}

body.quiz-overview-mode .content-inner {
  width: min(100%, 1184px);
  padding: 48px 64px 88px;
}

.quiz-overview {
  min-height: 100%;
}

.quiz-overview-head {
  margin-bottom: 38px;
}

.quiz-overview-head h1,
.quiz-overview-head p {
  margin: 0;
}

.quiz-overview-head h1 {
  color: #111827;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
}

.quiz-overview-head p {
  margin-top: 8px;
  color: #6b7280;
  font-size: 18px;
  line-height: 1.55;
}

.quiz-overview-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.quiz-main-action,
.quiz-alt-action,
.quiz-reset-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 750;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.quiz-main-action {
  border: 1px solid #1e40af;
  background: #1e40af;
  color: white;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.08);
}

.quiz-main-action:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.quiz-alt-action {
  border: 1px solid #e5e7eb;
  background: white;
  color: #1e40af;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.05);
}

.quiz-alt-action:hover {
  background: #f9fafb;
}

.quiz-reset-action {
  border: 1px solid #fee2e2;
  background: #ffffff;
  color: #b91c1c;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.05);
}

.quiz-reset-action:hover {
  border-color: #fecaca;
  background: #fef2f2;
}

.quiz-portal {
  display: grid;
  gap: 42px;
  min-height: 100%;
}

.quiz-portal-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #d7dee8;
  border-radius: 17px;
  background: #ffffff;
  color: #030712;
  padding: clamp(34px, 4.2vw, 50px) clamp(34px, 5vw, 56px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.quiz-portal-hero::after {
  content: "";
  position: absolute;
  top: -88px;
  right: -74px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: #f3f7fc;
  pointer-events: none;
}

.quiz-portal-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 770px;
}

.quiz-portal-hero h1,
.quiz-portal-hero p,
.quiz-portal-modules h2,
.quiz-portal-card strong,
.quiz-portal-card-copy,
.quiz-portal-card-action,
.quiz-portal-engine h2,
.quiz-portal-engine p,
.quiz-portal-question h3,
.quiz-portal-result h2,
.quiz-portal-result p,
.quiz-portal-flashcards h2,
.quiz-portal-flashcards p {
  margin: 0;
}

.quiz-portal-hero h1 {
  margin-bottom: 20px;
  max-width: 650px;
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: 0;
}

.quiz-portal-hero h1 span {
  display: block;
  color: #3b82f6;
}

.quiz-portal-hero p {
  max-width: 720px;
  color: #475569;
  font-size: 16px;
  line-height: 1.72;
}

.quiz-portal-alert {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 720px;
  margin-top: 30px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 14px 16px;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.quiz-portal-alert svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--primary);
}

.quiz-portal-modules h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: #030712;
  font-size: 22px;
  font-weight: 850;
}

.quiz-portal-modules h2 svg {
  width: 21px;
  height: 21px;
  color: var(--primary);
}

.quiz-portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.quiz-portal-card {
  position: relative;
  display: flex;
  min-height: 240px;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  padding: 24px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.quiz-portal-card:hover {
  border-color: var(--primary);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.quiz-portal-card-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  transition: background 180ms ease, color 180ms ease;
}

.quiz-portal-card:hover .quiz-portal-card-icon {
  background: var(--primary);
  color: white;
}

.quiz-portal-card-icon svg {
  width: 30px;
  height: 30px;
}

.quiz-portal-card-demo,
.quiz-portal-demo-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quiz-portal-card-demo {
  position: absolute;
  top: 18px;
  right: 18px;
}

.quiz-portal-card strong {
  color: #030712;
  font-size: 19px;
  font-weight: 850;
  line-height: 1.2;
}

.quiz-portal-card-copy {
  display: block;
  margin-top: 10px;
  flex: 1;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
}

.quiz-portal-card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.quiz-portal-card-action svg {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.quiz-portal-card:hover .quiz-portal-card-action svg {
  transform: translateX(3px);
}

.quiz-portal-engine,
.quiz-portal-flashcards {
  width: min(100%, 820px);
  margin: 0 auto;
}

.quiz-portal-engine-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.quiz-portal-engine-head h2 {
  margin-top: 10px;
  color: #030712;
  font-size: 30px;
  font-weight: 850;
  line-height: 1.1;
}

.quiz-portal-engine-head p {
  margin-top: 8px;
  color: #6b7280;
  font-size: 15px;
  font-weight: 700;
}

.quiz-portal-progress {
  overflow: hidden;
  height: 8px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: #e5e7eb;
}

.quiz-portal-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 260ms ease;
}

.quiz-portal-question,
.quiz-portal-result {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: white;
  padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.quiz-portal-question h3 {
  margin-bottom: 26px;
  color: #030712;
  font-size: 22px;
  font-weight: 850;
  line-height: 1.45;
}

.quiz-portal-options {
  display: grid;
  gap: 12px;
  margin-bottom: 30px;
}

.quiz-portal-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  color: #374151;
  padding: 16px;
  text-align: left;
  font-size: 15px;
  line-height: 1.45;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.quiz-portal-option:not(:disabled):hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.quiz-portal-option.is-selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: #1e3a8a;
}

.quiz-portal-option.is-correct {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #14532d;
}

.quiz-portal-option.is-wrong {
  border-color: #ef4444;
  background: #fef2f2;
  color: #7f1d1d;
}

.quiz-portal-option.is-muted {
  opacity: 0.55;
}

.quiz-portal-option svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.quiz-portal-explanation {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 16px;
}

.quiz-portal-explanation.is-correct {
  background: #f0fdf4;
  color: #14532d;
}

.quiz-portal-explanation svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.quiz-portal-explanation strong,
.quiz-portal-explanation p {
  margin: 0;
}

.quiz-portal-explanation strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.quiz-portal-explanation p {
  font-size: 14px;
  line-height: 1.55;
}

.quiz-portal-question-actions {
  display: flex;
  justify-content: flex-end;
}

.quiz-portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border-radius: 9px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.quiz-portal-button svg {
  width: 18px;
  height: 18px;
}

.quiz-portal-button-primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.18);
}

.quiz-portal-button-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.quiz-portal-button-secondary,
.quiz-portal-button-outline {
  border: 2px solid #111827;
  background: white;
  color: #111827;
}

.quiz-portal-button-secondary:hover,
.quiz-portal-button-outline:hover {
  background: #f9fafb;
}

.quiz-portal-button-dark {
  border: 1px solid #030712;
  background: #030712;
  color: white;
}

.quiz-portal-button-dark:hover {
  background: var(--primary);
  border-color: var(--primary);
}

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

.quiz-portal-result {
  width: min(100%, 720px);
  margin: 0 auto;
  text-align: center;
}

.quiz-portal-result-icon {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}

.quiz-portal-result-icon svg {
  width: 48px;
  height: 48px;
}

.quiz-portal-result h2 {
  margin-top: 16px;
  color: #030712;
  font-size: 32px;
  font-weight: 850;
}

.quiz-portal-result p {
  margin-top: 16px;
  color: #4b5563;
  font-size: 20px;
  line-height: 1.5;
}

.quiz-portal-result p strong {
  color: var(--primary);
}

.quiz-portal-result-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.quiz-portal-flashcard {
  width: 100%;
  height: 320px;
  border: 0;
  background: transparent;
  padding: 0;
  perspective: 1000px;
}

.quiz-portal-flashcard-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}

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

.quiz-portal-flashcard-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  padding: 32px;
  text-align: center;
  backface-visibility: hidden;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}

.quiz-portal-flashcard-front {
  border: 2px solid #030712;
  background: white;
  color: #030712;
}

.quiz-portal-flashcard-front svg {
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  color: var(--primary);
}

.quiz-portal-flashcard-front strong {
  font-size: 30px;
  line-height: 1.15;
}

.quiz-portal-flashcard-front small {
  margin-top: 28px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quiz-portal-flashcard-back {
  border: 2px solid var(--primary);
  background: var(--primary);
  color: white;
  transform: rotateY(180deg);
}

.quiz-portal-flashcard-back small {
  margin-bottom: 18px;
  opacity: 0.78;
  font-size: 16px;
  font-weight: 700;
}

.quiz-portal-flashcard-back strong {
  max-width: 620px;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.55;
}

.quiz-portal-flashcard-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
}

.quiz-portal-flashcard-controls button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: white;
  color: #111827;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.05);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.quiz-portal-flashcard-controls button:hover {
  background: #f9fafb;
  color: var(--primary);
  transform: translateY(-1px);
}

.quiz-portal-flashcard-controls svg {
  width: 23px;
  height: 23px;
}

.quiz-portal-flashcard-controls span {
  color: #6b7280;
  font-size: 15px;
  font-weight: 800;
}

.quiz-main-action svg,
.quiz-alt-action svg,
.quiz-reset-action svg {
  width: 17px;
  height: 17px;
}

.final-exam-head span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.scenario-card {
  display: flex;
  min-height: 156px;
  width: 100%;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  background: white;
  padding: 20px;
  text-align: left;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.scenario-card:hover {
  border-color: #e5e7eb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.scenario-card-main {
  display: grid;
  gap: 12px;
}

.scenario-title-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #1e40af;
}

.scenario-title-row svg {
  width: 19px;
  height: 19px;
  justify-self: center;
  opacity: 0.82;
}

.scenario-title-row strong {
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.scenario-count {
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
}

.scenario-track {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 8px;
  margin-top: 18px;
  border-radius: 999px;
  background: #e5e7eb;
}

.scenario-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1e40af;
}

.scenario-card.is-complete .scenario-track span {
  background: #16a34a;
}

.course-hub {
  display: grid;
  gap: 16px;
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hub-header p,
.hub-header h2,
.hub-header span,
.hub-continue p,
.hub-continue h3,
.hub-continue span,
.hub-module-head h3 {
  margin: 0;
}

.hub-header p {
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hub-header h2 {
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.12;
}

.hub-header span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.hub-ring {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 56%, transparent 57%),
    conic-gradient(var(--primary) var(--ring-progress, 0deg), #e2e8f0 0deg);
}

.hub-ring strong {
  color: var(--text);
  font-size: 13px;
}

.hub-continue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.hub-continue p {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hub-continue h3 {
  margin-bottom: 5px;
  font-size: 18px;
  line-height: 1.25;
}

.hub-continue > div > span {
  color: var(--muted);
  font-size: 13px;
}

.hub-continue .primary-action span {
  color: white;
  font-size: inherit;
}

.hub-continue-track {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
}

.hub-continue-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 240ms ease;
}

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

.hub-stats div {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 15px 16px;
}

.hub-stats span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hub-stats strong {
  font-size: 23px;
  line-height: 1.1;
}

.hub-module-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.hub-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.hub-module-head h3 {
  font-size: 16px;
}

.hub-module-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hub-module-list {
  display: grid;
}

.hub-module-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 70px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 13px 18px;
  text-align: left;
}

.hub-module-row:last-child {
  border-bottom: 0;
}

.hub-module-row:not(:disabled):hover {
  background: #f8fafc;
}

.hub-module-row.is-current {
  background: #f8fafc;
}

.hub-module-row.is-locked {
  cursor: not-allowed;
  opacity: 0.64;
}

.hub-module-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.hub-module-row.is-complete .hub-module-index {
  background: #dcfce7;
  color: #166534;
}

.hub-module-row.is-current .hub-module-index {
  background: var(--primary);
  color: white;
}

.hub-module-index svg {
  width: 15px;
  height: 15px;
}

.hub-module-copy {
  min-width: 0;
}

.hub-module-copy strong,
.hub-module-copy small {
  display: block;
}

.hub-module-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-module-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.hub-module-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.hub-module-row.is-complete .hub-module-status {
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534;
  padding: 5px 9px;
}

.module-context-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.module-context-main {
  min-width: 0;
}

.module-context-meta {
  display: block;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-transform: uppercase;
}

.module-context-bar h2 {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: clamp(20px, 2.4vw, 25px);
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: #475569;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.module-info-button:hover,
.module-info-button[aria-expanded="true"] {
  border-color: #bfdbfe;
  background: var(--primary-soft);
  color: var(--primary);
}

.module-info-button svg {
  width: 16px;
  height: 16px;
}

.module-context-details {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.module-context-details[hidden] {
  display: none;
}

.reader-panel {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  padding: 34px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.page-tabs {
  --step-count: 1;
  --track-left: 0px;
  --track-top: 58px;
  --track-width: 0px;
  --track-fill: 0px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--step-count), minmax(0, 1fr));
  gap: 0;
  margin-bottom: 34px;
  padding: 2px 28px 26px;
  border-bottom: 1px solid var(--border);
}

.stepper-rail {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stepper-track,
.stepper-fill {
  position: absolute;
  left: var(--track-left);
  top: var(--track-top);
  height: 3px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.stepper-track {
  width: var(--track-width);
  background: #d9d9d9;
}

.stepper-fill {
  width: var(--track-fill);
  background: #020617;
  transition: width 240ms ease;
}

.page-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 84px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: default;
  padding: 0 10px 32px;
  text-align: center;
  transition: color 180ms ease, transform 180ms ease;
}

.page-tab.is-locked {
  color: var(--muted);
}

.page-tab.is-active {
  color: var(--text);
}

.step-label {
  display: block;
  overflow: visible;
  max-width: 168px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  hyphens: auto;
  line-height: 1.18;
  overflow-wrap: break-word;
  text-align: center;
}

.step-dot-large {
  position: absolute;
  bottom: 6px;
  left: 50%;
  display: block;
  width: 18px;
  height: 18px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: #d9d9d9;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
  transform: translateX(-50%);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.page-tab.is-active .step-label {
  color: #020617;
  font-weight: 850;
}

.page-tab.is-active .step-dot-large {
  background: #000000;
  box-shadow: 0 0 0 1px rgba(2, 6, 23, 0.1), 0 4px 10px rgba(2, 6, 23, 0.16);
  transform: translateX(-50%) scale(1.08);
}

.page-tab.is-complete .step-dot-large {
  background: #020617;
}

.page-tab.is-locked .step-dot-large {
  background: #e5e7eb;
}

.lesson-article h1,
.lesson-article h2 {
  margin: 0 0 28px;
  color: var(--text);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
}

.lesson-article p,
.lesson-article li {
  color: #334155;
  font-size: 18px;
  line-height: 1.75;
}

.lesson-article p {
  margin: 0 0 20px;
}

.lesson-article ul,
.lesson-article ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.lesson-article strong {
  color: var(--text);
  font-weight: 800;
}

.lesson-article em {
  color: #334155;
}

.lesson-article code {
  border-radius: 6px;
  background: #f1f5f9;
  padding: 2px 5px;
  color: #1e293b;
  font-size: 0.9em;
}

.remember-box {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  margin: 30px 0;
  border-left: 4px solid var(--teal);
  border-radius: 0 14px 14px 0;
  background: var(--teal-soft);
  padding: 20px;
}

.remember-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: white;
  color: var(--teal);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.remember-icon svg {
  width: 22px;
  height: 22px;
}

.remember-box h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.remember-box p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

.reader-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.context-sidebar {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 28;
}

.context-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.context-mobile-head {
  display: none;
}

.progress-block {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.progress-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.progress-head p,
.progress-block > p {
  margin: 0;
}

.progress-head p {
  margin-bottom: 4px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.progress-head h3 {
  margin: 0;
  font-size: 18px;
}

.progress-head strong {
  color: var(--teal);
  font-size: 26px;
}

.progress-track {
  overflow: hidden;
  height: 8px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress-track div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 280ms ease;
}

.progress-block > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.timeline-block {
  flex: 1;
  padding: 24px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 4px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 12px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #e2e8f0 12%, #e2e8f0 88%, transparent);
}

.lesson-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 0 14px;
  text-align: left;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: white;
  z-index: 1;
}

.step-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
}

.lesson-step.is-active .step-dot {
  border-color: var(--primary);
  box-shadow: 0 0 0 5px white;
}

.lesson-step.is-active .step-dot::after {
  background: var(--primary);
}

.lesson-step h3 {
  margin: 2px 0 8px;
  color: #475569;
  font-size: 14px;
  line-height: 1.3;
}

.timeline-title {
  width: 100%;
  padding: 0;
  text-align: left;
}

.lesson-step.is-active h3 {
  color: var(--primary);
}

.lesson-step.is-locked h3 {
  color: #94a3b8;
}

.lesson-step.is-locked .step-dot {
  border-color: #e2e8f0;
}

.step-pages {
  display: grid;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid #e2e8f0;
}

.step-page {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  padding: 0;
  text-align: left;
  font-size: 13px;
}

.step-page::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #cbd5e1;
}

.step-page.is-locked {
  color: #94a3b8;
}

.step-page.is-locked::before {
  background: #e2e8f0;
}

.step-page.is-visited {
  color: var(--muted);
  text-decoration: line-through;
}

.step-page.is-visited::before {
  background: var(--teal);
}

.step-page.is-active {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.step-page.is-active::before {
  background: var(--primary);
}

.quiz-panel {
  display: block;
}

.quiz-panel[hidden],
.reader-panel[hidden] {
  display: none;
}

.quiz-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.quiz-head span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quiz-head h3 {
  margin: 4px 0 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
}

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

.quiz-head strong {
  color: var(--primary);
  font-size: 28px;
}

.quiz-questions {
  display: grid;
  gap: 18px;
}

.question-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.question-card h4 {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.45;
}

.answer-list {
  display: grid;
  gap: 8px;
}

.answer-option {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 12px;
  text-align: left;
  color: #334155;
}

.answer-option:hover {
  border-color: #bfdbfe;
  background: #f8fafc;
}

.answer-letter {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: #475569;
  font-weight: 900;
}

.answer-option.is-selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.answer-option.is-correct {
  border-color: rgba(5, 150, 105, 0.45);
  background: #ecfdf5;
}

.answer-option.is-wrong {
  border-color: rgba(220, 38, 38, 0.45);
  background: #fef2f2;
}

.answer-explanation {
  margin: 12px 0 0;
  border-left: 3px solid var(--teal);
  background: var(--teal-soft);
  border-radius: 0 10px 10px 0;
  padding: 12px;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
}

.quiz-footer {
  margin-top: 22px;
}

.quiz-complete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: 14px;
  background: var(--teal-soft);
  padding: 18px;
}

.quiz-complete h4,
.quiz-complete p {
  margin: 0;
}

.quiz-complete h4 {
  margin-bottom: 4px;
  font-size: 16px;
}

.quiz-complete p {
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.final-exam-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background: #f8fafc;
  padding: 20px;
}

.final-exam-inline span,
.final-exam-inline h2,
.final-exam-inline p {
  margin: 0;
}

.final-exam-inline > div:first-child > span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.final-exam-inline h2 {
  margin-top: 5px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.15;
}

.final-exam-inline p {
  margin-top: 7px;
  max-width: 640px;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.final-exam-inline-stats {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.final-exam-panel {
  max-width: 980px;
  margin-inline: auto;
}

.final-exam-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.final-exam-head h3 {
  margin: 5px 0 6px;
  color: var(--text);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.08;
}

.final-exam-head p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.45;
}

.final-exam-head strong {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 8px 12px;
  font-size: 14px;
}

.final-exam-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
}

.final-exam-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--primary));
  transition: width 220ms ease;
}

.final-exam-steps {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 6px;
  margin: 18px 0 28px;
}

.final-step {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 30px;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  background: white;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.final-step:hover {
  border-color: #bfdbfe;
  color: var(--primary);
}

.final-step.is-answered {
  border-color: rgba(13, 148, 136, 0.32);
  background: var(--teal-soft);
  color: var(--teal);
}

.final-step.is-current {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.final-exam-question {
  border-top: 1px solid var(--border);
  padding-top: 26px;
}

.final-exam-question h4 {
  margin: 0 0 20px;
  color: var(--text);
  font-size: clamp(21px, 3vw, 28px);
  line-height: 1.3;
}

.final-exam-question .answer-option {
  min-height: 58px;
  padding: 13px 14px;
  font-size: 16px;
}

.final-exam-question .answer-option:disabled {
  cursor: default;
}

.final-exam-footer {
  align-items: center;
  justify-content: flex-end;
}

.final-exam-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.final-result-summary {
  display: grid;
  gap: 22px;
}

.final-result-hero {
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 16px;
  background: var(--teal-soft);
  padding: 24px;
}

.final-result-summary.is-failed .final-result-hero {
  border-color: rgba(220, 38, 38, 0.16);
  background: #fef2f2;
}

.final-result-hero span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.final-result-summary.is-failed .final-result-hero span {
  color: #b91c1c;
}

.final-result-hero h4 {
  margin: 8px 0 6px;
  color: var(--text);
  font-size: clamp(42px, 8vw, 68px);
  line-height: 0.95;
}

.final-result-hero p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.55;
}

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

.final-result-stats div {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 16px;
}

.final-result-stats span,
.final-result-stats strong {
  display: block;
}

.final-result-stats span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.final-result-stats strong {
  margin-top: 6px;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.final-result-breakdown,
.final-result-repeat {
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.final-result-actions {
  display: flex;
  justify-content: flex-end;
}

.final-result-breakdown h5,
.final-result-repeat h5 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 16px;
}

.final-result-breakdown > div {
  display: grid;
  gap: 10px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #f8fafc;
  padding: 11px 12px;
}

.breakdown-row span,
.breakdown-row strong {
  position: relative;
  z-index: 1;
  font-size: 13px;
}

.breakdown-row span {
  color: #334155;
  font-weight: 750;
  line-height: 1.35;
}

.breakdown-row strong {
  color: var(--text);
}

.breakdown-row i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  min-width: 4px;
  background: rgba(13, 148, 136, 0.12);
}

.final-result-repeat ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.final-result-repeat li {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.final-result-repeat strong,
.final-result-repeat span,
.final-result-repeat small {
  display: block;
}

.final-result-repeat strong {
  color: var(--text);
  font-size: 14px;
}

.final-result-repeat span {
  margin-top: 5px;
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}

.final-result-repeat small {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.overlay {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.quiz-reset-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  padding: 20px;
}

.quiz-reset-modal[hidden] {
  display: none;
}

.quiz-reset-dialog {
  width: min(440px, 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: white;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.quiz-reset-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #fef2f2;
  color: #dc2626;
}

.quiz-reset-icon svg {
  width: 22px;
  height: 22px;
}

.quiz-reset-dialog h2,
.quiz-reset-dialog p {
  margin: 0;
}

.quiz-reset-dialog h2 {
  color: #111827;
  font-size: 21px;
  line-height: 1.25;
}

.quiz-reset-dialog p {
  margin-top: 10px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.quiz-reset-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.quiz-modal-secondary,
.quiz-modal-danger {
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 800;
}

.quiz-modal-secondary {
  border: 1px solid #e2e8f0;
  background: white;
  color: #475569;
}

.quiz-modal-secondary:hover {
  background: #f8fafc;
}

.quiz-modal-danger {
  border: 1px solid #dc2626;
  background: #dc2626;
  color: white;
}

.quiz-modal-danger:hover {
  border-color: #b91c1c;
  background: #b91c1c;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #0f172a;
  color: white;
  padding: 12px 14px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
  font-size: 14px;
  font-weight: 700;
}

.toast[hidden] {
  display: none;
}

@media (max-width: 860px) {
  .final-exam-inline {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .final-exam-steps {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .final-result-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .final-exam-head,
  .final-exam-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .final-exam-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .final-exam-nav button,
  .final-exam-inline button,
  .final-result-actions button {
    width: 100%;
  }

  .final-exam-steps {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .final-result-stats {
    grid-template-columns: 1fr;
  }
}

.mobile-only,
.tablet-only {
  display: none;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

@media (max-width: 1220px) {
  .shell {
    grid-template-columns: 272px minmax(0, 1fr);
  }

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

  .context-sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(360px, 92vw);
    transform: translateX(105%);
    transition: transform 220ms ease;
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.12);
  }

  .context-sidebar.is-open {
    transform: translateX(0);
  }

  .context-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
  }

  .context-mobile-head h2 {
    margin: 0;
    font-size: 18px;
  }

  .tablet-only {
    display: inline-grid;
  }

  .topbar {
    display: flex;
  }

  .topbar-actions {
    margin-left: auto;
  }
}

@media (max-width: 940px) {
  .shell {
    display: block;
  }

  .primary-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 88vw);
    transform: translateX(-105%);
    transition: transform 220ms ease;
    box-shadow: 20px 0 50px rgba(15, 23, 42, 0.12);
  }

  .primary-sidebar.is-open {
    transform: translateX(0);
  }

  .mobile-only {
    display: inline-grid;
  }

  .brand-block .mobile-only {
    margin-right: 2px;
  }

  .overlay.is-open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    z-index: 24;
  }

  .workspace {
    height: 100vh;
  }

  .topbar {
    min-height: 72px;
    padding: 12px 18px;
  }

  .topbar h2 {
    max-width: 52vw;
    font-size: 20px;
  }

  .breadcrumbs {
    display: none;
  }

  .meta-pills {
    display: none;
  }

  .primary-action {
    padding-inline: 12px;
  }

  #quizButton span {
    display: none;
  }

  .content-inner {
    padding: 20px 18px 72px;
  }

  body.quiz-overview-mode .content-inner {
    width: min(100%, 900px);
    padding: 32px 28px 72px;
  }

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

  .module-context-bar {
    padding: 12px 14px;
  }

  .course-hub {
    gap: 14px;
  }

  .hub-header h2 {
    font-size: 28px;
  }

  .hub-continue {
    border-radius: 12px;
  }

  .reader-panel {
    padding: 24px;
  }

  .module-milestone-panel {
    min-height: auto;
    width: min(100%, 900px);
    padding: 46px 38px;
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 10px;
  }

  .topbar-title {
    flex: 1;
  }

  .topbar h2 {
    max-width: 100%;
    font-size: 17px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions .icon-button {
    width: 38px;
    height: 38px;
  }

  .hub-header {
    align-items: flex-start;
  }

  .hub-header h2 {
    font-size: 24px;
  }

  .hub-ring {
    width: 50px;
    height: 50px;
  }

  .hub-continue {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .hub-continue .primary-action {
    width: 100%;
  }

  .hub-stats {
    grid-template-columns: 1fr;
  }

  .hub-module-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
  }

  .hub-module-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px 12px;
    min-height: 82px;
    padding: 13px 16px;
  }

  .hub-module-status {
    grid-column: 2;
    justify-self: start;
  }

  .hub-module-copy strong {
    white-space: normal;
  }

  .primary-action {
    min-height: 38px;
    border-radius: 999px;
    padding: 9px 11px;
  }

  .module-milestone-panel {
    width: 100%;
    border-radius: 14px;
    padding: 30px 20px;
  }

  .module-milestone-copy h1 {
    font-size: 36px;
  }

  .module-milestone-copy p {
    font-size: 16px;
  }

  .module-milestone-outline {
    margin: 26px 0 32px;
    padding: 18px 16px;
  }

  .module-milestone-outline h2 {
    align-items: flex-start;
    font-size: 12px;
  }

  .module-milestone-outline li {
    gap: 10px;
    font-size: 14px;
  }

  .module-milestone-outline-index {
    min-width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .module-milestone-details {
    grid-template-columns: 1fr;
  }

  .module-milestone-details div {
    padding: 14px 0;
  }

  .module-milestone-details div + div {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-left: 0;
  }

  .module-milestone-start {
    width: 100%;
  }

  body.quiz-overview-mode .content-inner {
    padding: 26px 18px 64px;
  }

  .quiz-overview-head {
    margin-bottom: 26px;
  }

  .quiz-overview-head h1 {
    font-size: 28px;
  }

  .quiz-overview-head p {
    font-size: 16px;
  }

  .quiz-overview-actions {
    display: grid;
    gap: 12px;
    margin-bottom: 28px;
  }

  .quiz-portal {
    gap: 30px;
  }

  .quiz-portal-hero {
    border-radius: 16px;
    padding: 30px 22px;
  }

  .quiz-portal-hero h1 {
    font-size: 36px;
  }

  .quiz-portal-hero p {
    font-size: 15px;
  }

  .quiz-portal-alert {
    display: flex;
    width: 100%;
    margin-top: 24px;
  }

  .quiz-portal-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .quiz-portal-card {
    min-height: 210px;
  }

  .quiz-portal-engine-head {
    display: grid;
    gap: 16px;
  }

  .quiz-portal-engine-head .quiz-portal-button {
    width: fit-content;
  }

  .quiz-portal-question,
  .quiz-portal-result {
    border-radius: 14px;
  }

  .quiz-portal-question h3 {
    font-size: 19px;
  }

  .quiz-portal-question-actions,
  .quiz-portal-result-actions {
    display: grid;
  }

  .quiz-portal-button,
  .quiz-portal-option {
    width: 100%;
  }

  .quiz-portal-flashcard {
    height: 360px;
  }

  .quiz-portal-flashcard-front strong {
    font-size: 24px;
  }

  .quiz-portal-flashcard-back strong {
    font-size: 18px;
  }

  .quiz-main-action,
  .quiz-alt-action,
  .quiz-reset-action {
    width: 100%;
  }

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

  .scenario-card {
    min-height: 140px;
  }

  .module-context-bar {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 10px;
    border-radius: 12px;
    padding: 11px 12px;
  }

  .module-context-bar h2 {
    font-size: 18px;
  }

  .module-context-meta {
    font-size: 10px;
  }

  .module-info-button {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }

  .module-info-button span {
    display: none;
  }

  .module-context-details {
    font-size: 13px;
  }

  .reader-panel {
    border-radius: 14px;
    padding: 18px;
  }

  .page-tabs {
    margin-bottom: 24px;
    padding: 2px 16px 18px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .page-tab {
    min-width: 142px;
    scroll-snap-align: center;
  }

  .step-label {
    max-width: 132px;
    font-size: 12px;
  }

  .lesson-article h1,
  .lesson-article h2 {
    margin-bottom: 22px;
    font-size: 27px;
  }

  .lesson-article p,
  .lesson-article li {
    font-size: 16px;
    line-height: 1.7;
  }

  .remember-box {
    grid-template-columns: 1fr;
    padding: 16px;
  }

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

  .reader-footer button {
    width: 100%;
  }

  .question-card {
    padding: 16px;
  }

  .quiz-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .quiz-actions {
    justify-content: flex-start;
  }

  .quiz-complete {
    align-items: stretch;
    flex-direction: column;
  }

  .answer-option {
    grid-template-columns: 28px minmax(0, 1fr);
  }
}

.vu1-hub-mobile-head,
.vu1-hub-mobile-progress,
.vu1-hub-mobile-tabbar {
  display: none;
}

body.course-hub-modern-mode .shell {
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  background: #f8fafc;
}

body.course-hub-modern-mode .topbar {
  display: none;
}

body.course-hub-modern-mode .content-inner {
  width: 100%;
  padding: 36px 36px 48px;
}

body.course-hub-modern-mode .primary-sidebar {
  background: #ffffff;
  border-right-color: #e7ecf2;
}

body.course-hub-modern-mode .brand-block {
  gap: 10px;
  padding: 20px 22px 18px;
  border-bottom: 0;
}

body.course-hub-modern-mode .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: none;
}

body.course-hub-modern-mode .brand-block h1 {
  font-size: 15px;
  font-weight: 750;
}

body.course-hub-modern-mode .brand-block p {
  margin-top: 1px;
  color: #94a3b8;
  font-size: 9.5px;
  letter-spacing: 0.13em;
}

body.course-hub-modern-mode .main-nav {
  gap: 3px;
  padding: 0 16px 14px;
}

body.course-hub-modern-mode .nav-item {
  min-height: 37px;
  gap: 11px;
  border-radius: 8px;
  color: #5b6b84;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 550;
}

body.course-hub-modern-mode .nav-item svg {
  width: 17px;
  height: 17px;
}

body.course-hub-modern-mode .module-list-wrap {
  padding: 8px 16px 18px;
}

body.course-hub-modern-mode .section-label-row {
  align-items: baseline;
}

body.course-hub-modern-mode .section-label-row h2 {
  color: #8a97ab;
  font-size: 10.5px;
  letter-spacing: 0.11em;
}

body.course-hub-modern-mode .section-label-row span {
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 500;
}

body.course-hub-modern-mode .module-list {
  gap: 8px;
}

body.course-hub-modern-mode .module-card {
  min-height: auto;
  border-color: #e7ecf2;
  border-radius: 10px;
  background: #ffffff;
  padding: 12px 13px;
  box-shadow: none;
}

body.course-hub-modern-mode .module-card.is-active {
  border-color: #bfd7fe;
  background: #f5f9ff;
  box-shadow: none;
}

body.course-hub-modern-mode .module-card.is-active::before {
  display: none;
}

body.course-hub-modern-mode .module-card h3 {
  margin-top: 9px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

body.course-hub-modern-mode .module-card p {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 11px;
}

body.course-hub-modern-mode .module-number {
  width: 22px;
  height: 22px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
}

body.course-hub-modern-mode .module-card.is-active .module-number {
  background: var(--primary);
  color: #ffffff;
}

body.course-hub-modern-mode .module-progress-ring {
  width: auto;
  min-width: 30px;
  height: 22px;
  border: 1px solid #e7ecf2;
  border-radius: 999px;
  background: #ffffff;
  color: #94a3b8;
  padding: 3px 8px;
  font-size: 10.5px;
}

body.course-hub-modern-mode .module-card.is-active .module-progress-ring {
  border-color: #bfd7fe;
  color: #1d4ed8;
}

body.course-hub-modern-mode .profile-block {
  margin: 16px;
  border-top: 1px solid #eef2f7;
  padding: 14px 6px 2px;
}

body.course-hub-modern-mode .course-hub {
  gap: 16px;
}

body.course-hub-modern-mode .hub-header {
  align-items: flex-start;
}

body.course-hub-modern-mode .hub-header p {
  color: #16a34a;
  font-size: 11px;
  letter-spacing: 0.14em;
}

body.course-hub-modern-mode .hub-header h2 {
  margin: 8px 0 6px;
  font-family: "Schibsted Grotesk", Inter, system-ui, sans-serif;
  font-size: 29px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.15;
}

body.course-hub-modern-mode .hub-header span {
  margin-top: 0;
  color: #64748b;
  font-size: 14px;
}

body.course-hub-modern-mode .hub-ring {
  width: 52px;
  height: 52px;
  border: 3px solid #eef2f7;
  background:
    radial-gradient(circle at center, #f8fafc 58%, transparent 59%),
    conic-gradient(var(--primary) var(--ring-progress, 0deg), transparent 0deg);
}

body.course-hub-modern-mode .hub-ring strong {
  color: #64748b;
  font-size: 12.5px;
}

body.course-hub-modern-mode .hub-continue {
  border-color: #e7ecf2;
  border-radius: 12px;
  padding: 22px 24px 18px;
  box-shadow: none;
}

body.course-hub-modern-mode .hub-continue p {
  display: inline-flex;
  margin-bottom: 0;
  border-radius: 6px;
  background: #eff4ff;
  color: #1d4ed8;
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.course-hub-modern-mode .hub-continue h3 {
  margin-top: 10px;
  margin-bottom: 4px;
  font-family: "Schibsted Grotesk", Inter, system-ui, sans-serif;
  font-size: 17.5px;
  font-weight: 750;
}

body.course-hub-modern-mode .hub-continue > div > span {
  color: #64748b;
  font-size: 13px;
}

body.course-hub-modern-mode .hub-continue-track {
  height: 4px;
  margin-top: 6px;
  background: #eef2f7;
}

body.course-hub-modern-mode .hub-continue .primary-action {
  min-height: 42px;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 13.5px;
}

body.course-hub-modern-mode .hub-stats {
  gap: 0;
  overflow: hidden;
  border: 1px solid #e7ecf2;
  border-radius: 12px;
  background: #ffffff;
}

body.course-hub-modern-mode .hub-stats div {
  border: 0;
  border-radius: 0;
  background: #ffffff;
  padding: 18px 24px;
}

body.course-hub-modern-mode .hub-stats div + div {
  border-left: 1px solid #eef2f7;
}

body.course-hub-modern-mode .hub-stats span {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: #8a97ab;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

body.course-hub-modern-mode .hub-stats span::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--primary);
}

body.course-hub-modern-mode .hub-stats div:nth-child(2) span::before {
  background: #16a34a;
}

body.course-hub-modern-mode .hub-stats div:nth-child(3) span::before {
  background: #7c3aed;
}

body.course-hub-modern-mode .hub-stats strong {
  font-family: "Schibsted Grotesk", Inter, system-ui, sans-serif;
  font-size: 24px;
  font-weight: 750;
}

body.course-hub-modern-mode .hub-module-panel {
  border-color: #e7ecf2;
  border-radius: 12px;
}

body.course-hub-modern-mode .hub-module-head {
  padding: 18px 24px 14px;
  border-bottom-color: #eef2f7;
}

body.course-hub-modern-mode .hub-module-head h3 {
  font-family: "Schibsted Grotesk", Inter, system-ui, sans-serif;
  font-size: 16.5px;
  font-weight: 750;
}

body.course-hub-modern-mode .hub-module-head span {
  color: #94a3b8;
  font-size: 12.5px;
}

body.course-hub-modern-mode .hub-module-row {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 54px;
  border-bottom-color: #eef2f7;
  padding: 14px 24px;
}

body.course-hub-modern-mode .hub-module-row.is-current {
  background: #f8fbff;
}

body.course-hub-modern-mode .hub-module-index {
  width: 30px;
  height: 30px;
  font-size: 12.5px;
}

body.course-hub-modern-mode .hub-module-copy strong {
  font-size: 14px;
  font-weight: 650;
}

body.course-hub-modern-mode .hub-module-copy small {
  color: #94a3b8;
  font-size: 12px;
}

body.course-hub-modern-mode .hub-module-status {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #64748b;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 650;
}

body.course-hub-modern-mode .context-sidebar {
  background: #ffffff;
  border-left-color: #e7ecf2;
}

body.course-hub-modern-mode .progress-block {
  padding: 32px 26px 22px;
  border-bottom: 0;
}

body.course-hub-modern-mode .progress-head p {
  color: #8a97ab;
  font-size: 10.5px;
  letter-spacing: 0.12em;
}

body.course-hub-modern-mode .progress-head h3 {
  font-family: "Schibsted Grotesk", Inter, system-ui, sans-serif;
  font-size: 19px;
  font-weight: 750;
}

body.course-hub-modern-mode .progress-head strong {
  color: #16a34a;
  font-family: "Schibsted Grotesk", Inter, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 750;
}

body.course-hub-modern-mode .progress-track {
  height: 5px;
  margin-bottom: 16px;
  background: #eef2f7;
}

body.course-hub-modern-mode .progress-track div {
  background: #16a34a;
}

body.course-hub-modern-mode .progress-block > p {
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.65;
}

body.course-hub-modern-mode .timeline-block {
  padding: 0 26px 32px;
}

body.course-hub-modern-mode .timeline-block .section-label-row {
  margin: 0 0 16px;
  border-top: 1px solid #eef2f7;
  padding-top: 22px;
}

body.course-hub-modern-mode .timeline::before {
  left: 6px;
  width: 1px;
  background: #e7ecf2;
}

body.course-hub-modern-mode .lesson-step {
  grid-template-columns: 13px minmax(0, 1fr);
  gap: 13px;
  padding: 0 0 20px;
}

body.course-hub-modern-mode .step-dot {
  width: 12px;
  height: 12px;
  border-width: 2px;
  margin-top: 3px;
}

body.course-hub-modern-mode .lesson-step.is-active .step-dot {
  border-width: 3px;
  box-shadow: none;
}

body.course-hub-modern-mode .lesson-step.is-active .step-dot::after {
  display: none;
}

body.course-hub-modern-mode .lesson-step h3 {
  margin: 0 0 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}

body.course-hub-modern-mode .lesson-step.is-active h3 {
  color: #1d4ed8;
  font-weight: 750;
}

body.course-hub-modern-mode .step-pages {
  gap: 6px;
  border-left: 0;
  padding-left: 0;
}

body.course-hub-modern-mode .step-page {
  gap: 7px;
  color: #8a97ab;
  font-size: 12px;
}

body.course-hub-modern-mode .step-page.is-active {
  color: #0f172a;
  font-weight: 650;
}

body.course-hub-modern-mode .step-page.is-active::before {
  background: var(--primary);
}

@media (max-width: 940px) {
  body.course-hub-modern-mode .shell {
    display: block;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }

  body.course-hub-modern-mode .primary-sidebar,
  body.course-hub-modern-mode .context-sidebar,
  body.course-hub-modern-mode .topbar {
    display: none !important;
  }

  body.course-hub-modern-mode .workspace,
  body.course-hub-modern-mode .content-scroll {
    height: 100vh;
  }

  body.course-hub-modern-mode .content-inner {
    width: 100%;
    padding: var(--mobile-app-top-padding) 18px 120px;
  }

  body.course-hub-modern-mode .vu1-hub-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  body.course-hub-modern-mode .vu1-hub-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
  }

  body.course-hub-modern-mode .vu1-hub-mobile-brand span,
  body.course-hub-modern-mode .vu1-hub-mobile-avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: var(--primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 850;
  }

  body.course-hub-modern-mode .vu1-hub-mobile-brand strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 750;
  }

  body.course-hub-modern-mode .vu1-hub-mobile-avatar {
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 10.5px;
  }

  body.course-hub-modern-mode .course-hub {
    gap: 14px;
  }

  body.course-hub-modern-mode .hub-header {
    margin-top: 22px;
  }

  body.course-hub-modern-mode .hub-header p {
    font-size: 10px;
  }

  body.course-hub-modern-mode .hub-header h2 {
    margin: 7px 0 4px;
    font-size: 22px;
    line-height: 1.15;
  }

  body.course-hub-modern-mode .hub-header span {
    font-size: 12px;
  }

  body.course-hub-modern-mode .hub-ring {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  body.course-hub-modern-mode .hub-ring strong {
    font-size: 11px;
  }

  body.course-hub-modern-mode .hub-continue {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  body.course-hub-modern-mode .hub-continue > div {
    order: 1;
  }

  body.course-hub-modern-mode .hub-continue-track {
    order: 2;
    margin-top: 0;
  }

  body.course-hub-modern-mode .hub-continue .primary-action {
    order: 3;
    width: 100%;
    min-height: 44px;
  }

  body.course-hub-modern-mode .hub-continue p {
    font-size: 9.5px;
    padding: 3px 8px;
  }

  body.course-hub-modern-mode .hub-continue h3 {
    font-size: 15px;
    line-height: 1.35;
  }

  body.course-hub-modern-mode .hub-continue > div > span {
    font-size: 11.5px;
    line-height: 1.5;
  }

  body.course-hub-modern-mode .hub-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.course-hub-modern-mode .hub-stats div {
    padding: 12px;
  }

  body.course-hub-modern-mode .hub-stats span {
    gap: 5px;
    margin-bottom: 5px;
    font-size: 8.5px;
    letter-spacing: 0.04em;
  }

  body.course-hub-modern-mode .hub-stats span::before {
    width: 6px;
    height: 6px;
  }

  body.course-hub-modern-mode .hub-stats strong {
    font-size: 16px;
  }

  body.course-hub-modern-mode .hub-module-head {
    align-items: baseline;
    flex-direction: row;
    padding: 14px 16px 11px;
  }

  body.course-hub-modern-mode .hub-module-head h3 {
    font-size: 14.5px;
  }

  body.course-hub-modern-mode .hub-module-head span {
    font-size: 10.5px;
  }

  body.course-hub-modern-mode .hub-module-row {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 55px;
    padding: 12px 16px;
  }

  body.course-hub-modern-mode .hub-module-row::after {
    content: "›";
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
  }

  body.course-hub-modern-mode .hub-module-index {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  body.course-hub-modern-mode .hub-module-copy strong {
    font-size: 12.5px;
    line-height: 1.35;
    white-space: normal;
  }

  body.course-hub-modern-mode .hub-module-copy small {
    font-size: 10.5px;
  }

  body.course-hub-modern-mode .hub-module-status {
    display: none;
  }

  body.course-hub-modern-mode .vu1-hub-mobile-progress {
    display: block;
    border: 1px solid #e7ecf2;
    border-radius: 12px;
    background: #ffffff;
    padding: 16px;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-head,
  body.course-hub-modern-mode .vu1-mobile-progress-subhead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-head span,
  body.course-hub-modern-mode .vu1-mobile-progress-subhead span {
    color: #8a97ab;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-head strong {
    color: #16a34a;
    font-family: "Schibsted Grotesk", Inter, system-ui, sans-serif;
    font-size: 17px;
    font-weight: 750;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-track {
    overflow: hidden;
    height: 4px;
    margin-top: 10px;
    border-radius: 999px;
    background: #eef2f7;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #16a34a;
  }

  body.course-hub-modern-mode .vu1-hub-mobile-progress > p {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.6;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-subhead {
    margin: 16px 0 12px;
    border-top: 1px solid #eef2f7;
    padding-top: 14px;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-subhead small {
    color: #94a3b8;
    font-size: 10px;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-list {
    display: grid;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-step {
    position: relative;
    display: grid;
    grid-template-columns: 11px minmax(0, 1fr);
    gap: 11px;
    padding-bottom: 14px;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 0;
    left: 5px;
    width: 1px;
    background: #e7ecf2;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-dot {
    width: 11px;
    height: 11px;
    margin-top: 3px;
    border: 2px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    z-index: 1;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-step.is-active .vu1-mobile-progress-dot {
    border-width: 3px;
    border-color: var(--primary);
  }

  body.course-hub-modern-mode .vu1-mobile-progress-step strong {
    color: #334155;
    font-size: 12px;
    font-weight: 650;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-step.is-active strong {
    color: #1d4ed8;
    font-weight: 750;
  }

  body.course-hub-modern-mode .vu1-mobile-progress-step p {
    margin: 5px 0 0;
    color: #8a97ab;
    font-size: 11px;
    line-height: 1.55;
  }

  body.course-hub-modern-mode .vu1-hub-mobile-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    border-top: 1px solid #e7ecf2;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 6px calc(18px + env(safe-area-inset-bottom));
    backdrop-filter: blur(12px);
  }

  body.course-hub-modern-mode .vu1-hub-mobile-tab {
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 56px;
    border: 0;
    background: transparent;
    color: #93a2b8;
    padding: 3px 2px 0;
    font-size: 9.5px;
    font-weight: 700;
  }

  body.course-hub-modern-mode .vu1-hub-mobile-tab svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.1;
  }

  body.course-hub-modern-mode .vu1-hub-mobile-tab.is-active {
    color: #1d4ed8;
    font-weight: 850;
  }
}

.quiz-portal-mobile-head,
.quiz-portal-mobile-tabbar,
.quiz-portal-copy-mobile {
  display: none;
}

body.quiz-overview-mode .shell {
  grid-template-columns: 260px minmax(0, 1fr);
  background: #f1f5f9;
}

body.quiz-overview-mode .topbar,
body.quiz-overview-mode .context-sidebar {
  display: none;
}

body.quiz-overview-mode .content-inner {
  width: 100%;
  max-width: none;
  padding: 40px 56px 56px;
}

body.quiz-overview-mode .quiz-overview-panel {
  width: min(100%, 1020px);
  margin: 0 auto;
}

body.quiz-overview-mode .primary-sidebar {
  background: #ffffff;
  border-right-color: #e2e8f0;
}

body.quiz-overview-mode .brand-block {
  gap: 10px;
  padding: 20px 20px 18px;
  border-bottom: 0;
}

body.quiz-overview-mode .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 13px;
  box-shadow: none;
}

body.quiz-overview-mode .brand-block h1 {
  font-size: 14px;
  font-weight: 750;
}

body.quiz-overview-mode .brand-block p {
  margin-top: 1px;
  color: #94a3b8;
  font-size: 9.5px;
  letter-spacing: 0.12em;
}

body.quiz-overview-mode .main-nav {
  gap: 4px;
  padding: 0 14px 14px;
}

body.quiz-overview-mode .nav-item {
  min-height: 37px;
  gap: 10px;
  border-radius: 10px;
  color: #475569;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 550;
}

body.quiz-overview-mode .nav-item svg {
  width: 17px;
  height: 17px;
}

body.quiz-overview-mode .module-list-wrap {
  padding: 8px 14px 20px;
}

body.quiz-overview-mode .section-label-row {
  align-items: baseline;
  padding: 0 4px;
}

body.quiz-overview-mode .section-label-row h2 {
  color: #94a3b8;
  font-size: 10px;
  letter-spacing: 0.12em;
}

body.quiz-overview-mode .section-label-row span {
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 650;
}

body.quiz-overview-mode .module-list {
  gap: 8px;
}

.quiz-sidebar-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 12px;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease;
}

.quiz-sidebar-card:hover,
.quiz-sidebar-card.is-active {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.quiz-sidebar-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
}

.quiz-sidebar-icon svg {
  width: 14px;
  height: 14px;
}

.quiz-sidebar-copy {
  min-width: 0;
}

.quiz-sidebar-copy strong,
.quiz-sidebar-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-sidebar-copy strong {
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 650;
}

.quiz-sidebar-copy small {
  margin-top: 1px;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 500;
}

body.quiz-overview-mode .profile-block {
  margin: 16px 14px;
  border-top: 1px solid #eef2f7;
  padding: 14px 6px 2px;
}

body.quiz-overview-mode .quiz-portal {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100%;
}

.quiz-portal-page-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quiz-portal-page-head span {
  color: #16a34a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quiz-portal-page-head h1,
.quiz-portal-page-head p,
body.quiz-overview-mode .quiz-portal-hero h2,
body.quiz-overview-mode .quiz-portal-hero p,
body.quiz-overview-mode .quiz-portal-modules h2,
body.quiz-overview-mode .quiz-portal-card strong,
body.quiz-overview-mode .quiz-portal-card-copy,
body.quiz-overview-mode .quiz-portal-engine h2,
body.quiz-overview-mode .quiz-portal-engine p,
body.quiz-overview-mode .quiz-portal-question h3,
body.quiz-overview-mode .quiz-portal-result h2,
body.quiz-overview-mode .quiz-portal-result p,
body.quiz-overview-mode .quiz-portal-flashcards h2 {
  margin: 0;
}

.quiz-portal-page-head h1 {
  color: #0f172a;
  font-size: 30px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.08;
}

.quiz-portal-page-head p {
  color: #64748b;
  font-size: 14px;
}

body.quiz-overview-mode .quiz-portal-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  color: #0f172a;
  padding: 36px 40px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.05);
}

body.quiz-overview-mode .quiz-portal-hero::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: #eff6ff;
  pointer-events: none;
}

body.quiz-overview-mode .quiz-portal-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

body.quiz-overview-mode .quiz-portal-hero h2 {
  color: #0f172a;
  font-size: 30px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
}

body.quiz-overview-mode .quiz-portal-hero h2 span {
  display: block;
  color: #2563eb;
}

body.quiz-overview-mode .quiz-portal-hero p {
  margin-top: 16px;
  color: #475569;
  font-size: 15px;
  line-height: 1.65;
}

body.quiz-overview-mode .quiz-portal-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 640px;
  margin-top: 28px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e40af;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

body.quiz-overview-mode .quiz-portal-alert svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #1d4ed8;
}

body.quiz-overview-mode .quiz-portal-modules h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 850;
}

body.quiz-overview-mode .quiz-portal-modules h2 svg {
  width: 18px;
  height: 18px;
  color: #2563eb;
}

body.quiz-overview-mode .quiz-portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

body.quiz-overview-mode .quiz-portal-card {
  position: relative;
  display: flex;
  min-height: 204px;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 24px;
  text-align: left;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.03);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body.quiz-overview-mode .quiz-portal-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

body.quiz-overview-mode .quiz-portal-card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
}

body.quiz-overview-mode .quiz-portal-card-icon svg {
  width: 22px;
  height: 22px;
}

body.quiz-overview-mode .quiz-portal-card-demo {
  position: absolute;
  top: 24px;
  right: 24px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.quiz-overview-mode .quiz-portal-card strong {
  color: #0f172a;
  font-size: 17px;
  font-weight: 780;
  line-height: 1.25;
}

body.quiz-overview-mode .quiz-portal-card-copy {
  display: block;
  flex: 1;
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.55;
}

.quiz-portal-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.quiz-portal-card-foot small {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 550;
}

body.quiz-overview-mode .quiz-portal-card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 780;
}

body.quiz-overview-mode .quiz-portal-card-action svg {
  width: 14px;
  height: 14px;
}

body.quiz-overview-mode .quiz-portal-engine,
body.quiz-overview-mode .quiz-portal-flashcards {
  width: min(100%, 780px);
  margin: 0 auto;
}

.quiz-portal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
}

.quiz-portal-back:hover {
  color: #1d4ed8;
}

.quiz-portal-back svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

body.quiz-overview-mode .quiz-portal-engine-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 14px;
}

body.quiz-overview-mode .quiz-portal-engine-head h2 {
  color: #0f172a;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
}

body.quiz-overview-mode .quiz-portal-engine-head p {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

body.quiz-overview-mode .quiz-portal-progress {
  overflow: hidden;
  height: 8px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: #e2e8f0;
}

body.quiz-overview-mode .quiz-portal-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  transition: width 260ms ease;
}

body.quiz-overview-mode .quiz-portal-question {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 32px 36px;
  box-shadow: none;
}

body.quiz-overview-mode .quiz-portal-question h3 {
  color: #0f172a;
  font-size: 19px;
  font-weight: 760;
  line-height: 1.45;
}

body.quiz-overview-mode .quiz-portal-options {
  display: grid;
  gap: 12px;
  margin: 0;
}

body.quiz-overview-mode .quiz-portal-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 14px 18px;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  transition: border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

body.quiz-overview-mode .quiz-portal-option:not(:disabled):hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

body.quiz-overview-mode .quiz-portal-option.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

body.quiz-overview-mode .quiz-portal-option.is-correct {
  border-color: #22c55e;
  background: #f0fdf4;
}

body.quiz-overview-mode .quiz-portal-option.is-wrong {
  border-color: #ef4444;
  background: #fef2f2;
}

body.quiz-overview-mode .quiz-portal-option.is-muted {
  opacity: 0.54;
}

.quiz-portal-option-letter {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 800;
}

.quiz-portal-option.is-selected .quiz-portal-option-letter {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.quiz-portal-option.is-correct .quiz-portal-option-letter {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
}

.quiz-portal-option.is-wrong .quiz-portal-option-letter {
  border-color: #ef4444;
  background: #ef4444;
  color: #ffffff;
}

.quiz-portal-option-mark {
  color: inherit;
  font-size: 16px;
  font-weight: 900;
  text-align: right;
}

body.quiz-overview-mode .quiz-portal-explanation {
  display: flex;
  gap: 12px;
  margin: 0;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e40af;
  padding: 16px 20px;
}

body.quiz-overview-mode .quiz-portal-explanation.is-correct {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

body.quiz-overview-mode .quiz-portal-explanation svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
}

body.quiz-overview-mode .quiz-portal-explanation strong,
body.quiz-overview-mode .quiz-portal-explanation p {
  margin: 0;
}

body.quiz-overview-mode .quiz-portal-explanation strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

body.quiz-overview-mode .quiz-portal-explanation p {
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

body.quiz-overview-mode .quiz-portal-question-actions {
  display: flex;
  justify-content: flex-end;
  min-height: 0;
}

body.quiz-overview-mode .quiz-portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 10px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

body.quiz-overview-mode .quiz-portal-button svg {
  width: 15px;
  height: 15px;
}

body.quiz-overview-mode .quiz-portal-button-primary {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
  box-shadow: none;
}

body.quiz-overview-mode .quiz-portal-button-primary:hover {
  background: #1d4ed8;
}

body.quiz-overview-mode .quiz-portal-button-secondary {
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
}

body.quiz-overview-mode .quiz-portal-button-secondary:hover {
  border-color: #bfdbfe;
  color: #1d4ed8;
}

body.quiz-overview-mode .quiz-portal-result {
  display: flex;
  width: min(100%, 780px);
  flex-direction: column;
  gap: 24px;
  margin: 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  box-shadow: none;
}

.quiz-portal-result-summary {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 36px 40px;
}

.quiz-portal-result-ring {
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
  border-radius: 999px;
  background: conic-gradient(var(--result-color, #2563eb) var(--result-deg, 0deg), #e2e8f0 0deg);
}

.quiz-portal-result-ring span {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border-radius: inherit;
  background: #ffffff;
  color: var(--result-color, #2563eb);
  font-size: 25px;
  font-weight: 850;
}

.quiz-portal-result-kicker {
  display: block;
  color: #16a34a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.quiz-overview-mode .quiz-portal-result h2 {
  margin-top: 8px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
}

body.quiz-overview-mode .quiz-portal-result p {
  margin-top: 8px;
  color: #64748b;
  font-size: 14.5px;
  line-height: 1.6;
}

body.quiz-overview-mode .quiz-portal-result-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.quiz-portal-review {
  display: grid;
  gap: 12px;
}

.quiz-portal-review > h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 850;
}

.quiz-portal-review > div {
  display: grid;
  gap: 12px;
}

.quiz-portal-review-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 18px 22px;
}

.quiz-portal-review-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.quiz-portal-review-mark.is-correct {
  background: #16a34a;
}

.quiz-portal-review-mark.is-wrong {
  background: #ef4444;
}

.quiz-portal-review-item h3,
.quiz-portal-review-item p,
.quiz-portal-review-item small {
  margin: 0;
}

.quiz-portal-review-item h3 {
  color: #0f172a;
  font-size: 14.5px;
  font-weight: 760;
  line-height: 1.45;
}

.quiz-portal-review-item p {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
}

.quiz-portal-review-item p.is-correct {
  color: #15803d;
}

.quiz-portal-review-item p.is-wrong {
  color: #dc2626;
}

.quiz-portal-review-item small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

body.quiz-overview-mode .quiz-portal-flashcards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: min(100%, 680px);
}

body.quiz-overview-mode .quiz-portal-flashcard {
  width: 100%;
  min-height: 300px;
  height: 300px;
  border: 0;
  background: transparent;
  padding: 0;
  perspective: 1000px;
}

body.quiz-overview-mode .quiz-portal-flashcard-face {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  border-radius: 18px;
  padding: 40px 48px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

body.quiz-overview-mode .quiz-portal-flashcard-front {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
}

body.quiz-overview-mode .quiz-portal-flashcard-back {
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
}

body.quiz-overview-mode .quiz-portal-flashcard-face small,
body.quiz-overview-mode .quiz-portal-flashcard-face em {
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.quiz-overview-mode .quiz-portal-flashcard-front small,
body.quiz-overview-mode .quiz-portal-flashcard-front em {
  color: #94a3b8;
}

body.quiz-overview-mode .quiz-portal-flashcard-back small,
body.quiz-overview-mode .quiz-portal-flashcard-back em {
  color: #93c5fd;
}

body.quiz-overview-mode .quiz-portal-flashcard-face small {
  font-size: 11px;
}

body.quiz-overview-mode .quiz-portal-flashcard-face em {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

body.quiz-overview-mode .quiz-portal-flashcard-front strong {
  color: #0f172a;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.25;
}

body.quiz-overview-mode .quiz-portal-flashcard-back strong {
  max-width: 520px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 550;
  line-height: 1.65;
}

body.quiz-overview-mode .quiz-portal-flashcard-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 0;
}

body.quiz-overview-mode .quiz-portal-flashcard-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  height: auto;
  min-height: 44px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: none;
}

body.quiz-overview-mode .quiz-portal-flashcard-controls button.is-primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

body.quiz-overview-mode .quiz-portal-flashcard-controls svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 940px) {
  body.quiz-overview-mode .shell {
    display: block;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }

  body.quiz-overview-mode .primary-sidebar,
  body.quiz-overview-mode .context-sidebar,
  body.quiz-overview-mode .topbar {
    display: none !important;
  }

  body.quiz-overview-mode .workspace,
  body.quiz-overview-mode .content-scroll {
    height: 100vh;
  }

  body.quiz-overview-mode .content-inner {
    width: 100%;
    padding: var(--mobile-app-top-padding) 18px 112px;
  }

  body.quiz-overview-mode .quiz-overview-panel {
    width: 100%;
  }

  body.quiz-overview-mode .quiz-portal {
    gap: 16px;
  }

  body.quiz-overview-mode .quiz-portal-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .quiz-portal-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .quiz-portal-mobile-brand span,
  .quiz-portal-mobile-avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 11px;
    font-weight: 850;
  }

  .quiz-portal-mobile-brand strong {
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 780;
  }

  .quiz-portal-mobile-avatar {
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 10.5px;
  }

  .quiz-portal-page-head {
    margin-top: 14px;
    gap: 4px;
  }

  .quiz-portal-page-head span {
    font-size: 10.5px;
    letter-spacing: 0.12em;
  }

  .quiz-portal-page-head h1 {
    font-size: 23px;
  }

  .quiz-portal-page-head p {
    font-size: 12px;
  }

  body.quiz-overview-mode .quiz-portal-hero {
    border-radius: 14px;
    padding: 20px;
  }

  body.quiz-overview-mode .quiz-portal-hero::after {
    top: -50px;
    right: -50px;
    width: 140px;
    height: 140px;
  }

  body.quiz-overview-mode .quiz-portal-hero h2 {
    font-size: 21px;
    line-height: 1.2;
  }

  body.quiz-overview-mode .quiz-portal-hero h2 span {
    display: inline;
  }

  body.quiz-overview-mode .quiz-portal-copy-desktop {
    display: none;
  }

  body.quiz-overview-mode .quiz-portal-copy-mobile {
    display: inline;
  }

  body.quiz-overview-mode .quiz-portal-hero p {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.6;
  }

  body.quiz-overview-mode .quiz-portal-alert {
    gap: 9px;
    margin-top: 14px;
    border-radius: 9px;
    padding: 11px 13px;
    font-size: 11.5px;
  }

  body.quiz-overview-mode .quiz-portal-alert svg {
    width: 13px;
    height: 13px;
  }

  body.quiz-overview-mode .quiz-portal-modules h2 {
    margin: 0 0 10px;
    font-size: 15px;
  }

  body.quiz-overview-mode .quiz-portal-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.quiz-overview-mode .quiz-portal-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 0;
    gap: 12px;
    border-radius: 12px;
    padding: 14px;
  }

  body.quiz-overview-mode .quiz-portal-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  body.quiz-overview-mode .quiz-portal-card-icon svg {
    width: 18px;
    height: 18px;
  }

  body.quiz-overview-mode .quiz-portal-card-demo {
    position: static;
    align-self: start;
    justify-self: end;
    padding: 2.5px 7px;
    font-size: 8.5px;
  }

  body.quiz-overview-mode .quiz-portal-card strong {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    font-size: 14px;
  }

  body.quiz-overview-mode .quiz-portal-card-copy {
    display: none;
  }

  .quiz-portal-card-foot {
    grid-column: 2 / 4;
    margin-top: -8px;
  }

  .quiz-portal-card-foot small {
    font-size: 11.5px;
  }

  body.quiz-overview-mode .quiz-portal-card-action {
    display: none;
  }

  body.quiz-overview-mode .quiz-portal-engine,
  body.quiz-overview-mode .quiz-portal-flashcards {
    width: 100%;
  }

  .quiz-portal-back {
    font-size: 12px;
  }

  body.quiz-overview-mode .quiz-portal-engine-head {
    margin: 14px 0 10px;
  }

  body.quiz-overview-mode .quiz-portal-engine-head h2 {
    font-size: 19px;
  }

  body.quiz-overview-mode .quiz-portal-engine-head p {
    font-size: 11.5px;
  }

  body.quiz-overview-mode .quiz-portal-progress {
    height: 6px;
    margin-bottom: 14px;
  }

  body.quiz-overview-mode .quiz-portal-question {
    gap: 14px;
    border-radius: 14px;
    padding: 18px;
  }

  body.quiz-overview-mode .quiz-portal-question h3 {
    font-size: 15.5px;
  }

  body.quiz-overview-mode .quiz-portal-options {
    gap: 9px;
  }

  body.quiz-overview-mode .quiz-portal-option {
    grid-template-columns: 24px minmax(0, 1fr) 16px;
    gap: 10px;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 13px;
    line-height: 1.4;
  }

  .quiz-portal-option-letter {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  body.quiz-overview-mode .quiz-portal-explanation {
    border-radius: 10px;
    padding: 12px 14px;
  }

  body.quiz-overview-mode .quiz-portal-explanation strong,
  body.quiz-overview-mode .quiz-portal-explanation p {
    font-size: 12.5px;
  }

  body.quiz-overview-mode .quiz-portal-question-actions,
  body.quiz-overview-mode .quiz-portal-result-actions {
    display: grid;
  }

  body.quiz-overview-mode .quiz-portal-button {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    font-size: 13.5px;
  }

  body.quiz-overview-mode .quiz-portal-result {
    width: 100%;
    gap: 14px;
  }

  .quiz-portal-result-summary {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
  }

  .quiz-portal-result-ring {
    width: 100px;
    height: 100px;
  }

  .quiz-portal-result-ring span {
    width: 74px;
    height: 74px;
    font-size: 20px;
  }

  .quiz-portal-result-kicker {
    display: none;
  }

  body.quiz-overview-mode .quiz-portal-result h2 {
    margin-top: 0;
    font-size: 19px;
  }

  body.quiz-overview-mode .quiz-portal-result p {
    font-size: 12.5px;
  }

  .quiz-portal-review > h3 {
    font-size: 14px;
  }

  .quiz-portal-review > div {
    gap: 9px;
  }

  .quiz-portal-review-item {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    border-radius: 12px;
    padding: 14px;
  }

  .quiz-portal-review-mark {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .quiz-portal-review-item h3 {
    font-size: 12.5px;
  }

  .quiz-portal-review-item p,
  .quiz-portal-review-item small {
    font-size: 11.5px;
  }

  body.quiz-overview-mode .quiz-portal-flashcard {
    min-height: 240px;
    height: 240px;
  }

  body.quiz-overview-mode .quiz-portal-flashcard-face {
    border-radius: 16px;
    padding: 26px 22px;
  }

  body.quiz-overview-mode .quiz-portal-flashcard-front strong {
    font-size: 21px;
  }

  body.quiz-overview-mode .quiz-portal-flashcard-back strong {
    font-size: 13.5px;
    line-height: 1.6;
  }

  body.quiz-overview-mode .quiz-portal-flashcard-face small {
    font-size: 10px;
  }

  body.quiz-overview-mode .quiz-portal-flashcard-face em {
    font-size: 10.5px;
  }

  body.quiz-overview-mode .quiz-portal-flashcard-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  body.quiz-overview-mode .quiz-portal-flashcard-controls button {
    min-height: 44px;
    padding: 12px;
    font-size: 13px;
  }

  body.quiz-overview-mode .quiz-portal-flashcard-controls button.is-primary {
    grid-column: 1 / -1;
    order: -1;
  }

  body.quiz-overview-mode .quiz-portal-mobile-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 8px calc(18px + env(safe-area-inset-bottom));
    backdrop-filter: blur(12px);
  }

  .quiz-portal-mobile-tab {
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 56px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 3px 2px 0;
    font-size: 9.5px;
    font-weight: 700;
  }

  .quiz-portal-mobile-tab svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.1;
  }

  .quiz-portal-mobile-tab.is-active {
    color: #1d4ed8;
    font-weight: 850;
  }
}

/* Slutprov 1a: fokusläge, granska och resultat */
body.final-exam-focus-mode .shell {
  display: block;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #f8fafc;
}

body.final-exam-focus-mode .workspace,
body.final-exam-focus-mode .content-scroll {
  height: 100vh;
}

body.final-exam-focus-mode .content-inner {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body.final-exam-focus-mode .final-exam-panel {
  display: flex;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  flex-direction: column;
  border: 0;
  background: #f8fafc;
  padding: 0;
  box-shadow: none;
}

body.final-exam-focus-mode .final-exam-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  flex: 0 0 auto;
  gap: 20px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  background: #ffffff;
  padding: 0 32px;
}

.final-exam-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.final-exam-brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

body.final-exam-focus-mode .final-exam-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 14.5px;
  font-weight: 750;
  line-height: 1.15;
}

body.final-exam-focus-mode .final-exam-head p {
  display: block;
  margin: 2px 0 0;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

body.final-exam-focus-mode .final-exam-head-actions {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 16px;
}

body.final-exam-focus-mode .final-exam-head strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

body.final-exam-focus-mode .final-exam-head strong::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.final-exam-focus-mode .final-exam-head strong.is-low {
  background: #fef2f2;
  color: #dc2626;
}

body.final-exam-focus-mode .final-exam-exit {
  min-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #ffffff;
  color: #64748b;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 650;
}

body.final-exam-focus-mode .final-exam-exit:hover {
  border-color: #bfdbfe;
  color: #1d4ed8;
}

body.final-exam-focus-mode .final-exam-track {
  height: 4px;
  flex: 0 0 auto;
  margin: 0;
  border-radius: 0;
  background: #e2e8f0;
}

body.final-exam-focus-mode .final-exam-track span {
  display: block;
  height: 100%;
  border-radius: 0;
  background: #2563eb;
  transition: width 180ms ease;
}

body.final-exam-focus-mode .final-exam-steps {
  display: none !important;
}

body.final-exam-focus-mode .final-exam-question {
  flex: 0 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 40px 32px 0;
  box-shadow: none;
}

.final-exam-question-shell,
.final-exam-review-screen {
  display: flex;
  width: min(100%, 760px);
  margin: 0 auto;
  flex-direction: column;
  gap: 22px;
}

.final-exam-question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.final-exam-question-meta span,
.final-review-source {
  display: inline-flex;
  align-self: flex-start;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.final-exam-question-meta strong {
  color: #64748b;
  font-size: 13.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

body.final-exam-focus-mode .final-exam-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 32px 36px;
}

body.final-exam-focus-mode .final-exam-card h4 {
  margin: 0 0 22px;
  color: #020617;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.45;
}

body.final-exam-focus-mode .answer-list {
  display: grid;
  gap: 12px;
}

body.final-exam-focus-mode .final-exam-question .answer-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 15px 18px;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease;
}

body.final-exam-focus-mode .final-exam-question .answer-option:not(:disabled):hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

body.final-exam-focus-mode .final-exam-question .answer-option.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

body.final-exam-focus-mode .answer-letter {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1.5px solid #e2e8f0;
  border-radius: 50%;
  background: #f8fafc;
  color: #475569;
  font-size: 12.5px;
  font-weight: 750;
}

body.final-exam-focus-mode .answer-option.is-selected .answer-letter {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

body.final-exam-focus-mode .answer-copy {
  min-width: 0;
  flex: 1;
  color: #0f172a;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.45;
}

body.final-exam-focus-mode .answer-option.is-selected .answer-copy {
  font-weight: 750;
}

body.final-exam-focus-mode .answer-check {
  display: none;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
}

body.final-exam-focus-mode .answer-option.is-selected .answer-check {
  display: grid;
}

body.final-exam-focus-mode .answer-check svg {
  width: 12px;
  height: 12px;
}

body.final-exam-focus-mode .final-exam-footer {
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 22px 32px 48px;
}

body.final-exam-focus-mode .final-exam-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 760px);
  margin: 0 auto;
  gap: 18px;
}

.final-exam-nav-count {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}

body.final-exam-focus-mode .final-exam-nav .ghost-action,
body.final-exam-focus-mode .final-exam-nav .dark-action,
.final-exam-review-actions .ghost-action,
.final-exam-review-actions .dark-action {
  min-height: 44px;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 800;
}

body.final-exam-focus-mode .final-exam-nav .ghost-action,
.final-exam-review-actions .ghost-action {
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
}

body.final-exam-focus-mode .final-exam-nav .ghost-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

body.final-exam-focus-mode .final-exam-nav .dark-action,
.final-exam-review-actions .dark-action {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.final-exam-review-head h4 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
}

.final-exam-review-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}

.final-exam-review-card,
.final-exam-review-submit {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 28px 30px;
}

.final-exam-review-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.final-exam-review-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
}

.final-exam-review-legend i,
.final-exam-review-grid button {
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
}

.final-exam-review-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.final-exam-review-legend i.is-answered,
.final-exam-review-grid button.is-answered {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.final-exam-review-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
}

.final-exam-review-grid button {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 9px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 800;
}

.final-exam-review-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.final-exam-review-submit strong,
.final-exam-review-submit span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.final-exam-review-submit strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
}

.final-exam-review-submit span {
  margin-top: 4px;
  color: #b45309;
  font-size: 12.5px;
  font-weight: 650;
}

.final-exam-review-submit svg {
  width: 14px;
  height: 14px;
}

.final-exam-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.final-exam-review-actions .dark-action {
  border-color: #16a34a;
  background: #16a34a;
}

body.final-exam-result-mode .shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px minmax(0, 1fr);
  background: #f1f5f9;
}

body.final-exam-result-mode .topbar,
body.final-exam-result-mode .context-sidebar {
  display: none !important;
}

body.final-exam-result-mode .content-inner {
  width: 100%;
  max-width: none;
  padding: 40px 56px 56px;
}

body.final-exam-result-mode .primary-sidebar {
  background: #ffffff;
  border-right-color: #e2e8f0;
}

body.final-exam-result-mode .brand-block {
  gap: 10px;
  padding: 20px 20px 18px;
  border-bottom: 0;
}

body.final-exam-result-mode .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 13px;
  box-shadow: none;
}

body.final-exam-result-mode .brand-block h1 {
  font-size: 14px;
  font-weight: 750;
}

body.final-exam-result-mode .brand-block p {
  margin-top: 1px;
  color: #94a3b8;
  font-size: 9.5px;
  letter-spacing: 0.12em;
}

body.final-exam-result-mode .main-nav {
  gap: 4px;
  padding: 0 14px 14px;
}

body.final-exam-result-mode .nav-item {
  min-height: 37px;
  gap: 10px;
  border-radius: 10px;
  color: #475569;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 550;
}

body.final-exam-result-mode .nav-item.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

body.final-exam-result-mode .module-list-wrap {
  padding: 8px 14px 20px;
}

body.final-exam-result-mode .profile-block {
  margin: 16px 14px;
  border-top: 1px solid #eef2f7;
  padding: 14px 6px 2px;
}

body.final-exam-result-mode .final-exam-panel {
  width: min(100%, 1020px);
  max-width: none;
  margin: 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

body.final-exam-result-mode .final-exam-head,
body.final-exam-result-mode .final-exam-track,
body.final-exam-result-mode .final-exam-steps,
body.final-exam-result-mode .final-exam-footer {
  display: none !important;
}

body.final-exam-result-mode .final-exam-question {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.final-result-summary {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

.final-result-overview {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 34px 38px;
}

.final-result-ring {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: conic-gradient(var(--result-color, #2563eb) var(--result-deg, 0deg), #e2e8f0 0deg);
}

.final-result-ring span {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--result-color, #2563eb);
}

.final-result-ring strong {
  font-size: 27px;
  font-weight: 850;
  line-height: 1;
}

.final-result-ring small {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 650;
}

.final-result-copy {
  min-width: 0;
}

.final-result-kicker {
  display: inline-flex;
  align-self: flex-start;
  border-radius: 999px;
  background: #fef2f2;
  color: #dc2626;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.final-result-summary.is-passed .final-result-kicker {
  background: #f0fdf4;
  color: #16a34a;
}

.final-result-copy h4 {
  margin: 8px 0 0;
  color: #0f172a;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
}

.final-result-copy p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14.5px;
  line-height: 1.6;
}

.final-result-actions {
  display: flex;
  margin-top: 16px;
}

.final-result-portal-button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 800;
}

.final-result-lock {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  background: #fffbeb;
  padding: 18px 22px;
}

.final-result-lock > svg {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #fef3c7;
  color: #b45309;
  padding: 11px;
}

.final-result-lock div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.final-result-lock strong {
  color: #92400e;
  font-size: 14.5px;
  font-weight: 800;
}

.final-result-lock span {
  color: #b45309;
  font-size: 13px;
}

.final-result-lock time {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  color: #92400e;
  font-size: 22px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.final-result-lock time small {
  color: #b45309;
  font-size: 11px;
  font-weight: 650;
}

.final-result-breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 24px 28px;
}

.final-result-breakdown h5,
.final-result-review h5 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 850;
}

.breakdown-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.breakdown-row + .breakdown-row {
  margin-top: 14px;
}

.breakdown-row div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.breakdown-row span {
  color: #334155;
  font-size: 13.5px;
  font-weight: 700;
}

.breakdown-row strong {
  font-size: 12.5px;
  font-weight: 800;
}

.breakdown-row i {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #eef2f6;
}

.breakdown-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.final-result-review {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.final-result-review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.final-review-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 18px 22px;
}

.final-review-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 50%;
  background: #dc2626;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

.final-review-row.is-correct .final-review-mark {
  background: #16a34a;
}

.final-review-row > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.final-review-source {
  padding: 3px 8px;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.final-review-row strong {
  color: #0f172a;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.45;
}

.final-review-row p,
.final-review-row small {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.final-review-row p {
  font-weight: 700;
}

.final-review-row p.is-wrong {
  color: #b91c1c;
}

.final-review-row p.is-correct {
  color: #15803d;
}

.final-review-row small {
  color: #64748b;
}

@media (max-width: 940px) {
  body.final-portal-mode .final-portal {
    animation: none;
    transform: none;
  }

  body.final-portal-mode .final-portal-mobile-tabbar {
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
  }

  body.final-exam-focus-mode .shell,
  body.final-exam-result-mode .shell {
    display: block;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }

  body.final-exam-result-mode .primary-sidebar,
  body.final-exam-result-mode .context-sidebar,
  body.final-exam-result-mode .topbar {
    display: none !important;
  }

  body.final-exam-result-mode .workspace,
  body.final-exam-result-mode .content-scroll {
    height: 100vh;
  }

  body.final-exam-focus-mode .final-exam-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: auto;
    min-height: 58px;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 12px;
  }

  body.final-exam-focus-mode .final-exam-head-actions {
    display: contents;
  }

  body.final-exam-focus-mode .final-exam-exit {
    order: 1;
    min-height: 30px;
    border: 0;
    padding: 0;
    font-size: 12px;
  }

  body.final-exam-focus-mode .final-exam-brand {
    order: 2;
    justify-content: center;
    flex: 1;
  }

  body.final-exam-focus-mode .final-exam-brand-mark,
  body.final-exam-focus-mode .final-exam-head p {
    display: none;
  }

  body.final-exam-focus-mode .final-exam-head h3 {
    font-size: 13px;
    text-align: center;
  }

  body.final-exam-focus-mode .final-exam-head strong {
    order: 3;
    gap: 5px;
    padding: 5px 10px;
    font-size: 13px;
  }

  body.final-exam-focus-mode .final-exam-head strong::before {
    width: 13px;
    height: 13px;
  }

  body.final-exam-focus-mode .final-exam-question {
    padding: 18px;
  }

  .final-exam-question-shell,
  .final-exam-review-screen {
    width: 100%;
    gap: 14px;
  }

  .final-exam-question-meta span {
    padding: 4px 10px;
    font-size: 10px;
  }

  .final-exam-question-meta strong {
    font-size: 11.5px;
  }

  body.final-exam-focus-mode .final-exam-card {
    border-radius: 14px;
    padding: 18px;
  }

  body.final-exam-focus-mode .final-exam-card h4 {
    margin-bottom: 14px;
    font-size: 16px;
  }

  body.final-exam-focus-mode .answer-list {
    gap: 9px;
  }

  body.final-exam-focus-mode .final-exam-question .answer-option {
    gap: 11px;
    min-height: 54px;
    border-radius: 11px;
    padding: 13px;
  }

  body.final-exam-focus-mode .answer-letter {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  body.final-exam-focus-mode .answer-copy {
    font-size: 13.5px;
  }

  body.final-exam-focus-mode .answer-check {
    width: 18px;
    height: 18px;
  }

  body.final-exam-focus-mode .final-exam-footer {
    padding: 0 18px 18px;
  }

  body.final-exam-focus-mode .final-exam-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }

  body.final-exam-focus-mode .final-exam-nav-count {
    display: none;
  }

  body.final-exam-focus-mode .final-exam-nav .ghost-action {
    width: 48px;
    padding: 13px 0;
  }

  body.final-exam-focus-mode .final-exam-nav .ghost-action span {
    display: none;
  }

  body.final-exam-focus-mode .final-exam-nav .dark-action {
    width: 100%;
    justify-content: center;
  }

  .final-exam-review-head h4 {
    font-size: 19px;
  }

  .final-exam-review-head p {
    font-size: 12px;
  }

  .final-exam-review-card {
    border-radius: 14px;
    padding: 16px;
  }

  .final-exam-review-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .final-exam-review-submit {
    border-radius: 14px;
    padding: 14px 16px;
  }

  .final-exam-review-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .final-exam-review-actions .ghost-action,
  .final-exam-review-actions .dark-action {
    width: 100%;
    justify-content: center;
  }

  body.final-exam-result-mode .content-inner {
    width: 100%;
    padding: var(--mobile-app-top-padding) 18px 112px;
  }

  body.final-exam-result-mode .final-exam-panel {
    width: 100%;
  }

  body.final-exam-result-mode .final-portal-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
  }

  body.final-exam-result-mode .final-portal-mobile-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 8px calc(18px + env(safe-area-inset-bottom));
    backdrop-filter: blur(12px);
  }

  .final-result-summary {
    gap: 14px;
  }

  .final-result-overview {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
  }

  .final-result-ring {
    width: 104px;
    height: 104px;
  }

  .final-result-ring span {
    width: 78px;
    height: 78px;
  }

  .final-result-ring strong {
    font-size: 22px;
  }

  .final-result-kicker {
    align-self: center;
    font-size: 11px;
  }

  .final-result-copy h4 {
    font-size: 19px;
  }

  .final-result-copy p {
    font-size: 12.5px;
  }

  .final-result-actions,
  .final-result-portal-button {
    width: 100%;
  }

  .final-result-portal-button {
    justify-content: center;
  }

  .final-result-lock {
    gap: 12px;
    border-radius: 12px;
    padding: 14px 16px;
  }

  .final-result-lock > svg {
    width: 20px;
    height: 20px;
    border-radius: 0;
    background: transparent;
    padding: 0;
  }

  .final-result-lock strong {
    font-size: 12.5px;
  }

  .final-result-lock span {
    font-size: 11px;
  }

  .final-result-lock time {
    font-size: 16px;
  }

  .final-result-lock time small {
    display: none;
  }

  .final-result-breakdown {
    gap: 12px;
    border-radius: 12px;
    padding: 16px 18px;
  }

  .final-result-breakdown h5,
  .final-result-review h5 {
    font-size: 14px;
  }

  .breakdown-row span {
    font-size: 12px;
  }

  .breakdown-row strong {
    font-size: 11.5px;
  }

  .breakdown-row i {
    height: 7px;
  }

  .final-result-review-list {
    gap: 9px;
  }

  .final-review-row {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    border-radius: 12px;
    padding: 14px;
  }

  .final-review-mark {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .final-review-source {
    font-size: 9px;
  }

  .final-review-row strong,
  .final-review-row p,
  .final-review-row small {
    font-size: 11.5px;
  }
}
