/* Recruit Management module (class prefix rc-).
   Shared tokens only. Works in light and dark themes and down to 320px wide. */

.rc-page .page-head { margin-bottom: 0; }
.rc-inline { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.rc-sub { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.rc-more { padding: 12px 20px; border-top: 1px solid var(--line); }
.rc-more-flat { padding: 14px 0 0; border-top: 0; }
.rc-list li { flex-wrap: wrap; }
.rc-list .grow { flex: 1 1 220px; }
.rc-clear[hidden] { display: none; }
/* a date, or "Phase III": never broken in the middle */
.rc-nw { white-space: nowrap; }
/* Long unbroken text (a 120-character name or ID) wraps instead of pushing the page sideways (R2-030). A table keeps its own sizing: its
   wide rows scroll inside the table box, and a name that is a link wraps on its own. Where a row is a card or a list of lines, the media
   rules below let its text wrap like any other. */
.rc-page, .rc-cert-page { overflow-wrap: anywhere; }
.rc-page .table th, .rc-page .table td { overflow-wrap: normal; }
.rc-page .plink, .rc-page .rc-roster td .plink, .rc-page .sub, .rc-long { overflow-wrap: anywhere; }

/* ---------- roman numeral badge, phase bar, progress ---------- */
.rc-roman {
  display: inline-grid; place-items: center; flex: none; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 8px;
  background: var(--fill); color: var(--on-fill); font-family: var(--font-head); font-weight: 600; font-size: 14px; letter-spacing: 0.02em;
}
.rc-roman-lg { min-width: 44px; height: 44px; border-radius: 12px; font-size: 20px; }
.rc-phasecell { display: flex; align-items: center; gap: 10px; }
.rc-phasebar { width: 72px; flex: none; }
.phasebar span.rc-stop { background: var(--bad); border-color: var(--bad); }
.rc-pills { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.rc-prog { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.rc-prog .progress { flex: 1 1 auto; min-width: 56px; }
.rc-prog b { min-width: 38px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.kv .rc-prog { max-width: 320px; }

/* ---------- roster ---------- */
/* The strip of five numbers above the roster. Each is a button that sets the status filter. The top edge carries a colour, and the label says the
   same in words. The one that is pressed is the filter in use: it takes a deeper fill and a ring in the text colour, so it is not told by colour alone.
   Nothing here clips, so the focus ring (3px, drawn 2px out) is whole; the gap between the tiles is wider than the ring. */
.rc-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.rc-stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 12px 16px;
  border: 1px solid var(--line); border-top: 4px solid var(--muted); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
  color: var(--text); text-align: left; cursor: pointer;
}
.rc-stat:hover { background: var(--hover); }
.rc-stat[aria-pressed="true"] { background: var(--surface-2); box-shadow: 0 0 0 2px var(--text); }
.rc-stat-gold { border-top-color: var(--gold-ink); } /* the bright FHP gold almost disappears on a light page: the dark gold there, the bright one in the dark theme (as the Overview's --op-amber) */
@media screen { :root[data-theme="dark"] .rc-stat-gold { border-top-color: var(--gold); } }
.rc-stat-warn.rc-stat-hot { border-top-color: var(--warn); }
.rc-stat-exam { border-top-color: var(--exam); }
.rc-stat-good { border-top-color: var(--good); }
.rc-stat-l { font-size: 12px; font-weight: 700; letter-spacing: 0.07em; line-height: 1.3; text-transform: uppercase; color: var(--muted); }
.rc-stat-n { font-family: var(--font-head); font-size: 34px; font-weight: 600; line-height: 1.05; }
.rc-stat-t { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
/* Under the numbers: the roster at the left (about two thirds) and "Needs your attention" at the right (about one third). The panel is first in the page
   and the grid puts it in the right column on a wide screen; below 1100px there is one column, with the panel above the table. */
.rc-split { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 26%, 360px); gap: 16px; align-items: start; }
.rc-split > .rc-roster-card { grid-column: 1; grid-row: 1; min-width: 0; }
.rc-split > .rc-attn { grid-column: 2; grid-row: 1; }
/* The panel stays in view under the top bar while the table scrolls (--remote-topbar-h and --remote-banner-h are the heights js/remote.js measures, as
   for the sticky banner), and scrolls by itself when it is taller than the window, so its last group is never out of reach. */
.rc-attn {
  --rc-top: calc(var(--remote-topbar-h, 61px) + var(--remote-banner-h, 0px) + 15px);
  position: sticky; top: var(--rc-top); max-height: calc(100vh - var(--rc-top) - 16px); overflow-y: auto; scrollbar-width: thin; min-width: 0;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
}
.rc-attn-h {
  margin: 0; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2);
  font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; line-height: 1.3; text-transform: uppercase;
}
.rc-attn-group { padding: 13px 16px; border-bottom: 1px solid var(--line); }
/* When the panel scrolls by itself, the keyboard brings a link or a button just inside its edge, and the panel clips what overflows it: the margin keeps
   8px clear above and below the control, more than its focus ring (3px, drawn 2px out), so the ring is never cut off. */
.rc-attn a, .rc-attn button { scroll-margin: 8px 0; }
.rc-attn-group:last-child { border-bottom: 0; }
.rc-attn-t { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; line-height: 1.3; }
.rc-attn-n { flex: none; font-family: var(--font-head); font-size: 20px; font-weight: 600; line-height: 1; color: var(--warn); }
.rc-attn-done .rc-attn-n { color: var(--good-fg); }
.rc-attn-hint { margin: 3px 0 9px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.rc-attn-list { margin: 8px 0 10px; padding: 0; list-style: none; font-size: 13px; }
.rc-attn-hint + .rc-attn-list { margin-top: 0; }
.rc-attn-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rc-page .rc-attn-list .plink { padding: 3px 0; line-height: 20px; }
.rc-attn-meta { flex: none; color: var(--muted); white-space: nowrap; }
.rc-attn-more { margin: -4px 0 10px; font-size: 12.5px; color: var(--muted); }
.rc-attn-empty { margin: 0; padding: 16px; color: var(--muted); }
/* the card head: the title and the count on the left, how to sort on the right */
.rc-roster-head { gap: 8px 16px; }
.rc-roster-title { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.rc-roster-title h2 { flex: none; }
.rc-roster-title h2:focus, .rc-roster-title h2:focus-visible { outline: none; } /* focused by script after Assign FTOs when no row has its own button, so the keyboard is at the table; it is not a control */
/* the sort control may wrap (the list drops under its label) and never be wider than the card: on a 320px phone with wide text spacing it was 23px too wide (R2-028) */
.rc-sortbox { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; max-width: 100%; }
.rc-sortbox label { font-size: 13px; font-weight: 600; color: var(--muted); }
.rc-sortbox .select { width: auto; min-width: 0; max-width: 100%; min-height: 36px; padding: 5px 10px; }
/* the filters share one row where the card is wide enough; the Phase list is as wide as its longest name */
/* The roster card is a size container: its table turns into cards by the card's own width (the block 'rcard' below), not by the width of the window, because
   the room the table gets depends on the panel beside it as well as on the window. */
.rc-roster-card { container: rcard / inline-size; }
.rc-roster-card .toolbar { gap: 10px; }
.rc-roster-card .toolbar .select { flex: 0 1 auto; min-width: 0; max-width: 240px; }
.rc-filter-toggle { display: none; }
.rc-filter-card .toolbar { border-bottom: 0; }
.rc-filter-card .toolbar .select { flex: 0 1 auto; min-width: 0; max-width: 240px; }
.rc-name .plink { font-weight: 600; }
.rc-roster td .plink { overflow-wrap: anywhere; }
.rc-roster th { white-space: normal; vertical-align: bottom; }
/* a name keeps a width where it is short, so "Aiden Brooks" is not split before the table has to give room; a long one still wraps */
.rc-roster th:first-child, .rc-roster td:first-child { min-width: 128px; }
.rc-roster .rc-prog { min-width: 100px; }
.rc-roster .rc-prog .progress { min-width: 44px; }
.rc-team { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.rc-unassigned { gap: 6px; }
.rc-unassigned .btn { white-space: nowrap; }
.rc-last { display: flex; flex-direction: column; gap: 2px; }
.rc-k { display: inline-block; min-width: 34px; margin-right: 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
/* The roster table: a 38px circle with the recruit's initials, ringed in the tone of the status (the word is in the Status column, so the ring only
   echoes it), the name in bold with the Department ID in a small box under it, and, under the FTO and under the progress bar, the lines that used to
   be columns of their own (the Supervisor, the last report, and the last evaluation). */
.rc-ident { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rc-av {
  flex: none; box-sizing: border-box; display: grid; place-items: center; width: 38px; height: 38px; border: 2.5px solid var(--line); border-radius: 50%;
  background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 700; line-height: 1;
}
.rc-av-muted { border-color: var(--muted); }
.rc-av-info { border-color: var(--info); }
.rc-av-good { border-color: var(--good); }
.rc-av-review { border-color: var(--warn); }
.rc-av-exam { border-color: var(--exam); }
.rc-av-decision { border-color: var(--gold-ink); }
@media screen { :root[data-theme="dark"] .rc-av-decision { border-color: var(--gold); } }
.rc-av-bad { border-color: var(--bad); }
.rc-ident .rc-name { min-width: 0; }
/* three classes, so these win over ".rc-page .plink" further down (2px above and below), and the name link is 24px tall: 18px of line and 3px each side */
.rc-page .rc-ident .rc-nm { display: inline-block; font-weight: 700; line-height: 18px; padding: 3px 0; }
.rc-idchip {
  display: inline-block; max-width: 100%; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--muted);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.rc-rt td { padding: 10px 6px; }
.rc-rt th { padding-left: 6px; padding-right: 6px; }
.rc-rt th:first-child, .rc-rt td:first-child { min-width: 160px; padding-left: 14px; }
.rc-rt th:last-child, .rc-rt td:last-child { padding-right: 14px; }
.rc-rt .rc-phasecell { gap: 8px; }
.rc-rt .rc-phasebar { width: 52px; }
/* A status keeps one line, so the five columns need about 672px (the longest status, Awaiting Command Approval, is 215px of it). On a laptop the room inside the
   card beside the panel is 682 to 716px: there the numeral sits above the five segments, which gives the other columns about 36px more. (The sizes are of the card's
   content box, with 8px to spare for a font a little wider than the one measured, and written as ranges so that no fractional width falls between two rules. The media rule keeps the cards below 1181px, which are drawn by the
   rules further down, with the numeral and the segments side by side.) */
@media (min-width: 1181px) {
  @container rcard (width >= 682px) and (width < 716px) {
    .rc-rt .rc-phasecell { flex-direction: column; align-items: flex-start; gap: 5px; }
  }
}
.rc-rt .pill { border-radius: 12px; line-height: 1.4; padding-top: 3px; padding-bottom: 3px; }
.rc-progcell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* the bar, its percent and the Assign FTO button each give up a few pixels, so the five columns fit the card beside the panel at 1280 with every status on one line */
.rc-rt .rc-prog { min-width: 84px; gap: 6px; }
.rc-rt .rc-prog .progress { min-width: 40px; }
.rc-rt .rc-prog b { min-width: 34px; }
.rc-rt .rc-unassigned .btn { gap: 6px; padding-left: 9px; padding-right: 9px; }
.rc-rt .rc-last { font-size: 12px; color: var(--muted); }
.rc-rt .rc-k { min-width: 0; margin-right: 0; }
/* the lines under the FTO are small, and the links in them are still 24px tall (18px of line and 3px above and below), so each can be tapped */
.rc-rt .rc-team { gap: 0; }
.rc-rt .rc-team .sub { font-size: 12px; line-height: 1.4; }
.rc-rt .rc-team .sub .plink { font-weight: 500; line-height: 18px; padding: 3px 0; }

/* ---------- roster and training tables: below 1180px each row is a small card (a grid of label over value). The seven columns of Training Progression
   need about 1160px. The five of the Recruit roster need about 672px beside the panel, so its rows are cards up to about 1272px (the block under this one). ---------- */
@media (max-width: 1180px) {
  .table.rc-stack-cards, .table.rc-stack-cards tbody { display: block; width: 100%; }
  .table.rc-stack-cards thead { display: none; }
  .table.rc-stack-cards tbody tr {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); align-items: start; gap: 10px 16px;
    padding: 12px 16px; border-bottom: 1px solid var(--line);
  }
  .table.rc-stack-cards tbody tr:last-child { border-bottom: 0; }
  .table.rc-stack-cards td, .table.rc-stack-cards td:first-child, .table.rc-stack-cards td:last-child { display: block; min-width: 0; padding: 0; border: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .table.rc-stack-cards td::before {
    content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase;
  }
  .table.rc-stack-cards td:first-child { grid-column: 1 / -1; padding-bottom: 8px; border-bottom: 1px dashed var(--line); font-size: 16px; }
  .table.rc-stack-cards td:first-child::before, .table.rc-stack-cards td[data-label=""]::before { display: none; }
  .table.rc-stack-cards td.rc-empty { display: none; }
  .table.rc-stack-cards td[data-label=""] { grid-column: 1 / -1; }
  .table.rc-stack-cards .nowrap { white-space: normal; }
  .table.rc-stack-cards .rc-last .rc-nw, .table.rc-stack-cards .rc-phasecell { white-space: nowrap; }
  .table.rc-stack-cards .pill { white-space: normal; }
  .rc-roster .rc-prog { min-width: 0; max-width: 220px; }
}
/* The Recruit roster has five columns that need about 672px, and the room inside the card beside the panel is narrower than 682px for a window from about 1181px
   to 1272px. There its rows are small cards too: the same rules as the block above, for this table only, chosen by the card's own width (Training Progression
   keeps its table down to 1180px). Keep the two in step. */
@container rcard (width < 682px) {
  .table.rc-stack-cards.rc-rt, .table.rc-stack-cards.rc-rt tbody { display: block; width: 100%; }
  .table.rc-stack-cards.rc-rt thead { display: none; }
  .table.rc-stack-cards.rc-rt tbody tr {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); align-items: start; gap: 10px 16px;
    padding: 12px 16px; border-bottom: 1px solid var(--line);
  }
  .table.rc-stack-cards.rc-rt tbody tr:last-child { border-bottom: 0; }
  .table.rc-stack-cards.rc-rt td, .table.rc-stack-cards.rc-rt td:first-child, .table.rc-stack-cards.rc-rt td:last-child { display: block; min-width: 0; padding: 0; border: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .table.rc-stack-cards.rc-rt td::before {
    content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase;
  }
  .table.rc-stack-cards.rc-rt td:first-child { grid-column: 1 / -1; padding-bottom: 8px; border-bottom: 1px dashed var(--line); font-size: 16px; }
  .table.rc-stack-cards.rc-rt td:first-child::before, .table.rc-stack-cards.rc-rt td[data-label=""]::before { display: none; }
  .table.rc-stack-cards.rc-rt td.rc-empty { display: none; }
  .table.rc-stack-cards.rc-rt .nowrap { white-space: normal; }
  .table.rc-stack-cards.rc-rt .rc-last .rc-nw, .table.rc-stack-cards.rc-rt .rc-phasecell { white-space: nowrap; }
  .table.rc-stack-cards.rc-rt .pill { white-space: normal; }
  .rc-rt .rc-prog { min-width: 0; max-width: 220px; }
}
/* Below 1100px the page is one column: the panel above the table, and no longer pinned. The groups of the panel sit two to a row, so a name is not
   a whole screen away from its phase (a lone last group takes the whole row); the 1px gap between them is the divider. */
@media (max-width: 1100px) {
  .rc-split { grid-template-columns: minmax(0, 1fr); }
  .rc-split > .rc-roster-card, .rc-split > .rc-attn { grid-column: 1; grid-row: auto; }
  .rc-attn { position: static; max-height: none; overflow: hidden; }
}
@media (min-width: 641px) and (max-width: 1100px) {
  .rc-attn-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
  .rc-attn-group { border-bottom: 0; background: var(--surface); }
  .rc-attn-group:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* a phone: the five numbers are two to a row (the last takes a row of its own), and the filters sit behind a button */
@media (max-width: 900px) {
  .rc-strip { gap: 10px; }
  .rc-stat { padding: 10px 12px; }
  .rc-stat-n { font-size: 28px; }
}
@media (max-width: 640px) {
  .rc-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-stat:last-child { grid-column: 1 / -1; }
  .rc-roster-head { padding: 12px 16px; }
  .rc-roster-card .toolbar { gap: 8px; padding: 12px 16px; }
  .rc-roster-card .toolbar .search, .rc-filter-card .toolbar .search { flex: 1 1 150px; min-width: 0; }
  .rc-filter-toggle { display: inline-flex; order: 1; }
  .rc-roster-card .rc-clear { order: 2; }
  .rc-roster-card .toolbar .select { order: 3; flex: 1 1 calc(50% - 8px); max-width: none; }
  .rc-roster-card:not(.rc-filters-open) .toolbar .select { display: none; }
  .rc-filter-card .toolbar { padding: 12px 16px; gap: 8px; }
  .rc-filter-card .toolbar .select { flex: 1 1 calc(50% - 8px); max-width: none; }
}

/* ---------- table rows become label and value lines when the screen is too narrow for the columns ---------- */
@media (max-width: 900px) {
  .table.rc-stack, .table.rc-stack tbody, .table.rc-stack tr, .table.rc-stack td { display: block; width: 100%; }
  .table.rc-stack thead { display: none; }
  .table.rc-stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.rc-stack tbody tr:last-child { border-bottom: 0; }
  .table.rc-stack td { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 5px 0; border: 0; overflow-wrap: anywhere; }
  .table.rc-stack td::before {
    content: attr(data-label); flex: none; width: 118px; padding-top: 2px; color: var(--muted); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
  }
  .table.rc-stack td[data-label=""]::before, .table.rc-stack td:first-child::before { display: none; }
  .table.rc-stack td:first-child { margin-bottom: 4px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); font-size: 16px; }
  .table.rc-stack td.num { text-align: left; }
  .table.rc-stack td > * { min-width: 0; }
  .table.rc-stack .pill { white-space: normal; }
  /* compact rows for the secondary lists on a recruit's profile */
  .table.rc-flow tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 16px; }
  .table.rc-flow td { display: inline-flex; align-items: center; width: auto; padding: 0; overflow-wrap: anywhere; }
  .table.rc-flow td::before { display: none; }
  .table.rc-flow td:first-child { flex: 1 0 100%; margin: 0; padding: 0; border: 0; font-size: 15px; }
  .table.rc-flow td.rc-full { flex: 1 0 100%; }
}
/* a link is at least 24px tall, so it can be tapped (WCAG 2.5.8): "Tracker", a name in a table, the way back, "Open phase tracker" */
.rc-page .plink { display: inline-block; max-width: 100%; padding: 2px 0; }
.rc-page .crumb { min-height: 28px; }
/* a person's name with their status beside it (a suspended FTO, R2P-015) */
.rc-who { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; max-width: 100%; }

/* ---------- profile ---------- */
.rc-steps-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line); font-size: 14px;
}
.rc-step-name { padding: 0 4px; font-size: 12.5px; line-height: 1.25; }
@media (max-width: 640px) { .rc-step-name { display: none; } }
.rc-outstanding { margin: 6px 0; padding-left: 18px; }
.rc-outstanding li { margin: 3px 0; }
.rc-meaning { margin-top: 4px; }
/* two columns: the file and the notes on the left, the actions, sessions, and history on the right. Below 1100px they stack in this order:
   the file, the actions, upcoming sessions, notes, the timeline (the columns dissolve so each card can take its place). */
@media (max-width: 1100px) {
  .grid.split.rc-cols { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
  .rc-cols > .rc-col { display: contents; }
  /* only the cards inside the columns are ordered; the notes and the timeline of an open recruit sit under the columns, already in their place */
  .rc-cols .rc-c-file { order: 1; }
  .rc-cols .rc-c-actions { order: 2; }
  .rc-cols .rc-c-sessions { order: 3; }
  .rc-cols .rc-c-notes { order: 4; }
  .rc-cols .rc-c-timeline { order: 5; }
}
.rc-none p { margin: 0; }
.rc-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px 32px; padding: 20px; }
.rc-act-title {
  margin-bottom: 10px; font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.rc-act-list { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-act-note { flex: 1 0 100%; font-size: 13px; color: var(--muted); }
/* Withdraw and Terminate end the record. They are text buttons in the danger color, so they never look like the thing to press next. */
.rc-quiet {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 8px; border: 0; border-radius: 6px; background: none;
  color: var(--bad-fg); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.rc-quiet:hover { background: var(--bad-bg); }
.rc-quiet svg { width: 14px; height: 14px; }
.rc-note-form .textarea { min-height: 84px; }
/* the FTA's feedback for the FTO, under the notes of an assistance report */
.rc-assist { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rc-feedback { padding: 2px 0 2px 12px; border-left: 3px solid var(--gold); }
.rc-feedback-label { margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.rc-feedback-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- collapsible cards (phase cards, reference) ---------- */
.rc-chev { display: inline-grid; place-items: center; flex: none; color: var(--muted); transition: transform 0.15s ease; }
details[open] > summary .rc-chev { transform: rotate(90deg); }
.rc-ref > summary { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none; }
.rc-ref > summary::-webkit-details-marker, .rc-phase > summary::-webkit-details-marker { display: none; }
.rc-ref > summary:hover, .rc-phase > summary:hover { background: var(--hover); }
.rc-ref > summary h2 { font-size: 18px; }
.rc-ref > summary .rc-chev { margin-left: auto; }
.rc-ref[open] > summary { border-bottom: 1px solid var(--line); }
.rc-ref-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; padding: 20px; }
.rc-ref-phase { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rc-ref-phase h3 { font-size: 16px; }
.rc-ref-list { display: flex; flex-direction: column; gap: 5px; margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.rc-auto { margin-left: 8px; background: var(--info-bg); color: var(--info); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- /training overview ---------- */
.rc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.rc-tile { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rc-tile.has-recruits { border-top-color: var(--gold); }
.rc-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rc-tile h3 { font-family: var(--font-head); font-size: 17px; text-transform: uppercase; letter-spacing: 0.01em; }
.rc-tile-count { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; color: var(--muted); }
.rc-tile-count b { font-family: var(--font-head); font-size: 36px; font-weight: 600; line-height: 1; color: var(--text); }
.rc-tile-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.rc-tile-grads { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
@media (max-width: 640px) {
  .rc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rc-tile { padding: 12px; }
  .rc-tile:last-child { grid-column: 1 / -1; }
  .rc-tile .rc-roman-lg { min-width: 38px; height: 38px; font-size: 17px; }
  .rc-tile h3 { font-size: 15px; }
}

/* ---------- /training/:id tracker ---------- */
/* the five facts share one row (3 and 2 on a tablet, 2 and 2 and 1 on a phone), so none is left alone on a second row */
.rc-facts { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 16px 24px; margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 1100px) { .rc-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .rc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .rc-facts { grid-template-columns: minmax(0, 1fr); } }
.rc-facts .rc-prog { min-width: 0; }
/* a long status ("Awaiting Command Approval") wraps inside its pill instead of running into the next fact */
.rc-facts .pill { white-space: normal; }
.rc-fact dt { margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.rc-fact dd { margin: 0; min-width: 0; }
.rc-phase { overflow: hidden; }
.rc-phase > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(150px, 230px) auto; align-items: center; gap: 16px; padding: 16px 20px; cursor: pointer; list-style: none; }
.rc-phase[open] > summary { border-bottom: 1px solid var(--line); }
.rc-phase.is-current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow); }
.rc-badge {
  display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--surface-2); color: var(--text); font-family: var(--font-head); font-size: 20px; font-weight: 600;
}
.rc-phase.is-completed .rc-badge { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.rc-phase.is-current .rc-badge { background: var(--gold); border-color: var(--fill); color: var(--navy); }
.rc-phase.is-ended .rc-badge { background: var(--bad); border-color: var(--bad); color: #fff; }
.rc-ph-title { min-width: 0; }
.rc-ph-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.rc-ph-title h2 { margin-top: 2px; font-size: 20px; }
.rc-ph-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; }
.rc-ph-prog { display: flex; align-items: center; gap: 10px; }
.rc-ph-prog .progress { flex: 1; }
.rc-ph-prog b { min-width: 40px; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.rc-ph-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; padding: 20px; }
.rc-ph-main, .rc-ph-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rc-ph-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rc-ph-h h3, .rc-h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.rc-h3 { margin-bottom: 8px; }
.rc-ph-body .kv { grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; }
.rc-reqs li { padding: 10px 0; }
.rc-reqs label.t { display: block; cursor: pointer; }
.checklist .mark.rc-box { border-radius: 6px; background: none; }
.rc-box input { width: 20px; height: 20px; margin: 0; accent-color: var(--fill); cursor: pointer; }
.rc-ph-actions { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.rc-act-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.rc-exam { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.rc-notes { white-space: pre-wrap; word-break: break-word; }
/* ride-along time (Phases II and III): what is recorded, then two boxes and a Save button for the people who may record it */
.rc-ride { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.rc-ride-bare { padding-top: 0; border-top: 0; }
/* on the recruit page the card runs across it: what is recorded on the left, the boxes on the right (one column on a tablet and a phone) */
.rc-ride-bare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; gap: 12px 32px; }
.rc-ride-bare > .rc-ride-form { grid-column: 2; grid-row: 1 / span 3; padding-top: 0; border-top: 0; }
@media (max-width: 900px) {
  .rc-ride-bare { grid-template-columns: minmax(0, 1fr); }
  .rc-ride-bare > .rc-ride-form { grid-column: 1; grid-row: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
}
.rc-ride-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.rc-ride-head .rc-h3 { margin-bottom: 0; }
.rc-ride .kv { grid-template-columns: 110px minmax(0, 1fr); gap: 6px 14px; }
.rc-ride-note { margin: 0; overflow-wrap: anywhere; }
.rc-ride-form { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
/* the two boxes sit side by side when there is room for both (the tracker), and stack when there is not (the narrow column of the recruit page, a phone) */
.rc-ride-fields { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 16px; }
.rc-ride-fields .input { min-width: 0; width: 100%; }
.rc-ride-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
@media (max-width: 700px) {
  .rc-ride .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
}
/* records of a phase that were set aside when the recruit was moved back */
.rc-kept { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--line); }
.rc-kept-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rc-kept-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; background: var(--surface-2); }
.rc-kept-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.rc-kept-head b { font-size: 14px; }
.rc-kept-item .small { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .rc-ph-body { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 700px) {
  .rc-phase > summary { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px; }
  .rc-phase > summary .rc-badge { grid-column: 1; grid-row: 1; }
  .rc-phase > summary .rc-ph-title { grid-column: 2; grid-row: 1; }
  .rc-phase > summary .rc-chev { grid-column: 3; grid-row: 1; }
  .rc-ph-prog { grid-column: 1 / -1; grid-row: 2; }
  .rc-ph-body { padding: 16px; }
  .rc-ph-body .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
}

/* ---------- graduation certificate ---------- */
@page rc-cert { size: landscape; margin: 0.4in; }
.rc-cert-page { display: flex; flex-direction: column; gap: 18px; page: rc-cert; }
.rc-cert-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; width: 100%; max-width: 980px; margin: 0 auto; }
.rc-cert { width: 100%; max-width: 980px; margin: 0 auto; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.rc-cert-frame {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  padding: clamp(24px, 5vw, 52px) clamp(16px, 5vw, 64px); border: 3px solid var(--fill);
}
.rc-cert-frame::before { content: ''; position: absolute; inset: 7px; border: 1px solid var(--gold); pointer-events: none; }
.rc-cert-head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
/* The Florida Highway Patrol seal (img/fhp-seal-256.png, the picture the Director supplied) stands where a generic ribbon seal was. It is a
   background so that this one stylesheet path works from every page, and it prints because the certificate prints background graphics. */
.rc-seal { width: 96px; height: 96px; margin-bottom: 8px; background: url(../img/fhp-seal-256.png) center / contain no-repeat; }
.rc-cert-org { font-family: var(--font-head); font-size: clamp(14px, 2.4vw, 20px); letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); }
.rc-cert-div { font-family: var(--font-head); font-size: clamp(20px, 4vw, 32px); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.rc-rule { width: min(360px, 70%); height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.rc-cert-title { font-size: clamp(26px, 6vw, 54px); line-height: 1.05; letter-spacing: 0.05em; }
.rc-cert-lead { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(15px, 2.4vw, 20px); font-style: italic; color: var(--muted); }
.rc-cert-name {
  max-width: 100%; padding: 0 0.4em 0.12em; border-bottom: 2px solid var(--gold); font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(30px, 7.5vw, 64px); font-style: italic; line-height: 1.1; overflow-wrap: anywhere;
}
/* a long name is set smaller, on screen and on paper */
.rc-cert-frame.rc-name-l .rc-cert-name { font-size: clamp(24px, 5.6vw, 46px); }
.rc-cert-frame.rc-name-xl .rc-cert-name { font-size: clamp(20px, 4.4vw, 34px); }
/* a name near the 120-character limit, set smaller still so that it fits the sheet when printed (it wraps anywhere when it has no spaces) */
.rc-cert-frame.rc-name-xxl .rc-cert-name { font-size: clamp(16px, 3.2vw, 26px); }
.rc-cert-text { max-width: 620px; font-size: clamp(14px, 2vw, 17px); }
.rc-cert-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 28px; width: 100%; max-width: 520px; margin: 6px 0 0; }
.rc-cert-facts dt { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.rc-cert-facts dd { margin: 4px 0 0; font-family: var(--font-head); font-size: clamp(18px, 3vw, 24px); font-weight: 600; letter-spacing: 0.02em; }
.rc-cert-sigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px; width: 100%; margin-top: 22px; }
.rc-sig-name { padding: 20px 0 4px; border-bottom: 1px solid var(--text); font-family: Georgia, 'Times New Roman', serif; font-size: 20px; font-style: italic; overflow-wrap: anywhere; }
.rc-cert-frame.rc-sig-l .rc-sig-name { font-size: 17px; }
.rc-cert-frame.rc-sig-xl .rc-sig-name { font-size: 15px; }
.rc-cert-frame.rc-sig-xxl .rc-sig-name { font-size: 13px; }
.rc-sig-role { margin-top: 6px; font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
.rc-sig-role b { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }
.rc-cert-foot { margin-top: 10px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* Print without background graphics (the browser default): a numeral, a badge, or one of the five numbers keeps dark text on a light fill and a visible
   border, so it reads whether or not the fill prints. Without this the phase numerals, the completed or ended badges, and the chosen status
   tile printed pale text on white (R2-026). The chosen tile has a heavier edge, so it still stands out from the others. The panel prints above the
   table (its place in the page), whole, and not pinned. */
@media print {
  .rc-roman, .rc-badge, .rc-phase.is-completed .rc-badge, .rc-phase.is-current .rc-badge, .rc-phase.is-ended .rc-badge { background: var(--surface); color: var(--text); }
  .rc-roman { outline: 1px solid var(--text); outline-offset: -1px; }
  .rc-badge, .rc-phase.is-completed .rc-badge, .rc-phase.is-current .rc-badge, .rc-phase.is-ended .rc-badge { border-color: var(--text); }
  .rc-stat, .rc-stat[aria-pressed="true"] { background: var(--surface); color: var(--text); border-color: var(--text); box-shadow: none; }
  .rc-stat[aria-pressed="true"] { border-width: 2px; border-top-width: 4px; }
  .rc-stat-l, .rc-stat-t { color: var(--text); }
  .rc-av { background: var(--surface); border-color: var(--text); }
  .rc-split { display: block; }
  .rc-attn { position: static; max-height: none; overflow: visible; margin-bottom: 12px; break-inside: avoid; box-shadow: none; }
}
/* Windows high contrast and other forced-colors modes take every fill and every shadow away, so the pressed number would look like the others: it is
   drawn in the system highlight instead. The ring of a circle is a border, which stays, in the text colour, so the circle still shows. */
@media (forced-colors: active) {
  .rc-stat[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .rc-stat[aria-pressed="true"] .rc-stat-l, .rc-stat[aria-pressed="true"] .rc-stat-t { color: HighlightText; }
  .rc-av { border-color: CanvasText; }
}

/* Print: white paper and dark ink whatever the screen theme is, one landscape page. The frame is at least a page tall and grows with a long
   name, and a long name is set smaller, so it never runs onto a second page. */
@media print {
  #main { outline: none !important; }
  .rc-cert-bar { display: none !important; }
  .rc-cert-page { gap: 0; }
  .rc-cert {
    --surface: #fff; --text: var(--navy); --muted: var(--navy-3); --line: var(--steel); --fill: var(--navy); --on-fill: var(--cream);
    max-width: none; padding: 0; border: 0; border-radius: 0; background: #fff; color: var(--navy); box-shadow: none;
    break-inside: avoid; page-break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .rc-cert-frame { justify-content: space-between; gap: 6px; min-height: 7.3in; padding: 0.25in 0.6in; }
  .rc-seal { width: 0.76in; height: 0.86in; margin-bottom: 4px; }
  .rc-cert-org { font-size: 13pt; }
  .rc-cert-div { font-size: 22pt; }
  .rc-cert-title { font-size: 34pt; }
  .rc-cert-lead { font-size: 13pt; }
  .rc-cert-name { font-size: 42pt; }
  .rc-cert-frame.rc-name-l .rc-cert-name { font-size: 32pt; }
  .rc-cert-frame.rc-name-xl .rc-cert-name { font-size: 24pt; }
  .rc-cert-frame.rc-name-xxl .rc-cert-name { font-size: 16pt; }
  .rc-cert-text { max-width: 6.8in; font-size: 12pt; }
  .rc-cert-facts { max-width: 5.6in; }
  .rc-cert-facts dd { font-size: 17pt; }
  .rc-cert-sigs { gap: 0.5in; margin-top: 0.1in; }
  .rc-sig-name { padding-top: 12px; font-size: 16pt; }
  .rc-cert-frame.rc-sig-l .rc-sig-name { font-size: 13pt; }
  .rc-cert-frame.rc-sig-xl .rc-sig-name { font-size: 11pt; }
  .rc-cert-frame.rc-sig-xxl .rc-sig-name { font-size: 9pt; }
}
