/* Carbon copy · the new look (practice copy first; NDT_NEW_LOOK=1 for the office copy once approved).
 * From the office's own NCR job-sheet pads: white sheet, carbon-navy ink, ballpoint-blue actions, red pen for what is late,
 * and the copy colours (canary checked, pink issued, green billed) for a record's stage. Loaded after tokens.css and app.css:
 * it redefines the tokens, so every page that already uses them changes with it. */
/* Tokens: carbon-tokens.css */

/* Browser surfaces in the palette */
::selection { background: oklch(88% 0.06 266); color: var(--color-ink); }
html { accent-color: var(--color-accent); caret-color: var(--color-accent); }
body { font-feature-settings: "tnum" 0; -webkit-font-smoothing: antialiased; }
td, th, .ref, .sheet__n, .row__age, .pipeline strong { font-variant-numeric: tabular-nums; }
a { text-underline-offset: 0.18em; }
* { scrollbar-color: var(--color-rule) transparent; }
h1, #content h1 { font-weight: 650; letter-spacing: -0.025em; }

/* ---- Top bar: the carbon band ---- */
html body #header { background: var(--color-shell); color: var(--color-shell-ink); border-bottom: 0; }
#site-name { display: flex; align-items: center; gap: var(--space-2xs); }
#site-name a, #site-name a:link, #site-name a:visited { color: var(--color-shell-ink); font-weight: 700; letter-spacing: -0.015em; font-size: var(--text-md); }
.copy-tag { font-family: var(--font-outlier); font-size: var(--text-sm); font-weight: 600; line-height: 1; padding: 4px 7px;
  border-radius: 3px; background: var(--color-attention-bg); color: var(--color-attention-fg); white-space: nowrap; }
.area > summary { color: var(--color-shell-ink-2); }
.area > summary:hover, .area[open] > summary, .area.current > summary { color: var(--color-shell-ink); background: var(--color-shell-2); }
html body #user-tools, #user-tools a, #user-tools a:link, #user-tools a:visited, html body #logout-form button { color: var(--color-shell-ink-2); }
#user-tools strong { color: var(--color-shell-ink); }
#user-tools a:hover, html body #logout-form button:hover { color: var(--color-shell-ink); }
:focus-visible { outline-color: var(--color-accent); }
#header :focus-visible { outline-color: var(--color-shell-ink); }

/* ---- Tables: form-box heads ---- */
thead th, tfoot td, #changelist table thead th, table thead th { font-family: var(--font-outlier); font-weight: 600;
  text-transform: none; letter-spacing: 0.01em; font-size: var(--text-sm); color: var(--color-ink-2); background: transparent;
  border-bottom: 1px solid var(--color-ink); }

/* ---- Home: the desk ---- */
.dashboard #content { max-width: 1240px; }
.desk__head h1 { font-size: var(--text-xl); margin-bottom: var(--space-3xs); }
.desk .lede { margin: 0 0 var(--space-md); color: var(--color-ink-2); max-width: 60ch; }
.setup-line { margin: 0 0 var(--space-md); padding: var(--space-2xs) var(--space-sm); background: var(--color-attention-bg);
  color: var(--color-attention-fg); border-radius: var(--radius-input); max-width: max-content; }
.setup-line a { color: var(--color-attention-fg); font-weight: 600; }

.pipeline { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3xs) 0; margin: 0 0 var(--space-lg);
  padding-bottom: var(--space-sm); border-bottom: 1px solid var(--color-rule); }
.pipeline__label { font-family: var(--font-outlier); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 0.75rem; color: var(--color-ink-2); margin-right: var(--space-sm); }
.pipeline a { color: var(--color-ink-2); text-decoration: none; padding: 2px var(--space-xs); border-left: 1px solid var(--color-rule); }
.pipeline a:first-of-type { border-left: 0; padding-left: 0; }
.pipeline a strong { font-family: var(--font-outlier); font-weight: 600; font-size: var(--text-md); color: var(--color-ink); }
.pipeline a:hover strong, .pipeline a:hover { color: var(--color-accent); }
.pipeline a.is-zero strong { color: var(--color-ink-2); font-weight: 500; }

.boards { columns: 2 26rem; column-gap: var(--space-xl); }
.sheet { break-inside: avoid; margin: 0 0 var(--space-lg); border-top: 2px solid var(--color-ink); padding-top: var(--space-2xs); }
.sheet h2 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); margin: 0 0 var(--space-3xs);
  padding: 0; background: none; font-size: var(--text-md); font-weight: 650; letter-spacing: -0.01em; color: var(--color-ink); }
.sheet__n { font-family: var(--font-outlier); font-weight: 500; font-size: var(--text-sm); color: var(--color-ink-2); white-space: nowrap; }
.sheet__n em { font-style: normal; font-weight: 600; color: var(--color-redpen); }
.sheet__rows { list-style: none; margin: 0; padding: 0; }
.sheet__rows .row { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--color-rule-soft); }
.row a { display: grid; grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr) auto; gap: var(--space-sm); align-items: baseline;
  padding: 7px 0; color: var(--color-ink); text-decoration: none; font-size: var(--text-sm); line-height: 1.4; }
.row a:hover { background: var(--color-paper-2); box-shadow: -8px 0 0 var(--color-paper-2), 8px 0 0 var(--color-paper-2); }
.row a:hover .row__what { color: var(--color-accent); }
.row__who { font-family: var(--font-outlier); font-weight: 600; font-size: var(--text-base); overflow-wrap: anywhere; }
.row__what { color: var(--color-ink-2); grid-column: 2; }
.row a > .row__what:first-child { grid-column: 1 / 3; }
.row__age { grid-column: 3; font-family: var(--font-outlier); font-weight: 600; color: var(--color-redpen); white-space: nowrap; }
.row.is-late .row__what { color: var(--color-ink); }
.sheet__more summary { cursor: pointer; padding: var(--space-2xs) 0; font-size: var(--text-sm); font-weight: 600; color: var(--color-accent);
  list-style: none; }
.sheet__more summary::-webkit-details-marker { display: none; }
.all-clear { font-size: var(--text-md); color: var(--color-ink-2); }
.desk details.records { margin-top: var(--space-xl); border-top: 1px solid var(--color-rule); }

@media (max-width: 48rem) {
  .desk__head h1 { font-size: 1.625rem; }
  .pipeline { margin-bottom: var(--space-md); }
  .pipeline a { padding: 2px var(--space-2xs); }
  .row a { grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--space-sm); padding: var(--space-2xs) 0; }
  .row__who { grid-column: 1; }
  .row__what { grid-column: 1; }
  .row a > .row__what:first-child { grid-column: 1; }
  .row__age { grid-column: 2; grid-row: 1; }
}

/* ===================== The frame: carbon rail on the left, the page as a sheet on the desk ===================== */
:root { --rail-w: 15.5rem; }
body { background: var(--color-paper-3); }
html body #container { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-template-rows: auto 1fr auto;
  min-height: 100vh; min-width: 0; }
#container > :not(#header) { grid-column: 2; min-width: 0; }
html body #header.rail { grid-column: 1; grid-row: 1 / -1; position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0; min-height: 0;
  background: var(--color-shell); color: var(--color-shell-ink); scrollbar-color: var(--color-shell-2) transparent; }
.rail__top { display: flex; align-items: center; gap: var(--space-2xs); padding: var(--space-md) var(--space-md) var(--space-sm); }
.rail__mark, .rail__mark:link, .rail__mark:visited { color: var(--color-shell-ink); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em;
  text-decoration: none; }
.rail__toggle { display: none; }
.rail__body { display: flex; flex-direction: column; flex: 1; padding: 0 var(--space-sm) var(--space-sm); }
.rail__find input[type=search] { width: 100%; min-height: 38px; background: var(--color-shell-2); border: 1px solid oklch(36% 0.04 266);
  color: var(--color-shell-ink); border-radius: var(--radius-input); padding: 7px 10px; font-size: var(--text-sm); }
.rail__find input::placeholder { color: var(--color-shell-ink-2); opacity: 1; }
.rail__find input:focus { outline: 2px solid var(--color-shell-ink); outline-offset: 1px; border-color: transparent; }
.rail a, .rail a:link, .rail a:visited { color: var(--color-shell-ink-2); text-decoration: none; }
.rail__home { margin: var(--space-sm) 0 var(--space-3xs); font-weight: 600; }
.rail .goto { display: flex; flex-direction: column; gap: var(--space-sm); margin-top: var(--space-xs); }
.rail .goto h2 { margin: 0 0 var(--space-3xs); padding: 0 var(--space-2xs); background: none; font-family: var(--font-outlier); font-weight: 600;
  font-size: 0.75rem; letter-spacing: 0.07em; text-transform: uppercase; color: oklch(66% 0.03 266); }
.rail .goto ul.menu { list-style: none; margin: 0; padding: 0; position: static; min-width: 0; border: 0; box-shadow: none; background: none; }
.rail .goto li { list-style: none; margin: 0; padding: 0; }
.rail .goto a, .rail__home { display: block; padding: 6px var(--space-2xs); border-radius: var(--radius-input); font-size: var(--text-sm);
  line-height: 1.3; white-space: normal; transition: background-color 120ms ease-out, color 120ms ease-out; }
.rail a:hover { color: var(--color-shell-ink); background: var(--color-shell-2); }
.rail a[aria-current="page"] { color: var(--color-shell-ink); background: var(--color-shell-2); font-weight: 600; }
.rail__user { margin-top: auto; padding: var(--space-md) var(--space-2xs) var(--space-2xs); border-top: 1px solid var(--color-shell-2);
  display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-sm); font-size: var(--text-sm); color: var(--color-shell-ink-2); }
.rail__user strong { width: 100%; color: var(--color-shell-ink); font-weight: 600; }
html body .rail #logout-form button { color: var(--color-shell-ink-2); text-decoration: none; padding: 0; }
.rail__user a:hover, html body .rail #logout-form button:hover { color: var(--color-shell-ink); background: none; }

/* The page: breadcrumbs on the desk, then the sheet */
html body div.breadcrumbs { padding: var(--space-md) var(--space-xl) 0; max-width: 1320px; box-sizing: border-box; }
html body .main { padding: var(--space-xs) var(--space-xl) var(--space-xl); box-sizing: border-box; }
html body .main > .content { max-width: 1320px; }
html body #content { background: var(--color-paper); border: 1px solid var(--color-rule); border-radius: var(--radius-card);
  padding: var(--space-lg) var(--space-xl) var(--space-xl); box-sizing: border-box; }
.dashboard #content { max-width: none; }
html body #content > h1 { font-size: var(--text-xl); margin-bottom: var(--space-sm); }
html body #content > h2 { color: var(--color-ink-2); font-weight: 500; font-size: var(--text-md); }
#footer { border-top: 0; padding: 0 var(--space-xl) var(--space-md); background: transparent; }
.messagelist li { margin: 0 var(--space-xl) var(--space-2xs); }

/* Buttons: ballpoint blue, pressed like a real button */
.button, input[type=submit], input[type=button], .submit-row input, a.button, button.button { font-weight: 600;
  transition: background-color 120ms ease-out, transform 100ms ease-out; }
.button:active, input[type=submit]:active, a.button:active, button.button:active { transform: scale(0.97); }

/* Lists (registers): the add button up top, quiet filters on the right, roomy rows */
html body .object-tools a:link, html body .object-tools a:visited { background: var(--color-accent); color: var(--color-accent-ink);
  border: 0; font-weight: 600; font-size: var(--text-sm); padding: 9px 14px; background-image: none; }
html body .object-tools a:hover { background: var(--color-accent-hover); color: var(--color-accent-ink); }
#changelist #toolbar { padding: 0 0 var(--space-sm); }
#result_list tbody td, #result_list tbody th { padding: 11px 10px; vertical-align: middle; font-size: var(--text-sm); }
#result_list tbody th a { font-weight: 600; }
html body #changelist-filter { background: var(--color-paper-2); border: 0; border-radius: var(--radius-card); }
html body #changelist-filter h2 { background: none; border-bottom: 1px solid var(--color-rule); }
#changelist-filter h3 { font-family: var(--font-outlier); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-ink-2); }
#changelist-filter li.selected a { font-weight: 600; }

/* Forms: like the paper form, labels in narrow form-box type */
html body form .form-row { padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-rule-soft); }
html body form .aligned label, html body .flex-container > label { font-family: var(--font-outlier); font-weight: 600; font-size: 0.8125rem;
  letter-spacing: 0.03em; color: var(--color-ink-2); }
html body form .aligned label.required { color: var(--color-ink); }
html body fieldset.module { border: 0; border-top: 2px solid var(--color-ink); border-radius: 0; overflow: visible; }
html body fieldset.module > h2 { background: none; border: 0; padding: var(--space-2xs) 0; font-size: var(--text-md); font-weight: 650; }
html body .submit-row { position: sticky; bottom: 0; z-index: 5; background: oklch(99.5% 0.002 265 / 0.94); backdrop-filter: blur(6px);
  border: 1px solid var(--color-rule); box-shadow: 0 -6px 18px oklch(21.5% 0.035 266 / 0.06); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .button:active, a.button:active { transform: none; } }

/* Phones and narrow windows: the rail becomes a top bar with a Menu button */
@media (max-width: 64rem) {
  html body #container { grid-template-columns: minmax(0, 1fr); }
  #container > :not(#header) { grid-column: 1; }
  html body #header.rail { grid-row: auto; height: auto; max-height: 100vh; z-index: 40; }
  .rail__top { padding: var(--space-xs) var(--space-sm); }
  .rail__toggle { display: inline-flex; align-items: center; margin-left: auto; min-height: 40px; padding: 0 var(--space-sm); background: var(--color-shell-2);
    color: var(--color-shell-ink); border: 0; border-radius: var(--radius-input); font: inherit; font-weight: 600; cursor: pointer; }
  .rail__body { display: none; }
  #header.is-open .rail__body { display: flex; }
  html body div.breadcrumbs { padding: var(--space-sm) var(--space-sm) 0; }
  html body .main { padding: var(--space-2xs) var(--space-2xs) var(--space-md); }
  html body #content { padding: var(--space-md) var(--space-sm); border-radius: var(--radius-input); }
  #footer { padding: 0 var(--space-sm) var(--space-md); }
  .messagelist li { margin: 0 var(--space-2xs) var(--space-2xs); }
}

/* The mark: a job sheet over its canary copy */
.rail__mark { display: inline-flex; align-items: center; gap: 9px; }
.rail__mark svg { flex: none; }

/* Open jobs as one strip, each stage in its copy colour (white requested, canary planned, blue in progress, pink reporting, green completed) */
.flow { margin: 0 0 var(--space-lg); }
.flow__bar { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--color-paper-3); gap: 2px; }
.flow__bar span { display: block; min-width: 4px; }
.flow__legend { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-md); margin: var(--space-2xs) 0 0; padding: 0; list-style: none; }
.flow__legend li { list-style: none; margin: 0; padding: 0; }
.flow__legend a { display: inline-flex; align-items: baseline; gap: 6px; color: var(--color-ink-2); text-decoration: none; font-size: var(--text-sm); }
.flow__legend a:hover { color: var(--color-accent); }
.flow__legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; align-self: center; }
.flow__legend strong { font-family: var(--font-outlier); font-weight: 600; font-size: var(--text-md); color: var(--color-ink); }
.st-requested { background: oklch(84% 0.012 264); box-shadow: inset 0 0 0 1px var(--color-rule); }
.st-planned { background: oklch(86% 0.12 95); }
.st-in_progress { background: var(--color-accent); }
.st-reporting { background: oklch(76% 0.09 355); }
.st-completed { background: oklch(70% 0.1 160); }

/* Fixes after the first look */

html body #header.rail { scrollbar-width: thin; }
html body .rail a.rail__mark, html body .rail a.rail__mark:link, html body .rail a.rail__mark:visited { color: var(--color-shell-ink); }
html body #changelist { min-width: 0; }
html body #changelist .changelist-form-container { min-width: 0; flex: 1 1 0; }
html body #changelist .results { overflow-x: auto; }
html body #changelist-filter { flex: 0 0 15rem; }
html body #header.rail a:link, html body #header.rail a:visited { color: var(--color-shell-ink-2); }
html body #header.rail a:hover, html body #header.rail a[aria-current="page"] { color: var(--color-shell-ink); }
html body #header.rail a.rail__mark { color: var(--color-shell-ink); }
html body .main > .content { min-width: 0; flex: 1 1 0; }

/* Narrow windows: header, breadcrumbs, page, footer stacked (no stretched row above the page) */
@media (max-width: 64rem) {
  html body #container { grid-template-rows: auto auto 1fr auto; }
}

/* File pickers: a drop area (the browser takes a dropped file on it), with the button in the button voice */
input[type=file] { box-sizing: border-box; width: 100%; max-width: 30rem; padding: var(--space-sm); border: 1px dashed var(--color-field);
  border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink-2); font: inherit; font-size: var(--text-sm);
  cursor: pointer; transition: border-color 120ms ease-out, background-color 120ms ease-out; }
input[type=file]:hover, input[type=file]:focus-visible { border-color: var(--color-accent); background: var(--color-accent-soft); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: var(--space-sm); padding: 8px 14px; border-radius: var(--radius-input);
  border: 1px solid var(--color-field); background: var(--color-paper); color: var(--color-ink); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--color-paper-2); }

/* ---- Tool pages: the steps strip (where this day stands) ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 2px; list-style: none; margin: 0 0 var(--space-lg); padding: 0;
  counter-reset: step; }
.steps li { list-style: none; margin: 0; padding: var(--space-2xs) var(--space-sm) var(--space-xs); border-top: 3px solid var(--color-rule);
  color: var(--color-ink-2); font-size: var(--text-sm); counter-increment: step; }
.steps li::before { content: counter(step); font-family: var(--font-outlier); font-weight: 600; margin-right: 6px; color: var(--color-ink-2); }
.steps li b { color: var(--color-ink); font-weight: 600; }
.steps li.is-done { border-top-color: oklch(70% 0.1 160); }
.steps li.is-now { border-top-color: var(--color-accent); background: var(--color-accent-soft); }
.steps li.is-now::before { color: var(--color-accent); }

/* RT day: two drop areas side by side, then the go button */
.scan-in { margin: 0 0 var(--space-sm); }
.scan-in__drops { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--space-sm); }
.drop label { display: block; font-weight: 600; margin-bottom: var(--space-3xs); }
.drop input[type=file] { max-width: none; padding: var(--space-lg) var(--space-sm); }
.drop__kept { margin: var(--space-3xs) 0 0; font-size: var(--text-sm); }
.scan-in__go { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-sm); margin-top: var(--space-sm); }
.scan-in__go .quiet { font-size: var(--text-sm); }
.days { list-style: none; margin: 0; padding: 0; }
.days li { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--color-rule-soft); }
.days a { display: flex; justify-content: space-between; gap: var(--space-2xs); padding: 6px 0; text-decoration: none; color: var(--color-ink); font-size: var(--text-sm); }
.days a:hover .ref { color: var(--color-accent); }
.days li[aria-current] a { font-weight: 600; }
.days li[aria-current] .ref { color: var(--color-accent); }
.workbench__aside .panel { background: var(--color-paper-2); border: 0; }
html body #container { height: auto; }  /* Django sets 100%, which ends the sticky rail one screen down */

/* Print: no rail, no desk, no sheet frame — just the page */
@media print {
  html body #container { display: block; }
  html body #header.rail, .rail__toggle, .steps, .workbench__aside { display: none !important; }
  body { background: #fff; }
  html body .main { padding: 0; }
  html body #content { border: 0; padding: 0; }
  html body .submit-row { position: static; box-shadow: none; backdrop-filter: none; }
}

/* One main action per row: after the first solid button, its sibling buttons are outlined; "Show/Open" next to a date too */
:is(a, button).button ~ :is(a, button).button:not(.default):not([aria-current]):not(.danger),
input[type=date] ~ :is(a, button).button, input[type=date] + :is(a, button).button {
  background: var(--color-paper); color: var(--color-ink); border: 1px solid var(--color-field); box-shadow: none; }
:is(a, button).button ~ :is(a, button).button:not(.default):not([aria-current]):not(.danger):hover,
input[type=date] ~ :is(a, button).button:hover { background: var(--color-paper-2); color: var(--color-ink); }

/* Workbench: the work column scrolls sideways inside itself rather than running under the aside; the first column (the
   joint, the item) keeps room to read */
.workbench__main { min-width: 0; overflow-x: auto; }
.workbench__main table :is(th, td):first-child { min-width: 8.5rem; }

/* Guided pages (22 Oct 2026): what needs a person first, the rest folded away, a line of help under each heading.
   .needs: the canary list of decisions (each with its own action); .fold: a section that opens on demand, its count in
   the summary; .help: one plain line under a heading; .term: an office word with its plain meaning on hover. */
.needs { margin: var(--space-sm) 0 var(--space-md); padding: var(--space-sm) var(--space-md); background: var(--color-attention-bg);
  color: var(--color-attention-fg); border: 1px solid var(--color-attention); border-radius: var(--radius-card); }
.needs h2 { margin: 0 0 var(--space-2xs); font-size: var(--text-md); color: var(--color-attention-fg); }
.needs ol { margin: 0; padding-left: 1.2em; }
.needs li { margin: var(--space-2xs) 0; }
.needs li form { display: inline-flex; flex-wrap: wrap; gap: var(--space-2xs); align-items: center; margin-left: var(--space-2xs); }
.needs.is-clear { background: var(--color-paper-2); color: var(--color-ink-2); border-color: var(--color-rule); }
.needs.is-clear h2 { color: var(--color-ink); }
details.fold { margin: var(--space-md) 0; border-top: 2px solid var(--color-ink); }
details.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: var(--space-xs);
  padding: var(--space-xs) 0; font-size: var(--text-lg); font-weight: 650; letter-spacing: -0.025em; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "▸"; color: var(--color-accent); font-size: var(--text-md); transition: transform 120ms ease-out; }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary .count { font: 500 var(--text-sm) "Archivo Narrow", sans-serif; color: var(--color-ink-2); }
.help { margin: 0 0 var(--space-xs); color: var(--color-ink-2); font-size: var(--text-sm); max-width: 70ch; }
.term { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
@media (prefers-reduced-motion: reduce) { details.fold > summary::before { transition: none; } }
/* "Start here" on Today: the next few things, one per row, the first in ballpoint */
.start { margin: var(--space-sm) 0 var(--space-md); }
.start h2 { font-size: var(--text-lg); margin: 0 0 var(--space-2xs); }
.start ol { list-style: none; margin: 0; padding: 0; counter-reset: start; display: grid; gap: var(--space-2xs); }
.start li { counter-increment: start; }
.start a { display: grid; grid-template-columns: 2rem 1fr; column-gap: var(--space-xs); padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-rule); border-radius: var(--radius-card); text-decoration: none; color: var(--color-ink); background: var(--color-paper); }
.start a::before { content: counter(start); grid-row: span 2; font: 600 var(--text-lg) "Archivo Narrow", sans-serif; color: var(--color-ink-2); }
.start a strong { font-weight: 600; } .start a span { color: var(--color-ink-2); font-size: var(--text-sm); }
.start li:first-child a { border-color: var(--color-accent); } .start li:first-child a::before { color: var(--color-accent); }
.start a:hover { background: var(--color-paper-2); }
/* Lists: the tick boxes and the bulk-action bar only after "Select several…" (most visits just open one record) */
body:not(.selecting) #changelist .actions, body:not(.selecting) #result_list .action-checkbox,
body:not(.selecting) #result_list .action-checkbox-column { display: none; }
.list-help { margin-top: calc(-1 * var(--space-2xs)); }

/* Two-box pickers (methods, technicians, equipment on a job): a short list that scrolls, not a screen each. */
.selector .selector-available select, .selector .selector-chosen select { height: 9.5em !important; min-height: 0; }
.selector .selector-available > p.helptext, .selector .selector-chosen > p.helptext,
.selector .selector-available > .selector-available-title > p.helptext, .selector .selector-chosen > .selector-chosen-title > p.helptext { display: none; }


/* Status tags: one short word in the copy colours instead of a sentence (Draft, Signed, Sent…) */
.tag { display: inline-block; padding: 1px 8px; border-radius: var(--radius-input); font-family: var(--font-outlier); font-size: var(--text-sm); font-weight: 600; line-height: 1.6; white-space: nowrap; }
.tag--draft { background: var(--copy-canary-bg); color: var(--copy-canary-fg); }
.tag--done { background: var(--copy-green-bg); color: var(--copy-green-fg); }
.tag--late { background: var(--copy-pink-bg); color: var(--copy-pink-fg); }

/* Ctrl+K: go to a page or search, from anywhere */
dialog.jump { width: min(36rem, calc(100vw - 32px)); padding: 0; border: 1px solid var(--color-rule); border-radius: var(--radius-card); margin-top: 12vh;
  box-shadow: var(--shadow-menu); background: var(--color-paper); color: var(--color-ink); }
dialog.jump::backdrop { background: var(--color-scrim); }
dialog.jump input { width: 100%; border: 0; border-bottom: 1px solid var(--color-rule); padding: 14px 16px; font-size: var(--text-md); outline: none; background: transparent; }
dialog.jump ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
dialog.jump li { padding: 9px 12px; border-radius: var(--radius-input); cursor: pointer; }
dialog.jump li[aria-selected="true"], dialog.jump li:hover { background: var(--color-accent-soft); }
.jump__hint { margin: 0; padding: 8px 16px; font-size: var(--text-sm); color: var(--color-ink-2); border-top: 1px solid var(--color-rule); }

/* A report's summary (issuing queue, side panel) */
.iq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 6px 18px; margin: 0 0 14px; }
.iq-grid dt { color: var(--color-ink-2); font-family: var(--font-outlier); font-size: var(--text-sm); } .iq-grid dd { margin: 0; }
.iq-lines { border-collapse: collapse; width: 100%; margin-bottom: 16px; }
.iq-lines th, .iq-lines td { border-top: 1px solid var(--color-rule); padding: 5px 8px; text-align: left; }
.iq-lines thead th { border-top: 0; border-bottom: 1px solid var(--color-ink); }
.iq-lines tr.part th { background: var(--darkened-bg); }

/* Side panel (peek): a report's summary slides in on the right, the list stays where it was */
dialog.peek { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(40rem, 100vw); border: 0; padding: 20px 24px;
  background: var(--color-paper); color: var(--color-ink); box-shadow: var(--shadow-menu); border-left: 1px solid var(--color-rule); overflow: auto; }
dialog.peek::backdrop { background: var(--color-scrim); }
.peek__close { float: right; margin: 0 0 8px 8px; }
.peek__head h2 { margin: 0 0 4px; }
.peek__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 16px; }

/* Tabs between the views of one thing (the movement board) */
.mv-tabs ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0 0 14px; padding: 0; border-bottom: 1px solid var(--color-rule); }
.mv-tabs li { list-style: none; } .mv-tabs li::before { content: none; display: none; }
.mv-tabs a { display: block; padding: 8px 14px; text-decoration: none; color: var(--color-ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.mv-tabs a[aria-current="page"] { color: var(--color-ink); font-weight: 600; border-bottom-color: var(--color-accent); }
