/* ================================================================
   Advanced Computer Vision — Interactive Video Lectures
   Shared stylesheet
   ================================================================ */

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

:root {
  /* Light theme (Spaces) */
  --bg: #f8fafc;
  /* Spaces: rgb(248 250 252) */
  --surface: #ffffff;
  /* Spaces: rgb(255 255 255) */
  --surface2: #f3f4f6;
  /* Spaces: rgb(243 244 246) */
  --border: #d1d5db;
  /* Spaces: rgb(209 213 219) */
  --accent: #6366f1;
  /* Spaces indigo: rgb(99 102 241) - overridden per track via JS */
  --accent2: #8b5cf6;
  /* Violet for secondary accent */
  --correct: #10b981;
  /* Keep green for correct */
  --wrong: #ef4444;
  /* Keep red for wrong */
  --text: #0f172a;
  /* Spaces: rgb(15 23 42) */
  --muted: #6b7280;
  /* Spaces: rgb(107 114 128) */
  --gold: #d97706;
  /* Darker gold for light bg contrast */
}

/* Dark theme */
[data-theme="dark"] {
  --bg: #0a0d14;
  --surface: #111520;
  --surface2: #181d2e;
  --border: #1e2640;
  --accent: #4f8ef7;
  /* Light blue */
  --accent2: #7c3aed;
  /* Purple */
  --correct: #10b981;
  --wrong: #ef4444;
  --text: #e8eaf2;
  --muted: #6b7280;
  --gold: #f59e0b;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] body::before {
  background-image:
    linear-gradient(rgba(79, 142, 247, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 142, 247, 0.03) 1px, transparent 1px);
}

h1,
h2 {
  font-family: 'DM Serif Display', serif;
}

/* ── Header ── */
header {
  position: relative;
  z-index: 10;
  padding: 2.5rem 2rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.header-left {
  flex: 1;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  transition: background 0.2s, border-color 0.2s;
  margin-top: -0.5rem;
}

.theme-toggle:hover {
  background: var(--surface2);
  border-color: var(--accent);
}

.breadcrumb {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.breadcrumb span {
  color: var(--accent);
}

header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  background: linear-gradient(135deg, #0f172a 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] header h1 {
  background: linear-gradient(135deg, #e8eaf2 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header p {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 300;
}

/* ── Back link ── */
.back-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--accent);
}

/* ── Progress bar ── */
.progress-bar-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  position: relative;
  z-index: 10;
}

.progress-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

#quiz-stats {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
  display: none;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 0.6s ease;
  width: 0%;
}

/* ── Main ── */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
  position: relative;
  z-index: 10;
}

/* ── Landing page cards ── */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.track-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: block;
}

.track-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.track-card.ss:hover {
  border-color: var(--accent2);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
}

.track-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.track-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.track-card p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.track-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  gap: 0.8rem;
}

.track-meta span {
  color: var(--accent);
}

.track-card.ss .track-meta span {
  color: var(--accent2);
}

/* ── Table of contents ── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.toc-header--clickable {
  cursor: pointer;
  border-radius: 6px;
  margin: -0.25rem -0.5rem;
  padding: 0.25rem 0.5rem;
  transition: background 0.12s;
}

.toc-header--clickable:hover {
  background: var(--surface2);
}

.toc-toggle-btn {
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  display: inline-block;
  transition: color 0.15s, transform 0.2s ease;
}

.toc-header--clickable:hover .toc-toggle-btn {
  color: var(--accent);
}

.toc.collapsed .toc-toggle-btn {
  transform: rotate(90deg);
}

.toc.collapsed .toc-list {
  display: none;
}

.toc.collapsed .toc-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s;
}

.toc-item:hover {
  background: var(--surface2);
}

.toc-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  min-width: 1.6rem;
  flex-shrink: 0;
}

.toc-title {
  flex: 1;
  font-size: 0.86rem;
}

.toc-quiz {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.toc-quiz--pending {
  color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.15);
}

/* TOC status dot */
.toc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.3s;
}

.toc-dot--loading {
  background: var(--muted);
}

.toc-dot--watching {
  background: var(--accent);
  animation: toc-pulse 1.4s infinite;
}

.toc-dot--passed {
  background: var(--correct);
}

.toc-dot--watched {
  background: var(--correct);
  opacity: 0.7;
}

.toc-dot--attempted {
  background: var(--gold);
}

@keyframes toc-pulse {

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

  50% {
    opacity: 0.4;
    transform: scale(0.6);
  }
}

/* ── Video section ── */
.video-section {
  margin-bottom: 3rem;
  scroll-margin-top: 1.5rem;
  /* offset for anchor jump */
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
}

.section-num.done {
  color: var(--correct);
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}

.section-title {
  font-size: 1.2rem;
  flex: 1;
}

/* Clickable section header — the whole row opens the video */
.section-header--clickable {
  cursor: pointer;
  border-radius: 8px;
  padding: 0.5rem;
  margin: -0.5rem -0.5rem 0.5rem;
  transition: background 0.15s;
}

.section-header--clickable:hover {
  background: var(--surface2);
}

.section-header--clickable:hover .section-num {
  border-color: var(--accent);
}

.section-cta {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.2rem 0.75rem;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}

.section-header--clickable:hover .section-cta {
  background: rgba(99, 102, 241, 0.1);
}

.section-chevron {
  font-size: 1.2rem;
  color: var(--muted);
  flex-shrink: 0;
  display: inline-block;
  transition: transform 0.2s ease, color 0.15s;
  line-height: 1;
}

.section-chevron.open {
  transform: rotate(90deg);
}

.section-header--clickable:hover .section-chevron {
  color: var(--accent);
}

/* ── Video wrapper ── */
.video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  /* keeps wrapper sized even before player loads */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Container where SwitchTubeEmbed injects the iframe */
.video-inner {
  width: 100%;
  height: 100%;
  display: block;
}

/* Style the iframe injected by the SwitchTube embed library */
.video-inner iframe {
  width: 100% !important;
  height: 100% !important;
  display: block;
  border: none;
}

/* ── Timer bar ── */
.timer-bar {
  display: none;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
}

.timer-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.timer-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.timer-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 0.9s linear;
}

.timer-count {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  /* quiet — no colour change, no blink */
  white-space: nowrap;
  min-width: 3.5rem;
  text-align: right;
}

/* ── Start overlay ── */
.start-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: opacity 0.3s;
}

[data-theme="dark"] .start-overlay {
  background: rgba(10, 13, 20, 0.82);
}

.start-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.start-overlay p {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
  max-width: 320px;
}

.start-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: 99px;
  padding: 0.9rem 2rem;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.start-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

/* ── Quiz overlay ── */
.quiz-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.97);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

[data-theme="dark"] .quiz-overlay {
  background: rgba(10, 13, 20, 0.97);
}

.quiz-overlay.active {
  display: flex;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.quiz-card {
  width: 100%;
  max-width: 560px;
}

.quiz-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quiz-badge::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: badge-pulse 1.4s infinite;
}

@keyframes badge-pulse {

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

  50% {
    transform: scale(0.6);
    opacity: 0.3;
  }
}

.quiz-question {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 1.3rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.09);
  transform: translateX(4px);
}

.option-key {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.15s;
}

.option-btn:hover:not(:disabled) .option-key {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.option-btn.correct {
  border-color: var(--correct) !important;
  background: rgba(16, 185, 129, 0.12) !important;
  transform: none !important;
}

.option-btn.correct .option-key {
  background: var(--correct);
  border-color: var(--correct);
  color: #fff;
}

.option-btn.wrong {
  border-color: var(--wrong) !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

.option-btn.wrong .option-key {
  background: var(--wrong);
  border-color: var(--wrong);
  color: #fff;
}

.option-btn:disabled {
  cursor: default;
}

/* ── Multi-select: toggle states ── */
.option-btn.selected {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
}

.option-btn.selected .option-key {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Correct but not selected — student missed it */
.option-btn.missed {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.08) !important;
}

.option-btn.missed .option-key {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

/* Submit button (multi-select) */
.submit-btn {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.7rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.submit-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.09);
}

.submit-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Quiz hint (select all that apply) */
.quiz-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-style: italic;
}

/* ── Feedback ── */
.feedback {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  font-size: 0.87rem;
  display: none;
  align-items: flex-start;
  gap: 0.7rem;
  line-height: 1.55;
}

.feedback.show {
  display: flex;
  animation: slideUp 0.22s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.feedback.correct-fb {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

.feedback.wrong-fb {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.feedback-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.feedback-text strong {
  display: block;
  margin-bottom: 0.3rem;
}

.feedback-text em {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 500;
  opacity: 0.85;
}

/* ── Per-option feedback rows (multi-select) ── */
.fb-options {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.fb-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0.9;
}

.fb-row-key {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 1.1rem;
}

.fb-row--correct .fb-row-key { color: var(--correct); }
.fb-row--wrong   .fb-row-key { color: var(--wrong); }
.fb-row--missed  .fb-row-key { color: #f59e0b; }
.fb-row--neutral .fb-row-key { color: var(--muted); }

/* ── Continue button ── */
.continue-btn {
  margin-top: 1rem;
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.2s, transform 0.2s;
}

.continue-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.continue-btn.show {
  display: flex;
}

/* ── Score strip ── */
.score-strip {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.score-item {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.score-item.passed {
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--correct);
  background: rgba(16, 185, 129, 0.07);
}

.score-item.attempted {
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--gold);
}

.score-item.todo {
  border-color: rgba(245, 158, 11, 0.2);
  color: rgba(245, 158, 11, 0.55);
  font-style: italic;
}

/* ── Completion banner ── */
.completion {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  margin-top: 2rem;
}

.completion.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.completion-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.completion h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--gold), #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.completion p {
  color: var(--muted);
  font-size: 0.9rem;
}

.final-score {
  margin: 1.5rem auto;
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 2.5rem;
  color: var(--text);
}

/* ── Responsive ── */
@media (max-width: 600px) {

  header,
  main,
  .progress-bar-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  header {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 1rem;
  }

  .header-left {
    flex: 1;
  }

  .theme-toggle {
    align-self: flex-start;
    margin-top: 0;
  }

  .quiz-question {
    font-size: 1.05rem;
  }

  .toc {
    padding: 1rem;
  }
}