/*
 * Base and kit components in look v3 (docs/DESIGN.md). Tokens live in brand.css; Prooflane's own components in
 * site.css; the look's flagship parts in look.css. The kit's class names (button, card, alert, field, table-wrap,
 * stat, admin-shell ...) keep working, so every kit page and every module's page wears the look without changes.
 * Phone first; tap targets 48px or more; a blue pill for the thing you tap; Archivo, heavy and semi-condensed for headings.
 */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--desk);
  /* Ticks, radios and the like in ink; a tap flashes a faint ink, not the phone's grey. */
  accent-color: var(--action); -webkit-tap-highlight-color: rgb(15 19 23 / 8%);
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--desk);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-sans); font-weight: 750; font-stretch: 92%; line-height: 1.2; margin: 0 0 0.5em;
  letter-spacing: -0.01em; text-wrap: balance;
}
/* The look's headline cut: heavy and semi-condensed, tight lines (look.css .h1 / .h2). */
h1 { font-size: clamp(2rem, 1.45rem + 2.4vw, 3rem); font-weight: 800; font-stretch: 88%; line-height: 1.06; word-spacing: 0.04em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem); font-weight: 800; font-stretch: 88%; line-height: 1.1; word-spacing: 0.04em; }
h3 { font-size: var(--step-1); line-height: 1.25; }
h4 { font-size: var(--step-0); letter-spacing: 0; line-height: 1.35; }
html[lang^="pa"] :is(h1, h2, h3) { line-height: 1.3; letter-spacing: 0; }
p, ul, ol, dl, table, blockquote { margin: 0 0 1rem; }
p, li, dd, figcaption { text-wrap: pretty; }
a { color: var(--action); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--action-strong); text-decoration-thickness: 2px; }
/* A long web address or file name inside running text breaks instead of widening the page on a phone. */
main :is(p, li, dd, td, legend, label) { overflow-wrap: break-word; }
main :is(p, li, dd, td) a { overflow-wrap: anywhere; }
strong, b { font-weight: 700; }
small { font-size: var(--step--1); }
code, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; background: var(--paper-2); padding: 0.05em 0.35em; border-radius: 3px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
::selection { background: var(--brand); color: var(--brand-contrast); }
/* The ring follows each control's own corners (a radius here would square off a focused select or card). */
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
input, select, textarea, button { caret-color: var(--action); }
/* A link to a place on the page stops a little below the top edge, not on it. */
:target { scroll-margin-top: var(--s-4); }
table { font-variant-numeric: tabular-nums; }
html { scrollbar-color: var(--rule-strong) var(--desk); }
summary { cursor: pointer; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -5rem; z-index: 100;
  background: var(--sign); color: var(--sign-ink); padding: 0.7rem 1rem; border-radius: var(--radius-small);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 0.75rem; color: var(--sign-ink); }

.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: var(--measure); }
.eyebrow { font-weight: 650; font-size: 0.95rem; color: var(--ink-3); margin-bottom: 0.5rem; }
.mono, .num { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
/* The same column and side space as the frame's header and footer (look.css .wrap). */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--lk-gutter, 20px); }
@media (min-width: 48rem) { :root { --gutter: 1.5rem; } }
@media (min-width: 72rem) { :root { --gutter: 2rem; } }
.page { padding-top: var(--s-6); padding-bottom: var(--s-8); }
@media (min-width: 56rem) { .page { padding-top: var(--s-7); } }
.page-narrow { max-width: 32rem; }
.section { padding-top: var(--s-7); padding-bottom: var(--s-7); }
.stack > * + * { margin-top: var(--s-4); }
.stack > * { margin-bottom: 0; }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }

/* ---------- Test-mode note ---------- */
.mode-banner {
  background: var(--paper-2); color: var(--ink-3); border-bottom: 1px solid var(--rule);
  font-size: 0.8rem; line-height: 1.35; text-align: center; padding: 0.3rem var(--gutter);
}

/* ---------- Header: the name, and a short way around. White, like his bank app ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: var(--s-3); min-height: 3.75rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 48px; margin-right: auto;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark { display: block; width: 1.75rem; height: 1.75rem; flex: none; color: var(--brand); }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-name { line-height: 1; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a, .nav-button {
  display: flex; align-items: center; min-height: 48px; padding: 0 0.7rem;
  color: var(--ink); text-decoration: none; font-family: var(--font-sans); font-weight: 600; font-size: 1rem;
  border-radius: var(--radius-small);
}
.site-nav a:hover, .nav-button:hover { background: var(--paper-2); color: var(--ink); }
/* You are here: the page's own link on a light blue tint (not colour alone). */
.site-nav a[aria-current="page"] { color: var(--brand-strong); background: var(--brand-soft); }
.nav-button { background: none; border: 0; cursor: pointer; width: 100%; text-align: left; }
.inline-form { display: inline; margin: 0; }

/* Phone: the menu is a disclosure that works without JavaScript. */
.menu { position: static; }
.menu > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 48px; padding: 0 0.8rem;
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius-small); color: var(--ink); user-select: none;
  font-weight: 600; font-size: 1rem;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary svg { width: 1.1rem; height: 1.1rem; }
.menu[open] > summary { background: var(--paper-2); }
/* With the menu open, a tap anywhere outside it closes it (the tap lands on the summary) instead of opening
   whatever is under it. No script needed. */
.menu[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: -1; cursor: default; }

@media (min-width: 62rem) {
  .menu { display: none; }

}

/* ---------- Footer: who we are and the line every page keeps, then four short groups of links ----------
   Each page type ends with its own bottom space, so the footer follows straight on. Phone: the groups two by two;
   desk: who we are and the language beside the groups. */
.site-footer { background: var(--paper); border-top: 1px solid var(--rule); color: var(--ink-2); }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); }
.footer-inner { display: grid; gap: var(--s-5); padding-top: var(--s-6); padding-bottom: var(--s-4); font-size: 1rem; }
.footer-inner p { margin: 0 0 0.5rem; }
.footer-brand { font-weight: 700; font-size: 1.2rem; color: var(--ink); display: flex; align-items: center; gap: 0.5rem; }
.footer-brand .brand-mark { width: 1.5rem; height: 1.5rem; }

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a, .footer-support a { display: inline-flex; align-items: center; min-height: 48px; }
.footer-links a { line-height: 1.35; }

.site-footer .footer-support { flex-basis: 100%; margin: 0; }
@media (min-width: 48rem) {
  .footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); grid-template-areas: "about nav" "lang nav";
    column-gap: var(--s-6); align-items: start; }

}

/* ---------- Kit marketing leftovers ---------- */
.hero { padding: var(--s-7) 0; }
.hero-title { font-size: var(--step-4); max-width: 16em; }
.section-callout { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-6) var(--s-5); margin-bottom: var(--s-6); }

/* ---------- Buttons: one blue button is the thing to tap; everything else is quieter ---------- */
/* A blue pill is the thing to tap (look.css .btn-action); a white pill with a line is the quieter choice. */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 52px; padding: 0.7rem 1.4rem; border-radius: 999px;
  border: 1.5px solid transparent; font-family: var(--font-sans); font-size: 1.0625rem; font-weight: 700;
  line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color 120ms, border-color 120ms, color 120ms, transform 120ms;
  -webkit-tap-highlight-color: transparent;
}
.button:active { transform: translateY(1px); }
.button:hover { text-decoration: none; }
.button svg { width: 1.1em; height: 1.1em; flex: none; }
.button-primary { background: var(--action); color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / 14%), 0 6px 16px rgb(22 96 224 / 24%); }
.button-primary:hover { background: var(--action-strong); color: #fff; }
.button-secondary { background: var(--paper); color: var(--ink); border-color: var(--lk-line-2, #d3d0c8); }
.button-secondary:hover { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.button-danger { background: var(--stop); color: #fff; }
.button-danger:hover { background: #8f1d14; color: #fff; }
.button-link { background: none; border-color: transparent; color: var(--action); padding-left: 0; padding-right: 0; text-decoration: underline; text-underline-offset: 0.18em; font-weight: 600; }
.button-link:hover { color: var(--action-strong); }
.button-large { min-height: 58px; font-size: 1.15rem; padding: 0.8rem 1.75rem; }
.button-block { display: flex; width: 100%; }
.button[disabled], .button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.button.is-busy { cursor: progress; }

/* ---------- Forms ---------- */
form { margin: 0 0 1rem; }
.field { margin-bottom: var(--s-5); }
.field label, .label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.optional { font-weight: 400; color: var(--ink-2); }
.hint { color: var(--ink-2); font-size: 1rem; margin: -0.1rem 0 0.45rem; }
.field-error { display: flex; gap: 0.4rem; align-items: flex-start; color: var(--stop); font-weight: 700; font-size: 1rem; margin: 0 0 0.45rem; }
.field-error::before { content: ""; flex: none; width: 1em; height: 1em; margin-top: 0.2em; background: currentColor;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"],
input[type="tel"], input[type="search"], input[type="date"], select, textarea {
  display: block; width: 100%; min-height: 52px; padding: 0.65rem 0.8rem;
  font: inherit; font-size: max(1rem, 16px); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--rule-strong); border-radius: 12px;
  transition: border-color 120ms, box-shadow 120ms;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
textarea { min-height: 8rem; resize: vertical; }
select { max-width: 100%; text-overflow: ellipsis; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--action); box-shadow: 0 0 0 2px var(--action); }
.field-invalid input, .field-invalid select, .field-invalid textarea { border-color: var(--stop); }
/* A tick box or radio and its words: the whole row is the target (44px+), like a box on a printed form. */
.field-check { display: grid; grid-template-columns: auto 1fr; gap: 0 0.7rem; align-items: start; }
.field.field-check { margin-bottom: var(--s-2); }
.field-check input { width: 1.5rem; height: 1.5rem; margin: 0.6rem 0 0; accent-color: var(--action); }
.field-check label { font-weight: 400; margin: 0; padding: 0.55rem 0; min-height: 44px; cursor: pointer; }
.field-check .hint, .field-check .field-error { grid-column: 2; }
.field-check .hint { margin-top: -0.35rem; }
input[type="radio"] { accent-color: var(--action); width: 1.35rem; height: 1.35rem; }
/* A group of choices is a ruled section, not a box: the question in display type over an ink rule. */
fieldset { border: 0; border-top: 1px solid var(--rule); padding: var(--s-3) 0 0; margin: 0 0 var(--s-5); min-width: 0; }
legend { float: left; width: 100%; padding: 0; margin: 0 0 var(--s-2); font-family: var(--font-sans); font-weight: 800; font-size: 1.1rem; line-height: 1.3; }
legend + * { clear: left; }
fieldset > .hint { clear: left; }
/* The file picker: a dashed drop slip with a real button, never the browser's grey default. */
input[type="file"] {
  display: block; width: 100%; padding: 0.55rem; font: inherit; font-size: 1rem; color: var(--ink-2);
  background: var(--paper); border: 1.5px dashed var(--rule-strong); border-radius: 12px; cursor: pointer;
}
input[type="file"]:hover { border-color: var(--ink-2); }
input[type="file"]::file-selector-button {
  min-height: 44px; margin-right: 0.8rem; padding: 0.45rem 1.1rem; border: 1.5px solid var(--lk-line-2, #d3d0c8); border-radius: 999px;
  background: var(--paper); color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1rem; cursor: pointer;
}
input[type="file"]:hover::file-selector-button { background: var(--ink); color: var(--paper); }
.field-invalid input[type="file"] { border-color: var(--stop); }
.form-errors { padding: var(--s-4); }
.form-errors-title { font-size: 1.05rem; margin-bottom: 0.4rem; }
.form-errors ul { margin: 0; padding-left: 1.2rem; }
.form-errors a { color: var(--stop); font-weight: 700; }

/* ---------- Cards, notices, badges ---------- */
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-5); box-shadow: var(--shadow); }
@media (min-width: 48rem) { .card { padding: var(--s-6); } }
.card > :last-child { margin-bottom: 0; }
.card-title { font-size: var(--step-1); }
.card-form { padding: var(--s-5); box-shadow: var(--lk-shadow-lg, var(--sheet-shadow)); border-color: var(--rule); border-radius: var(--lk-r-lg, 24px); }
@media (min-width: 30rem) { .card-form { padding: var(--s-6) var(--s-6) var(--s-5); } }
.card-form h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem); }

.flashes { margin-bottom: var(--s-5); }
/* A notice is a slip of paper with a mark: shape and word, never colour alone. */
.alert {
  position: relative; display: block; border-radius: 12px; padding: 0.85rem 1rem 0.85rem 2.85rem;
  margin-bottom: 0.75rem; border: 1px solid; background: var(--paper); color: var(--ink);
}
.alert::before {
  content: ""; position: absolute; left: 0.95rem; top: 1.05rem; width: 1.1rem; height: 1.1rem; background: currentColor;
}
.alert a { color: inherit; font-weight: 700; }
.alert-info { border-color: var(--lk-line-2, #d3d0c8); background: var(--paper); }
.alert-info::before { color: var(--brand); border-radius: 3px; }
/* Done is ink, not green: green is kept for the answer on a Record. The round mark still says it went through. */
.alert-success { border-color: var(--ink); background: var(--paper-2); }
.alert-success::before { color: var(--ink); border-radius: 50%; }
.alert-warning { border-color: var(--caution); background: var(--caution-wash); }
.alert-warning::before { color: var(--caution); transform: rotate(45deg) scale(0.82); border-radius: 2px; }
.alert-error { border-color: var(--stop); background: var(--stop-wash); }
.alert-error::before { color: var(--stop); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }

.badge {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.12rem 0.55rem; border-radius: 999px;
  font-size: 1rem; font-weight: 700; white-space: nowrap; border: 1px solid currentColor; line-height: 1.5;
}
.badge::before { content: ""; width: 0.55rem; height: 0.55rem; background: currentColor; border-radius: 50%; }
.badge-neutral { color: var(--ink-2); }
.badge-neutral::before { background: transparent; border: 1.5px solid currentColor; }
.badge-good { color: var(--ink); background: var(--paper-2); }
.badge-warn { color: var(--caution); background: var(--caution-wash); }
.badge-warn::before { border-radius: 1px; transform: rotate(45deg) scale(0.85); }
.badge-bad { color: var(--stop); background: var(--stop-wash); }
.badge-bad::before { border-radius: 0; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }

.empty-state {
  text-align: left; border: 1.5px dashed var(--rule-strong); border-radius: var(--radius); padding: var(--s-6) var(--s-5);
  color: var(--ink-2); background: var(--paper);
}
.empty-title { font-size: var(--step-1); color: var(--ink); }
.error-page { max-width: 44rem; padding: var(--s-5) 0; }

/* ---------- Tables (staff screens) and detail lists ---------- */
/* Text a person typed, with its line breaks (the content policy refuses inline style attributes). */
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
/* position: relative keeps absolutely positioned content (a .visually-hidden header label) inside the scroll box;
   without it that label escapes the box and the whole page scrolls sideways on a phone. */
.table-wrap { position: relative; width: 100%; overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: var(--s-4); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--font-sans); font-weight: 700; font-size: 1rem; color: var(--ink-2); white-space: nowrap; background: var(--paper-2); border-bottom: 1px solid var(--rule); }
tbody th { background: none; border-bottom: 1px solid var(--rule); color: var(--ink); font-family: var(--font-sans); font-size: 1rem; white-space: normal; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tfoot th, tfoot td { background: none; border-top: 1px solid var(--rule); border-bottom: 0; color: var(--ink); font-family: var(--font-sans); font-size: 1rem; font-weight: 700; }
tbody tr:hover td { background: color-mix(in srgb, var(--paper-2) 60%, transparent); }
@media (max-width: 33.99rem) { thead th { white-space: normal; } }
td.numeric, th.numeric { text-align: right; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 700; padding: 0.6rem 0.8rem; }

.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: minmax(8rem, 35%) 1fr; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--ink-2); font-weight: 700; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }

.pagination { display: flex; gap: var(--s-4); align-items: center; justify-content: center; margin: var(--s-4) 0; }
.pagination a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 0.75rem; font-weight: 700; }
.pagination-current { color: var(--ink-2); }

/* ---------- Stat cards (staff overview) ---------- */
.stats { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); margin-bottom: var(--s-6); }
.stat { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-4); position: relative; }
.stat p { margin: 0; }
.stat-title { color: var(--ink-2); font-weight: 700; font-size: 1rem; }
.stat-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.25; letter-spacing: 0.004em; }
.stat-detail { color: var(--ink-2); font-size: 1rem; }
.stat-link { margin-top: 0.4rem !important; font-size: 1rem; }
.stat::after { content: ""; position: absolute; top: var(--s-4); right: var(--s-4); width: 0.7rem; height: 0.7rem; }
.stat-good::after { background: var(--ink); border-radius: 50%; }
.stat-warn::after { background: var(--caution); transform: rotate(45deg); border-radius: 1px; }
.stat-bad::after { background: var(--stop); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }

/* ---------- Staff area ---------- */
body.admin { --container: 90rem; }
body.admin main { background: var(--desk); }
/* One column that never grows past the screen: a wide table scrolls inside its .table-wrap instead of the page. */
.admin-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); padding-top: var(--s-5);
  padding-bottom: var(--s-7); }
@media (min-width: 56rem) { .admin-shell { grid-template-columns: 13.5rem minmax(0, 1fr); align-items: start; } }
.admin-nav { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-3); color: var(--ink); }
@media (min-width: 56rem) { .admin-nav { position: sticky; top: var(--s-4); } }
.admin-nav-title { font-size: 1rem; font-weight: 700; color: var(--ink-2); margin: 0.25rem 0.5rem 0.6rem; }
.admin-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem; }
@media (min-width: 56rem) { .admin-nav ul { flex-direction: column; } }
.admin-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 0.75rem; border-radius: var(--radius-small); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; }
.admin-nav a:hover { background: var(--paper-2); color: var(--ink); }
.admin-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--ink); }
.admin-content { min-width: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-5); box-shadow: var(--shadow); }
@media (min-width: 56rem) { .admin-content { padding: var(--s-6); } }
.admin-content h1 { font-size: var(--step-2); padding-bottom: var(--s-3); border-bottom: 1px solid var(--rule); }
.admin-content .section { padding-top: var(--s-5); padding-bottom: var(--s-5); }
/* Staff screens are dense but never crammed: every section heading gets room above it. */
.admin-content h2 { font-size: var(--step-1); }
.admin-content * + h2, .admin-content * + section, .admin-content section + section { margin-top: var(--s-6); }
.admin-content .card * + h2 { margin-top: var(--s-4); }
.admin-content .detail-list { margin-bottom: var(--s-5); }
.admin-content ul.marks { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.admin-content ul.marks > li { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }
.admin-content ul.marks .mark { margin-top: 0.15rem; }
.admin-content .lead { font-size: var(--step-0); max-width: 60rem; }
.admin-content > .cluster:has(> h1), .admin-content > .order-head { padding-bottom: var(--s-3); border-bottom: 1px solid var(--rule); margin-bottom: var(--s-4); }
.admin-content :is(.cluster, .order-head) > h1 { border: 0; padding: 0; margin: 0; }
/* A row of controls (filters, a date and two buttons) stays one row on a desk, wrapping on a phone. */
.cluster > :is(input, select) { width: auto; min-width: 0; flex: 1 1 11rem; max-width: min(22rem, 100%); }
.cluster > label { font-weight: 700; }
/* Staff see the frame, not the public footer's help links. */
body.admin .site-footer .footer-inner { display: none; }

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .site-header, .site-footer, .mode-banner, .admin-nav, .skip-link { display: none !important; }
  a { color: inherit; }
}
