/* Countia verifier — one centred column, two views, light and dark.
 *
 * System fonts only: no third-party font load, no CDN, no tracking. The page
 * fetches nothing but the blockchain node the badge view is configured with.
 *
 * Red is the badge's own: COUNTIA_RED, `#8E0403` in `src/badge/mod.rs`, so the
 * page and the card it draws are the same red rather than two of them.
 */

/* Light is the default for everyone, whatever the device says (owner,
 * 2026-11-13). The dark theme is the reader's choice, made with the switch in
 * the bar (`nav.js` sets `data-theme`), and it is a SCREEN theme: a printed or
 * downloaded result is always light. */
:root {
  color-scheme: light;

  --red:        #8E0403;
  --red-strong: #6E0302;
  --red-tint:   #fdeceb;
  /* Red as text: links, the ID pill, "Show all". */
  --red-text:   #8E0403;

  --bg:         #ffffff;
  --bg-sunk:    #f4f3f1;
  --ink:        #17181a;
  --ink-dim:    #5c6066;
  --line:       #e2e0dc;
  --line-soft:  #eceded;

  --ok:         #0f6b37;
  --ok-tint:    #e8f4ec;
  --warn:       #8a4b00;
  --warn-tint:  #fdf1e3;

  --card:       #ffffff;
  --sunk:       #f4f3f1;
  --bubble:     #efedea;
  --mute:       #ececed;
  --line2:      #b7b4ae;
  --ink2:       #494c51;
  --ink3:       #63666c;
  --okbg:       #e6f4eb;
  --warnbg:     #fbefdb;
  --bad:        #c8281e;
  --on-bad:     #ffffff;
  --radius:     12px;
  --radius-sm:  8px;
  --col:        560px;
  --tap:        44px;
  --shadow:     0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.05);

  /* The verdict band (green), its pills. */
  --band-ok-bg:    #e8f4ec;
  --band-ok-line:  #b9dcc6;
  --band-ok-title: #0f6b37;
  --band-ok-ink:   #1f5a38;
  --pill-ok-bg:    #ffffff;
  --pill-ok-line:  #9ccbb0;
  --pill-ok-ink:   #14482c;
  --band-warn-line: #ecd2a9;
  --band-mute-line: #d8d6d2;
  /* The scene: a proven card, the dashed shapes, the dark head. */
  --proven-line:  #0f6b37;
  --proven-width: 1.5px;
  --proven-bg:    #f6fbf8;
  --cert:         #0f6b37;
  --seq-n-bg:     #0f6b37;
  --seq-n-ink:    #ffffff;
  --ghost-line:   #b7b4ae;
  --ghost-a:      #f4f3f1;
  --ghost-b:      #ffffff;
  --head-bg:      #17181a;
  --head-ink:     #ffffff;
  --head-dim:     #c9ccd1;
  --head-red:     #F2807D;
  --head-line:    #17181a;
  --sealed-bar:   #dcd9d4;
  --scene-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.05);
  /* A person tile. */
  --avatar-bg:    #8E0403;
  --avatar-ink:   #ffffff;
  --avatar-line:  #8E0403;
  --id-line:      #8E0403;
  --id-ink:       #8E0403;
  /* The column's two buttons. */
  --btn-ink-bg:   #17181a;
  --btn-ink-line: #17181a;
  --btn-ink-text: #ffffff;
  --btn-red-line: #8E0403;
  --btn-red-text: #8E0403;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* The dark theme, on the reader's word only (the switch), and on screen only. */
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --red:        #E8524E;
    --red-strong: #F2807D;
    --red-tint:   #2a1413;
    --red-text:   #F2807D;
    --bg:         #0f1011;
    --bg-sunk:    #17191b;
    --ink:        #edeef0;
    --ink-dim:    #a2a7ad;
    --line:       #2c2d31;
    --line-soft:  #232628;
    --ok:         #57c98a;
    --ok-tint:    #12251a;
    --warn:       #e0a35f;
    --warn-tint:  #2a1f12;
    --shadow:     0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.45);
    --card:       #17181a;
    --sunk:       #0b0b0c;
    --bubble:     #26272b;
    --mute:       #232427;
    --line2:      #4d4e54;
    --ink2:       #b9bcc1;
    --ink3:       #9a9da3;
    --okbg:       #11241a;
    --warnbg:     #2b1f0f;
    --bad:        #c8281e;
    --on-bad:     #ffffff;

    --band-ok-bg:    #11241a;
    --band-ok-line:  #1f4a33;
    --band-ok-title: #57c98a;
    --band-ok-ink:   #a9dcc0;
    --pill-ok-bg:    #0d1c14;
    --pill-ok-line:  #2b6a49;
    --pill-ok-ink:   #d7f2e3;
    --band-warn-line: #4a3517;
    --band-mute-line: #3a3b40;
    --proven-line:  #2b6a49;
    --proven-width: 1px;
    --proven-bg:    #121a16;
    --cert:         #7fd8a6;
    --seq-n-bg:     #57c98a;
    --seq-n-ink:    #0b1a12;
    --ghost-line:   #4d4e54;
    --ghost-a:      #1d1e21;
    --ghost-b:      #17181a;
    --head-bg:      #1b1c1f;
    --head-ink:     #edeef0;
    --head-dim:     #a2a7ad;
    --head-red:     #F2807D;
    --head-line:    #2c2d31;
    --sealed-bar:   #3a3b40;
    --scene-shadow: none;
    --avatar-bg:    #2a1413;
    --avatar-ink:   #F2807D;
    --avatar-line:  #6b2a28;
    --id-line:      #6b2a28;
    --id-ink:       #F2807D;
    --btn-ink-bg:   #17181a;
    --btn-ink-line: #2c2d31;
    --btn-ink-text: #edeef0;
    --btn-red-line: #2c2d31;
    --btn-red-text: #edeef0;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* One visible focus ring for everything, in one rule. The button rules below
 * remove the browser's default outline on :hover/:focus, which is how a page
 * becomes unusable from a keyboard without anybody noticing. */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}

code {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--bg-sunk);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ── The bar ─────────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  /* No `backdrop-filter` here, deliberately: a translucent sticky bar composites
     wrong in headless Chrome — it painted itself a hundred pixels down the page
     and left a blank strip above, which is what the first screenshot pass
     caught. A bar nobody can read is not worth a blur. */
  position: sticky;
  top: 0;
  z-index: 10;
}
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  color: var(--ink);
}
.lockup:hover { text-decoration: none; }
/* The badge's own lockup, drawn rather than set in type, so the bar and the
   card in the middle of the page carry the same mark. `currentColor`
   throughout the art, so one colour here does both themes: Countia red on
   white, the light red the dark palette uses on near-black. */
.lockup-art {
  display: block;
  height: 24px;
  width: auto;
  color: var(--red);
}

/* Two items, one row, no hamburger — there is nothing here to collapse. */
.views {
  display: flex;
  align-items: center;
  gap: 4px;
}
.views a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-dim);
  font-size: 15px;
  font-weight: 550;
}
.views a:hover {
  color: var(--ink);
  background: var(--bg-sunk);
  text-decoration: none;
}
.views a[aria-current="page"] {
  color: var(--red);
  background: var(--red-tint);
}

/* ── The column ──────────────────────────────────────────────────────── */

main {
  max-width: 1112px;
  margin: 0 auto;
  padding: 24px 16px 72px;
}
.view[hidden] { display: none; }

h1 {
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 8px 0 8px;
}
.lede {
  color: var(--ink-dim);
  margin: 0 0 22px;
}
.lede strong { color: var(--ink); font-weight: 600; }
.dim { color: var(--ink-dim); }
.small { font-size: .9rem; }

/* ── Inputs, buttons, disclosures ────────────────────────────────────── */

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 14px 0 6px;
}
input[type="text"], input[type="url"], textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  /* 16px, deliberately: anything smaller and iOS Safari zooms the page in on
     focus, which on the badge view means the card scrolls out of frame. */
  font: 16px/1.4 var(--font);
}
textarea { font-family: var(--mono); font-size: 13px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-dim); opacity: .7; }

button.primary {
  appearance: none;
  min-height: var(--tap);
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: #fff;
  font: 600 15px var(--font);
  cursor: pointer;
}
button.primary:hover { background: var(--red-strong); }
button.primary:disabled { background: var(--ink-dim); cursor: not-allowed; }
:root[data-theme="dark"] button.primary,
button.primary { color: #fff; }

button.link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: var(--red);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.lookup { margin-bottom: 4px; }
.lookup label { margin-top: 0; }
.lookup-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.lookup-row input { flex: 1 1 auto; }
.lookup-row button { flex: 0 0 auto; }

.advanced {
  margin: 20px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-sunk);
}
.advanced > summary {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  padding: 0 14px;
  cursor: pointer;
  color: var(--ink);
  font-size: 15px;
  font-weight: 550;
  border-radius: var(--radius);
}
.advanced > summary:hover { color: var(--red); }
.advanced[open] > summary { border-bottom: 1px solid var(--line-soft); }
.advanced > :not(summary) { margin-left: 14px; margin-right: 14px; }
.advanced > :last-child { margin-bottom: 14px; }
.advanced > p:first-of-type { margin-top: 12px; }
.advanced button.primary { margin-top: 12px; }

/* ── The drop zone (proof) ───────────────────────────────────────────── */

.dropzone {
  border: 1.5px dashed color-mix(in srgb, var(--red) 55%, var(--line));
  border-radius: var(--radius);
  background: var(--bg-sunk);
  text-align: center;
  padding: 32px 16px;
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragging { background: var(--red-tint); border-color: var(--red); }
.dropzone p { margin: 4px 0; }
.dropzone .dim { font-size: 14px; }

/* ── Notices: a verdict, a refusal, a warning ────────────────────────── */
/*
 * Calm, full width, one panel: a tinted ground, an accent rule down the side
 * and ordinary body text. A refusal is something to read, not a red wall to
 * flinch at, and the words themselves already say which it is.
 */
.result {
  display: block;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-dim);
  border-radius: var(--radius-sm);
  background: var(--bg-sunk);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.result.ok   { border-color: var(--line); border-left-color: var(--ok);  background: var(--ok-tint); }
.result.warn { border-color: var(--line); border-left-color: var(--warn); background: var(--warn-tint); }
.result.fail { border-color: var(--line); border-left-color: var(--red);  background: var(--red-tint); }
/* "Cannot check": a damaged, unknown or other-release proof. Never the red of a forgery. */
.result.neutral { border-color: var(--line); border-left-color: var(--ink-dim); }
.result.dim  { color: var(--ink-dim); }

/* A title first, in the page's own voice and in one line where it can be. The
   sentence under it is ordinary prose; the table under THAT is the two values
   that disagree, which is the one thing a sentence cannot carry on a phone. */
.result-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.result-body {
  margin: 6px 0 0;
  color: var(--ink-dim);
}
.result.fail .result-title { color: var(--red); }
.result.warn .result-title { color: var(--warn); }
.result-title:only-child { margin-bottom: 0; }

/* "You asked for" beside "This badge says". Addresses are shown middle-
   truncated with the whole value on the cell's `title`, so 42 characters stop
   wrapping mid-word down a 360px screen. */
table.compare {
  margin: 12px 0 0;
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
}
table.compare th,
table.compare td {
  text-align: left;
  padding: 6px 8px 6px 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  vertical-align: top;
  font-weight: 400;
}
table.compare tr:first-child th {
  border-top: 0;
  padding-top: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
table.compare th.compare-label {
  color: var(--ink-dim);
  padding-right: 10px;
  width: 30%;
}
table.compare td {
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-word;
}
/* The rows that disagree are the reason the table is here. */
table.compare tr.differs td:last-child {
  font-weight: 650;
  color: var(--red);
}
table.compare tr.differs th.compare-label { color: var(--ink); }
/* `.result { display: block }` outranks the UA stylesheet's
   `[hidden] { display: none }`, so `result.hidden = true` did nothing and the
   page showed an empty box on first load. Fixed for the class. */
.result[hidden] { display: none; }

/* ── Content blocks ──────────────────────────────────────────────────── */

.block { margin: 34px 0 0; }
.block h2 {
  font-size: 17px;
  letter-spacing: -.01em;
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--red);
}
.block p, .block ul { margin: 0 0 10px; color: var(--ink-dim); }
.block strong, .block em { color: var(--ink); }
.block ul { padding-left: 20px; }
.block li { margin: 8px 0; }
.block.trust {
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.block.trust h2 { border-left: 0; padding-left: 0; color: var(--red); }

footer {
  border-top: 1px solid var(--line);
  padding: 18px 16px 28px;
  color: var(--ink-dim);
  font-size: 13px;
  text-align: center;
}

/* ── The badge, as the hero ──────────────────────────────────────────── */
/*
 * The PICTURE's box is reserved at the card's own proportions (`.badge-frame`
 * below), so a card that is arriving does not shove the page around as it
 * decodes. The EMPTY seat is a short labelled strip rather than a 470px void:
 * a dashed rectangle the size of a card, on a phone, is the whole first
 * screen spent on nothing, and it reads as a picture that failed to load —
 * which on a page whose job is to show one is the worst thing it could be
 * mistaken for. `:has()` retires the strip the moment there is a card.
 */
.badge-stage {
  display: grid;
  justify-items: center;
  margin: 20px 0 24px;
}
.badge-stage::before {
  content: "The badge appears here";
  display: grid;
  place-content: center;
  grid-area: 1 / 1;
  width: min(420px, 100%);
  padding: 26px 16px;
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
  /* Visible enough to read as a seat rather than as a void: on a dark ground
     a hairline in --line disappears. */
  border: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}
.badge-stage:has(figure:not([hidden]))::before { display: none; }
.badge-stage > figure {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  margin: 0;
  width: min(420px, 100%);
}
#badge-figure[hidden] { display: none; }

.badge-frame {
  order: 1;
  position: relative;
  line-height: 0;
  width: 100%;
  aspect-ratio: 420 / 600;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.badge-frame img {
  display: block;
  width: 100%;
  height: auto;
}
/* The QR layer: same viewBox, same box, so it scales with the card on a narrow
   screen instead of drifting off its plate. */
.badge-frame .badge-qr {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Who answered. In READING order it is always before the card — a caveat
 * after a badge is a caveat read after the badge was believed — and the quiet
 * version, where the node is the one this page is configured to ask, is
 * SEATED under the card, because there is nothing there to interrupt for. */
.badge-provenance {
  order: 0;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  border-left-width: 3px;
  font-size: 14px;
  line-height: 1.45;
}
.badge-provenance:empty { display: none; }
.badge-provenance.trusted {
  order: 2;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  color: var(--ink-dim);
  font-size: 13px;
}
.badge-provenance.untrusted {
  border-color: var(--line);
  border-left-color: var(--warn);
  background: var(--warn-tint);
  color: var(--ink);
}

.caption {
  order: 3;
  margin: 10px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.5;
}
/* The name the document gives, said first, and on an unvouched-for node said
   as that node's claim ("That node says: …"). */
.caption-lead {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.badge-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 14px;
  margin: 8px 0 0;
}
.badge-facts dt {
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.badge-facts dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-word;
}
.caption-note {
  margin: 8px 0 0;
  font-size: 12px;
}

/* ── Narrow ──────────────────────────────────────────────────────────── */

@media (max-width: 420px) {
  h1 { font-size: 23px; }
  .views a { padding: 0 10px; }
  .lockup-art { height: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ══ The proof view, as designed (verifier design build, PR b) ═══════════ */
/*
 * Every style the design wrote inline lives here as a class: the site serves
 * `style-src 'self'`, so a `style=` attribute is refused. Widths that change
 * at runtime are classes too (`.bar-fill.p0`…`.p3`), never a style string.
 * No `light-dark()` and no container units: the tokens above switch on
 * `data-theme` (the switch in the bar), and the layout on media queries, so
 * Safari 16 and Firefox ESR draw what the others draw. No `:has()` either:
 * Firefox ESR 115 has none, so a state the CSS needs is a class `app.js` sets.
 */

.view[data-view="badge"] { max-width: var(--col); margin: 0 auto; }
.screen[hidden], .note-card[hidden], .claim-slot[hidden], .details-card[hidden],
.result-actions[hidden], .check-more[hidden], .hint[hidden], .note[hidden] { display: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ico { display: inline-block; flex: none; vertical-align: middle; }
.ico-16 { width: 16px; height: 16px; }
.ico-18 { width: 18px; height: 18px; }
.ico-20 { width: 20px; height: 20px; }
.ico-22 { width: 22px; height: 22px; }
.ico-26 { width: 26px; height: 26px; }
.ico-30 { width: 30px; height: 30px; }
.ico-32 { width: 32px; height: 32px; }
.dim-ico { color: var(--ink3); }
.mono { font-family: var(--mono); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── The landing / checking panel ── */
.panel {
  max-width: 560px;
  margin: 8px auto 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head { padding: 28px 16px 22px; text-align: center; }
@media (min-width: 600px) { .panel-head { padding: 40px 40px 24px; } }
.hero {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.hero-ring {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1.5px solid var(--red);
  color: var(--red);
}
.panel h1, .panel .h1 {
  margin: 18px 0 6px;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.025em;
  font-weight: 700;
}
@media (min-width: 600px) { .panel h1, .panel .h1 { font-size: 36px; } }
.panel .h1:focus, .banner-title:focus, h1:focus { outline: none; }
.panel .lede { margin: 0; color: var(--ink2); min-height: 1.5em; }
.note {
  display: flex;
  gap: 10px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--mute);
  font-size: 15px;
  line-height: 1.4;
  text-align: start;
}
.panel .dropzone {
  margin-top: 22px;
  padding: 24px 16px 18px;
  border: 1.5px dashed var(--line2);
  border-radius: 18px;
  background: var(--sunk);
}
.panel .dropzone:hover, .panel .dropzone.dragging { border-color: var(--red); background: var(--sunk); }
.drop-line { margin: 6px 0 0; font-weight: 600; }
.drop-line .mono { font-size: 15px; }
#choosebtn { margin-top: 14px; }
.paste { margin-top: 4px; text-align: start; }
.paste > summary, .advanced.wide > summary, .details-card > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  cursor: pointer;
  color: var(--ink2);
  font-weight: 600;
  font-size: 15px;
}
.paste > summary::-webkit-details-marker, .advanced.wide > summary::-webkit-details-marker,
.details-card > summary::-webkit-details-marker { display: none; }
.chev { transition: transform .2s; }
details[open] > summary .chev, [aria-expanded="true"] > .chev { transform: rotate(180deg); }
.paste textarea { margin-top: 4px; }
.hint { margin: 8px 0 0; font-size: 14px; color: var(--warn); }
button.secondary, a.secondary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 18px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: 600 15px var(--font);
  cursor: pointer;
  text-decoration: none;
}
button.secondary:hover, a.secondary:hover { border-color: var(--ink2); text-decoration: none; }
.paste #verifybtn { margin-top: 10px; width: 100%; }

.about {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  max-width: 880px;
  margin: 44px auto 0;
}
.about-col { flex: 1 1 300px; min-width: 0; }
.about-col h2 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.about-col p { margin: 0; font-size: 15px; color: var(--ink2); }
.advanced.wide {
  max-width: 880px;
  margin: 32px auto 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
}
.advanced.wide > summary { justify-content: flex-start; padding: 0; }
.advanced.wide > :not(summary) { margin-left: 0; margin-right: 0; }
.advanced.wide label { text-transform: none; letter-spacing: 0; font-size: 13px; }

/* ── Checking ── */
.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sunk);
  text-align: start;
}
.file-chip-text { min-width: 0; }
.file-chip .mono { font-size: 14px; font-weight: 500; }
.bar { margin: 16px 0 6px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--red); transition: width .7s ease; }
.bar-fill.p0 { width: 18%; }
.bar-fill.p1 { width: 52%; }
.bar-fill.p2 { width: 86%; }
.bar-fill.p3 { width: 100%; }
.steps {
  display: flex;
  align-items: flex-start;
  margin: 0;
  padding: 18px 8px 20px;
  list-style: none;
  border-top: 1px solid var(--line);
}
.step {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.step-line {
  position: absolute;
  top: 21px;
  right: calc(50% + 26px);
  left: calc(-50% + 26px);
  height: 1.5px;
  background: var(--line);
}
.step-done .step-line, .step-active .step-line { background: var(--ink); }
.step-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line2);
  color: var(--ink3);
  background: transparent;
  transition: background .4s, border-color .4s, color .4s;
}
.step-active .step-dot { border-color: var(--red); color: var(--red); }
.step-done .step-dot { border-color: var(--ink); background: var(--ink); color: var(--card); }
.step-final.step-done .step-dot { border-color: var(--ok); background: var(--ok); }
.step-label { font-size: 13px; font-weight: 600; text-align: center; color: var(--ink3); }
.step-done .step-label, .step-active .step-label { color: var(--ink); }
.pulse { display: none; }
.hero-busy .pulse, .step-active .pulse {
  display: block;
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  border: 1.5px solid var(--red);
  pointer-events: none;
  animation: cv-pulse 1.4s ease-out infinite;
}
.hero-busy .pulse { inset: 12px; }
@keyframes cv-pulse {
  0% { transform: scale(1); opacity: .6; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse, .hero-busy .pulse, .step-active .pulse { animation: none; display: none; }
  .bar-fill, .step-dot, .chev { transition: none; }
}


/* ── The bar's right end: the two routes and the theme switch ── */
.topbar-end { display: flex; align-items: center; gap: 4px; }
.theme-btn {
  appearance: none;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink-dim);
  cursor: pointer;
}
.theme-btn:hover { color: var(--ink); background: var(--bg-sunk); }
.theme-btn[aria-pressed="true"] { color: var(--red-text); background: var(--red-tint); }

/* ══ The result: a verdict band, then the claim as a chat scene ══════════ */
/* (Owner-approved redesign, 2026-11-13. The design's artboards are in the
 * PR; every inline style they carry is a class here.) */

.back {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  margin: 0 0 8px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--ink2);
  font: 600 15px var(--font);
  cursor: pointer;
}
.back:hover { color: var(--ink); }

.result-side[hidden], .rail-card[hidden], .sheet-rows[hidden], .verdict-card[hidden] { display: none; }

/* ── The verdict band ──
 * One band: the verdict word, its sentence in full, and the two checks as
 * pills. The band and its banner share the state (`band-<state>` on the band,
 * `banner-<state>` on the banner, both set by app.js). The list and its items
 * are `display: contents`, so the pills sit beside the words and an opened
 * check spans the whole band under them. */
.verdict-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin: 0 0 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.result.banner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 999 1 320px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  white-space: normal;
  font-size: 15px;
}
.result.banner[hidden] { display: none; }
.banner-icon { width: 40px; height: 40px; flex: none; }
.banner-text { min-width: 0; }
.banner-title { margin: 0; font-size: 28px; font-weight: 750; letter-spacing: -.01em; line-height: 1.1; }
.banner-sub { margin: 4px 0 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.checklist { display: contents; list-style: none; margin: 0; padding: 0; }
.check { display: contents; }
.check-toggle {
  order: 1;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: var(--tap);
  padding: 0 14px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: 600 13.5px var(--font);
  cursor: pointer;
}
.check-toggle:hover { filter: brightness(.97); }
.check-mark { display: grid; place-items: center; flex: none; }
.check-pass .check-mark { color: var(--ok); }
.check-warn .check-mark { color: var(--warn); }
.check-fail .check-mark { color: var(--bad); }
.check-skip .check-mark { color: var(--ink3); }
.check-title { margin: 0; }
.check-more {
  order: 2;
  flex: 1 1 100%;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
  color: var(--ink2);
  font-size: 14px;
  line-height: 1.5;
}
.check-more p { margin: 0 0 8px; }
.check-more p:last-child { margin-bottom: 0; }
.check-sub { color: var(--ink); font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.ico-14 { width: 14px; height: 14px; }

/* Verified: green, as designed. */
.band-verified { background: var(--band-ok-bg); border-color: var(--band-ok-line); }
.band-verified .banner-icon, .banner-verified .banner-title { color: var(--band-ok-title); }
.banner-verified .banner-sub { color: var(--band-ok-ink); }
.band-verified .check-toggle { background: var(--pill-ok-bg); border-color: var(--pill-ok-line); color: var(--pill-ok-ink); }
.band-verified .check-pass .check-mark { color: var(--band-ok-title); }
.band-verified .check-more { background: var(--pill-ok-bg); color: var(--pill-ok-ink); }
.band-verified .check-sub { color: var(--pill-ok-ink); }
/* Not fully checked: amber, its present colour. */
.band-limited { background: var(--warnbg); border-color: var(--band-warn-line); }
.band-limited .banner-icon, .banner-limited .banner-title { color: var(--warn); }
.banner-limited .banner-sub { color: var(--ink); }
.band-limited .check-toggle { border-color: var(--band-warn-line); }
/* Not valid (a tamper, an unknown signer, a refused key): the solid red of
   today, white words. */
.band-invalid { background: var(--bad); border-color: var(--bad); color: var(--on-bad); }
.band-invalid .banner-icon, .banner-invalid .banner-title, .banner-invalid .banner-sub { color: var(--on-bad); }
.band-invalid .check-toggle { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .55); color: var(--on-bad); }
.band-invalid .check-mark { color: var(--on-bad) !important; }
.band-invalid .check-more { background: rgba(0, 0, 0, .2); color: var(--on-bad); }
.band-invalid .check-sub { color: var(--on-bad); }
.band-invalid :focus-visible { outline-color: var(--on-bad); }
/* Cannot check: grey, never the red of a forgery. */
.band-unreadable { background: var(--mute); border-color: var(--band-mute-line); }
.band-unreadable .banner-icon { color: var(--ink2); }
.banner-unreadable .banner-title { color: var(--ink); font-size: 24px; }
.banner-unreadable .banner-sub { color: var(--ink2); }
@media (max-width: 480px) {
  .verdict-card { padding: 16px; gap: 12px 14px; }
  .banner-title { font-size: 24px; }
  .banner-unreadable .banner-title { font-size: 21px; }
  .banner-icon { width: 32px; height: 32px; }
}

/* ── The two columns: the scene, and the column beside it ── */
.result-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.result-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.result-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.rail-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.rail-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.claim-notshown p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.rail-list { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }
.rail-list > li.dim { font-size: 13px; padding: 4px 0; }

.note-card {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.note-card h3 { margin: 0 0 6px; font-size: 17px; }
.note-card p { margin: 0; color: var(--ink2); }
.steps-list { margin: 0 0 14px; padding-left: 20px; color: var(--ink2); }
.steps-list li { margin: 6px 0; }

.details-card {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 14px;
  overflow: hidden;
}
.details-card > summary { justify-content: space-between; min-height: 48px; padding: 0 18px; color: var(--ink); font-size: 14px; }
.dgroup { padding: 4px 18px 14px; border-top: 1px solid var(--line); }
.dgroup h3 { margin: 12px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.drows { margin: 0; padding: 0; list-style: none; }
dl.drows { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 8px 14px; }
.drow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 4px 0; }
.dk { font-size: 14px; color: var(--ink3); margin: 0; }
.dv { margin: 0; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.dnote { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink3); }
.reveal {
  appearance: none;
  min-height: var(--tap);
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 14px var(--mono);
  text-align: start;
  cursor: pointer;
  overflow-wrap: anywhere;
  word-break: break-all;
  text-decoration: underline dotted var(--line2);
}
.copyable { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.select { user-select: all; }
.copy-btn {
  appearance: none;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink2);
  cursor: pointer;
}
.copy-btn:hover { background: var(--sunk); color: var(--ink); }

.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.result-actions > * { flex: 1 1 140px; min-height: 48px; border-radius: 14px; font-size: 13.5px; padding: 0 12px; }
button.primary-ink {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--btn-ink-line);
  background: var(--btn-ink-bg);
  color: var(--btn-ink-text);
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
}
a.self-link { border-color: var(--btn-red-line); color: var(--btn-red-text); }
@media (max-width: 480px) { .result-actions > * { flex-basis: 100%; } }

/* ── The scene ──────────────────────────────────────────────────────────── */
.claim-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--scene-shadow);
}
.claim-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--head-line);
  background: var(--head-bg);
  color: var(--head-ink);
}
.claim-head-text { min-width: 0; }
.claim-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--head-dim);
}
.claim-sentence { margin: 2px 0 0; font-size: 20px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.claim-sentence:focus { outline: none; }
.claim-type {
  flex: none;
  margin-top: 2px;
  padding: 2px 10px;
  border: 1px solid color-mix(in srgb, var(--head-dim) 45%, transparent);
  border-radius: 999px;
  color: var(--head-dim);
  font-size: 12.5px;
  font-weight: 600;
}
.who-id { color: var(--red-text); font-variant-numeric: tabular-nums; }
.claim-head .who-id { color: var(--head-red); }

.scene-body { display: flex; flex-direction: column; gap: 14px; padding: 22px 20px 8px; }
.scene-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 14px 20px 18px;
  font-size: 12.5px;
  color: var(--ink-dim);
}
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-swatch { display: inline-block; flex: none; width: 22px; height: 12px; border-radius: 4px; }
.swatch-proven { border: var(--proven-width) solid var(--proven-line); background: var(--proven-bg); }
.swatch-context { border: 1px dashed var(--ghost-line); }

/* The rest of the chat: decoration, the same for every proof of a kind. */
.ghosts { display: flex; flex-direction: column; gap: 10px; }
.ghost {
  display: block;
  height: 38px;
  border: 1px dashed var(--ghost-line);
  border-radius: 14px;
  background: repeating-linear-gradient(135deg, var(--ghost-a) 0 8px, var(--ghost-b) 8px 16px);
}
.ghost.r { align-self: flex-end; }
.ghost.tall { height: 54px; }
.ghost.short { height: 34px; }
.ghost.w38 { width: 38%; } .ghost.w40 { width: 40%; } .ghost.w42 { width: 42%; }
.ghost.w44 { width: 44%; } .ghost.w46 { width: 46%; } .ghost.w48 { width: 48%; }
.ghost.w50 { width: 50%; } .ghost.w54 { width: 54%; } .ghost.w56 { width: 56%; }
.ghost.w58 { width: 58%; } .ghost.w62 { width: 62%; }

/* (PS9) The green "proven" look belongs to a fully Verified verdict only.
 * Under any other verdict that still draws the claim (a development key, a
 * member list the certificate does not cover), the proven card, its legend
 * swatch and the lines that join it take the warning colour, in both themes
 * and in print. */
.claim-slot[data-state]:not([data-state="verified"]) {
  --proven-line: var(--warn);
  --proven-bg:   var(--warn-tint);
  --cert:        var(--warn);
}

/* What the proof proves. */
.proven {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: var(--proven-width) solid var(--proven-line);
  border-radius: 18px;
  background: var(--proven-bg);
}
.bubble-col { display: flex; flex-direction: column; gap: 8px; margin-left: 56px; min-width: 0; }
@media (max-width: 480px) { .bubble-col { margin-left: 0; } }
.msg-wrap { margin: 0; }
.msg {
  display: block;
  padding: 14px 16px;
  border-radius: 4px 16px 16px 16px;
  background: var(--bubble);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  unicode-bidi: isolate;
}
.msg-emoji { font-size: 56px; line-height: 1.1; background: none; padding: 4px 0; }
.msg-clamped {
  max-height: 250px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.msg-toggle {
  appearance: none;
  min-height: var(--tap);
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--red-text);
  font: 600 13px var(--font);
  cursor: pointer;
}
.scene-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.claim-meta { margin: 0; font-size: 13px; color: var(--ink-dim); }
/* (I-V4, PS5) The certificate's time: the one time drawn as proven. */
.claim-cert { display: inline-flex; align-items: center; gap: 6px; color: var(--cert); font-weight: 600; }
/* A clock: whose it is, smaller, plain. */
.claim-clock { font-size: 12px; font-weight: 400; color: var(--ink-dim); }

.sealed {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 4px 16px 16px 16px;
  background: var(--bubble);
  color: var(--ink2);
}
.sealed-text { flex: 1 1 auto; min-width: 0; }
.sealed-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.sealed-body { margin: 0; font-size: 13.5px; color: var(--ink2); }
.sealed-bars { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.sealed-bars span { display: block; height: 8px; border-radius: 4px; background: var(--sealed-bar); }
.sealed-bars .bar-a { width: 92%; }
.sealed-bars .bar-b { width: 68%; }
.sealed-compact { gap: 12px; padding: 12px 14px; border-radius: 4px 14px 14px 14px; }
.sealed-compact .sealed-text { display: flex; flex-wrap: wrap; column-gap: 6px; }
.sealed-compact .sealed-title { font-size: 13.5px; font-weight: 650; }

/* An author the proof does not name: no tile, no name. */
.anon { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.anon-avatar { background: none !important; border: 1px dashed var(--ink3) !important; color: var(--ink-dim) !important; }
.anon-title { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.claim-noauthor { font-size: 12.5px; color: var(--ink-dim); }

/* ── A person tile ── */
.chip {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: start;
}
button.chip { cursor: pointer; }
button.chip:hover .chip-name { text-decoration: underline; text-underline-offset: 3px; }
.chip-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: var(--mute);
  color: var(--ink2);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.chip-status-active .chip-avatar { background: var(--avatar-bg); border-color: var(--avatar-line); color: var(--avatar-ink); }
.chip-status-suspended .chip-avatar { background: var(--warnbg); border-color: var(--band-warn-line); color: var(--warn); }
.chip-status-revoked .chip-avatar { text-decoration: line-through; }
.chip-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.chip-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.chip-name { font-size: 15.5px; font-weight: 700; overflow-wrap: anywhere; }
.chip-name:empty { display: none; }
.chip-id {
  padding: 1px 8px;
  border: 1px solid var(--id-line);
  border-radius: 999px;
  color: var(--id-ink);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chip-sub { font-size: 12.5px; color: var(--ink-dim); overflow-wrap: anywhere; }
.chip-verbatim { font-size: 12px; }
.chip-pending .chip-sub { font-style: italic; }
.chip-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }
.chip-mark { flex: none; display: flex; align-items: center; }
.chip-go { color: var(--ink-dim); }
.ring-ok { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--ok); }
.pill { padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 650; }
.pill-warn { background: var(--warnbg); color: var(--warn); }
.pill-mute { background: var(--mute); color: var(--ink); }
.chip-big .chip-avatar { width: 64px; height: 64px; border-radius: 16px; font-size: 22px; }
.chip-big .chip-name { font-size: 19px; }
.chip-big .chip-sub { font-size: 13px; }
.chip-compact { min-height: 44px; gap: 10px; }
.chip-compact .chip-avatar { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }
.chip-compact .chip-name { font-size: 14px; font-weight: 600; }
.chip-compact .chip-sub { font-size: 12px; }
/* (I-V1, PS4) A member-list row is the prover's word: dashed, its tile plain,
   never the certified entry's solid outline or red. */
.chip-listed { min-height: 60px; padding: 8px 12px; border: 1px dashed var(--ghost-line); border-radius: 14px; }
.chip-listed .chip-avatar, .chip-listed.chip-status-active .chip-avatar { background: var(--mute); border-color: var(--line2); color: var(--ink2); }
.rail-list .chip-listed { min-height: 44px; padding: 4px 8px; }
/* A payment's two parties, each in its own box. */
.chip-party {
  flex: 1 1 200px;
  width: auto;
  min-width: 0;
  min-height: 60px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
/* A person with no Countia ID this proof established: not a button; the key is. */
.chip-noid .chip-avatar { background: none; border-style: dashed; color: var(--ink3); }
.chip-key {
  appearance: none;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 14px var(--mono);
  text-align: start;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: normal;
  cursor: pointer;
}

/* ── Membership ── */
.members { display: flex; flex-direction: column; gap: 10px; }
.members-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.members-title { margin: 0; font-size: 15px; font-weight: 700; }
.members-count { font-size: 12.5px; color: var(--ink-dim); }
.members-note { margin: 0; font-size: 12.5px; color: var(--warn); }
.member-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.member-list-scroll { max-height: 420px; overflow-y: auto; }
.members-more { width: 100%; }
.conversation { display: flex; flex-direction: column; gap: 8px; }
.conversation-title { margin: 0; font-size: 12.5px; color: var(--ink3); }

/* ── Sequence ── */
.seq { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.seq-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; row-gap: 10px; }
.seq-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.seq-n {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--seq-n-bg);
  color: var(--seq-n-ink);
  font-size: 14px;
  font-weight: 800;
}
.seq-line { flex: 1 1 auto; width: 2px; background: var(--proven-line); }
.seq-body { padding: 12px 14px; }
.seq-body .scene-meta, .seq-body .sealed { margin-left: 0; }
.seq-between { grid-column: 2; display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12.5px; color: var(--ink3); }

/* ── Read receipt ── */
.scene-receipt .scene-body { gap: 0; }
.receipt-link { display: block; width: 2px; height: 22px; margin-left: 36px; background: var(--proven-line); }
.scene-receipt .ghosts { margin-top: 14px; }

/* ── Payment ── */
.pay-box { gap: 16px; padding: 18px; }
.pay-amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0; }
.pay-num { font-size: 40px; line-height: 1; font-weight: 750; letter-spacing: -.02em; }
.pay-sym { font-size: 18px; font-weight: 700; color: var(--ink2); }
.pay-parties { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pay-arrow { display: grid; place-items: center; color: var(--cert); }
@media (max-width: 480px) {
  .pay-parties { flex-direction: column; align-items: stretch; }
  .pay-parties .chip-party { flex: none; }
  .pay-arrow { transform: rotate(90deg); }
}
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 13px; }
.facts dt { margin: 0; color: var(--ink-dim); align-self: center; }
.facts dd { margin: 0; min-width: 0; color: var(--ink); }
.pay-ok { color: var(--cert); font-weight: 650; }
.explorer { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); color: var(--red-text); }

/* ── The badge sheet: the card the chain draws, unchanged, and what this
 *    page already knows about the person under it. ── */
.sheet {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.sheet::backdrop { background: rgba(0, 0, 0, .55); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 0 20px; }
.sheet-title { margin: 0; font-size: 20px; font-weight: 700; }
.sheet-close {
  appearance: none;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.sheet-body { padding: 16px 20px 0; display: grid; place-items: center; }
.sheet-card { display: block; width: 100%; height: auto; max-width: 300px; aspect-ratio: 420 / 600; border-radius: 16px; }
.sheet-rows {
  display: grid;
  grid-template-columns: max-content 1fr;
  margin: 16px 20px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  font-size: 14px;
}
.sheet-rows dt, .sheet-rows dd { margin: 0; padding: 11px 14px; border-top: 1px solid var(--line); }
.sheet-rows dt:first-of-type, .sheet-rows dt:first-of-type + dd { border-top: 0; }
.sheet-rows dt { color: var(--ink-dim); }
.sheet-rows dd { text-align: end; font-weight: 600; overflow-wrap: anywhere; }
.sheet-rows dd.mono { font-weight: 500; color: var(--ink2); }
.sheet-status-active { color: var(--cert); }
.sheet-status-suspended { color: var(--warn); }
.sheet-caption { margin: 12px 20px 0; text-align: start; font-size: 12.5px; line-height: 1.45; }
.sheet a.sheet-open { display: flex; margin: 14px 20px 20px; min-height: 48px; border-radius: 14px; border-color: var(--avatar-line); color: var(--red-text); background: var(--red-tint); font-weight: 700; }

/* The badge view's status line, over the card. Words first; colour second. */
.badge-claim { margin: 0 0 10px; font-size: 19px; font-weight: 650; }
.badge-claim[hidden] { display: none; }
.badge-claim-active { color: var(--ok); }
.badge-claim-suspended { color: var(--warn); }
.badge-claim-revoked { color: var(--ink2); }

/* ── Print: "Download this result" is the browser's own print, to paper or
 *    PDF. Always light (the dark tokens are screen-only). The verdict, the
 *    claim and the details; not the page around them. */
@media print {
  .topbar, footer, .back, .result-actions, #screen-landing, #screen-checking,
  [data-view="badge"], .check-toggle > .chev, .copy-btn, .theme-btn { display: none !important; }
  html, body { background: #fff; color: #000; }
  .verdict-card, .details-card, .note-card, .claim-card, .rail-card { box-shadow: none; break-inside: avoid; }
  .check-more[hidden] { display: block; }
  .result-grid { display: block; }
  .result-side { margin-top: 16px; }
  .verdict-card, .proven, .legend-swatch, .seq-n, .chip-avatar {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* The scene's dark head would print as white on nothing: plain ink. */
  .claim-head { background: none; color: var(--ink); border-bottom-color: var(--line); }
  .claim-head .claim-label, .claim-head .claim-type { color: var(--ink-dim); }
  .claim-head .who-id { color: var(--red-text); }
  .msg-clamped { max-height: none; -webkit-mask-image: none; mask-image: none; }
  .msg-toggle, .members-more, .sheet { display: none !important; }
  .member-list-scroll { max-height: none; overflow: visible; }
}
