/* StackHouseBTC
   Palette: cool paper + ink, cobalt for action, status colours only where status is shown.
   Type: Bricolage Grotesque (display, condensed width for the headline), Figtree (body), JetBrains Mono (addresses). */

:root {
  --paper: #EEF2F5;
  --surface: #FFFFFF;
  --sunk: #F4F7F9;
  --ink: #13212C;
  --muted: #5A6A77;
  --line: #D6DEE5;
  --line-strong: #B7C4CF;
  --cobalt: #1F43C8;
  --cobalt-hover: #1935A3;
  --cobalt-soft: #E3E9FB;
  --on-cobalt: #FFFFFF;
  --ok: #15805A;
  --ok-soft: #E0F2E9;
  --wait: #8F5E07;
  --wait-soft: #FAEFD8;
  --bad: #B3302A;
  --bad-soft: #FBE5E3;
  --qr-ink: #13212C;

  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-lg: 22px;
  --r-md: 12px;
  --r-sm: 8px;
  --focus: 0 0 0 3px color-mix(in srgb, var(--cobalt) 35%, transparent);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E151C;
    --surface: #15202A;
    --sunk: #111A23;
    --ink: #E4EBF0;
    --muted: #93A3B0;
    --line: #243340;
    --line-strong: #36495A;
    --cobalt: #7894FF;
    --cobalt-hover: #93AAFF;
    --cobalt-soft: #1B2850;
    --on-cobalt: #0A1230;
    --ok: #52C896;
    --ok-soft: #10352A;
    --wait: #E6B54F;
    --wait-soft: #372B10;
    --bad: #F2847A;
    --bad-soft: #3D1A18;
    --qr-ink: #13212C;
    color-scheme: dark;
  }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--cobalt); text-underline-offset: 3px; }
a:hover { color: var(--cobalt-hover); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; font-weight: 700; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: .5rem; background: var(--surface); padding: .5rem .8rem; border-radius: var(--r-sm); z-index: 50; }
.skip:focus { left: .75rem; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.wrap-any { overflow-wrap: anywhere; }

/* ---------- header / footer ---------- */

.site-head { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.brand:hover { color: var(--ink); }
.brand small { font-family: var(--body); font-weight: 500; font-size: .8rem; color: var(--muted); margin-left: .25rem; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark rect { fill: var(--cobalt); }
.brand-mark path { fill: none; stroke: var(--on-cobalt); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.site-nav { display: flex; gap: .25rem; }
.site-nav a { white-space: nowrap; color: var(--muted); text-decoration: none; padding: .45rem .7rem; border-radius: var(--r-sm); font-weight: 500; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); background: var(--surface); }
@media (max-width: 640px) { .hide-sm { display: none; } }
@media (max-width: 400px) { .hide-xs { display: none; } .site-nav a { padding: .45rem .5rem; } }

.site-foot { border-top: 1px solid var(--line); margin-top: 5rem; padding: 2.25rem 0 2.75rem; font-size: .9rem; color: var(--muted); }
.foot-inner { display: grid; gap: 1rem; }
.foot-note { max-width: 70ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.foot-links a { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding: clamp(2.5rem, 6vw, 5rem) 0 3rem;
}
.headline {
  font-size: clamp(2.9rem, 7.4vw, 6.2rem);
  font-stretch: 78%;
  font-variation-settings: 'wdth' 78, 'opsz' 96;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: .94;
  max-width: 9ch;
  text-wrap: balance;
  margin-top: .5rem;
}
.lede { font-size: 1.125rem; color: var(--muted); max-width: 46ch; margin-top: 1.4rem; }
.facts { list-style: none; padding: 0; margin: 2.2rem 0 0; display: grid; gap: .9rem; max-width: 48ch; }
.facts li { padding-left: 1.1rem; border-left: 2px solid var(--line-strong); color: var(--muted); }
.facts strong { color: var(--ink); font-weight: 600; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .headline { max-width: 12ch; }
  .panel { order: 2; }
  .facts { display: none; }
}

/* ---------- panel ---------- */

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: .5rem;
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px color-mix(in srgb, var(--ink) 35%, transparent);
}
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; background: var(--sunk); padding: .25rem; border-radius: calc(var(--r-lg) - 6px); }
.tabs button {
  border: 0; background: transparent; padding: .6rem .5rem; border-radius: calc(var(--r-lg) - 10px);
  font-weight: 600; color: var(--muted); cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 14%, transparent); }
.pane { padding: 1rem .9rem .9rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }

.leg { background: var(--sunk); border: 1px solid transparent; border-radius: var(--r-md); padding: .8rem .9rem .75rem; transition: border-color .15s; }
.leg:focus-within { border-color: var(--line-strong); }
.leg-label { display: block; font-size: .85rem; color: var(--muted); font-weight: 500; }
.leg-row { display: flex; align-items: center; gap: .75rem; margin-top: .15rem; }
.leg-hint { font-size: .82rem; color: var(--muted); min-height: 1.3em; margin-top: .2rem; }
.amount {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: .1rem 0;
  font-family: var(--display); font-size: clamp(1.45rem, 6.4vw, 2.1rem); font-weight: 600; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.amount:focus { outline: none; box-shadow: none; }
output.amount { display: block; }
.amount.is-loading { opacity: .4; }

.coin {
  display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .35rem .6rem .35rem .4rem; cursor: pointer; font-weight: 700; min-height: 44px;
}
.coin:hover:not(:disabled) { border-color: var(--line-strong); }
.coin:disabled { cursor: progress; }
.coin img { width: 28px; height: 28px; border-radius: 50%; }
.coin-fb {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--cobalt-soft); color: var(--cobalt); font-weight: 700; font-size: .8rem;
}
.coin .chev, .flip svg, .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.coin .chev { color: var(--muted); }
.coin-skel { color: var(--muted); font-weight: 500; padding: 0 .5rem; }
.coin-select { appearance: none; padding: .35rem 1rem; }
.net {
  font-size: .68rem; font-weight: 600; color: var(--cobalt); background: var(--cobalt-soft);
  padding: .1rem .35rem; border-radius: 4px; letter-spacing: .01em;
}

.flip-row { display: flex; justify-content: center; margin: -1.55rem 0; position: relative; z-index: 1; }
.flip {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); cursor: pointer;
}
.flip:hover:not(:disabled) { color: var(--cobalt); border-color: var(--line-strong); }

.field { display: grid; gap: .35rem; }
.field > label, .field-label { font-size: .9rem; font-weight: 600; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field select, .lookup-form input {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: .7rem .8rem; min-height: 46px;
}
.field input:focus, .field select:focus, .lookup-form input:focus { border-color: var(--cobalt); box-shadow: var(--focus); outline: none; }
.field-hint { font-size: .82rem; color: var(--muted); }

.more { border-top: 1px solid var(--line); padding-top: .75rem; }
.more summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); list-style-position: inside; }
.more[open] summary { margin-bottom: .9rem; color: var(--ink); }
.more .field + .field { margin-top: .9rem; }

.primary {
  display: inline-flex; justify-content: center; align-items: center; gap: .5rem;
  width: 100%; min-height: 52px; padding: .8rem 1.2rem; border: 0; border-radius: var(--r-md);
  background: var(--cobalt); color: var(--on-cobalt); font-weight: 700; font-size: 1.02rem; cursor: pointer;
}
.primary:hover:not(:disabled) { background: var(--cobalt-hover); }
.primary:disabled { opacity: .55; cursor: not-allowed; }
.fine { font-size: .8rem; color: var(--muted); }

.notice { font-size: .9rem; padding: .7rem .85rem; border-radius: var(--r-sm); background: var(--wait-soft); color: var(--ink); border-left: 3px solid var(--wait); }
.notice.is-error { background: var(--bad-soft); border-left-color: var(--bad); }
.link-btn { border: 0; background: none; padding: 0; color: var(--cobalt); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- how / faq ---------- */

.how, .faq { padding-top: 4rem; }
.how h2, .faq h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); letter-spacing: -.02em; font-stretch: 85%; font-variation-settings: 'wdth' 85; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before {
  content: counter(step); display: block; font-family: var(--display); font-weight: 700; font-size: 2.6rem;
  line-height: 1; color: var(--cobalt); margin-bottom: .8rem; font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.steps p { color: var(--muted); max-width: 36ch; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 1.5rem; } }

.faq-list { margin-top: 1.5rem; max-width: 760px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 1.05rem 2rem 1.05rem 0; font-weight: 600; font-size: 1.05rem; list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: .25rem; top: .85rem; font-size: 1.4rem; color: var(--muted); font-weight: 400; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list p { padding: 0 0 1.2rem; color: var(--muted); max-width: 66ch; }

/* ---------- dialogs ---------- */

.sheet {
  width: min(460px, 100% - 1.5rem); max-height: min(680px, 100% - 3rem);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0;
  background: var(--surface); color: var(--ink); display: none; flex-direction: column; overflow: hidden;
}
.sheet[open] { display: flex; }
.sheet::backdrop { background: color-mix(in srgb, #0B1219 55%, transparent); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1rem .5rem 1.2rem; }
.sheet-head h2 { font-size: 1.2rem; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
#pickerSearch { margin: .25rem 1rem .75rem; padding: .7rem .85rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--sunk); }
#pickerSearch:focus { border-color: var(--cobalt); box-shadow: var(--focus); outline: none; }
.picker-list { list-style: none; margin: 0; padding: 0 .5rem .75rem; overflow-y: auto; flex: 1; }
.picker-item {
  width: 100%; display: flex; align-items: center; gap: .75rem; text-align: left;
  border: 0; background: transparent; padding: .6rem .7rem; border-radius: var(--r-sm); cursor: pointer;
}
.picker-item:hover, .picker-item:focus-visible { background: var(--sunk); }
.picker-item[aria-current="true"] { background: var(--cobalt-soft); }
.picker-item img { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.pi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pi-tk { font-weight: 700; }
.pi-name { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-empty { padding: 1.5rem .75rem; color: var(--muted); }

.sheet-wide { width: min(500px, 100% - 1rem); max-height: calc(100% - 1rem); height: 720px; }
#buyFrame { border: 0; width: 100%; flex: 1; background: var(--surface); }

/* ---------- lookup / order ---------- */

.page-title { font-size: clamp(2rem, 4.6vw, 3.3rem); letter-spacing: -.03em; font-stretch: 82%; font-variation-settings: 'wdth' 82; text-wrap: balance; max-width: 22ch; }
.lookup { padding-top: 3.5rem; max-width: 640px; }
.lookup .lede { margin-top: .9rem; }
.lookup-form { display: flex; gap: .6rem; margin: 1.75rem 0 1rem; }
.lookup-form .primary { width: auto; flex-shrink: 0; }
@media (max-width: 520px) { .lookup-form { flex-direction: column; } .lookup-form .primary { width: 100%; } }

.order { padding-top: 2.5rem; }
.order-head .lede { margin-top: .8rem; }
.order-id { color: var(--muted); display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; font-size: .95rem; }
.order-id .mono { color: var(--ink); }
.save-hint { font-size: .85rem; color: var(--muted); margin-top: .6rem; }

.order-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.25rem; margin-top: 2rem;
  grid-template-areas: "deposit progress" "deposit details";
  align-items: start;
}
.deposit { grid-area: deposit; }
.progress { grid-area: progress; }
.details { grid-area: details; }
@media (max-width: 860px) {
  .order-grid { grid-template-columns: 1fr; grid-template-areas: "progress" "deposit" "details"; }
}

.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; align-content: start; }
.card h2 { font-size: 1.15rem; }

.send-amount { display: grid; gap: .2rem; justify-items: start; }
.send-label, .addr-label { font-size: .85rem; color: var(--muted); }
.send-value { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.addr-block { display: grid; gap: .35rem; justify-items: start; }
.addr { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .75rem .85rem; width: 100%; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.5; }
.memo .notice { width: 100%; }
.copy {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px;
  padding: .25rem .75rem; font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--ink); min-height: 32px;
}
.copy:hover { border-color: var(--cobalt); color: var(--cobalt); }
.qr { background: #fff; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); justify-self: start; line-height: 0; }
.qr:empty { display: none; }
.qr img, .qr canvas { display: block; }

.deposit.is-received .send-amount,
.deposit.is-received .addr-block,
.deposit.is-received .qr { opacity: .45; }
.deposit.is-received h2::after { content: ' received'; color: var(--ok); font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1.15rem 2.1rem; display: grid; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: 9px; top: 22px; bottom: -2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.t-title { font-weight: 600; color: var(--muted); }
.t-desc { font-size: .85rem; color: var(--muted); display: none; }
.timeline li.is-done .dot { background: var(--ok); border-color: var(--ok); }
.timeline li.is-done .dot::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--surface); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.timeline li.is-done::before { background: var(--ok); }
.timeline li.is-done .t-title { color: var(--ink); }
.timeline li.is-current .dot { border-color: var(--cobalt); border-width: 6px; }
.timeline li.is-current .t-title { color: var(--ink); }
.timeline li.is-current .t-desc { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .timeline li.is-current .dot { animation: pulse 1.8s ease-in-out infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--cobalt) 20%, transparent); } }
}
.live { font-size: .8rem; color: var(--muted); }

.kv { margin: 0; display: grid; gap: .9rem; }
.kv div { display: grid; gap: .15rem; }
.kv dt { font-size: .82rem; color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.kv dd.mono { font-size: .86rem; font-weight: 400; }

/* ---------- terms ---------- */

.prose { padding-top: 3rem; max-width: 720px; }
.prose h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; }
.prose p, .prose li { color: var(--muted); max-width: 68ch; }
.prose p + p { margin-top: .8rem; }
.prose ul { padding-left: 1.2rem; }
.prose .updated { margin-top: .6rem; font-size: .9rem; }

/* ---------- admin ---------- */

.admin { padding-top: 2rem; }
.admin-login { max-width: 380px; padding-top: 4rem; }
.admin-login form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin: 1.5rem 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .9rem 1rem; }
.stat b { display: block; font-family: var(--display); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--muted); }
.admin-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin: 1.5rem 0 .75rem; }
.seg { display: flex; gap: .25rem; flex-wrap: wrap; }
.seg a { padding: .35rem .75rem; border-radius: 999px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); font-size: .88rem; background: var(--surface); }
.seg a[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 600; color: var(--muted); background: var(--sunk); }
tr:last-child td { border-bottom: 0; }
td.addr-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--sunk); color: var(--muted); }
.badge.s-finished { background: var(--ok-soft); color: var(--ok); }
.badge.s-waiting, .badge.s-new, .badge.s-confirming, .badge.s-exchanging, .badge.s-sending { background: var(--wait-soft); color: var(--wait); }
.badge.s-failed, .badge.s-verifying, .badge.s-expired { background: var(--bad-soft); color: var(--bad); }
.pager { display: flex; gap: .75rem; margin-top: 1rem; font-size: .9rem; }
.volume { margin-top: 2rem; }
.volume h2 { font-size: 1.15rem; margin-bottom: .75rem; }

/* ---------- 1.1: sell tab, client area ---------- */

.tabs-3 { grid-template-columns: repeat(3, 1fr); }
.pane-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.coin-static { cursor: default; padding: .35rem 1rem; }
.saved-pick {
  margin-top: .15rem; width: 100%; background: var(--sunk); border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm); padding: .5rem .7rem; font-size: .88rem; color: var(--muted); cursor: pointer;
}
.saved-pick:focus { border-style: solid; border-color: var(--cobalt); box-shadow: var(--focus); outline: none; }

.locked { display: grid; gap: .8rem; padding: .5rem .1rem .25rem; }
.locked h2 { font-size: 1.35rem; }
.locked p { color: var(--muted); font-size: .95rem; }
.locked .primary { margin-top: .4rem; }

.as-link { text-decoration: none; }
.as-link:hover { color: var(--on-cobalt); }
.primary.as-link { display: inline-flex; width: auto; padding-inline: 1.5rem; }
.locked .primary.as-link { width: 100%; }

.site-nav .nav-cta { color: var(--cobalt); font-weight: 600; }
.site-nav .nav-cta[aria-current] { color: var(--ink); }

.narrow-page { max-width: 560px; padding-top: 3.5rem; }
.narrow-page .lede { margin-top: .9rem; }
.stack-form { display: grid; gap: 1rem; margin-top: 1.75rem; }
.ink { color: var(--ink); }

.notice.is-ok { background: var(--ok-soft); border-left-color: var(--ok); }

.ghost-btn {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: .5rem 1rem; font-weight: 600; cursor: pointer; min-height: 40px;
}
.ghost-btn:hover { border-color: var(--bad); color: var(--bad); }
.ghost-btn.small { padding: .3rem .8rem; min-height: 34px; font-size: .85rem; }

.account { padding-top: 2.5rem; }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.account-head .muted { margin-top: .5rem; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.75rem 0 1.25rem; }
.quick-card {
  display: grid; gap: .15rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); text-decoration: none; color: var(--ink);
}
.quick-card:hover { border-color: var(--cobalt); color: var(--ink); }
.quick-card b { font-family: var(--display); font-size: 1.25rem; }
.quick-card span { font-size: .85rem; color: var(--muted); }
@media (max-width: 520px) {
  .quick { gap: .5rem; }
  .quick-card { padding: .75rem .8rem; text-align: center; }
  .quick-card span { display: none; }
}

.acct-section { margin-top: 2.5rem; }
.acct-section h2 { font-size: 1.35rem; margin-bottom: .8rem; }
.empty { color: var(--muted); padding: 1.1rem 1.2rem; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-md); }

.badge.t-ok { background: var(--ok-soft); color: var(--ok); }
.badge.t-wait { background: var(--wait-soft); color: var(--wait); }
.badge.t-bad { background: var(--bad-soft); color: var(--bad); }
.badge.t-muted { background: var(--sunk); color: var(--muted); }

.wallet-list { list-style: none; margin: 0 0 1.25rem; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.wallet-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.wallet-list li:last-child { border-bottom: 0; }
.wl-main { display: grid; gap: .1rem; min-width: 0; }
.wl-main .mono { font-size: .85rem; color: var(--muted); }
.wallet-add {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: .75rem; align-items: end;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem;
}
.wallet-add .primary { width: auto; min-height: 46px; }
@media (max-width: 720px) { .wallet-add { grid-template-columns: 1fr; } .wallet-add .primary { width: 100%; } }

/* Account tables become stacked cards on phones so status is always visible */
@media (max-width: 640px) {
  .stack-wrap { overflow: visible; background: transparent; border: 0; }
  .stack-table, .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-table tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .4rem .9rem; margin-bottom: .6rem; }
  .stack-table td { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--line); white-space: normal; text-align: right; }
  .stack-table td:last-child { border-bottom: 0; }
  .stack-table td::before { content: attr(data-label); color: var(--muted); font-size: .82rem; text-align: left; flex-shrink: 0; }
  .stack-table td[data-label=""]::before { content: none; }
  .stack-table td[data-label=""] { justify-content: flex-end; }
}
