/* The cunho demo: one stylesheet for the page, the login screens and the console. No web fonts, no external files. */

:root {
  color-scheme: light dark;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --ink: #0e1420;
  --muted: #5d6676;
  --faint: #8a93a3;
  --line: #e2e5ea;
  --line-strong: #cfd4dc;
  --primary: #0e1420;
  --primary-ink: #ffffff;
  --primary-soft: #eef0f4;
  --accent: #2557c7;
  --accent-soft: #e9effc;
  --success: #12804f;
  --success-soft: #e4f4ec;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #9a5b00;
  --warn-soft: #fdf3e2;
  --focus: #2557c7;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(14 20 32 / 5%), 0 4px 16px rgb(14 20 32 / 5%);
  --shadow-card: 0 10px 30px rgb(14 20 32 / 18%);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* the two credentials: a deep sea blue for the PID, a terracotta for the course */
  --pid: linear-gradient(135deg, #0b2f4a 0%, #0f5c78 55%, #138a8f 100%);
  --course: linear-gradient(135deg, #5a1f12 0%, #a2421d 55%, #d6813a 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e14;
    --surface: #131823;
    --surface-2: #1a2030;
    --ink: #e9edf4;
    --muted: #a0a9b9;
    --faint: #737d8f;
    --line: #242c3b;
    --line-strong: #323c4f;
    --primary: #e9edf4;
    --primary-ink: #0b0e14;
    --primary-soft: #1e2534;
    --accent: #8db0f5;
    --accent-soft: #1b2740;
    --success: #5fd197;
    --success-soft: #133325;
    --danger: #f59a92;
    --danger-soft: #3a1c1a;
    --warn: #f2bb5c;
    --warn-soft: #362812;
    --focus: #8db0f5;
    --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 4px 16px rgb(0 0 0 / 25%);
    --shadow-card: 0 10px 30px rgb(0 0 0 / 45%);
  }
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.shell { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.shell.narrow { max-width: 620px; }

/* top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
/* the mark: a die stamp seen from above, a ring within a square (cunho is Portuguese for a coin die) */
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--primary); flex: none;
  box-shadow: inset 0 0 0 7px var(--primary), inset 0 0 0 9.5px var(--bg);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--primary-ink);
}
.topnav { display: flex; align-items: center; gap: 6px; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.92rem; padding: 6px 10px; border-radius: 999px; }
.topnav a:hover { color: var(--ink); background: var(--primary-soft); }
.pill-button {
  font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 14px; cursor: pointer;
}
.pill-button:hover { background: var(--primary-soft); }
.link-button {
  background: none; border: 0; padding: 6px 2px; color: var(--accent); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

/* hero */
.hero { padding: 40px 0 24px; max-width: 760px; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
h1 { margin: 0 0 12px; font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.75rem); line-height: 1.12; letter-spacing: -0.025em; }
h2 { margin: 0 0 16px; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; }
h3 { margin: 0 0 10px; font-size: 0.82rem; font-weight: 700; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }
.lead { margin: 0 0 18px; font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn); font-size: 0.86rem; font-weight: 600;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.notice {
  margin: 16px 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warn-soft);
  color: var(--warn); font-size: 0.92rem; font-weight: 600;
}

/* panels */
.panel, .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; margin: 0 0 20px;
}
.card { margin: 20px 0; }

/* the page: choices on the left, the offer on the right */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.offer { position: sticky; top: 80px; }

/* credential cards */
.creds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cred-option { position: relative; display: grid; gap: 10px; cursor: pointer; }
.cred-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cred {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  aspect-ratio: 1.586; padding: 16px 18px; border-radius: 14px; color: #fff; overflow: hidden; isolation: isolate;
  box-shadow: 0 1px 2px rgb(14 20 32 / 12%); transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cred.pid { background: var(--pid); }
.cred.course { background: var(--course); }
/* fine security print: two sets of thin lines across each other, as on an identity document */
.cred::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.16;
  background:
    repeating-linear-gradient(60deg, rgb(255 255 255 / 60%) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-60deg, rgb(255 255 255 / 45%) 0 1px, transparent 1px 13px);
  mask-image: linear-gradient(105deg, transparent 20%, #000 75%);
  -webkit-mask-image: linear-gradient(105deg, transparent 20%, #000 75%);
}
.cred-top, .cred-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cred-top { align-items: flex-start; }
.cred-bottom { min-height: 22px; }
.cred-kind { font-size: 0.74rem; font-weight: 600; opacity: 0.85; letter-spacing: 0.02em; }
.cred-name { font-size: clamp(1.25rem, 0.9rem + 1.4vw, 1.7rem); font-weight: 750; line-height: 1.1; letter-spacing: -0.02em; }
.cred-issuer { font-size: 0.78rem; font-weight: 600; opacity: 0.85; }
.tags { display: flex; gap: 4px; flex-wrap: nowrap; justify-content: flex-end; }
.tag {
  font-size: 0.66rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap;
  background: rgb(255 255 255 / 92%); color: #0e1420;
}
/* the seal: a die's impression, ring within ring */
.seal {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  border: 2px solid rgb(255 255 255 / 75%);
  box-shadow: inset 0 0 0 4px transparent, inset 0 0 0 5.5px rgb(255 255 255 / 55%);
  background: radial-gradient(circle, rgb(255 255 255 / 85%) 0 3px, transparent 3.5px);
}
.cred-caption { display: grid; gap: 2px; font-size: 0.9rem; color: var(--muted); padding: 0 2px; }
.cred-caption strong { color: var(--ink); font-size: 0.98rem; }

.cred-option:hover .cred { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.cred-option input:checked + .cred { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink), var(--shadow-card); }
/* the chosen card: a check in place of its seal */
.cred-option input:checked + .cred .seal {
  border-color: #fff; background: #fff; box-shadow: none; position: relative;
}
.cred-option input:checked + .cred .seal::after {
  content: ""; position: absolute; left: 10.5px; top: 5px; width: 7px; height: 14px;
  border: solid #0e1420; border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.cred-option input:focus-visible + .cred { outline: 3px solid var(--focus); outline-offset: 4px; }

/* what goes into it */
.receive { margin-top: 22px; }
.fields { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fields li {
  font-size: 0.86rem; padding: 4px 10px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--ink);
}

/* settings */
.settings { display: grid; gap: 18px; margin: 22px 0; padding-top: 20px; border-top: 1px solid var(--line); }
.setting { margin: 0; padding: 0; border: 0; min-width: 0; }
.setting legend { padding: 0; margin-bottom: 8px; font-weight: 650; font-size: 0.92rem; }
.hint { margin: 6px 0 0; font-size: 0.86rem; color: var(--muted); }
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.segmented span {
  display: block; padding: 7px 14px; border-radius: 9px; font-size: 0.9rem; font-weight: 600; color: var(--muted);
}
.segmented label:hover span { color: var(--ink); }
.segmented input:checked + span { background: var(--primary); color: var(--primary-ink); }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.segmented input:disabled + span { cursor: default; }

.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.switch-track {
  position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--line-strong); flex: none;
  transition: background 0.15s; margin-top: 1px;
}
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 25%); transition: transform 0.15s;
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: var(--primary-ink); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch-text { display: grid; font-weight: 650; font-size: 0.92rem; }
.switch-text small { font-weight: 400; color: var(--muted); font-size: 0.86rem; }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; transition: filter 0.15s, background 0.15s;
}
.button:hover { background: var(--primary-soft); }
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.button.primary:hover { filter: brightness(1.25); background: var(--primary); }
.button.danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.button.wide { width: 100%; }
.button[disabled], .button[aria-busy="true"] { opacity: 0.6; cursor: progress; }

/* the offer panel */
.idle { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 28px 8px; }
.qr-ghost {
  position: relative; width: 168px; height: 168px; margin-bottom: 14px; border-radius: 14px;
  border: 2px dashed var(--line-strong);
}
.qr-ghost span { position: absolute; width: 38px; height: 38px; border-radius: 8px; border: 7px solid var(--line); }
.qr-ghost span:nth-child(1) { top: 14px; left: 14px; }
.qr-ghost span:nth-child(2) { top: 14px; right: 14px; }
.qr-ghost span:nth-child(3) { bottom: 14px; left: 14px; }
.idle-title { margin: 0; font-weight: 700; }
.idle-text { margin: 0; color: var(--muted); font-size: 0.92rem; }

#issue h2 { margin-bottom: 14px; }
.qr-column { display: grid; gap: 12px; margin-bottom: 18px; }
.qr { background: #fff; border-radius: 14px; border: 1px solid var(--line); padding: 12px; max-width: 300px; width: 100%; margin: 0 auto; }
.qr svg { display: block; width: 100%; height: auto; }
.pin { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); text-align: center; font-size: 0.9rem; }
.pin strong { font: 700 1.9rem/1.2 var(--mono); letter-spacing: 0.3em; }
.same-device { display: grid; gap: 4px; }
.same-device .hint { margin: 0; text-align: center; }
.offscreen { position: fixed; left: -9999px; top: 0; }
.expiry { margin: 0; color: var(--muted); font-size: 0.86rem; text-align: center; }

/* the credential as it will be: a small card, the person's name, and what it says */
.mini { display: grid; gap: 10px; margin-bottom: 18px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.cred.small { aspect-ratio: auto; min-height: 112px; padding: 12px 14px; border-radius: 12px; }
.cred.small .cred-name { font-size: 1.2rem; }
.cred.small .seal { width: 26px; height: 26px; }
.in-wallet {
  display: none; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: #fff; color: var(--success);
}
#issue.stored .in-wallet { display: inline-block; }
.persona-line { margin: 0; color: var(--muted); font-size: 0.9rem; }
.persona-line strong { color: var(--ink); }
.face { margin: 0; display: grid; gap: 0; font-size: 0.88rem; }
.face div { display: grid; grid-template-columns: minmax(0, 42%) 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.face div:first-child { border-top: 0; }
.face dt { color: var(--muted); }
.face dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* once the wallet has the offer, the QR code, the button and the PIN have done their job */
#issue.after .qr-column { display: none; }

/* steps: a line with a dot for each, the dot filled when the step is done */
.steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; }
.steps li { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 0 8px 2px; color: var(--faint); font-size: 0.95rem; }
.steps li::before {
  content: ""; position: absolute; left: 10px; top: -8px; height: 16px; width: 2px; background: var(--line);
}
.steps li:first-child::before { display: none; }
.steps li.code-only { display: none; }
.steps.code .code-only { display: flex; }
.dot {
  position: relative; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong);
  background: var(--surface); flex: none;
}
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--success); }
.steps li.done .dot { background: var(--success); border-color: var(--success); }
.steps li.done .dot::after {
  content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.steps li.current { color: var(--ink); font-weight: 650; }
.steps li.current .dot { border-color: var(--accent); background: var(--accent-soft); animation: pulse 1.4s ease-in-out infinite; }
.steps li.failed { color: var(--danger); font-weight: 650; }
.steps li.failed .dot { background: var(--danger); border-color: var(--danger); }

@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgb(37 87 199 / 18%); } }
@media (prefers-reduced-motion: reduce) {
  .steps li.current .dot { animation: none; }
  * { transition: none !important; }
}

.status { margin: 0 0 12px; font-weight: 600; font-size: 0.95rem; min-height: 1.5em; }
.status.good { color: var(--success); }
.status.bad { color: var(--danger); }
.review, .revoke { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 12px; font-size: 0.92rem; }
.review p, .revoke p { margin: 0; }
.revoke .button { margin-top: 10px; width: 100%; }
.error { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: 0.92rem; }
#again { margin-top: 4px; }

/* the two QR codes of one offer */
.scan { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; justify-items: center; gap: 6px; }
.scan legend { padding: 0; margin: 0 auto 6px; font-size: 0.82rem; font-weight: 650; color: var(--muted); text-align: center; }
.scan-hint { margin: 0; text-align: center; }
.small-link { font-size: 0.86rem; text-align: center; color: var(--muted); }
.button.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.accent:hover { filter: brightness(1.1); background: var(--accent); }

/* the demo wallet */
.demo-wallet { display: grid; gap: 8px; margin: 0 0 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.demo-wallet .hint { margin: 0; text-align: center; }
.demo-wallet .field { margin: 0; }
#demo-wallet-code { margin: 0 0 18px; text-align: center; }
.wallet-box { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 14px; }
.wallet-box h3 { margin-bottom: 8px; }
.wallet-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.9rem; }
.wallet-steps li { position: relative; padding-left: 22px; }
.wallet-steps li::before { content: "\2713"; position: absolute; left: 2px; color: var(--success); font-weight: 700; }
.wallet-steps li.working { color: var(--muted); }
.wallet-steps li.working::before { content: "\2022"; color: var(--accent); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) { .wallet-steps li.working::before { animation: none; } }
.wallet-box .error { margin-top: 10px; }

/* inside the credential: what the demo wallet holds, side by side */
.inside { margin-top: 0; }
.inside-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.inside-list .held { margin: 0; }
.inside-foot { display: grid; justify-items: start; gap: 4px; margin-top: 16px; }
.inside-foot .hint { margin: 0; }
body.joined .inside { max-width: 560px; margin-left: auto; margin-right: auto; }
.held { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 10px; }
.held header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.held code { font: 0.78rem var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.tag.dark { background: var(--primary); color: var(--primary-ink); }
.list-status { margin-left: auto; font-size: 0.76rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.list-status.valid { background: var(--success-soft); color: var(--success); }
.list-status.invalid { background: var(--danger-soft); color: var(--danger); }
.checks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; font-size: 0.86rem; }
.checks li { position: relative; padding-left: 20px; }
.checks li::before { position: absolute; left: 0; font-weight: 700; }
.checks li.ok::before { content: "\2713"; color: var(--success); }
.checks li.bad { color: var(--danger); }
.checks li.bad::before { content: "\2717"; color: var(--danger); }
.held details { margin-top: 8px; font-size: 0.84rem; }
.held summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.raw {
  margin: 8px 0 0; padding: 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line);
  font: 0.72rem/1.45 var(--mono); white-space: pre-wrap; word-break: break-all; max-height: 180px; overflow: auto;
}
#revoke-elsewhere { margin: 0 0 12px; }

/* the phone page: one offer, opened from the QR code a phone's camera reads */
body.joined #choose, body.joined .how, body.joined .scan, body.joined .scan-hint, body.joined .qr,
body.joined #copy-link, body.joined #phone-here, body.joined .expiry { display: none; }
body.joined .workspace { grid-template-columns: minmax(0, 560px); justify-content: center; }
body.joined .offer { position: static; }
body.joined .hero { max-width: 560px; margin: 0 auto; }

/* Simple and Advanced: the same page, Simple keeping only the story */
.segmented.mode span { padding: 5px 12px; font-size: 0.84rem; }
body.simple .receive, body.simple .settings, body.simple #copy-link, body.simple #phone-here,
body.simple .demo-wallet .hint, body.simple #wallet-box, body.simple #inside, body.simple #face,
body.simple #demo-wallet-code { display: none; }
body:not(.simple) #result, body:not(.simple) .simple-only, body.simple .advanced-only { display: none; }
body.simple .demo-wallet { border-top: 0; padding-top: 0; }
body.simple #start { margin-top: 22px; }

/* what the wallet received, as anyone reads it */
.result {
  padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 14px;
}
.result h3 { margin-bottom: 10px; }
.result-rows { margin: 0; display: grid; }
.result-rows div { display: grid; grid-template-columns: minmax(0, 40%) 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.result-rows div:first-child { border-top: 0; }
.result-rows dt { color: var(--muted); }
.result-rows dd { margin: 0; font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.result-check { margin: 10px 0 0; font-weight: 600; font-size: 0.92rem; position: relative; padding-left: 24px; }
.result-check::before { position: absolute; left: 0; font-weight: 800; }
.result-check.ok { color: var(--success); }
.result-check.ok::before { content: "\2713"; }
.result-check.bad { color: var(--danger); }
.result-check.bad::before { content: "\2717"; }
.result-status { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.result-status .list-status { margin-left: 0; }

/* the phone page, drawn as a wallet: always white, one card, what it holds, what happened to it */
body.joined {
  color-scheme: light;
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f7f8fa; --ink: #0e1420; --muted: #6b7280; --faint: #9aa1ad;
  --line: #e7e9ee; --line-strong: #d5d9e0; --primary: #0e1420; --primary-ink: #ffffff; --primary-soft: #eef0f4;
  --accent: #2557c7; --accent-soft: #e9effc; --success: #12804f; --success-soft: #e4f4ec; --danger: #b42318;
  --danger-soft: #fdecea; --warn: #9a5b00; --warn-soft: #fdf3e2;
  background: var(--bg); color: var(--ink);
}
body.joined .hero, body.joined .how, body.joined .footer, body.joined .topnav .mode, body.joined #inside { display: none; }
body.joined .offer { background: transparent; border: 0; box-shadow: none; padding: 0; }
body.joined .topbar-inner { flex-wrap: nowrap; }
body.joined .topnav { width: auto; }
body.joined #issue > :not(#wallet-screen) { display: none !important; }

.wallet { max-width: 440px; margin: 0 auto; display: grid; gap: 14px; padding: 18px 0 40px; }
.w-demo {
  justify-self: center; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 12px;
  border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 0.78rem; font-weight: 650;
}
.w-title { margin: 6px 0 0; font-size: 1.5rem; font-weight: 750; letter-spacing: -0.02em; }
/* the card: black, the coin, the chart lines drawn once the wallet has checked it (card.js) */
.w-card { position: relative; aspect-ratio: 1000 / 630; border-radius: 3.4% / 5.4%; background: #0b0b0c;
  box-shadow: 0 18px 40px -12px rgb(0 0 0 / 55%), 0 2px 6px rgb(0 0 0 / 18%); transition: box-shadow 0.8s; }
.card-art { display: block; width: 100%; height: 100%; }
.card-art text { font-family: "Space Grotesk", var(--font); }
.card-issuer { fill: #fff; font-size: 44px; font-weight: 500; letter-spacing: 1.5px; }
.card-name { fill: #fff; font-weight: 400; letter-spacing: -0.6px; }
.card-small { fill: #9a9ba0; font-weight: 400; letter-spacing: 0.3px; }
.card-small.bright { fill: #e2e3e6; }
.w-card .card-laurel { display: none; }
.w-card.course .card-laurel { display: inline; }
.w-card.course .card-arms { display: none; }
.w-card .card-lines path, .w-card .card-lines circle { stroke-dasharray: 1; stroke-dashoffset: 1; }
.w-card .card-lines { opacity: 0; transition: opacity 0.4s; }
.w-card .card-glow, .w-card .card-sheen { opacity: 0; }
.w-card .card-sheen { transform-box: view-box; transform-origin: 500px 315px; transform: rotate(18deg); }
.w-card.verifying, .w-card.verified { box-shadow: 0 0 34px rgb(170 186 255 / 35%), 0 18px 40px -12px rgb(0 0 0 / 55%); }
.w-card.verifying .card-lines, .w-card.verified .card-lines { opacity: 1; }
.w-card.verifying .card-lines path { animation: card-draw 1.5s cubic-bezier(0.3, 0.1, 0.2, 1) forwards; }
.w-card.verifying .card-lines .wind-1 { animation-delay: 0.08s; }
.w-card.verifying .card-lines .wind-2 { animation-delay: 0.16s; }
.w-card.verifying .card-lines .web { animation: card-draw 1.6s 0.45s ease-out forwards; }
.w-card.verified .card-lines path, .w-card.verified .card-lines circle { stroke-dashoffset: 0; }
.w-card.verifying .card-glow { animation: card-glow 2.4s ease-out forwards; }
.w-card.verified .card-glow { opacity: 0.22; }
.w-card.verifying .card-sheen { animation: card-sweep 1.6s 0.2s ease-in-out forwards; }
.w-card.verifying .card-coin { animation: card-shine 2.4s ease-out forwards; }
.w-card.verified .card-coin { filter: drop-shadow(0 0 3px rgb(255 255 255 / 45%)); }
@keyframes card-draw { to { stroke-dashoffset: 0; } }
@keyframes card-glow { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0.22; } }
@keyframes card-sweep { 0% { opacity: 1; transform: rotate(18deg) translateX(0); } 100% { opacity: 1; transform: rotate(18deg) translateX(1500px); } }
@keyframes card-shine { 0% { filter: none; } 30% { filter: drop-shadow(0 0 10px #fff) brightness(1.4); } 100% { filter: drop-shadow(0 0 3px rgb(255 255 255 / 45%)); } }
.w-from { margin: -2px 0 0; color: var(--muted); font-size: 0.92rem; }
.w-from strong { color: var(--ink); }
.w-section { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 18px; box-shadow: 0 1px 2px rgb(14 20 32 / 4%); }
.w-section summary {
  list-style: none; cursor: pointer; padding: 16px 0; font-weight: 700; display: flex; justify-content: space-between; align-items: center;
}
.w-section summary::-webkit-details-marker { display: none; }
.w-section summary::after {
  content: ""; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg);
  transition: transform 0.15s; margin-right: 4px;
}
.w-section[open] summary::after { transform: rotate(-135deg); }
.w-rows { margin: 0 0 8px; display: grid; }
.w-rows div { display: grid; grid-template-columns: minmax(0, 42%) 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.w-rows div.first-of-group { border-top: 6px solid var(--surface-2); }
.w-rows dt { color: var(--muted); }
.w-rows dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.w-history { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 0; }
.w-history li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.w-history time { color: var(--muted); font-variant-numeric: tabular-nums; }
.w-status { display: flex; align-items: center; gap: 10px; }
.w-status .list-status { margin-left: 0; }
.w-check { margin: 0; color: var(--success); font-weight: 650; font-size: 0.9rem; position: relative; padding-left: 24px; }
.w-check::before { content: "\2713"; position: absolute; left: 0; font-weight: 800; }
.w-check.bad { color: var(--danger); }
.w-check.bad::before { content: "\2717"; }
.w-actions { display: grid; gap: 10px; margin-top: 4px; }
.w-btn {
  display: flex; align-items: center; justify-content: center; min-height: 54px; border-radius: 999px; font: inherit;
  font-weight: 650; font-size: 1.02rem; text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.w-btn.primary { background: #0e1420; color: #fff; }
.w-btn.primary:hover { filter: brightness(1.3); }
.w-btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.w-btn[disabled], .w-btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.w-link { justify-self: center; font-size: 0.88rem; color: var(--muted); }
.w-busy { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0; color: var(--muted); font-weight: 600; }
.w-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--ink); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.w-toast {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 999px; background: #0e1420; color: #fff; font-weight: 600; font-size: 0.92rem;
  box-shadow: 0 10px 30px rgb(14 20 32 / 25%); animation: drop 0.25s ease-out; white-space: nowrap;
}
.w-dot { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; }
@keyframes drop { from { transform: translate(-50%, -12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .w-spinner, .w-toast { animation: none; } }

/* how it works */
.how { margin: 28px 0 40px; scroll-margin-top: 80px; }
.how h2 { font-size: 1.4rem; margin-bottom: 18px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.how-steps li {
  display: grid; align-content: start; gap: 6px; padding: 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; color: var(--muted);
}
.how-steps strong { color: var(--ink); font-size: 1rem; }
.how-number {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; margin-bottom: 4px;
  background: var(--primary); color: var(--primary-ink); font-size: 0.85rem; font-weight: 700;
}

/* footer */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0 36px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer strong { display: block; margin-bottom: 4px; font-size: 0.92rem; }
.footer p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* login and consent screens */
.screen main { padding-bottom: 32px; }
.card h1 { font-size: 1.6rem; }
.personas { display: grid; gap: 10px; border: 0; padding: 0; margin: 16px 0 0; }
.personas legend { padding: 0; margin-bottom: 8px; font-weight: 650; }
.persona {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface); cursor: pointer; font-weight: 600;
}
.persona:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--surface-2); }
.claims { margin: 16px 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.claims div { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.claims div:first-child { border-top: 0; }
.claims dt { color: var(--muted); font-size: 0.92rem; }
.claims dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; }
.check small { display: block; color: var(--muted); font-size: 0.88rem; }
.language { margin: 16px 0 0; font-size: 0.92rem; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--primary); width: 18px; height: 18px; margin: 3px 0 0; flex: none; }

/* operator console */
.narrow-card { max-width: 460px; margin-left: auto; margin-right: auto; }
.field { display: grid; gap: 6px; margin-top: 12px; font-weight: 600; font-size: 0.92rem; }
.field input {
  font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); min-height: 44px;
}
.table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; border-top: 0; }
.table code { font: 0.85rem var(--mono); overflow-wrap: anywhere; }
form.inline { display: flex; gap: 8px; flex-wrap: wrap; }
form.inline .button { min-height: 36px; padding: 0 12px; }
.revoke-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-top: 12px; }
.revoke-form .field { flex: 1 1 260px; margin: 0; }

/* narrower screens */
@media (max-width: 1000px) {
  .how-steps { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
@media (max-width: 880px) {
  .workspace { grid-template-columns: 1fr; }
  .offer { position: static; }
  /* on one column the empty offer panel says nothing the button doesn't */
  .offer:has(#issue[hidden]) { display: none; }
  #choose.locked { display: none; }
}
@media (max-width: 640px) {
  .hero { padding-top: 24px; }
  .panel, .card { padding: 18px; border-radius: 14px; }
  .creds { grid-template-columns: 1fr; }
  .cred { aspect-ratio: auto; min-height: 150px; }
  .topnav a { display: none; }
  /* Two rows on a phone: the name, then the view and the language. */
  .topbar-inner { flex-wrap: wrap; padding: 10px 16px; row-gap: 8px; }
  .topnav { width: 100%; justify-content: space-between; }
  .segmented.mode { flex-wrap: nowrap; }
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
  .claims div { grid-template-columns: 1fr; gap: 2px; }
  /* On a phone the wallet is on the same device: the button comes first, the QR code is for another phone. */
  .same-device { order: -1; }
  .qr { max-width: 240px; }
  .actions .button { flex: 1 1 auto; }
}

/* ------------------------------------------------------------------------------------------------------------------
   The main page: pure black, white text, the card on a stage, pill buttons (filled white or outlined white)
   ------------------------------------------------------------------------------------------------------------------ */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.logo { display: block; width: 21px; height: 24px; fill: currentColor; flex: none; }
.brand { color: #f0eee6; }
body.joined .brand, body.screen .brand { color: var(--ink); }
body.joined .stage, body.joined #idle { display: none; }

body.home:not(.joined) {
  color-scheme: dark;
  --bg: #000; --surface: #0b0b0c; --surface-2: #111113; --ink: #fff; --muted: #c4c4c9; --faint: #8e8e94;
  --line: #1c1c1e; --line-strong: #2e2e31; --primary: #fff; --primary-ink: #000; --primary-soft: #1a1a1c;
  --accent: #fff; --accent-soft: #1a1a1c; --success: #4ade80; --success-soft: #0f2a1a; --danger: #ff7a70;
  --danger-soft: #2c1210; --warn: #f2bb5c; --warn-soft: #2a2010; --focus: #fff;
  --display: "Space Grotesk", var(--font);
  background: #000; color: #fff;
}
body.home:not(.joined) .shell { max-width: 1180px; }
body.home:not(.joined) .topbar { background: rgb(0 0 0 / 78%); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
body.home:not(.joined) .brand { font: 500 16px var(--display); letter-spacing: 0.2px; }
body.home:not(.joined) .brand span { color: #fff; }
body.home:not(.joined) .topnav { gap: 14px; }
body.home:not(.joined) .topnav a { color: var(--muted); }
body.home:not(.joined) .topnav a:hover { color: #fff; background: none; }

/* pills: a filled white one for the step forward, outlined white ones for everything else */
body.home:not(.joined) .button, body.home:not(.joined) .pill-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px;
  background: transparent; color: #fff; border: 1.5px solid #fff; font: 500 15.5px var(--font); letter-spacing: -0.1px;
  text-decoration: none; cursor: pointer; width: auto; transition: background 0.2s, color 0.2s;
}
body.home:not(.joined) .button:hover, body.home:not(.joined) .pill-button:hover { background: rgb(255 255 255 / 10%); filter: none; }
body.home:not(.joined) .button.primary { background: #fff; color: #000; }
body.home:not(.joined) .button.primary:hover { background: #e6e6e6; border-color: #e6e6e6; }
body.home:not(.joined) .button.danger { border-color: var(--danger); color: var(--danger); }
body.home:not(.joined) .pill-button { min-height: 34px; padding: 0 15px; font-size: 13.5px; }
body.home:not(.joined) .segmented { display: inline-flex; gap: 6px; padding: 0; background: none; border: 0; }
body.home:not(.joined) .segmented span {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 15px; border-radius: 999px; border: 1.5px solid #fff;
  color: #fff; background: transparent; font: 500 13.5px var(--font);
}
body.home:not(.joined) .segmented input:checked + span { background: #fff; color: #000; }
body.home:not(.joined) .segmented input:focus-visible + span, body.home:not(.joined) .cred-pill input:focus-visible + span { outline: 2px solid #fff; outline-offset: 3px; }

/* the two columns: the words and the choice, the card */
body.home:not(.joined) .workspace {
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 64px; align-items: start; padding: 96px 0 56px;
  min-height: calc(100vh - 61px);
}
body.home:not(.joined) .panel { background: none; border: 0; box-shadow: none; padding: 0; }
body.home:not(.joined) .offer { position: static; }
body.home:not(.joined) .eyebrow { font: 500 12px var(--display); letter-spacing: 2.4px; color: var(--muted); margin: 0 0 22px; }
body.home:not(.joined) h1 { font: 400 58px/1.04 var(--display); letter-spacing: -1.4px; margin: 0 0 22px; }
body.home:not(.joined) .lead { color: #fff; font-size: 18px; line-height: 1.45; max-width: 29em; margin: 0 0 30px; }
body.home:not(.joined) .creds { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.cred-pill { position: relative; cursor: pointer; }
.cred-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cred-pill span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1.5px solid #fff;
  color: #fff; font: 500 15.5px var(--font); transition: background 0.2s, color 0.2s;
}
.cred-pill:hover span { background: rgb(255 255 255 / 10%); }
.cred-pill input:checked + span { background: #fff; color: #000; }
#choose.locked .cred-pill input:not(:checked) + span { opacity: 0.6; }
.cred-desc { color: #fff; font-size: 15px; margin: 0 0 26px; min-height: 22px; }
body.home:not(.joined) .receive h3, body.home:not(.joined) .settings legend { color: var(--muted); }
body.home:not(.joined) .fields li { background: var(--surface-2); border-color: var(--line-strong); color: #fff; }
body.home:not(.joined) .settings { border-top-color: var(--line); }
body.home:not(.joined) #start { margin-top: 4px; }
.note { margin: 26px 0 0; color: var(--muted); font-size: 13.5px; }
/* the card carries the country's arms: that it is not an official document is said where nobody misses it */
body.home:not(.joined) .note {
  max-width: 460px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 14px; color: #e6e6e6;
  font-size: 14px; line-height: 1.45;
}
body.home:not(.joined) .note strong { color: #fff; font-weight: 600; }
body.joined .note { display: none; }

/* the stage: the card turns over to show the QR code while the offer waits for a wallet */
.stage { perspective: 1800px; }
.flip { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); transform-style: preserve-3d; transition: transform 0.9s cubic-bezier(0.3, 0.1, 0.2, 1); }
.stage.flipped .flip { transform: rotateY(180deg); }
/* both sides share one cell; the back, once turned to, may grow taller than the card for what it holds */
.stage .side { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.stage .front { align-self: start; }
.stage .back { position: absolute; inset: 0; aspect-ratio: 1000 / 630; }
.stage.flipped .back { position: relative; inset: auto; }
.stage .w-card { box-shadow: 0 30px 60px -20px #000, 0 0 0 1px #2a2a2c; }
.stage .w-card.verifying, .stage .w-card.verified { box-shadow: 0 0 50px rgb(170 186 255 / 30%), 0 30px 60px -20px #000, 0 0 0 1px #2a2a2c; }
.back {
  transform: rotateY(180deg); background: #0b0b0c; border-radius: 3.4% / 5.4%; box-shadow: inset 0 0 0 1.5px #3a3b3f, 0 30px 60px -20px #000;
  display: grid; grid-template-columns: 40% minmax(0, 1fr); gap: 7%; align-items: center; padding: 7%;
}
.back .qr { margin: 0; max-width: none; padding: 8px; border: 0; border-radius: 12px; }
.back-text { display: grid; gap: 12px; align-content: center; min-width: 0; }
.back .scan { border: 0; margin: 0; padding: 0; min-width: 0; }
.back .scan legend { display: none; }
/* the two codes' switch wraps rather than run past the card's edge on a narrow column */
.back .segmented { flex-wrap: wrap; justify-content: center; }
.scan-hint { margin: 0; color: #fff; font-size: 14.5px; line-height: 1.4; }
.back .pin { margin: 0; padding: 8px 12px; border-radius: 12px; background: #fff; color: #000; display: grid; gap: 2px; }
.back .pin span { font-size: 12px; }
.back .pin strong { font: 600 22px var(--display); letter-spacing: 3px; }
.back .expiry { margin: 0; color: var(--muted); font-size: 13px; }
body.home:not(.joined) #idle { margin: 26px 0 0; text-align: center; color: #fff; font-size: 14.5px; }

/* the steps, as a line of dots under the card */
body.home:not(.joined) #issue { margin-top: 30px; }
body.home:not(.joined) .steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; position: relative; }
body.home:not(.joined) .steps::before { content: ""; position: absolute; left: 10%; right: 10%; top: 7px; height: 1px; background: var(--line-strong); }
body.home:not(.joined) .steps li {
  display: grid; justify-items: center; text-align: center; gap: 8px; padding: 0 4px; font: 400 12.5px/1.3 var(--display); color: var(--faint);
}
body.home:not(.joined) .steps li.code-only { display: none; }
body.home:not(.joined) .steps.ends-issued li[data-step="stored"] { display: none; }
body.home:not(.joined) .steps.code li.code-only { display: grid; }
body.home:not(.joined) .steps li::before { display: none; }
body.home:not(.joined) .steps .dot { position: relative; width: 15px; height: 15px; border-radius: 50%; background: #000; border: 1.5px solid var(--line-strong); }
body.home:not(.joined) .steps .dot::after { display: none; }
body.home:not(.joined) .steps li.done { color: #fff; }
body.home:not(.joined) .steps li.done .dot { background: #fff; border-color: #fff; }
body.home:not(.joined) .steps li.current { color: #fff; font-weight: 400; }
body.home:not(.joined) .steps li.current .dot { border-color: #fff; background: #000; box-shadow: 0 0 0 4px rgb(255 255 255 / 12%); }
body.home:not(.joined) .steps li.failed { color: var(--danger); }
body.home:not(.joined) .steps li.failed .dot { background: var(--danger); border-color: var(--danger); }
body.home:not(.joined) #status { margin: 18px 0 0; text-align: center; color: #fff; font-size: 14.5px; }
/* stored by the demo wallet: what happened, and where the credential is (not in an app on the visitor's phone) */
body.home:not(.joined) #issue.demo-done .outcome {
  margin: 22px 0 0; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px;
}
body.home:not(.joined) #issue.demo-done #status { margin: 0; text-align: left; font: 500 16px var(--display); }
.stored-note { margin: 6px 0 0; color: #e6e6e6; font-size: 14px; line-height: 1.5; }
.offer-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin: 22px 0 0; }
.offer-actions .hint { display: none; }
#issue.after .offer-actions { display: none; }
body.simple .mini { display: none; }
.offer-actions .demo-wallet, .offer-actions .same-device { display: contents; }
body.home:not(.joined) .small-link { color: var(--muted); font-size: 13.5px; }
body.home:not(.joined) #demo-wallet-code { text-align: center; color: var(--muted); }
body.home:not(.joined) #mini-card { display: none; }
body.home:not(.joined) .mini { background: none; border: 0; padding: 0; margin: 22px 0 0; }
body.home:not(.joined) .result, body.home:not(.joined) .wallet-box, body.home:not(.joined) .review, body.home:not(.joined) .revoke {
  margin-top: 22px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px;
}
body.home:not(.joined) .result-rows dd { font-weight: 500; }
body.home:not(.joined) #again { margin: 22px auto 0; display: flex; }
body.home:not(.joined) .inside { margin-top: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; padding: 24px; }

/* how it works: five steps on one line */
body.home:not(.joined) .how { border-top: 1px solid var(--line); margin: 0; padding: 80px 0; }
body.home:not(.joined) .how h2 { font: 400 42px/1.1 var(--display); letter-spacing: -1px; margin: 0 0 46px; }
body.home:not(.joined) .how-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
body.home:not(.joined) .how-steps::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 1px; background: var(--line-strong); }
body.home:not(.joined) .how-steps li { background: none; border: 0; padding: 0 26px 0 0; position: relative; color: #fff; font-size: 15px; display: grid; gap: 6px; box-shadow: none; }
body.home:not(.joined) .how-number {
  display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #000; color: #fff;
  border: 1px solid #44454b; font: 500 13px var(--display); margin-bottom: 12px;
}
body.home:not(.joined) .how-steps strong { font: 500 18px var(--display); color: #fff; }
body.home:not(.joined) .footer { background: #000; border-top: 1px solid var(--line); color: #fff; }
body.home:not(.joined) .footer strong { font: 500 15px var(--display); color: #fff; }
body.home:not(.joined) .footer p { color: #fff; }

@media (max-width: 900px) {
  body.home:not(.joined) .workspace { grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 24px 0 40px; min-height: 0; }
  body.home:not(.joined) .offer { order: -1; }
  body.home:not(.joined) .offer:has(#issue[hidden]) { display: block; }
  body.home:not(.joined) #idle { display: none; }
  body.home:not(.joined) h1 { font-size: 40px; letter-spacing: -1.2px; }
  body.home:not(.joined) .creds { flex-wrap: nowrap; gap: 8px; }
  body.home:not(.joined) .cred-pill { flex: 1; }
  body.home:not(.joined) .cred-pill span { width: 100%; justify-content: center; padding: 0 12px; font-size: 14.5px; }
  .back { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 14px; padding: 7% 6%; }
  .back .qr { width: 54%; }
  .back-text { justify-items: center; }
  .back .scan-hint { font-size: 12.5px; }
  .back .segmented span { min-height: 28px; padding: 0 10px; font-size: 12px; }
  body.home:not(.joined) .how-steps { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  body.home:not(.joined) .how-steps::before { left: 15px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  body.home:not(.joined) .how-steps li { padding: 0 0 0 52px; }
  body.home:not(.joined) .how-number { position: absolute; left: 0; top: 0; }
  body.home:not(.joined) .topbar-inner { flex-wrap: nowrap; padding: 10px 16px; }
  body.home:not(.joined) .topnav a { display: none; }
  body.home:not(.joined) .segmented.mode span { min-height: 30px; padding: 0 11px; font-size: 12.5px; }
  body.home:not(.joined) .pill-button { min-height: 30px; padding: 0 11px; font-size: 12.5px; }
  body.home:not(.joined) .brand [data-i18n="brand"] { font-size: 14px; }
}
@media (max-width: 420px) {
  body.home:not(.joined) .brand [data-i18n="brand"] { display: none; }
}
@media (prefers-reduced-motion: reduce) { .flip { transition: none; } }

/* the phone page's demo line: plain words, no coloured badge */
.w-demo { background: none; color: var(--muted); padding: 0; font-weight: 500; }
.w-demo .badge-dot { display: none; }
