/*
 * Support checkout. One skeleton, one "voice" per calling app (body[data-voice]).
 * Colours, type stacks and @font-face come from the app's tokens, set on :root by the server.
 * Square corners, no shadows, no gradients: that is what both current apps ask for.
 */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --gutter: 20px;
  --measure: 36rem;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 600px) { :root { --gutter: 28px; } }

html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; scrollbar-color: var(--mark) var(--bg); }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.45 var(--f-body);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--fg);
  caret-color: var(--fg);
  /* defaults for an app without a voice of its own */
  --label-track: .16em;
  --key-font: 600 16px/1 var(--f-label);
  --num-font: 700 22px/1 var(--f-label);
  --note-font: 400 14px/1.4 var(--f-body);
  --small-font: 400 13px/1.4 var(--f-body);
  --btn-font: 600 12px/1 var(--f-label);
  --bar-rule: 1px solid var(--rule);
  --key-border: var(--mark);
  --key-on-bg: var(--well);
  --key-on-fg: var(--fg);
  --hl: var(--accent);
  --r: var(--app-r, 0px);
  --r-s: var(--app-rs, 0px);
  --ow: 2px;
  --oo: 2px;
  --primary-bg: var(--primary, var(--fg));
  --primary-fg: var(--on-primary, var(--bg));
}

::selection { background: var(--accent); color: var(--on-accent); }

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding-inline: var(--gutter); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- voices ---------- */

body[data-voice="dispatch"] {
  --label-track: .13em;
  --key-font: 400 18px/1 var(--f-mono);
  --num-font: 700 22px/1 var(--f-mono);
  --note-font: 400 14px/1.4 var(--f-mono);
  --small-font: 400 12.5px/1.45 var(--f-mono);
  --bar-rule: 1px solid var(--rule);
  --key-border: var(--mark);
}
body[data-voice="specimen"] {
  --label-track: .19em;
  --key-font: 400 15px/1 var(--f-display);
  --num-font: 400 22px/1 var(--f-display);
  --note-font: 400 14px/1.4 var(--f-body);
  --small-font: 400 13px/1.4 var(--f-body);
  --bar-rule: 2px solid var(--fg);
  --key-border: var(--rule);
  --key-on-bg: var(--accent);
  --key-on-fg: var(--on-accent);
}

/* Telephone switchboard (Third Ear): bakelite and label paper. Flat, 6 px surfaces, 3 px cells, sentence-case buttons.
   Cable colours belong to the app's lines only, so they never appear here; the one colour detail is the amber lamp. */
body[data-voice="switchboard"] {
  font-size: 16px;
  --r: 6px; --r-s: 3px; --ow: 3px; --oo: 3px;
  --label-track: .12em;
  --key-font: 700 17px/1 var(--f-body);
  --num-font: 700 22px/1 var(--f-body);
  --note-font: 400 15px/1.45 var(--f-body);
  --small-font: 400 14px/1.4 var(--f-body);
  --bar-rule: 1px solid var(--rule);
  --key-border: var(--mark);
  --key-on-bg: var(--well-hi, var(--well));
  --key-on-fg: var(--fg);
}
body[data-voice="switchboard"] .display { font: 700 24px/1.25 var(--f-display); letter-spacing: 0; text-transform: none; }
body[data-voice="switchboard"] .wm { font: 700 22px/1 var(--f-label); letter-spacing: .05em; text-transform: uppercase; }
body[data-voice="switchboard"] .tag { padding: 3px 8px; border: 1px solid var(--rule); border-radius: var(--r-s); font-size: 13px; letter-spacing: .1em; color: var(--mid); }
body[data-voice="switchboard"] .legend, body[data-voice="switchboard"] dt, body[data-voice="switchboard"] .tags, body[data-voice="switchboard"] .field-l { font-size: 13px; }
body[data-voice="switchboard"] .book-title { font: 700 16px/1.3 var(--f-body); }
body[data-voice="switchboard"] .key-text,
body[data-voice="switchboard"] .btn,
body[data-voice="switchboard"] .linkbtn,
body[data-voice="switchboard"] .lane-fmt { font-family: var(--f-body); font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: 0; }
body[data-voice="switchboard"] .lane-fmt { text-transform: uppercase; letter-spacing: .04em; }
body[data-voice="switchboard"] .btn { border-width: 1px; border-color: var(--mark); padding: 0 16px; }
body[data-voice="switchboard"] .btn-solid { border-color: transparent; }
body[data-voice="switchboard"] .field input { font: 400 20px/1.2 var(--f-body); }
body[data-voice="switchboard"] .unit { font: 700 17px/1 var(--f-body); }
body[data-voice="switchboard"] .error { border-width: 1px; border-color: var(--fault, var(--fg)); color: var(--fault-text, var(--fg)); background: var(--well); }
body[data-voice="switchboard"] .live { width: 11px; height: 11px; border-radius: 50%; background: var(--lamp, var(--accent)); outline: 0; animation: lamp 1.6s ease-in-out infinite; }
@keyframes lamp { 50% { opacity: .35; } }
body[data-voice="switchboard"] .lane:hover, body[data-voice="switchboard"] .key:hover { background: var(--well-hi, var(--rule-faint)); }

/* Catalogue sleeve (Localhost Recording Studio): a matte black record sleeve. Hairline cells, engraved mono capitals,
   square corners, no shadows, no fills. Red appears only on the "live" mark. Dark only: light renders the same sleeve. */
body[data-voice="sleeve"] {
  --label-track: .16em;
  --key-font: 400 14px/1 var(--f-label);
  --num-font: 300 24px/1 var(--f-display);
  --note-font: 400 14px/1.45 var(--f-label);
  --small-font: 400 12px/1.5 var(--f-label);
  --bar-rule: 1px solid var(--rule);
  --key-border: var(--rule);
  --key-on-bg: var(--bg);
  --key-on-fg: var(--fg);
}
body[data-voice="sleeve"] .display { font: 300 30px/1.15 var(--f-display); letter-spacing: -.02em; text-transform: none; }
body[data-voice="sleeve"] .wm { font: 400 12px/1 var(--f-label); letter-spacing: .16em; text-transform: uppercase; }
body[data-voice="sleeve"] .tag, body[data-voice="sleeve"] .legend, body[data-voice="sleeve"] .tags,
body[data-voice="sleeve"] .field-l, body[data-voice="sleeve"] dt { font-weight: 400; font-size: 11px; }
body[data-voice="sleeve"] .key, body[data-voice="sleeve"] .btn { min-height: 48px; }
body[data-voice="sleeve"] .key-text, body[data-voice="sleeve"] .btn, body[data-voice="sleeve"] .linkbtn,
body[data-voice="sleeve"] .lane-fmt { font-family: var(--f-label); font-weight: 400; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
body[data-voice="sleeve"] .key:hover, body[data-voice="sleeve"] .lane:hover, body[data-voice="sleeve"] .btn:hover { background: var(--well-hi); }
body[data-voice="sleeve"] .key:active, body[data-voice="sleeve"] .btn:active { background: var(--rule-faint); }
body[data-voice="sleeve"] .btn { border-width: 1px; border-color: var(--rule); }
body[data-voice="sleeve"] .btn-solid { background: transparent; color: var(--fg); border-color: var(--fg); }
body[data-voice="sleeve"] .field input { font: 300 28px/1.15 var(--f-display); letter-spacing: -.02em; }
body[data-voice="sleeve"] .unit { font: 400 12px/1 var(--f-label); letter-spacing: .16em; }
body[data-voice="sleeve"] .error { border-width: 1px; border-color: var(--fault); color: var(--fault-text); background: var(--bg); }
body[data-voice="sleeve"] .live { width: 8px; height: 8px; background: var(--lamp); outline: 0; }

/* Trail blaze (LibreTag): white plates with graphite frames, signpost lettering in Archivo / Archivo Narrow, and the four
   trail-blaze colours as one stripe under the bar. Status colour (fault) is never a blaze colour. */
body[data-voice="trailblaze"] {
  font-size: 16px;
  --r: 8px; --r-s: 4px; --ow: 3px; --oo: 3px;
  --label-track: .05em;
  --key-font: 700 17px/1 var(--f-body);
  --num-font: 800 24px/1 var(--f-body);
  --note-font: 400 15px/1.5 var(--f-body);
  --small-font: 400 14px/1.45 var(--f-body);
  --bar-rule: 1px solid var(--rule);
  --key-border: var(--mark);
  --key-on-bg: var(--accent);
  --key-on-fg: var(--on-accent);
}
body[data-voice="trailblaze"] .edge { display: block; height: 6px; background: linear-gradient(90deg, #D7262E 0 25%, #1F5FB4 25% 50%, #2F8F3A 50% 75%, #F2C200 75% 100%); }
body[data-voice="trailblaze"] .display { font: 800 28px/1.1 var(--f-display); letter-spacing: -.02em; text-transform: none; }
body[data-voice="trailblaze"] .wm { font: 800 21px/1 var(--f-display); letter-spacing: -.01em; }
body[data-voice="trailblaze"] .tag, body[data-voice="trailblaze"] .legend, body[data-voice="trailblaze"] .tags,
body[data-voice="trailblaze"] .field-l, body[data-voice="trailblaze"] dt { font-weight: 600; font-size: 13px; letter-spacing: .06em; }
body[data-voice="trailblaze"] .key { border-width: 2px; border-color: var(--rule); }
body[data-voice="trailblaze"] input:checked + .key { border-color: var(--accent); box-shadow: none; }
body[data-voice="trailblaze"] .key-text, body[data-voice="trailblaze"] .btn, body[data-voice="trailblaze"] .linkbtn,
body[data-voice="trailblaze"] .lane-fmt { font-family: var(--f-body); font-weight: 700; font-size: 15px; letter-spacing: 0; text-transform: none; }
body[data-voice="trailblaze"] .lane-fmt { font-family: var(--f-label); text-transform: uppercase; letter-spacing: .06em; }
body[data-voice="trailblaze"] .btn { border-width: 2px; min-height: 48px; }
body[data-voice="trailblaze"] .field input { font: 700 22px/1.2 var(--f-body); border-radius: var(--r-s); }
body[data-voice="trailblaze"] .unit { font: 700 17px/1 var(--f-body); }
body[data-voice="trailblaze"] .error { border-width: 2px; border-color: var(--fault); color: var(--fault-text); background: var(--well); }
body[data-voice="trailblaze"] .book-title { font: 700 16px/1.3 var(--f-body); }
body[data-voice="trailblaze"] .live { width: 12px; height: 12px; border-radius: 50%; background: var(--lamp); outline: 2px solid var(--fg); }
body[data-voice="trailblaze"] .key:hover, body[data-voice="trailblaze"] .lane:hover { background: var(--well-hi); }

/* Fog sleeve (Droneboard): slate and fog, PT Sans, lowercase headings without bold, 2 px corners, rule lines of fog.
   Red is a rare accent (live mark, errors). */
body[data-voice="fogsleeve"] {
  font-size: 17px;
  --r: 2px; --r-s: 2px; --ow: 2px; --oo: 3px;
  --label-track: .14em;
  --key-font: 400 17px/1 var(--f-body);
  --num-font: 400 22px/1 var(--f-body);
  --note-font: 400 15px/1.5 var(--f-body);
  --small-font: 400 14px/1.45 var(--f-body);
  --bar-rule: 1px solid var(--rule);
  --key-border: var(--rule);
  --key-on-bg: var(--accent);
  --key-on-fg: var(--on-accent);
}
body[data-voice="fogsleeve"] .display { font: 400 28px/1.2 var(--f-display); letter-spacing: .02em; text-transform: lowercase; }
body[data-voice="fogsleeve"] .wm { font: 400 18px/1 var(--f-display); letter-spacing: .3em; text-transform: lowercase; }
body[data-voice="fogsleeve"] .tag, body[data-voice="fogsleeve"] .legend, body[data-voice="fogsleeve"] .tags,
body[data-voice="fogsleeve"] .field-l, body[data-voice="fogsleeve"] dt { font-weight: 400; font-size: 13px; letter-spacing: .14em; }
body[data-voice="fogsleeve"] .key-text, body[data-voice="fogsleeve"] .btn, body[data-voice="fogsleeve"] .linkbtn,
body[data-voice="fogsleeve"] .lane-fmt { font-family: var(--f-body); font-weight: 400; font-size: 16px; letter-spacing: .08em; text-transform: lowercase; }
body[data-voice="fogsleeve"] .lane-fmt { text-transform: uppercase; letter-spacing: .1em; }
body[data-voice="fogsleeve"] .btn { border-width: 1px; min-height: 48px; }
body[data-voice="fogsleeve"] .book-title { font: 700 16px/1.3 var(--f-body); }
body[data-voice="fogsleeve"] .field input { font: 400 22px/1.2 var(--f-body); }
body[data-voice="fogsleeve"] .unit { font: 400 17px/1 var(--f-body); }
body[data-voice="fogsleeve"] .error { border-width: 1px; border-color: var(--fault); color: var(--fault-text); background: var(--well); }
body[data-voice="fogsleeve"] .live { width: 9px; height: 9px; border-radius: 50%; background: var(--lamp); outline: 0; }
body[data-voice="fogsleeve"] .key:hover, body[data-voice="fogsleeve"] .lane:hover { background: var(--well-hi); }

/* Barred postal edge: dispatch only. */
.edge { display: none; height: 7px; background: repeating-linear-gradient(115deg, var(--fg) 0 12px, transparent 12px 24px); }
body[data-voice="dispatch"] .edge { display: block; }

/* ---------- top bar ---------- */

.bar { border-bottom: var(--bar-rule); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }

.wm { display: inline-flex; align-items: baseline; color: var(--fg); }
body[data-voice="dispatch"] .wm { font: 21px/1 var(--f-display); letter-spacing: -.2px; }
.wm-strong { font-weight: 700; }
.wm-light { font-weight: 300; }
.wm-mono { font: 400 12px/1 var(--f-label); letter-spacing: .16em; }
.wm-pixel { font: 400 17px/1 var(--f-display); letter-spacing: .14em; }
.dot { display: inline-block; width: 7px; height: 7px; margin-left: 9px; background: var(--accent); }

.tag, .legend, .tags, .field-l, dt, .btn, .lane-fmt, .linkbtn {
  font-family: var(--f-label);
  text-transform: uppercase;
  letter-spacing: var(--label-track);
}
.tag { font-size: 11px; font-weight: 600; color: var(--faint); }

/* ---------- content ---------- */

main { flex: 1; display: flex; flex-direction: column; padding-top: 28px; padding-bottom: 28px; }

.display { margin: 0 0 24px; text-transform: uppercase; }
body[data-voice="dispatch"] .display { font: 700 22px/1.15 var(--f-display); letter-spacing: .14em; }
body[data-voice="specimen"] .display { font: 400 28px/1.1 var(--f-display); letter-spacing: .03em; }
body:not([data-voice]) .display, body[data-voice="plain"] .display { font: 700 24px/1.15 var(--f-display); letter-spacing: .08em; }
/* Silkscreen has no caron letters (Č Ť Ľ Ď Ň Ř Ů Ě): headings in sk and cs use the label face instead. */
html:lang(sk) body[data-voice="specimen"] .display,
html:lang(cs) body[data-voice="specimen"] .display { font: 700 25px/1.1 var(--f-label); letter-spacing: .14em; }

.step { outline: none; }
.step:not([hidden]) { animation: enter .16s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.block { margin: 0 0 24px; }

.legend { margin: 0 0 10px; font-size: 11px; font-weight: 600; color: var(--mid); display: flex; gap: .7em; }
.sec { color: var(--fg); font-weight: 700; }
body:not([data-voice="dispatch"]) .sec { display: none; }
body[data-voice="specimen"] .legend { padding-bottom: 7px; border-bottom: 1px solid var(--fg); }

/* the offer: what the payment includes */
.offer { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--well); }
.cover { display: block; flex: none; width: 48px; height: auto; border: 1px solid var(--rule); border-radius: var(--r-s); background: var(--plate); }
.offer-text { min-width: 0; }
.book-title { margin: 0 0 4px; font: 700 15px/1.3 var(--f-mono); }
body[data-voice="specimen"] .book-title { font: 600 15px/1.3 var(--f-body); }
.tags { margin: 0; font-size: 10.5px; font-weight: 600; color: var(--faint); }

/* amount and method keys */
.keys { --n: 4; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; }
.keys[data-cols="2"] { --n: 2; }
.keys[data-cols="3"] { --n: 3; }
.keys-sm { margin-bottom: 8px; }
.keys-sm .key { min-height: 44px; }
.keys-sm .key-text { font-size: 12px; }
.key {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 8px;
  border: 1px solid var(--key-border); border-radius: var(--r);
  background: transparent; color: var(--fg);
  font: var(--key-font);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}
.key-text { font-family: var(--f-label); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: var(--label-track); }
.key:hover { background: var(--rule-faint); }
input:checked + .key {
  border-color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--fg);
  background: var(--key-on-bg);
  color: var(--key-on-fg);
}
body[data-voice="dispatch"] input:checked + .key { font-weight: 700; }
input:focus-visible + .key { outline: var(--ow) solid var(--focus); outline-offset: var(--oo); }

.other { margin-top: 12px; }
.field { display: grid; gap: 4px; }
.field-l { font-size: 10.5px; font-weight: 600; color: var(--faint); }
.field-in { display: flex; align-items: baseline; gap: 10px; }
.field input {
  flex: 1; min-width: 0; min-height: 48px; padding: 8px 10px;
  font: 400 20px/1.2 var(--f-mono); font-variant-numeric: tabular-nums;
  color: var(--fg); background: transparent; border: 1px solid var(--fg); border-radius: var(--r);
}
body[data-voice="dispatch"] .field input { padding-inline: 0; border-width: 0 0 1px; }
body[data-voice="specimen"] .field input { font: 400 18px/1.2 var(--f-body); }
.field input::placeholder { color: var(--faint); opacity: 1; }
.field input:focus-visible { outline: var(--ow) solid var(--focus); outline-offset: var(--oo); }
.field input[aria-invalid="true"] { border-width: 2px; }
body[data-voice="dispatch"] .field input[aria-invalid="true"] { border-width: 0 0 2px; }
.unit { font: 600 16px/1 var(--f-label); color: var(--mid); }

.hint { margin: 10px 0 0; min-height: 1.4em; font: var(--note-font); color: var(--faint); }
.error { margin: 0 0 16px; padding: 9px 12px; border: 2px solid var(--fg); border-radius: var(--r); font: var(--note-font); }
.error:empty { display: none; }

/* ---------- pay step ---------- */

.summary { display: flex; align-items: baseline; gap: 12px; padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--rule); }
.sum-amount { font: var(--num-font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-book { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--note-font); color: var(--mid); }
.linkbtn {
  margin: -12px -4px; padding: 12px 4px; background: none; border: 0; cursor: pointer;
  color: var(--fg); font-size: 11px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.linkbtn:focus-visible { outline: var(--ow) solid var(--focus); outline-offset: var(--oo); }
.linkbtn.copy { margin: -4px -4px -12px 0; }

.plate { width: min(100%, 15.5rem); margin: 4px auto 18px; padding: 14px; background: var(--plate); border: 1px solid var(--rule); border-radius: var(--r); }
.plate svg { display: block; width: 100%; height: auto; }

.apparatus { margin: 0; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-top: 1px solid var(--rule-faint); }
.row:last-child { border-bottom: 1px solid var(--rule-faint); }
dt { flex: none; font-size: 10.5px; font-weight: 600; color: var(--faint); }
dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; display: flex; flex-direction: column; align-items: flex-end; }
dd.num { font: var(--num-font); font-size: 18px; font-variant-numeric: tabular-nums; }
code { font: 400 13px/1.4 var(--f-mono); }

.status { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.status-text p { margin: 0; font: var(--note-font); }
.status-text .faint { color: var(--faint); font: var(--small-font); }
.status-text .faint:empty { display: none; }

/* live indicator (specimen / plain) and postmark (dispatch) */
.live { flex: none; width: 7px; height: 7px; background: var(--accent); outline: 1px solid var(--fg); animation: blink 1.2s steps(2, jump-none) infinite; }
body[data-voice="dispatch"] .live { display: none; }
body:not([data-voice="dispatch"]) .postmark:not(.postmark-lg) { display: none; }
@keyframes blink { 50% { opacity: .15; } }

.postmark { flex: none; display: block; overflow: visible; }
.postmark circle { fill: none; stroke: var(--mark); }
.postmark .pm-ring { stroke-width: 1.5; }
.postmark .pm-inner { stroke-width: 1; }
.postmark .pm-fill { fill: var(--fg); stroke: none; opacity: 0; transition: opacity .3s var(--ease); }
.postmark .pm-date { font: 700 8px/1 var(--f-mono); fill: var(--mid); letter-spacing: .02em; }
.postmark .pm-tick { fill: none; stroke: var(--bg); stroke-width: 3.5; stroke-linecap: butt; stroke-linejoin: miter; stroke-dasharray: 40; stroke-dashoffset: 40; }
.postmark[data-state="paid"] .pm-fill { opacity: 1; }
.postmark[data-state="paid"] .pm-ring { stroke: var(--fg); }
.postmark[data-state="paid"] .pm-date { display: none; }
.postmark[data-state="paid"] .pm-tick { animation: draw .38s .12s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- done step ---------- */

.done-head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.done-head .display { margin: 0; }
body:not([data-voice="dispatch"]) .postmark-lg { display: none; }
/* the accent is a highlighter under the words, never a ground behind them (light text on lime is unreadable) */
.hl { padding-bottom: 8px; background: linear-gradient(var(--hl), var(--hl)) 0 100% / 0 4px no-repeat; }
body[data-voice="specimen"] .hl { animation: sweep .45s .1s var(--ease) forwards; }
@keyframes sweep { to { background-size: 100% 4px; } }

.typed { margin: 12px 0 0; font: var(--note-font); color: var(--mid); }
.lanes { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.lane { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 2px; border-bottom: 1px solid var(--rule); color: var(--fg); text-decoration: none; }
.lane:hover { background: var(--rule-faint); }
.lane:focus-visible { outline: var(--ow) solid var(--focus); outline-offset: calc(var(--ow) * -1); }
.lane-fmt { flex: none; width: 4.6em; font-size: 12px; font-weight: 700; }
.lane-desc { flex: 1; min-width: 0; font: var(--note-font); color: var(--mid); }
.ico { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: butt; stroke-linejoin: miter; }


/* ---------- action bar ---------- */

.actions { position: sticky; bottom: 0; z-index: 2; background: var(--bg); border-top: var(--bar-rule); }
.actions .wrap { display: flex; gap: 10px; padding-block: 12px calc(12px + env(safe-area-inset-bottom)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 20px;
  font-size: 12px; font-weight: 600; line-height: 1;
  color: var(--fg); background: transparent; border: 2px solid var(--fg); border-radius: var(--r);
  text-decoration: none; text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--rule-faint); }
.btn-solid { flex: 1; color: var(--primary-fg); background: var(--primary-bg); border-color: var(--primary-bg); }
.btn-solid:hover { background: color-mix(in srgb, var(--primary-bg) 86%, var(--bg)); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: var(--ow) solid var(--focus); outline-offset: calc(var(--oo) + 1px); }
.btn:disabled { color: var(--faint); background: transparent; border-color: var(--rule); cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }

/* Wide screens: the page is shorter than the window, so the sticky action bar sits right under the content
   instead of a screen away; once the content outgrows the window it sticks to the bottom like on a phone. */
@media (min-width: 700px) {
  main { flex: none; padding-top: 40px; }
  .edge:last-of-type { margin-top: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .postmark .pm-tick { stroke-dashoffset: 0; }
  body[data-voice="specimen"] .hl { background-size: 100% 4px; }
}
