/* Desk page v2: plain white, rule-based. Follows docs/superpowers/specs/2026-11-23-desk-page-v2-mockup.html. Light only. */
:root {
  --ink: #16181d; --ink-2: #4a505c; --ink-3: #7b828f;
  --line: #e4e6ea; --line-2: #eef0f3; --wash: #f7f8fa;
  --accent: #1f4fd8; --red: #b42318; --amber: #a15c07; --green: #1a7f4b;
  /* The page's ground, the edge of a button or a box to type in, and the row that is selected. */
  --bg: #fff; --edge: #c9cdd4; --sel: #eaf0fe;
  /* The pale grounds of a banner, a faulty hop and a matched result, and the lines around them. */
  --red-wash: #fff8f7; --red-edge: #f3d6d3; --amber-wash: #fffbe6; --amber-edge: #ecdf9a; --amber-ink: #5c4b00;
  --green-wash: #f1f8f3; --green-edge: #cfe8d8;
  --top: 64px; /* the header's height: what sticks under it starts here */
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
/* Themes. Classic is the values above; each other theme is the same page with other values, chosen
   with the picker in the header (theme.js puts data-theme on the html element). Status dots and the
   people's dots keep their colours on every theme. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7e9ee; --ink-2: #b4bac6; --ink-3: #8b93a1;
  --line: #2b303a; --line-2: #22262e; --wash: #181b21;
  --accent: #7ea6ff; --red: #ff8272; --amber: #e3a84a; --green: #56c896;
  --bg: #0f1115; --edge: #3a404c; --sel: #1a2644;
  --red-wash: #2a1614; --red-edge: #5c2a24; --amber-wash: #2a2209; --amber-edge: #5e4d0c; --amber-ink: #f0d67a;
  --green-wash: #11251b; --green-edge: #1f4c35;
}
:root[data-theme="fall"] {
  --ink: #3a2816; --ink-2: #6a4c31; --ink-3: #866647;
  --line: #e3d1b5; --line-2: #eee0c8; --wash: #f6ead5;
  --accent: #b24a12; --red: #9c2b17; --amber: #8f5a06; --green: #55722a;
  --bg: #fcf6ea; --edge: #cdb592; --sel: #f8dfbd;
  --red-wash: #fbe9df; --red-edge: #eec3b0; --amber-wash: #fbefc4; --amber-edge: #e6cf85; --amber-ink: #5f4705;
  --green-wash: #edf1d8; --green-edge: #cbd8a4;
}
/* The map's outline is a pale grey line drawn for a white page: on a dark theme it is turned over. */
:root[data-theme="dark"] .home .map image { filter: invert(1) hue-rotate(180deg); opacity: .55; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
html { scroll-padding-top: calc(var(--top) + 8px); } /* a link to a step lands below the header */
body { font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--edge); border-radius: 4px; padding: 4px 10px; cursor: pointer; }
button:hover { background: var(--wash); }
button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
button.primary:hover { background: var(--ink); opacity: .86; }
p { margin: 0 0 8px; }
.muted { color: var(--ink-3); }
.spacer { flex: 1; }

/* Header and banners */
/* The header stays at the top of the window while the page scrolls under it. */
header.top { display: flex; align-items: baseline; gap: 16px; padding: 13px 24px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; height: var(--top); background: var(--bg); }
header.top h1 { font-size: 26px; line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.01em; }
header.top h1 a { color: inherit; }
header.top h1 a:hover { text-decoration: none; color: var(--accent); }
header.top .who { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: 13px; color: var(--ink-3); }
header.top .who button { font-size: 12px; padding: 2px 8px; }
.signin { max-width: 440px; }
.signin form { display: grid; gap: 8px; margin: 16px 0 10px; }
.signin label { font-size: 13px; color: var(--ink-2); }
.signin input[type="email"] { font: inherit; color: var(--ink); border: 1px solid var(--edge); border-radius: 4px; padding: 8px 10px; }
.signin button { justify-self: start; }
.signin .hint { color: var(--ink-3); font-size: 12.5px; }
.signin .banner { border: 1px solid var(--line); border-radius: 4px; margin-top: 10px; }
/* The theme picker: shown only where theme.js has run (it is what makes a choice do anything). */
.theme-pick { display: none; }
.themed .theme-pick { display: block; }
.theme-pick select { font: inherit; font-size: 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--edge); border-radius: 4px; padding: 2px 6px; }
header.top .meta { color: var(--ink-3); font-size: 13px; }
.banner { padding: 7px 24px; border-bottom: 1px solid var(--line); font-size: 13px; }
.banner.error { background: var(--red-wash); color: var(--red); border-bottom-color: var(--red-edge); }
.banner.warn { background: var(--amber-wash); color: var(--amber-ink); border-bottom-color: var(--amber-edge); }
.banner.ok { background: var(--green-wash); color: var(--green); border-bottom-color: var(--green-edge); }

/* Left list */
.layout { display: grid; grid-template-columns: 372px minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
/* On a wide screen the desk page is as tall as the window and does not scroll: the header (and any
   banner) stays put, and the list and the incident each scroll in their own pane under it, so
   neither scrollbar runs up beside the header. */
@media (min-width: 961px) {
  body.desk { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  body.desk header.top, body.desk .banner { flex: none; }
  body.desk .layout { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  /* The scrollbar's room is kept on a short page too, so nothing shifts sideways between tickets. */
  body.desk main { overflow-y: auto; scrollbar-gutter: stable; }
  /* The ticket's top line stays put while the ticket scrolls under it: its links and "Copy as text"
     are in the same place on every ticket, wherever the ticket was left scrolled to. */
  /* top is measured from inside main's padding, so -22px is the pane's very top edge. */
  body.desk main .crumb { position: sticky; top: -22px; z-index: 2; margin: -22px -34px 0; padding: 22px 34px 4px; background: var(--bg); }
  body.desk main .crumb::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
}
/* The list scrolls by itself. Reaching its end does not start scrolling anything else. */
/* Its scrollbar's track is always there, with no bar in it while everything fits (groups folded, or
   few tickets), so the rows are the same width and each ticket's age stays in the same place. */
nav.list { border-right: 1px solid var(--line); min-height: 0; overflow-y: scroll; overscroll-behavior: contain; }
nav.list .toolbar { position: sticky; top: 0; z-index: 1; }
.group h2 { margin: 0; padding: 14px 14px 6px; font-size: 12px; font-weight: 650; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; }
/* The label and its count sit on one baseline, whatever face each is in; the dot and the arrow stay
   centred. Where the browser can trim a line to its capitals, each is cut to the height of its
   capitals and the row is centred instead, so the count's middle is the label's middle exactly. */
.group h2 .dot, .group h2::after { align-self: center; }
.group:not([open]) h2 { padding-bottom: 12px; }
@supports (text-box: trim-both cap alphabetic) {
  .group h2 { align-items: center; min-height: 39px; }   /* the height the row had with its line untrimmed */
  .group h2 .what, .group h2 .n { text-box: trim-both cap alphabetic; }
  /* The row is as tall folded as open here, so its padding must be too: the label is centred in
     what the padding leaves, and would move when the group folds. */
  .group:not([open]) h2 { padding-bottom: 6px; }
}
/* Each group after the first starts under a line. Its heading is what folds it away and brings it
   back: the whole heading is the control, with a small arrow at its right end that points down
   while the group is open and right while it is folded. */
.group + .group { border-top: 1px solid var(--line); }
.group > summary { list-style: none; cursor: pointer; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary:hover { background: var(--wash); }
.group > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.group h2::after { content: ""; width: 6px; height: 6px; margin-left: auto; border: solid var(--ink-3); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.group[open] h2::after { transform: translateY(-2px) rotate(45deg); }
/* A group slides shut and open, and its arrow turns, instead of jumping. Only once list.js has put
   the folded groups back (it then marks the list .smooth), so a page load never plays it; and not
   for anyone who has asked for less motion. A browser that cannot animate to a height of "auto"
   ignores this and folds at once, as before. */
@media (prefers-reduced-motion: no-preference) {
  nav.list.smooth .group { interpolate-size: allow-keywords; }
  nav.list.smooth .group::details-content { height: 0; overflow: clip; transition: height .22s ease, content-visibility .22s allow-discrete; }
  nav.list.smooth .group[open]::details-content { height: auto; }
  nav.list.smooth .group h2::after { transition: transform .22s ease; }
}
.group h2 .dot { width: 8px; height: 8px; border-radius: 50%; }
.group h2 .n { color: var(--ink-3); font-weight: 400; }
.dot-needs_work { background: #b42318; }
.dot-known_waiting { background: #f2b705; }
.dot-no_action { background: #9aa1ad; }
.dot-changes { background: var(--accent); }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--wash); font-size: 12.5px; }
.toolbar .all { display: none; }
.js .toolbar .all { display: block; }
.toolbar button { font-size: 12.5px; }
.toolbar button:disabled { color: var(--ink-3); cursor: default; background: var(--bg); }
/* A row is the checkbox beside the link: a checkbox cannot live inside a link. */
.row { display: block; padding: 8px 14px; border-top: 1px solid var(--line-2); }
.row.pick { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 6px; align-items: start; }
.row:hover { background: var(--wash); }
/* The incident shown on the right: a pale blue row with a blue left edge, drawn inside the row so
   nothing shifts. */
.row.sel, .row.sel:hover { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.row.sel .num { font-weight: 650; }
.row.sel .title { color: var(--ink); }
.row input[type="checkbox"] { margin: 3px 0 0; }
.row .body { display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; align-items: start; color: inherit; min-width: 0; }
.row .body:hover { text-decoration: none; }
.row .num { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.row .age { color: var(--ink-3); font-size: 12.5px; text-align: right; }
.row .title { grid-column: 1 / 3; color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { grid-column: 1 / 3; color: var(--ink-3); font-size: 12px; }
.row .sub .warn { color: var(--red); }
.row .sub .run { color: var(--accent); }
.group .empty { margin: 0; padding: 4px 14px 10px; color: var(--ink-3); font-size: 12.5px; }

/* The incident */
main { padding: 22px 34px 60px; min-width: 0; }
main > .empty { color: var(--ink-3); }
/* Home: numbers, the map of sites, and what to open first */
.home p { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.home .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.home .nums { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: baseline; }
.home .nums b { font-size: 20px; font-weight: 650; color: var(--ink); margin-right: 2px; }
.home .map { display: block; width: 100%; max-width: 900px; height: auto; margin: 14px 0 0; }
.home .map text { pointer-events: none; font-size: 12px; letter-spacing: .04em; fill: var(--ink-2); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.home .map a:hover { text-decoration: none; }
.home .map text.left { text-anchor: end; }
.site { stroke: var(--bg); stroke-width: 1.5px; fill-opacity: .85; }
.site-needs_work { fill: #b42318; }
.site-known_waiting { fill: #f2b705; }
.site-no_action { fill: #9aa1ad; }
.site-changes { fill: var(--accent); }
.site.sel { stroke: var(--accent); stroke-width: 3px; }
.map a:hover .site, .map a:focus .site { fill-opacity: 1; }
.home .legend { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.home h2 { font-size: 14px; font-weight: 650; margin: 22px 0 6px; }
.home h2 .back { font-weight: 400; font-size: 12.5px; margin-left: 10px; }
.home .empty { color: var(--ink-3); font-size: 13px; margin: 0; }
.map a:focus-visible .site { stroke: var(--accent); stroke-width: 3px; }
.need { list-style: none; margin: 0; padding: 0; max-width: 900px; border-bottom: 1px solid var(--line-2); }
.need li { border-top: 1px solid var(--line-2); }
.need a { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 150px) 170px 44px; gap: 12px; align-items: baseline; padding: 7px 4px; color: var(--ink); font-size: 13px; }
.need a:hover { background: var(--wash); text-decoration: none; }
.need .num, .need .age { font-family: var(--mono); font-size: 12.5px; }
.need .title, .need .sites { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.need .sites, .need .age { color: var(--ink-3); }
.need .age { text-align: right; }
.need .reason { color: var(--ink-2); }
.need .reason.flag { color: var(--red); }
/* Who the desk is waiting on: under each row, what comes next and the last note a person wrote. */
.need.wait a { row-gap: 2px; }
.need.wait .last { grid-column: 2 / -1; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.need.wait .last:empty { display: none; }
/* Links that keep dropping: the row is not one link; each day opens that ticket. */
.need.links li { display: grid; grid-template-columns: 130px 150px minmax(0, 1fr) 120px 70px; gap: 12px; align-items: baseline; padding: 7px 4px; font-size: 13px; }
/* A row with more days than fit scrolls sideways in its own cell, so every day can be reached. No
   scrollbar is drawn (it would make that row taller); the cell fades at its right edge instead, and
   the room kept after the last day lets it scroll clear of the fade. */
.need.links .dates { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; white-space: nowrap; padding-right: 18px; color: var(--ink-2); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); }
.need.links .dates::-webkit-scrollbar { display: none; }
/* Where the days do not fit (drag.js marks the cell) the mouse can pull them sideways: a grab hand
   anywhere in the cell that is not a day, a closed hand during the pull. */
.need.links .dates.drag { cursor: grab; user-select: none; -webkit-user-select: none; }
.need.links .dates.dragging, .need.links .dates.dragging a { cursor: grabbing; }
.need.links .dates a { display: inline; padding: 0; font-size: inherit; color: var(--accent); }
.need.links .dates a:hover { background: none; text-decoration: underline; }
.need.links .age.flag { color: var(--red); }
/* Under a list of more than one page. Previous and Next are plain words that take a grey rounded
   ground under the pointer; the one with nowhere to go is pale. A short last page is filled with
   unseen copies of a row (.pad), so the two never move. */
.pager { display: flex; gap: 4px; align-items: center; justify-content: flex-end; max-width: 900px; margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); }
.pager span:first-child { margin-right: auto; }
.pager a, .pager .off { padding: 4px 10px; border-radius: 6px; }
.pager a { color: var(--ink); }
.pager a:hover { background: var(--line-2); text-decoration: none; }
.pager .off { color: var(--line); }
.need li.pad { border-top-color: transparent; }
.need li:not(.pad) + li.pad { border-top-color: var(--line-2); }
.need:has(.pad) { border-bottom-color: transparent; }
.need li.pad > * { visibility: hidden; }
main h2[id] { scroll-margin-top: 16px; }
.crumb { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--ink-3); }
/* One line always, so the row is the same height on every ticket and the button never shifts. */
.crumb { min-height: 26px; }
.crumb > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Copies the ticket as text: shown only where the script that does it has run. */
.copy-all { display: none; flex: none; font-size: 12px; padding: 3px 10px; color: var(--ink-2); }
.js .copy-all { display: block; }
/* What the ticket is, read from its title: what happened in ink, what it happened to in grey. */
/* A device name or circuit ID in running text: darker and heavier than the words around it. */
.nm { font-weight: 650; color: var(--ink); }
/* One that opens its CDS page: the same weight, with a dotted line under it to say it is a link. */
a.nm { text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px; }
a.nm:hover { color: var(--accent); text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.chip { font-size: 12px; line-height: 20px; padding: 0 9px; border-radius: 11px; border: 1px solid var(--line); background: var(--wash); color: var(--ink-2); }
.chip-event { color: var(--ink); font-weight: 600; }
/* On a dark theme a chip is its classic self with light and dark swapped and the hue kept: a dark
   tint with pale text of the same colour. :where keeps these as weak as the colours below them. */
:where(:root[data-theme="dark"]) .chip { border-color: #e4e6ea; background: #f7f8fa; color: #4a505c; filter: invert(1) hue-rotate(180deg); }
:where(:root[data-theme="dark"]) .chip-event { color: #16181d; }
/* A colour for each label, so the same kind of ticket looks the same everywhere: a pale tint with
   darker text of the same hue. What happened runs warm for faults and cool for planned work; what it
   happened to has hues of its own. A label with no colour here keeps the grey above. */
.chip-outage { background: #fdecea; border-color: #f6cdc8; color: #b42318; }
.chip-brief_outage { background: #fff0e1; border-color: #f8d7b4; color: #b0500a; }
.chip-instability { background: #f1ebfd; border-color: #d9cbf6; color: #5b3bb5; }
.chip-alarm { background: #fdf5d3; border-color: #efdf9c; color: #7d5a00; }
.chip-availability { background: #e1f5f9; border-color: #b8e2ea; color: #0b6779; }
.chip-unresponsive { background: #fde8f0; border-color: #f5c3d7; color: #a61e5c; }
.chip-decommission { background: #eceef2; border-color: #d5d9e0; color: #4a505c; }
.chip-maintenance { background: #e7eefc; border-color: #c5d4f6; color: #1f4fd8; }
.chip-provisioning { background: #e5f5ec; border-color: #bfe3cf; color: #1a7f4b; }
.chip-backbone { background: #e9ebff; border-color: #cbd0f7; color: #3538a8; }
.chip-peer { background: #dff5f0; border-color: #b5e2d9; color: #0f6e63; }
.chip-participant { background: #f7e9fb; border-color: #e6c8ee; color: #8a2aa3; }
.chip-lit_service { background: #eef6dc; border-color: #d4e5ac; color: #4d6b12; }
.chip-optical { background: #e2f1fd; border-color: #bcdcf5; color: #0a5d99; }
.chip-device { background: #edf0f4; border-color: #d3d9e1; color: #3b4350; }
#ticket-text { margin: 26px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 4px; font: 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.crumb .num { font-family: var(--mono); color: var(--ink); }
main h1 { font-size: 20px; line-height: 1.3; margin: 4px 0 6px; font-weight: 650; overflow-wrap: anywhere; }
.inc-state { font-size: 13px; color: var(--ink-2); }
.inc-state b { font-weight: 650; }
.s-needs_work { color: var(--red); }
.s-known_waiting { color: var(--amber); }
.s-no_action { color: var(--ink-2); }
.inc-state .changed { color: var(--accent); }
.when { font-size: 12.5px; color: var(--ink-3); }
.actions .when { margin-left: 10px; }
p.when { margin: 8px 0 0; }
.headline { margin: 12px 0 0; font-size: 15px; }
/* Diagnosis progress: the panel on the card and the thin bar under a list row. */
progress { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; border: 0; border-radius: 3px; background: var(--line); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--accent); transition: width .6s ease; }
progress::-moz-progress-bar { background: var(--accent); }
.row .row-bar { grid-column: 1 / 3; height: 3px; margin-top: 4px; }
.progress { margin: 12px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--wash); }
.progress .p-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 13.5px; }
.progress .p-head b { font-weight: 650; }
.progress .p-time { color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress .p-stages { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 9px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink-3); }
.progress .p-stages li::before { content: "\25CB"; display: inline-block; width: 1.3em; }
.progress .p-stages li.done { color: var(--green); }
.progress .p-stages li.done::before { content: "\2713"; }
.progress .p-stages li.now { color: var(--ink); font-weight: 600; }
.progress .p-stages li.now::before { content: "\25CF"; color: var(--accent); animation: p-pulse 1.2s ease-in-out infinite; }
.progress .p-now { display: flex; align-items: baseline; gap: 8px; margin: 9px 0 0; padding: 6px 9px; border-left: 3px solid var(--accent); border-radius: 0 4px 4px 0; background: var(--bg); }
.progress .p-tag { font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.progress .p-label { min-height: 1.4em; font-family: var(--mono); font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
/* A new check draws the eye once, briefly, then sits still. */
.progress .p-now.changed { animation: p-flash 1s ease-out; }
@keyframes p-flash { from { background: var(--sel); } to { background: var(--bg); } }
.progress .p-note { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); }
/* The card under a running re-diagnosis is the old one, and it stays at full strength so it can be
   read while the new one is made; the bar above it is what says a diagnosis is running. */
@keyframes p-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .progress .p-stages li.now::before, .progress .p-now.changed { animation: none; }
  progress::-webkit-progress-value { transition: none; }
}
.notice { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); border-left: 2px solid var(--edge); padding: 2px 0 2px 12px; }
.notice.bad { border-left-color: var(--red); }
.notice.bad b { color: var(--red); font-weight: 650; }
.notice ul { margin: 4px 0 0; padding-left: 18px; }
.actions { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; }

section { margin-top: 26px; }
section > h2 { font-size: 13px; font-weight: 650; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
section > h2 .n { color: var(--ink-3); font-weight: 400; margin-left: 6px; }

/* Ticket numbers linked inside card text open ServiceNow in a new tab. */
main section a[target="_blank"]:not(.nm)::after { content: " ↗"; }

/* Alerts */
table.alerts { border-collapse: collapse; width: 100%; font-size: 13px; }
table.alerts td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.alerts td.c { width: 34px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
table.alerts td.k { width: 170px; }
table.alerts td.d { width: 150px; font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
table.alerts td.x { color: var(--ink-2); overflow-wrap: anywhere; }
table.alerts th { text-align: left; font-weight: 400; font-size: 12px; color: var(--ink-3); padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line); }
table.each { margin-top: 8px; }
table.each td.d { width: auto; }
table.each td.t { white-space: nowrap; color: var(--ink-2); }
.state { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.state.open { background: var(--red); }
.state.cleared { background: var(--green); }
.alert-meta { font-size: 12.5px; color: var(--ink-3); margin: 0 0 6px; }

/* "Show each alert", "Show n more" */
details.more { margin-top: 6px; }
details.more > summary { cursor: pointer; font-size: 12.5px; color: var(--accent); list-style: none; display: inline-block; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary:hover { text-decoration: underline; }

/* What was checked */
ul.checked { list-style: none; margin: 0; padding: 0; }
ul.checked li { padding: 7px 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; }
ul.checked .res { grid-column: 1; color: var(--ink-2); font-size: 13px; }
ul.checked .ev { grid-row: 1 / 3; grid-column: 2; font-family: var(--mono); font-size: 12px; align-self: start; padding-top: 2px; white-space: nowrap; }
ul.checked pre.evout { grid-column: 1 / -1; margin: 4px 0 0; }
ul.plain { margin: 0; padding-left: 18px; }
ul.plain li { margin-bottom: 5px; }
ul.plain .why { color: var(--ink-3); }

/* Next steps */
ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
ol.steps > li { counter-increment: s; display: grid; grid-template-columns: 26px minmax(0, 1fr); padding: 12px 0; border-bottom: 1px solid var(--line-2); }
ol.steps > li::before { content: counter(s); color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 5px; }
.cmd { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; background: var(--wash); font-family: var(--mono); font-size: 13px; }
.cmd .dev { padding: 6px 10px; border-right: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.cmd .line { padding: 6px 10px; flex: 1; overflow-x: auto; white-space: nowrap; }
.cmd button { border: 0; border-left: 1px solid var(--line); border-radius: 0 4px 4px 0; background: transparent; font-size: 12px; color: var(--ink-2); align-self: stretch; }
.cmd button:hover { background: var(--line-2); }
.cmd .copy { display: none; }
.js .cmd .copy { display: block; }
.look { margin: 8px 0 4px; font-size: 13px; color: var(--ink-2); }
.branches { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.branches li { display: grid; grid-template-columns: minmax(180px, 34%) 1fr; gap: 12px; padding: 4px 0; }
.branches .if { color: var(--ink); }
.branches .then { color: var(--ink-2); }
.escalate { border-left: 2px solid var(--red); padding-left: 12px; }
.escalate .tag { color: var(--red); font-weight: 650; font-size: 12.5px; }
.escalate .contact { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }

/* Card footer */
footer.cardfoot { margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
footer.cardfoot p { margin: 0; }
footer.cardfoot form { display: contents; } /* its controls sit in the footer's row, as in the mockup */
footer.cardfoot input { font: inherit; color: var(--ink); border: 1px solid var(--edge); border-radius: 4px; padding: 4px 8px; width: 220px; max-width: 100%; }
/* Wrong opens a list of what was wrong, hung under the button; choosing one sends it. */
footer.cardfoot details.wrong { position: relative; }
footer.cardfoot details.wrong > summary { list-style: none; cursor: pointer; color: var(--ink); background: var(--bg); border: 1px solid var(--edge); border-radius: 4px; padding: 4px 26px 4px 10px; position: relative; user-select: none; }
footer.cardfoot details.wrong > summary::-webkit-details-marker { display: none; }
footer.cardfoot details.wrong > summary::after { content: ""; position: absolute; right: 10px; top: 50%; width: 5px; height: 5px; margin-top: -4px; border: solid var(--ink-3); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
footer.cardfoot details.wrong > summary:hover, footer.cardfoot details.wrong[open] > summary { background: var(--wash); }
footer.cardfoot details.wrong .menu { position: absolute; right: 0; bottom: calc(100% + 4px); z-index: 5; min-width: 250px; display: flex; flex-direction: column; padding: 4px; background: var(--bg); border: 1px solid var(--edge); border-radius: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
footer.cardfoot details.wrong .menu button { border: 0; border-radius: 4px; padding: 6px 10px; text-align: left; white-space: nowrap; background: none; }
footer.cardfoot details.wrong .menu button:hover, footer.cardfoot details.wrong .menu button:focus-visible { background: var(--sel); }
/* "Something else" is the one entry that takes words: it opens a box under itself, sent with Enter. */
footer.cardfoot details.other > summary { list-style: none; cursor: pointer; border-radius: 4px; padding: 6px 10px; color: var(--ink); }
footer.cardfoot details.other > summary::-webkit-details-marker { display: none; }
footer.cardfoot details.other > summary:hover, footer.cardfoot details.other[open] > summary { background: var(--sel); }
footer.cardfoot details.other input { display: block; width: calc(100% - 8px); margin: 6px 4px 4px; }

/* Tool output */
pre { background: var(--wash); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; overflow: auto; max-height: 420px; font: 12.5px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }
code { font: 13px var(--mono); background: var(--wash); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; overflow-wrap: anywhere; }

/* Evidence page */
.evidence-page { padding: 22px 34px 60px; }
.evidence-page dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 13px; margin: 0 0 16px; }
.evidence-page dt { color: var(--ink-3); }
.evidence-page dd { margin: 0; overflow-wrap: anywhere; }
.evidence-page h2 { font-size: 13px; font-weight: 650; margin: 18px 0 6px; }
.evidence-page h2 .muted { font-weight: 400; margin-left: 6px; }
.evidence-page details > summary { cursor: pointer; font-size: 12.5px; color: var(--accent); margin: 12px 0 6px; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  nav.list { border-right: 0; border-bottom: 1px solid var(--line); overflow-y: visible; }
  header.top { height: auto; min-height: var(--top); flex-wrap: wrap; } /* it may wrap on a narrow screen */
  main, .evidence-page { padding: 18px; }
  /* A phone is too narrow for the whole map: it keeps a usable size and scrolls sideways in its box. */
  .home .mapbox { overflow-x: auto; }
  .home .map { min-width: 620px; }
  .need a { grid-template-columns: 96px minmax(0, 1fr) 44px; gap: 2px 12px; }
  .need .sites, .need .reason { grid-column: 2 / 4; white-space: normal; }
  .need .sites { grid-row: 2; }
  .need .reason:empty { display: none; }
  .need.wait .last { white-space: normal; }
  .need.links li { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .need.links .dates { grid-column: 1 / -1; white-space: normal; }
  .need.links .sites { grid-column: 1; }
}

/* Fault path strip */
.path { display: flex; align-items: stretch; margin: 4px 0 2px; overflow-x: auto; }
.hop { flex: 1 1 0; min-width: 150px; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; background: var(--bg); }
.hop .kind { font-size: 11.5px; color: var(--ink-3); }
.hop .name { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hop .st { font-size: 12px; margin-top: 4px; color: var(--ink-2); overflow-wrap: anywhere; }
.hop .st a { font-family: var(--mono); font-size: 11.5px; }
/* A box's state is its mark and words (and a faint tint for a fault), not a coloured edge. */
.hop.bad { border-color: var(--red-edge); background: var(--red-wash); }
.hop .al { font-size: 12px; color: var(--red); margin-top: 2px; }
.ok-t { color: var(--green); }
.bad-t { color: var(--red); }
.unk-t { color: var(--ink-3); }
.link { flex: 0 0 26px; align-self: center; height: 1px; background: var(--edge); }
.link.cut { background: repeating-linear-gradient(90deg, var(--red) 0 4px, transparent 4px 8px); height: 2px; }
.path-note { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; }

/* Confirmation page */
.confirm-page { padding: 22px 34px 60px; max-width: 720px; }
.confirm-page .ask { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
ul.picked { list-style: none; margin: 14px 0 0; padding: 0; }
ul.picked li { padding: 6px 0; border-bottom: 1px solid var(--line-2); }
ul.picked .num { font-family: var(--mono); font-size: 12.5px; margin-right: 8px; }
a.button { display: inline-block; padding: 4px 10px; border: 1px solid var(--edge); border-radius: 4px; color: var(--ink); }
a.button:hover { background: var(--wash); text-decoration: none; }

/* Paste box and verdict under a run step */
.branches li.hit { background: var(--green-wash); box-shadow: -8px 0 0 var(--green-wash), 8px 0 0 var(--green-wash); }
.branches li.hit .if::before { content: "✓ "; color: var(--green); }
.verdict { margin-top: 12px; border-left: 2px solid var(--green); padding: 2px 0 2px 12px; }
.verdict.pending, .verdict.failed { border-left-color: var(--line); }
.verdict .who { font-size: 12px; color: var(--ink-3); }
.verdict .v { margin: 2px 0 6px; }
.verdict .label { margin: 4px 0 0; font-size: 12px; color: var(--ink-2); }
.verdict .next { margin: 0 0 6px; font-weight: 600; }
.verdict .next.esc { color: var(--red); font-weight: 650; font-size: 12.5px; border-left: 2px solid var(--red); padding-left: 8px; }
.verdict .rule { margin: 8px 0 0; font-size: 12px; }
.verdict .also { font-size: 13px; color: var(--ink-2); margin: 8px 0 4px; }
.verdict .more-cmd + .more-cmd { margin-top: 10px; }
details.paste { margin-top: 10px; }
details.paste summary { cursor: pointer; font-size: 13px; color: var(--accent); list-style: none; }
details.paste summary::-webkit-details-marker { display: none; }
details.paste textarea { display: block; box-sizing: border-box; width: 100%; height: 108px; margin-top: 8px; font: 12.5px/1.45 var(--mono); border: 1px solid var(--edge); border-radius: 4px; padding: 8px; resize: vertical; color: var(--ink); }
.paste-row { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.paste-error { margin: 10px 0 0; font-size: 13px; color: var(--red); }
.paste-off { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); }
details.earlier { margin-top: 8px; font-size: 12px; color: var(--ink-3); }
details.earlier summary { cursor: pointer; }
details.earlier ul { margin: 4px 0 0; padding-left: 18px; }
/* Who else has a ticket open: a dot a person, in that person's colour. Eight bright colours: purple,
   cyan, orange, pink, green, blue, yellow and lime. No black or grey, and no red (red is an alarm). */
.pd { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); }
.pc-0 { background: #7c3aed; } .pc-1 { background: #06b6d4; } .pc-2 { background: #f97316; } .pc-3 { background: #ec4899; }
.pc-4 { background: #22c55e; } .pc-5 { background: #3b82f6; } .pc-6 { background: #facc15; } .pc-7 { background: #84cc16; }
.viewers { display: flex; flex: none; align-items: center; }
.viewers[hidden] { display: none; }
.viewers .lbl { margin-right: 6px; font-size: 12px; }
.pv { position: relative; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: default; }
.pv:hover { background: transparent; }
.pv.more { width: auto; height: 20px; margin-left: 4px; padding: 0 7px; border: 1px solid var(--edge); border-radius: 10px; background: var(--wash); font-size: 11.5px; color: var(--ink-2); }
/* The address, under the dot it belongs to, while the pointer or the keyboard is on that dot. */
.pv .tip { display: none; position: absolute; top: 26px; right: 0; z-index: 4; padding: 4px 8px; border-radius: 4px; background: var(--ink); color: var(--bg); font-size: 12px; line-height: 1.5; white-space: nowrap; text-align: left; }
.pv .tip span { display: block; }
.pv:hover .tip, .pv:focus-visible .tip { display: block; }
/* In the list: the same colours at the right end of a row's last line, smaller, with no names. */
.row .sub .pres { float: right; display: flex; gap: 3px; align-items: center; height: 18px; margin-left: 8px; }
.row .sub .pres .pd { width: 8px; height: 8px; }
/* Versions of a ticket, a person's private draft, and the box for asking for a guided run. */
.notice.draft { border-left-color: var(--accent); padding: 6px 0 6px 12px; }
.notice.draft b { color: var(--ink); font-weight: 650; }
.notice.draft .actions { margin: 8px 0 0; flex-wrap: wrap; }
.notice.draft .actions form { margin: 0; }
.notice .asked { margin: 6px 0 0; padding-left: 20px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.notice .reply { margin: 8px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--wash); }
.notice .reply p { margin: 0; color: var(--ink); }
.notice .reply p + p { margin-top: 6px; }
.notice .reply .not-done b { color: var(--amber); }
.notice .reply .why, .notice .reply .ask { color: var(--ink-2); }
section.guide textarea { display: block; box-sizing: border-box; width: 100%; height: 96px; margin-top: 0; font: inherit; border: 1px solid var(--edge); border-radius: 4px; padding: 8px; resize: vertical; color: var(--ink); background: var(--bg); }
.banner[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The admin page: how the diagnoses are doing. Tables of numbers, on every theme. */
.admin-page { padding: 16px 20px 48px; max-width: 1500px; margin: 0 auto; }
.admin-page section { margin-top: 28px; }
.admin-page h2 { font-size: 15px; margin: 0 0 6px; }
.admin-page .note { margin: 12px 0 0; padding: 7px 12px; font-size: 13px; background: var(--amber-wash); color: var(--amber-ink); border: 1px solid var(--amber-edge); border-radius: 4px; }
.admin-page .windows { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13px; }
.admin-page .windows a { padding: 2px 10px; border: 1px solid var(--edge); border-radius: 4px; color: var(--ink); }
.admin-page .windows a:hover { background: var(--wash); text-decoration: none; }
.admin-page .windows a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.admin-page .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.admin-page .tile { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--wash); }
.admin-page .tile b { display: block; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.admin-page .tile span { font-size: 12.5px; color: var(--ink-2); }
.admin-page .tile.bad b { color: var(--red); }
.admin-page .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 28px; }
.admin-page .pair > div { min-width: 0; overflow-x: auto; }
.admin-page section { overflow-x: auto; }
table.admin { border-collapse: collapse; width: 100%; font-size: 13px; }
table.admin caption { text-align: left; color: var(--ink-3); font-size: 12.5px; padding-bottom: 4px; }
table.admin th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12px; padding: 4px 12px 4px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.admin td { padding: 5px 12px 5px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.admin .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.admin code { font-family: var(--mono); font-size: 12px; }
.admin-page .bad { color: var(--red); }
.admin-page .good { color: var(--green); }
svg.bar { display: block; margin-top: 6px; }
svg.bar rect { fill: var(--accent); }
.admin-page .pager { max-width: none; }
.admin-page [id] { scroll-margin-top: calc(var(--top) + 8px); } /* a turned page lands on its list */
/* One run from end to end (admin_run.html). */
.run-page { max-width: 1200px; }
.run-page .windows .off { padding: 2px 10px; color: var(--ink-3); }
.run-page .run-title { font-size: 18px; margin: 16px 0 10px; }
.run-page h3 { font-size: 13px; margin: 14px 0 6px; color: var(--ink-2); }
.run-page .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 24px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--wash); }
.run-page .facts div { display: flex; gap: 8px; min-width: 0; }
.run-page .facts dt { flex: none; width: 96px; color: var(--ink-3); font-size: 12.5px; }
.run-page .facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.run-page code { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.run-page .asked { margin: 0 0 8px; padding-left: 20px; }
.run-page pre { margin: 6px 0 0; padding: 10px 12px; font: 12px/1.5 var(--mono); background: var(--wash); border: 1px solid var(--line-2); border-radius: 4px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow: auto; }
.run-page details.blob { margin: 4px 0; border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px; }
.run-page details.blob > summary { cursor: pointer; font-size: 13px; }
.run-page details.blob[open] { padding-bottom: 10px; }
.run-page .tools { margin: 6px 0 0; padding-left: 20px; columns: 2 320px; }
.run-page .flow { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: step; }
.run-page .ev { counter-increment: step; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 8px 0 8px 10px; border-top: 1px solid var(--line-2); border-left: 3px solid var(--line); }
.run-page .ev .what { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.run-page .ev .what::before { content: counter(step) ". "; color: var(--ink-3); font-weight: 400; }
.run-page .ev .body > pre:first-child { margin-top: 0; }
.run-page .ev .body p { margin: 0 0 4px; }
.run-page .ev.assistant { border-left-color: var(--accent); }
.run-page .ev.tool_use { border-left-color: var(--green); }
.run-page .ev.checker, .run-page .ev.retry, .run-page .ev.tool_result_error { border-left-color: var(--amber); }
.run-page .ev.error { border-left-color: var(--red); }
.run-page tr.here td { background: var(--sel); }
@media (max-width: 700px) { .run-page .ev { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.run-page table.admin td:not(:last-child) { white-space: nowrap; } /* only the cause may run over lines */
.prompt-page pre { max-height: none; } /* the prompt is the page: shown whole */
/* The button that goes between the page everyone sees and the admin pages: it says where it leads. */
header.top a.switch { font-size: 12px; line-height: 1.5; padding: 2px 8px; color: var(--ink); background: var(--bg); border: 1px solid var(--edge); border-radius: 4px; }
header.top a.switch:hover { background: var(--wash); text-decoration: none; }
/* An admin page is as tall as the window and does not itself scroll, like the board: the header stays
   at the window's top edge and only what is under it scrolls, so the page can never be pulled down
   past the header. The width that was the page's is kept as room either side of what scrolls. */
html:has(body.admin), body.admin { overscroll-behavior: none; }
body.admin { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.admin header.top { flex: none; }
body.admin main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; max-width: none; margin: 0; padding: 20px max(24px, calc((100% - 1452px) / 2)) 48px; }
body.admin main.run-page { padding-inline: max(24px, calc((100% - 1152px) / 2)); }
body.admin .admin-page [id] { scroll-margin-top: 8px; } /* the header is no longer over what scrolls */
/* The header's three controls (Admin or Public, the theme, Sign out) are one height, with their
   words in the middle, so they sit level whatever each is made of. */
header.top a.switch, header.top .who button, header.top .theme-pick select { box-sizing: border-box; height: 30px; font-size: 13px; line-height: 1; padding: 0 12px; border-radius: 6px; }
header.top a.switch { display: inline-flex; align-items: center; }
/* The theme picker draws its own arrow, so it is the same small chevron in every browser and takes
   the theme's colour: the browser's arrow is hidden, and room for ours is kept on the right. */
header.top .theme-pick select { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer; }
header.top .theme-pick { position: relative; }
header.top .theme-pick::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(45deg); pointer-events: none; }
/* The way in to the admin pages is tinted with the theme's own accent (the ground of a selected
   row, the accent for its words and a softened accent for its edge), so it stands a little apart
   from the plain Public button on every theme. */
header.top a.switch.to-admin { background: var(--sel); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--bg)); }
header.top a.switch.to-admin:hover { background: color-mix(in srgb, var(--accent) 16%, var(--bg)); border-color: var(--accent); }
/* A grey tint on headings. In the ticket list each group's heading ("Needs work", ...) sits on the
   theme's pale ground, a shade deeper under the pointer, and the tickets under it stay on the page's
   ground. A table's heading row has the same tint over plain rows. Heading cells get room on the left
   so words do not touch the tint's edge, and the rows under them line up with that. */
.group > summary { background: var(--wash); }
.group > summary:hover { background: var(--line-2); }
table.admin thead th, table.alerts th { background: var(--wash); }
table.admin th:first-child, table.admin td:first-child, table.alerts th:first-child, table.alerts td:first-child { padding-left: 10px; }

/* ── Classic: a desk of folders and paper ────────────────────────────────────────────────────────
   Small touches of the paper office, on the classic theme only (it is the page with no data-theme)
   and without moving anything: typed labels for headings, ledger rules on tables, and paper
   that is not quite white. Red, amber and green keep their meanings; manila is only ever tan. */
:root:not([data-theme]) {
  --bg: #fffefa;                                  /* paper, a breath warmer than white */
  --manila: #f3e3b5; --manila-edge: #d8c383;      /* a folder, and its darker edge */
  --rule: #d5e2f0;                                /* ledger paper's pale blue rules */
}
/* Paper: a grain too faint to see as lines, and a soft shade where the sheet meets the list. */
:root:not([data-theme]) body.desk main, :root:not([data-theme]) body.admin main {
  background-image: repeating-linear-gradient(0deg, rgba(120, 96, 48, .016) 0 1px, transparent 1px 3px),
                    repeating-linear-gradient(90deg, rgba(120, 96, 48, .010) 0 1px, transparent 1px 4px);
}
:root:not([data-theme]) body.desk main { box-shadow: inset 10px 0 14px -12px rgba(96, 74, 30, .22); }
/* Headings are typed labels: the typewriter's face, in spaced capitals. Counts beside them are not. */
/* The list's category headings and the home page's headings are typed the same way on every theme. */
:root:not([data-theme]) section > h2, :root .home h2, :root .group h2,
:root:not([data-theme]) .admin-page h2:not(.run-title), :root:not([data-theme]) .run-page h3 {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .09em; font-size: 12px; font-weight: 700;
}
:root:not([data-theme]) section > h2 .n, :root .group h2 .n, :root .home h2 .back {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; text-transform: none; letter-spacing: 0; font-size: 12.5px;
}
/* Tables are ledger paper: pale blue rules between the rows. A ticket's alerts table has a manila
   band for its headings; the admin tables keep the grey band. */
:root:not([data-theme]) table.alerts th { background: var(--manila); border-bottom-color: var(--manila-edge); color: var(--ink); }
:root:not([data-theme]) table.admin td, :root:not([data-theme]) table.alerts td { border-bottom-color: var(--rule); }

/* The admin page's summary: a ruled strip of figures, not boxes. Each has a typed label, the figure
   in ordinary weight, what it is of, a small line of how it went, and how it moved against the time
   before. A hairline divides one figure from the next. */
.admin-page .figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 16px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.admin-page .figure { display: flex; flex-direction: column; gap: 1px; margin: 10px 0; padding: 0 14px; min-width: 0; border-left: 1px solid var(--line); }
.admin-page .figure:first-child { padding-left: 0; border-left: 0; }
.admin-page .figure .label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.admin-page .figure .value { font-size: 20px; line-height: 26px; height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.admin-page .figure .of { font-size: 12.5px; line-height: 19px; height: 19px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-2); }
.admin-page .figure .spark { display: block; margin: 6px 0 2px; height: 26px; max-width: 100%; }
.admin-page .figure .spark polyline { fill: none; stroke: var(--ink-2); stroke-width: 1.25; stroke-linejoin: round; stroke-linecap: round; }
/* Room for two lines whether or not there are two (or any), and one line for what the figure is of,
   so every figure in every view is as tall as the tallest can be. */
.admin-page .figure .moved { font-size: 12px; line-height: 18px; height: 36px; overflow: hidden; color: var(--ink-3); }
.admin-page .compared { margin: 6px 0 0; font-size: 12px; line-height: 18px; min-height: 18px; }
