﻿/* People module (pp-): personnel, FTO, FTA, supervisors, Command Center, applications.
   Colors come from the shared variables only, so light and dark themes both work. */

.pp-kpi-link { text-decoration: none; color: inherit; }
.pp-kpi-link:hover { border-color: var(--gold); background: var(--hover); }

/* Two columns that collapse at the shared breakpoint */
.pp-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.pp-cols > * { min-width: 0; }
.pp-cols-wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .pp-cols, .pp-cols-wide { grid-template-columns: minmax(0, 1fr); } }
/* The row of figures at the top of a page. kpiRow() in mod-people.js puts the count in the class: four sit in four columns and six in
   three (six across on a wide screen), so no page ends on a half row, and a phone gets two across. (.grid.kpis in styles.css is as
   specific as these, so each rule names both classes and comes after it.) */
.grid.kpis.pp-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid.kpis.pp-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.kpis.pp-kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1560px) { .grid.kpis.pp-kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid.kpis.pp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .grid.kpis.pp-kpis { gap: 12px; }
  .pp-kpis .kpi { padding: 14px; }
  .pp-kpis .kpi-value { font-size: 32px; }
}
/* A name stays on one line. One too long for that (over 28 characters, marked pp-long) wraps inside its cell instead of widening the table. */
.pp-name { white-space: nowrap; }
.pp-name.pp-long { white-space: normal; overflow-wrap: anywhere; min-width: 14ch; max-width: 28ch; }
/* Text that may wrap in a table that otherwise keeps its columns on one line: it keeps a width to wrap at, so a phone scrolls instead of stacking words. */
.pp-minw { display: block; min-width: 200px; }
.pp-statuses { display: flex; flex-wrap: wrap; gap: 4px 6px; }

/* Directory (the roster look itself is the section "Roster" at the end of this file) */
.pp-results { min-width: 0; }
/* A band above each position's people: a gold bar at its left edge, its title in small capitals, and how many people and the minimum rank after it. */
.table .pp-group-row th { background: transparent; color: var(--text); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; padding: 16px 20px 7px; border-bottom: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--gold); white-space: normal; }
.table .pp-group-title { font-weight: 700; margin-right: 10px; }
/* "2 people · Lieutenant+" moves to the next line as one piece when the band is too narrow for both (a phone), never "2" at the end of one line and "people" at the start of the next. */
.table .pp-group-row .small { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: none; }
.table tbody.pp-group:not(:first-of-type) .pp-group-row th { border-top: 1px solid var(--line); }
/* A group heading spans every column, so on a phone, where the table scrolls sideways, it would scroll out of sight and be cut off at the
   edge. Its text stays at the left edge (sticky) and wraps inside the visible width (100cqw is the width of the table's frame). */
.pp-wrap { container-type: inline-size; }
.pp-group-label { position: sticky; left: 20px; display: block; width: max-content; max-width: calc(100vw - 100px); max-width: calc(100cqw - 40px); }
.pp-pos { display: inline-flex; align-items: center; gap: 8px; }
.pp-pos .tag { flex: none; white-space: nowrap; }
.pp-activity { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* The directory's filter bar: the search box takes a row of its own, and the selects share the next row evenly (one column each on a
   laptop, two by two below that), so the controls never end up at ragged widths. --pp-n is how many selects there are (set in mod-people.js). */
.pp-dir .toolbar { display: grid; grid-template-columns: repeat(var(--pp-n, 4), minmax(0, 1fr)); gap: 12px; }
.pp-dir .toolbar .search { grid-column: 1 / -1; min-width: 0; }
.pp-dir .toolbar .select { width: 100%; min-width: 0; }
@media (max-width: 1100px) { .pp-dir .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Meters. An empty one draws no fill at all (see meter() in mod-people.js): a sliver would read as a small value. */
.pp-meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; min-width: 70px; }
.pp-meter .fill { display: block; height: 100%; border-radius: 4px; background: var(--fill); min-width: 2px; }
.pp-meter .fill.good { background: var(--good); }
.pp-meter .fill.gold { background: var(--gold); }
.pp-meter .fill.bad { background: var(--bad); }
.pp-mcell { display: flex; flex-direction: column; gap: 4px; min-width: 84px; }
.pp-mval { font-weight: 700; font-size: 13px; }
.pp-mnote { color: var(--bad-fg); font-weight: 600; }
.pp-progress { display: flex; align-items: center; gap: 10px; min-width: 110px; }
.pp-progress .progress { flex: 1; }

/* Performance tiles. The class carries the count (ftoTiles has seven, the FTA page five): the last tile takes the rest of its row, so
   the grid never leaves a lone tile beside a gap. Four across on a wide screen, three on a laptop, two on a phone. */
.pp-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pp-metric { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.pp-metric-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.pp-metric-value { font-family: var(--font-head); font-size: 30px; font-weight: 600; line-height: 1.05; }
.pp-metric-detail { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.pp-metrics-7 > :last-child { grid-column: 1 / -1; }
.pp-metrics-5 > :last-child { grid-column: span 2; }
@media (min-width: 1180px) {
  .pp-metrics-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pp-metrics-7 > :last-child { grid-column: span 2; }
}
@media (max-width: 760px) {
  .pp-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pp-metrics-7 > :last-child, .pp-metrics-5 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .pp-metric { padding: 10px 12px; gap: 6px; }
  .pp-metric-value { font-size: 24px; }
}
.pp-tone-good { color: var(--good-fg); }
.pp-tone-bad { color: var(--bad-fg); }
.pp-tone-review { color: var(--warn); }
.pp-flags { margin: 6px 0 0; padding-left: 18px; }
.pp-legend { border-top: 1px solid var(--line); }
.pp-kv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin-top: -8px; }
/* The facts line under an FTO's or FTA's name: each fact is its own item and the gap is the separator, so a line that wraps on a phone never
   starts with a dangling dot. */
.pp-facts { gap: 2px 18px; }
.pp-mcount { font-size: 12px; }
/* The person switcher has a width of its own, so a very long name in its list cannot stretch it (and the page header) past the screen;
   the closed box shows as much of the chosen name as fits. */
.pp-switch { max-width: 100%; min-width: 0; }
.pp-switch .select { width: 15rem; min-height: 36px; max-width: 100%; }

/* Action buttons and plain notes. The Manage card sorts its buttons into labelled groups; removing someone sits at the far end of Status. */
.pp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-act-groups { display: flex; flex-direction: column; gap: 14px; }
.pp-act-group { display: flex; flex-direction: column; gap: 6px; }
.pp-act-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pp-actions .pp-apart { margin-left: auto; }
.pp-notes { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.pp-notes li { display: flex; gap: 8px; align-items: flex-start; }
.pp-notes svg { flex: none; margin-top: 3px; }
.pp-actions + .pp-notes, .pp-act-groups + .pp-notes { margin-top: 14px; }
.pp-actions + .pp-notes-flat { margin-top: 10px; }
.pp-empty-actions { justify-content: center; }
.pp-overview-note { border-top: 1px solid var(--line); padding: 12px 20px; }
.pp-title-link { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.pp-title-link:hover { border-bottom-color: var(--gold); }

/* Reviews, reports, decisions, applications */
.pp-reviews, .pp-reports, .pp-apps, .pp-decisions { list-style: none; margin: 0; padding: 0; }
.pp-reviews > li, .pp-reports > li, .pp-apps > li, .pp-decisions > li { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pp-reviews > li:last-child, .pp-reports > li:last-child, .pp-apps > li:last-child, .pp-decisions > li:last-child { border-bottom: 0; }
.pp-review-head { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; }
.pp-ratings { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pp-rating { display: inline-flex; align-items: center; gap: 6px; }
.pp-comment { white-space: pre-wrap; overflow-wrap: anywhere; }
.pp-dec-head { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; align-items: baseline; }
.pp-dec-head h3 { font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
/* Later outcomes and corrections sit under the outcome, set in by a rule, oldest first. The Director's button follows them. */
.pp-dec-updates { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pp-dec-updates li { min-width: 0; }
.pp-dec-actions { margin-top: 2px; }
.pp-sub-h { font-size: 15px; margin-bottom: 10px; }

/* Activity log */
.pp-log { list-style: none; margin: 0; padding: 0; }
.pp-log li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.pp-log li:last-child { border-bottom: 0; }
.pp-log .pill { justify-self: start; }
.pp-log-main { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .pp-log li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* Supervisor cards and the responsibilities tracker */
/* One card for each Supervisor, one under the other, so a short card never leaves a hole beside a tall one and an odd number of Supervisors never leaves
   half a row empty. From 1180 px a card has two columns: the team, their numbers and their recruits on the left, the month's responsibilities on the right.
   Below that the two stack. */
.pp-sups { display: flex; flex-direction: column; gap: 16px; }
.pp-sup .card-head { padding: 14px 20px; }
.pp-sup .card-head h2 { font-size: 20px; }
.pp-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pp-sup .pp-sup-body { display: grid; grid-template-columns: minmax(0, 1fr); padding: 16px 20px 18px; }
.pp-sup-main { min-width: 0; }
/* The numbers: the FTOs and the FTAs side by side (their names need the room), then four small tiles in one row; two and two on a phone. */
.pp-stats { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
.pp-stat { grid-column: span 3; display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.pp-stat:nth-child(-n + 2) { grid-column: span 6; }
.pp-stat-n { font-family: var(--font-head); font-size: 24px; font-weight: 600; line-height: 1.1; }
.pp-stat-l { font-size: 13px; font-weight: 600; }
.pp-stat-s { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.pp-last { margin: 0; }
.pp-tracker { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 640px) {
  .pp-stat { grid-column: span 6; }
  .pp-stat:nth-child(-n + 2) { grid-column: span 12; }
}
@media (min-width: 1180px) {
  .pp-sup .pp-sup-body { grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); }
  .pp-sup-main { padding-right: 28px; }
  .pp-sup .pp-tracker { margin-top: 0; padding: 0 0 0 28px; border-top: 0; border-left: 1px solid var(--line); }
}
.pp-tracker-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.pp-tracker-head h3 { font-size: 15px; }
.pp-duties { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.pp-duties li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.pp-duties li:last-child { border-bottom: 0; }
.pp-duty-note { margin: 2px 0 0 28px; }
.pp-report-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
/* This month's report status with last month's overdue flag beside it: the pills wrap inside their cell rather than widen it */
.pp-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.pp-report-line .pp-pills { justify-content: flex-end; }
/* A Supervisor's actions, and the recruits they supervise (each with the actions the viewer may take) */
.pp-sup-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; }
.pp-sup-actions { margin: 0; }
.pp-sup-recruits { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pp-sup-recruits h3 { font-size: 15px; margin-bottom: 0; }
.pp-recruit-list li { flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.pp-recruit-list .grow { flex: 1 1 180px; }
.pp-rec-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 8px; margin-left: auto; }
.pp-sup .pp-recruit-list li { padding: 8px 0; }
.pp-more { padding: 12px 20px; }
.pp-sup .pp-more { padding: 10px 0 0; }

/* Command Center tiles: four across from a laptop up, two across below (never a row of two and a half) */
.pp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 1100px) { .pp-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pp-tile { display: flex; gap: 14px; align-items: flex-start; padding: 16px; text-decoration: none; color: inherit; min-width: 0; }
.pp-tile:hover { border-color: var(--gold); background: var(--hover); }
.pp-tile h3 { font-size: 15px; margin-bottom: 2px; overflow-wrap: anywhere; }
.pp-tile-icon { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--fill); color: var(--on-fill); }
@media (max-width: 640px) {
  .pp-tiles { gap: 10px; }
  .pp-tile { flex-direction: column; gap: 8px; padding: 12px; }
}

/* Applications */
.pp-apply { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
/* The form is turned off while the applicant cannot apply (rank too low, or an application is already open): the boxes look turned off too. */
.pp-apply .textarea:disabled, .pp-apply .input:disabled { background: var(--surface-2); opacity: 0.75; cursor: not-allowed; resize: none; }
.pp-history summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.pp-history[open] summary { margin-bottom: 12px; }
.pp-linkbtn { background: none; border: 0; padding: 0; font-weight: 600; text-align: left; cursor: pointer; border-bottom: 1px solid var(--line); }
.pp-linkbtn:hover { border-bottom-color: var(--gold); }
/* Approved and denied applications (the Command Team): one list under a heading for each outcome, inside one card */
.pp-decided + .pp-decided { border-top: 1px solid var(--line); margin-top: 6px; }
.pp-decided-h { margin: 0; padding: 14px 20px 8px; }
.pp-decided-empty { padding: 0 20px 16px; margin: 0; }
/* Applications open or closed: a row for each position. The words come first and may use the whole row; the Command Team's button sits beside
   them while there is room and under them on a phone. */
.pp-switches { list-style: none; margin: 0; padding: 0; }
.pp-switches > li { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); min-width: 0; }
.pp-switches > li:last-child { border-bottom: 0; }
.pp-switch-text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.pp-switch-text p { margin: 0; }
/* The reason the "Record an application" button is turned off (the Assistant position is closed): plain words on the left of the button, two lines
   at most on a desktop, so that on a wide screen the button can stay in the corner of the page head where it is when it is on. */
.pp-record-why { max-width: 24rem; }

/* ==========================================================================
   Application link (js/mod-people.js, section 8): the page a person outside the division uses to apply, the Director's link to copy, and the card
   and editor for the application questions. Colors come from the shared variables only, so both themes work.
   ========================================================================== */

/* The Director's link (Applications open or closed, the Assistant row): the address to select, and its button beside the Close button */
.pp-switch-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pp-link-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.pp-link-url { padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); user-select: all; }

/* A question and its answer, one under the other (an application's detail dialog, and the applicant's own page) */
.pp-qa { margin: 0; display: flex; flex-direction: column; }
.pp-qa dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.pp-qa dd { margin: 2px 0 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pp-qa dd:last-child { margin-bottom: 0; }

/* The card of questions on the Applications page */
.pp-aq-body { display: flex; flex-direction: column; gap: 14px; }
.pp-aq-list { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 14px; }
.pp-aq-list > li { padding-left: 4px; min-width: 0; overflow-wrap: anywhere; }
.pp-aq-q { font-weight: 600; }
.pp-aq-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; }
.pp-aq-choices { flex-basis: 100%; margin: 0; padding-left: 18px; color: var(--muted); }

/* The editor: a box for each question. The buttons about the whole list (Add, Restore, Preview) sit at the left of the dialog's foot and Cancel and
   Save at the right; when they do not fit one line they wrap, and every one keeps its words. */
.pp-aq-rows { display: flex; flex-direction: column; gap: 14px; }
.pp-aq-row { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.pp-aq-row [hidden] { display: none !important; }
.pp-aq-row-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.pp-aq-row-head h3 { font-size: 15px; }
.pp-aq-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-aq-row-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px 16px; align-items: start; }
.pp-aq-req { align-self: end; padding-bottom: 10px; }
/* the Minimum characters box is off while Required is not ticked: it has to look off (a grey box, not just a white one that does not answer), and the hint beside it says why.
   The grey fill and the muted text are only a small step from an enabled box, so the border changes too, to a dashed one: a cue that does not depend on colour. */
.pp-aq-row .input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; border-style: dashed; }
.pp-aq-opts { min-height: 96px; }
.modal-foot .pp-aq-gap { margin-right: auto; }
/* where the five buttons no longer fit on one line (a tablet, a phone) they sit two by two, and Save has a row of its own */
@media (max-width: 820px) {
  .modal-foot .pp-aq-btn { flex: 1 1 calc(50% - 5px); }
  .modal-foot .pp-aq-save { flex-basis: 100%; }
  .modal-foot .pp-aq-gap { margin-right: 0; }
}
@media (max-width: 640px) {
  .pp-aq-row { padding: 12px; }
  .pp-aq-row-grid { grid-template-columns: minmax(0, 1fr); }
  .pp-aq-req { padding-bottom: 0; }
}
/* A phone held sideways is about 375 px high. The buttons of the editor are sticky at the bottom of the dialog, and in two or three rows they would take
   more than half of that, leaving a few lines for the questions. There the buttons scroll with the content instead, and sit after the last question. */
@media (max-width: 820px) and (max-height: 560px) {
  .modal-foot:has(.pp-aq-btn) { position: static; }
}

/* The applicant page (js/remote.js draws it in place of the sign-in card). It is a page of its own: no sidebar, no top bar, no search. A band of
   the dark navy the sign-in card uses carries the badge and the title; below it one centered column of cards on the page's own colors, so both themes
   read well and a phone gets the whole width. */
.pp-ap-page { min-height: 100vh; background: var(--bg); color: var(--text); }
.pp-ap-page:focus { outline: none; }
.pp-ap-page [hidden] { display: none !important; }
.pp-ap-hero { background: var(--navy); color: var(--cream); border-bottom: 3px solid var(--gold); --focus: var(--gold); }
.pp-ap-hero-in { width: min(760px, 100%); margin: 0 auto; padding: 26px 16px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pp-ap-hero .login-badge { width: 63px; height: 72px; margin-bottom: 2px; }
.pp-ap-hero .eyebrow { font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; font-size: 12px; color: var(--gold); }
.pp-ap-hero h1 { font-size: clamp(28px, 7.5vw, 40px); line-height: 1.05; color: var(--cream); }
.pp-ap-hero h1:focus, .pp-ap-hero h1:focus-visible { outline: none; } /* focused by script when the page appears, so a screen reader reads it; it is not a control */
.pp-ap-col { width: min(760px, 100%); margin: 0 auto; padding: 20px 16px 56px; display: flex; flex-direction: column; gap: 20px; min-width: 0; overflow-wrap: anywhere; }
.pp-ap-col > :empty:not(.sr-only) { display: none; } /* a part with nothing in it (no notice, no applications yet) must not leave a gap; the live region stays, a hidden one is not heard */
.pp-ap-who { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; }
.pp-ap-who-text { flex: 1 1 180px; min-width: 0; }
.pp-ap-who-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; }
.pp-ap-form { display: flex; flex-direction: column; gap: 20px; }
.pp-ap-intro { color: var(--muted); }
.pp-ap-field label { font-size: 15px; }
.pp-ap-opt { font-weight: 400; color: var(--muted); }
.pp-ap-field .err:empty { display: none; }
.pp-ap-choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.pp-ap-choice legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 15px; }
.pp-ap-choice .hint { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.pp-ap-choice .err { margin-top: 6px; }
.pp-ap-choice .err:empty { display: none; }
.pp-ap-choice .check { align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field-bg); cursor: pointer; }
.pp-ap-choice .check:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.pp-ap-choice .check input { margin-top: 0; }
.pp-ap-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.pp-ap-submit { min-height: 44px; padding-left: 22px; padding-right: 22px; }
/* The summary of what is wrong takes focus when the application is not sent, so it shows where it is. */
.pp-ap-summary { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border: 2px solid var(--bad); border-radius: 10px; background: var(--bad-bg); color: var(--bad-fg); }
.pp-ap-summary[hidden] { display: none; } /* the same form is drawn in a dialog too (the preview), outside .pp-ap-page, so this one is said here */
.pp-ap-summary:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.pp-ap-summary-h { font-size: 15px; }
/* no bullets: each line is a button that moves focus to its box, and a bullet beside a button that wraps to two lines sits on the wrong one */
.pp-ap-summary ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.pp-ap-link { display: block; padding: 4px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; text-decoration: underline; cursor: pointer; } /* 4px above and below: a line to press with a thumb is more than 23px high */
.pp-ap-h2 { font-size: 22px; margin-bottom: 12px; }
.pp-ap-apps { display: flex; flex-direction: column; gap: 16px; }
.pp-ap-app .card-head h3 { flex: 1 1 auto; min-width: 0; font-family: var(--font-head); font-size: 18px; text-transform: uppercase; letter-spacing: 0.01em; }
.pp-ap-app-body { display: flex; flex-direction: column; gap: 16px; }
.pp-ap-good { display: flex; gap: 12px; padding: 12px 16px; border-radius: 10px; background: var(--good-bg); color: var(--good-fg); font-size: 14px; }
.pp-ap-good:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.pp-ap-good svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.pp-ap-good + .pp-ap-apps { margin-top: 12px; }
/* the notice that takes keyboard focus when an application was refused and the form went away (js/mod-people.js, refuse) */
.pp-ap-notice:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.pp-ap-details summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 0; } /* 6px above and below: a target of 24px or more, not 21 */
.pp-ap-details[open] summary { margin-bottom: 12px; }
.pp-ap-refresh { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.pp-ap-fail { color: var(--bad-fg); font-weight: 600; font-size: 13px; }
.pp-ap-fail:empty { display: none; }
@media (max-width: 640px) {
  .pp-ap-hero-in { padding: 20px 16px 18px; }
  .pp-ap-hero .login-badge { width: 52px; height: 60px; }
  .pp-ap-col { padding-top: 16px; gap: 16px; }
  .pp-ap-form .btn-primary { width: 100%; }
}

/* Long unbroken text (a 120-character name, a 200-character note or certification) wraps instead of pushing the page sideways. min-width:0 lets a
   flex or grid child shrink to its row, and overflow-wrap:anywhere lets its text break where it must. These go on the text blocks, never on table
   cells: a table would squeeze its columns to nothing instead of scrolling or turning into cards. .pp-page is the root of every page here. */
.pp-page .page-head > :first-child { min-width: 0; max-width: 100%; }
.pp-page .page-head :is(h1, p) { overflow-wrap: anywhere; }
.pp-list .grow, .pp-list .t, .pp-log-main { min-width: 0; overflow-wrap: anywhere; }
.pp-review-head > *, .pp-dec-head > *, .pp-facts > *, .pp-who > div, .pp-tracker-head > * { min-width: 0; overflow-wrap: anywhere; }
.pp-page .notice > div, .pp-flags li, .pp-notes li span, .pp-stat { min-width: 0; overflow-wrap: anywhere; }
.pp-reports li p, .pp-apps li p, .pp-sub-h { overflow-wrap: anywhere; }

/* Tables that turn into cards. mod-people.js (cardTable, directoryTable) puts .pp-cards on a table whose columns need more width than its card has:
   a phone, a tablet, or a laptop with the menu open. Each row becomes a small card, the first cell its title and every other cell a line with the
   name of its column in front (data-label), so no column (Status, the Review button) is left off the right edge. A cell with no value is left out. */
.table.pp-cards, .table.pp-cards tbody, .table.pp-cards tr, .table.pp-cards td { display: block; width: 100%; }
.table.pp-cards thead { display: none; }
.table.pp-cards tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table.pp-cards tbody tr:last-child { border-bottom: 0; }
.table.pp-cards td, .table.pp-cards td:first-child, .table.pp-cards td:last-child {
  display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 5px 0; border: 0; white-space: normal; text-align: left; overflow-wrap: anywhere;
}
.table.pp-cards td::before {
  content: attr(data-label); flex: none; width: 124px; padding-top: 2px; color: var(--muted); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; overflow-wrap: normal;
}
.table.pp-cards td[data-label=""]::before, .table.pp-cards td:first-child::before { display: none; }
.table.pp-cards td:first-child { margin-bottom: 4px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); font-size: 16px; }
.table.pp-cards td.pp-none { display: none; }
.table.pp-cards td > * { min-width: 0; }
.table.pp-cards td > .pp-mcell, .table.pp-cards td > .pp-progress { flex: 1 1 0; }
.table.pp-cards .nowrap, .table.pp-cards .pill { white-space: normal; }
.table.pp-cards .pp-name { white-space: normal; overflow-wrap: anywhere; }
.table.pp-cards .pp-name.pp-long { min-width: 0; max-width: none; }
.table.pp-cards .pp-minw { min-width: 0; }
/* the group headings of the directory sit above their cards, at the table's left edge */
.table.pp-cards .pp-group-row { padding: 0; border-bottom: 0; }
.table.pp-cards .pp-group-row th { display: block; width: 100%; padding: 16px 16px 6px; }
.table.pp-cards .pp-group-label { position: static; width: auto; max-width: none; }

/* The small button at the end of a directory row (Edit name and callsign, mod-people.js iconBtn). While the directory is a table only the pencil
   shows; the words are there for a screen reader and for a pointer's tooltip. Once the table has turned into cards, the words show beside the
   pencil, because a bare icon under a card would not say what it does. */
.pp-iconbtn { padding: 5px 8px; }
.pp-iconbtn-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.table.pp-cards .pp-iconbtn { padding: 5px 12px; }
.table.pp-cards .pp-iconbtn-text { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; text-align: left; }

/* Discord sign-in: the line and its buttons on a profile, and the card of people waiting to sign in (remote mode). A row keeps the name and the
   facts together and puts the three buttons under them on a phone. The Discord ID is a long run of digits, so it may break anywhere. */
.pp-discord-actions { margin-top: 16px; }
.pp-mono { font-family: ui-monospace, SFMono-Regular, Consolas, Menlo, monospace; font-size: 0.92em; overflow-wrap: anywhere; }
.pp-wait-body:focus, .pp-wait-body:focus-visible { outline: none; }
.pp-wait-list li { flex-wrap: wrap; align-items: flex-start; gap: 10px 14px; }
.pp-wait-pic { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.pp-wait-who { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
/* the ID is what Command checks, so it is the largest thing in the row; the name is only what the person chose to call themselves */
.pp-wait-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.pp-wait-idv { font-size: 17px; font-weight: 600; letter-spacing: 0.02em; color: var(--text); }
.pp-wait-name { font-size: 14px; overflow-wrap: anywhere; }
.pp-wait-name-v { font-weight: 600; }
.pp-wait-status:empty { display: none; }
.pp-wait-actions { flex: 0 1 auto; justify-content: flex-end; }
@media (max-width: 640px) { .pp-wait-actions { flex: 1 1 100%; justify-content: flex-start; } }

/* Print: the Print record button on a personnel profile. The profile page carries a second, print-only copy of the record
   (.pp-sheet): hidden on screen, and the only thing printed. It uses fixed black on white, so the screen theme never reaches the paper. */
.pp-sheet { display: none; }
@media print {
  .pp-printable > .pp-screen { display: none !important; }
  .pp-sheet { display: block; color: #000; background: #fff; font-family: var(--font-body); font-size: 9.5pt; line-height: 1.35; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pp-sheet-head { border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 10px; }
  .pp-sheet-org { font-size: 9pt; letter-spacing: 0.1em; text-transform: uppercase; }
  .pp-sheet-title { font-family: var(--font-head); font-size: 20pt; font-weight: 700; text-transform: uppercase; line-height: 1.1; margin-top: 2px; }
  .pp-sheet-meta { font-size: 8.5pt; color: #333; margin-top: 3px; }
  .pp-sheet-name { font-size: 15pt; font-weight: 700; line-height: 1.2; margin-bottom: 10px; overflow-wrap: anywhere; }
  .pp-sheet-name span { display: block; font-size: 10pt; font-weight: 400; color: #333; }
  .pp-sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; align-items: start; margin-bottom: 10px; }
  .pp-sheet-grid > .pp-sheet-block { break-inside: avoid; page-break-inside: avoid; }
  .pp-sheet-block + .pp-sheet-block { margin-top: 10px; }
  .pp-sheet-grid > .pp-sheet-block + .pp-sheet-block { margin-top: 0; }
  .pp-sheet-h { font-size: 8.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid #777; padding-bottom: 2px; margin-bottom: 5px; break-after: avoid; page-break-after: avoid; }
  .pp-sheet-kv { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; }
  .pp-sheet-kv dt { color: #333; font-weight: 600; }
  .pp-sheet-kv dd { margin: 0; overflow-wrap: anywhere; }
  .pp-sheet-sub { margin-top: 6px; font-weight: 600; }
  .pp-sheet-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
  .pp-sheet-list li { break-inside: avoid; page-break-inside: avoid; overflow-wrap: anywhere; }
  .pp-sheet-reviews { gap: 6px; }
  .pp-sheet-reviews li { padding-bottom: 5px; border-bottom: 1px solid #ccc; }
  .pp-sheet-reviews li:last-child { padding-bottom: 0; border-bottom: 0; }
  .pp-sheet-small { font-size: 8.5pt; color: #333; }
  .pp-sheet-text { margin-top: 1px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .pp-sheet-none { margin: 0; color: #333; }
}

/* ==========================================================================
   Roster (js/mod-people.js, directoryPage): the Directory card of Personnel Management. A banner with the division, the date, and the headcount;
   the filter bar with its Table | Cards switch; and then the same people as a table (the default) or as cards. Colors come from the shared variables,
   so both themes work. The status dots are the only colors of their own, and they are variables here (set on .pp-roster).
   ========================================================================== */
.pp-roster { --pp-av: 38px; --pp-ring-aftd: var(--muted); --pp-dot-active: #3fb56f; --pp-dot-suspended: #e0a030; --pp-dot-inactive: #8b97ab; --pp-dot-removed: var(--bad); }

/* The banner. A gold rule under it; the title is an h2 drawn on two lines; the three boxes count by status. */
.pp-roster-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; padding: 20px 20px 16px; border-bottom: 3px solid var(--gold); }
.pp-roster-who { flex: 1 1 330px; min-width: 0; }
.pp-roster-side { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.pp-roster-title { font-size: 24px; letter-spacing: 0.03em; line-height: 1.1; }
.pp-roster-title > span { display: block; }
/* The date line is two pieces (mod-people.js, fillBanner): on a phone the line breaks between them, so "14 on the roll" is never split in the middle. */
.pp-roster-asof { margin-top: 6px; color: var(--muted); }
.pp-roster-asof > span { display: inline-block; }
.pp-roster-counts { display: flex; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pp-roster-counts li { min-width: 74px; padding: 6px 16px; text-align: center; border-right: 1px solid var(--line); }
.pp-roster-counts li:last-child { border-right: 0; }
.pp-roster-counts b { display: block; font-family: var(--font-head); font-size: 20px; font-weight: 600; line-height: 1.15; }
.pp-roster-counts span { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* The last line of the filter bar: the count at the left and the Table | Cards switch at the right. The pressed button is marked with a gold line
   under it. The ring of a focused button is drawn inside it, because the switch clips what is outside its rounded edge. */
.pp-dir .toolbar .pp-bar-end { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.pp-viewseg { margin-left: auto; }
.pp-viewseg button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 14px; }
.pp-viewseg button:hover { color: var(--text); }
.pp-viewseg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -3px 0 var(--gold); }
.pp-viewseg button:focus-visible { outline-offset: -3px; }
@media (forced-colors: active) { .pp-viewseg button[aria-pressed="true"] { background: Highlight; color: HighlightText; box-shadow: none; } }

/* The circle at the left of a name: a Discord picture, or the initials, ringed in the color of the position (Director gold, Assistant Director steel,
   Supervisor, FTO, and FTA the colors of their tags). One size in both views. Steel is the page's muted color, which is steel blue on the dark page
   and a dark steel gray on the cream one: the palette's own steel (#B8C4D6) is too pale there to be seen as a ring. */
.pp-av { flex: none; box-sizing: border-box; width: var(--pp-av); height: var(--pp-av); display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 700; line-height: 1; }
img.pp-av { display: block; object-fit: cover; }
.pp-av-ftd { border-color: var(--gold); }
.pp-av-aftd { border-color: var(--pp-ring-aftd); }
.pp-av-fts { border-color: var(--tag-volunteer); }
.pp-av-fto { border-color: var(--tag-fto); }
.pp-av-fta { border-color: var(--tag-fta); }

/* The name cell: the circle, then the name and under it the rank and the Department ID in a small box. The row of circle and name is .pp-who, the same
   flex row the Supervisor page uses for its avatar and name (its rule is in the Directory part of this file). The name still wraps inside its cell when
   it is too long for one line (.pp-long), and never runs into the next column. A link is a 24px target: 18px lines with 3px above and below, so a name on
   one line is 24px high and the lines of a wrapped long name are 18px apart (a 24px line height would space them almost double). */
.pp-nm { display: inline-block; font-weight: 700; line-height: 18px; padding: 3px 0; }
/* the 2px under the name keeps the ring of a focused name link (3px, drawn 2px out) off the first letters of the rank line below it */
.pp-roster .pp-name .sub, .pp-rc-sub { margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.pp-idchip { display: inline-block; 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; line-height: 1.3; letter-spacing: 0.05em; font-variant-numeric: tabular-nums; vertical-align: middle; }

/* The status: a small dot and its word. The word carries the meaning, in the page's colors; the dot is decoration. */
.pp-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pp-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pp-status-active .pp-dot { background: var(--pp-dot-active); }
.pp-status-suspended { color: var(--warn); }
.pp-status-suspended .pp-dot { background: var(--pp-dot-suspended); }
.pp-status-inactive { color: var(--muted); }
.pp-status-inactive .pp-dot { background: var(--pp-dot-inactive); }
.pp-status-removed { color: var(--bad-fg); }
.pp-status-removed .pp-dot { background: var(--pp-dot-removed); }

/* The table: rows about 56px tall with the circle in them, a line between rows, no stripes, and the portal's hover color. Recruits is right aligned.
   The first and last cells line up with the banner and the filter bar (20px in). A link is 24px tall, as a button is at least 32. While the table
   is cards (pp-cards) its cells keep the card rules above. */
.pp-roster .table:not(.pp-cards) td { padding-top: 6px; padding-bottom: 6px; }
.pp-roster .table:not(.pp-cards) th:first-child, .pp-roster .table:not(.pp-cards) td:first-child { padding-left: 20px; }
.pp-roster .table:not(.pp-cards) th:last-child, .pp-roster .table:not(.pp-cards) td:last-child { padding-right: 20px; }
.pp-roster .table tbody tr.pp-row:hover td { background: var(--hover); }
.pp-roster .table:not(.pp-cards) th.num, .pp-roster .table:not(.pp-cards) td.num { text-align: right; }
.pp-roster .table td .plink { display: inline-block; line-height: 18px; padding: 3px 0; }
/* A link here is underlined by a thin line that hugs the words (the portal's border under a link would sit well below them in a 24px box) */
.pp-roster .plink { border-bottom: 0; text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pp-roster .plink:hover { text-decoration-color: var(--gold); }
/* the search hint ends in an ellipsis where the box is too narrow for it (a phone), never in half a word */
.pp-dir .search .input { text-overflow: ellipsis; }
.table.pp-cards .pp-who { flex: 1 1 auto; }

/* The cards: the same people under the same bands, a grid of cards 268px wide or more (one to a line on a phone). */
.pp-rcards { padding: 4px 20px 24px; }
.pp-rc-sec { margin-top: 16px; }
.pp-rc-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 10px; padding: 6px 0 6px 12px; box-shadow: inset 4px 0 0 var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; line-height: 1.3; text-transform: uppercase; }
.pp-rc-h .small { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: none; }
.pp-rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(268px, 100%), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.pp-rc { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.pp-rc-top { display: flex; align-items: center; gap: 12px; }
.pp-rc-who { flex: 1; min-width: 0; }
.pp-rc-who .pp-nm { font-size: 15px; overflow-wrap: anywhere; }
.pp-rc-pair { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.pp-rc-facts { display: grid; gap: 2px; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 12.5px; }
.pp-rc-facts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.pp-rc-k { flex: none; color: var(--muted); }
.pp-rc-v { min-width: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.pp-rc-v .plink { display: inline-block; line-height: 18px; padding: 3px 0; }
.pp-rc-v .pp-activity { justify-content: flex-end; }
/* A plain Ctrl+P of the Cards view (not Print roster, which prints the table) keeps each card on one page: a card's last lines never start the next page alone. */
@media print { .pp-rc { break-inside: avoid; page-break-inside: avoid; } }

@media (max-width: 640px) {
  .pp-roster-head { gap: 12px; padding: 16px; }
  .pp-roster-title { font-size: 20px; }
  .pp-roster-side { flex: 1 1 100%; }
  .pp-roster-counts { flex: 1 1 100%; }
  .pp-roster-counts li { flex: 1 1 0; min-width: 0; padding: 6px 4px; }
  .pp-print { flex: 1 1 100%; }
  .pp-rcards { padding: 4px 16px 20px; }
}

/* Print roster (mod-people.js, printRoster) prints the banner, the table, and its bands, and nothing else, as black on white. The body carries the
   class pp-print-roster only while that button is printing, so printing this page any other way, or any other page, is as it always was. The table is
   drawn for paper at that moment (the same people, the same columns as the screen, no pencil column), so there is nothing here about cards. The circles
   are left out: a plain list reads better on paper, and a picture takes room the names can use. The header row repeats on every page, a row never
   splits across two pages, and a band stays with the first row under it. A filtered list says so after the date line, and a very long name or Department
   ID wraps in its cell. */
@media print {
  /* the FTO and FTA rosters add two more graphics to leave off paper: the meters (the percent is printed beside them) and the initials in a recruit's chip */
  body.pp-print-roster #main > :not(.pp-page), body.pp-print-roster .pp-page > :not(.pp-roster), body.pp-print-roster .pp-roster .pp-dir > :not(.pp-results), body.pp-print-roster .pp-av,
  body.pp-print-roster .pp-roster .pp-meter, body.pp-print-roster .pp-roster .pp-rchip-in { display: none !important; }
  body.pp-print-roster .pp-roster { border: 0; border-radius: 0; background: #fff; box-shadow: none; color: #000; }
  body.pp-print-roster .pp-roster-head { padding: 0 0 8px; border-bottom: 2px solid #000; }
  body.pp-print-roster .pp-roster-title { font-size: 20pt; }
  body.pp-print-roster .pp-roster-asof { margin-top: 4px; color: #000; }
  /* a filtered list says so (mod-people.js, paint, sets data-shown while the list shows fewer people than the roster holds): "As of <date> · 14 on the roll
     · showing 5 of 14 people". \00B7 is the middle dot; an escape ends at the first space after it, so the second space is the one that shows. */
  body.pp-print-roster .pp-roster-asof[data-shown]:not([data-shown=""])::after { content: " \00B7  showing " attr(data-shown) " people"; }
  body.pp-print-roster .pp-roster-counts, body.pp-print-roster .pp-roster-counts li { border-color: #000; }
  body.pp-print-roster .pp-roster-counts span { color: #000; }
  body.pp-print-roster .pp-wrap { container-type: normal; overflow: visible; }
  body.pp-print-roster .pp-roster .table { font-size: 11px; }
  body.pp-print-roster .pp-roster .table thead { display: table-header-group; }
  body.pp-print-roster .pp-roster .table th, body.pp-print-roster .pp-roster .table td { padding: 3px 6px; border-bottom: 1px solid #999; background: transparent; color: #000; }
  body.pp-print-roster .pp-roster .table th { border-bottom-color: #000; }
  body.pp-print-roster .pp-roster .table tr { break-inside: avoid; page-break-inside: avoid; }
  body.pp-print-roster .pp-roster .table .pp-group-row { break-after: avoid; page-break-after: avoid; }
  body.pp-print-roster .pp-roster .table .pp-group-row th { padding: 8px 6px 3px; border-bottom-color: #000; box-shadow: inset 3px 0 0 #000; }
  body.pp-print-roster .pp-roster .table tbody.pp-group:not(:first-of-type) .pp-group-row th { border-top: 0; }
  body.pp-print-roster .pp-roster .pp-group-label { position: static; width: auto; max-width: none; }
  body.pp-print-roster .pp-roster .pp-name .sub, body.pp-print-roster .pp-roster .small { color: #000; font-size: 10px; }
  /* "Not applicable" and the other grey words are black on paper too: grey ink is hard to read from a laser printer */
  body.pp-print-roster .pp-roster .muted { color: #000; }
  body.pp-print-roster .pp-roster .tag { background: transparent; color: #000; border: 1px solid #000; font-size: 10px; white-space: nowrap; }
  body.pp-print-roster .pp-roster .pp-idchip { background: transparent; color: #000; border-color: #777; font-size: 10px; }
  /* a very long name, Department ID, or Supervisor name (the rules allow 120 characters) wraps in its cell, so the seven columns stay on the page */
  body.pp-print-roster .pp-roster .pp-name, body.pp-print-roster .pp-roster .pp-idchip, body.pp-print-roster .pp-roster .table td .plink { white-space: normal; overflow-wrap: anywhere; }
  /* the sentence printed when no one matches the filters keeps a little room under the black rule of the banner */
  body.pp-print-roster .pp-roster .pp-print-none { padding-top: 6px; }
  body.pp-print-roster .pp-roster .pp-status { color: #000; font-size: 11px; }
  body.pp-print-roster .pp-roster .plink { text-decoration: none; }
  /* the Inactive flag goes under the time (the time is a block, so the flag starts a new line), so the Last activity column is never wider than its
     words and the others keep their room */
  body.pp-print-roster .pp-roster .pp-activity, body.pp-print-roster .pp-roster .pp-activity > span { display: block; }
  body.pp-print-roster .pp-roster .pill { margin-top: 2px; padding: 0 6px; font-size: 10px; line-height: 1.5; }
}

/* ==========================================================================
   FTO and FTA Management (js/mod-people.js, teamFrame, ftoPage, ftaPage). The frame is the Personnel roster's (.pp-roster: the banner, the bands, the
   name cell, the circle, and Print roster, all styled in the section above) with .pp-team added. Under the banner, .pp-team-bar holds the line of
   figures of the Performance view and the Roster | Performance switch (the roster's own .pp-viewseg). The Roster view's cells are below. Colors are the
   portal's tokens; amber words are --warn, the one amber of the portal that reads at 4.5:1 or more in both themes.
   ========================================================================== */
/* the limits of the FTA role, one quiet line close under the page header (the header keeps 24px under it, and the stack's 20px gap is taken back) */
.pp-team-note { display: flex; align-items: flex-start; gap: 8px; margin-top: -26px; color: var(--muted); font-size: 14px; }
.pp-team-note svg { flex: none; margin-top: 3px; }
/* the circle's ring is the person's status here, where everyone holds the same position: green Active, grey Inactive, amber Suspended (the color of the
   Suspended pill beside it; red is the color of Removed). A ring is decoration: the pill says the status in words. */
.pp-av-st-active { border-color: var(--good); }
.pp-av-st-inactive { border-color: var(--muted); }
.pp-av-st-suspended { border-color: var(--warn); }
.pp-team-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.pp-team-sum { flex: 1 1 260px; min-width: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
/* the rows hold two or three lines, so they get a little more room above and below than the Personnel roster's, and 12px between columns (not 16), so
   the seven columns of the FTO roster fit beside the menu of a 1280px screen (about 950px) and do not turn into cards there. The first and last cells
   keep their 20px (the rules above are stronger). */
.pp-team .table:not(.pp-cards) td { padding-top: 9px; padding-bottom: 9px; }
.pp-team .table:not(.pp-cards) th, .pp-team .table:not(.pp-cards) td { padding-left: 6px; padding-right: 6px; }
/* FTA Management's Performance view has room to spare at 1280, so a column after a number column starts 16px in: the right-aligned Recruit feedback count
   and the Supervisor feedback beside it read as two columns, not one run. FTO Management's Performance view keeps 6px (it has about 13px to spare there). */
.pp-team-fta .pp-view-performance .table:not(.pp-cards) th.num + th, .pp-team-fta .pp-view-performance .table:not(.pp-cards) td.num + td { padding-left: 16px; }
/* under the name: the Department ID in its box and, for anyone not active, the status pill under it (side by side they would widen the column) */
.pp-team .pp-name .sub { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.pp-rsup { min-width: 0; line-height: 1.35; }
/* a cell with words and a button, or chips and a line under them; the button keeps its words on one line, a little narrower than a usual small button */
.pp-recs { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pp-recs .btn { gap: 6px; padding-left: 10px; padding-right: 10px; white-space: nowrap; }
/* The recruits as chips: one under the other (a row of three chips would take the room the other columns need), each chip a link at least 24px tall.
   A name of more than 16 letters (pp-long) wraps inside its chip at about 16 letters (16ch), so one long name does not widen the Recruits column: the
   seven columns of the FTO roster stay a table at 1280 with the menu open. In the stacked layout every chip may wrap. */
.pp-rchips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pp-rchips > li { min-width: 0; }
.pp-team .table td .plink.pp-rchip { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; padding: 1px 10px 1px 1px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 12.5px; font-weight: 600; line-height: 18px; text-decoration: none; white-space: nowrap; }
.pp-team .table td .plink.pp-rchip:hover { border-color: var(--gold); }
.pp-team .table td .plink.pp-rchip > span:last-child { min-width: 0; }
.pp-team .table td .plink.pp-rchip.pp-long { white-space: normal; overflow-wrap: anywhere; min-width: 14ch; border-radius: 12px; }
.pp-team .table:not(.pp-cards) td .plink.pp-rchip.pp-long > span:last-child { max-width: 16ch; }
.pp-team .table.pp-cards td .plink.pp-rchip { white-space: normal; overflow-wrap: anywhere; }
.pp-team .table.pp-cards td .plink.pp-rchip.pp-long { min-width: 0; max-width: none; }
.pp-rchip-in { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 11px; font-weight: 700; line-height: 1; }
/* a reason the person needs attention, said in amber words where its measure is: "1 due", "Under 80%", "No FTO yet", and the time of a person gone quiet */
.pp-warn, .pp-mwarn { color: var(--warn); font-weight: 700; }
.pp-quiet > span:first-child { color: var(--warn); font-weight: 700; }
/* A measure in the Roster view: the meter and the percent on the first line, then each figure on a line of its own ("7 of 9 on time", "2 overdue",
   "1 due"). The meter comes first on screen though it follows the percent in the page. It is a grid, so the cell is never wider than its widest line.
   With no value there is no meter, only the words ("No DORs yet"). The Performance view keeps the old cells. */
.pp-view-roster .pp-mcell { display: grid; grid-template-columns: 48px auto; justify-content: start; align-items: center; gap: 2px 8px; min-width: 92px; }
.pp-view-roster .pp-mcell > .pp-meter { grid-row: 1; grid-column: 1; min-width: 0; height: 7px; }
.pp-view-roster .pp-mcell > .pp-mval { grid-row: 1; grid-column: 2; }
.pp-view-roster .pp-mcell > .pp-mcount, .pp-view-roster .pp-mcell > .pp-mnote, .pp-view-roster .pp-mcell > .pp-mwarn { grid-column: 1 / -1; }
.pp-view-roster .pp-mcell.pp-mnone > .pp-meter { display: none; }
.pp-view-roster .pp-mcell.pp-mnone > .pp-mval { grid-column: 1 / -1; color: var(--muted); font-weight: 600; }
/* The Inactive flag sits under the time, as it does on paper. Side by side the two made Last activity the widest column, and the seven columns of the
   FTO roster then needed more than the room a 1280px window with the menu open gives them (about 950px), so the table turned into cards on a laptop.
   The measures above are narrower for the same reason (a 48px meter, 92px at least). */
.pp-view-roster .pp-activity { flex-direction: column; align-items: flex-start; gap: 4px; }
@media (max-width: 640px) {
  .pp-team-bar { padding: 12px 16px; }
}
/* Print roster on these pages: the chips print as plain names, and the amber and red words print black, like every other word on paper */
@media print {
  body.pp-print-roster .pp-roster .table td .plink.pp-rchip { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #000; font-size: inherit; }
  /* a recruit's name stays on one line on paper, unless it is a long one */
  body.pp-print-roster .pp-roster .table td .plink.pp-rchip:not(.pp-long) { white-space: nowrap; }
  body.pp-print-roster .pp-roster .pp-rchips { gap: 0 10px; }
  /* a long name wraps on paper too (pp-long, about 16 characters a line), and with no outline around a chip it must still read as one recruit: its second
     line starts 1em to the right of its first (a hanging indent), and the chips of a cell are 3px apart, more room than between the lines of one name */
  body.pp-print-roster .pp-team .pp-rchips { row-gap: 3px; }
  body.pp-print-roster .pp-team .table td .plink.pp-rchip > span:last-child { padding-left: 1em; text-indent: -1em; }
  /* there is no meter on paper, so a measure is one column: the percent, and its figures under it */
  body.pp-print-roster .pp-roster .pp-view-roster .pp-mcell { grid-template-columns: auto; min-width: 0; }
  body.pp-print-roster .pp-roster .pp-view-roster .pp-mcell > .pp-mval { grid-column: 1; }
  body.pp-print-roster .pp-roster .pp-mcell > .pp-mval, body.pp-print-roster .pp-roster .pp-mnote, body.pp-print-roster .pp-roster .pp-mwarn, body.pp-print-roster .pp-roster .pp-warn, body.pp-print-roster .pp-roster .pp-quiet > span:first-child { color: #000; }
  /* every word of these two rosters prints black on white: a pill (the status under the ID, the conduct, the Inactive flag) is its word in a thin black
     outline, its dot black too (the dot is the pill's own color), and a measure's value is the size of the table, not the screen's 13px */
  body.pp-print-roster .pp-team .pill { background: transparent; color: #000; border: 1px solid #000; }
  body.pp-print-roster .pp-team .pp-mcell > .pp-mval { font-size: inherit; }
  /* the Inactive flag under the time in Last activity stays a pill as wide as its word, its dot drawn: the Personnel roster's print rule makes every span
     there a block, which stretched the outline across the cell and left the dot out */
  body.pp-print-roster .pp-team .pp-activity > .pill { display: inline-flex; }
}
