/* FirePay approvals: Code 3 house style (Slab) for product UI, dark-first.

   Tokens: the Slab values the marketing site ships at code3-website d788f45 (src/styles/global.css),
   which hand-maintains them (it does not import code3-design-system), copied here by value. The
   dashboard differs in three deliberate ways, each from the product-UI canon:
     1. Dark is the default theme; light follows prefers-color-scheme or the in-page switch.
     2. It has adopted the green/red split (Design-Guardrails): green #009B52 is the action (navy
        label), amber #FFB000 is outstanding (navy label, fill only), red #FF4122 means something is
        wrong, and Stop all sending is the alarm control. The focus ring is neutral, never red.
     3. The type scale is the product scale of ui-polish (32/24/18/16/14/13/12), not the site's.
   Every text pair is measured in test/dashboard/contrast.test.ts against every surface it can land
   on, in both themes (WCAG 2.2 AA: 4.5:1 text, 3:1 control boundaries and the focus ring).
   No storage: the theme switch lives in memory only, like the site's. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/archivo-var-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  /* Surfaces: navy + off-white at 0 / 5 / 9 % (Design-Guardrails). */
  --page: #000E1E;
  --card: #0D1A29;
  --sunk: #172332;
  --ink: #EFE9E1;
  --ink-sec: #B5BCC8;
  --rule: #7D8DA3;
  --shadow: #2E4463;
  --cap: #22354D;
  --cap-ink: #EFE9E1;
  --red-text: #FF7A65;
  --field: #000E1E;
  --field-inset: #0D1A29;
  --focus: #EFE9E1;
  --nav: #0D1A29;
  --nav-rule: #7D8DA3;
  --scrim: rgba(0, 14, 30, 0.72);

  /* Fixed in both themes. */
  --navy: #000E1E;
  --paper: #FDF7FA;
  --red: #FF4122;
  --red-hover: #FF5A3F;
  --green: #009B52;
  --amber: #FFB000;
  --chrome-rule: #22354D;
  --chrome-sec: #B9BEC7;

  /* Type (ui-polish product scale) and rhythm (4px grid). */
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s6: 24px;
  --s8: 32px;
  --s12: 48px;
  --bar-h: 60px;

  /* The one motion curve: fast, flat ease-out. Used by presses, sheets, menus and toasts. */
  --motion: 160ms ease-out;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --page: #EFE9E1;
    --card: #FDF7FA;
    --sunk: #E6E0D7;
    --ink: #000E1E;
    --ink-sec: #4A5361;
    --rule: #000E1E;
    --shadow: #000E1E;
    --cap: #000E1E;
    --cap-ink: #FDF7FA;
    --red-text: #B8250E;
    --field: #FDF7FA;
    --field-inset: #E2DBD1;
    --focus: #000E1E;
    --nav: #FDF7FA;
    --nav-rule: #000E1E;
    --scrim: rgba(0, 14, 30, 0.5);
  }
}

/* The same light values, chosen by the in-page switch. Change one block, change both. */
:root[data-theme="light"] {
  color-scheme: light;
  --page: #EFE9E1;
  --card: #FDF7FA;
  --sunk: #E6E0D7;
  --ink: #000E1E;
  --ink-sec: #4A5361;
  --rule: #000E1E;
  --shadow: #000E1E;
  --cap: #000E1E;
  --cap-ink: #FDF7FA;
  --red-text: #B8250E;
  --field: #FDF7FA;
  --field-inset: #E2DBD1;
  --focus: #000E1E;
  --nav: #FDF7FA;
  --nav-rule: #000E1E;
  --scrim: rgba(0, 14, 30, 0.5);
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* No pull-to-refresh: the session lives in memory, so a reload signs the owner out (S11). */
  overscroll-behavior-y: none;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  /* Room for the fixed bottom bar and the home-indicator area under it. */
  padding-bottom: calc(var(--bar-h) + 4px + env(safe-area-inset-bottom));
}
body.signed-out {
  padding-bottom: 0;
}
button,
input {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: var(--s3) var(--s4);
  border: 2px solid var(--navy);
  background: var(--paper);
  color: var(--navy);
  font-weight: 800;
}
.skip-link:focus {
  left: var(--s3);
  top: var(--s3);
  outline-color: var(--navy);
}

.icon {
  display: block;
  flex: none;
}

/* ------------------------------------------------------------------ header (navy chrome) */
.hd {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: 56px;
  padding: calc(var(--s2) + env(safe-area-inset-top)) var(--s4) var(--s2);
  background: var(--navy);
  color: var(--paper);
  /* A navy rule, not red: red means something is wrong, and nothing is wrong at rest (S4). */
  border-bottom: 4px solid var(--chrome-rule);
}
.hd :focus-visible {
  outline-color: var(--paper);
}
.hd-tools {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

/* The Code 3 lockup (code3-website Wordmark.astro, d788f45). Sized in em of CODE. */
.wm {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.36em;
  color: var(--paper);
  font-size: 20px;
  line-height: 1;
}
.wm-code {
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.wm-3 {
  display: block;
  flex: none;
  height: 1.24em;
  width: auto;
  margin: 0 -0.04em;
}
.wm-cs {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 0.36em;
  border-left: 2px solid var(--chrome-rule);
  font-size: 0.4em;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--chrome-sec);
}
/* Below 360 px (an iPhone SE or mini with Display Zoom) the lockup keeps CODE and the 3 only,
   so the side switch and the theme switch fit without a sideways scroll (S12). */
@media (max-width: 359px) {
  .wm-cs {
    display: none;
  }
  .hd {
    padding-left: var(--s3);
    padding-right: var(--s3);
  }
}

/* Operations / Admin: the two sides of the console. */
.side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--paper);
}
.side button {
  min-height: 44px;
  min-width: 52px;
  padding: 0 var(--s2);
  border: 0;
  background: var(--navy);
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 16px;
  text-transform: uppercase;
  cursor: pointer;
}
.side button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--navy);
}
.side button:focus-visible {
  outline-offset: -5px;
  outline-color: var(--paper);
}
.side button[aria-pressed="true"]:focus-visible {
  outline-color: var(--navy);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--paper);
  background: var(--navy);
  color: var(--paper);
  cursor: pointer;
}

/* Sending stopped: the alarm, drawn as a bar and a mark (geometry, not only hue). */
.stopbar {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--card);
  color: var(--ink);
  border-bottom: 2px solid var(--rule);
  border-left: 8px solid var(--red);
}
.stopbar .msg {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  line-height: 20px;
}
.stopbar strong {
  font-weight: 800;
}

/* ------------------------------------------------------------------ page body */
main {
  display: flex;
  flex-direction: column;
  gap: var(--s6);
  max-width: 560px;
  margin: 0 auto;
  padding: var(--s4) var(--s4) var(--s8);
}
.ttlrow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s2);
  padding-bottom: var(--s2);
  border-bottom: 4px solid var(--rule);
}
.title {
  margin: 0;
  font-size: 24px;
  line-height: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.count {
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--ink-sec);
  font-variant-numeric: tabular-nums;
}
.lede {
  margin: 0;
  max-width: 60ch;
  color: var(--ink-sec);
  font-size: 13px;
  line-height: 18px;
}
.heading {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.section {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* A slab: card surface, 2px rule, hard offset shadow (zero blur, no spread). */
.slab {
  background: var(--card);
  border: 2px solid var(--rule);
  box-shadow: 4px 4px 0 var(--shadow);
}
.cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-height: 32px;
  padding: var(--s1) var(--s3);
  background: var(--cap);
  color: var(--cap-ink);
}
.micro {
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.meta {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-sec);
}
.num {
  font-variant-numeric: tabular-nums;
}

/* Rows: one raised group with inset dividers. */
.rows {
  display: flex;
  flex-direction: column;
}
.row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 64px;
  padding: var(--s2) var(--s4);
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  position: relative;
}
.row + .row::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--s4);
  right: 0;
  border-top: 1px solid var(--rule);
}
.row-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}
.row-title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-count {
  flex: none;
  min-width: 32px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.row:focus-visible {
  outline-offset: -4px;
}
.empty {
  padding: var(--s4);
  color: var(--ink-sec);
  font-size: 14px;
  line-height: 20px;
}

/* Status chips: square labels, never pills. A chip is as wide as its label, wherever it sits, so
   a green chip never reads as the green button (S3, Brand-Book Signal green). */
.chip {
  display: inline-flex;
  align-self: flex-start;
  justify-self: start;
  align-items: center;
  gap: var(--s1);
  min-height: 24px;
  padding: 0 var(--s2);
  border: 2px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip[data-tone="go"] {
  background: var(--green);
  border-color: var(--navy);
  color: var(--navy);
}
.chip[data-tone="outstanding"] {
  background: var(--amber);
  border-color: var(--navy);
  color: var(--navy);
}
.chip[data-tone="neutral"] {
  border-style: dashed;
  background: var(--sunk);
}

/* Something is wrong: a bar and a mark, never a pill. */
.problem {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  padding: var(--s3);
  border: 2px solid var(--rule);
  border-left: 8px solid var(--red);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
}
.problem .icon {
  color: var(--red-text);
}
.note {
  padding: var(--s3);
  border: 2px solid var(--rule);
  background: var(--sunk);
  font-size: 14px;
  line-height: 20px;
}

/* Buttons. 48px: primary and safety actions (gloves). */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 0 var(--s4);
  border: 2px solid var(--rule);
  border-radius: 0;
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
  font-weight: 800;
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
  transition: transform var(--motion);
  -webkit-tap-highlight-color: transparent;
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shadow);
}
.btn[disabled],
.btn[aria-disabled="true"] {
  border-style: dashed;
  background: var(--sunk);
  color: var(--ink-sec);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
/* The action: green fill, navy label (5.37:1), navy edge. */
.btn-go {
  background: var(--green);
  border-color: var(--navy);
  color: var(--navy);
}
/* The alarm control: red fill, navy label (5.58:1). */
.btn-stop {
  background: var(--red);
  border-color: var(--navy);
  color: var(--navy);
}
.btn-wide {
  width: 100%;
}
/* The way out (Back, Cancel, Close, Keep sending, Clear): a chevron and words, no slab, no
   shadow, so it never looks like a decision (Design-Guardrails, Buttons, 2026-09-11; S5). */
.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s1);
  min-height: 48px;
  padding: 0 var(--s1);
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-quiet[disabled] {
  color: var(--ink-sec);
  cursor: not-allowed;
}
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}
@media (hover: hover) {
  .btn:hover {
    border-color: var(--ink);
  }
  .btn-stop:hover {
    background: var(--red-hover);
    border-color: var(--navy);
  }
  .row:hover {
    background: var(--sunk);
  }
}

/* Forms. Inputs are 16px so iOS does not zoom on focus. */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}
.field label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}
.input {
  min-height: 48px;
  width: 100%;
  padding: 0 var(--s3);
  border: 2px solid var(--rule);
  border-radius: 0;
  background: var(--field);
  color: var(--ink);
  font-size: 16px;
  box-shadow: inset 3px 3px 0 var(--field-inset);
}
.input-code {
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: 0.25em;
}
.err {
  color: var(--red-text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

/* Snapshot: exactly what was hashed, as text. */
.snap {
  display: flex;
  flex-direction: column;
}
.kv {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  border-top: 1px solid var(--rule);
}
.kv:first-child {
  border-top: 0;
}
.kv > .k {
  padding: var(--s2) var(--s3);
  background: var(--sunk);
  border-right: 2px solid var(--rule);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.kv > .v {
  min-width: 0;
  padding: var(--s2) var(--s3);
  /* A cell clips its own ink: marks stacked above or below a letter cannot paint over the row
     next to it (F1). Runs of more than two marks are tokens as well (render/text.ts). */
  overflow: hidden;
}
.kv-long {
  grid-template-columns: minmax(0, 1fr);
}
.kv-long > .k {
  border-right: 0;
  border-bottom: 1px solid var(--rule);
}
.hostile {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  /* Isolated, left to right: right-to-left letters stay inside their own run and cannot set the
     direction the rest of the field is laid out in. */
  unicode-bidi: isolate;
  direction: ltr;
}
.hostile-inline {
  white-space: normal;
  unicode-bidi: isolate;
}
/* Addresses: a fixed-width face that tells I, l, 1, 0 and O apart (F2). Breaks come from the
   <wbr> after each "@" and "." (render/text.ts), so a domain is not split mid-name (S14). */
.hostile-addr {
  font-family: var(--mono);
  font-size: 16px;
  /* Breaks inside a name only when that name alone is wider than the cell, so no part of an
     address is ever clipped by the cell (threat review of 3ea6a5e). */
  overflow-wrap: anywhere;
  word-break: normal;
}
/* The letters of Proposed that differ from Current: boxed, in the address's own colour. */
.diff {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  background: var(--sunk);
  font-weight: 800;
}
.tok {
  display: inline;
  padding: 0 var(--s1);
  border: 2px solid var(--red);
  background: var(--sunk);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}
.eol {
  padding: var(--s2) var(--s3);
  border-top: 2px dashed var(--rule);
  color: var(--ink-sec);
}
.fp {
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Hold progress: a ruled bar; the fill is the time already waited. */
.meter {
  height: 12px;
  border: 2px solid var(--rule);
  background: var(--card);
}
.meter > span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--amber);
  transform-origin: left center;
}

/* ------------------------------------------------------------------ review dock and batch */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--bar-h) + 4px + env(safe-area-inset-bottom));
  z-index: 25;
  padding: var(--s3) var(--s4);
  background: var(--nav);
  border-top: 2px solid var(--nav-rule);
}
.dock-inner {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  max-width: 560px;
  margin: 0 auto;
}
.dock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}
/* Equal shares on a phone; a label that does not fit moves the button to its own line (S12). */
.dock-actions > .btn {
  flex: 1 1 0;
  min-width: max-content;
}
body.has-dock main {
  padding-bottom: calc(var(--s12) * 4);
}

/* ------------------------------------------------------------------ bottom bar (edge-wrapping) */
/* The cells run through the home-indicator safe area to the physical screen edge, so there is no
   dead strip under the buttons on any phone shape (owner's pick, 2026-10-28). */
.bnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  background: var(--nav);
  border-top: 4px solid var(--nav-rule);
}
.bnav button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s1);
  min-height: calc(var(--bar-h) + env(safe-area-inset-bottom));
  padding: var(--s2) var(--s1) calc(var(--s2) + env(safe-area-inset-bottom));
  border: 0;
  border-right: 2px solid var(--nav-rule);
  background: var(--nav);
  color: var(--ink);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bnav button[aria-current="page"] {
  background: var(--ink);
  color: var(--page);
  font-weight: 800;
}
.bnav button:active {
  background: var(--sunk);
}
/* Stop all sending at rest is a plain cell with its mark and words: red appears only once
   sending is stopped, when something is wrong (S4, owner default P1, 2026-10-28). */
.bnav .bstop {
  border-right: 0;
  font-weight: 800;
}
.bnav .bstop[data-state="stopped"] {
  background: var(--red);
  color: var(--navy);
}
.bnav .bstop[data-state="stopped"]:active {
  background: var(--red-hover);
}
.bnav button:focus-visible {
  outline-offset: -6px;
}
.bnav button[aria-current="page"]:focus-visible {
  outline-color: var(--page);
}
.bnav .bstop[data-state="stopped"]:focus-visible {
  outline-color: var(--navy);
}
.badge {
  position: absolute;
  top: var(--s1);
  left: calc(50% + 8px);
  min-width: 20px;
  height: 20px;
  padding: 0 var(--s1);
  border: 2px solid var(--navy);
  background: var(--amber);
  color: var(--navy);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ sheets (overlay layer) */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--scrim);
  animation: fade var(--motion);
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  margin: 0 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom));
  background: var(--sunk);
  color: var(--ink);
  border-top: 6px solid var(--rule);
  animation: rise var(--motion);
}
.sheet[data-tone="wrong"] {
  border-top-color: var(--red);
}
.sheet-title {
  margin: 0;
  font-size: 24px;
  line-height: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  font-size: 14px;
  line-height: 20px;
}
/* One size inside a line: hostile names and addresses take the list's size (S8). */
.steps .hostile {
  font-size: inherit;
  line-height: inherit;
}
.step-n {
  flex: none;
  min-width: 24px;
  font-family: var(--mono);
  font-weight: 800;
}
.step-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.steps li[data-state="done"] {
  color: var(--ink);
}
.steps li[data-state="todo"] {
  color: var(--ink-sec);
}

.toast {
  position: fixed;
  left: var(--s4);
  right: var(--s4);
  top: calc(64px + env(safe-area-inset-top));
  z-index: 40;
  max-width: 528px;
  margin: 0 auto;
  padding: var(--s3) var(--s4);
  background: var(--card);
  border: 2px solid var(--rule);
  box-shadow: 4px 4px 0 var(--shadow);
  font-size: 14px;
  line-height: 20px;
  animation: fade var(--motion);
}

/* Sign-in. */
main.signin {
  justify-content: center;
  max-width: none;
  min-height: 100vh;
  padding: var(--s4);
}
.signin .slab {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.signin-body {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s4);
}

@keyframes rise {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* One motion behaviour, and an honest opt-out. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pad {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4);
}
.pad + .pad {
  border-top: 1px solid var(--rule);
}
/* An alert that says something is wrong: the bar and the mark (never a chip). */
.problem-row {
  border-left: 8px solid var(--red);
}
.mark-wrong {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  color: var(--red-text);
}
details > summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.check {
  width: 20px;
  height: 20px;
  margin: 0 var(--s2) 0 0;
  vertical-align: middle;
  accent-color: var(--green);
}
.input::placeholder {
  color: var(--ink-sec);
  opacity: 1;
}
.flush {
  margin: 0;
}
.plain-list {
  margin: 0;
  padding-left: var(--s4);
}
/* The count of alerts to act on, on the Admin switch while the owner is on Ops (S9). */
.side-n {
  margin-left: var(--s1);
  font-variant-numeric: tabular-nums;
}
/* A field switched off in place (the contact form's "Replaces" for a non-email kind): the hidden
   attribute wins over .field's display. */
.field[hidden] {
  display: none;
}
/* The kinds of contact: three choices in one row; the chosen one is drawn as pressed. */
.btn-row[role="group"] {
  grid-template-columns: 1fr 1fr 1fr;
}
.btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--page);
  border-color: var(--ink);
}
