  /* Light mode contrast pass — all dark-mode defaults remain untouched. */
  html[data-theme="light"] {
    --light-page: #edf2f7;
    --light-surface: #ffffff;
    --light-soft: #f1f5f9;
    --light-soft-2: #e8eef6;
    --light-border: #b8c5d6;
    --light-text: #0f172a;
    --light-secondary: #334155;
    --light-muted: #5b6b80;
    --light-blue: #1d4ed8;
    --light-green: #166534;
    --light-red: #991b1b;
    --light-amber: #92400e;
  }

  /* Catch legacy inline dark colours that otherwise remain unreadable in light mode. */
  html[data-theme="light"] [style*="color:#bdc1c6"],
  html[data-theme="light"] [style*="color: #bdc1c6"],
  html[data-theme="light"] [style*="color:#cbd5e1"],
  html[data-theme="light"] [style*="color: #cbd5e1"],
  html[data-theme="light"] [style*="color:#d1d5db"],
  html[data-theme="light"] [style*="color: #d1d5db"],
  html[data-theme="light"] [style*="color:#e5e7eb"],
  html[data-theme="light"] [style*="color: #e5e7eb"],
  html[data-theme="light"] [style*="color:#f9fafb"],
  html[data-theme="light"] [style*="color: #f9fafb"] { color: var(--light-secondary) !important; }
  html[data-theme="light"] [style*="color:#9ca3af"],
  html[data-theme="light"] [style*="color: #9ca3af"] { color: var(--light-muted) !important; }
  html[data-theme="light"] [style*="color:#86efac"],
  html[data-theme="light"] [style*="color: #86efac"],
  html[data-theme="light"] [style*="color:#bbf7d0"],
  html[data-theme="light"] [style*="color: #bbf7d0"] { color: var(--light-green) !important; }
  html[data-theme="light"] [style*="color:#fde68a"],
  html[data-theme="light"] [style*="color: #fde68a"] { color: var(--light-amber) !important; }
  html[data-theme="light"] [style*="color:#fca5a5"],
  html[data-theme="light"] [style*="color: #fca5a5"] { color: var(--light-red) !important; }

  /* General surfaces, headings, help panels and status text. */
  html[data-theme="light"] h1,
  html[data-theme="light"] h2,
  html[data-theme="light"] h3,
  html[data-theme="light"] h4 { color: var(--light-text); }
  html[data-theme="light"] .status,
  html[data-theme="light"] .teacher-dashboard-status,
  html[data-theme="light"] .teacher-view-status,
  html[data-theme="light"] .teacher-manage-status,
  html[data-theme="light"] .site-admin-status,
  html[data-theme="light"] .comparison-status,
  html[data-theme="light"] .organic-analysis-feedback { color: var(--light-secondary); }
  html[data-theme="light"] .status.ok,
  html[data-theme="light"] .teacher-dashboard-status.ok,
  html[data-theme="light"] .teacher-view-status.ok,
  html[data-theme="light"] .teacher-manage-status.ok,
  html[data-theme="light"] .site-admin-status.ok,
  html[data-theme="light"] .comparison-status.ok,
  html[data-theme="light"] .organic-analysis-feedback.ok { color: var(--light-green) !important; }
  html[data-theme="light"] .status.error,
  html[data-theme="light"] .teacher-dashboard-status.error,
  html[data-theme="light"] .teacher-view-status.error,
  html[data-theme="light"] .teacher-manage-status.error,
  html[data-theme="light"] .site-admin-status.error,
  html[data-theme="light"] .comparison-status.error,
  html[data-theme="light"] .organic-analysis-feedback.error { color: var(--light-red) !important; }
  html[data-theme="light"] .status.warning,
  html[data-theme="light"] .teacher-dashboard-status.warning,
  html[data-theme="light"] .teacher-view-status.warning,
  html[data-theme="light"] .teacher-manage-status.warning,
  html[data-theme="light"] .site-admin-status.warning,
  html[data-theme="light"] .comparison-status.warning,
  html[data-theme="light"] .organic-analysis-feedback.warning { color: var(--light-amber) !important; }
  html[data-theme="light"] .ui-help,
  html[data-theme="light"] .compact-guide,
  html[data-theme="light"] .builder-formatter,
  html[data-theme="light"] .organic-analysis-interpretation {
    border-color: var(--light-border) !important;
    background: var(--light-soft) !important;
    color: var(--light-secondary) !important;
  }
  html[data-theme="light"] .ui-help summary,
  html[data-theme="light"] .compact-guide summary,
  html[data-theme="light"] .builder-formatter summary,
  html[data-theme="light"] .organic-analysis-interpretation summary { color: var(--light-text) !important; }
  html[data-theme="light"] .ui-help summary::after,
  html[data-theme="light"] .compact-guide summary::after,
  html[data-theme="light"] .builder-formatter summary::after { color: var(--light-blue) !important; }

  /* 1. Molecule Builder */
  html[data-theme="light"] #structureInput,
  html[data-theme="light"] #builderSemiOutput,
  html[data-theme="light"] #structureUnicodeOutput {
    background: var(--light-soft) !important;
    color: var(--light-text) !important;
    border: 1px solid var(--light-border) !important;
  }
  html[data-theme="light"] #builderSemiOutput,
  html[data-theme="light"] #structureUnicodeOutput { background: #e9eff6 !important; }
  html[data-theme="light"] .builder-mode-label,
  html[data-theme="light"] .builder-output-label,
  html[data-theme="light"] .builder-examples-title,
  html[data-theme="light"] .builder-inline-note { color: var(--light-secondary) !important; }
  html[data-theme="light"] .builder-name-output,
  html[data-theme="light"] .builder-check-output,
  html[data-theme="light"] .builder-recognition {
    border: 1px solid var(--light-border) !important;
    background: var(--light-soft) !important;
    color: var(--light-secondary) !important;
  }
  html[data-theme="light"] .builder-recognition.formula { border-color:#60a5fa !important; background:#eff6ff !important; color:#1e40af !important; }
  html[data-theme="light"] .builder-recognition.name,
  html[data-theme="light"] .builder-check-output.ok { border-color:#86efac !important; background:#ecfdf5 !important; color:var(--light-green) !important; }
  html[data-theme="light"] .builder-check-output.warning { background:#fffbeb !important; color:var(--light-amber) !important; }
  html[data-theme="light"] .builder-check-output.error { background:#fef2f2 !important; color:var(--light-red) !important; }
  html[data-theme="light"] #builderPanel .builder-floating-structure { border-color:#94a3b8; background:rgba(248,250,252,.97); }
  html[data-theme="light"] #builderPanel .builder-floating-header { border-color:#cbd5e1; color:#0f172a; }
  html[data-theme="light"] #builderPanel .builder-floating-meta { border-color:#cbd5e1; background:rgba(255,255,255,.98); }
  html[data-theme="light"] #builderPanel .builder-floating-name { color:#0f172a; }
  html[data-theme="light"] #builderPanel .builder-floating-semi { color:#1d4ed8; }
  html[data-theme="light"] #builderPanel .builder-floating-view-buttons button { background:#e2e8f0; color:#334155; }
  html[data-theme="light"] #builderPanel .builder-floating-view-buttons button.active { background:#2563eb; color:#fff; }
  html[data-theme="light"] #quizPanel .quiz-floating-molecule { border-color:#94a3b8; background:rgba(248,250,252,.97); }
  html[data-theme="light"] #quizPanel .quiz-floating-header { border-color:#cbd5e1; color:#0f172a; }
  html[data-theme="light"] #quizPanel .quiz-floating-header span:last-child { color:#1d4ed8; }

  /* 2. Name This Molecule */
  html[data-theme="light"] #quizPanel .quiz-xp-tile {
    border: 1px solid var(--light-border);
    background: var(--light-soft) !important;
    box-shadow: 0 3px 10px rgba(15,23,42,.05);
  }
  html[data-theme="light"] #quizPanel .quiz-xp-label { color: var(--light-muted) !important; }
  html[data-theme="light"] #quizTimer,
  html[data-theme="light"] #quizDailyXp,
  html[data-theme="light"] #quizWeeklyXp { color: #15803d !important; }
  html[data-theme="light"] #quizAvailableXp { color: var(--light-amber) !important; }
  html[data-theme="light"] #quizAnswer { background: var(--light-soft) !important; }
  html[data-theme="light"] #quizIncorrectList,
  html[data-theme="light"] #quizMasteryList,
  html[data-theme="light"] #quizMasteryDetail,
  html[data-theme="light"] #quizNotCorrectList {
    border: 1px solid var(--light-border) !important;
    background: var(--light-soft) !important;
    color: var(--light-secondary) !important;
  }
  html[data-theme="light"] #quizMasteryList .mastery-tile,
  html[data-theme="light"] #reactionMasteryList .mastery-tile {
    border: 1px solid #cbd5e1 !important;
    background: #e2e8f0 !important;
    color: #1e293b !important;
    box-shadow: none !important;
  }
  html[data-theme="light"] #quizMasteryList .mastery-tile.mastered,
  html[data-theme="light"] #reactionMasteryList .mastery-tile.mastered {
    border-color: #4ade80 !important;
    background: #dcfce7 !important;
    color: #166534 !important;
  }
  html[data-theme="light"] .quiz-difficulty-menu,
  html[data-theme="light"] .quiz-difficulty-option,
  html[data-theme="light"] .quiz-functional-option { color: var(--light-text) !important; }
  html[data-theme="light"] .quiz-functional-group-label { color: #1e40af !important; }
  html[data-theme="light"] .quiz-filter-divider { background: var(--light-border) !important; }

  /* Organic Reactions — included in the full contrast audit. */
  html[data-theme="light"] .reaction-instructions,
  html[data-theme="light"] .reaction-bank-note,
  html[data-theme="light"] .reaction-status-row,
  html[data-theme="light"] .reaction-attempts-heading label,
  html[data-theme="light"] .reaction-attempts-heading span,
  html[data-theme="light"] .reaction-mastery-heading label,
  html[data-theme="light"] .reaction-mastery-heading span { color: var(--light-secondary) !important; }
  html[data-theme="light"] .reaction-slot,
  html[data-theme="light"] .reaction-mastery-section,
  html[data-theme="light"] .reaction-incorrect-list,
  html[data-theme="light"] .reaction-mastery-detail,
  html[data-theme="light"] .reaction-choice-panel {
    border-color: var(--light-border) !important;
    background: var(--light-soft) !important;
    color: var(--light-text) !important;
  }
  html[data-theme="light"] .reaction-slot-label { color: var(--light-muted) !important; }
  html[data-theme="light"] .reaction-slot-value,
  html[data-theme="light"] .reaction-answer-name { color: var(--light-text) !important; }
  html[data-theme="light"] .reaction-answer-semi { color: #1e40af !important; }
  html[data-theme="light"] .reaction-bank-target { background:#fffbeb !important; color:var(--light-amber) !important; }
  html[data-theme="light"] .reaction-bank-target.selected { background:#eff6ff !important; color:#1e40af !important; }
  html[data-theme="light"] .reaction-slot.correct,
  html[data-theme="light"] .reaction-organic-input.confirmed-correct,
  html[data-theme="light"] .reaction-bank-target.confirmed-correct { background:#ecfdf5 !important; color:var(--light-green) !important; }
  html[data-theme="light"] .reaction-observation,
  html[data-theme="light"] .reaction-hint { background:#eff6ff !important; color:#1e40af !important; }
  html[data-theme="light"] .reaction-accepted-note { background:#fffbeb !important; color:var(--light-amber) !important; }
  html[data-theme="light"] .reaction-colour-chip { background:#ffffff !important; color:var(--light-text) !important; border-color:var(--light-border) !important; }

  /* 3. Identify the compound / Organic Analysis */
  html[data-theme="light"] .organic-analysis-intro,
  html[data-theme="light"] .organic-analysis-summary-card p,
  html[data-theme="light"] .organic-analysis-guess-card p,
  html[data-theme="light"] .organic-analysis-test-helper,
  html[data-theme="light"] .organic-analysis-step-heading p,
  html[data-theme="light"] .organic-analysis-peak-info,
  html[data-theme="light"] .organic-analysis-nmr-field,
  html[data-theme="light"] .organic-analysis-locked-message { color: var(--light-secondary) !important; }
  html[data-theme="light"] .organic-analysis-xp-card,
  html[data-theme="light"] .organic-analysis-attempts,
  html[data-theme="light"] .organic-analysis-test-result,
  html[data-theme="light"] .organic-analysis-clue-table,
  html[data-theme="light"] .organic-analysis-spectrum-card {
    border-color: var(--light-border) !important;
    background: var(--light-soft) !important;
    color: var(--light-text) !important;
  }
  html[data-theme="light"] .organic-analysis-xp-card span { color: var(--light-muted) !important; }
  html[data-theme="light"] .organic-analysis-xp-card strong { color: #15803d !important; }
  html[data-theme="light"] button.organic-analysis-test-button,
  html[data-theme="light"] button.organic-analysis-choice {
    border-color: var(--light-border) !important;
    background: #e2e8f0 !important;
    color: var(--light-text) !important;
  }
  html[data-theme="light"] button.organic-analysis-test-button:hover,
  html[data-theme="light"] button.organic-analysis-choice:hover { background:#cbd5e1 !important; }
  html[data-theme="light"] button.organic-analysis-test-button.ran,
  html[data-theme="light"] .organic-analysis-test-result.positive { border-color:#4ade80 !important; background:#dcfce7 !important; color:var(--light-green) !important; }
  html[data-theme="light"] .organic-analysis-test-result.unsuitable { border-color:#f59e0b !important; background:#fffbeb !important; }
  html[data-theme="light"] button.organic-analysis-choice.selected { border-color:#f59e0b !important; background:#fef3c7 !important; color:var(--light-amber) !important; }
  html[data-theme="light"] .organic-analysis-test-result strong,
  html[data-theme="light"] .organic-analysis-clue-title,
  html[data-theme="light"] .organic-analysis-spectrum-card h3 { color: var(--light-text) !important; }
  html[data-theme="light"] .organic-analysis-test-result span { color: var(--light-amber) !important; }
  html[data-theme="light"] .organic-analysis-test-result.positive span { color: var(--light-green) !important; }
  html[data-theme="light"] .organic-analysis-test-result.unsuitable span { color:#92400e !important; }
  html[data-theme="light"] .organic-analysis-test-result p,
  html[data-theme="light"] .organic-analysis-spectrum-card p { color: var(--light-secondary) !important; }
  html[data-theme="light"] .organic-analysis-step { border-color:var(--light-border) !important; background:var(--light-surface) !important; opacity:1; }
  html[data-theme="light"] .organic-analysis-step.locked { background:#f8fafc !important; opacity:.82; }
  html[data-theme="light"] .organic-analysis-step-header { border-color:var(--light-border) !important; background:#e8eef6 !important; }
  html[data-theme="light"] .organic-analysis-step.complete .organic-analysis-step-header { background:#dcfce7 !important; }
  html[data-theme="light"] .organic-analysis-step.hint { border-color:#f59e0b !important; }
  html[data-theme="light"] .organic-analysis-step.hint .organic-analysis-step-header { background:#fef3c7 !important; }
  html[data-theme="light"] .organic-analysis-step-xp { color:var(--light-amber) !important; }
  html[data-theme="light"] .organic-analysis-step.complete .organic-analysis-step-xp { color:var(--light-green) !important; }
  html[data-theme="light"] .organic-analysis-step-body { background:var(--light-surface) !important; color:var(--light-text) !important; }
  html[data-theme="light"] .organic-analysis-solved-note { background:#dcfce7 !important; color:var(--light-green) !important; }
  html[data-theme="light"] .organic-analysis-clue-table th,
  html[data-theme="light"] .organic-analysis-clue-table td { border-color:#d7e0ea !important; }
  html[data-theme="light"] .organic-analysis-clue-table th { background:#e8eef6 !important; color:var(--light-secondary) !important; }
  html[data-theme="light"] .organic-analysis-clue-table td { background:#ffffff !important; color:var(--light-text) !important; }
  html[data-theme="light"] .organic-analysis-mass-field,
  html[data-theme="light"] .organic-analysis-nmr-peak-table { border-color:var(--light-border) !important; background:#ffffff !important; color:var(--light-text) !important; }
  html[data-theme="light"] .organic-analysis-mass-field.correct,
  html[data-theme="light"] .organic-analysis-nmr-peak-row.correct { border-color:#22c55e !important; background:#ecfdf5 !important; }
  html[data-theme="light"] .organic-analysis-nmr-peak-row.exchangeable { background:#f8fafc !important; }
  html[data-theme="light"] .organic-analysis-mass-field label,
  html[data-theme="light"] .organic-analysis-nmr-peak-table td { color:var(--light-text) !important; }
  html[data-theme="light"] .organic-analysis-mass-field small,
  html[data-theme="light"] .organic-analysis-nmr-peak-table th { color:var(--light-secondary) !important; }
  html[data-theme="light"] .organic-analysis-spectrum-svg,
  html[data-theme="light"] .organic-analysis-spectrum-svg svg { background:#ffffff !important; }

  /* 4. Molecule Comparison */
  html[data-theme="light"] .comparison-intro,
  html[data-theme="light"] .comparison-input-card p,
  html[data-theme="light"] .comparison-empty,
  html[data-theme="light"] .comparison-floating-note { color: var(--light-secondary) !important; }
  html[data-theme="light"] .comparison-options {
    border-color:var(--light-border) !important;
    background:#e8eef6 !important;
  }
  html[data-theme="light"] .comparison-options-title,
  html[data-theme="light"] .comparison-section-title { color: var(--light-text) !important; }
  html[data-theme="light"] .comparison-option {
    border-color:var(--light-border) !important;
    background:#ffffff !important;
    color:var(--light-text) !important;
  }
  html[data-theme="light"] .comparison-option:hover { border-color:#60a5fa !important; background:#eff6ff !important; }
  html[data-theme="light"] .comparison-option:has(input:disabled) { background:#e2e8f0 !important; color:#526174 !important; opacity:1 !important; cursor:not-allowed; }
  html[data-theme="light"] .comparison-card { border-color:var(--light-border) !important; background:#ffffff !important; }
  html[data-theme="light"] .comparison-card-header { border-color:var(--light-border) !important; background:#e8eef6 !important; }
  html[data-theme="light"] .comparison-card-header strong { color:var(--light-text) !important; }
  html[data-theme="light"] .comparison-card-header span { color:var(--light-muted) !important; }
  html[data-theme="light"] .comparison-text-output { background:var(--light-soft) !important; color:var(--light-text) !important; }
  html[data-theme="light"] .comparison-spectrum { border-color:var(--light-border) !important; background:#ffffff !important; }
  html[data-theme="light"] .comparison-spectrum h4 { color:var(--light-text) !important; }
  html[data-theme="light"] .comparison-spectrum .molecule-spectrum-summary { color:var(--light-secondary) !important; }
  html[data-theme="light"] .comparison-molecule-input:disabled { background:#e9eff6 !important; color:var(--light-text) !important; opacity:1 !important; }

  /* 5. Site Admin */
  html[data-theme="light"] .site-admin-tabs { padding:6px; border:1px solid var(--light-border) !important; border-radius:11px; background:#e8eef6 !important; }
  html[data-theme="light"] .site-admin-tab-btn {
    border:1px solid #b8c5d6 !important;
    background:#dbe4ef !important;
    color:#1e293b !important;
  }
  html[data-theme="light"] .site-admin-tab-btn:hover { background:#cbd5e1 !important; }
  html[data-theme="light"] .site-admin-tab-btn.active {
    border-color:#2563eb !important;
    background:#2563eb !important;
    color:#ffffff !important;
  }
  html[data-theme="light"] .site-admin-summary-card span,
  html[data-theme="light"] .site-admin-user-count,
  html[data-theme="light"] .site-admin-note { color:var(--light-secondary) !important; }
  html[data-theme="light"] .site-admin-summary-card strong { color:var(--light-text) !important; }
  html[data-theme="light"] .site-admin-field,
  html[data-theme="light"] .site-admin-checkbox-row,
  html[data-theme="light"] .site-admin-class-option,
  html[data-theme="light"] .site-admin-selected-note { color:var(--light-secondary) !important; }
  html[data-theme="light"] .site-admin-card h3,
  html[data-theme="light"] .site-admin-class-picker-head { border-color:var(--light-border) !important; color:var(--light-text) !important; }
  html[data-theme="light"] .site-admin-sort-btn { background:transparent !important; color:#334155 !important; }
  html[data-theme="light"] .site-admin-sort-btn.active { color:#1d4ed8 !important; }
  html[data-theme="light"] .site-admin-pill { border-color:#b8c5d6 !important; background:#e8eef6 !important; color:#334155 !important; }
  html[data-theme="light"] .site-admin-temp-password,
  html[data-theme="light"] .site-admin-output { border-color:var(--light-border) !important; background:var(--light-soft) !important; color:var(--light-text) !important; }

  /* 6. Molecule information, including Uses and Safety */
  html[data-theme="light"] .molecule-info-body { color:var(--light-text) !important; }
  html[data-theme="light"] .molecule-info-card,
  html[data-theme="light"] .molecule-info-field,
  html[data-theme="light"] .molecule-info-property,
  html[data-theme="light"] .molecule-primary-hazards-field,
  html[data-theme="light"] .molecule-spectrum-display,
  html[data-theme="light"] .molecule-analysis-content {
    border-color:var(--light-border) !important;
    background:#ffffff !important;
    color:var(--light-text) !important;
  }
  html[data-theme="light"] .molecule-info-card h3,
  html[data-theme="light"] .molecule-info-card-heading,
  html[data-theme="light"] .molecule-primary-hazards-field .molecule-info-label { border-color:var(--light-border) !important; }
  html[data-theme="light"] .molecule-info-label,
  html[data-theme="light"] .molecule-info-ref,
  html[data-theme="light"] .molecule-info-disclaimer,
  html[data-theme="light"] .molecule-spectrum-helper,
  html[data-theme="light"] .molecule-3d-note,
  html[data-theme="light"] .molecule-spectrum-note,
  html[data-theme="light"] .molecule-spectrum-summary { color:var(--light-secondary) !important; }
  html[data-theme="light"] .molecule-info-text,
  html[data-theme="light"] .molecule-info-list,
  html[data-theme="light"] .molecule-info-list li,
  html[data-theme="light"] .molecule-spectrum-source,
  html[data-theme="light"] .molecule-spectrum-source p,
  html[data-theme="light"] .molecule-info-property strong,
  html[data-theme="light"] .molecule-info-property-value,
  html[data-theme="light"] .molecule-info-value,
  html[data-theme="light"] .molecule-analysis-content { color:var(--light-text) !important; opacity:1 !important; }
  html[data-theme="light"] .molecule-info-link,
  html[data-theme="light"] .molecule-info-value a,
  html[data-theme="light"] .molecule-info-ref a,
  html[data-theme="light"] .molecule-info-links a { color:#1d4ed8 !important; }
  html[data-theme="light"] .molecule-info-link { border-color:var(--light-border) !important; background:#eff6ff !important; }
  html[data-theme="light"] button.molecule-viewer-theme-btn,
  html[data-theme="light"] button.molecule-viewer-control-btn,
  html[data-theme="light"] button.molecule-spectrum-toggle-btn { border-color:var(--light-border) !important; background:#e2e8f0 !important; color:var(--light-text) !important; }
  html[data-theme="light"] button.molecule-viewer-theme-btn.active,
  html[data-theme="light"] button.molecule-viewer-control-btn.active,
  html[data-theme="light"] button.molecule-spectrum-toggle-btn.active { border-color:#2563eb !important; background:#2563eb !important; color:#ffffff !important; }
  html[data-theme="light"] .molecule-ghs-icon { color:var(--light-secondary) !important; }
  html[data-theme="light"] .molecule-spectrum-svg-wrap,
  html[data-theme="light"] .molecule-spectrum-svg-wrap svg { background:#ffffff !important; }

  /* Teacher/account/admin supporting areas found during the wider audit. */
  html[data-theme="light"] .account-manage-empty,
  html[data-theme="light"] .teacher-empty,
  html[data-theme="light"] .teacher-attempt-json,
  html[data-theme="light"] .teacher-attempt-analysis-step-body,
  html[data-theme="light"] .teacher-attempt-analysis-step-answer {
    border-color:var(--light-border) !important;
    background:var(--light-soft) !important;
    color:var(--light-secondary) !important;
  }
  html[data-theme="light"] .teacher-attempt-analysis-step-header { border-color:var(--light-border) !important; background:#e8eef6 !important; }
  html[data-theme="light"] .teacher-attempt-analysis-step-title p { color:var(--light-secondary) !important; }
  html[data-theme="light"] .teacher-attempt-analysis-step-status { color:var(--light-amber) !important; }
  html[data-theme="light"] .account-password-flag { background:#fef3c7 !important; color:var(--light-amber) !important; }
  html[data-theme="light"] .quiz-reset-zone { border-color:#fca5a5 !important; background:#fff7f7 !important; }
  html[data-theme="light"] .quiz-reset-zone p { color:var(--light-secondary) !important; }
  html[data-theme="light"] .quiz-reset-confirmation { background:#fef2f2 !important; color:var(--light-red) !important; }

  /* Text selection and keyboard focus remain visible on pale surfaces. */
  html[data-theme="light"] ::selection { background:#bfdbfe; color:#0f172a; }
  html[data-theme="light"] :focus-visible { outline-color:#2563eb; }
