/* THE ROLL'S AIDS : the finder, the folds, the commander jumps, and the
   onward roads of the register chapters and the cardinals' roll.
   KB sitting, 2026-10-04. Additive chrome only : every row, name, number
   and teaching standeth where it stood; the finder foldeth, and clearing
   it restoreth the roll whole; no row is dropped, and none is reworded.
   TEMPLE MARK R3: : roll-family.css */

/* ---- KB1 : the first column mend -----------------------------------------
   The chapters' first column was budgeted at 3rem (2.25rem on phones),
   and the header word "Position" weigheth about 50px of text plus its
   padding : so it brake mid-word into "Pos / itio / n", four to six
   lines deep on every register table. The column is widened to fit the
   word on one line, and the header cell breaketh at word boundaries
   only; the body cells keep their anywhere-wrap, which the long
   commission codes and the long names need. Scoped to the register
   rooms (the chapters and the index); the cardinals' own column budget
   is its own, and the higher-offices table keepeth its own widths. */
body[data-room^="heavenly-register"] .shr-table:not(.shr-higher-table) th:first-child {
  width: 5rem;
}
body[data-room^="heavenly-register"] .shr-table:not(.shr-higher-table) thead th {
  overflow-wrap: break-word;
}
@media (max-width: 48rem) {
  body[data-room^="heavenly-register"] .shr-table:not(.shr-higher-table) th:first-child {
    width: 4.75rem;
  }
}

/* ---- the aids : they stand at the head of the roll, in the flow ----------
   NOT in the sticky band: the band carrieth the rail, and a band grown past
   the viewport breaks every jump (measured 635px of an 844px phone before
   this mend). The aids scroll away with the head of the room. */
.roll-aids {
  max-width: var(--body-max);
  margin: 1.25rem auto 0;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.6rem;
  font: 500 0.8rem/1.4 var(--font-ui);
  color: var(--ink);
}

.roll-finder-label {
  color: var(--brass);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#roll-filter {
  flex: 1 1 12rem;
  min-height: 44px;
  min-width: 12rem;
  padding: 0.35rem 0.75rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm, 6px);
  font: 400 0.9rem/1.4 var(--font-ui);
}
#roll-filter::placeholder { color: var(--bureau); }

.roll-count {
  margin: 0 0 0 auto;
  color: var(--bureau);
  font: 400 0.8rem/1.4 var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.roll-fold-all {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-pill, 999px);
  background: transparent;
  color: var(--brass);
  font: inherit;
  cursor: pointer;
}
.roll-fold-all:hover,
.roll-fold-all:focus-visible { background: rgba(212, 175, 55, 0.12); }

.roll-jump { flex: 1 1 100%; }
.roll-toc {
  max-width: var(--body-max);
  margin: 0.75rem auto 0;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.25rem 0.75rem;
  padding: 0 0 0.15rem;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--brass) var(--surface);
  scrollbar-width: thin;
}
.roll-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.35rem;
  white-space: nowrap;
  color: var(--brass);
}
.roll-toc a:hover,
.roll-toc a:focus-visible { text-decoration: underline; text-underline-offset: 0.3em; }

/* The honesty note standeth for the screen reader; the words also stand
   on the room's own privacy record, which is where a reader findeth them. */
.roll-finder-note {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- the per-commander folds ---------------------------------------------- */
.roll-fold-one {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0.25rem 0 0.5rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-pill, 999px);
  background: transparent;
  color: var(--brass);
  font: 500 0.78rem/1.4 var(--font-ui);
  cursor: pointer;
}
.roll-fold-one:hover,
.roll-fold-one:focus-visible { background: rgba(212, 175, 55, 0.12); }

/* The finder foldeth a non-matching row: hidden, never removed. */
tr.roll-hidden { display: none; }

/* A table whose rows are all folded away is hidden whole : the captain's
   prose abideth, and the count telleth the rest. */
.table-scroll.roll-empty { display: none; }

/* ---- the onward journey : provisional voice, KC's onward.css supersedes ----
   The block's structure and class names are fixed by KC's spec v1.0
   (docs/kc-onward-journey-spec-2026-10-04.md). KC maintains css/onward.css
   (onward-why, wing-road); until it landeth, these page-scoped rules keep
   the block legible, and they yield to the spec's own sheet in the cascade
   (it is linked after this one). Remove these rules the hour onward.css
   lands.
   The door is a COLUMN: modern.css gives `.pager a` a flex row
   (`body.site-page .pager a`), which would set the reason beside its
   label instead of beneath it; this rule carrieth matching-or-greater
   weight and the section's own specificity. */
body.site-page .pager.onward a {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.onward-why {
  display: block;
  margin-top: 0.2rem;
  color: var(--bureau);
  font: 400 0.78rem/1.5 var(--font-ui);
}
.wing-road {
  max-width: var(--body-max);
  margin: 0.75rem auto 0;
  color: var(--bureau);
  font: 400 0.85rem/1.5 var(--font-ui);
}
.wing-road a { color: var(--brass); }
.wing-road-step { color: var(--brass); }

.roll-toc a:focus-visible,
.wing-road a:focus-visible,
#roll-filter:focus-visible,
.roll-fold-all:focus-visible,
.roll-fold-one:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* ---- paper : the aids are of the screen; the roll goeth whole --------------
   On paper no row is folded: the finder's hidden rows and the folded
   tables all lay out together, whatever the reader left folded on
   screen. The paper roll is the roll entire. */
@media print {
  .roll-aids,
  .roll-fold-one { display: none !important; }
  tr.roll-hidden { display: table-row !important; }
  .table-scroll.roll-empty { display: revert !important; }
}
