/* Signeto account pages. Design-system tokens (site/src/tokens.css, docs/DESIGN.md), dark first,
   light behind [data-theme="light"] (theme.js). Geist and Geist Mono are self-hosted: the CSP is
   font-src 'self'. The woff2 files are the `geist` npm package 1.9.2 (Vercel, SIL OFL 1.1, see
   fonts/OFL.txt) variable fonts, subset to Latin with fonttools' pyftsubset. No inline styles
   anywhere (style-src 'self'): everything the pages show is styled here. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-1.9.2-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-1.9.2-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---- tokens --------------------------------------------------------------------------------------- */
:root,
[data-theme="dark"] {
  --bg: #0b1020;
  --bg-deep: #080c19;
  --surface: #141a2e;
  --surface-raised: #1b2340;
  --surface-hover: #1f2848;
  --text: #c9d1e3;
  --text-strong: #eef2fa;
  --text-muted: #8b95ad;
  --text-faint: #7a84a0;
  --text-inverse: #0b1020;
  --border-subtle: #232b45;
  --border: #2c3656;
  --border-strong: #6b7794;
  --accent: #38b6a5;
  --accent-soft: rgba(56, 182, 165, 0.12);
  --accent-glow: rgba(56, 182, 165, 0.26);
  --approve: #2fd27a;
  --approve-soft: rgba(47, 210, 122, 0.12);
  --approve-glow: rgba(47, 210, 122, 0.1);
  --deny: #f5553d;
  --deny-soft: rgba(245, 85, 61, 0.12);
  --pending: #f3b53f;
  --pending-soft: rgba(243, 181, 63, 0.12);
  --pending-glow: rgba(243, 181, 63, 0.1);
  --tier-2: #38b6a5;
  --tier-3: #f3b53f;
  --rc0: #8c9bff;
  --rc1: #d58cf0;
  --rc2: #7cc7f2;
  --rc3: #c3b1ff;
  --rc4: #f0a6cf;
  --rc5: #9fb4d8;
  --j-key: #8fb7ff;
  --j-str: #9fe0c7;
  --j-num: #f3c77a;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-deep: #eceff6;
  --surface: #ffffff;
  --surface-raised: #eef1f7;
  --surface-hover: #e7ebf4;
  --text: #2a3147;
  --text-strong: #0b1020;
  --text-muted: #5b6478;
  --text-faint: #646c80;
  --text-inverse: #ffffff;
  --border-subtle: #e1e5ef;
  --border: #d4d9e6;
  --border-strong: #6b7794;
  --accent: #1e7f72;
  --accent-soft: rgba(30, 127, 114, 0.1);
  --accent-glow: rgba(30, 127, 114, 0.16);
  --approve: #157a45;
  --approve-soft: rgba(21, 122, 69, 0.1);
  --approve-glow: rgba(21, 122, 69, 0.08);
  --deny: #c2341e;
  --deny-soft: rgba(194, 52, 30, 0.1);
  --pending: #8a5a00;
  --pending-soft: rgba(181, 122, 0, 0.12);
  --pending-glow: rgba(181, 122, 0, 0.08);
  --tier-2: #1e7f72;
  --tier-3: #8a5a00;
  --rc0: #4a5bd6;
  --rc1: #9a3fbf;
  --rc2: #1f6fa8;
  --rc3: #6a4fd0;
  --rc4: #b03a7e;
  --rc5: #4b5f86;
  --j-key: #2d55c4;
  --j-str: #0f7a5c;
  --j-num: #8a5a00;
  --shadow: 0 16px 40px rgba(11, 16, 32, 0.16);
  color-scheme: light;
}

/* ---- base ----------------------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg-deep);
  color: var(--text);
  font: 14px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-glow); }
h1, h2, h3, h4 { color: var(--text-strong); letter-spacing: -0.01em; }
h1 { font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 8px; }
h2 { font-size: 17px; line-height: 24px; font-weight: 600; margin: 28px 0 8px; }
h3 { font-size: 14px; line-height: 20px; font-weight: 600; margin: 20px 0 8px; }
p { margin: 0 0 10px; }
code, .mono, kbd, pre { font-family: var(--font-mono); }
code { font-size: 0.92em; color: var(--text-strong); background: var(--surface-raised); border: 1px solid var(--border-subtle); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.seal { width: 24px; height: 24px; flex: none; }
.ic { width: 16px; height: 16px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 30; padding: 8px 12px; border-radius: var(--r-md); background: var(--accent); color: var(--text-inverse); font-weight: 600; }
.skip:focus { top: 12px; text-decoration: none; }
.lede, .dim, .alt, .note, .muted { color: var(--text-muted); }
.lede { font-size: 15px; margin: 0 0 18px; max-width: 72ch; }
.note { font-size: 13px; }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.lbl { font: 500 11px/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.big { font: 600 34px/1.1 var(--font-mono); letter-spacing: 0.12em; color: var(--text-strong); margin: 4px 0 14px; }

/* ---- buttons, inputs ------------------------------------------------------------------------------ */
.btn, button.primary, button.secondary, button.danger, .row > button, .card > button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 8px 15px;
  border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 13.5px; line-height: 1.2; text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.btn:hover, button.secondary:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text-strong); text-decoration: none; }
button.primary, .btn.primary { background: var(--accent); border-color: transparent; color: var(--text-inverse); }
button.primary:hover:not(:disabled), .btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); color: var(--text-inverse); }
button.danger { background: var(--deny); border-color: transparent; color: #fff; }
button:disabled { opacity: 0.5; cursor: default; }
.btn .ic { width: 15px; height: 15px; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; min-height: 0; }
/* A code field as wide as its code: each character is 1ch plus the letter-spacing (0.14em, below), then the padding and
   border (26px) and a little room for the caret. 7 characters for the email code ("123 456"), 9 for a terminal
   sign-in code ("ABCD-EFGH", .code-9). Never wider than its card. */
input[type="text"].code-input { --code-chars: 7; width: calc(var(--code-chars) * (1ch + 0.14em) + 26px + 1ch); max-width: 100%; }
input[type="text"].code-input.code-9 { --code-chars: 9; }
.hint { margin-top: 18px; }
.sent-to-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 16px; }
.sent-to-row strong { font-size: 17px; overflow-wrap: anywhere; }
.sent-to-row button.secondary { min-height: 32px; padding: 4px 12px; }
#email-hint { margin-top: 8px; }
button.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border-radius: var(--r-md); border: 1px solid var(--border-subtle); background: var(--surface); color: var(--text-muted);
}
.icon-btn:hover { color: var(--text-strong); border-color: var(--border); }
.icon-btn .ic { width: 16px; height: 16px; }

label { display: block; font-weight: 600; font-size: 13px; color: var(--text-strong); margin-bottom: 6px; }
input[type="email"], input[type="text"], input[type="date"], textarea, select {
  width: 100%; padding: 10px 12px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg); color: var(--text-strong);
  font-size: 14px;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
/* The terms checkbox (SIG-93): native control, the whole label toggles it, the links open in a new tab. */
.agree { display: flex; gap: 10px; align-items: flex-start; margin: 2px 0 14px; }
.agree input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.agree label { margin: 0; font-weight: 400; font-size: 13.5px; line-height: 1.45; color: var(--text); cursor: pointer; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row input { flex: 1 1 200px; margin-bottom: 0; }

/* ---- messages ------------------------------------------------------------------------------------- */
.msg { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; margin: 12px 0; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.msg.ok { border-color: color-mix(in srgb, var(--approve) 45%, transparent); background: var(--approve-soft); color: var(--text-strong); }
.msg.bad { border-color: color-mix(in srgb, var(--deny) 50%, transparent); background: var(--deny-soft); color: var(--text-strong); }
.msg.warn, .warn { border: 1px solid color-mix(in srgb, var(--pending) 45%, transparent); background: var(--pending-soft); color: var(--text-strong); border-radius: var(--r-lg); padding: 10px 14px; }
p.bad { color: var(--deny); }

/* ---- cards, lists, key/value ------------------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--r-xl); padding: 18px; margin: 12px 0; }
.card > p:last-child { margin-bottom: 0; }
.card > :first-child { margin-top: 0; }
.card > button + p { margin-top: 12px; }
.list { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 12px 14px; }
.list li > div { min-width: 0; overflow-wrap: anywhere; }
.list li strong { color: var(--text-strong); font-weight: 600; }
.list li .dim { display: block; font-size: 12.5px; margin-top: 2px; }
.list li.current { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.li-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-raised); display: grid; place-items: center; color: var(--text); flex: none; }
.li-ic .ic { width: 18px; height: 18px; }
.li-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kv { display: grid; grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); gap: 7px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.kv dd.mono { font-size: 12px; }

/* ---- chips, tags ---------------------------------------------------------------------------------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 500 10.5px/16px var(--font-sans); letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.chip.t3 { color: var(--tier-3); border-color: color-mix(in srgb, var(--tier-3) 45%, transparent); }
.chip.t2 { color: var(--tier-2); border-color: color-mix(in srgb, var(--tier-2) 45%, transparent); }
.tag { display: inline-flex; align-items: center; gap: 5px; font: 500 11.5px/1 var(--font-sans); padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.tag .ic { width: 12px; height: 12px; }
.tag.ok { color: var(--approve); background: var(--approve-soft); }
.tag.bad { color: var(--deny); background: var(--deny-soft); }
.tag.warn { color: var(--pending); background: var(--pending-soft); }
.tag.soft { color: var(--text-muted); background: var(--surface-raised); }
.tag.brand { color: var(--accent); background: var(--accent-soft); }
.rchip { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--font-mono); padding: 4px 8px 4px 6px; border-radius: 6px; background: var(--surface-raised); color: var(--text); border: 1px solid var(--border-subtle); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rdot { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--rc, var(--border-strong)); }
.rc0 { --rc: var(--rc0); } .rc1 { --rc: var(--rc1); } .rc2 { --rc: var(--rc2); } .rc3 { --rc: var(--rc3); } .rc4 { --rc: var(--rc4); } .rc5 { --rc: var(--rc5); }
.rcx { --rc: var(--accent); }

/* ---- signed-out and focused pages (sign-up, sign-in, recover, verify, terminal sign-in) ------------- */
body.solo {
  background:
    radial-gradient(900px 480px at 50% -10%, var(--accent-glow), transparent 70%),
    var(--bg-deep);
}
.solo-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.solo-top { display: flex; align-items: center; gap: 12px; padding: 18px 24px; }
.solo-top nav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.solo-top nav a { color: var(--text-muted); font-weight: 500; }
.solo-top nav a:hover { color: var(--text-strong); text-decoration: none; }
.solo main { width: 100%; max-width: 480px; margin: 0 auto; padding: 5vh 16px 48px; flex: 1; }
body.solo.wide main { max-width: 760px; }
.solo h1 { font-size: 30px; line-height: 36px; }
.solo .card { padding: 22px; border-radius: var(--r-2xl); }
.solo .card button.primary { width: 100%; min-height: 44px; font-size: 14.5px; }
.solo .alt { text-align: center; margin-top: 18px; font-size: 13.5px; }
.hero-seal { display: flex; justify-content: flex-start; margin-bottom: 18px; }
.hero-seal .seal { width: 52px; height: 52px; animation: press 0.9s cubic-bezier(0.2, 1.4, 0.3, 1) both 0.1s; }
.points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; font-size: 13px; color: var(--text-muted); }
.points li { display: flex; gap: 10px; align-items: flex-start; }
.points .ic { color: var(--approve); margin-top: 2px; }
.steps { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; font-size: 12.5px; color: var(--text-muted); }
.steps span { display: inline-flex; align-items: center; gap: 6px; }
.steps i { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 11px/1 var(--font-mono); font-style: normal; background: var(--surface-raised); color: var(--text-muted); border: 1px solid var(--border); }
.steps .on i { background: var(--accent); color: var(--text-inverse); border-color: transparent; }
.steps .on { color: var(--text-strong); }
.steps hr { width: 24px; border: 0; border-top: 1px solid var(--border); margin: 0; }
footer.foot { color: var(--text-faint); font-size: 12px; text-align: center; padding: 18px 16px 22px; }
footer.foot p { margin: 0; }
footer.foot .foot-links { margin-top: 6px; }
footer.foot .foot-links a { color: var(--text-muted); }

/* ---- lockup ---------------------------------------------------------------------------------------- */
.lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--text-strong); text-decoration: none; }
.lockup:hover { text-decoration: none; }
.lockup .seal { width: 28px; height: 28px; }
.lockup .word { font-weight: 600; font-size: 20px; letter-spacing: -0.035em; }
.lockup .env { font: 500 10px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 4px 7px; }

/* ---- terminal sign-in (ApprovalCard treatment) ----------------------------------------------------- */
.pc {
  position: relative; overflow: hidden;
  background: color-mix(in srgb, var(--bg) 55%, var(--surface));
  border: 1px solid var(--border); border-radius: 18px;
  padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 12px;
}
.pc__top { display: flex; align-items: center; gap: 8px; font: 12px/1 var(--font-mono); color: var(--text-muted); min-width: 0; }
.pc__top .seal { width: 20px; height: 20px; }
.pc__gw { color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc__timer { margin-left: auto; color: var(--pending); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }
.pc__timer.low { color: var(--deny); }
.pc__ask { margin: 2px 0 0; font-size: 21px; line-height: 28px; font-weight: 500; letter-spacing: -0.01em; color: var(--text-strong); overflow-wrap: anywhere; }
.pc__ask b { font-weight: 650; }
.pc__detail { margin: -4px 0 0; font-size: 13.5px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pc__who { margin: 0; font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.pc__links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; }
.pc__links a { overflow-wrap: anywhere; }
.pc__bar { position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--border-subtle); }
.pc__bar i { display: block; height: 100%; width: 100%; background: var(--pending); transform-origin: left; transition: transform 1s linear, background-color 0.3s; }
.pc__bar i.low { background: var(--deny); }
.pc__code { font: 600 36px/1.1 var(--font-mono); letter-spacing: 0.14em; color: var(--text-strong); margin: 4px 0 2px; overflow-wrap: anywhere; }
.decide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.decide button {
  min-height: 48px; width: 100%; padding: 10px 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; font-weight: 650; font-size: 15px; border: 1px solid;
}
.decide .ic { width: 16px; height: 16px; }
.decide .approve { color: var(--approve); background: var(--approve-soft); border-color: color-mix(in srgb, var(--approve) 55%, transparent); }
.decide .deny { color: var(--deny); background: var(--deny-soft); border-color: color-mix(in srgb, var(--deny) 55%, transparent); }
.decide .approve:hover:not(:disabled) { background: color-mix(in srgb, var(--approve) 20%, transparent); }
.decide .deny:hover:not(:disabled) { background: color-mix(in srgb, var(--deny) 20%, transparent); }
input[type="text"].code-input { font: 600 22px/1.2 var(--font-mono); letter-spacing: 0.14em; text-align: center; text-transform: uppercase; }

/* ---- signed-in shell ------------------------------------------------------------------------------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 14px 16px;
  background: var(--bg);
  border-right: 1px solid var(--border-subtle);
}
.side .lockup { padding: 2px 8px 6px; }
.side .lockup .env { margin-left: auto; }
.gw-switch { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-subtle); }
.gw-switch:hover, .gw-switch:focus-within { border-color: var(--border); }
.gw-switch .gw-ic { grid-row: span 2; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-raised); display: grid; place-items: center; color: var(--text-muted); }
.gw-switch .gw-nm { font-weight: 600; color: var(--text-strong); display: flex; align-items: center; gap: 8px; min-width: 0; }
.gw-switch .gw-nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-switch .gw-sub { font: 11px/1.3 var(--font-mono); color: var(--text-muted); grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-switch select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.gw-switch .chev { position: absolute; right: 10px; top: 50%; margin-top: -8px; color: var(--text-faint); }
.gw-switch:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; background: var(--approve); box-shadow: 0 0 0 3px var(--approve-soft); }
.dot.off { background: var(--text-faint); box-shadow: none; }
.dot.bad { background: var(--deny); box-shadow: 0 0 0 3px var(--deny-soft); }
.dot.live { animation: livepulse 2.4s ease-in-out infinite; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .grp { font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); padding: 14px 10px 8px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); color: var(--text-muted); font-weight: 500; text-decoration: none; }
.nav a .ic { width: 17px; height: 17px; }
.nav a:hover { color: var(--text-strong); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text-strong); background: var(--surface-raised); box-shadow: inset 2px 0 0 var(--accent); }
.nav .count { margin-left: auto; font: 600 11px/1 var(--font-mono); padding: 3px 7px; border-radius: 999px; background: var(--pending-soft); color: var(--pending); }
.nav .count.n { background: var(--surface-raised); color: var(--text-muted); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.freeze { border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 12px; background: linear-gradient(180deg, var(--surface), var(--bg)); }
.freeze .fz { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-strong); }
.freeze .fz .ic { color: var(--accent); }
.freeze.on { border-color: color-mix(in srgb, var(--deny) 50%, transparent); }
.freeze.on .fz .ic { color: var(--deny); }
.freeze p { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 4px 0 8px; }
.me .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #38b6a5, #1b5f57); display: grid; place-items: center; color: #0b1020; font-weight: 700; flex: none; text-transform: uppercase; }
.me .who { font-weight: 600; color: var(--text-strong); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .plan { font-size: 11.5px; color: var(--text-muted); }
.me > div { min-width: 0; flex: 1; }
.me .icon-btn { width: 30px; height: 30px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 28px;
  background: color-mix(in srgb, var(--bg-deep) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  min-height: 60px;
}
.crumb { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-weight: 500; white-space: nowrap; min-width: 0; }
.crumb span { overflow: hidden; text-overflow: ellipsis; }
.crumb b { color: var(--text-strong); font-weight: 600; }
.chainpill { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--approve) 40%, transparent); background: var(--approve-soft); color: var(--approve); font-weight: 600; font-size: 12.5px; text-decoration: none; }
.chainpill:hover { text-decoration: none; border-color: var(--approve); }
.chainpill .seal { width: 18px; height: 18px; }
.chainpill .mono { color: var(--text); font-weight: 500; }
.chainpill.bad { color: var(--deny); border-color: color-mix(in srgb, var(--deny) 45%, transparent); background: var(--deny-soft); }
.chainpill.none { color: var(--text-muted); border-color: var(--border); background: var(--surface); }
.view { padding: 26px 28px 40px; flex: 1; width: 100%; max-width: 1480px; animation: viewin 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.view.narrow > * { max-width: 760px; }
.vh { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.vh h1 { margin: 0; }
.vh p { margin: 4px 0 0; color: var(--text-muted); max-width: 80ch; }
.vh .act { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
/* A page without the sticky top bar (the Cloud page): its title row holds the theme toggle, and nothing covers a
   focused or linked panel, so the bar's scroll margin is not needed. */
.no-top .vh .act { align-items: center; }
.no-top .panel[id], .no-top .hero[id] { scroll-margin-top: 16px; }
.app footer.foot { text-align: left; padding: 14px 28px 22px; border-top: 1px solid var(--border-subtle); }

/* ---- panels ---------------------------------------------------------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--r-xl); min-width: 0; }
.panel[id], .hero[id] { scroll-margin-top: 76px; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; flex-wrap: wrap; }
.panel-h h2 { margin: 0; font-size: 15px; font-weight: 600; }
.panel-h .more { margin-left: auto; font-size: 12.5px; font-weight: 600; }
.panel-b { padding: 12px 18px 18px; }
.danger-zone { margin-top: 28px; border-color: color-mix(in srgb, var(--deny) 45%, transparent); }
.danger-zone .panel-h h2 { color: var(--deny); }
.danger-zone input { max-width: 320px; }
.danger-zone button.danger { margin-top: 2px; }
.empty { padding: 26px 18px; text-align: center; color: var(--text-muted); font-size: 13.5px; }
.empty .seal { width: 34px; height: 34px; opacity: 0.85; margin-bottom: 6px; }
.empty b { display: block; color: var(--text-strong); font-weight: 600; margin-bottom: 4px; }
.skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-raised), var(--surface-hover), var(--surface-raised)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; margin: 10px 0; }
.skel.w60 { width: 60%; } .skel.w40 { width: 40%; } .skel.w80 { width: 80%; }

/* ---- overview -------------------------------------------------------------------------------------- */
.ov { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
.ov .full { grid-column: 1 / -1; }
.hero {
  position: relative; overflow: hidden; padding: 20px;
  border-radius: var(--r-2xl); border: 1px solid var(--border-subtle);
  background:
    radial-gradient(600px 260px at 15% -10%, var(--accent-glow), transparent 70%),
    radial-gradient(500px 240px at 110% 120%, var(--pending-glow), transparent 70%),
    var(--surface);
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.hero-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-h .lbl { color: var(--pending); }
.hero.idle .hero-h .lbl { color: var(--text-faint); }
.hero-h .count { margin-left: auto; font-size: 12.5px; color: var(--text-muted); }
.ring { width: 9px; height: 9px; border-radius: 50%; background: var(--pending); position: relative; flex: none; }
.ring::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--pending); opacity: 0; animation: ring 1.8s ease-out infinite; }
.hero.idle .ring { background: var(--approve); }
.hero.idle .ring::after { display: none; }
.pc__waiting { display: flex; align-items: center; gap: 12px; margin-top: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface-raised); border: 1px solid var(--border-subtle); }
.phone { width: 26px; height: 40px; border-radius: 7px; border: 2px solid var(--text-muted); position: relative; flex: none; }
.phone::before { content: ""; position: absolute; top: 3px; left: 50%; width: 8px; height: 2px; margin-left: -4px; border-radius: 2px; background: var(--text-muted); }
.phone::after { content: ""; position: absolute; inset: 9px 4px 9px; border-radius: 3px; background: var(--pending); opacity: 0.85; animation: buzz 2.6s ease-in-out infinite; }
.pc__waiting b { color: var(--text-strong); display: block; font-weight: 600; }
.pc__waiting span { font-size: 12.5px; color: var(--text-muted); }
.pc__waiting .btn { margin-left: auto; flex: none; }
.pc.unverified { border-color: color-mix(in srgb, var(--deny) 50%, transparent); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px 18px 18px; }
.stat { padding: 14px; border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--border-subtle); min-width: 0; }
.stat .v { font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 14px; color: var(--text-muted); font-weight: 500; letter-spacing: 0; margin-left: 1px; }
.stat .k { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.sw { width: 8px; height: 8px; border-radius: 2px; flex: none; background: var(--border-strong); }
.sw.a { background: var(--approve); } .sw.d { background: var(--deny); } .sw.e { background: var(--border-strong); }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 72px; padding: 0 18px; }
.bars .b { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; height: 100%; min-width: 0; }
.bars .b i { display: block; border-radius: 2px; transform-origin: bottom; animation: grow 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.bars .b i.a { background: var(--approve); opacity: 0.85; }
.bars .b i.d { background: var(--deny); }
.bars .b i.e { background: var(--border-strong); }
.bars .b i.z { background: var(--border); height: 2px; opacity: 0.6; }
.bars-x { display: flex; justify-content: space-between; padding: 6px 18px 14px; font: 11px/1 var(--font-mono); color: var(--text-faint); }
.split { padding: 0 18px 18px; }
.split-bar { display: flex; gap: 3px; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-raised); }
.split-bar i { display: block; height: 100%; background: var(--rc); }
.split-k { display: flex; gap: 8px 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--text-muted); }
.split-k span { display: inline-flex; align-items: center; gap: 6px; }
.split-k b { color: var(--text-strong); font-family: var(--font-mono); font-weight: 600; }
.split-k .dim { margin-left: auto; }
.repos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 18px 18px; }
.repo { padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--border-subtle); background: var(--bg); display: flex; flex-direction: column; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
a.repo:hover { border-color: var(--border); text-decoration: none; }
.repo-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.repo-h .nm { font: 600 14px/1.2 var(--font-mono); color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-h .tag { margin-left: auto; }
.repo .strip { display: flex; gap: 3px; }
.repo .strip i { flex: 1; height: 18px; border-radius: 3px; background: var(--surface-raised); }
.repo .strip i.a { background: color-mix(in srgb, var(--approve) 70%, transparent); }
.repo .strip i.d { background: var(--deny); }
.repo .strip i.e { background: var(--border-strong); }
.repo .meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.repo .tools { font: 11.5px/1.4 var(--font-mono); color: var(--text-muted); overflow-wrap: anywhere; }
.repo.add { align-items: center; justify-content: center; text-align: center; border-style: dashed; color: var(--text-muted); gap: 6px; font-size: 12.5px; }
.repo.add b { color: var(--text-strong); }
.repo.add code { font-size: 12px; padding: 6px 10px; }
.devs { padding: 6px 18px 14px; display: flex; flex-direction: column; }
.dev { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); min-width: 0; }
.dev:last-child { border-bottom: 0; }
.dev > div { min-width: 0; flex: 1; }
.dev .nm { font-weight: 600; color: var(--text-strong); overflow-wrap: anywhere; }
.dev .sub { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.dev .tag { flex: none; }
.dev > button { flex: none; }
.dev.note { font-size: 12.5px; color: var(--text-muted); display: block; }
.dev.revoked { opacity: 0.6; }

/* ---- timeline (ledger rows) ------------------------------------------------------------------------ */
.tl { position: relative; padding: 6px 18px 12px; }
.tl.list { padding: 4px 8px 10px; }
.day { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; padding-left: 40px; }
.day:first-child { margin-top: 8px; }
.day .lbl { color: var(--text-muted); }
.day hr { flex: 1; border: 0; border-top: 1px solid var(--border-subtle); margin: 0; }
.ent {
  position: relative; display: grid;
  grid-template-columns: 28px 52px minmax(0, 1fr) auto;
  gap: 4px 12px; align-items: start;
  padding: 11px 12px 11px 0; border-radius: var(--r-lg);
  cursor: pointer; animation: rowin 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  color: inherit; text-decoration: none; width: 100%; text-align: left; background: none; border: 0; font: inherit;
}
.ent:hover { background: var(--surface-hover); text-decoration: none; }
.ent[aria-current="true"] { background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--border); }
.ent:focus-visible { outline-offset: -2px; }
.ent .rail { position: relative; height: 100%; display: flex; justify-content: center; }
.ent .rail::before { content: ""; position: absolute; top: -11px; bottom: -11px; width: 2px; background: var(--border); left: 50%; margin-left: -1px; }
.day + .ent .rail::before { top: 14px; }
.ent.last .rail::before { bottom: auto; height: 25px; }
.node { position: relative; z-index: 1; margin-top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--surface); }
.node .ic { width: 12px; height: 12px; }
.node.approve { background: var(--approve); color: var(--text-inverse); }
.node.deny { background: var(--deny); color: var(--text-inverse); }
.node.expired, .node.none { background: var(--surface-raised); color: var(--text-muted); box-shadow: 0 0 0 1px var(--border-strong); }
.node.pending { background: var(--pending); color: var(--text-inverse); }
.node.failed { background: var(--surface); color: var(--deny); box-shadow: 0 0 0 1.5px var(--deny); }
.ent .t { font: 12px/22px var(--font-mono); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ent .body { min-width: 0; }
.ent .line { color: var(--text-strong); font-weight: 500; font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.ent .line .m { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); }
.ent .line.withheld { color: var(--deny); font-weight: 500; }
.ent .line.raw { color: var(--text); font-family: var(--font-mono); font-size: 12.5px; }
.ent .sub { display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: var(--text-muted); min-width: 0; }
.ent .sub .mono { overflow-wrap: anywhere; }
.reason { margin-top: 6px; font-size: 12.5px; color: var(--text); padding: 6px 10px; border-left: 2px solid var(--deny); background: var(--deny-soft); border-radius: 0 6px 6px 0; overflow-wrap: anywhere; }
.ent .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 1px; }
.dec { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.dec .ic { width: 14px; height: 14px; }
.dec.approve { color: var(--approve); }
.dec.deny { color: var(--deny); }
.dec.expired, .dec.none { color: var(--text-muted); }
.dec.failed { color: var(--deny); }
.ver { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--approve); white-space: nowrap; }
.ver .ic { width: 13px; height: 13px; }
.ver.failed { color: var(--deny); }
.ver.unverifiable, .ver.quiet { color: var(--text-muted); }

/* ---- ledger ---------------------------------------------------------------------------------------- */
.chainbar {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 18px 20px; margin-bottom: 14px;
  border-radius: var(--r-2xl);
  border: 1px solid color-mix(in srgb, var(--approve) 30%, var(--border-subtle));
  background: radial-gradient(420px 160px at 0% 50%, var(--approve-glow), transparent 70%), var(--surface);
}
.chainbar.bad { border-color: color-mix(in srgb, var(--deny) 45%, var(--border-subtle)); background: radial-gradient(420px 160px at 0% 50%, var(--deny-soft), transparent 70%), var(--surface); }
.chainbar.none { border-color: var(--border-subtle); background: var(--surface); }
.chainbar .bigseal { width: 54px; height: 54px; animation: press 0.9s cubic-bezier(0.2, 1.4, 0.3, 1) both 0.2s; }
.chainbar h3 { margin: 0; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chainbar p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.chainbar .hashes { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.hb { font: 11px/1 var(--font-mono); padding: 5px 7px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border-subtle); color: var(--text-muted); animation: hashin 0.4s ease both; white-space: nowrap; }
.hb.head { color: var(--approve); border-color: color-mix(in srgb, var(--approve) 40%, transparent); }
.hb.bad { color: var(--deny); border-color: color-mix(in srgb, var(--deny) 40%, transparent); }
.chainbars { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.chainbars .chainbar { margin-bottom: 0; }
.vprog { min-width: 240px; }
.vprog .n { font-size: 22px; font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.vprog .n small { font-size: 13px; color: var(--text-muted); font-weight: 500; letter-spacing: 0; }
.vprog .track { height: 6px; border-radius: 99px; background: var(--bg); overflow: hidden; margin: 8px 0 6px; }
.vprog .track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--approve)); border-radius: 99px; transition: width 0.6s cubic-bezier(0.3, 0.7, 0.2, 1); }
.vprog .track i.bad { background: var(--deny); }
.vprog .s { font-size: 11.5px; color: var(--text-muted); }
.vprog .s.bad { color: var(--deny); }
.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-subtle); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 12.5px; color: var(--text-muted); min-height: 0; }
.seg button[aria-pressed="true"] { background: var(--surface-raised); color: var(--text-strong); box-shadow: 0 0 0 1px var(--border); }
.fchip { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--text-muted); margin: 0; min-height: 32px; white-space: nowrap; }
button.fchip { cursor: pointer; }
.fchip:hover { border-color: var(--border); color: var(--text); }
.fchip b { color: var(--text-strong); font-weight: 600; }
.fchip[aria-pressed="true"], .fchip.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); color: var(--text); }
.fchip select, .fchip input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; padding: 0; border: 0; }
.fchip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.fchip .ic { width: 12px; height: 12px; }
.tools .cnt { font-size: 12.5px; color: var(--text-muted); margin-left: auto; }
.lg { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 18px; align-items: start; }
.lg.nodetail { grid-template-columns: minmax(0, 1fr); }
.lg:not(.nodetail) .cols { grid-template-columns: minmax(0, 1fr); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cols.one { grid-template-columns: minmax(0, 1fr); }
.col-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px 4px; }
.col-h .nm { font: 600 14px var(--font-mono); color: var(--text-strong); overflow-wrap: anywhere; }
.col-h .st { margin-left: auto; display: flex; gap: 10px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.col-h .st b { color: var(--text-strong); }
.more-row { display: flex; justify-content: center; padding: 6px 0 14px; }
.legend { margin-top: 16px; font-size: 12.5px; color: var(--text-muted); max-width: 110ch; }

/* detail side panel */
.detail { position: sticky; top: 76px; overflow: hidden; }
.detail:focus { outline: none; }
.detail .dh { display: flex; align-items: center; gap: 10px; padding: 14px 18px 12px; border-bottom: 1px solid var(--border-subtle); }
.detail .dh .lbl { color: var(--text-muted); }
.detail .dh .icon-btn { margin-left: auto; width: 30px; height: 30px; }
.detail .db { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - 150px); overflow: auto; }
.detail .db > * { flex-shrink: 0; }
.stampcard { position: relative; border-radius: 16px; padding: 18px; border: 1px solid var(--border); background: var(--bg); overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.stampcard.approve { border-color: color-mix(in srgb, var(--approve) 55%, transparent); }
.stampcard.deny { border-color: color-mix(in srgb, var(--deny) 55%, transparent); }
.stampcard.failed { border-color: color-mix(in srgb, var(--deny) 70%, transparent); }
.stampcard .pc__ask { font-size: 18px; line-height: 25px; padding-right: 88px; }
.stampcard .pc__ask .m { font-family: var(--font-mono); font-size: 15.5px; }
.stampcard .note { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.stamp {
  position: absolute; right: 14px; top: 14px;
  display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%;
  border: 2px solid currentColor; box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4px currentColor; transform: rotate(-12deg);
  font: 700 9px/1.1 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; text-align: center;
  animation: stamp 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.stamp .ic { width: 20px; height: 20px; display: block; margin: 0 auto 2px; }
.stamp.approve { color: var(--approve); }
.stamp.deny { color: var(--deny); }
.stamp.expired, .stamp.none { color: var(--text-muted); }
.stamp.failed { color: var(--deny); }
.sect h4 { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sect h4 .ver { margin-left: auto; }
.sect .kv { font-size: 12.5px; grid-template-columns: 116px minmax(0, 1fr); }
.sect .kv dd.mono { font-size: 11.5px; }
.sect + .sect { border-top: 1px solid var(--border-subtle); padding-top: 16px; }
.sect .msg, .sect .warn { margin: 0 0 10px; font-size: 12.5px; }
.links { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; }
.links a { overflow-wrap: anywhere; }
pre.code { margin: 0; padding: 12px 0; border-radius: 10px; background: var(--bg); border: 1px solid var(--border-subtle); font: 11.5px/18px var(--font-mono); color: var(--text); overflow: auto; counter-reset: ln; max-height: 300px; }
pre.code .l { display: block; padding: 0 12px 0 0; white-space: pre; }
pre.code .l::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 30px; margin-right: 12px; text-align: right; color: var(--text-faint); }
pre.code.raw { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; }
.j-k { color: var(--j-key); } .j-s { color: var(--j-str); } .j-n { color: var(--j-num); }
.rawsum { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-muted); margin-bottom: 6px; }
.copy { font-size: 11.5px; }

/* ---- toast ----------------------------------------------------------------------------------------- */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 20; display: flex; flex-direction: column; gap: 10px; width: 350px; max-width: calc(100vw - 32px); }
.toast {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center;
  padding: 14px 16px; border-radius: 14px; background: var(--surface-raised);
  border: 1px solid color-mix(in srgb, var(--approve) 45%, transparent);
  box-shadow: var(--shadow);
  animation: toastin 0.6s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}
.toast.deny { border-color: color-mix(in srgb, var(--deny) 50%, transparent); }
.toast.out { animation: toastout 0.4s ease both; }
.toast .seal { width: 34px; height: 34px; grid-row: span 2; }
.toast b { color: var(--text-strong); font-weight: 600; overflow-wrap: anywhere; }
.toast span { font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }

/* ---- Signeto Cloud onboarding (/account/cloud, cloud.js) ------------------------------------------- */
.cl-plan { margin-bottom: 16px; }
.cl-plan .panel-b { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding-top: 14px; }
.cl-planline { margin: 0; font-weight: 600; color: var(--text-strong); }
.cl-plan.expired { border-color: color-mix(in srgb, var(--deny) 45%, transparent); }
.cl { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
body[data-page="cloud"] .view.narrow > * { max-width: 1000px; }
.cl-steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; position: relative; }
/* position: the steps' screen-reader labels (.sr, absolute) stay inside the list, so the row that scrolls sideways on a
   phone does not widen the page. An empty action row under the plan line takes no space. */
.cl-plan .row:empty { display: none; }
.cl-s { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-md); background: none; color: var(--text-muted); font-weight: 500; text-align: left; min-height: 40px; }
.cl-s:hover:not(:disabled) { background: var(--surface); color: var(--text-strong); }
.cl-s i { width: 22px; height: 22px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font: 600 11px/1 var(--font-mono); font-style: normal; background: var(--surface-raised); border: 1px solid var(--border); color: var(--text-muted); }
.cl-s i .ic { width: 12px; height: 12px; }
.cl-s.done i { background: var(--approve-soft); border-color: color-mix(in srgb, var(--approve) 45%, transparent); color: var(--approve); }
.cl-s.on { background: var(--surface-raised); color: var(--text-strong); box-shadow: inset 2px 0 0 var(--accent); }
.cl-s.on i { background: var(--accent); border-color: transparent; color: var(--text-inverse); }
.cl-s:disabled { opacity: 0.55; }
.cl-step:focus { outline: none; }
.cl-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cl-step h2 { margin: 4px 0 12px; }
.cl-step .row { margin-top: 12px; }
.cl-step textarea { font-family: var(--font-mono); font-size: 13px; resize: vertical; }
.cl-qrbox { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin: 6px 0 12px; }
.cl-qrbox > div { flex: 1 1 240px; min-width: 0; }
.cl-qr { width: 232px; height: 232px; flex: none; border-radius: var(--r-lg); border: 1px solid var(--border-subtle); background: #ffffff; }
.cl-email strong { color: var(--text-strong); overflow-wrap: anywhere; }
.cl-free { margin-top: 14px; }
.cl-list { margin: 6px 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.cl-guide-h { margin: 8px 0 0; font-weight: 600; color: var(--text-strong); }
.cl-manual { margin: 8px 0 12px; }
.cl-manual summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.cl-uri { display: block; margin: 6px 0 8px; padding: 8px 10px; font-size: 12px; word-break: break-all; }
.cl-fp { margin: 4px 0; }
.cl-fp .mono { font-size: 16px; letter-spacing: 0.06em; color: var(--text-strong); }
.cl-pair .pc { margin: 6px 0 12px; }
.cl-token { margin: 14px 0 6px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--bg); }
.cl-token-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cl-token-h b { color: var(--text-strong); }
.cl-linebox { overflow-x: auto; }
.cl-line { display: block; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; word-break: break-all; white-space: pre-wrap; user-select: all; }
.cl-ask { margin-top: 10px; }
.cl-ask .pc__timer { margin-left: 6px; }
.cl-approve { font-size: 15px; color: var(--text-strong); }
.cl-sum { margin: 6px 0 14px; }
.cl-tok { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cl-tok button.secondary { min-height: 30px; padding: 4px 10px; }
.cl-sub { border-top: 1px solid var(--border-subtle); padding-top: 4px; margin-top: 16px; }
.cl-sub.cl-reco h3 { color: var(--pending); }
.cl-protect { margin-top: 18px; border-color: color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cl-protect:focus { outline: none; }
.cl-repos li { display: block; }
.cl-repo-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cl-repo-h input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.cl-repo-h label { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.cl-repo-h .tag { margin-left: auto; }
.cl-repo .note { margin: 6px 0 0 28px; }
.cl-unseen b { color: var(--text-strong); font-weight: 600; }
.cl-rg { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--border-subtle); }
.cl-rg details { flex-basis: 100%; }
.cl-rg summary, .cl-add summary { cursor: pointer; color: var(--accent); font-weight: 500; font-size: 13px; }
.cl-add { margin: 4px 0 8px; }
.cl-add .row input { max-width: 320px; }
.cl-spin { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin 0.9s linear infinite; vertical-align: -1px; }
.trust { margin-top: 22px; padding: 16px 18px; border-radius: var(--r-xl); border: 1px solid var(--border-subtle); background: var(--surface); font-size: 13.5px; }
.trust p:last-child { margin-bottom: 0; }
.trust strong { color: var(--text-strong); }
.cl-step .trust { margin: 6px 0 12px; background: var(--bg); }
.cl-callout { margin-bottom: 18px; }
.cl-callout h2 { display: inline-flex; align-items: center; gap: 8px; }
.cl-mini { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.cl-mini li { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- motion ---------------------------------------------------------------------------------------- */
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } }
@keyframes rowin { from { opacity: 0; transform: translateY(8px); } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes ring { 0% { opacity: 0.7; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes livepulse { 50% { box-shadow: 0 0 0 6px transparent; } }
@keyframes buzz { 0%, 70%, 100% { transform: none; } 74% { transform: translateX(-1px); } 78% { transform: translateX(1px); } 82% { transform: translateX(-1px); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-12deg) scale(1.9); } }
@keyframes press { 0% { opacity: 0; transform: scale(1.5) rotate(8deg); } 60% { opacity: 1; } }
@keyframes hashin { from { opacity: 0; transform: translateX(-6px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes toastin { from { opacity: 0; transform: translateY(40px); } }
@keyframes toastout { to { opacity: 0; transform: translateY(20px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- responsive ------------------------------------------------------------------------------------ */
@media (max-width: 1240px) {
  .lg { grid-template-columns: minmax(0, 1fr); }
  .detail { position: static; }
  .detail .db { max-height: none; }
  .repos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .side .lockup { padding: 0; }
  .side .gw-switch { order: 3; width: 100%; }
  .side-foot { display: none; }
  .nav { order: 4; flex-direction: row; overflow-x: auto; width: 100%; gap: 4px; padding-bottom: 2px; scrollbar-width: none; }
  .nav .grp { display: none; }
  .nav a { white-space: nowrap; }
  .nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
  .side .mob { display: inline-flex; margin-left: auto; gap: 8px; }
  .ov, .cols, .cl { grid-template-columns: minmax(0, 1fr); }
  .cl-steps ol { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .cl-s { white-space: nowrap; width: auto; }
  .cl-s.on { box-shadow: inset 0 -2px 0 var(--accent); }
  .top { padding: 10px 16px; min-height: 52px; }
  .view { padding: 20px 16px 36px; }
  .chainbar { grid-template-columns: auto minmax(0, 1fr); }
  .vprog { grid-column: 1 / -1; min-width: 0; }
  .app footer.foot { padding: 14px 16px 20px; }
  .top-theme { display: none; }
}
@media (min-width: 921px) { .side .mob { display: none; } }
@media (max-width: 600px) {
  .repos, .stats { grid-template-columns: minmax(0, 1fr); }
  .ent { grid-template-columns: 24px minmax(0, 1fr); padding-right: 8px; }
  .ent .rail { grid-row: 1 / span 3; }
  .ent .t { grid-column: 2; line-height: 1.2; }
  .ent .body { grid-column: 2; }
  .ent .right { grid-column: 2; align-items: center; flex-direction: row; flex-wrap: wrap; gap: 10px; }
  .day { padding-left: 34px; }
  .chainpill .mono, .chainpill .txt { display: none; }
  .pc__waiting { flex-wrap: wrap; }
  .pc__waiting .btn { margin-left: 0; }
  .pc__ask { font-size: 19px; line-height: 26px; }
  .stampcard .pc__ask { padding-right: 0; padding-top: 70px; }
  .crumb .gwname, .crumb .sep { display: none; }
  .decide { grid-template-columns: 1fr; }
  .chainbar { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .chainbar .bigseal { width: 40px; height: 40px; }
  .toasts { right: 16px; bottom: 16px; }
  .tools .cnt { width: 100%; margin-left: 0; }
  .cl-qr { width: 100%; max-width: 260px; height: auto; }
  .cl-repo-h .tag { margin-left: 28px; }
  h1 { font-size: 24px; line-height: 30px; }
}
