/* The approved Reading check palette, scoped to student exams and light mode. */
:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) {
  --bg: #fbfcfc;
  --bg-alt: #eef2f1;
  --card: #ffffff;
  --card-strong: #ffffff;
  --text: #242729;
  --muted: #676d72;
  --quiet: #737b7e;
  --border: #dce0e1;
  --border-strong: #c5cdcb;
  --gold: #e9bf54;
  --gold-dark: #907021;
  --gold-soft: #faf6e9;
  --workspace-canvas: var(--bg);
  --workspace-surface: var(--card);
  --workspace-line: var(--border);
  --workspace-gold-ink: var(--gold-dark);
  --accent-violet: #a5bcb3;
  --accent-violet-soft: transparent;
  --accent-violet-rim: #dce0e1;
  --accent-violet-glow: transparent;
  --accent-gradient: #e9bf54;
  --accent-gradient-hover: #e1b546;
  --accent-outline-gradient: #dce0e1;
  --accent-outline-glow: none;
  --button-gold-fill: #e9bf54;
  --button-gold-fill-hover: #e1b546;
  --gold-violet-soft: #faf6e9;
  --gold-violet-active: #faf6e9;
  --focus-ring: 0 0 0 2px #907021;
  --shadow: 0 16px 48px #2130320a;
  --shadow-soft: none;
  --mock-card-untaken-bg: #ffffff;
  --mock-card-untaken-hover-bg: #f5f8f6;
  --mock-card-untaken-border: #dce0e1;
  --mock-card-taken-bg: #f0f5f3;
  --mock-card-taken-hover-bg: #e9f1ed;
  --mock-card-taken-border: #bfcec5;
  --mock-card-icon-bg: #f0f5f3;
  color-scheme: light;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

:root:not([data-theme="dark"]) #app .student-exam-workspace { background: var(--bg); }
:root:not([data-theme="dark"]) #app .student-exam-dialog { background: #24272955; }

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(h1, h2, h3, h4, .eyebrow, .qb-filter-control > span) {
  letter-spacing: 0;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .top-nav::before,
:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.app-sidebar, .mobile-drawer-panel, .profile-popover) {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: var(--shadow);
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .app-sidebar::before {
  background: transparent;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.card, .stat-card, .strategy-modal, .reading-history-card, .reading-mode-card, .fluency-select-popover, .speaking-review-card) {
  background: var(--card);
  border-color: var(--border);
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: none;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.reading-start-card, .reading-question-panel, .writing-editor-panel, .qb-question-card, .sat-results-summary, .sat-breakdown-card, .sat-review-list-card, .sat-review-detail-card) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* Exam start dialogs live outside the app frame, unlike inline start screens. */
:root:not([data-theme="dark"]) #app .student-exam-dialog .reading-start-card {
  background: #ffffff;
  border-color: var(--border);
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.reading-passage-panel, .writing-task-panel, .sat-text-block, .sat-notes-list, .act-passage-panel, .speaking-prompt-card, .listening-transcript-box) {
  background: #f0f5f3;
  border: 1px solid #dbe3df;
  border-radius: 8px;
  box-shadow: none;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .sat-passage-text {
  padding: 24px;
  border: 1px solid #dbe3df;
  border-radius: 8px;
  background: #f0f5f3;
}

/* Paired passages and ACT already have a mint parent; do not nest another panel. */
:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.sat-text-block, .act-passage-panel) .sat-passage-text {
  padding: 0;
  border: 0;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.reading-passage-text, .writing-prompt-box p:not(.eyebrow), .listening-transcript-lines, .sat-notes-list) {
  color: #46524d;
  font-size: 16px;
  line-height: 1.85;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .reading-passage-text p {
  margin: 0;
  line-height: inherit;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.reading-question-group, .reading-question-item, .writing-prompt-box, .writing-helper-card, .sat-review-question, .speaking-cue-card) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .reading-question-stack { gap: 28px; }
:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .reading-question-group { gap: 20px; }
:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .reading-question-item { gap: 12px; }

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.reading-passage-panel h2, .writing-task-head h2, .sat-stimulus-stack h2, .reading-question-panel h2, .speaking-cue-card h2) {
  color: var(--text);
  font-size: 21px;
  line-height: 1.4;
  font-weight: 650;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .speaking-prompt-text {
  font-size: 28px;
  font-weight: 650;
  line-height: 1.45;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .reading-choice {
  min-height: 48px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  box-shadow: none;
  font-size: 15px;
  line-height: 1.6;
  transform: none;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .reading-choice span { line-height: inherit; }
:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .reading-choice strong { color: var(--gold-dark); }

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .reading-choice:hover:not(:disabled):not(.active):not(.correct):not(.incorrect):not(.selected) {
  border-color: #b5c5bd;
  background: #f5f8f6;
  transform: none;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.reading-choice.active, .filter-pill.active, .sat-question-pill.active, .sat-review-row.active) {
  border-color: #b89541;
  background: #faf6e9;
  color: var(--text);
  box-shadow: none;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.btn-secondary, .filter-pill:not(.active), .fluency-select-trigger, .text-input, .textarea, .select-input, .listening-audio-player, .listening-audio-btn, .writing-image-card) {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.btn-primary, .listening-audio-btn.primary) {
  background: var(--gold);
  border-color: #d9ae45;
  color: #28241c;
  box-shadow: inset 0 1px 0 #ffffff55;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .btn-primary:hover:not(:disabled) {
  background: #e1b546;
  box-shadow: none;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.btn, .listening-audio-btn):disabled {
  background: #e9edeb;
  border-color: #dce0e1;
  color: #747d78;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.timer-pill, .tiny-pill, .reading-primary-type-pill) {
  background: #eef2f1;
  border-color: var(--border);
  color: #56615b;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.timer-pill.warning, .reading-alert) {
  background: #faf6e9;
  border-color: #dac58e;
  color: #725716;
}

/* Feedback overrides selection colors, including disabled answer-review buttons. */
:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.reading-choice.correct, .reading-question-correct, .qb-feedback-card.correct) {
  background: #edf7f0;
  border-color: #8fbea0;
  color: #22633c;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.reading-choice.incorrect, .sat-review-choice.selected:not(.correct), .reading-question-incorrect, .qb-feedback-card.incorrect) {
  background: #fff1ef;
  border-color: #d9aaa4;
  color: #963e35;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .reading-question-unanswered {
  background: #faf6e9;
  color: #725716;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.reading-question-correct, .reading-question-incorrect, .reading-question-unanswered) {
  padding: 12px;
  border-radius: 8px;
}

:root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(button, a, input, textarea, select, summary):focus-visible {
  outline: 2px solid #907021;
  outline-offset: 3px;
  box-shadow: none;
}

@media (max-width: 820px) {
  :root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.reading-passage-panel, .writing-task-panel, .sat-passage-text, .speaking-prompt-card) { padding: 20px; }
  :root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) :is(.reading-question-panel, .writing-editor-panel, .qb-question-card) { padding: 4px; }
  :root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .reading-choice { padding: 12px; }
  :root:not([data-theme="dark"]) #app :is(.student-exam-workspace, .student-exam-dialog) .speaking-prompt-text { font-size: 23px; }
}
