/* Kimi K3 course — retrieval practice widget styles. Pairs with quiz.js. */

.quiz {
  background: #fbfaf2;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.3rem 1.5rem;
  margin: 2.2rem 0;
}

.quiz .q {
  font-weight: 600;
  margin: 0 0 0.9rem;
  font-size: 1rem;
}

.quiz .q::before {
  content: "Recall";
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.quiz .options {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quiz .options li {
  position: relative;
  margin: 0 0 0.45rem;
  padding: 0.6rem 0.85rem 0.6rem 2.3rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.45;
  transition: border-color 0.12s, background 0.12s;
}

/* a. b. c. markers, generated so option order can shuffle freely */
.quiz .options { counter-reset: opt; }
.quiz .options li::before {
  counter-increment: opt;
  content: counter(opt, lower-alpha) ".";
  position: absolute;
  left: 0.85rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.quiz .options li:hover:not(.locked) {
  border-color: var(--seq);
  background: var(--seq-bg);
}

.quiz .options li:focus-visible {
  outline: 2px solid var(--seq);
  outline-offset: 1px;
}

.quiz .options li.locked { cursor: default; }

/* Correct answer, always revealed once answered */
.quiz .options li.is-answer {
  border-color: var(--vision);
  background: var(--vision-bg);
}
.quiz .options li.is-answer::after {
  content: "correct";
  float: right;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--vision);
  margin-left: 0.7rem;
}

/* What the learner actually picked */
.quiz .options li.picked-wrong {
  border-color: var(--warn);
  background: var(--warn-bg);
}
.quiz .options li.picked-wrong::after {
  content: "your pick";
  float: right;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--warn);
  margin-left: 0.7rem;
}
.quiz .options li.picked-right::after { content: "correct \00b7 your pick"; }

.quiz .explain,
.quiz .correction {
  display: none;
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
  padding-left: 0.9rem;
  border-left: 2px solid var(--rule);
}

.quiz .explain.shown { display: block; }

.quiz .correction {
  display: block;
  border-left-color: var(--warn);
  color: var(--ink-soft);
}

@media print {
  .quiz { background: #fff; page-break-inside: avoid; }
  .quiz .options li { cursor: default; }
  .quiz .options li.is-answer { background: #fff; border-color: var(--ink-soft); }
  .quiz .options li.is-answer::after { content: "\2713"; }
  .quiz .explain { display: block; }
}

/* Screen-reader announcement of the outcome. Visually hidden because the
   same information is conveyed on screen by colour and the ::after labels,
   which assistive tech does not read. */
.quiz-live {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Colour is never the only cue. The ::after labels already carry a text
   verdict ("correct" / "your pick"); prefix a glyph so the distinction also
   survives greyscale printing and colour-vision differences. The a/b/c
   counters on ::before are left untouched. */
.quiz .options li.is-answer::after    { content: "\2713 correct"; }
.quiz .options li.picked-right::after { content: "\2713 correct \00b7 your pick"; }
.quiz .options li.picked-wrong::after { content: "\00d7 your pick"; }
