/* Shared stylesheet: the "working paper" design (the design sheet is the source of truth).
   Tokens, type scale and the components every page uses. No request leaves for fonts or anything else. */

@font-face { font-family: Newsreader; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/newsreader-latin-opsz-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/atkinson-hyperlegible-mono-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-mono-latin-700-normal.woff2) format("woff2"); }

/* ============ TOKENS ============ */
:root {
  --paper: #F3F0E8; --surface: #FAF8F3; --ink: #1C1B18; --ink2: #47433A; --muted: #645F53; --rule: #D2CCBB; --edge: #8C8573;
  --pass: #1D6641; --pass-bg: #E3EEE5; --fail: #9E3426; --fail-bg: #F5E2DD; --warn: #76500A; --warn-bg: #F4E9CF; --nc: #645F53; --nc-bg: #E9E5DA; --link: #1F4E79;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --head: Newsreader, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, "Segoe UI", sans-serif;
  --mono: "Atkinson Hyperlegible Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--body); font-variant-numeric: tabular-nums; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: -.005em; }
a { color: var(--link); text-underline-offset: 3px; }
code, pre { font-family: var(--mono); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; left: -9999px; }

/* ============ TYPE ROLES ============ */
.t-h1 { font: 500 2.5rem/2.75rem var(--head); letter-spacing: -.012em; }
.t-h2 { font: 600 1.75rem/2.125rem var(--head); }
.t-h3 { font: 600 1.25rem/1.625rem var(--head); }
.t-lead { font: 400 1.125rem/1.75rem var(--body); color: var(--ink2); }
.t-sm { font-size: .875rem; line-height: 1.25rem; }
.t-label { font: 500 .75rem/1rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.t-num { font: 500 2.75rem/3rem var(--mono); letter-spacing: -.02em; }
.mono { font-family: var(--mono); }
.dim, .muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ============ PAGE FRAME ============ */
.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--ink); }
.word { display: flex; align-items: center; gap: var(--s2); font: 600 1.375rem/1 var(--head); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.mark { width: 18px; height: 18px; border: 2px solid var(--ink); position: relative; flex: none; }
.mark:after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--ink); }
.nav { display: flex; gap: var(--s5); font-size: .9375rem; }
.nav a { color: var(--ink); text-decoration: none; padding: var(--s2) 0; border-bottom: 2px solid transparent; }
.nav a[aria-current] { border-color: var(--ink); font-weight: 700; }
.page { max-width: 1040px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s7); }
.crumb { font: 500 .75rem var(--mono); letter-spacing: .04em; color: var(--muted); margin-bottom: var(--s3); text-transform: uppercase; overflow-wrap: anywhere; }
.sect { border-top: 2px solid var(--ink); padding-top: var(--s3); margin-top: var(--s6); }
.sect > .hd { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); margin-bottom: var(--s4); }
.sect > .hd h2, .sect > .hd h3 { font: 600 1.25rem/1.625rem var(--head); }
.sect > .hd .t-label { white-space: nowrap; }
.page > .sect:first-of-type { margin-top: var(--s5); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 44rem; gap: 0 var(--s7); align-items: start; margin-top: 0; }
.cols:has(.col-a > :not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: none; }
.cols > div > .sect { margin-top: var(--s5); }
.foot { margin-top: var(--s6); border-top: 1px solid var(--rule); padding-top: var(--s3); color: var(--muted); font-size: .875rem; }

/* ============ BUTTONS ============ */
.btn, button { min-height: 44px; }
.btn, button.btn, .page button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); padding: 0 var(--s4); border: 1px solid var(--ink); border-radius: 2px;
  background: var(--ink); color: var(--paper); font: 700 .9375rem/1 var(--body); cursor: pointer; text-decoration: none; margin: var(--s1) 0;
}
.btn.sec, .page button.secondary, .page button.sec { background: var(--surface); color: var(--ink); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; padding: 0 var(--s2); }
.btn.stop, .page button.danger { border-color: var(--fail); color: var(--fail); background: var(--surface); }
.btn[disabled], .page button:disabled { border-color: var(--edge); color: var(--muted); background: transparent; cursor: not-allowed; }
.btn.block, .page button.block { display: flex; width: 100%; }
.btn.sm { min-height: 36px; padding: 0 var(--s3); font-size: .8125rem; }
.btns { display: flex; gap: var(--s3); flex-wrap: wrap; }
.btns.stack { display: grid; gap: var(--s2); }

/* ============ STATUS CHIPS: shape + word, never colour alone ============ */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: 1px solid currentColor; border-radius: 2px; font: 700 .75rem/1.25rem var(--mono); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.chip svg { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: square; }
.chip.open { color: var(--ink); background: var(--surface); }
.chip.open:before { content: ""; width: 8px; height: 8px; background: var(--ink); }
.chip.closed { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.chip.refunded { color: var(--ink); border-style: dashed; background: transparent; }
.chip.pass { color: var(--pass); background: var(--pass-bg); }
.chip.fail { color: var(--fail); background: var(--fail-bg); }
.chip.nc { color: var(--nc); background: var(--nc-bg); border-style: dashed; }
.chip.warn { color: var(--warn); background: var(--warn-bg); }

/* result marker: the same three drawn shapes, on its own (used where a chip is too wide) */
.mk { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 2px; flex: none; }
.mk svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: square; }
.mk.pass { color: var(--pass); background: var(--pass-bg); }
.mk.fail { color: var(--fail); background: var(--fail-bg); }
.mk.nc { color: var(--nc); background: var(--nc-bg); border-style: dashed; }

/* ============ AMOUNTS: integer + 4 decimals, a gap, 4 more; trailing zeros dimmed, never dropped ============ */
.amt { font-family: var(--mono); font-weight: 500; white-space: nowrap; }
.amt .g { margin-left: .22em; }
.amt .z { color: var(--muted); font-weight: 400; }
.amt .u { font: 700 .7em var(--body); letter-spacing: .04em; color: var(--muted); white-space: pre; }

/* ============ HASH / ADDRESS: short form, expand to 8-character groups, copy the raw string ============ */
.hash { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s2); font-family: var(--mono); font-size: .875rem; line-height: 1.25rem; max-width: 100%; }
.hash .h-s { background: var(--surface); border: 1px solid var(--rule); padding: 0 6px; border-radius: 2px; word-break: keep-all; }
.hash .h-f { display: grid; grid-template-columns: repeat(4, auto); gap: 2px 10px; justify-content: start; background: var(--surface); border: 1px solid var(--edge); padding: var(--s2) var(--s3); flex-basis: 100%; order: 3; width: 100%; }
.hash .h-f span { white-space: nowrap; }
.hash.addr .h-f { grid-template-columns: repeat(3, auto); }
.hash .h-b { font: 500 .75rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; border: 0; background: none; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 2px; min-height: 28px; margin: 0; display: inline; }
.hash.block { display: flex; }

/* ============ NOTICES: what, detail, what to do ============ */
.notice { border: 1px solid var(--edge); border-left-width: 4px; background: var(--surface); color: var(--ink); padding: var(--s3) var(--s4); margin: var(--s3) 0; font-size: .9375rem; line-height: 1.5rem; }
.notice .k { font: 700 .75rem/1rem var(--mono); letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--s1); }
.notice h3 { font: 700 1rem/1.5rem var(--body); margin-bottom: var(--s1); }
.notice p + p { margin-top: var(--s2); }
.notice p { overflow-wrap: anywhere; }
.notice .do { margin-top: var(--s3); display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.notice.bad, .notice.fail { border-color: var(--fail); background: var(--fail-bg); }
.notice.bad .k, .notice.fail .k { color: var(--fail); }
.notice.warn { border-color: var(--warn); background: var(--warn-bg); }
.notice.warn .k { color: var(--warn); }
.notice.info, .notice.good { border-color: var(--link); }
.notice.info .k, .notice.good .k { color: var(--link); }
.notices { display: grid; gap: var(--s3); }
.notices .notice, #banners .notice { margin: 0; }
#banners { display: grid; gap: var(--s3); margin-top: var(--s4); }
#banners:empty { display: none; }
.error { border: 1px solid var(--fail); border-left-width: 4px; background: var(--fail-bg); padding: var(--s3) var(--s4); margin: var(--s3) 0; font-size: .9375rem; }

/* ============ CHECK ROWS: native details, so keyboard and screen readers work ============ */
.checks { border-top: 1px solid var(--ink); }
.chk { border-bottom: 1px solid var(--rule); border-left: 4px solid var(--edge); background: transparent; }
.chk.pass { border-left-color: var(--pass); }
.chk.fail { border-left-color: var(--fail); background: var(--fail-bg); }
.chk.nc { border-left-color: var(--edge); background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(100,95,83,.07) 6px 7px); }
.chk > summary, .chk > .row { display: grid; grid-template-columns: minmax(44px, max-content) minmax(0, 1fr) auto 16px; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4) var(--s3) var(--s3); cursor: pointer; list-style: none; min-height: 56px; }
.chk > .row { cursor: default; grid-template-columns: minmax(44px, max-content) minmax(0, 1fr) auto; }
.chk > summary::-webkit-details-marker { display: none; }
.chk > summary:after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) translate(-2px, -2px); justify-self: end; }
.chk[open] > summary:after { transform: rotate(-135deg) translate(-2px, -2px); }
.chk .id { font: 700 .875rem var(--mono); overflow-wrap: anywhere; }
.chk .nm { font-weight: 700; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.chk .nm small { display: block; font-weight: 400; font-size: .875rem; color: var(--ink2); margin-top: 2px; }
.chk .body { padding: 0 var(--s4) var(--s4) var(--s3); font-size: .9375rem; color: var(--ink); overflow-wrap: anywhere; }
.chk .body p + p { margin-top: var(--s2); }
.chk.stack > .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id chip" "nm nm"; row-gap: var(--s1); }
.chk.stack > .row > .id { grid-area: id; }
.chk.stack > .row > .nm { grid-area: nm; }
.chk.stack > .row > .chip { grid-area: chip; }
.kv { display: grid; grid-template-columns: minmax(96px, max-content) 1fr; gap: 0 var(--s4); font-size: .875rem; border-top: 1px solid var(--rule); }
.kv dt { color: var(--ink2); padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
.kv dd { padding: var(--s2) 0; border-bottom: 1px solid var(--rule); font-family: var(--mono); min-width: 0; overflow-wrap: anywhere; font-weight: 400; }
.kv.pl dd { font-family: var(--body); }
.kv dd.b { font-weight: 700; }

/* Checked / Not checked strip: the reason a check did not run stays as text */
.cn { display: grid; grid-template-columns: 110px 1fr; gap: var(--s2) var(--s4); font-size: .9375rem; margin-top: var(--s4); }
.cn dt { font: 700 .75rem/1.5rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.cn dt.p { color: var(--pass); } .cn dt.x { color: var(--nc); } .cn dt.f { color: var(--fail); }
.cn dd { font-family: var(--mono); font-size: .875rem; line-height: 1.5rem; }
.cn dd span { font-family: var(--body); color: var(--ink2); }
.strip { display: grid; grid-template-columns: repeat(3, 1fr) auto; border: 1px solid var(--ink); background: var(--surface); }
.strip > div { padding: var(--s3) var(--s4); border-right: 1px solid var(--ink); }
.strip > div:last-child { border-right: 0; display: flex; align-items: center; }
.strip .v { font: 500 2.5rem/2.75rem var(--mono); }
.strip .l { font: 700 .75rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.strip .p .l { color: var(--pass); } .strip .f .l { color: var(--fail); } .strip .x .l { color: var(--nc); }

/* progress rows: the same ruled rows as checks, but they only report where things stand */
.progress { border-top: 1px solid var(--ink); }
.progress li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s3) var(--s3); border-bottom: 1px solid var(--rule); border-left: 4px solid var(--edge); min-height: 52px; }
.progress li .dot { display: none; }
.progress li.done { border-left-color: var(--pass); }
.progress li .what { font-weight: 700; }
.progress li .state { color: var(--ink2); font-size: .875rem; text-align: right; }
.progress li.bad { border-left-color: var(--fail); }
.progress li.bad .state { color: var(--fail); font-weight: 700; }
.progress li.done .state { color: var(--pass); font-weight: 700; }

/* ============ TOOLTIP: hover, focus and tap; never the only place a reason is written ============ */
.cid { position: relative; display: inline-block; cursor: help; border-bottom: 1px dotted var(--ink2); font-family: var(--mono); font-weight: 700; font-size: .875rem; }
.cid:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.cid .tip { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: max-content; max-width: min(280px, 80vw); padding: var(--s2) var(--s3); background: var(--ink); color: var(--paper); font: 400 .8125rem/1.25rem var(--body); border-radius: 2px; text-align: left; white-space: normal; letter-spacing: 0; text-transform: none; }
.cid .tip b { display: block; font-weight: 700; }
.cid:hover .tip, .cid:focus .tip, .cid.open .tip { display: block; }
.cid .tip.right { left: auto; right: 0; }

/* ============ LEDGER TABLE ============ */
.ledger { width: 100%; border-collapse: collapse; font-size: .875rem; }
.ledger th { font: 500 .75rem/1rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.ledger th.r, .ledger td.r { text-align: right; }
.ledger td { padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: 1px solid var(--rule); vertical-align: middle; font-family: var(--mono); }
.ledger td.n { color: var(--muted); }
.ledger tr.pend td { color: var(--ink2); }
.ledger tr:hover td { background: var(--surface); }
.ledger td:last-child, .ledger th:last-child { padding-right: 0; }
.lrow { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: .875rem; }
.lrow .a { text-align: right; }

/* ============ METER ============ */
.meter { height: 14px; border: 1px solid var(--ink); background: var(--surface); position: relative; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.meter b { position: absolute; top: -1px; bottom: -1px; width: 0; border-left: 2px dashed var(--fail); }
.ticks { display: flex; justify-content: space-between; font: 500 .75rem var(--mono); color: var(--muted); margin-top: var(--s1); }

/* ============ QR FRAME: viewfinder corners, white quiet zone, black modules ============ */
.qr { width: fit-content; max-width: 100%; margin: 0 auto; position: relative; padding: var(--s4); }
.qr .code { width: min(100%, 360px); min-width: min(100%, 300px); background: #fff; padding: 12px; border: 1px solid var(--ink); margin: 0 auto; }
.qr .code svg { display: block; width: 100%; height: auto; shape-rendering: crispEdges; }
.qr:before, .qr:after, .qr .c1, .qr .c2 { content: ""; position: absolute; width: 20px; height: 20px; border: 3px solid var(--ink); }
.qr:before { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.qr:after { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.qr .c1 { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.qr .c2 { right: 0; bottom: 0; border-left: 0; border-top: 0; }

/* ============ FORMS ============ */
.field, label { display: block; }
.field { margin-bottom: var(--s4); }
label, .field > span { font-weight: 700; font-size: .9375rem; margin: var(--s3) 0 var(--s1); }
.field small, .hint { display: block; color: var(--ink2); font-size: .875rem; margin: var(--s1) 0 var(--s3); }
input, textarea, .inp { width: 100%; min-height: 44px; border: 1px solid var(--edge); border-radius: 2px; background: var(--surface); padding: var(--s2) var(--s3); font: 500 1rem var(--mono); color: var(--ink); }
textarea { resize: vertical; font-size: .9375rem; }
input[type=file] { font: 400 .875rem var(--body); padding: var(--s2); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--ink); }
.seg button { min-height: 44px; border: 0; border-right: 1px solid var(--edge); background: var(--surface); color: var(--ink); font: 500 .9375rem var(--mono); cursor: pointer; margin: 0; }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.fee { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; font-size: .875rem; color: var(--ink2); margin-top: var(--s2); }
details.plain { margin: var(--s3) 0; }
details.plain > summary { cursor: pointer; color: var(--link); text-decoration: underline; text-underline-offset: 3px; min-height: 32px; display: flex; align-items: center; }
.copybox { background: var(--surface); border: 1px solid var(--edge); border-radius: 2px; padding: var(--s2) var(--s3); margin: var(--s1) 0 var(--s2); white-space: pre-wrap; overflow-wrap: anywhere; font: .8125rem/1.4 var(--mono); max-height: 9rem; overflow: auto; }

/* numbered ledger-style list */
.steps { counter-reset: s; border-top: 1px solid var(--ink); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.steps li:before { content: counter(s, decimal-leading-zero); font: 500 .875rem var(--mono); color: var(--muted); padding-top: 2px; }
.steps li > div { min-width: 0; }
.steps b, .steps strong { font-weight: 700; }

/* ============ CAPABILITY ROWS, STATS, BADGE (later stages use these) ============ */
.cap { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.cap td { padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.cap td:first-child { font-weight: 700; width: 30%; }
.cap td:last-child { color: var(--ink2); padding-right: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); background: var(--surface); }
.stats > div { padding: var(--s3) var(--s4); border-right: 1px solid var(--rule); }
.stats > div:last-child { border-right: 0; }
.stats .v { font: 500 1.375rem/1.75rem var(--mono); }

/* ============ RESPONSIVE ============ */
@media (max-width: 899px) { .cols { gap: 0; } }
@media (max-width: 639px) {
  .cols, .cols:has(.col-a > :not([hidden])) { grid-template-columns: minmax(0, 1fr); max-width: none; }
  .bar { padding: var(--s3) var(--s4); }
  .page { padding: var(--s5) var(--s4) var(--s6); }
  .t-h1 { font-size: 2rem; line-height: 2.25rem; }
  .sect { margin-top: var(--s5); }
  .hash .h-f { grid-template-columns: repeat(2, auto); }
  .chk > summary { grid-template-columns: minmax(36px, max-content) minmax(0, 1fr) auto; gap: var(--s2); padding: var(--s3) var(--s3) var(--s3) var(--s2); }
  .chk > summary:after { display: none; }
  .chk > .row { gap: var(--s2); padding: var(--s3) var(--s3) var(--s3) var(--s2); }
  .chk .body { padding-left: var(--s3); padding-right: var(--s3); }
  .nav { gap: var(--s3); }
  .strip { grid-template-columns: repeat(3, 1fr); } .strip > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--ink); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cn { grid-template-columns: 1fr; gap: 0; } .cn dd { margin-bottom: var(--s2); }
  .kv { grid-template-columns: 1fr; } .kv dt { border-bottom: 0; padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .bar .nav { display: none; } }
.sprite { position: absolute; width: 0; height: 0; }

/* status badge: the word is always shown; colour and the blink only add to it */
.sbadge { display: inline-flex; align-items: center; gap: 7px; padding: 2px 10px; border: 1px solid currentColor; border-radius: 2px; font: 700 .8125rem/1.375rem var(--mono); letter-spacing: .06em; white-space: nowrap; margin-right: var(--s2); }
.sbadge:last-child { margin-right: 0; }
.sbadge .sdot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.sbadge.open { color: var(--pass); background: var(--pass-bg); }
.sbadge.closed { color: var(--fail); background: var(--fail-bg); }
.sbadge.succeeded { color: var(--pass); background: var(--pass-bg); }
.sbadge.failed { color: var(--fail); background: var(--surface); border-style: dashed; }
.sbadge.refunding, .sbadge.ended { color: var(--warn); background: var(--warn-bg); }
.sbadge.unknown { color: var(--nc); background: var(--nc-bg); border-style: dashed; }
@media (prefers-reduced-motion: no-preference) {
  .sbadge.open .sdot { animation: sblink 1.6s ease-in-out infinite; }
}
@keyframes sblink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* the campaign's own name at the top right can be long: one line, cut with an ellipsis (the full id is in the tooltip) */
.bar #campaign-id { max-width: 55vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A caution as one plain line, in the calm grey of the dashboard's real-network banner (no box, no red). */
.warnline { color: #44444A; font-weight: 600; margin: var(--s3) 0; overflow-wrap: anywhere; }

/* The network bar (ui.js setNetwork): neutral grey until the rules name the network; then clearly different for the test network (amber, dashed) and the
   real network (dark, solid). Words, not colour alone, say which is which. */
.netbar { padding: var(--s2) var(--s5); font: 500 .8125rem/1.25rem var(--mono); letter-spacing: .04em; text-align: center; border-bottom: 1px solid var(--rule); }
.netbar b { font-weight: 700; letter-spacing: .08em; }
.netbar.checking { background: #E6E6E8; color: #44444A; }
.netbar.test { background: #F4E9CF; color: #4A3205; border-bottom: 3px dashed #76500A; }
.netbar.main { background: #2B2B2F; color: #F3F0E8; border-bottom: 3px solid #808084; }
.netbar.unknown { background: #E6E6E8; color: #1C1B18; border-bottom: 3px dotted #44444A; }
html[data-net="test"] .bar { border-bottom-style: dashed; }
html[data-net="main"] .bar { border-bottom-width: 3px; }
.recount-btn { min-height: 48px; padding-left: var(--s4); padding-right: var(--s4); }
