/* R5 module-scoped presentation. No hex literals; shared tokens only. */
.r5-page .fine-meta { color: var(--fine-muted); font-size: var(--fine-step--1); }
.r5-page .fine-note { border-left: 3px solid var(--fine-rule); padding-left: var(--fine-space-3); }
.r5-page table { width: 100%; border-collapse: collapse; }
.r5-page th, .r5-page td { text-align: left; padding: var(--fine-space-2); border-bottom: 1px solid var(--fine-rule); }
.r5-page th[scope="col"] { font-weight: 600; }
/* Learner choice controls.
   Radio and checkbox options previously rendered inline, so the next control appeared
   mid-sentence inside the preceding option's text. Each choice is now its own flex row:
   the input sits beside the START of its own label and long text wraps under the text.
   Applied at ALL widths because separate option rows read better on desktop too.
   Native radio/checkbox semantics and keyboard operation are unchanged - this is
   presentation only, with no change to markup structure, name grouping, or ids. */
.r5-page .r5-choice {
  display: flex;
  align-items: flex-start;
  gap: var(--fine-space-2);
  margin: var(--fine-space-2) 0;
}
.r5-page .r5-choice input {
  flex: 0 0 auto;
  margin-top: 0.35em;
}

@media (max-width: 40rem) {
  .r5-page table, .r5-page tbody, .r5-page tr, .r5-page td { display: block; width: 100%; }
  /* row headers must NOT stack away - first-column label must survive reflow */
  .r5-page th[scope="row"] { display: block; width: 100%; font-weight: 600; }
  .r5-page thead { position: absolute; left: -9999px; }
  .r5-page td::before { content: attr(data-label) " "; font-weight: 600; }
  /* Narrow-width caption protection.
     The rule above sets the table to display: block, which leaves the caption as
     display: table-caption inside a block parent. It then shrinks to min-content and
     wraps to roughly one word per line while the rows use the full width.
     Making the caption a full-width block restores normal wrapping. */
  .r5-page table caption {
    display: block;
    width: 100%;
    max-width: none;
    text-align: left;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }
}
