﻿/* 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 ---------- */
.rc-summary { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.rc-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 6px 4px 14px; color: var(--text); }
.rc-chip:hover { border-color: var(--text); }
.rc-chip b {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums;
}
.rc-chip[aria-pressed="true"] b { background: var(--btn-dark-fg); color: var(--btn-dark); }
/* 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; }
/* 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 */
.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; }

/* ---------- roster and training tables: below 1180px each row is a small card (a grid of label over value). The seven columns need about 1160px. ---------- */
@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; }
}
/* a phone: the status chips become one row that scrolls sideways, and the filters sit behind a button */
@media (max-width: 640px) {
  .rc-summary { flex-wrap: nowrap; overflow-x: auto; padding: 4px 2px; scrollbar-width: thin; }
  .rc-chip { flex: none; }
  .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-notes { white-space: pre-wrap; word-break: break-word; }
/* 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; }
.rc-seal {
  display: grid; place-items: center; width: 80px; height: 80px; margin-bottom: 8px; border-radius: 50%;
  background: var(--fill); color: var(--on-fill); border: 3px solid var(--gold); box-shadow: 0 0 0 3px var(--fill);
}
.rc-seal svg { width: 40px; height: 40px; }
.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: 760px; 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 a filter chip 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
   chip printed pale text on white (R2-026). The chosen chip has a heavier edge and bold type, so it still stands out from the others. */
@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-chip, .rc-chip[aria-pressed="true"] { background: var(--surface); color: var(--text); border-color: var(--text); }
  .rc-chip[aria-pressed="true"] { border-width: 2px; font-weight: 700; }
  .rc-chip b, .rc-chip[aria-pressed="true"] b { background: var(--surface-2); color: var(--text); }
}

/* 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.78in; height: 0.78in; margin-bottom: 4px; }
  .rc-seal svg { width: 0.38in; height: 0.38in; }
  .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: 8in; }
  .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; }
}
