:root {
  color-scheme: light;
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --available-border: rgba(22, 163, 74, 0.28);
  --available-background: rgba(22, 163, 74, 0.1);
  --available-hover-border: rgba(22, 163, 74, 0.5);
  --available-hover-background: rgba(22, 163, 74, 0.16);
  --available-text: var(--success);
  --available-focus-ring: rgba(22, 163, 74, 0.22);
  --danger: #dc2626;
  --warning: #f59e0b;
  --focus: #0ea5e9;
  --result-consult: #2563eb;
  --result-consult-hover: #1d4ed8;
  --result-consult-active: #1e40af;
  --result-module: #0369a1;
  --result-module-hover: #075985;
  --result-module-active: #0c4a6e;
  --result-positive: #15803d;
  --result-positive-hover: #166534;
  --result-positive-active: #14532d;
  --result-change: #b45309;
  --result-change-hover: #92400e;
  --result-change-active: #78350f;
  --result-exit: #dc2626;
  --result-exit-hover: #b91c1c;
  --result-exit-active: #991b1b;
  --result-action-text: #ffffff;
  --info-soft: #e0f2fe;
  --success-soft: #dcfce7;
  --warning-soft: #fef3c7;
  --indigo-soft: #e0e7ff;
  --practice-chip-border: rgba(79, 70, 229, 0.2);
  --practice-chip-background: var(--indigo-soft);
  --practice-chip-text: #3730a3;
  --slate-soft: #e2e8f0;
  --topic-card-bg-1: #526d8a;
  --topic-card-bg-2: #5f7137;
  --topic-card-bg-3: #95523f;
  --topic-card-bg-4: #8a6224;
  --topic-card-bg-5: #496a83;
  --topic-card-bg-6: #356a65;
  --topic-card-bg-7: #6b4964;
  --topic-card-bg-8: #8c4741;
  --topic-card-bg-9: #2f6470;
  --topic-card-bg-10: #7f6422;
  --topic-card-bg-11: #2b6e6d;
  --topic-card-text: #f8fafc;
  --topic-card-muted: rgba(248, 250, 252, 0.82);
  --topic-card-separator: rgba(248, 250, 252, 0.28);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0f172a;
  --surface: #172033;
  --surface-muted: #223049;
  --text: #e5edf7;
  --muted: #aab7c8;
  --border: rgba(148, 163, 184, 0.28);
  --primary: #60a5fa;
  --primary-hover: #3b82f6;
  --success: #4ade80;
  --available-border: rgba(74, 222, 128, 0.32);
  --available-background: rgba(74, 222, 128, 0.12);
  --available-hover-border: rgba(74, 222, 128, 0.52);
  --available-hover-background: rgba(74, 222, 128, 0.18);
  --available-text: var(--success);
  --available-focus-ring: rgba(74, 222, 128, 0.24);
  --danger: #f87171;
  --warning: #fbbf24;
  --focus: #38bdf8;
  --result-consult: #1d4ed8;
  --result-consult-hover: #1e40af;
  --result-consult-active: #1e3a8a;
  --result-module: #0369a1;
  --result-module-hover: #075985;
  --result-module-active: #0c4a6e;
  --result-positive: #15803d;
  --result-positive-hover: #166534;
  --result-positive-active: #14532d;
  --result-change: #b45309;
  --result-change-hover: #92400e;
  --result-change-active: #78350f;
  --result-exit: #dc2626;
  --result-exit-hover: #b91c1c;
  --result-exit-active: #991b1b;
  --result-action-text: #ffffff;
  --info-soft: rgba(56, 189, 248, 0.14);
  --success-soft: rgba(74, 222, 128, 0.14);
  --warning-soft: rgba(251, 191, 36, 0.16);
  --indigo-soft: rgba(129, 140, 248, 0.16);
  --practice-chip-border: rgba(129, 140, 248, 0.28);
  --practice-chip-background: var(--indigo-soft);
  --practice-chip-text: #c7d2fe;
  --slate-soft: rgba(148, 163, 184, 0.14);
  --topic-card-bg-1: #2e4157;
  --topic-card-bg-2: #374525;
  --topic-card-bg-3: #5c332a;
  --topic-card-bg-4: #523b1d;
  --topic-card-bg-5: #2b4254;
  --topic-card-bg-6: #234743;
  --topic-card-bg-7: #472f43;
  --topic-card-bg-8: #572e2b;
  --topic-card-bg-9: #20454d;
  --topic-card-bg-10: #4c3d1b;
  --topic-card-bg-11: #1f4b4a;
  --topic-card-text: #f8fafc;
  --topic-card-muted: rgba(226, 232, 240, 0.84);
  --topic-card-separator: rgba(226, 232, 240, 0.24);
  --shadow: 0 18px 45px rgba(2, 6, 23, 0.38);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.42);
  outline-offset: 3px;
}

.app-root {
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  min-height: 88px;
  margin: 0 auto;
  padding: 1rem 0;
}

.app-header.is-compact {
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.hero-text,
.module-card p,
.app-footer,
.question-meta,
.metric span,
.stat-tile span,
.timer-card span,
.rules-note,
.error-detail {
  color: var(--muted);
}

.header-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-left: auto;
}

.header-utilities {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.25rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.language-option {
  min-width: 40px;
  min-height: 30px;
  padding: 0.25rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.language-option.is-active {
  background: var(--primary);
  color: #ffffff;
}

.scope-pill,
.badge,
.section-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.eyebrow {
  border-color: rgba(37, 99, 235, 0.2);
  background: var(--info-soft);
  color: #1e3a8a;
}

.section-kicker {
  border-color: var(--practice-chip-border);
  background: var(--practice-chip-background);
  color: var(--practice-chip-text);
}

.scope-switch {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.scope-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0.45rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.scope-option.is-active {
  background: var(--primary);
  color: #ffffff;
}

.scope-option.is-disabled {
  background: #f8fafc;
  color: #64748b;
}

.soon-label {
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  background: var(--warning-soft);
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 900;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 74px;
  min-width: 74px;
  height: 38px;
  padding: 0 0.55rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.theme-toggle-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 0.9rem;
  line-height: 1;
}

.theme-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.22);
  transition: transform 180ms ease;
}

.theme-toggle.is-dark .theme-toggle-knob {
  transform: translateX(36px);
}

:root[data-theme="dark"] .brand-mark {
  color: #0f172a;
}

:root[data-theme="dark"] .eyebrow {
  border-color: rgba(56, 189, 248, 0.28);
  color: #bae6fd;
}

:root[data-theme="dark"] .section-kicker {
  border-color: var(--practice-chip-border);
  background: var(--practice-chip-background);
  color: var(--practice-chip-text);
}

:root[data-theme="dark"] .scope-switch,
:root[data-theme="dark"] .segmented-control,
:root[data-theme="dark"] .language-switch {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
}

:root[data-theme="dark"] .scope-option.is-active,
:root[data-theme="dark"] .segment-button.is-active,
:root[data-theme="dark"] .language-option.is-active,
:root[data-theme="dark"] .button-primary,
:root[data-theme="dark"] .question-dot.is-current,
:root[data-theme="dark"] .answer-option.is-selected .answer-key {
  color: #0f172a;
}

:root[data-theme="dark"] .scope-option.is-disabled {
  background: rgba(34, 48, 73, 0.74);
  color: var(--muted);
}

:root[data-theme="dark"] .soon-label {
  color: #fde68a;
}

:root[data-theme="dark"] .theme-toggle {
  border-color: rgba(96, 165, 250, 0.34);
  background: #1e3a8a;
  color: #dbeafe;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
}

:root[data-theme="dark"] .theme-toggle-knob {
  background: #dbeafe;
}

:root[data-theme="dark"] .metric-questions {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(37, 99, 235, 0.12);
}

:root[data-theme="dark"] .metric-time {
  border-color: rgba(129, 140, 248, 0.24);
  background: rgba(99, 102, 241, 0.12);
}

:root[data-theme="dark"] .metric-mode {
  border-color: rgba(45, 212, 191, 0.24);
  background: rgba(20, 184, 166, 0.12);
}

:root[data-theme="dark"] .metric-result {
  border-color: rgba(251, 191, 36, 0.26);
  background: rgba(245, 158, 11, 0.12);
}

:root[data-theme="dark"] .mode-card,
:root[data-theme="dark"] .theme-summary-card {
  border-color: rgba(96, 165, 250, 0.2);
  background:
    linear-gradient(135deg, rgba(23, 32, 51, 0.98), rgba(30, 41, 59, 0.92));
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .module-card.is-muted {
  background: rgba(23, 32, 51, 0.74);
}

:root[data-theme="dark"] .badge-success,
:root[data-theme="dark"] .question-dot.is-answered,
:root[data-theme="dark"] .question-dot.is-correct,
:root[data-theme="dark"] .answer-option.is-correct,
:root[data-theme="dark"] .theme-summary-pill.tone-success {
  border-color: rgba(74, 222, 128, 0.32);
  background: rgba(74, 222, 128, 0.12);
}

:root[data-theme="dark"] .badge-danger,
:root[data-theme="dark"] .question-dot.is-incorrect,
:root[data-theme="dark"] .answer-option.is-wrong,
:root[data-theme="dark"] .theme-summary-pill.tone-danger {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.12);
}

:root[data-theme="dark"] .badge-warning,
:root[data-theme="dark"] .question-dot.is-unanswered,
:root[data-theme="dark"] .question-dot.is-blank,
:root[data-theme="dark"] .theme-summary-pill.tone-warning {
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.13);
  color: #fde68a;
}

:root[data-theme="dark"] .badge-soft {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(37, 99, 235, 0.14);
  color: #bfdbfe;
}

:root[data-theme="dark"] .timer-track,
:root[data-theme="dark"] .progress-track,
:root[data-theme="dark"] .answer-label {
  background: rgba(96, 165, 250, 0.16);
}

:root[data-theme="dark"] .answer-option.is-selected {
  background: rgba(96, 165, 250, 0.12);
}

:root[data-theme="dark"] .answer-key {
  background: rgba(148, 163, 184, 0.16);
}

:root[data-theme="dark"] .modal-backdrop {
  background: rgba(2, 6, 23, 0.68);
}

:root[data-theme="dark"] .tone-warning strong,
:root[data-theme="dark"] .question-dot.is-unanswered,
:root[data-theme="dark"] .question-dot.is-blank {
  color: #fde68a;
}

.page-main,
.exam-main,
.result-main,
.review-main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 2rem;
  align-items: center;
  padding: 4rem 0 3rem;
}

.hero-copy h1,
.exam-toolbar h1,
.result-hero h1,
.review-toolbar h1,
.error-screen h1 {
  max-width: 820px;
  margin: 0.85rem 0 1rem;
  font-size: 3rem;
  line-height: 1.08;
}

.hero-text {
  max-width: 680px;
  margin: 0;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (min-width: 641px) {
  .hero-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .hero-actions .button {
    width: 100%;
    min-width: 0;
    text-align: center;
  }
}

.hero-panel {
  display: grid;
  gap: 0.75rem;
}

.metric,
.stat-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.metric {
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 4px solid transparent;
  pointer-events: none;
}

.metric-questions {
  border-color: rgba(37, 99, 235, 0.18);
  background: #eff6ff;
}

.metric-questions::before {
  border-left-color: #3b82f6;
}

.metric-time {
  border-color: rgba(99, 102, 241, 0.18);
  background: #eef2ff;
}

.metric-time::before {
  border-left-color: #6366f1;
}

.metric-mode {
  border-color: rgba(20, 184, 166, 0.2);
  background: #ecfdf5;
}

.metric-mode::before {
  border-left-color: #14b8a6;
}

.metric-result {
  border-color: rgba(245, 158, 11, 0.24);
  background: #fffbeb;
}

.metric-result::before {
  border-left-color: #f59e0b;
}

.metric strong,
.stat-tile strong {
  font-size: 1.2rem;
}

.mode-section,
.modules-section,
.theme-results {
  padding: 1.5rem 0;
}

.mode-card {
  margin: 0.5rem 0 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.mode-copy {
  max-width: 680px;
}

.mode-copy p:not(.section-kicker) {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.mode-section,
.section-heading,
.exam-toolbar,
.review-toolbar,
.progress-label,
.module-card-top,
.result-actions,
.exam-actions,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mode-section h2,
.section-heading h2,
.question-map-panel h2,
.theme-results h2 {
  margin: 0.35rem 0 0;
  font-size: 1.4rem;
}

.segmented-control {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.segment-button {
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.segment-button.is-active {
  background: var(--primary);
  color: #ffffff;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.module-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition:
    transform 170ms ease,
    box-shadow 170ms ease,
    border-color 170ms ease;
}

.module-card:hover,
.module-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.11);
}

:root[data-theme="dark"] .module-card:hover,
:root[data-theme="dark"] .module-card:focus-within {
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 20px 42px rgba(2, 6, 23, 0.48);
}

.module-card.is-featured {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: var(--shadow);
}

.module-card.is-muted {
  background: rgba(255, 255, 255, 0.72);
}

.module-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.thematic-selection-main {
  padding-top: 2.25rem;
}

.thematic-selection-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.thematic-selection-header h1 {
  margin: 0.45rem 0 0.65rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.thematic-selection-description {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.thematic-back-action {
  flex: 0 0 auto;
}

.thematic-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.thematic-topic-card {
  display: flex;
  min-width: 0;
  min-height: 218px;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--topic-card-bg-1);
  color: var(--topic-card-text);
  text-align: left;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.thematic-topic-card:nth-child(11n + 1) {
  background: var(--topic-card-bg-1);
}

.thematic-topic-card:nth-child(11n + 2) {
  background: var(--topic-card-bg-2);
}

.thematic-topic-card:nth-child(11n + 3) {
  background: var(--topic-card-bg-3);
}

.thematic-topic-card:nth-child(11n + 4) {
  background: var(--topic-card-bg-4);
}

.thematic-topic-card:nth-child(11n + 5) {
  background: var(--topic-card-bg-5);
}

.thematic-topic-card:nth-child(11n + 6) {
  background: var(--topic-card-bg-6);
}

.thematic-topic-card:nth-child(11n + 7) {
  background: var(--topic-card-bg-7);
}

.thematic-topic-card:nth-child(11n + 8) {
  background: var(--topic-card-bg-8);
}

.thematic-topic-card:nth-child(11n + 9) {
  background: var(--topic-card-bg-9);
}

.thematic-topic-card:nth-child(11n + 10) {
  background: var(--topic-card-bg-10);
}

.thematic-topic-card:nth-child(11n) {
  background: var(--topic-card-bg-11);
}

.thematic-topic-card:hover:not(:disabled) {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

:root[data-theme="dark"] .thematic-topic-card:hover:not(:disabled) {
  border-color: rgba(96, 165, 250, 0.48);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.5);
}

.thematic-topic-card:focus-visible:not(:disabled) {
  transform: translateY(-4px);
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18), var(--shadow);
}

.thematic-topic-card.is-unavailable {
  border-style: dashed;
  background: var(--surface-muted);
  color: var(--text);
}

.thematic-topic-card:disabled {
  opacity: 0.72;
}

.thematic-topic-card-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.thematic-topic-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.35;
}

.thematic-topic-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.thematic-topic-metric {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--topic-card-separator);
}

.thematic-topic-metric strong {
  font-size: 1.1rem;
}

.thematic-topic-metric span {
  overflow-wrap: anywhere;
  color: var(--topic-card-muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.thematic-unavailable-label {
  color: var(--muted);
  font-weight: 700;
}

.thematic-active-theme {
  max-width: 100%;
  padding: 0.4rem 0.7rem;
  border-color: rgba(37, 99, 235, 0.3);
  background: var(--info-soft);
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

:root[data-theme="dark"] .thematic-active-theme {
  border-color: rgba(96, 165, 250, 0.42);
  color: #e0f2fe;
}

.practice-config-main {
  min-width: 0;
  padding-top: 2.25rem;
}

.practice-config-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.practice-config-intro {
  min-width: 0;
}

.practice-config-header h1 {
  margin: 0.45rem 0 0.65rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.practice-config-description {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.practice-back-action {
  flex: 0 0 auto;
}

.practice-config-panel {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.practice-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.practice-field {
  min-width: 0;
}

.practice-field label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-weight: 900;
}

.practice-selector-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-align: left;
}

.practice-selector-trigger:hover:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.42);
  background: var(--surface-muted);
}

.practice-selector-trigger:focus-visible {
  border-color: var(--focus);
  outline: 3px solid rgba(14, 165, 233, 0.24);
  outline-offset: 2px;
}

.practice-selector-trigger:disabled {
  background: var(--surface-muted);
  color: var(--muted);
}

.practice-selector-trigger-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.practice-selector-trigger:not(.has-value) .practice-selector-trigger-value {
  color: var(--muted);
}

.practice-selector-trigger-icon {
  flex: 0 0 auto;
  font-size: 1.2rem;
  line-height: 1;
}

body.practice-selector-scroll-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

.practice-selector-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.practice-selector-backdrop {
  display: none;
}

.practice-selector-panel {
  position: fixed;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.22);
  color: var(--text);
  pointer-events: auto;
}

.practice-selector-panel.is-desktop {
  opacity: 0;
}

.practice-selector-panel.is-desktop.is-positioned {
  opacity: 1;
}

.practice-selector-panel-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.practice-selector-panel-header h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.3;
}

.practice-selector-close {
  display: inline-flex;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.practice-selector-close:hover {
  border-color: rgba(37, 99, 235, 0.42);
  background: var(--info-soft);
}

.practice-selector-listbox {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.4rem;
  scrollbar-color: var(--muted) var(--surface-muted);
  scrollbar-width: thin;
  touch-action: pan-y;
}

.practice-selector-option {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.practice-selector-option:hover,
.practice-selector-option:focus-visible {
  background: var(--surface-muted);
}

.practice-selector-option:focus-visible {
  border-color: var(--focus);
  outline: 2px solid rgba(14, 165, 233, 0.28);
  outline-offset: -2px;
}

.practice-selector-option.is-selected {
  background: var(--info-soft);
  color: var(--primary);
  font-weight: 900;
}

.practice-selector-option-label {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.practice-selector-option-check {
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 900;
}

.practice-field-help {
  min-height: 1.35rem;
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.practice-status-message {
  min-height: 1.5rem;
  margin: 0.9rem 0 0;
  color: var(--primary);
  font-weight: 800;
}

.practice-summary {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  background: var(--info-soft);
}

.practice-summary h2 {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
}

.practice-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.practice-summary-item {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.practice-summary-item dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.practice-summary-item dd {
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 900;
}

.practice-start-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.practice-start-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.practice-start-action {
  flex: 0 0 auto;
}

.practice-test-context {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.practice-active-theme {
  max-width: 100%;
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--primary);
  white-space: normal;
  overflow-wrap: anywhere;
}

:root[data-theme="dark"] .practice-summary {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(37, 99, 235, 0.12);
}

:root[data-theme="dark"] .practice-selector-trigger:focus-visible,
:root[data-theme="dark"] .practice-selector-option:focus-visible {
  outline-color: rgba(56, 189, 248, 0.3);
}

:root[data-theme="dark"] .practice-selector-panel {
  box-shadow: 0 24px 65px rgba(2, 6, 23, 0.62);
}

:root[data-theme="dark"] .practice-active-theme {
  border-color: rgba(96, 165, 250, 0.42);
  color: #dbeafe;
}

.module-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.module-meta span {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
}

.button-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

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

.button-back-home {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

.button-back-home:hover:not(:disabled) {
  border-color: #b91c1c;
  background: #b91c1c;
}

.button-back-home:active:not(:disabled) {
  transform: translateY(0);
  border-color: #991b1b;
  background: #991b1b;
}

:root[data-theme="dark"] .button-back-home {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

.badge-success {
  border-color: var(--available-border);
  background: var(--available-background);
  color: var(--available-text);
}

.badge-danger {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.badge-warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.badge-soft {
  border-color: rgba(37, 99, 235, 0.18);
  background: #eff6ff;
  color: #1d4ed8;
}

.exam-toolbar,
.review-toolbar {
  padding: 1.25rem 0 1rem;
}

.exam-toolbar h1,
.review-toolbar h1 {
  font-size: 2rem;
}

.timer-card {
  width: min(100%, 280px);
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.timer-card strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.35rem;
}

.timer-track,
.progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.timer-track {
  margin-top: 0.75rem;
}

.timer-fill,
.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 180ms ease;
}

.exam-progress {
  margin-bottom: 1rem;
}

.progress-label {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-weight: 700;
}

.exam-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.question-map-panel,
.question-panel,
.result-hero,
.rules-note,
.theme-results,
.modal-card,
.error-screen,
.loading-screen {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.question-map-panel {
  position: sticky;
  top: 1rem;
  padding: 1rem;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
  margin-top: 1rem;
}

.question-dot {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.question-dot.is-answered,
.question-dot.is-correct {
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.question-dot.is-incorrect {
  border-color: rgba(220, 38, 38, 0.32);
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.question-dot.is-unanswered {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.13);
  color: #92400e;
}

.question-panel {
  min-height: 560px;
  padding: 1.5rem;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 700;
}

.question-panel h2 {
  margin: 0 0 1.25rem;
  font-size: 1.55rem;
  line-height: 1.32;
}

.question-image {
  display: block;
  max-width: 100%;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.answers-list {
  display: grid;
  gap: 0.75rem;
}

.answer-option {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.answer-option.is-selected {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.answer-option.is-review {
  cursor: default;
}

.answer-option.is-correct {
  border-color: rgba(22, 163, 74, 0.38);
  background: rgba(22, 163, 74, 0.1);
}

.answer-option.is-wrong {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(220, 38, 38, 0.09);
}

.answer-key {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface-muted);
  font-weight: 900;
}

.answer-option.is-selected .answer-key {
  background: var(--primary);
  color: #ffffff;
}

.answer-option.is-correct .answer-key {
  background: var(--success);
  color: #ffffff;
}

.answer-option.is-wrong .answer-key {
  background: var(--danger);
  color: #ffffff;
}

.answer-text {
  min-width: 0;
}

.answer-label {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.exam-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.nav-label-mobile {
  display: none;
}

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

.modal-card {
  width: min(520px, 100%);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin: 0.7rem 0;
}

.modal-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 1.2rem;
}

.result-hero {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  margin-top: 1rem;
}

.result-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  pointer-events: none;
}

.result-hero h1 {
  font-size: 2.6rem;
}

.question-dot.is-blank {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.13);
  color: #92400e;
}

.question-dot.is-current {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

:root[data-theme="dark"] .question-dot.is-current {
  border-color: var(--primary);
  background: var(--primary);
  color: #0f172a;
}

.thematic-result-theme {
  margin: 0.35rem 0 0.2rem;
  color: var(--text);
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.practice-result-status {
  margin: 0.65rem 0 0;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.result-hero.is-pass .practice-result-status {
  color: var(--success);
}

.result-hero.is-fail .practice-result-status {
  color: var(--danger);
}

.practice-result-scope,
.practice-review-context {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.practice-result-grid .stat-tile {
  min-width: 0;
}

.practice-result-grid .stat-tile strong,
.practice-result-grid .stat-tile span {
  overflow-wrap: anywhere;
}

.result-hero.is-pass {
  border-color: rgba(22, 163, 74, 0.35);
  background:
    linear-gradient(135deg, rgba(220, 252, 231, 0.88), rgba(255, 255, 255, 0.98));
}

.result-hero.is-pass::before {
  background: var(--success);
}

.result-hero.is-pass h1 {
  color: var(--success);
}

.result-hero.is-fail {
  border-color: rgba(220, 38, 38, 0.3);
  background:
    linear-gradient(135deg, rgba(254, 226, 226, 0.88), rgba(255, 255, 255, 0.98));
}

.result-hero.is-fail::before {
  background: var(--danger);
}

.result-hero.is-fail h1 {
  color: var(--danger);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.result-grid .stat-tile {
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.result-grid .stat-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 4px solid transparent;
  pointer-events: none;
}

.tone-success strong {
  color: var(--success);
}

.tone-danger strong {
  color: var(--danger);
}

.tone-warning strong {
  color: #92400e;
}

.tone-approval strong {
  color: #b45309;
}

.tone-score strong {
  color: var(--primary);
}

.tone-time strong {
  color: #4f46e5;
}

.result-grid .tone-success {
  border-color: rgba(22, 163, 74, 0.24);
  background: rgba(22, 163, 74, 0.09);
}

.result-grid .tone-success::before {
  border-left-color: var(--success);
}

.result-grid .tone-danger {
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(220, 38, 38, 0.08);
}

.result-grid .tone-danger::before {
  border-left-color: var(--danger);
}

.result-grid .tone-warning,
.result-grid .tone-approval {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.1);
}

.result-grid .tone-warning::before,
.result-grid .tone-approval::before {
  border-left-color: var(--warning);
}

.result-grid .tone-score {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.08);
}

.result-grid .tone-score::before {
  border-left-color: var(--primary);
}

.result-grid .tone-time {
  border-color: rgba(99, 102, 241, 0.22);
  background: rgba(99, 102, 241, 0.09);
}

.result-grid .tone-time::before {
  border-left-color: #6366f1;
}

.rules-note {
  padding: 1rem;
}

.theme-results {
  margin-top: 1rem;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
}

.summary-theme-cards {
  display: none;
}

.theme-summary-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.theme-summary-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  line-height: 1.35;
}

.theme-summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.theme-summary-pill {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.55rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: center;
}

.theme-summary-pill strong {
  font-size: 1.05rem;
  line-height: 1;
}

.theme-summary-pill span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.theme-summary-pill.tone-success {
  border-color: rgba(22, 163, 74, 0.2);
  background: rgba(22, 163, 74, 0.1);
}

.theme-summary-pill.tone-danger {
  border-color: rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.08);
}

.theme-summary-pill.tone-warning {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.11);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-table-desktop table {
  overflow: hidden;
  border-radius: 8px;
}

.summary-table-desktop thead {
  background: var(--surface-muted);
}

.summary-table-desktop th {
  color: var(--text);
  font-weight: 900;
}

.summary-table-desktop th:not(:first-child),
.summary-table-desktop td:not(:first-child) {
  text-align: center;
}

.summary-table-desktop tbody tr {
  transition: background-color 160ms ease;
}

.summary-table-desktop tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}

.result-table-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
}

.result-table-pill.tone-success {
  border-color: rgba(22, 163, 74, 0.24);
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.result-table-pill.tone-danger {
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
}

.result-table-pill.tone-warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

:root[data-theme="dark"] .result-hero.is-pass {
  border-color: rgba(74, 222, 128, 0.32);
  background:
    linear-gradient(135deg, rgba(22, 101, 52, 0.24), rgba(23, 32, 51, 0.98));
}

:root[data-theme="dark"] .result-hero.is-fail {
  border-color: rgba(248, 113, 113, 0.32);
  background:
    linear-gradient(135deg, rgba(127, 29, 29, 0.24), rgba(23, 32, 51, 0.98));
}

:root[data-theme="dark"] .result-grid .stat-tile,
:root[data-theme="dark"] .theme-results {
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.28);
}

:root[data-theme="dark"] .tone-warning strong,
:root[data-theme="dark"] .tone-approval strong,
:root[data-theme="dark"] .result-table-pill.tone-warning {
  color: #fde68a;
}

:root[data-theme="dark"] .tone-time strong {
  color: #c7d2fe;
}

:root[data-theme="dark"] .result-grid .tone-success,
:root[data-theme="dark"] .result-table-pill.tone-success {
  border-color: rgba(74, 222, 128, 0.32);
  background: rgba(74, 222, 128, 0.12);
}

:root[data-theme="dark"] .result-grid .tone-danger,
:root[data-theme="dark"] .result-table-pill.tone-danger {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.12);
}

:root[data-theme="dark"] .result-grid .tone-warning,
:root[data-theme="dark"] .result-grid .tone-approval,
:root[data-theme="dark"] .result-table-pill.tone-warning {
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.13);
}

:root[data-theme="dark"] .result-grid .tone-score {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(37, 99, 235, 0.14);
}

:root[data-theme="dark"] .result-grid .tone-time {
  border-color: rgba(129, 140, 248, 0.3);
  background: rgba(99, 102, 241, 0.14);
}

:root[data-theme="dark"] .summary-table-desktop thead {
  background: rgba(34, 48, 73, 0.74);
}

:root[data-theme="dark"] .summary-table-desktop tbody tr:hover {
  background: rgba(96, 165, 250, 0.08);
}

.result-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 1.25rem;
}

.result-actions .button[data-result-action] {
  border-color: var(--result-action-background);
  background: var(--result-action-background);
  color: var(--result-action-text);
}

.result-actions .button[data-result-action="consult"] {
  --result-action-background: var(--result-consult);
  --result-action-hover: var(--result-consult-hover);
  --result-action-active: var(--result-consult-active);
}

.result-actions .button[data-result-action="module"] {
  --result-action-background: var(--result-module);
  --result-action-hover: var(--result-module-hover);
  --result-action-active: var(--result-module-active);
}

.result-actions .button[data-result-action="positive"] {
  --result-action-background: var(--result-positive);
  --result-action-hover: var(--result-positive-hover);
  --result-action-active: var(--result-positive-active);
}

.result-actions .button[data-result-action="change"] {
  --result-action-background: var(--result-change);
  --result-action-hover: var(--result-change-hover);
  --result-action-active: var(--result-change-active);
}

.result-actions .button[data-result-action="exit"] {
  --result-action-background: var(--result-exit);
  --result-action-hover: var(--result-exit-hover);
  --result-action-active: var(--result-exit-active);
}

.result-actions .button[data-result-action]:hover:not(:disabled) {
  border-color: var(--result-action-hover);
  background: var(--result-action-hover);
}

.result-actions .button[data-result-action]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--surface);
}

.result-actions .button[data-result-action]:active:not(:disabled) {
  transform: translateY(0);
  border-color: var(--result-action-active);
  background: var(--result-action-active);
}

.result-actions .button[data-result-action]:disabled {
  transform: none;
  border-color: var(--border);
  background: var(--surface-muted);
  box-shadow: none;
  color: var(--muted);
  opacity: 0.65;
}

.review-toolbar {
  align-items: flex-end;
}

.thematic-review-theme {
  max-width: 900px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.thematic-review-progress {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-weight: 800;
}

.thematic-recovery {
  width: min(100%, 760px);
  margin-inline: auto;
}

.review-message {
  margin: 0.75rem 0 0;
  color: var(--danger);
  font-weight: 800;
  text-align: right;
}

.report-language-notice {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
}

:root[data-theme="dark"] .report-language-notice {
  color: #cbd5e1;
}

.explanation-box {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.06);
}

.explanation-box h3 {
  margin: 0 0 0.4rem;
}

.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
}

.toast {
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 700;
}

.app-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
}

.loading-screen,
.error-screen {
  width: min(720px, calc(100% - 2rem));
  margin: 10vh auto;
  padding: 2rem;
}

.error-screen code {
  display: inline-flex;
  margin: 0.7rem 0;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  background: var(--surface-muted);
}

.auth-root[hidden],
.app-root[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.auth-root {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background-color: #061426;
  background-image:
    linear-gradient(135deg, rgba(3, 12, 27, 0.82), rgba(8, 28, 53, 0.66)),
    url("../assets/cam-login-background.webp");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #f8fafc;
}

.auth-header {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  padding:
    max(0.85rem, env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px));
}

.auth-header .language-switch {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(6, 20, 38, 0.72);
  box-shadow: 0 12px 30px rgba(2, 8, 23, 0.28);
}

.auth-header .language-option {
  min-width: 44px;
  min-height: 36px;
  color: rgba(241, 245, 249, 0.78);
}

.auth-header .language-option:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.auth-header .language-option.is-active {
  background: #2563eb;
  color: #ffffff;
}

.auth-header .language-option:focus-visible {
  outline-color: rgba(125, 211, 252, 0.88);
}

.auth-main {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding:
    calc(4.5rem + env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px))
    max(1.25rem, env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
}

.auth-card {
  width: min(92vw, 29rem);
  max-width: 100%;
  padding: clamp(1rem, 4vw, 1.75rem);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background: rgba(5, 18, 35, 0.88);
  box-shadow: 0 24px 70px rgba(2, 8, 23, 0.42);
  color: #f8fafc;
}

@supports ((-webkit-backdrop-filter: blur(14px)) or (backdrop-filter: blur(14px))) {
  .auth-card {
    background: rgba(5, 18, 35, 0.68);
    -webkit-backdrop-filter: blur(14px) saturate(115%);
    backdrop-filter: blur(14px) saturate(115%);
  }
}

.auth-branding {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-width: 0;
}

.auth-wordmark {
  display: grid;
  justify-items: start;
  line-height: 1;
}

.auth-wordmark-cam {
  color: #ffffff;
  font-size: clamp(2.1rem, 9vw, 2.75rem);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.auth-wordmark-passengers {
  margin-top: 0.22rem;
  color: #bfdbfe;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.auth-eu-badge {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.auth-eu-flag {
  display: block;
  width: 48px;
  height: 32px;
  filter: drop-shadow(0 4px 8px rgba(2, 8, 23, 0.28));
}

.auth-eu-field {
  fill: #003399;
}

.auth-eu-mark {
  fill: #ffcc00;
}

.auth-panel-content {
  margin-top: 1rem;
}

.auth-card h1 {
  margin: 0 0 0.9rem;
  color: #ffffff;
  font-size: clamp(1.65rem, 7vw, 2.1rem);
  line-height: 1.12;
  text-align: center;
  text-transform: uppercase;
}

.auth-description {
  margin: 0;
  color: rgba(226, 232, 240, 0.86);
  text-align: center;
}

.auth-checking::after {
  display: block;
  width: 32px;
  height: 32px;
  margin: 1rem auto 0;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #60a5fa;
  border-radius: 50%;
  content: "";
  animation: auth-pulse 900ms ease-in-out infinite alternate;
}

.auth-form,
.auth-field {
  display: grid;
}

.auth-form {
  gap: 0.75rem;
}

.auth-input-control {
  position: relative;
}

.auth-password-control {
  position: relative;
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem 0.7rem 3rem;
  border: 1px solid rgba(191, 219, 254, 0.34);
  border-radius: 10px;
  background: rgba(241, 245, 249, 0.96);
  color: #0f172a;
  caret-color: #1d4ed8;
}

.auth-field input::placeholder {
  color: #64748b;
  opacity: 1;
}

.auth-field input:focus-visible {
  border-color: #7dd3fc;
  outline: 3px solid rgba(125, 211, 252, 0.38);
  outline-offset: 1px;
}

.auth-field input:disabled {
  background: rgba(226, 232, 240, 0.86);
}

.auth-field-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 0.85rem;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: #475569;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  pointer-events: none;
}

.auth-password-control input {
  padding-right: 3.45rem;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #475569;
}

.password-visibility-toggle:hover:not(:disabled) {
  border-color: rgba(71, 85, 105, 0.24);
  background: rgba(148, 163, 184, 0.18);
  color: #0f172a;
}

.password-visibility-toggle:focus-visible {
  border-color: #0284c7;
  outline: 3px solid rgba(14, 165, 233, 0.32);
  outline-offset: 1px;
}

.password-visibility-toggle:disabled {
  background: transparent;
}

.password-visibility-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.password-visibility-hide,
.password-visibility-toggle[aria-pressed="true"] .password-visibility-show {
  display: none;
}

.password-visibility-toggle[aria-pressed="true"] .password-visibility-hide {
  display: block;
}

.auth-feedback {
  display: grid;
  align-items: center;
  min-height: 2.7rem;
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.86rem;
  line-height: 1.3;
  text-align: center;
}

.auth-root .auth-error {
  color: #fecaca;
}

.session-error {
  color: var(--danger);
}

.auth-submit,
.auth-card > .button {
  width: 100%;
  min-height: 48px;
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
}

.auth-submit:hover:not(:disabled),
.auth-card > .button:hover:not(:disabled) {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.auth-submit:focus-visible,
.auth-card > .button:focus-visible {
  outline-color: rgba(125, 211, 252, 0.88);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.28);
}

.auth-submit:disabled {
  border-color: #60a5fa;
  background: #60a5fa;
  color: #eff6ff;
}

.auth-audit-notice {
  margin: 0.85rem 0 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: center;
}

.auth-contact {
  display: grid;
  gap: 0.08rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
}

.auth-contact p,
.auth-contact a {
  margin: 0;
  color: rgba(241, 245, 249, 0.94);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.auth-contact a {
  color: #bfdbfe;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.auth-contact a:hover {
  color: #ffffff;
}

.auth-contact a:focus-visible {
  border-radius: 4px;
  outline-color: rgba(125, 211, 252, 0.88);
}

.session-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.session-identity {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: min(100%, 28rem);
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--practice-chip-border);
  border-radius: 999px;
  background: var(--practice-chip-background);
  color: var(--practice-chip-text);
  line-height: 1.25;
}

.session-identity-label {
  font-weight: 400;
}

.session-identity-name {
  color: inherit;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.session-status:empty,
.session-error:empty {
  display: none;
}

.session-error {
  max-width: 240px;
  font-size: 0.85rem;
}

.session-logout {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  border-color: var(--available-border);
  background: var(--available-background);
  color: var(--available-text);
}

.session-logout:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--available-hover-border);
  background: var(--available-hover-background);
  color: var(--available-text);
}

.session-logout:focus-visible {
  border-color: var(--available-hover-border);
  outline-color: var(--available-focus-ring);
  box-shadow: 0 0 0 3px var(--available-focus-ring);
}

.session-logout:disabled {
  border-color: var(--available-border);
  background: var(--available-background);
  color: var(--available-text);
}

@keyframes auth-pulse {
  to {
    border-top-color: var(--focus);
    opacity: 0.45;
  }
}

.print-report {
  display: none;
}

@media (max-width: 900px) {
  .hero-section,
  .exam-layout,
  .module-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .question-map-panel {
    position: static;
  }

  .question-grid {
    grid-template-columns: repeat(10, 1fr);
  }

  .mode-section,
  .exam-toolbar,
  .review-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .mode-card {
    gap: 1rem;
  }

  .timer-card {
    width: 100%;
  }

  .summary-table-desktop {
    display: none;
  }

  .summary-theme-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
  }

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

  .practice-fields {
    grid-template-columns: 1fr;
  }
}

.practice-result-message {
  max-width: 760px;
  text-align: left;
}

@media (max-width: 640px) {
  .practice-selector-layer {
    pointer-events: auto;
  }

  .practice-selector-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    background: rgba(15, 23, 42, 0.58);
    animation: practice-selector-backdrop-in 180ms ease-out;
  }

  .practice-selector-panel {
    inset: auto 0 0 !important;
    width: 100% !important;
    max-width: none;
    max-height: min(82dvh, 720px) !important;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
    animation: practice-selector-sheet-in 220ms ease-out;
  }

  .practice-selector-panel-header {
    padding: 1rem;
  }

  .practice-selector-panel-header h2 {
    font-size: 1.08rem;
  }

  .practice-selector-listbox {
    padding: 0.5rem 0.75rem 0.75rem;
  }

  .practice-selector-option {
    min-height: 52px;
  }

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

  .header-controls {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 0;
  }

  .header-utilities {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .auth-header {
    align-items: center;
    width: auto;
    padding:
      max(0.65rem, env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px));
  }

  .auth-root {
    background-image:
      linear-gradient(135deg, rgba(3, 12, 27, 0.88), rgba(8, 28, 53, 0.74)),
      url("../assets/cam-login-background.webp");
  }

  .auth-main {
    padding:
      calc(4.25rem + env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
  }

  .auth-card {
    width: min(92vw, 29rem);
    padding: clamp(0.9rem, 5vw, 1.25rem);
    border-radius: 18px;
  }

  .auth-branding {
    gap: 0.75rem;
  }

  .auth-wordmark-cam {
    font-size: clamp(2rem, 12vw, 2.45rem);
  }

  .auth-eu-badge {
    padding-left: 0.75rem;
  }

  .auth-eu-flag {
    width: 44px;
    height: auto;
  }

  .auth-contact p,
  .auth-contact a {
    font-size: 0.8rem;
  }

  .auth-audit-notice {
    font-size: 0.74rem;
  }

  .session-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .session-identity {
    flex: 1 1 12rem;
    max-width: 100%;
  }

  .session-error {
    width: 100%;
    max-width: none;
  }

  .language-option {
    min-width: 44px;
    min-height: 38px;
  }

  .scope-switch {
    width: 100%;
    border-radius: 8px;
  }

  .scope-option {
    flex: 1 1 0;
    min-width: 0;
    border-radius: 6px;
    padding-inline: 0.55rem;
  }

  .scope-option.is-disabled {
    flex-direction: column;
    gap: 0.15rem;
  }

  .hero-section {
    padding-top: 2rem;
  }

  .thematic-selection-header {
    align-items: stretch;
    flex-direction: column;
  }

  .practice-config-header,
  .practice-start-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .thematic-topic-grid {
    grid-template-columns: 1fr;
  }

  .thematic-topic-card {
    min-height: 0;
  }

  .thematic-topic-metrics {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .result-hero h1,
  .error-screen h1 {
    font-size: 2.25rem;
  }

  .exam-toolbar h1,
  .review-toolbar h1 {
    font-size: 1.55rem;
  }

  .segmented-control {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .summary-theme-cards {
    grid-template-columns: 1fr;
  }

  .practice-summary-list {
    grid-template-columns: 1fr;
  }

  .question-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .question-panel {
    padding: 1rem;
  }

  .answer-option {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .answer-label {
    grid-column: 2;
    width: fit-content;
  }

  .exam-actions,
  .result-actions,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .exam-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    justify-items: center;
  }

  .button {
    width: 100%;
  }

  .exam-actions .button-danger,
  .exam-actions .button-primary {
    grid-column: 1 / -1;
  }

  .exam-actions > [data-exit-test] {
    grid-row: 2;
  }

  .exam-actions > [data-exit-test] + .button-secondary {
    grid-column: 1;
    grid-row: 1;
  }

  .exam-actions > [data-exit-test] + .button-secondary + .button-secondary {
    grid-column: 2;
    grid-row: 1;
  }

  .exam-actions > [data-exit-test] ~ .button-danger {
    grid-row: 3;
  }

  .exam-actions .button-secondary {
    width: 52px;
    min-height: 52px;
    aspect-ratio: 1;
    padding: 0;
    border-color: rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
    color: #ffffff;
  }

  .exam-actions .button-secondary:hover:not(:disabled) {
    background: var(--primary-hover);
  }

  .exam-actions .button-secondary:disabled {
    border-color: rgba(148, 163, 184, 0.26);
    background: #e2e8f0;
    box-shadow: none;
    color: #64748b;
  }

  .nav-label-desktop {
    display: none;
  }

  .nav-label-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1;
  }

  .review-message {
    text-align: left;
  }

  .report-language-notice {
    text-align: left;
  }
}

@media (max-height: 650px) {
  .auth-main {
    place-items: start center;
    padding-top: calc(4rem + env(safe-area-inset-top, 0px));
  }

  .auth-card {
    padding-block: 0.85rem;
  }

  .auth-panel-content {
    margin-top: 0.65rem;
  }

  .auth-card h1 {
    margin-bottom: 0.6rem;
    font-size: 1.5rem;
  }

  .auth-form {
    gap: 0.55rem;
  }

  .auth-feedback {
    min-height: 2.2rem;
  }

  .auth-contact {
    margin-top: 0.7rem;
    padding-top: 0.65rem;
  }

  .auth-audit-notice {
    margin-top: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-checking::after {
    animation: none;
  }

  .thematic-topic-card,
  .module-card {
    transition: none;
  }

  .practice-selector-backdrop,
  .practice-selector-panel {
    animation: none;
  }

  .thematic-topic-card:hover:not(:disabled),
  .thematic-topic-card:focus-visible:not(:disabled),
  .module-card:hover,
  .module-card:focus-within {
    transform: none;
  }
}

@keyframes practice-selector-backdrop-in {
  from {
    opacity: 0;
  }
}

@keyframes practice-selector-sheet-in {
  from {
    transform: translateY(100%);
  }
}

@media print {
  :root,
  :root[data-theme="dark"] {
    color-scheme: light;
    --background: #ffffff;
    --surface: #ffffff;
    --surface-muted: #f1f5f9;
    --text: #0f172a;
    --muted: #475569;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --focus: #0ea5e9;
    --info-soft: #e0f2fe;
    --success-soft: #dcfce7;
    --warning-soft: #fef3c7;
    --indigo-soft: #e0e7ff;
    --slate-soft: #e2e8f0;
    --shadow: none;
  }

  @page {
    size: A4;
    margin: 16mm;
  }

  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body {
    background: #ffffff;
    color: #0f172a;
  }

  .app-header,
  .review-main,
  .page-main,
  .exam-main,
  .result-main,
  .app-footer,
  .toast-region {
    display: none !important;
  }

  .print-report {
    display: block;
    font-family:
      Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
      "Segoe UI", sans-serif;
    color: #0f172a;
  }

  .print-report-header {
    break-inside: avoid;
    page-break-inside: avoid;
    page-break-after: avoid;
    padding: 1.35rem 1.5rem 1.15rem;
    border: 1px solid #0f172a;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: #1e293b;
    color: #f8fafc;
  }

  .print-report-footer {
    color: #475569;
  }

  .print-report-header-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: start;
  }

  .print-report-intro {
    min-width: 0;
  }

  .print-report-eyebrow {
    margin: 0 0 0.55rem;
    color: #38bdf8;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.09em;
  }

  .print-report-header h1 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.9rem;
    line-height: 1.1;
  }

  .print-report-description {
    max-width: 35rem;
    margin: 0.8rem 0 0;
    color: #cbd5e1;
    font-size: 0.92rem;
    font-style: italic;
    line-height: 1.45;
  }

  .print-report-meta {
    display: grid;
    min-width: 12.5rem;
    gap: 0.3rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid #526076;
    border-radius: 8px;
    background: #334155;
    color: #e2e8f0;
    font-size: 0.83rem;
  }

  .print-report-meta p {
    margin: 0;
  }

  .print-report-meta strong {
    color: #f8fafc;
  }

  .print-report-divider {
    height: 1px;
    margin: 1rem 0 0.9rem;
    background: #475569;
  }

  .print-report-theme-line {
    margin: 0 0 0.9rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
  }

  .print-report-theme-line strong {
    color: #38bdf8;
  }

  .print-report-practice-context {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
  }

  .print-report-practice-context .print-report-theme-line {
    margin-bottom: 0;
  }

  .print-report-totals {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #94a3b8;
    font-size: 0.88rem;
  }

  .print-report-totals p {
    margin: 0;
  }

  .print-report-totals strong {
    color: #38bdf8;
    font-size: 1rem;
  }

  .print-error-list {
    display: grid;
    gap: 1rem;
  }

  .print-report-message,
  .print-report-note {
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 0.9rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    line-height: 1.5;
  }

  .print-report-message {
    margin: 0;
  }

  .print-report-note {
    margin: 1rem 0 0;
  }

  .print-error-card {
    display: block;
    overflow: visible;
    break-inside: avoid-page;
    page-break-inside: avoid;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
  }

  .print-error-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.7rem;
    color: #475569;
    font-size: 0.9rem;
  }

  .print-error-card h2 {
    margin: 0 0 0.85rem;
    font-size: 1.1rem;
    line-height: 1.35;
  }

  .print-status,
  .print-answer-label {
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    font-weight: 800;
  }

  .print-status.is-incorrect {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
  }

  .print-status.is-unanswered {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
  }

  .print-status.is-blank {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
  }

  .print-answer-list {
    display: grid;
    gap: 0.45rem;
  }

  .print-answer {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }

  .print-answer.is-correct {
    border-color: rgba(22, 163, 74, 0.38);
    background: rgba(22, 163, 74, 0.1);
  }

  .print-answer.is-wrong {
    border-color: rgba(220, 38, 38, 0.34);
    background: rgba(220, 38, 38, 0.09);
  }

  .print-answer-key {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f1f5f9;
    font-weight: 900;
  }

  .print-answer.is-correct .print-answer-key {
    background: #16a34a;
    color: #ffffff;
  }

  .print-answer.is-wrong .print-answer-key {
    background: #dc2626;
    color: #ffffff;
  }

  .print-answer-summary {
    display: grid;
    gap: 0.2rem;
    margin: 0.8rem 0;
    font-weight: 700;
  }

  .print-answer-summary p,
  .print-explanation p {
    margin: 0;
  }

  .print-explanation {
    padding: 0.75rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.06);
  }

  .print-explanation h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
  }

  .print-report-footer {
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
  }
}
