/* 100MCQs — shared Practice Quiz runtime styles (UI-FIX-Q1, 23 Nov 2026).
   Quiz option and review nodes are created at runtime by JavaScript, so
   Astro's scoped page styles never reach them. These rules are global on
   purpose; every selector is fenced inside #panel-quiz so nothing outside
   the quiz panel is affected. Values mirror the unit pages' own quiz design,
   raised to the brief minimums: option min-height 48px, padding >= 12px,
   font >= 16px, border 1.5px, radius 12px. Correct/wrong never rely on
   colour alone: a ✓ / ✗ marker is appended as text. */

#panel-quiz .opts { display: grid; gap: 10px; counter-reset: optletter; }
#panel-quiz .opt { text-align: left; width: 100%; box-sizing: border-box; cursor: pointer; background: #fbfcfe; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 16px; font-size: 16px; font-family: inherit; color: var(--ink); display: flex; gap: 12px; align-items: center; min-height: 48px; }
@media (hover: hover) and (pointer: fine) {
  #panel-quiz .opt:not(.locked):hover { border-color: var(--brand); }
}
#panel-quiz .opt:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
#panel-quiz .opt .letter { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: #eef2f7; color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
#panel-quiz .opt.sel { border-color: var(--brand); background: #eef2f7; }
#panel-quiz .opt.correct { border-color: var(--good); background: var(--good-bg); }
#panel-quiz .opt.correct .letter { background: var(--good); color: #fff; }
#panel-quiz .opt.correct::after { content: "✓"; margin-left: auto; color: var(--good); font-weight: 800; }
#panel-quiz .opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
#panel-quiz .opt.wrong .letter { background: var(--bad); color: #fff; }
#panel-quiz .opt.wrong::after { content: "✗"; margin-left: auto; color: var(--bad); font-weight: 800; }
#panel-quiz .opt.locked { cursor: default; }
#panel-quiz .opt[disabled] { cursor: default; opacity: 1; }

/* Class 7 Unit 5 (all-at-once layout): each option is a <label class="opt">
   wrapping its radio — stacked cards, one per line, letter badge via counter,
   the checked card is the selected state. */
#panel-quiz label.opt { min-height: 44px; }
#panel-quiz label.opt::before { counter-increment: optletter; content: counter(optletter, upper-alpha); flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: #eef2f7; color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
#panel-quiz label.opt:has(input:checked) { border-color: var(--brand); background: #eef2f7; }
#panel-quiz label.opt.correct::before { background: var(--good); color: #fff; }
#panel-quiz label.opt.wrong::before { background: var(--bad); color: #fff; }
#panel-quiz .opt input[type="radio"] { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--brand); margin: 0; }

/* Review list and result card (review rows are runtime-created). */
#panel-quiz .review { margin-top: 22px; display: grid; gap: 12px; }
#panel-quiz .review .item { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fbfcfe; }
#panel-quiz .review .item .rq { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
#panel-quiz .review .item .ra { font-size: 14px; color: var(--good); font-weight: 600; }
#panel-quiz .review .item .ry { font-size: 14px; color: var(--bad); }
#panel-quiz .score-big { font-size: 44px; font-weight: 800; text-align: center; }
#panel-quiz .score-msg { text-align: center; color: var(--muted); margin-bottom: 6px; }
#panel-quiz .score-stats { text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 20px; }

/* A11Y-01 / F16: after Check Answers, the correct/wrong state must beat the
   :has(:checked) selected style on the student's chosen label. */
#panel-quiz label.opt.correct:has(input:checked) { border-color: var(--good); background: var(--good-bg); }
#panel-quiz label.opt.wrong:has(input:checked) { border-color: var(--bad); background: var(--bad-bg); }
