/* Social Matter Payments — the CRM (admin.socialmatterspay.com). Inside surface, identity v1, nothing new: paper ground, ink
   type, chartreuse only as decoration on paper and as text on ink, Zilla Slab text, Martian Mono figures, radius 0, no
   shadows. apps/admin/DESIGN-CONTRACT.md is the brief; the signature component is the submission track (.track). */
@font-face { font-family: 'Zilla Slab'; font-weight: 400; font-display: swap; src: url('./fonts/ZillaSlab-400.woff2') format('woff2') }
@font-face { font-family: 'Zilla Slab'; font-weight: 500; font-display: swap; src: url('./fonts/ZillaSlab-500.woff2') format('woff2') }
@font-face { font-family: 'Zilla Slab'; font-weight: 600; font-display: swap; src: url('./fonts/ZillaSlab-600.woff2') format('woff2') }
@font-face { font-family: 'Zilla Slab'; font-weight: 700; font-display: swap; src: url('./fonts/ZillaSlab-700.woff2') format('woff2') }
@font-face { font-family: 'Martian Mono'; font-weight: 400; font-display: swap; src: url('./fonts/MartianMono-400.woff2') format('woff2') }
@font-face { font-family: 'Martian Mono'; font-weight: 500; font-display: swap; src: url('./fonts/MartianMono-500.woff2') format('woff2') }

:root {
  color-scheme: light;
  --ink: #0A0A0B; --paper: #F2EEE3; --chartreuse: #B4BD00; --steel: #B9BCC0;
  --muted: #5E5A52; --line: #D6D0C2; --ink-2: #1A1916; --ink-muted: #A39E92; --field: #FBF9F3;
  --ok: #007066; --progress: #2D4E86; --warn: #965000; --stop: #C0103F;
  --text: 'Zilla Slab', Rockwell, 'Roboto Slab', Georgia, serif;
  --mono: 'Martian Mono', ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
}
* { box-sizing: border-box }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--text); min-height: 100vh; display: flex; flex-direction: column }
main { flex: 1 0 auto; outline: none }
a { color: inherit; text-underline-offset: 3px }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px }
.top a:focus-visible, .top button:focus-visible, .dec a:focus-visible, .dec button:focus-visible, .board a:focus-visible { outline-color: var(--chartreuse) }
code, .mono { font-family: var(--mono); font-size: .86em }
h1[tabindex="-1"]:focus { outline: none }
h1, h2, h3 { font-weight: 600; line-height: 1.1; margin: 0 }
h1 { font-size: clamp(30px, 4vw, 42px) }
h2 { font-size: 24px; margin-bottom: 12px }
h3 { font-size: 18px; margin-bottom: 8px }
p { margin: 0 }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.skip { position: absolute; left: 8px; top: -60px; background: var(--paper); color: var(--ink); padding: 10px 14px; z-index: 30; border: 2px solid var(--ink) }
.skip:focus { top: 8px }
.muted { color: var(--muted) }
.mono-n { font-family: var(--mono); font-variant-numeric: tabular-nums }

/* ---------- Top bar: ink, the lockup, the sections, the person ---------- */
.top { background: var(--ink); color: var(--paper); display: flex; align-items: center; gap: 4px 24px; padding: 0 var(--gutter); min-height: 60px; flex-wrap: wrap }
.top .home { display: inline-flex; align-items: center; min-height: 48px; padding: 6px 0 }
.top .home img { height: 24px; width: auto; display: block }
.top nav { display: flex; gap: 2px; margin-right: auto }
.top nav a { text-decoration: none; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink-muted); white-space: nowrap }
.top nav a:hover { color: var(--paper) }
.top nav a[aria-current] { color: var(--paper); box-shadow: inset 0 -2px 0 var(--chartreuse) }
.acct { display: flex; gap: 12px; align-items: center; font-size: 15px; margin-left: auto }
.env { font: 500 10.5px var(--mono); letter-spacing: .14em; border: 1px solid currentColor; padding: 3px 7px; white-space: nowrap; color: var(--chartreuse) }
.linkbtn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 6px }
.sub { display: flex; gap: 2px; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); overflow-x: auto; background: var(--paper) }
.sub[hidden] { display: none }
.sub a { text-decoration: none; padding: 10px 14px 10px 0; margin-right: 8px; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); white-space: nowrap }
.sub a[aria-current] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink) }

/* ---------- The band: calm paper left 40%, the field right; the board sits on it ---------- */
.band { position: relative; display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); min-height: 232px; border-bottom: 1px solid var(--line); overflow: hidden }
.band__field { position: absolute; top: 0; bottom: 0; right: 0; aspect-ratio: 2560 / 600; z-index: 0 }
.smp-field { position: relative; width: 100%; height: 100%; overflow: hidden }
.smp-field__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block }
.band__who { position: relative; z-index: 1; background: var(--paper); padding: 30px var(--gutter); display: grid; gap: 8px; align-content: center }
.band__who .sub-l { color: var(--muted) }
.band__board { position: relative; z-index: 1; align-self: center; justify-self: start; margin: 24px 0 24px clamp(16px, 4vw, 56px) }
.kicker { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted) }
.acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px }
.board { background: var(--ink); color: var(--paper); padding: 18px 22px; width: min(440px, 100%); display: grid; gap: 6px; border-top: 4px solid var(--chartreuse) }
.board .lbl { font: 500 11px var(--mono); letter-spacing: .16em; color: var(--ink-muted); text-transform: uppercase }
.board .amt { font: 500 32px var(--mono); color: var(--chartreuse); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15 }
.board .meta { font: 400 13px var(--mono); color: var(--paper); display: grid; gap: 2px }
.board a { color: var(--paper) }

/* ---------- Page body ---------- */
.wrap { padding: 28px var(--gutter) 64px }
.wrap > * + * { margin-top: 36px }
.crumbs { font-size: 14px; color: var(--muted) }
.crumbs a { color: var(--muted); padding-block: 11px; margin-block: -11px; display: inline-block }
.head { display: flex; gap: 12px 24px; align-items: end; justify-content: space-between; flex-wrap: wrap }
.head .lede { color: var(--muted); max-width: 64ch; margin-top: 6px }
.head h1 + .ref { display: block; margin-top: 8px }
.ref { font: 400 13px var(--mono); color: var(--muted); overflow-wrap: anywhere }
.ref b { color: var(--ink); font-weight: 500 }

/* Two columns: the main list, and what needs a look beside it */
.cols { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 40px; align-items: start }

/* Figures: a row of definitions, rules not boxes */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); margin-inline: 0; margin-bottom: 0 }
.kpis > div { padding: 16px 16px 18px 0; display: grid; gap: 2px; align-content: start }
.kpis > div + div { padding-left: 16px; border-left: 1px solid var(--line) }
.kpis dt { font-size: 14px; color: var(--muted) }
.kpis dd { margin: 0; font: 500 26px var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.kpis dd small { display: block; font: 400 12.5px var(--text); color: var(--muted); letter-spacing: 0; margin-top: 4px }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)) }

/* ---------- Status: icon + label + shape, never colour alone ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--mono); padding: 4px 8px; border: 1.5px solid currentColor; white-space: nowrap; max-width: 100% }
.pill svg { width: 12px; height: 12px; flex: none }
.p-ok { color: var(--ok) } .p-pr { color: var(--ink) } .p-wa { color: var(--warn); border-style: dashed }
/* In progress is ink (label, icon, outline) with its own icon, no longer blue: on a queue of submissions #2D4E86 became the
   page's dominant colour (Gate A TELL HIGH, 2026-10-26), and the build rules allow a blue accent only by an exception written
   before building, which this contract never had. Amendment dated in DESIGN-CONTRACT.md. */
.p-st { color: var(--paper); background: var(--stop); border-color: var(--stop) }
.p-ne { color: var(--muted) } .p-in { color: var(--paper); background: var(--ink); border-color: var(--ink) }
.pills { display: flex; gap: 6px; flex-wrap: wrap }

/* ---------- Tables: tabular figures, right-aligned money, hairline rules ---------- */
.tbl { overflow-x: auto }
table { border-collapse: collapse; width: 100%; font-size: 15px }
caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 8px }
th { text-align: left; font: 600 13px var(--text); color: var(--muted); padding: 0 12px 8px 0; white-space: nowrap; vertical-align: bottom }
td { border-top: 1px solid var(--line); padding: 11px 12px 11px 0; vertical-align: top; overflow-wrap: anywhere }
td.amt, th.amt { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap }
th.amt { font: 600 13px var(--text) }
td.mono, td .mono { font-family: var(--mono); font-size: 12.5px }
td a.name { font-weight: 600 }
/* Tap targets >= 44 px (contract, locked kit): a link inside a table, a fact list or the desk's look list keeps its text and
   grows its hit area; the negative margin keeps the row height (Gate A WARN 2026-10-26: 15-19 px links at 390). */
td a, .facts dd a, .policy li a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -13px }
td small, .sm { display: block; font-size: 13px; color: var(--muted) }
.rowlink { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px }
tr.total td { border-top: 2px solid var(--ink); font-weight: 600 }

/* A ruled list of facts: each label/value pair is a <div> (ui.js facts); a record sets two to a row on a wide screen (below) */
.facts { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line) }
.facts > div { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr); border-bottom: 1px solid var(--line) }
.facts dt, .facts dd { margin: 0; padding: 10px 12px 10px 0 }
.facts dt { color: var(--muted); font-size: 14px }
.facts dd { overflow-wrap: anywhere }
.facts .sealed { font: 400 12px var(--mono); color: var(--muted); margin-left: 8px }
.item-n { display: inline-block; font: 500 11px var(--mono); border: 1px solid var(--ink); padding: 1px 5px; margin-right: 6px; vertical-align: 1px; color: var(--ink) }

/* ---------- The ink decision bar: the one thing to decide, first on every record ---------- */
.dec { background: var(--ink); color: var(--paper); border-top: 4px solid var(--chartreuse); padding: 16px var(--gutter); margin-inline: calc(-1 * var(--gutter)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 28px; align-items: center }
.dec .why { display: grid; gap: 4px; font-size: 15px }
.dec .why b { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted) }
.dec .why ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px }
.dec .why li::before { content: '→ '; color: var(--chartreuse); font-family: var(--mono) }
.dec .why .clear { color: var(--chartreuse); font-family: var(--mono); font-size: 14px }
.dec .muted { color: var(--ink-muted) } /* the band is ink: paper's muted grey reads 2.88:1 here, #A39E92 reads 7.4:1 */
.dec .acts { margin: 0; justify-content: flex-end }

/* ---------- Buttons and forms ---------- */
.btn { background: var(--ink); color: var(--paper); text-decoration: none; font: 600 16px var(--text); padding: 0 18px; min-height: 46px; display: inline-flex; align-items: center; gap: 10px; border: 0; border-left: 6px solid var(--chartreuse); cursor: pointer }
.btn2 { background: transparent; color: var(--ink); font: 600 16px var(--text); padding: 0 14px; min-height: 46px; display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--ink); text-decoration: none; cursor: pointer }
.btn-stop { color: var(--stop); border-color: var(--stop) }
.btn-board { background: var(--paper); color: var(--ink); border-left-color: var(--chartreuse) }
.btn-primary { background: var(--chartreuse); color: var(--ink); border-left-color: var(--ink) }
.btn-ghost { background: transparent; color: var(--paper); border: 1.5px solid var(--ink-muted); border-left: 6px solid var(--ink-muted) }
.btn:active, .btn2:active { transform: scale(.97); transition: transform 120ms }
button[disabled], .btn[aria-disabled=true] { opacity: .55; cursor: not-allowed }
.form { display: grid; gap: 16px; max-width: 560px }
.form.wide { max-width: 820px }
.form.row { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; max-width: none }
.field { display: grid; gap: 6px; align-content: start }
.field label, .field legend, .field .lbl { font-weight: 600; font-size: 15px }
.field .hint { font-size: 13.5px; color: var(--muted) }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  font: 16px var(--text); color: var(--ink); background: var(--field); border: 1.5px solid var(--ink); border-radius: 0; min-height: 46px; padding: 0 12px; width: 100% }
textarea { padding: 10px 12px; min-height: 96px; resize: vertical; line-height: 1.45 }
input.mono, textarea.mono { font-family: var(--mono); font-size: 14px }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--ink); flex: none }
.check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; cursor: pointer; font-size: 15px }
.err, .formerr { color: var(--stop); font-weight: 600; font-size: 14.5px; border-left: 3px solid var(--stop); padding-left: 10px }
.err[hidden] { display: none }
.ok-note { color: var(--ok); font-weight: 600 }
.search { display: flex; gap: 8px; max-width: 460px }
.search input { min-height: 44px }
.search button { min-height: 44px }

/* Filters */
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chips a { text-decoration: none; border: 1.5px solid var(--line); padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px }
.chips a[aria-current] { border-color: var(--ink); font-weight: 600 }
.chips a .n { font: 500 12px var(--mono); color: var(--muted) }

/* ---------- The submission track: fourteen stations on two ink rails ---------- */
.track { position: relative; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); padding-top: 38px; margin: 0; list-style: none; padding-left: 0 }
.track::before { content: ''; position: absolute; left: 10px; right: 0; top: 4px; height: 22px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 6px / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 14px / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--chartreuse) 0 4px, transparent 4px 13px) 0 0 / 100% 22px no-repeat }
.stn { position: relative; display: grid; gap: 1px; padding-right: 6px; min-width: 0; align-content: start }
.stn::before { content: ''; position: absolute; top: -35px; left: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink) }
.stn a { text-decoration: none; display: grid; gap: 1px; min-height: 44px; align-content: start }
.stn .no { font: 500 11px var(--mono); color: var(--muted) }
.stn b { font-size: 13.5px; font-weight: 600; line-height: 1.2 }
.stn .st { font: 400 11px var(--mono); color: var(--muted); overflow-wrap: anywhere; line-height: 1.35 }
.stn.in::before { background: var(--chartreuse); box-shadow: inset 0 0 0 5px var(--ink) }
.stn.needs::before { background: var(--paper); box-shadow: none; border: 2.5px dashed var(--warn) }
.stn.needs .st { color: var(--warn); font-weight: 500 }
.stn.missing .st { color: var(--stop); font-weight: 500 }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--muted); margin-top: 12px }
.legend span { display: inline-flex; align-items: center; gap: 8px }
.legend i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink) }
.legend i.in { background: var(--chartreuse); box-shadow: inset 0 0 0 4px var(--ink) }
.legend i.needs { box-shadow: none; border: 2px dashed var(--warn) }

/* The queue's mini track: fourteen pips */
.pips { display: inline-flex; gap: 2px; align-items: center }
.pips i { width: 8px; height: 8px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); display: block }
.pips i.in { background: var(--chartreuse); box-shadow: inset 0 0 0 2.5px var(--ink) }
.pips i.needs { box-shadow: none; border: 1.5px dashed var(--warn) }

/* ---------- A record: sections in one column, a quiet index beside ---------- */
.rec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px 48px }
.idx { display: none }
.rec section { scroll-margin-top: 16px; min-width: 0 }
.rec section + section { margin-top: 44px }
.rec .sh { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 2px solid var(--ink); padding-bottom: 8px }
.rec .sh h2 { margin: 0 }
.rec .sh .items { font: 500 11.5px var(--mono); letter-spacing: .08em; color: var(--muted); margin-left: auto }
.rec h3 { margin-top: 22px }
.sub-sec { margin-top: 24px }
.sections > * + * { margin-top: 36px }
@media (min-width: 1100px) {
  .rec { grid-template-columns: 188px minmax(0, 1fr) }
  /* A record's facts two to a row; a value longer than one line takes the whole row (contract amendment 2026-10-27: the
     record was 8.85 screens with most of each 1,108 px fact row empty, and any panel opened took it past 9) */
  .rec .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px }
  .rec .facts > div { grid-template-columns: minmax(0, 10em) minmax(0, 1fr) }
  .rec .facts > div.w { grid-column: 1 / -1 }
  .idx { display: block; position: sticky; top: 16px; align-self: start; font-size: 14px }
  .idx h2 { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px }
  .idx ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line) }
  .idx li { border-bottom: 1px solid var(--line) }
  .idx a { text-decoration: none; display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; min-height: 40px; align-items: center }
  .idx a:hover { font-weight: 600 }
  .idx a span { font: 400 11px var(--mono); color: var(--muted) }
}

/* People: a ledger, one person per entry */
.person { border-top: 1px solid var(--line); padding: 16px 0 6px; display: grid; gap: 12px }
.person:first-of-type { border-top: 2px solid var(--ink) }
.person .ph { display: flex; gap: 8px 16px; align-items: baseline; flex-wrap: wrap }
.person .ph h3 { margin: 0 }
.person .ph .pct { font: 500 14px var(--mono) }
.docs-row { display: flex; gap: 8px; flex-wrap: wrap }
.docbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--ink); background: transparent; font: 500 13px var(--mono); cursor: pointer; color: var(--ink); white-space: nowrap }
.docbtn[disabled] { border-style: dashed; color: var(--muted); border-color: var(--muted) }
.hash { font: 400 11.5px var(--mono); color: var(--muted); overflow-wrap: anywhere; display: block; margin-top: 2px }
.note-row { border-top: 1px solid var(--line); padding: 10px 0; display: grid; gap: 2px }
.note-row .by { font: 400 12px var(--mono); color: var(--muted) }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line) }
.timeline li { display: grid; grid-template-columns: 11.5em minmax(0, 1fr); gap: 4px 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px }
.timeline time { font: 400 12px var(--mono); color: var(--muted) }
.timeline .who { font-weight: 600 }
.timeline details { grid-column: 2 }
/* A long list's first rows, with how many are shown and the way to the rest (ui.js progressive). */
.long-head { align-items: center; justify-content: space-between; margin: 6px 0 8px }
.long-n { font: 400 13px var(--mono); color: var(--muted) }
.long-foot { margin-top: 10px }

details.more { border-top: 1px solid var(--line); margin-top: 10px }
details.more > summary, details.fold > summary { cursor: pointer; list-style: none; font: 500 13px var(--mono); min-height: 44px; display: flex; align-items: center; gap: 10px }
details > summary::-webkit-details-marker { display: none }
details.more > summary::before, details.fold > summary::before { content: '+'; font: 500 16px var(--mono); width: 1ch }
details[open].more > summary::before, details[open].fold > summary::before { content: '−' }
details.fold { border-top: 1px solid var(--line) }
pre.json { font: 400 12px/1.55 var(--mono); background: var(--ink); color: var(--paper); padding: 14px 16px; max-height: 30em; overflow: auto; margin: 6px 0 12px; border-left: 6px solid var(--chartreuse); white-space: pre-wrap; overflow-wrap: anywhere }

/* A gauge: a rail with the limit marked and where the merchant stands; the three columns line up across rows */
.gauges { display: grid; grid-template-columns: minmax(0, 16em) minmax(0, 1fr) auto; gap: 18px 18px; align-items: center }
.gauge { display: contents }
.gauge .gl { font-size: 15px }
.gauge .gl small { display: block; color: var(--muted); font-size: 12.5px }
.gauge .rail { position: relative; height: 22px }
.gauge .rail::before { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--ink) }
.gauge .rail i { position: absolute; top: 3px; width: 2px; height: 16px; background: var(--ink) }
.gauge .rail i.lim { top: 0; height: 22px; background: var(--stop) }
.gauge .rail b { position: absolute; top: 5px; width: 12px; height: 12px; background: var(--chartreuse); box-shadow: inset 0 0 0 2.5px var(--ink); margin-left: -6px }
.gauge .gv { font: 500 14px var(--mono); text-align: right; white-space: nowrap }

/* Partner as track: a siding off SMP's line */
.org { display: grid; gap: 0; font-size: 15px }
.org .rail { position: relative; padding: 12px 0 12px 34px }
.org .rail::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 14px;
  background: linear-gradient(var(--ink), var(--ink)) 0 0 / 2px 100% no-repeat, linear-gradient(var(--ink), var(--ink)) 12px 0 / 2px 100% no-repeat,
  repeating-linear-gradient(180deg, var(--chartreuse) 0 4px, transparent 4px 13px) 0 0 / 14px 100% no-repeat }
.org .rail.sub { margin-left: 34px }
.org .rail b { display: block }
.org .rail span { font: 400 13px var(--mono); color: var(--muted) }

/* Notices */
.notice { border: 1.5px dashed var(--warn); padding: 14px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center }
.notice.stop { border: 0; border-left: 6px solid var(--stop) }
.notice.info { border: 1.5px solid var(--ink) }
.reports { display: grid; gap: 0; border-top: 1px solid var(--line) }
.report { border-bottom: 1px solid var(--line); padding: 16px 0 }
.report h3 a { display: inline-flex; align-items: center; min-height: 44px }
.policy { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line) }
.policy li { border-bottom: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px }
.policy li::before { content: ''; width: 24px; height: 10px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: repeating-linear-gradient(90deg, var(--chartreuse) 0 3px, transparent 3px 7px); align-self: center }

/* Switch rows: what it does, where it stands, how to change it */
.switch { border-top: 1px solid var(--line); padding: 16px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px 36px; align-items: start }
.switch:first-of-type { border-top: 2px solid var(--ink) }
.switch h3 { margin: 0 0 4px }
.switch .state { font: 500 14px var(--mono); margin-top: 8px }
.switch .how { color: var(--muted); font-size: 14.5px; max-width: 56ch }

/* ---------- Empty, loading and error states ---------- */
.empty { padding: 28px 0 8px; display: grid; gap: 8px; justify-items: start; color: var(--muted) }
.empty::before { content: ''; width: min(320px, 100%); height: 10px; border-top: 2px dashed var(--line); border-bottom: 2px dashed var(--line) }
.empty b { color: var(--ink); font-size: 17px }
.loading { color: var(--muted); padding: 24px var(--gutter) }

dialog { border: 2px solid var(--ink); border-radius: 0; padding: 0; max-width: min(620px, calc(100vw - 32px)); width: 100%; background: var(--paper); color: var(--ink) }
dialog.big { max-width: min(1000px, calc(100vw - 32px)) }
dialog::backdrop { background: rgba(10, 10, 11, .66) }
.dlg { padding: 22px; display: grid; gap: 14px }
.dlg h2 { margin: 0 }
.dlg .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end }
.viewer { display: grid; gap: 12px }
.viewer .frame { background: var(--ink); min-height: 240px; display: grid; place-items: center; overflow: auto; max-height: 70vh }
.viewer .frame img { max-width: 100%; max-height: 70vh; display: block }
.viewer .frame iframe { width: 100%; height: 70vh; border: 0; background: #fff }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; justify-items: end; z-index: 40; max-width: min(420px, calc(100vw - 32px)) }
.toast { background: var(--ink); color: var(--paper); padding: 12px 16px; border-left: 6px solid var(--chartreuse) }
.toast.bad { border-left-color: var(--stop) }

footer.site { padding: 22px var(--gutter) 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; gap: 8px 24px; flex-wrap: wrap }

/* ---------- Signing in ---------- */
.gate { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); min-height: calc(100vh - 0px); position: relative; overflow: hidden; flex: 1 }
.gate .gate__field { position: absolute; inset: 0 0 0 auto; width: 70%; z-index: 0 }
.gate .gate__field .smp-field { height: 100% }
.gate .gate__in { position: relative; z-index: 1; background: var(--paper); padding: 40px var(--gutter) 40px; display: grid; gap: 22px; align-content: center }
.gate .gate__logo { height: 26px; width: auto; display: block }
.gate .gate__logo-wrap { display: inline-flex; min-height: 44px; align-items: center }
.gate .board-wrap { position: relative; z-index: 1; align-self: end; justify-self: start; margin: 0 0 56px clamp(16px, 5vw, 80px) }
.steps { margin: 0; padding: 0 0 0 1.4em; display: grid; gap: 22px }
.steps > li { padding-left: 6px }
.steps > li::marker { font: 600 18px var(--mono) }
.qr { width: 216px; margin: 14px 0 10px; border: 1.5px solid var(--ink); padding: 0; background: var(--paper) }
.qr svg { display: block; width: 100%; height: auto }
.key { font: 500 14px var(--mono); letter-spacing: .06em; overflow-wrap: anywhere; margin: 0 0 4px }
input.code { font: 500 24px var(--mono); letter-spacing: .3em; max-width: 12ch }
.codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 8px 28px; font: 500 16px var(--mono) }
.codes li { padding: 6px 10px; border: 1px solid var(--line); background: var(--field) }

@media (max-width: 1099px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .kpis > div:nth-child(odd) { padding-left: 0; border-left: 0 }
  .kpis > div:nth-child(n+3) { border-top: 1px solid var(--line) }
  .track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 28px; padding-top: 0 }
  .track::before { display: none }
  .stn { padding: 10px 0 10px 34px; border-top: 1px solid var(--line) }
  .stn::before { top: 12px; left: 0 }
  /* the stations keep their 44 px tap height on a phone (Gate A WARN 2026-10-26: 30 px tiles at 390) */
}
@media (max-width: 900px) {
  .cols { grid-template-columns: minmax(0, 1fr) }
  .band { grid-template-columns: minmax(0, 1fr); min-height: 0 }
  .band__field { position: relative; inset: auto; aspect-ratio: auto; height: 132px; order: 0 }
  .band__who { order: 1 }
  .band__board { order: 2; margin: 0 var(--gutter) 24px; justify-self: stretch }
  .board { width: 100% }
  .gate { grid-template-columns: minmax(0, 1fr); min-height: 0 }
  .gate .gate__field { position: relative; inset: auto; width: 100%; height: 150px; order: 0 }
  .gate .gate__in { order: 1; padding-block: 28px 36px }
  .gate .board-wrap { display: none }
  .switch { grid-template-columns: minmax(0, 1fr) }
  .gauges { display: block }
  .gauge { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; margin-bottom: 20px }
  .gauge .rail { grid-column: 1 / -1; order: 3 }
  .dec { grid-template-columns: minmax(0, 1fr) }
  .dec .acts { justify-content: flex-start }
  .timeline li { grid-template-columns: minmax(0, 1fr) }
  .timeline details { grid-column: 1 }
}
@media (max-width: 640px) {
  .top { gap: 0 16px; padding-block: 4px }
  .top nav { order: 3; width: 100%; overflow-x: auto; margin-right: 0 }
  .acct { gap: 8px }
  .kpis, .kpis.k3, .kpis.k4 { grid-template-columns: minmax(0, 1fr) }
  .kpis > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line) }
  .facts > div { grid-template-columns: minmax(0, 1fr) }
  .facts dt { padding-bottom: 0 }
  .notice { grid-template-columns: minmax(0, 1fr) }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100% }
  table.stack tr { border-top: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 12px }
  table.stack td { border: 0; padding: 0 }
  table.stack td.amt { text-align: left }
  table.stack td[data-l]::before { content: attr(data-l) ' '; color: var(--muted); font: 400 12px var(--text) }
  table.stack.pairs tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
  table.stack.pairs td { overflow-wrap: anywhere }
  table.stack.pairs td.wide { grid-column: 1 / -1 }
  .codes { grid-template-columns: minmax(0, 1fr) }
  dialog { max-width: calc(100vw - 16px) }
  .dlg { padding: 16px }
}
@media (max-width: 340px) { .track { grid-template-columns: minmax(0, 1fr) } }
@media (prefers-reduced-motion: reduce) { .btn:active, .btn2:active { transform: none } }
@media (prefers-reduced-motion: no-preference) {
  .stn.in::before { animation: sleeper 600ms ease-out both }
  tbody tr { animation: settle 120ms ease-out both }
  @keyframes sleeper { from { transform: scale(.4); opacity: 0 } to { transform: scale(1); opacity: 1 } }
  @keyframes settle { from { opacity: 0 } to { opacity: 1 } }
}

/* Records on a phone: sections fold behind their headings (ui.js foldable); wider screens show them all. */
.st { display: none }
@media (max-width: 640px) {
  .fold > .sh .st { display: inline-flex; align-items: center; margin-left: auto }
  .fold:not(.is-open) > .sb { display: none }
  .fold:not(.is-open) > .sh { margin-bottom: 0 }
}
