/* ==========================================================================
   MCCQE Mock Exam — stylesheet
   No frameworks, no build step. Light and dark themes via CSS custom
   properties; the palette is tuned for long reading sessions.
   ========================================================================== */

:root {
  --teal-50:  #f0fdfa;  --teal-100: #ccfbf1; --teal-300: #5eead4;
  --teal-500: #14b8a6;  --teal-600: #0d9488; --teal-700: #0f766e; --teal-900: #134e4a;

  --bg:            #f6f7f9;
  --bg-elevated:   #ffffff;
  --bg-sunken:     #eef1f4;
  --border:        #dde2e8;
  --border-strong: #c3ccd6;
  --text:          #16202b;
  --text-muted:    #5b6976;
  --text-faint:    #8996a3;

  --accent:        var(--teal-700);
  --accent-hover:  var(--teal-600);
  --accent-soft:   var(--teal-50);
  --accent-ring:   rgba(13, 148, 136, .35);

  --correct:       #0f7b3f;
  --correct-bg:    #e8f7ee;
  --correct-border:#9ad9b4;
  --wrong:         #b32020;
  --wrong-bg:      #fdeceb;
  --wrong-border:  #f0b0ac;
  --warn:          #9a6300;
  --warn-bg:       #fdf5e3;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow:    0 4px 12px rgba(16, 24, 40, .07), 0 2px 4px rgba(16, 24, 40, .05);
  --shadow-lg: 0 18px 40px rgba(16, 24, 40, .12);

  --wrap: 860px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  --bg:            #0f1620;
  --bg-elevated:   #172231;
  --bg-sunken:     #111a25;
  --border:        #26364a;
  --border-strong: #3a4d66;
  --text:          #e7edf4;
  --text-muted:    #9db0c4;
  --text-faint:    #71879e;

  --accent:        var(--teal-300);
  --accent-hover:  var(--teal-100);
  --accent-soft:   rgba(20, 184, 166, .13);
  --accent-ring:   rgba(94, 234, 212, .4);

  --correct:       #67dd9b;
  --correct-bg:    rgba(21, 128, 61, .18);
  --correct-border:rgba(103, 221, 155, .45);
  --wrong:         #ff9b93;
  --wrong-bg:      rgba(179, 32, 32, .18);
  --wrong-border:  rgba(255, 155, 147, .4);
  --warn:          #f0c469;
  --warn-bg:       rgba(154, 99, 0, .18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 4px 14px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, .55);
}

/* --------------------------------------------------------------- base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.015em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

code, kbd, pre { font-family: var(--mono); font-size: .875em; }
code { background: var(--bg-sunken); padding: .1em .4em; border-radius: 5px; }
pre  { background: var(--bg-sunken); padding: .75rem 1rem; border-radius: var(--radius-sm); overflow-x: auto; }
pre code { background: none; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.is-hidden { display: none !important; }

/* ------------------------------------------------------------- header ---- */
.app-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 62px;
}
.brand { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
}
html[data-theme="dark"] .brand-mark { color: #06231f; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: .98rem; letter-spacing: -.01em; }
.brand-text small { color: var(--text-muted); font-size: .76rem; line-height: 1.2; }
.header-actions { display: flex; gap: .4rem; align-items: center; flex: none; }

/* ----------------------------------------------------------- progress ---- */
.progress-rail {
  position: sticky; top: 62px; z-index: 15;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: .6rem 0 .55rem;
}
.progress-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; font-size: .84rem; margin-bottom: .45rem;
}
#progress-count { font-weight: 650; letter-spacing: -.01em; }
.progress-stats { display: flex; gap: .4rem; }
.chip {
  padding: .1rem .5rem; border-radius: 999px; font-size: .76rem;
  font-weight: 600; border: 1px solid transparent; white-space: nowrap;
}
.chip-correct { color: var(--correct); background: var(--correct-bg); border-color: var(--correct-border); }
.chip-wrong   { color: var(--wrong);   background: var(--wrong-bg);   border-color: var(--wrong-border); }

.progress-track {
  height: 6px; background: var(--bg-sunken); border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0; background: var(--accent); border-radius: 999px;
  transition: width .3s ease;
}

/* --------------------------------------------------------------- main ---- */
main { flex: 1; padding: 2rem 20px 3.5rem; outline: none; }
.screen { animation: rise .25s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.page-head { margin-bottom: 1.5rem; }
.lede { color: var(--text-muted); font-size: 1rem; max-width: 62ch; }

/* -------------------------------------------------------------- states --- */
.state-block {
  text-align: center; padding: 3.5rem 1rem; max-width: 34rem; margin: 0 auto;
}
.state-icon {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 1rem;
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 700;
  background: var(--bg-sunken); color: var(--text-muted);
}
.state-error .state-icon { background: var(--wrong-bg); color: var(--wrong); }
.state-title { font-size: 1.15rem; margin-bottom: .4rem; }
.state-text  { color: var(--text-muted); }
.hint { text-align: left; margin: 1.25rem 0; font-size: .9rem; }
.hint summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.hint[open] summary { margin-bottom: .6rem; }

.spinner {
  width: 34px; height: 34px; margin: 0 auto 1.1rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ buttons ---- */
.btn {
  font: inherit; font-weight: 600; font-size: .92rem;
  padding: .6rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  transition: background .15s, border-color .15s, color .15s, transform .06s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--accent); color: #fff; }
html[data-theme="dark"] .btn-primary { color: #06231f; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-secondary {
  background: var(--bg-elevated); color: var(--text); border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-sunken); color: var(--text); }

.btn-sm { padding: .35rem .7rem; font-size: .84rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1rem; }
.btn-back {
  background: none; border: none; color: var(--text-muted); font: inherit;
  font-size: .88rem; font-weight: 600; cursor: pointer;
  padding: .3rem 0; margin-bottom: .9rem;
}
.btn-back:hover { color: var(--accent); }

@media (max-width: 420px) { .btn-label { display: none; } }

/* -------------------------------------------------------- exam select ---- */
.stat-strip {
  display: flex; flex-wrap: wrap; gap: .5rem 1.6rem;
  padding: .85rem 1.1rem; margin-bottom: 1.6rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  font-size: .86rem; color: var(--text-muted);
}
.stat-strip b { color: var(--text); font-size: 1rem; }
.stat-strip span { display: flex; align-items: baseline; gap: .35rem; }

.exam-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
@media (min-width: 620px) { .exam-grid { grid-template-columns: 1fr 1fr; } }

.exam-card {
  position: relative; display: flex; flex-direction: column; gap: .35rem;
  width: 100%; text-align: left; font: inherit; cursor: pointer;
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .12s, border-color .18s;
}
.exam-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.exam-card[data-accent="indigo"] { border-left-color: #6366f1; }
.exam-card[data-accent="amber"]  { border-left-color: #d97706; }
.exam-card[data-accent="rose"]   { border-left-color: #e11d48; }
.exam-card[data-accent="violet"] { border-left-color: #8b5cf6; }
.exam-card[data-accent="cyan"]   { border-left-color: #0891b2; }

.exam-card h2 { font-size: 1.05rem; margin: 0; }
.exam-tagline { color: var(--accent); font-size: .8rem; font-weight: 600; }
.exam-desc { color: var(--text-muted); font-size: .88rem; margin: .2rem 0 .6rem; }
.exam-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem; color: var(--text-faint); font-weight: 600;
}

/* --------------------------------------------------------- config form --- */
.config-form { display: grid; gap: 1.1rem; }

.field-group {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elevated); padding: 1.1rem 1.2rem; margin: 0;
  box-shadow: var(--shadow-sm);
}
.field-group > legend, .legend-like {
  font-weight: 650; font-size: .95rem; padding: 0 .4rem; margin-left: -.4rem;
}
.field-group-collapsible > summary {
  cursor: pointer; font-weight: 650; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; list-style-position: inside;
}
.field-group-collapsible[open] > summary { margin-bottom: .8rem; }
.field-note { color: var(--text-muted); font-size: .82rem; font-weight: 400; }

.segmented { display: flex; flex-wrap: wrap; gap: .45rem; margin: .3rem 0 .5rem; }
.segmented button {
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  padding: .45rem .95rem; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text-muted);
  transition: all .15s;
}
.segmented button:hover { border-color: var(--accent); color: var(--accent); }
.segmented button[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
html[data-theme="dark"] .segmented button[aria-pressed="true"] { color: #06231f; }

.topic-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .7rem;
}
.search-box input {
  font: inherit; font-size: .87rem; padding: .35rem .7rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); min-width: 11rem;
}

.checkbox-grid { display: grid; gap: .35rem; }
@media (min-width: 560px) { .checkbox-grid { grid-template-columns: 1fr 1fr; } }
.checkbox-grid-dense { max-height: 17rem; overflow-y: auto; padding-right: .3rem; }
.checkbox-grid-inline { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }

.check-row {
  display: flex; align-items: center; gap: .55rem;
  padding: .4rem .55rem; border-radius: var(--radius-sm);
  cursor: pointer; font-size: .9rem; transition: background .12s;
}
.check-row:hover { background: var(--bg-sunken); }
.check-row input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; cursor: pointer; }
.check-row .row-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row .row-count { color: var(--text-faint); font-size: .78rem; font-variant-numeric: tabular-nums; }
.check-row input:disabled + .row-label { color: var(--text-faint); }

.switch-row {
  display: flex; align-items: flex-start; gap: .7rem; padding: .5rem 0; cursor: pointer;
}
.switch-row input { width: 18px; height: 18px; margin-top: .18rem; accent-color: var(--accent); flex: none; }
.switch-row span { display: flex; flex-direction: column; font-size: .92rem; }
.switch-row small { color: var(--text-muted); font-size: .82rem; }

.config-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.config-summary { color: var(--text-muted); font-size: .88rem; margin: 0; }

/* ------------------------------------------------------------ question --- */
.question-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 520px) { .question-card { padding: 1.15rem; border-radius: var(--radius); } }

.question-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.pill {
  font-size: .74rem; font-weight: 650; letter-spacing: .02em;
  padding: .2rem .6rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid transparent;
}
.pill-quiet { background: var(--bg-sunken); color: var(--text-muted); text-transform: capitalize; }

.question-text {
  font-size: 1.12rem; font-weight: 550; line-height: 1.55;
  margin: 0 0 1.3rem; letter-spacing: -.005em;
}

.options { border: none; margin: 0; padding: 0; display: grid; gap: .55rem; }

.option {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: .85rem 1rem; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elevated);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.option:hover:not(.is-locked) { border-color: var(--border-strong); background: var(--bg-sunken); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option:focus-within { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

.option-key {
  flex: none; width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center;
  font-size: .82rem; font-weight: 700;
  background: var(--bg-sunken); color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all .15s;
}
.option-text { flex: 1; font-size: .95rem; line-height: 1.5; }

.option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.option.is-selected .option-key { background: var(--accent); color: #fff; border-color: var(--accent); }
html[data-theme="dark"] .option.is-selected .option-key { color: #06231f; }

.option.is-locked { cursor: default; }
.option.is-correct {
  border-color: var(--correct-border); background: var(--correct-bg);
}
.option.is-correct .option-key { background: var(--correct); color: #fff; border-color: var(--correct); }
.option.is-incorrect { border-color: var(--wrong-border); background: var(--wrong-bg); }
.option.is-incorrect .option-key { background: var(--wrong); color: #fff; border-color: var(--wrong); }
.option.is-muted { opacity: .62; }

.option-mark { margin-left: auto; font-weight: 700; font-size: 1rem; flex: none; }
.option.is-correct   .option-mark { color: var(--correct); }
.option.is-incorrect .option-mark { color: var(--wrong); }

/* ------------------------------------------------------------ feedback --- */
.feedback {
  margin-top: 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-sunken);
  overflow: hidden; animation: rise .22s ease both;
}
.feedback-head {
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  padding: .8rem 1.1rem; border-bottom: 1px solid var(--border);
}
.feedback-badge {
  font-weight: 700; font-size: .82rem; letter-spacing: .03em; text-transform: uppercase;
  padding: .22rem .65rem; border-radius: 999px;
}
.feedback.is-correct   .feedback-badge { background: var(--correct); color: #fff; }
.feedback.is-incorrect .feedback-badge { background: var(--wrong); color: #fff; }
.feedback.is-skipped   .feedback-badge { background: var(--warn); color: #fff; }
.feedback-answer { font-size: .9rem; color: var(--text-muted); }
.feedback-answer b { color: var(--text); }

.feedback-body { padding: 1rem 1.1rem 1.1rem; }
.feedback-h {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-faint); margin-bottom: .35rem;
}
.feedback-body p { font-size: .93rem; line-height: 1.62; }

.distractors { margin-top: .9rem; display: grid; gap: .4rem; }
.distractor {
  font-size: .87rem; color: var(--text-muted);
  padding-left: 1.5rem; position: relative; line-height: 1.5;
}
.distractor b { color: var(--text); font-weight: 650; }
.distractor::before {
  content: "×"; position: absolute; left: .35rem; top: -.05rem;
  color: var(--wrong); font-weight: 700;
}

.source-ref {
  margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--border);
  font-size: .82rem; color: var(--text-muted);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .5rem;
}
.source-ref .src-label {
  text-transform: uppercase; letter-spacing: .07em; font-size: .7rem;
  color: var(--text-faint); font-weight: 700;
}
.source-ref .src-doc { font-weight: 650; color: var(--text); }
.source-ref .src-loc {
  font-family: var(--mono); font-size: .78rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  padding: .05rem .45rem; border-radius: 5px;
}

/* ---------------------------------------------------------- action bar --- */
.action-bar {
  position: sticky; bottom: 0; margin-top: 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 0 max(.85rem, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 62%, transparent);
}
.kbd-hint { font-size: .78rem; color: var(--text-faint); }
kbd {
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 5px;
  padding: .05rem .35rem; font-size: .75rem; color: var(--text-muted);
}
.action-buttons { display: flex; gap: .5rem; margin-left: auto; }
@media (max-width: 560px) {
  .kbd-hint { display: none; }
  .action-buttons { width: 100%; }
  .action-buttons .btn { flex: 1; }
}

/* ------------------------------------------------------------- results --- */
.score-panel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.6rem; margin-bottom: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.score-dial { position: relative; width: 140px; height: 140px; flex: none; margin: 0 auto; }
.score-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-track { fill: none; stroke: var(--bg-sunken); stroke-width: 11; }
.dial-value {
  fill: none; stroke: var(--accent); stroke-width: 11; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .9s cubic-bezier(.22, 1, .36, 1);
}
.score-dial.is-pass .dial-value { stroke: var(--correct); }
.score-dial.is-fail .dial-value { stroke: var(--wrong); }
.score-dial-label {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.score-dial-label strong { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; }
.score-dial-label small { color: var(--text-muted); font-size: .82rem; }

.score-facts { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 13rem; display: grid; gap: .1rem; }
.score-facts li {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--border);
}
.score-facts li:last-child { border-bottom: none; }
.score-facts-k { color: var(--text-muted); font-size: .9rem; }
.score-facts-v { font-weight: 700; font-variant-numeric: tabular-nums; }
.text-correct { color: var(--correct); }
.text-wrong   { color: var(--wrong); }

.topic-breakdown { margin-bottom: 1.6rem; }
.breakdown-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.breakdown-row { display: grid; gap: .3rem; }
.breakdown-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; font-size: .89rem;
}
.breakdown-head b { font-weight: 600; }
.breakdown-head span { color: var(--text-muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.breakdown-track { height: 7px; background: var(--bg-sunken); border-radius: 999px; overflow: hidden; }
.breakdown-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s ease; }
.breakdown-fill.is-weak { background: var(--wrong); }
.breakdown-fill.is-mid  { background: var(--warn); }

.results-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }

/* -------------------------------------------------------------- review --- */
.review-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.filter-btn {
  font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer;
  padding: .38rem .9rem; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text-muted);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="dark"] .filter-btn.is-active { color: #06231f; }

.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; counter-reset: rq; }

.review-item {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius); overflow: hidden;
}
.review-item[data-outcome="correct"]   { border-left-color: var(--correct); }
.review-item[data-outcome="incorrect"] { border-left-color: var(--wrong); }
.review-item[data-outcome="skipped"]   { border-left-color: var(--warn); }

.review-summary {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: .95rem 1.1rem; cursor: pointer; list-style: none;
}
.review-summary::-webkit-details-marker { display: none; }
.review-summary:hover { background: var(--bg-sunken); }
.review-num {
  flex: none; font-size: .78rem; font-weight: 700; color: var(--text-faint);
  min-width: 1.6rem; padding-top: .12rem; font-variant-numeric: tabular-nums;
}
.review-q { flex: 1; font-size: .93rem; font-weight: 550; line-height: 1.5; }
.review-outcome { flex: none; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding-top: .18rem; }
.review-item[data-outcome="correct"]   .review-outcome { color: var(--correct); }
.review-item[data-outcome="incorrect"] .review-outcome { color: var(--wrong); }
.review-item[data-outcome="skipped"]   .review-outcome { color: var(--warn); }
.review-body { padding: 0 1.1rem 1.1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.review-body .options { margin-bottom: 1rem; }
.review-body .option { cursor: default; }

/* -------------------------------------------------------------- footer --- */
.app-footer {
  border-top: 1px solid var(--border); background: var(--bg-elevated);
  padding: 1.4rem 0; font-size: .82rem; color: var(--text-muted);
}
.app-footer p { margin-bottom: .4rem; }
.disclaimer { color: var(--text-faint); font-size: .78rem; }

/* ------------------------------------------------------------ a11y prefs -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .app-header, .progress-rail, .action-bar, .results-actions,
  .review-filter, .app-footer, .skip-link { display: none !important; }
  .review-body { display: block !important; }
  body { background: #fff; }
}
