@import url("fonts.cb9613fdf2de.css");
@import url("tokens.27da2b9e31d6.css");

/* The supervisor dashboard shares the marketer client's visual language but
 * inverts its priorities. The marketer screen is one state, read at arm's
 * length. This is many people's states, read at a desk — so it runs on paper
 * rather than a state field, and trades scale for density. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-display);
  font-size: var(--t-md);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

/* ===== Top bar ============================================================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: var(--ink);
  color: var(--on-dark);
  border-bottom: 4px solid var(--signal);
}

.topbar__mark {
  margin: 0;
  font-size: var(--t-lg);
  font-weight: var(--w-loud);
  font-stretch: 125%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  font-size: var(--t-sm);
  color: var(--on-dark-dim);
}

.topbar__user {
}

/* ===== Shell =============================================================== */
.shell {
  max-width: 76rem;
  margin: 0 auto;
  padding: var(--s-6) var(--s-5) var(--s-7);
}

.page__eyebrow {
  margin: 0 0 var(--s-2);
  font-size: var(--t-xs);
  font-weight: var(--w-strong);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--slate);
}

.page__title {
  margin: 0 0 var(--s-7);
  font-size: var(--t-xxl);
  font-weight: var(--w-loud);
  /* Was 118%: the extra width was holding up a line of capitals. In sentence
     case it just reads as stretched. */
  font-stretch: 105%;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

/* ===== Panel =============================================================== */
.panel {
  background: var(--paper-raised);
  /* A hairline instead of a full border, and depth doing the separating. Eleven
     1px outlines on a page is what made every element read as a box stamped out
     of the same sheet. */
  border: 1px solid rgba(14, 18, 22, 0.06);
  border-radius: var(--radius-panel);
  box-shadow: var(--lift);
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-5) var(--s-4);
  border-bottom: 1px solid rgba(14, 18, 22, 0.06);
}

.panel__title {
  margin: 0;
  font-size: var(--t-xs);
  font-weight: var(--w-strong);
  color: var(--slate);
}

.panel__body {
  padding: var(--s-6) var(--s-5);
}

/* ===== Empty state =========================================================
 * An empty screen is an invitation, not an apology. It says what will live
 * here and what unlocks it.
 */
.empty {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  align-items: flex-start;
  max-width: 46ch;
}

.empty__title {
  margin: 0;
  font-size: var(--t-xl);
  font-weight: var(--w-strong);
  font-stretch: 110%;
}

.empty__body {
  margin: 0;
  color: var(--slate);
  line-height: 1.5;
}

/* ===== Definition rows ===================================================== */
.rows {
  margin: 0;
  border-top: 1px solid var(--rule-light);
}

.rows__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--rule-light);
}

.rows__key {
  font-size: var(--t-sm);
  color: var(--slate);
}

.rows__value {
  font-family: var(--font-mono);
  font-size: var(--t-md);
  font-variant-numeric: tabular-nums;
}

/* ===== Buttons ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 var(--s-5);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: var(--t-md);
  font-weight: var(--w-strong);
  font-stretch: 104%;
  cursor: pointer;
}

.btn--primary {
  background: var(--ink);
  color: var(--on-dark);
}

.btn--quiet {
  background: transparent;
  border-color: var(--rule-control);
  color: var(--ink);
}

/* Taking something back that people have already been told. Outlined, not
   filled — `.flag` sets the precedent for `--danger` as an edge rather than a
   field, and this action is reversible: unpublishing returns a run to draft and
   the next pull rebuilds it. Filling it would rank it with a deletion.

   ⚠ It exists because `class="btn"` alone sets no background and no colour, so
   Unpublish rendered as plain text with padding — the most consequential control
   on the page, looking like a caption. */
.btn--danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn--danger:hover {
  background: var(--danger);
  color: var(--on-dark);
}

.btn--bare {
  min-height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--on-dark-dim);
  font-family: var(--font-display);
  font-size: var(--t-sm);
  font-weight: var(--w-strong);
  cursor: pointer;
}

.btn--bare:hover {
  color: var(--on-dark);
}

/* ===== Sign in ============================================================= */
.signin {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: var(--s-5);
  background: var(--ink);
}

.signin__card {
  width: 100%;
  max-width: 24rem;
}

.signin__mark {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 3rem);
  font-weight: var(--w-loud);
  font-stretch: 125%;
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--on-dark);
}

.signin__rule {
  width: 100%;
  height: 6px;
  margin-top: var(--s-3);
  background: var(--signal);
}

.signin__lede {
  margin: var(--s-4) 0 var(--s-6);
  font-size: var(--t-md);
  color: var(--on-dark-dim);
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.form .btn--primary {
  background: var(--on-dark);
  color: var(--ink);
}

.f {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.f label,
.f__label {
  font-size: var(--t-xs);
  font-weight: var(--w-strong);
  color: var(--on-dark-dim);
}

.f input {
  min-height: 3rem;
  padding: 0 var(--s-3);
  border: 0;
  border-bottom: 2px solid var(--rule-dark);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: var(--t-lg);
}

.f input:focus {
  outline: none;
  border-bottom-color: var(--signal);
}

.f .helptext,
.f ul {
  font-size: var(--t-sm);
  color: var(--on-dark-dim);
}

.alert {
  margin: 0 0 var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-left: 4px solid var(--signal);
  background: rgba(255, 196, 0, 0.12);
  color: var(--on-dark);
  font-size: var(--t-sm);
  list-style: none;
}

.alert li {
  margin-left: 0;
}

/* ===== Table ===============================================================
 * Supervisor-facing data. Numerals are mono and tabular so columns align on
 * the digit, which is the whole point of scanning a list of durations.
 */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-md);
}

.table th {
  padding: 0 var(--s-4) var(--s-3) 0;
  border-bottom: 1px solid var(--rule-light);
  text-align: left;
  font-size: var(--t-xs);
  font-weight: var(--w-strong);
  color: var(--slate);
}

.table td {
  padding: var(--s-4) var(--s-4) var(--s-4) 0;
  border-bottom: 1px solid rgba(14, 18, 22, 0.05);
}

.table td.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.table tr:last-child td {
  border-bottom: 0;
}

/* "We have not heard from them", which must not look like "they stopped moving"
   (SPEC.md §8). Signal yellow is the one colour reserved for attention. */
.stale {
  margin-left: var(--s-2);
  padding: 0 var(--s-2);
  border: 1px solid var(--signal);
  border-radius: var(--radius, 2px);
  font-size: var(--t-xs, 0.6875rem);
  font-weight: var(--w-strong);
  white-space: nowrap;
}

.muted {
  color: var(--slate);
}

.panel__foot {
  margin: var(--s-5) 0 0;
  font-size: var(--t-sm);
  color: var(--slate);
}

/* A sentence above a table, saying how to read it. Used by four pages and
 * defined by none of them until now — the notes rendered as ordinary body text,
 * indistinguishable from the content they were introducing. */
.panel__note {
  margin: 0 0 var(--s-4);
  font-size: var(--t-sm);
  color: var(--slate);
  max-width: 68ch;
}

/* ADR-0004's shape in CSS: the run is warned about, never withheld. The rule and
 * the darker ink make it read as a caution beside the table it sits above,
 * rather than as an error replacing it.
 *
 * `--danger` carries it, and so does the wording — the strong opening clause
 * says what is wrong in words, so the warning survives being read by somebody
 * who cannot distinguish the colour (WCAG 1.4.1). */
.panel__note--warn {
  padding: var(--s-3) var(--s-4);
  border-left: 4px solid var(--danger);
  background: var(--paper-raised);
  color: var(--ink);
}

/* T11c — the map on a person's page. Leaflet needs a height in CSS: the
   container is empty until the library builds into it, so without one it
   collapses to nothing and the map never appears. */
.map {
  height: 26rem;
  border: 1px solid var(--rule-light);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
}

/* T12b — the date range above the history table.
   ⚠ Its own classes, not `.form` / `.f` / `.alert`. Those dress the sign-in
   card, which stands on ink: white labels, white input text, a fill that is six
   percent white. Borrowed onto a pale panel they render white on white, which
   is exactly how this shipped once — the fields were present and invisible. */
.filter {
  display: flex;
  align-items: flex-end;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}

.filter__field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.filter__label {
  font-size: var(--t-xs);
  font-weight: var(--w-strong);
  color: var(--slate);
}

/* Selects and textareas were missing, so S2b's create form rendered unstyled
   controls beside styled ones. `padding: 0` cannot apply to a textarea, which
   needs room on both axes. */
.filter input,
.filter select,
.filter textarea {
  min-height: 2.5rem;
  padding: 0 var(--s-3);
  border: 1px solid var(--rule-control);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--t-md);
}

.filter textarea {
  padding: var(--s-2) var(--s-3);
  /* Language, not measurement — tokens.css reserves mono for the second. */
  font-family: var(--font-display);
  resize: vertical;
}

.filter input:focus,
.filter select:focus,
.filter textarea:focus {
  outline: 2px solid var(--signal);
  outline-offset: 1px;
}

/* A create form, not a filter bar. `.filter` wraps controls in a ragged flex row,
   which reads fine for two or three and badly for six — the eye gets no columns
   to follow. Three fixed columns give it a shape.

   Must stay after `.filter` in this file: same specificity, so source order is
   what makes `display: grid` win over `display: flex`. */
.filter--grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: var(--s-4);
}

/* Three ~200px columns do not fit a phone, and a squeezed select is unusable.
   One column below the fold of a tablet. */
@media (max-width: 760px) {
  .filter--grid {
    grid-template-columns: 1fr;
  }
}

/* The button and any form-wide error are not fields, so they take the full width
   rather than eating a column and pushing a real field onto the next row. */
.filter--grid > .btn,
.filter--grid > .notice {
  grid-column: 1 / -1;
}

.filter--grid > .btn {
  justify-self: start;
}

/* The two per-row links, kept on one line. Left to wrap they broke mid-cell and
   the rows lost their rhythm — which is what a select in each row used to do
   before these replaced it. */
/* ===== Roster blocks ======================================================
 * `manager → location → marketers`. Three levels need three weights, and the
 * page's own headings have to stay louder than all of them — `--w-loud` belongs
 * to the wordmark and a page title (T14.2), so none of this reaches for it.
 *
 * Depth is carried by indentation on the first cell rather than by colour, so
 * it survives a printout and does not depend on anybody distinguishing two
 * shades of grey.
 */
.roster__group + .roster__group {
  border-top: 2px solid var(--rule-control);
}

/* The manager's own row, and the block's header. A real data row — it carries
   their shift, elapsed and battery — so it is weighted rather than filled, which
   would fight the site headings below it. */
.roster__manager > td,
.roster__manager > th {
  padding-top: var(--s-4);
  font-weight: var(--w-strong);
  text-align: left;
}

.roster__site > th {
  padding: var(--s-3) var(--s-3) var(--s-2) var(--s-5);
  background: var(--paper-raised);
  color: var(--ink);
  font-size: var(--t-sm);
  font-weight: var(--w-strong);
  text-align: left;
}

/* The count is the reason grouping does not cost a supervisor the ability to
   spot absences, so it sits at the far end of the heading where the eye lands
   after the name. `float` rather than flex: this is a table cell, and the
   heading has to stay one line of text for a screen reader to read it as one. */
.roster__count {
  float: right;
  padding-left: var(--s-4);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  color: var(--slate);
}

/* Third level. Indented past the site heading so a marketer reads as belonging
   to the site above rather than to the manager two rows up. */
.roster__person > td:first-child {
  padding-left: var(--s-6);
}

@media (max-width: 640px) {
  /* The count would collide with a long site name, so it takes its own line. */
  .roster__count {
    float: none;
    display: block;
    padding-left: 0;
  }
}

/* ===== Small edit forms ====================================================
 * `.filter` is a filter *bar*: it bottom-aligns so a submit button sits level
 * with the inputs beside it. That is wrong for a form, and visibly so — the
 * moment one field carries help text and another does not, `flex-end` pushes
 * the field without it downwards and the controls stop lining up.
 *
 * A form wants the opposite: tops aligned, so labels sit on one line and
 * controls sit on the next. Keep `.filter` on the element for the control
 * styling and add this for the layout — same specificity, so it has to stay
 * *after* `.filter` in this file to win.
 */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  align-items: start;
  gap: var(--s-4);
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Full width, because neither is a field. A grid gives every direct child a
   cell, so a bare button would eat a column and push a real field onto the
   next row. */
.form-row > .form-actions,
.form-row > .notice {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.row-actions {
  display: inline-flex;
  gap: var(--s-2);
  white-space: nowrap;
}

/* ===== Pager =============================================================
 * Page controls under a table. The position text sits between the two links
 * rather than beside them, so the pair does not have to be read as a unit to
 * work out which way is which.
 *
 * ⚠ **The disabled end is a `<span>`, never a dimmed link.** A link that goes
 * nowhere is one a keyboard user tabs to and presses for no result; this holds
 * the width so the row does not jump as the reader moves through the pages.
 */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-4);
}

.pager__where {
  font-size: var(--t-sm);
  color: var(--slate);
}

.pager__end {
  font-size: var(--t-sm);
  color: var(--slate);
  opacity: 0.5;
}

/* On paper the reader has whichever page was on screen and cannot press
   either link, so the controls are noise between the table and the next panel.
   The position text stays: it says which slice of the range this sheet is. */
@media print {
  .pager a,
  .pager__end {
    display: none;
  }
}

/* A second line inside a cell — a muted address under a site's name. `.muted` is
   only a colour, so without this the address sat on the name's line.

   ⚠ **Was `.block`, which cost half a day.** A bare one-word utility setting
   `display` is a landmine in a shared stylesheet: the roster's grouped
   `<tbody class="block">` picked it up, computed as `display: block` instead of
   `table-row-group`, and dropped the entire table body out of the table layout —
   so its rows stopped sharing column widths with `<thead>` and every value sat
   under the wrong heading. The markup was correct throughout; nothing in the
   suite could see it. Utilities get names that say where they belong. */
.cell-line {
  display: block;
}

/* A list of things inside a table cell — what a new hire still needs, and
   anything else that is genuinely several items rather than one value with a
   second line.

   ⚠ **A list rather than stacked `.cell-line` spans**, which is what this
   replaced. Blocks stack the same way on screen, but a screen reader announces
   "list, 3 items" only for a real list — otherwise three outstanding checks are
   read as one run-on sentence with no boundaries and no count. `.cell-line` is
   for a second line under a value; this is for N of them. */
.cell-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cell-list li {
  display: block;
}

/* A field-level form error. `--danger` carries it, not colour alone: the message
   is words, and it sits directly under the control it belongs to. */
.field-error {
  font-size: var(--t-sm);
  font-weight: var(--w-strong);
  color: var(--danger);
}

/* The pale-ground twin of `.alert`, which is white text by design. */
.notice {
  margin: 0 0 var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-left: 4px solid var(--danger);
  background: rgba(163, 45, 28, 0.08);
  color: var(--ink);
  font-size: var(--t-sm);
}

/* T12b — the history row whose shift is drawn on the map above.
   ⚠ First it was --paper-raised, the colour of the panel behind it: a highlight
   nobody could see, with every test still green. Then it was inverted to ink,
   which was legible and far too loud for "you are looking at this one".
   A grey band and a solid edge say it without shouting.
   ⚠ Not signal yellow: tokens.css keeps that for "we have lost them", and a
   selected row is not an alarm. */
.day[aria-current="true"] > td,
.day[aria-current="true"] + .detail > td {
  background: var(--rule-light);
}

.day[aria-current="true"] > td {
  font-weight: 600;
}

.day[aria-current="true"] > td:first-child,
.day[aria-current="true"] + .detail > td:first-child {
  box-shadow: inset 3px 0 0 var(--ink);
}


/* T11 — current state, in the colours tokens.css already assigns to it:
   --field is on shift, --halt is on break. "Not checked in" gets no badge at
   all; absence is not a state to colour in, and it is the one row that should
   stay quiet. */
.state {
  display: inline-block;
  padding: 0.15rem var(--s-2);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--on-dark);
  font-size: var(--t-xs);
  font-weight: var(--w-strong);
  white-space: nowrap;
}

.state--break {
  background: var(--halt);
}

/* A row whose facts moved on the last poll. Green because it means "this just
   arrived", not because it means on shift — it fades out, and the badge does
   not, which is what keeps the two apart. */
@keyframes row-fresh {
  from {
    background-color: rgba(10, 107, 74, 0.3);
  }
  to {
    background-color: transparent;
  }
}

.row--fresh > td {
  animation: row-fresh 1.8s ease-out;
}

/* A repeating flash is exactly the motion this setting is asking us to stop. */
@media (prefers-reduced-motion: reduce) {
  .row--fresh > td {
    animation: none;
  }
}

/* T12b — the map panel is an anchor target: arriving flush against the top of
   the window hides its own heading, so the browser is asked to stop short. */
#where {
  scroll-margin-top: var(--s-4);
}

/* T12b — "Comment": a shift the system wants a supervisor to look at (§4.3).
   Red-bordered rather than filled, so a table with several does not read as a
   page full of alarms. The reasons are always in the markup and revealed on
   hover *or* focus — hover alone would make them mouse-only. */
.flag {
  position: relative;
  display: inline-block;
  padding: 0.15rem var(--s-2);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  color: var(--danger);
  font-size: var(--t-xs);
  font-weight: var(--w-strong);
  white-space: nowrap;
  cursor: help;
}

.flag__note {
  position: absolute;
  left: 0;
  bottom: calc(100% + var(--s-2));
  z-index: 2;
  width: max-content;
  max-width: 22rem;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-dark);
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;

  /* Hidden from the eye, not from the accessibility tree: `display: none`
     would take it away from screen readers too. */
  opacity: 0;
  visibility: hidden;
}

.flag:hover .flag__note,
.flag:focus .flag__note,
.flag:focus-within .flag__note {
  opacity: 1;
  visibility: visible;
}

.flag:focus {
  outline: 2px solid var(--signal);
  outline-offset: 1px;
}

/* T12b.1 — a day of shifts, folded away behind its own expander. */
.expander {
  min-width: 1.5rem;
  min-height: 1.5rem;
  margin-right: var(--s-2);
  padding: 0;
  border: 1px solid var(--rule-control);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  line-height: 1;
  cursor: pointer;
}

.expander:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 1px;
}

.detail > td {
  padding-top: 0;
}

.parts {
  margin: 0;
  padding: 0 0 var(--s-2) var(--s-6);
  list-style: none;
  font-size: var(--t-sm);
}

.parts__shift {
  padding: var(--s-1) 0;
}

.parts__shift--drawn {
  font-weight: var(--w-medium);
}

.parts__break {
  display: inline-block;
  margin-left: var(--s-3);
  color: var(--slate);
}

/* Present for a screen reader, absent for everyone else. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* T14a — the reason filters above the review queue. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: 0 0 var(--s-5);
}

.chip {
  padding: 0.2rem var(--s-3);
  border: 1px solid var(--rule-control);
  border-radius: var(--radius);
  font-size: var(--t-sm);
  text-decoration: none;
  color: var(--ink);
}

.chip--on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-dark);
}

/* The same red-bordered mark as the history column, minus the hover note —
   here the reason is the column, not a footnote to it. */
.flag--static {
  margin: 0 var(--s-1) var(--s-1) 0;
  cursor: default;
}

/* ===== Chrome and wide tables ==============================================
 * Added after an audit of what shipped, not to a task. See
 * tests/test_dashboard_chrome.py for what each of these is answering.
 */

/* Present for a keyboard, out of the way for everyone else. Without it every
   page starts by tabbing through the whole header. */
.skip {
  position: absolute;
  left: var(--s-4);
  top: -4rem;
  z-index: 10;
  padding: var(--s-2) var(--s-4);
  background: var(--signal);
  color: var(--ink);
  font-weight: var(--w-strong);
  transition: top 120ms ease-out;
}

.skip:focus {
  top: var(--s-2);
}

@media (prefers-reduced-motion: reduce) {
  .skip {
    transition: none;
  }
}

/* `main` takes focus when the skip link is followed; it should not then draw a
   ring around the entire page. */
.shell:focus {
  outline: none;
}

.topbar__nav {
  display: flex;
  /* ⚠ **Wraps, since S15a made it eight items.** It was built for seven and
     had no wrap, so the eighth was pushed out of the bar and the Settings link
     was simply not on screen — the page was reachable by URL the whole time.
     A nav that silently drops its last item is worse than one that is two lines
     tall, and this is the third appearance of the same lesson: nothing in the
     suite renders CSS, so every test passed while the link was invisible. */
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-4);
  margin-right: auto;
  font-size: var(--t-sm);
}

/* A link breaking mid-word reads as two nav items. Wrapping happens between
   them, never inside one. */
.topbar__nav a {
  white-space: nowrap;
}

.topbar__nav a {
  color: var(--on-dark-dim);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.topbar__nav a:hover {
  color: var(--on-dark);
}

/* Not colour alone: the current section is underlined as well as brightened. */
.topbar__nav a[aria-current='page'] {
  color: var(--on-dark);
  border-bottom-color: var(--signal);
}

/* A nine-column table on a page with no breakpoints takes the whole document
   sideways with it. It scrolls inside its own panel instead — and carries
   `tabindex` in the markup, because a scroll region nobody can focus is one a
   keyboard user cannot scroll. */
.table-wrap {
  overflow-x: auto;
  /* Only the scroll container itself, so the ring traces the region rather than
     every cell inside it. */
  scrollbar-width: thin;
}

.table-wrap:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.table {
  min-width: 44rem;
}

/* Below this the shell's own padding is most of the screen. */
@media (max-width: 40rem) {
  .shell {
    padding: var(--s-5) var(--s-4) var(--s-6);
  }

  .topbar {
    flex-wrap: wrap;
    gap: var(--s-3);
  }

  .topbar__nav {
    order: 3;
    width: 100%;
    margin-right: 0;
  }
}

/* ===== Rhythm ==============================================================
 * T14.2. Panels were spaced with `style="margin-top"` in three templates at
 * one-and-a-half rems — close enough that the page read as one dense block. A
 * stack owns the gap instead, so it is a decision in one place rather than an
 * inline value repeated per page.
 */
.stack > * + * {
  margin-top: var(--s-6);
}

/* Chips and badges were as generously padded as everything else, which is what
   makes a row of them look like a toolbar rather than a set of labels. */
.chip {
  padding: 0.15rem var(--s-3);
}

.state,
.flag {
  padding: 0.1rem var(--s-2);
}

/* ===== Buttons, second pass ================================================
 * T14.4. `.btn` is 3rem tall because the marketer taps it standing up, gloved
 * (`--tap`). A supervisor is at a desk with a mouse, and a 48px control in a
 * table row is a slab — one per row turned the queue into a column of boxes.
 */
.btn--sm {
  min-height: 2.125rem;
  padding: 0 var(--s-3);
  gap: var(--s-2);
  font-size: var(--t-sm);
  border-width: 1px;
}

.btn__icon {
  width: 0.875em;
  height: 0.875em;
  flex: none;
}

/* Quiet until reached for: the confirm sits on every row, and a row of filled
   buttons competes with the data it is meant to be acting on. */
.btn--quiet:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-dark);
}

.btn--primary:hover {
  background: var(--ink-raised);
}

.btn:active {
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  .btn:active {
    transform: none;
  }
}

/* The decision at the foot of a panel, with the sentence that says what pressing
 * it does. Inline rather than stacked: the button and its consequence read as
 * one thing, which is the point when the consequence is "everybody sees this". */
.panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin: 0 0 var(--s-4);
}

/* One decision and its sentence, kept together as a single item in the row. */
.action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
}

/* Actions that read rather than decide. Printing a roster changes nothing, so
   it sits opposite Publish and Unpublish instead of beside them — the side of
   the row is doing the work a label would otherwise have to.

   `margin-left: auto` rather than the row's `justify-content`, so it stays right
   even when there is no decision beside it: a failed run offers no publish form
   at all, and the button must not slide across to fill the gap. */
.action--end {
  margin-left: auto;
}

/* ===== Flashes ============================================================= */
/* One-shot feedback for an act that happened somewhere else and redirected —
 * publishing a run, or being refused one. Full-bleed under the top bar so it is
 * seen before the page it is about, rather than competing with a panel. */
.flashes {
  margin: 0;
  padding: var(--s-3) var(--s-5) 0;
}

.flash {
  margin: 0 0 var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-left: 4px solid var(--rule-control);
  background: var(--paper-raised);
  font-size: var(--t-sm);
  max-width: 88ch;
}

/* `--danger` carries it and so does the wording: every refusal this renders
 * states the reason in a sentence, so the message survives being read by
 * somebody who cannot distinguish the colour (WCAG 1.4.1). */
.flash--error {
  border-left-color: var(--danger);
}

/* --- Performance chart (S12c) --------------------------------------------
   Server-rendered inline SVG, not a library: `script-src` is 'self', and this
   picture needs no interaction. The shapes carry the meaning, so it survives a
   printout and colour blindness — the same rule the map's marker vocabulary
   follows.

   ⚠ A day nobody reported sits on the bottom edge as a hollow mark and breaks
   the line. It is not a zero, and the two must never look alike: zero is a
   measurement that moves somebody, unknown is an outage that must not. */
.chart {
  margin-bottom: var(--s-4);
}

.chart svg {
  display: block;
  width: 100%;
  height: 160px;
  overflow: visible;
}

/* The target. Dashed, because it is a reference rather than a reading — the
   line that moves is the measurement. */
.chart__target {
  stroke: var(--rule-control);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.chart__line {
  fill: none;
  stroke: var(--field);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  /* The viewBox is stretched to the panel's width, so without this the stroke
     is stretched with it and reads thicker on a wide screen than a narrow one. */
  vector-effect: non-scaling-stroke;
}

.chart__point {
  fill: var(--field);
  stroke: none;
}

/* Hollow, on the bottom edge: "we asked and heard nothing", not "they achieved
   nothing". Same idiom as the map, where hollow already means uncertain. */
.chart__point--miss {
  fill: var(--paper-raised);
  stroke: var(--slate);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.chart__key {
  margin: var(--s-3) 0 0;
  color: var(--slate);
  font-size: 0.8125rem;
}

/* --- Set a value without leaving the row (S15) -----------------------------
   The sales-target form appears in a table cell on the Postings screen and in
   the "Right now" list on a marketer's page, so it has to sit on one line and
   not push either layout around.

   ⚠ Styled deliberately rather than left to the browser: `tests/` renders
   markup, never CSS, so an unstyled control here would pass every test and look
   broken on the page — which is how three visual faults shipped before. */
.inline-form {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

/* Matches `.filter input`'s treatment — same border, radius and mono face — at
   the width a two- or three-digit target actually needs. */
.input--tiny {
  /* ⚠ **A total width, not a content width.** `box-sizing: border-box` is set
     globally at the top of this file, so the first version's `width: 5ch` was
     45px *including* 16px of padding and 2px of border — 27px of content, which
     a number input then shares with its spin buttons. The result held one digit
     of "10", and no test could see it.

     4.5rem leaves ~54px of content: three digits, a caret, and room to spare. */
  width: 4.5rem;
  min-height: 2.25rem;
  padding: 0 var(--s-2);
  border: 1px solid var(--rule-control);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--t-md);
  text-align: right;
}

.input--tiny:focus {
  outline: 2px solid var(--signal);
  outline-offset: 1px;
}

/* The spin buttons sit *inside* the box and overlap right-aligned digits. A
   target is typed, not nudged one at a time, so they cost width and legibility
   and buy nothing. Arrow keys still step the value. */
.input--tiny {
  appearance: textfield;
  -moz-appearance: textfield;
}

.input--tiny::-webkit-outer-spin-button,
.input--tiny::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

/* The target's hint sits under the field in the "Right now" list, where a
   `.rows__value` is a block, rather than trailing off the end of the line. */
.rows__value .inline-form + .muted {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--t-sm);
}

/* The settings link carries a gear beside its label (S15a). Flex so the mark
   sits on the text baseline's optical centre rather than the line box's top,
   which is where a bare inline SVG lands. */
.topbar__nav-settings {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* --- Create-form details the grid did not cover (S15a) ---------------------
   The settings form is the first to carry help text under every control and a
   set of checkboxes. Both were unreadable without these: the hint ran inline
   with the label, and `.filter input` above puts `min-height: 2.5rem` and
   horizontal padding on *every* input — which turns a checkbox into a wide flat
   box with its label stranded on the line below. */
.filter__hint {
  font-size: var(--t-xs);
  line-height: 1.4;
  color: var(--slate);
}

/* A field that will not fit a third of the row — the weekday checkboxes. */
.filter--grid > .filter__field--wide {
  grid-column: 1 / -1;
}

/* The weekday group. A `fieldset` carries a browser border and padding of its
   own, which would draw a box around one field in a grid of seven. */
.checkset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.checkset__items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
}

/* Box and day on one line, and the word itself clickable — a checkbox alone is
   a small target. */
.checkset__item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-display);
  font-size: var(--t-md);
  color: var(--ink);
}

/* ⚠ Undoes the text-input sizing above for checkboxes and radios. Without it
   the box is 2.5rem tall with 0.75rem of side padding and the label cannot sit
   beside it. */
.filter input[type='checkbox'],
.filter input[type='radio'] {
  min-height: 0;
  width: 1rem;
  height: 1rem;
  padding: 0;
  margin: 0;
  accent-color: var(--field);
}

/* --- The rulebook, read (S15a) ---------------------------------------------
   Not `.rows`. That is a flex row with `justify-content: space-between` and a
   monospace value — right for "Employee id → EMP0001", wrong for a figure that
   needs a sentence under it: the prose came out monospace, hard against the
   right edge, running on from the number it explained.

   A two-column grid instead. The first column is wide and fixed so the names
   form a straight edge; the second stacks the value over its explanation. */
.settings {
  margin: 0;
  border-top: 1px solid var(--rule-light);
}

.setting {
  display: grid;
  /* Wide enough for "Days at the threshold before moving" on one line at the
     name's own size, which is the longest of the seven. */
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: var(--s-2) var(--s-5);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--rule-light);
}

.setting__name {
  font-size: var(--t-sm);
  font-weight: var(--w-strong);
  color: var(--slate);
}

/* Mono for the figure, because it is a measurement — tokens.css reserves the
   mono face for exactly that. */
.setting__value {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--t-md);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* The sentence under it is language, not measurement, so it changes face. Held
   to a readable measure rather than running the full width of a wide screen. */
.setting__what {
  display: block;
  max-width: 62ch;
  margin-top: var(--s-2);
  font-family: var(--font-display);
  font-size: var(--t-sm);
  font-variant-numeric: normal;
  line-height: 1.5;
  color: var(--slate);
}

/* One column on a narrow screen: 20rem of names plus a sentence does not fit a
   phone, and squeezing the second column turns the prose into a ladder. */
@media (max-width: 760px) {
  .setting {
    grid-template-columns: 1fr;
  }
}

/* --- A credential, shown once (task 48) ------------------------------------
   The only string on this dashboard that exists nowhere else. It is read aloud
   across a lobby or copied onto paper, so it is set large, spaced, and in the
   mono face tokens.css reserves for things that are transcribed rather than
   read — the same reason a measurement gets it.

   `user-select: all` so one click takes the whole thing: a partial selection
   that drops the last group is a support call, and the hyphens make a
   double-click stop early. */
.credential {
  font-family: var(--font-mono);
  font-size: var(--t-xxl);
  font-weight: var(--w-strong);
  letter-spacing: 0.12em;
  text-align: center;
  padding: var(--s-4) var(--s-3);
  margin: 0;
  border: 1px solid var(--rule-light);
  border-radius: var(--radius-panel);
  background: var(--paper-raised);
  color: var(--ink);
  user-select: all;
  overflow-wrap: anywhere;
}

/* No phone override: `--t-xxl` is `clamp(1.75rem, 7vw, 2.5rem)`, so it already
   comes down on a narrow screen. A hand-rolled breakpoint here would fight the
   token and drift from it the next time the scale is tuned. */

/* --- On paper (S17) --------------------------------------------------------
   The Postings roster is printed and handed to a manager, and "Save as PDF" in
   the browser's own print dialog is what makes it a file. No PDF library on
   either side: a second renderer would be a dependency whose output could drift
   from what the screen shows, and the screen is the thing people check against.

   Everything that decides is hidden; everything that reports stays. */
.print-only {
  display: none;
}

/* ===== Paper =============================================================
 * Two utilities for the one page that is *printed and handed over* rather than
 * merely printable: the run review sheet (task 45).
 *
 * ⚠ **`.no-paper` is not a synonym for "less important".** On the posting sheet
 * it drops the four columns a supervisor decides by — where somebody moved from,
 * why, their attainment and their target — because a sheet that circulates on
 * paper carries them past everybody who needs them. §8.2's whole concern is a
 * performance figure travelling further than the decision it was for, and a
 * printout is the furthest it travels. What stays is the four facts the person
 * holding the sheet needs: who, where, whose site, and from when.
 *
 * ⚠ **`.paper-cell` sets `table-cell`, and it is only ever a `th` or a `td`.**
 * `.print-only` above sets `display: inline`, which on a table cell drops it out
 * of the table layout and takes its column's width with it — the same failure
 * `.cell-line`'s note records from the old `.block` utility. The name says where
 * it belongs so nobody reaches for it on a paragraph.
 */
.paper-cell {
  display: none;
}

@media print {
  /* Ink on paper. The dashboard's dark chrome would print as a solid block. */
  body {
    background: #fff;
    color: #000;
  }

  /* Navigation, identity, and every control that changes something. A printed
     button is a rectangle nobody can press, and a printed form field is an
     empty box that reads as missing data. */
  .topbar,
  .flashes,
  .panel__actions,
  .filter,
  .inline-form,
  .expander,
  [data-print] {
    display: none !important;
  }

  /* The Move link goes: on paper it is underlined text implying an action. */
  .table td:last-child a {
    display: none;
  }

  .print-only {
    display: inline;
  }

  /* Task 45. The posting sheet carries four fields and nothing else. */
  .no-paper {
    display: none !important;
  }

  .paper-cell {
    display: table-cell;
  }

  /* Panels are cards on screen; on paper the borders and shadows are noise
     between the reader and the table. */
  .panel {
    border: 0;
    box-shadow: none;
    break-inside: auto;
  }

  /* A table that scrolls sideways on screen must not be clipped on paper. */
  .table-wrap {
    overflow: visible !important;
  }

  .table {
    width: 100%;
    font-size: 10pt;
  }

  /* A row split across a page break is one somebody misreads. The header
     repeats on every sheet so the columns are never anonymous. */
  .table tr {
    break-inside: avoid;
  }

  .table thead {
    display: table-header-group;
  }

  /* The muted greys are legible on a lit screen and disappear on paper. */
  .muted,
  .setting__what {
    color: #333;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}
