/* Mobile first. Every layout rule here starts from a phone and widens with min-width queries —
   most of the 6,000 drivers will only ever see this on a phone, in a yard, in daylight. */
:root {
  --navy: #13407a;
  --navy-dark: #0e3161;
  --yellow: #f6b40e;
  --ink: #10213a;
  --muted: #5b6b85;
  --line: #dde3ec;
  --bg: #f4f6f9;
  --card: #ffffff;
  --danger: #b4232a;
  --ok: #176b3a;
  /* Corner radius: one scale, smaller as you go inward, so nothing is rounder than what holds it.
     Pick from these five; when an inner box sits closer to its outer edge than the outer radius,
     use the outer radius minus the gap (concentric), as .pick-panel does for its search box. */
  --r-card: 14px;    /* cards, popups */
  --r-box: 12px;     /* a box inside a card */
  --r-field: 10px;   /* inputs, messages, lists */
  --r-btn: 8px;      /* buttons, chips with text */
  --r-chip: 6px;     /* small things: logo, thumbnails, a page in the viewer */
  --radius: var(--r-card);   /* older name, same value */
  --shadow: 0 1px 3px rgba(16, 33, 58, .08), 0 6px 20px rgba(16, 33, 58, .06);
}

* { box-sizing: border-box; }

/* The HTML `hidden` attribute must win over a display rule set by a class — .btn sets inline-flex, and
   without this a hidden button stays on screen. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Respect the notch/home indicator so nothing sits under the iOS gesture bar. */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ── Header ───────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar img { height: 34px; width: auto; display: block; background: #fff; border-radius: var(--r-chip); padding: 3px 6px; }
.topbar h1 { font-size: 1rem; margin: 0; font-weight: 600; flex: 1; min-width: 0; }
.topbar .who { font-size: .8rem; opacity: .85; display: block; font-weight: 400; }
.topbar a, .topbar button.link {
  color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600;
  background: rgba(255, 255, 255, .14); border: 0; padding: 8px 12px; border-radius: var(--r-btn); cursor: pointer;
  min-height: 0;   /* a header button must match the header links, not the 48px tap size of page buttons */
}

/* ── Layout ───────────────────────────────────────────── */
main { padding: 16px; max-width: 1100px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
.muted { color: var(--muted); font-size: .88rem; }

/* ── Bid band ─────────────────────────────────────────── */
/* Deliberately louder than anything else on the page: it is the one thing a driver is meant to do
   after reading the trips, and it competes with a list of documents for attention. */
.bid-band {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 18px; margin-bottom: 16px;
  background: var(--navy); color: #fff; text-decoration: none;
  border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 6px solid var(--yellow);
}
.bid-band:hover, .bid-band:focus-visible { background: var(--navy-dark); }
.bid-label { font-size: 1.1rem; font-weight: 700; }
.bid-label::after { content: ' \2197'; }
.bid-sub { font-size: .84rem; opacity: .85; }

/* ── Login ────────────────────────────────────────────── */
.login-wrap { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 18px; }
.login-wrap .logo { width: min(260px, 70vw); }
.login-card { width: 100%; max-width: 26rem; }

/* ── Form controls ────────────────────────────────────── */
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
input, select, button, textarea { font: inherit; }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=search], input[type=date], input[type=time], input[type=month], select {
  width: 100%;
  /* 16px minimum: anything smaller makes iOS Safari zoom the whole page on focus. */
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: #fff;
  color: var(--ink);
  margin-bottom: 14px;
  min-height: 48px;
}
/* The eye on a password box (public/js/show-pw.js). The wrapper takes the box's bottom gap so the
   eye centres on the box itself. */
.pw-wrap { position: relative; margin-bottom: 14px; }
.pw-wrap input { margin-bottom: 0; padding-right: 52px; }
button.pw-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 40px; min-height: 0; padding: 0; border: 0; border-radius: var(--r-btn);
  background: none; color: var(--muted); display: grid; place-items: center;
}
button.pw-eye:hover { background: #eef2f7; color: var(--navy); }
input:focus, select:focus, button:focus-visible { outline: 3px solid rgba(19, 64, 122, .35); outline-offset: 1px; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;           /* thumb-sized tap target, with gloves on */
  padding: 12px 18px;
  border: 0; border-radius: var(--r-field);
  background: var(--navy); color: #fff; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
button:hover, .btn:hover { background: var(--navy-dark); }
button:disabled { opacity: .55; cursor: progress; }
button.wide { width: 100%; }
button.ghost, .btn.ghost { background: #eef2f8; color: var(--navy); }
button.ghost:hover { background: #e2e9f4; }
button.danger { background: var(--danger); }
/* On a location row, Delete is outlined rather than solid: it repeats once per yard down the whole
   page, and solid red on every row makes the one action nobody wants the loudest thing on screen.
   It fills in on hover, so it still reads as destructive at the moment it could be clicked. The
   dialog's own Delete stays solid — that one IS the decision. Inset shadow, not a border, so the
   button does not change size. */
.loc-item button.danger {
  background: #fff; color: var(--danger);
  box-shadow: inset 0 0 0 1.5px var(--danger);
}
.loc-item button.danger:hover, .loc-item button.danger:focus-visible {
  background: var(--danger); color: #fff;
}
button.small, .btn.small { min-height: 40px; padding: 8px 12px; font-size: .88rem; }

.msg { padding: 11px 14px; border-radius: var(--r-field); margin-bottom: 14px; font-size: .92rem; }
.msg.error { background: #fdecec; color: var(--danger); border: 1px solid #f5c6c6; }
.msg.ok { background: #e8f5ed; color: var(--ok); border: 1px solid #bfe3cd; }

/* ── File list ────────────────────────────────────────── */
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-box);
}
.file-icon { flex: none; width: 40px; height: 40px; border-radius: var(--r-btn); display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: #fff; background: var(--muted); letter-spacing: .02em; }
.file-icon.pdf { background: #b4232a; }
.file-icon.doc { background: #1b5bbf; }
.file-icon.xls { background: #176b3a; }
.file-icon.img { background: #6d4aa8; }
.file-meta { flex: 1; min-width: 0; }
.file-meta .name { font-weight: 600; word-break: break-word; }
.file-meta .sub { font-size: .8rem; color: var(--muted); }
.file-actions { display: flex; gap: 8px; flex: none; }

/* Below ~480px the two buttons go under the name instead of squeezing it. */
@media (max-width: 480px) {
  .file-row { flex-wrap: wrap; }
  .file-actions { width: 100%; }
  .file-actions .btn { flex: 1; }
}

/* ── Viewer ───────────────────────────────────────────── */
.viewer { position: fixed; inset: 0; z-index: 50; background: #26303f; display: flex; flex-direction: column; }
.viewer[hidden] { display: none; }
.viewer-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--navy); color: #fff;
}
.viewer-bar .title { flex: 1; min-width: 0; font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.viewer-body canvas { display: block; width: 100%; height: auto; margin: 0 auto 12px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); border-radius: var(--r-chip); }
.viewer-body img.preview { display: block; max-width: 100%; margin: 0 auto; border-radius: var(--r-chip); background: #fff; }

/* Converted Word output. Width-capped for reading, and tables scroll instead of blowing out the page. */
.docx {
  background: #fff; color: var(--ink); max-width: 46rem; margin: 0 auto;
  padding: 22px 20px; border-radius: var(--r-btn); line-height: 1.65; overflow-wrap: break-word;
}
.docx h1, .docx h2, .docx h3 { line-height: 1.3; }
.docx img { max-width: 100%; height: auto; }
.docx table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.docx td, .docx th { border: 1px solid var(--line); padding: 7px 9px; text-align: left; }

/* ── Find in a PDF ─────────────────────────────────────── */
.viewer-find {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; background: var(--navy-dark); color: #fff;
}
.viewer-find input[type=search] { flex: 1; min-width: 0; margin: 0; min-height: 40px; }
.viewer-find span { font-size: .85rem; opacity: .9; white-space: nowrap; }

/* The wrapper exists so the highlight boxes have something to position against — a canvas cannot
   hold children. The boxes are EMPTY divs: they mark where a word is without putting selectable
   text on the page, which would hand a driver copy-and-paste on a document they cannot download. */
.pdf-page { position: relative; margin: 0 auto 12px; width: 100%; }
.pdf-page canvas { margin: 0; }
.pdf-marks { position: absolute; inset: 0; pointer-events: none; }
.pdf-mark { position: absolute; background: rgba(246, 180, 14, .45); border-radius: 2px; }
.pdf-mark.on { background: rgba(246, 180, 14, .85); outline: 2px solid #b4232a; }

.spinner { text-align: center; color: #dbe3ee; padding: 36px 12px; }

/* ── Admin ────────────────────────────────────────────── */
.row { display: grid; gap: 12px; }
@media (min-width: 720px) { .row.two { grid-template-columns: 1fr 1fr; } }

.loc-item { border: 1px solid var(--line); border-radius: var(--r-box); padding: 14px; margin-bottom: 10px; background: #fff; }
.loc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* The location name is an input that reads as plain text until it is hovered or focused — renaming is
   rare, so it must not shout, but it must not need a dialog either. 16px (inherited) keeps iOS from
   zooming the page when it takes focus. */
/* Name and state sit together on the left and the rest is pushed right (.pw below), so the state reads
   as part of the location rather than drifting to wherever the name happens to end. */
.loc-head .nm {
  font: inherit; font-weight: 700; color: inherit;
  flex: 0 1 15rem; min-width: 7rem; min-height: 44px;
  margin: 0; padding: 8px 10px;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-btn);
}
.loc-head .nm:hover { border-color: var(--line); }
.loc-head .nm:focus { background: #fff; border-color: var(--navy); outline: 2px solid rgba(19, 64, 122, .2); }
.state-pick {
  width: auto; min-width: 5.2rem; min-height: 40px;
  padding: 6px 8px; margin-bottom: 0; font-size: .9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* The region reads as words, not a code, so it gets room and the monospace of .state-pick off. */
.region-pick { min-width: 9rem; font-family: inherit; }

/* margin-left:auto eats the slack, so the password and the buttons line up down the page instead of
   following the name's width. On a phone the row wraps and the auto margin collapses to nothing. */
.loc-head .pw { margin-left: auto; }

/* A location with no files posted is the thing worth spotting, so that is the one that is coloured. */
.count { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.count.none { color: var(--danger); font-weight: 600; }
.pw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f1f4f9; border: 1px solid var(--line); border-radius: var(--r-btn); padding: 6px 10px; letter-spacing: .04em; }

/* The files panel sits inside the open location's row, so it reads as part of that yard rather
   than as a second card that happens to be about it. */
.file-panel { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

.dropzone { border: 2px dashed #b9c6d8; border-radius: var(--r-box); padding: 22px 16px; text-align: center; color: var(--muted); background: #fbfcfe; }
.dropzone.over { border-color: var(--navy); background: #eef3fa; }

/* ── Confirm dialog ───────────────────────────────────── */
dialog {
  width: min(28rem, calc(100vw - 32px));
  padding: 20px;
  border: 0; border-radius: var(--radius);
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(16, 33, 58, .55); }
dialog h3 { margin: 0 0 8px; font-size: 1.1rem; }
/* pre-line so a dialog body can show "old → new" on its own line without any markup in the text. */
dialog p { margin: 0 0 14px; color: var(--muted); font-size: .94rem; white-space: pre-line; }
dialog label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; }
dialog input { width: 100%; margin-bottom: 4px; }
/* A password box with a ↻ "suggest a different one" button at its right end. */
.pw-row { display: flex; gap: 8px; align-items: center; }
.pw-row input { flex: 1; min-width: 0; margin-bottom: 0; }
button.icon { font-size: 1.35rem; line-height: 1; padding: 8px 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
@media (max-width: 480px) { .modal-actions button { flex: 1; } }

/* ── Who can administer what ───────────────────────────── */
.who { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 2px; }
.who li { display: flex; align-items: center; gap: 11px; padding: 7px 8px; border-radius: var(--r-btn); }
.who li:hover { background: #f4f6f9; }
/* Region colours, taken from the org chart so the two read as the same scheme. The section carries
   the colour as a custom property and the heading and discs inherit it, which means a new region is
   one line here and nothing in the JavaScript. The data attribute is the region name slugified. */
.who-sec { --region: var(--navy); }
.who-sec[data-region="gateway-region"]     { --region: #1b5bbf; }   /* blue */
.who-sec[data-region="great-lakes-region"] { --region: #1f7a3d; }   /* green */
.who-sec[data-region="mid-states-region"]  { --region: #7b4ea8; }   /* purple */
.who-sec[data-region="northwest-region"]   { --region: #8a6a3b; }   /* brown */
.who-sec + .who-sec { margin-top: 14px; }

/* Sticky so it stays reachable once the list is long enough to need it in the first place. */
.who-tools {
  position: sticky; top: 0; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 10px; padding-bottom: 4px; background: var(--card);
}
.who-search { flex: 1 1 14rem; width: auto; min-height: 42px; margin: 0; }
.who-region { flex: 0 1 auto; width: auto; min-height: 42px; }
/* input[type=search] carries a bottom margin that outranks a bare class. */
.who-tools > input, .who-tools > select, .who-tools > button { margin: 0; }
.who-tools button { flex: none; }
details.who-rules > summary { cursor: pointer; }

.who-disc {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--region, var(--navy)); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em;
}
.who-name { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.who-mail { font-size: .82rem; color: var(--muted); text-decoration: none; word-break: break-all; }
a.who-mail:hover { color: var(--navy); text-decoration: underline; }
/* A bar in the region's colour, like the headings on the org chart it mirrors. */
.who-head {
  margin: 0 0 6px; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: #fff;
  background: var(--region, var(--navy));
  padding: 7px 10px; border-radius: var(--r-btn);
}
/* The region, beside a location name: present but not competing with it. */
/* The region bar is the disclosure control: collapsing a region IS filtering to the others, which
   is why there is no separate region picker. */
.who-head { cursor: pointer; list-style: none; }
.who-head::-webkit-details-marker { display: none; }
.who-head::before { content: "▾"; margin-right: 8px; font-size: .8em; display: inline-block; }
.who-sec:not([open]) > .who-head::before { transform: rotate(-90deg); }

/* A location inside a region. The rule in the region colour is what ties it to the bar above. */
.who-grp { margin: 0 0 6px 2px; padding-left: 10px; border-left: 3px solid var(--region, var(--line)); }
.who-sub {
  margin: 8px 0 2px; font-size: .82rem; font-weight: 700;
  color: var(--region, var(--ink)); letter-spacing: .01em;
}

.who-head-sub { float: right; font-weight: 600; text-transform: none; letter-spacing: 0; opacity: .8; }
/* The list can outgrow a phone screen; the dialog scrolls rather than the page behind it. */
#modalRich { max-height: min(60vh, 30rem); overflow-y: auto; margin-bottom: 4px; }
/* Who has access is a long list: bigger box, less scrolling. Other dialogs keep the small size. */
#modal:has(.who-sec) { width: min(46rem, calc(100vw - 32px)); }
#modal:has(.who-sec) #modalRich { max-height: calc(100vh - 220px); }

/* ── Charters or Exceptions, on the sign-in page ──────── */
/* Two equal buttons side by side. The pressed one fills in, so which door the password below is for
   is never in doubt — the same password opens both. */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.choice button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* ── Exception sheet ──────────────────────────────────── */
main.narrow { max-width: 40rem; }
/* A label that wraps its field. Form controls inherit the label's bold through `font: inherit`,
   so the weight is put back here. */
.field > span { display: block; }
.field input, .field select { font-weight: 400; margin-top: 6px; }
/* Every field already carries its own space underneath; a row gap on top of it would make the
   fields that happen to share a row sit further apart than the ones that do not. */
.exc .row { row-gap: 0; }
.exc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.exc-head h2 { margin: 0; }
.sent-list { margin: 0 0 16px; padding-left: 1.2rem; }
.sent-list li { margin-bottom: 6px; }

/* The two doors on a location. A check box, sized for a thumb, with its word beside it. */
.switch { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; font-size: .88rem; min-height: 40px; cursor: pointer; white-space: nowrap; }
.switch input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); }
.switches { border: 1px solid var(--line); border-radius: var(--r-field); padding: 8px 14px; margin: 14px 0 0; display: flex; gap: 18px; flex-wrap: wrap; }
.switches legend { font-weight: 600; font-size: .9rem; padding: 0 6px; }
/* "Name · email" labels run past a phone's width on one line: let them wrap, anywhere in the address. */
.switches .switch { white-space: normal; overflow-wrap: anywhere; }

/* ── Exception sheets, admin ──────────────────────────── */
main.wide-page { max-width: 1500px; }
/* Filters and the add-employee form: fields in a row that wraps, the button level with the boxes. */
.filters { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; }
/* margin 0: a label carries 6px under it everywhere else, and here that sat every box 6px above the
   button beside it. */
.filters .field { flex: 1 1 11rem; margin: 0; }
/* One height for everything in the row. Left to themselves a month box, a text box, a dropdown and a
   button come out 52, 50, 49 and 48px, which puts their labels and edges on four different lines. */
.filters input, .filters select, .filters > button, .filters > .btn { height: 52px; }
.filters > button, .filters > .btn { margin-bottom: 14px; }
.filters button.pick-btn { height: 52px; margin-top: 6px; }   /* the 6px every input/select has above it */   /* a long drop-down drawn by pick.js: same line as its neighbours */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grid { border-collapse: collapse; width: 100%; font-size: .88rem; }
.grid th, .grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid td { white-space: nowrap; }
.grid th { background: #f1f4f9; white-space: nowrap; }
.grid tbody tr:hover { background: #f8fafc; }
/* The header is the sort control. It reads as a heading, not as one more navy button. */
.grid button.sort { all: unset; cursor: pointer; font-weight: 700; color: var(--ink); }
.grid button.sort:focus-visible { outline: 3px solid rgba(19, 64, 122, .35); outline-offset: 2px; }

/* ── Printing, on the driver page only ────────────────── */
/* Ctrl+P, the browser menu and "Save as PDF" are all the same thing to a browser: a print. The driver
   page prints a notice instead of the document, which also makes "Save as PDF" produce the notice.
   ponytail: this is a control, not DRM — it goes away if someone disables CSS, and no web page can see
   a screenshot or a phone camera. It stops the casual copy, which is what was asked for. */
@media print {
  body.no-print > * { display: none !important; }
  body.no-print::after {
    content: "This document is not available in print. Open it on the Driver Portal, or ask your location manager for a copy.";
    display: block;
    padding: 2rem;
    font: 16px/1.6 system-ui, sans-serif;
    color: #000;
  }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Exception options (admin): the sheet's questions as a tree ─────────── */
/* One screen: the topbar, a tool row, then the tree and its edit panel filling what is left.
   The site's buttons are 48px for gloved thumbs; this is a desk page with many small controls. */
body.xo-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.xo-page button, .xo-page .btn { min-height: 0; padding: 6px 12px; font-size: .85rem; border-radius: var(--r-btn); }
.xo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 16px;
  background: var(--card); border-bottom: 1px solid var(--line); }
.xo-grp { display: flex; align-items: center; gap: 4px; }
#zoomPct { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; font-size: .85rem; }
.xo-spacer { flex: 1; }
.xo-msg { margin: 8px 16px 0; }
.xo-main { flex: 1; display: flex; min-height: 0; }
/* user-select: none, or a drag to pan selects the words in every box it crosses. Editing is in the panel. */
.xo-view { flex: 1; min-width: 0; position: relative; overflow: hidden; cursor: grab; touch-action: none; user-select: none;
  background-image: radial-gradient(#d3dae5 1px, transparent 1px); background-size: 22px 22px; }
.xo-view.panning { cursor: grabbing; }
.xo-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.xo-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.xo-edges path { fill: none; stroke: #9fb0c8; stroke-width: 2; }

.xo-node { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-field);
  padding: 8px 10px; box-shadow: var(--shadow); cursor: pointer; font-size: .88rem; line-height: 1.35; }
.xo-node:hover { border-color: var(--navy); }
.xo-node:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.xo-node.sel { outline: 3px solid var(--yellow); outline-offset: 1px; }
.xo-kick { font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  display: flex; gap: 6px; align-items: center; }
.xo-name { font-weight: 600; overflow-wrap: break-word; }
.xo-q { color: var(--muted); font-style: italic; margin-top: 2px; }
.xo-node .xo-add { margin-top: 6px; padding: 2px 8px; font-size: .75rem; }
.xo-node .xo-toggle { margin-left: auto; padding: 0 6px; font-size: .7rem; }
.k-root { width: 250px; background: var(--navy); color: #fff; border-color: var(--navy); }
.k-root .xo-kick { color: #c9d6ea; }
.k-root ol { margin: 6px 0 0; padding-left: 18px; }
.k-cat { width: 280px; border-left: 5px solid var(--navy); }
.k-reason, .k-more { width: 250px; }
.k-more { color: var(--muted); font-style: italic; }
.k-extra { width: 250px; background: #fff8e6; border-style: dashed; border-color: #e6c66d; }
.k-extra ul { margin: 2px 0 0; padding-left: 16px; }
.xo-tag { font-size: .65rem; font-weight: 700; padding: 1px 6px; border-radius: 99px; text-transform: none; letter-spacing: 0; }
.xo-tag.new { background: #dff3e6; color: var(--ok); }
.xo-tag.changed { background: #e3ecfa; color: var(--navy); }
.xo-tag.warn { background: #fdecc8; color: #9a5b00; }
.xo-tag.follow { background: #fff1c7; color: #6b4b00; }

.xo-panel { width: 360px; max-width: 100%; background: var(--card); border-left: 1px solid var(--line);
  overflow-y: auto; padding: 16px; }
.xo-panel h2 { font-size: 1rem; margin: 2px 0 4px; overflow-wrap: break-word; }
.xo-panel h3 { font-size: .9rem; margin: 18px 0 6px; }
.xo-panel .field { margin-top: 12px; }
.xo-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.xo-warn { background: #fdecc8; color: #9a5b00; border-radius: var(--r-btn); padding: 8px 10px; margin-top: 12px; font-size: .85rem; }
.xo-list { padding-left: 18px; margin: 4px 0 0; font-size: .85rem; }
.xo-list li { margin: 2px 0; }
.xo-hist { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; font-size: .85rem; }
.xo-hist > summary, .xo-histbox > summary { cursor: pointer; }
.xo-histbox { margin: 16px 0; }
.xo-histbox > summary h3 { display: inline; }
.xo-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.xo-page button.xo-danger { background: #fff; color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.xo-page button.xo-danger[data-armed], .xo-page button.xo-danger:hover { background: var(--danger); color: #fff; }

@media (max-width: 760px) {
  .xo-main { flex-direction: column; }
  .xo-panel { width: 100%; height: 45%; border-left: 0; border-top: 1px solid var(--line); }
}
.xo-qedit { border: 1px solid var(--line); border-radius: var(--r-field); padding: 4px 10px 10px; margin-top: 10px; }
.xo-check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .85rem; }
.xo-check input { width: auto; margin: 0; }
.xo-page button.xo-link { background: none; color: var(--navy); padding: 0; min-height: 0; font-weight: 600; text-decoration: underline; }
.k-extra .xo-name { font-size: .8rem; }
.xo-panel .field input, .xo-panel .field select { width: 100%; }
.xo-panel .field textarea { width: 100%; font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-btn); margin-top: 6px; }
.xo-pick { display: block; color: var(--muted); font-size: .75rem; }

/* ── Exception sheets: the decision on each row ─────────── */
.grid td.decide { white-space: nowrap; }
.grid td.decide button { margin-right: 4px; }

/* ── Who has access: the full administrators' lookup and rules ── */
.who-lookup { margin-bottom: 14px; }
.who-lookup-row { display: flex; gap: 6px; align-items: center; }
.who-lookup-row .who-search { flex: 1; margin: 0; }
.who-lookup-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.who-lookup-list li { border: 1px solid var(--line); border-radius: var(--r-field); padding: 8px 10px; font-size: .88rem; }
.who-verdict { font-weight: 600; color: var(--ok); margin-top: 4px; }
.who-verdict.none { color: var(--danger); }
.who-rules { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.who-rules .grid { margin: 6px 0; }
.who-stale { white-space: pre-line; background: #fdecc8; color: #7a4a00; border-radius: var(--r-btn); padding: 8px 10px; margin: 0 0 10px; }

/* ── QR poster (/admin/qr) ── one letter page; on paper only the sheet prints. Pure black and white:
   the yards' printers have no colour, so the screen shows exactly what the paper will. */
.qr-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.qr-actions select { width: auto; min-width: 220px; margin: 0; }
.qr-sheet {
  max-width: 640px; margin: 16px auto; padding: 36px 32px; text-align: center;
  background: #fff; color: #000; border: 4px solid #000; border-radius: 16px;
}
.qr-logo { width: 130px; height: auto; filter: grayscale(1); }
.qr-sheet h2 { font-size: 2.6rem; margin: 6px 0 0; color: #000; }
.qr-lead { font-size: 1.5rem; font-weight: 700; margin: 4px 0 18px; }
.qr-code { width: 280px; max-width: 80%; margin: 0 auto; }
.qr-code svg { display: block; width: 100%; height: auto; }
.qr-url { font-size: 1.2rem; font-weight: 600; margin: 14px 0 16px; word-break: break-all; }
.qr-creds {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: baseline;
  margin: 0 auto; padding: 14px 20px; max-width: 460px; text-align: left;
  border: 2px solid #000; border-radius: var(--r-field);
}
.qr-creds dt { font-size: 1.1rem; font-weight: 600; }
.qr-creds dd { margin: 0; font-size: 1.6rem; font-weight: 700; word-break: break-word; }
.qr-pw { font-family: Consolas, "Courier New", monospace; letter-spacing: .04em; }
.qr-note { font-size: 1rem; margin: 14px 0 0; }
@media print {
  @page { size: letter; margin: 0.5in; }
  body:has(.qr-sheet) > :not(main), body:has(.qr-sheet) main > :not(.qr-sheet),
  body:has(.qr-sheet)::before { display: none !important; } /* ::before = staging banner */
  body:has(.qr-sheet) { background: #fff; }
  body:has(.qr-sheet) main { padding: 0; margin: 0; max-width: none; }
  .qr-sheet { max-width: none; margin: 0; padding: 0.3in 0.4in; orphans: 1; widows: 1; }
  .qr-logo { width: 1.1in; }
  .qr-sheet h2 { font-size: 34pt; }
  .qr-lead { font-size: 20pt; margin-bottom: 0.15in; }
  .qr-code { width: 3.2in; max-width: none; }
  .qr-url { font-size: 15pt; margin: 0.1in 0 0.15in; }
  .qr-creds { max-width: 6.6in; padding: 0.12in 0.25in; }
  .qr-creds dt { font-size: 16pt; }
  .qr-creds dd { font-size: 24pt; }
  .qr-note { font-size: 12pt; }
}

/* Exceptions admin, Dayforce: the row just saved, a refused import, the wide imports popup */
.df-saved { font-size: .85rem; font-weight: 600; color: var(--ok); margin-top: 4px; }
.df-refused td { color: #a61b1b; }
dialog.wide { width: min(1100px, 96vw); max-width: none; }
.df-box > summary { cursor: pointer; }
.df-box > summary h2 { display: inline; margin-right: 10px; }
.df-box > summary span { color: var(--muted); font-size: .9rem; }
.df-box[open] > summary { margin-bottom: 10px; }
/* The imports popup: Problems (long prose) and Fields sent (a long list) wrap instead of running off the
   side. Counted from the end: "Fields sent" was added after Problems, which left Problems unwrapped. */
/* break-word, not anywhere: a field name ("businessEmail") stays whole and breaks only after its comma. */
#dfRunsBody td:nth-last-child(-n+2) { white-space: normal; overflow-wrap: break-word; }
#dfRunsBody td:nth-last-child(2) { min-width: 18rem; }
#dfRunsDlg th { white-space: normal; }   /* "Personal email" on two lines, not 116px of one */
/* A phone: the header wraps, title beside logo and back link, the buttons on the line(s) below.
   Without this the title squeezed to nothing and Sign out fell off the right edge. */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .topbar h1 { min-width: 50%; }
}

/* ── Announcement email (/admin/messages) and its public video page (/watch) ── */
.msg-page textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-field); margin-bottom: 6px; }
.msg-page h3 { margin: 22px 0 6px; font-size: 1rem; }
.msg-page input[type=file] { display: block; margin-bottom: 8px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pick-list { list-style: none; margin: 0; padding: 0; max-height: 26rem; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-field); }
.pick-list li + li { border-top: 1px solid var(--line); }
.pick-list label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; font-weight: 400; cursor: pointer; }
.pick-list label span:first-of-type { flex: 1; }
.pick-list input { width: 20px; height: 20px; flex: none; }
.pick-list button.who { background: none; color: var(--navy); padding: 0; min-height: 0; font: inherit; text-align: left; text-decoration: underline; }
/* #modalRich already scrolls: the people list only makes it taller, never adds a second scroll bar. */
dialog:has(.people-wrap) #modalRich { max-height: 65vh; }
/* The people list needs Name, Job and Email side by side: the dialog widens only when it holds one. */
dialog:has(.people-wrap) { width: min(44rem, calc(100vw - 32px)); }
.reach { font-weight: 700; margin: 12px 0 0; }
.loc-tools { position: static; margin-bottom: 10px; }
.loc-all { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0 12px; font-weight: 600; cursor: pointer; }
.loc-all input { width: 20px; height: 20px; flex: none; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 10px 0; }
.thumb-canvas { display: block; max-width: 100%; height: auto; border-radius: var(--r-btn); margin-bottom: 10px; background: #000; }
dialog.preview-dlg { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border-radius: 0; }
dialog.preview-dlg[open] { display: flex; flex-direction: column; }
.preview-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.preview-dlg iframe { flex: 1; width: 100%; border: 0; background: #fff; }
/* A button waiting on the server: a turning ring before its label. */
button.busy::before { content: ''; display: inline-block; width: 1em; height: 1em; margin-right: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-head h2 { margin: 0; }
.fmt-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.fmt-bar button { min-width: 40px; }
/* A serif B and I, as in Word: in the site's sans font a slanted I reads as "/". */
.fmt-bar button b, .fmt-bar button i { font-family: Georgia, 'Times New Roman', serif; font-size: 1.1rem; line-height: 1; }
.editor { min-height: 16rem; max-height: 60vh; overflow: auto; padding: 10px 12px; margin-bottom: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-field); font-size: 16px; line-height: 1.5; color: #1d2733; }
.editor:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
.editor.sig { min-height: 6rem; }
.logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.logo-row input[type=file] { margin: 0; }
.sig-logo { width: 110px; height: auto; border: 1px solid var(--line); border-radius: var(--r-chip); background: #fff; }
.editor:empty::before { content: attr(data-placeholder); color: var(--muted); }
/* Taller only: a box dragged wider ran off the card. */
.msg-page textarea { resize: vertical; max-width: 100%; }
.editor h2 { font-size: 1.45rem; line-height: 1.25; margin: 4px 0 8px; }
.editor ul { margin: 0 0 4px; padding-left: 1.4em; }
.editor a { color: #13407a; }
.editor .chip { margin: 6px 0; padding: 6px 10px; border: 1px dashed #8aa3c4; border-radius: var(--r-btn); background: #eef3fa;
  color: #13407a; font-size: .9rem; font-weight: 600; user-select: none; }
.fmt-font { display: flex; align-items: center; gap: 6px; margin: 0 0 0 auto; font-weight: 400; }
.fmt-font select { width: auto; margin: 0; }
.progress-box progress { display: block; width: 100%; height: 14px; margin-bottom: 10px; }
.progress-box { margin-top: 14px; padding: 12px; border-radius: var(--r-field); background: #fff7e0; border: 1px solid #f1d58a; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.history li { display: grid; gap: 4px; justify-items: start; }
.history .h-open { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--navy); text-align: left; text-decoration: underline; cursor: pointer; }
.confirm-list { margin: 4px 0 10px; padding-left: 20px; max-height: 12rem; overflow: auto; }
main.watch { max-width: 960px; }
main.watch video { display: block; width: 100%; max-height: 80vh; background: #000; border-radius: var(--r-field); }

/* ── Long drop-downs (public/js/pick.js) ─────────────────
   A select with 8+ options is drawn as .pick-btn plus one .pick-panel list that stays inside the window.
   The real select stays underneath (still read, set and validated), out of sight. */
select.pick-native { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; }
button.pick-btn {
  width: 100%; min-height: 48px; margin-bottom: 14px; padding: 12px 40px 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-field); background: #fff; color: var(--ink);
  font-size: 16px; font-weight: 400; text-align: left; justify-content: flex-start; position: relative;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
/* The State/Region picker on a location card stays compact when pick.js draws it (it carries the
   select's classes; `button.pick-btn` above would otherwise make it a full-width row). */
button.pick-btn.state-pick { width: auto; min-width: 5.2rem; min-height: 40px; margin-bottom: 0; padding: 6px 30px 6px 10px; font-size: .9rem; }
button.pick-btn.region-pick { min-width: 9rem; }
button.pick-btn::after { content: "▾"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
/* `button:hover` (navy) would outrank a bare class: a picker hovers like a field, not a button. */
button.pick-btn:hover { background: #f5f8fc; border-color: #b9c6d8; }
button.pick-btn:disabled { opacity: .6; cursor: not-allowed; }
button.pick-btn[hidden] { display: none; }
.pick-panel {
  position: fixed; z-index: 1000; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-field); box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.pick-panel[hidden] { display: none; }
.pick-panel input[type=search] { margin: 8px; width: auto; min-height: 42px; flex: none; border-radius: calc(var(--r-field) - 8px); }   /* concentric: 8px in from a 10px corner */
.pick-list-pop { list-style: none; margin: 0; padding: 0 0 6px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.pick-opt { padding: 10px 14px; cursor: pointer; color: var(--ink); }
.pick-opt.active, .pick-opt:hover { background: #e8eef7; }
.pick-opt[aria-selected="true"] { font-weight: 700; }
.pick-opt[aria-disabled="true"] { color: var(--muted); cursor: default; }
.pick-group { padding: 8px 14px 4px; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.pick-none { padding: 10px 14px; color: var(--muted); }

/* ── Bus video requests (vr*.html, admin-video.html) ──────────────────── */
.vr-alt { margin: 12px 0 0; text-align: center; }
.vr-alt button.link { all: unset; cursor: pointer; color: var(--navy); text-decoration: underline; font-size: .9rem; }
.vr-foot { text-align: center; }
.vr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 14px; }
.vr-grid input, .vr-grid select { width: 100%; }
.vr-text { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-field); margin-bottom: 12px; resize: vertical; }
.vr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vr-row { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center;
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-box); background: #fff; }
.vr-row:hover, .vr-row:focus-visible { background: #f8fafc; outline: 3px solid rgba(19, 64, 122, .25); }
.vr-row-id { font-weight: 700; }
.vr-row-sub { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; }
.vr-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #e8eef7; color: var(--navy); justify-self: start; }
.vr-status.s-received { background: #fff4d6; color: #7a5300; }
.vr-status.s-waiting { background: #f1e8fb; color: #5b2a8c; }
.vr-status.s-closed { background: #e8f5ed; color: var(--ok); }
.vr-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: .92rem; }
.vr-facts dt { font-weight: 700; color: var(--muted); }
.vr-facts dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.vr-h3 { font-size: .95rem; margin: 16px 0 8px; }
.vr-player { width: 100%; max-height: 70vh; background: #000; border-radius: var(--r-field); }
.vr-video { margin-bottom: 12px; }
.vr-thread { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.vr-thread li { padding: 10px 12px; border-radius: var(--r-field); background: #f1f4f9; border: 1px solid var(--line); }
.vr-thread li.from-them { background: #fff; }
.vr-thread li.internal { background: #fffbea; }
.vr-thread-head { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.vr-thread-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.05rem; line-height: 1.45; }
.vr-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.vr-click { cursor: pointer; }
.vr-late td { background: #fdecec; }
.vr-soon td { background: #fff7e0; }
.vr-urgent { color: var(--danger); font-weight: 700; font-size: .8rem; }
.vr-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 12px; margin: 8px 0; }
.vr-box { border: 1px solid var(--line); border-radius: var(--r-box); padding: 12px 14px; background: #fbfcfe; }
.vr-box .vr-h3 { margin-top: 0; }
.vr-box select { width: 100%; margin-bottom: 8px; }
.vr-box progress { width: 100%; margin-top: 8px; }
.vr-deliveries, .vr-contacts { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.vr-contacts li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vr-note-opts { display: grid; gap: 4px; border: 0; margin: 0; padding: 0; }
.vr-steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(22rem, 40%)), 1fr)); }   /* at most two across: 2×2 */
.vr-summary { font-size: 1rem; margin: 4px 0 12px; }
/* Report bars: label · bar · number. The red end of a week's bar is its late share. */
.vr-bars { display: grid; gap: 6px; }
.vr-bar-row { display: grid; grid-template-columns: minmax(6rem, 40%) 1fr auto; gap: 8px; align-items: center; font-size: .88rem; }
.vr-bar { height: 14px; background: #eef2f7; border-radius: 7px; overflow: hidden; }
.vr-bar-fill { height: 100%; background: var(--navy); display: flex; justify-content: flex-end; border-radius: 7px; min-width: 3px; }
.vr-bar-fill.t-ok { background: var(--ok); }
.vr-bar-fill.t-warn { background: #d99a00; }
.vr-bar-fill.t-late, .vr-bar-late { background: var(--danger); }
.vr-bar-late { height: 100%; }
.vr-bar-n { font-weight: 700; white-space: nowrap; }
.vr-report-block { margin-top: 12px; }
.vr-print-head { display: none; }
.vr-history { margin-top: 16px; }
.vr-link-row { display: flex; gap: 8px; align-items: flex-start; }
.vr-link-row input { flex: 1; min-width: 0; }
.vr-link-row button { min-height: 48px; }
#videoFile { display: block; margin-bottom: 14px; }
/* Looks like a button, with an arrow that turns when open: a bare summary line did not look clickable. */
.vr-history summary { cursor: pointer; font-weight: 700; font-size: .95rem; padding: 10px 14px; list-style: none;
  display: inline-block; border: 1px solid var(--line); border-radius: var(--r-field); background: #eef2f7; color: var(--navy); }
.vr-history summary::-webkit-details-marker { display: none; }
.vr-history summary::before { content: "\25B8"; display: inline-block; margin-right: 8px; transition: transform .15s; }
.vr-history[open] summary::before { transform: rotate(90deg); }
.vr-history summary:hover { background: #e2e9f3; }
.vr-history[open] summary { margin-bottom: 10px; }
.vr-people { border: 1px solid var(--line); border-radius: var(--r-field); padding: 10px 14px; margin: 12px 0; }
.vr-people legend { font-weight: 600; font-size: .9rem; padding: 0 4px; }
/* Whether an action emails the customer: one look on every step. */
.vr-mail { margin: 0 0 4px; font-size: .88rem; color: var(--muted); }
.vr-mail.yes { color: var(--navy); font-weight: 700; }
.vr-list-opt { flex-basis: 100%; margin: 0 0 8px; }
@media print {
  @page { size: letter; margin: 0.5in; }
  body:has(#tab-report:not([hidden])) > :not(main), body:has(#tab-report:not([hidden]))::before,
  body:has(#tab-report:not([hidden])) main > :not(#tab-report), #tab-report .filters { display: none !important; }
  body:has(#tab-report:not([hidden])) { background: #fff; }
  #tab-report { box-shadow: none; border: 0; padding: 0; }
  #tab-report * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .vr-print-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; font-size: 14pt; }
  .vr-print-head img { width: 0.8in; }
  .vr-print-head div div { font-size: 10pt; color: #444; }
  #tab-report .vr-box, #tab-report .vr-stat, #tab-report tr { break-inside: avoid; }
  #tab-report .vr-actions { grid-template-columns: 1fr 1fr; }
  #tab-report .vr-stats { grid-template-columns: repeat(4, 1fr); }
  /* The request list: small type so nine columns fit a portrait page; the box itself may split. */
  #tab-report .vr-req-list { break-inside: auto; }
  #tab-report .vr-req-list table { font-size: 8pt; }
  #tab-report .vr-req-list table { width: 100%; min-width: 0; }
  #tab-report .vr-req-list th, #tab-report .vr-req-list td { padding: 3px 4px; white-space: normal; overflow-wrap: normal; }
  #tab-report .table-wrap { overflow: visible; }
}
.vr-off { opacity: .6; }
.vr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 12px; margin: 12px 0; }
.vr-stat { border: 1px solid var(--line); border-radius: var(--r-box); padding: 12px 14px; background: #fff; }
.vr-stat-v { font-size: 1.6rem; font-weight: 700; color: var(--navy); }

.topbar { background: #b3261e; }
body::before {
  content: "STAGING \2014  test site. Nothing entered here is real.";
  display: block; padding: 6px 12px; text-align: center;
  background: #7a1210; color: #fff; font-size: .85rem; font-weight: 700; letter-spacing: .03em;
}