/* R6 module-scoped presentation. No hex literals; shared tokens only.
 * Every rule is scoped to .r6-page. NOTHING in tokens.css, app.css or print.css is
 * modified or extended, so the U-4 shared-token regression item is not triggered by
 * this module. The narrow-width table and choice-control patterns are carried over
 * from the corrected R5 rules, because those corrections were made for defects found
 * only in a real browser and R6 renders the same structures. */

.r6-page .fine-meta { color: var(--fine-muted); font-size: var(--fine-step--1); }
.r6-page .fine-note { border-left: 3px solid var(--fine-rule); padding-left: var(--fine-space-3); }

.r6-page table { width: 100%; border-collapse: collapse; }
.r6-page th, .r6-page td { text-align: left; padding: var(--fine-space-2); border-bottom: 1px solid var(--fine-rule); }
.r6-page th[scope="col"] { font-weight: 600; }

/* Learner choice controls: each option is its own flex row at all widths, so a long
   option label cannot swallow the control that follows it. Native radio and checkbox
   semantics and keyboard operation are unchanged; presentation only. */
.r6-page .r6-choice {
  display: flex;
  align-items: flex-start;
  gap: var(--fine-space-2);
  margin: var(--fine-space-2) 0;
}
.r6-page .r6-choice input {
  flex: 0 0 auto;
  margin-top: 0.35em;
}

/* Current-Law slots. Availability is carried by TEXT inside the slot, never by colour
   or by the border alone: [data-available] is a hook for testing and for structure,
   not the means by which a learner learns the statement is unavailable. */
.r6-page [data-role="law-slot"] {
  border-left: 3px solid var(--fine-rule);
  padding-left: var(--fine-space-3);
  margin: var(--fine-space-3) 0;
}
.r6-page [data-role="withheld"] { margin-top: var(--fine-space-2); }
.r6-page [data-role="withheld-heading"] { font-weight: 600; }
.r6-page [data-role="law-name"] { font-weight: 600; }
.r6-page [data-role="law-provenance"] { font-size: var(--fine-step--1); color: var(--fine-muted); }

/* Activity gate and structural gate blocks read as text in every path. */
.r6-page [data-role="activity-gate"],
.r6-page [data-role="current-law-gate"] {
  border: 1px solid var(--fine-rule);
  padding: var(--fine-space-3);
  margin: var(--fine-space-3) 0;
}
.r6-page [data-role="case-banner"] { font-weight: 600; }
.r6-page [data-role="transition-notice"] { font-weight: 600; }

.r6-page [data-role="artifact"] { margin: var(--fine-space-4) 0; }
.r6-page [data-role="case-role-banner"] { font-weight: 600; }
.r6-page [data-role="plain-text-output"] { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 40rem) {
  .r6-page table, .r6-page tbody, .r6-page tr, .r6-page td { display: block; width: 100%; }
  /* Row headers must not stack away; the first-column label must survive reflow. */
  .r6-page th[scope="row"] { display: block; width: 100%; font-weight: 600; }
  .r6-page thead { position: absolute; left: -9999px; }
  .r6-page td::before { content: attr(data-label) " "; font-weight: 600; }
  /* Narrow-width caption protection: with the table set to display: block the caption
     otherwise shrinks to min-content and wraps to about one word per line. */
  .r6-page table caption {
    display: block;
    width: 100%;
    max-width: none;
    text-align: left;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }
}
