/* Xalon: a quiet, precise wallet surface. Ink navy, cool paper, one teal accent. */
:root {
  --ink: #0c1a2b; --ink-2: #1e2d40; --muted: #5b6878; --line: #d9dfe6; --line-2: #eef1f4;
  --paper: #f3f5f7; --card: #ffffff; --accent: #0f6f68; --accent-2: #0b5550; --accent-soft: #e3f1ef;
  --gold: #a7802c; --good: #1f7a4d; --good-soft: #e5f3eb; --warn: #9a5b00; --warn-soft: #fbf0dc;
  --bad: #b42318; --bad-soft: #fbe9e7;
  --radius: 10px; --shadow: 0 1px 2px rgba(12,26,43,.06), 0 8px 24px rgba(12,26,43,.06);
  --serif: 'IBM Plex Serif', Georgia, serif; --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
.num, .money { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
button, .btn { font: 600 .92rem var(--sans); border-radius: 8px; border: 1px solid transparent; padding: .7rem 1.1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; } .btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); } .btn-ghost:hover { border-color: var(--ink-2); }
.btn-danger { background: var(--card); color: var(--bad); border-color: #f0c4bf; } .btn-danger:hover { background: var(--bad-soft); }
.btn-link { background: none; border: 0; color: var(--accent); padding: .3rem; }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid #7cc4bd; outline-offset: 2px; }
input, select, textarea { font: 1rem var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: grid; gap: .35rem; font-weight: 600; font-size: .88rem; }
label.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.stack { display: grid; gap: 1rem; } .row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }
.pill.good { background: var(--good-soft); color: var(--good); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.notice { border-radius: 8px; padding: .8rem 1rem; font-size: .9rem; border: 1px solid var(--line); background: #fff; }
.notice.good { background: var(--good-soft); border-color: #bfe0cd; } .notice.warn { background: var(--warn-soft); border-color: #efd6a8; } .notice.bad { background: var(--bad-soft); border-color: #f0c4bf; }
.mono-box { font: .85rem/1.5 var(--mono); background: var(--line-2); border-radius: 8px; padding: .7rem .8rem; word-break: break-all; }

/* ── landing ── */
.landing { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 1rem clamp(1rem, 4vw, 3rem); }
.brand { display: flex; align-items: center; gap: .6rem; font: 600 1.15rem var(--serif); color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: 2rem clamp(1rem, 4vw, 3rem) 4rem; max-width: 1180px; margin: 0 auto; width: 100%; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.08; }
.hero .lede { font-size: 1.1rem; color: var(--ink-2); max-width: 36ch; margin-top: 1rem; }
.signin { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 2rem; box-shadow: var(--shadow); display: grid; gap: 1rem; }
.signin h2 { font-size: 1.4rem; }
.provider { width: 100%; justify-content: flex-start; padding: .85rem 1rem; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.provider:hover { border-color: var(--ink-2); } .provider svg { width: 20px; height: 20px; flex: none; }
.provider[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; max-width: 1180px; margin: 0 auto 3rem; padding: 0 clamp(1rem, 4vw, 3rem); width: 100%; }
.fact { border-top: 2px solid var(--ink); padding-top: .9rem; }
.fact h3 { margin-bottom: .35rem; }
.foot { padding: 1.5rem clamp(1rem, 4vw, 3rem); border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .facts { grid-template-columns: 1fr; } }

/* ── app shell ── */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: #dfe6ee; padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; }
.side .brand { color: #fff; } .side .brand-mark { background: var(--accent); }
.nav { display: grid; gap: .2rem; }
.nav a { color: #c9d3de; text-decoration: none; padding: .6rem .75rem; border-radius: 8px; display: flex; gap: .7rem; align-items: center; font-weight: 500; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a[aria-current="page"] { background: #fff; color: var(--ink); } .nav a[aria-current="page"] svg { opacity: 1; }
.side-foot { margin-top: auto; font-size: .78rem; color: #93a1b1; }
.main { min-width: 0; }
.appbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem clamp(1rem, 3vw, 2rem); border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 5; }
.appbar .who { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-weight: 700; color: var(--accent); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.lockstate { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; }
.content { padding: clamp(1rem, 3vw, 2rem); max-width: 1100px; display: grid; gap: 1.5rem; }
.page-head { display: grid; gap: .3rem; }
.tabbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; } .side { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: grid; justify-items: center; gap: .15rem; padding: .5rem 0; font-size: .7rem; color: var(--muted); text-decoration: none; }
  .tabbar a svg { width: 20px; height: 20px; } .tabbar a[aria-current="page"] { color: var(--accent); }
  .content { padding-bottom: 5.5rem; }
}

/* ── dashboard ── */
.balance { background: var(--ink); color: #fff; border-radius: 14px; padding: 1.5rem; display: grid; gap: 1rem; }
.balance .amount { font: 600 clamp(2rem, 5vw, 2.8rem) var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.balance .amount small { font-size: .45em; color: #9fb0c2; margin-left: .35rem; }
.balance .split { display: flex; gap: 2rem; flex-wrap: wrap; font-size: .88rem; color: #b8c4d1; }
.balance .split b { color: #fff; font-family: var(--mono); font-weight: 600; }
.balance .actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.balance .actions .btn-ghost { background: transparent; color: #fff; border-color: #3a4a5e; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 960px) { .grid-2 { grid-template-columns: 1fr; } }
.list { display: grid; }
.list-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line-2); }
.list-item:last-child { border-bottom: 0; }
.icon-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--ink-2); }
.icon-dot.in { background: var(--good-soft); color: var(--good); } .icon-dot.out { background: var(--line-2); }
.icon-dot svg { width: 18px; height: 18px; }
.item-title { font-weight: 600; } .item-sub { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt-in { color: var(--good); } .amt-out { color: var(--ink); }
.account-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; padding: .9rem 0; border-bottom: 1px solid var(--line-2); }
.account-row:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }

/* ── forms, steps, modal ── */
.steps { display: flex; gap: .5rem; flex-wrap: wrap; }
.step { font-size: .78rem; font-weight: 600; color: var(--muted); padding: .3rem .6rem; border-radius: 999px; background: var(--line-2); }
.step[aria-current="step"] { background: var(--ink); color: #fff; } .step.done { background: var(--good-soft); color: var(--good); }
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 1.75rem; text-align: center; background: #fff; cursor: pointer; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.choice button { flex-direction: column; align-items: flex-start; text-align: left; background: #fff; border: 1px solid var(--line); color: var(--ink); padding: 1.1rem; gap: .3rem; }
.choice button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice small { font-weight: 400; color: var(--muted); }
@media (max-width: 600px) { .choice { grid-template-columns: 1fr; } }
.review { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.25rem; }
.review dt { color: var(--muted); font-size: .88rem; } .review dd { margin: 0; text-align: right; font-weight: 600; word-break: break-all; }
.review .total { border-top: 1px solid var(--line); padding-top: .6rem; }
dialog { border: 0; border-radius: 14px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(12,26,43,.25); }
dialog::backdrop { background: rgba(12,26,43,.55); }
.modal { padding: 1.5rem; display: grid; gap: 1rem; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.pinpad button { background: var(--line-2); color: var(--ink); font: 600 1.2rem var(--mono); padding: .9rem; }
.pin-dots { display: flex; gap: .5rem; justify-content: center; min-height: 18px; }
.pin-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.qr { width: 200px; height: 200px; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.table .r { text-align: right; }
.table-wrap { overflow-x: auto; }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 8px; font-size: .9rem; z-index: 50; }
@media (max-width: 860px) { .toast { bottom: 5rem; } }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ── printable statement ── */
.statement { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 2rem; }
.statement header { display: flex; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 1rem; margin-bottom: 1rem; }
@media print {
  body { background: #fff; } .side, .appbar, .tabbar, .no-print { display: none !important; }
  .shell { display: block; } .content { padding: 0; max-width: none; } .statement { border: 0; padding: 0; }
}
.btn svg, button svg { width: 18px; height: 18px; flex: none; }
.lockstate svg { width: 16px; height: 16px; vertical-align: -3px; }
.brand-logo { width: 32px; height: 32px; border-radius: 50%; flex: none; }

/* ═══ Acid theme: the DLT / xCoin brutalist look. Layout above is unchanged; this re-skins it. ═══ */
:root {
  --ink: #0a0a0a; --ink-2: #1c1c1c; --muted: #5e5e5e; --line: #0a0a0a; --line-2: #e4e4e4;
  --paper: #ffffff; --card: #ffffff; --accent: #c7ff2e; --accent-2: #b4ee12; --accent-ink: #101600; --accent-soft: #f2ffd0;
  --wash: #f7ffd9; --panel: #f6f6f3;
  --good: #1a6b2f; --good-soft: #e3f7c8; --warn: #7a4a00; --warn-soft: #fff1c9; --bad: #b3140c; --bad-soft: #ffe3df;
  --radius: 0; --shadow: 8px 8px 0 var(--accent);
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --serif: var(--mono); --sans: var(--mono);
}
body { background: var(--panel); font-size: 14px; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.04em; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); text-transform: uppercase; }
h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: -.02em; }
.eyebrow, label.field, .table th, .step, .pill { text-transform: uppercase; letter-spacing: .08em; }
label.field { font-size: .74rem; font-weight: 800; }
label.field .hint { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* hard edges everywhere */
.card, .signin, .statement, .dropzone, .notice, .mono-box, input, select, textarea, button, .btn, dialog, .qr, .avatar, .pill, .step, .icon-dot, .toast, .pinpad button { border-radius: 0; }
.card { border: 2px solid var(--ink); box-shadow: none; }
.signin { border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--accent); }
input, select, textarea { border: 2px solid var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 4px 4px 0 var(--accent); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--accent); }

/* buttons: lime block, black text, hard shadow on press */
button, .btn { font: 800 .8rem var(--mono); text-transform: uppercase; letter-spacing: .06em; border: 2px solid var(--ink); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--wash); }
.btn-danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn-link { border: 0; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .btn-primary:hover { transform: none; } }

/* landing */
.landing { background: #fff; }
.topbar { border-bottom: 2px solid var(--ink); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1; }
.hero h1::after { content: ""; display: block; width: 96px; height: 12px; background: var(--accent); margin-top: 1rem; border: 2px solid var(--ink); }
.provider { border: 2px solid var(--ink); text-transform: none; letter-spacing: 0; font-size: .92rem; }
.provider:hover { background: var(--wash); }
.fact { border-top: 4px solid var(--ink); }
.foot { border-top: 2px solid var(--ink); background: var(--ink); color: #cfcfcf; }
.foot a { color: var(--accent); }

/* app shell */
.side { background: var(--ink); border-right: 2px solid var(--ink); }
.side .brand { color: #fff; }
.nav a { color: #d9d9d9; border: 2px solid transparent; border-radius: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.nav a:hover { background: transparent; color: var(--accent); border-color: #333; }
.nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.side-foot { color: #9a9a9a; }
.appbar { border-bottom: 2px solid var(--ink); background: #fff; }
.avatar { background: var(--accent); color: var(--accent-ink); border: 2px solid var(--ink); }
.tabbar { border-top: 2px solid var(--ink); }
.tabbar a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }

/* balance: black slab with lime shadow, like the DLT stat grid */
.balance { border-radius: 0; border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--accent); }
.balance .amount { color: var(--accent); }
.balance .amount small { color: #bdbdbd; }
.balance .actions .btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.balance .actions .btn-ghost:hover { background: #fff; color: var(--ink); }

/* lists, pills, notices */
.list-item, .account-row { border-bottom: 1px solid var(--line-2); }
.icon-dot { border: 2px solid var(--ink); background: #fff; }
.icon-dot.in { background: var(--accent); color: var(--accent-ink); }
.pill { border: 1px solid var(--ink); background: #fff; font-size: .66rem; font-weight: 800; }
.pill.good { background: var(--accent); color: var(--accent-ink); border-color: var(--ink); }
.notice { border: 2px solid var(--ink); }
.notice.good { background: var(--wash); border-color: var(--ink); }
.step { border: 1px solid var(--ink); background: #fff; }
.step[aria-current="step"] { background: var(--ink); color: var(--accent); }
.step.done { background: var(--accent); color: var(--accent-ink); }
.choice button { border: 2px solid var(--ink); text-transform: none; letter-spacing: 0; }
.choice button[aria-pressed="true"] { background: var(--wash); box-shadow: 6px 6px 0 var(--accent); }
.dropzone { border: 2px dashed var(--ink); }
.dropzone.drag { background: var(--wash); }
.mono-box { background: var(--wash); border: 2px solid var(--ink); }
.table th { border-bottom: 2px solid var(--ink); }
dialog { border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--accent); }
dialog::backdrop { background: rgba(10,10,10,.6); }
.pinpad button { background: #fff; border: 2px solid var(--ink); }
.pinpad button:hover { background: var(--accent); }
.pin-dots i { border-radius: 0; background: var(--ink); }
.qr { border: 2px solid var(--ink); }
.toast { border: 2px solid var(--ink); background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.statement { border: 2px solid var(--ink); }
.statement header { border-bottom: 4px solid var(--ink); }
.brand-logo { border: 2px solid var(--ink); }
[hidden] { display: none !important; }
.mark { display: inline-block; line-height: 0; border: 2px solid var(--ink); background: #0b0f1a; flex: none; }
.mark svg { display: block; width: 100%; height: 100%; }
.mark { cursor: zoom-in; }
.mark:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.mark-zoom { position: fixed; z-index: 60; background: #0b0f1a; border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--accent); pointer-events: none; }
.mark-zoom svg { display: block; width: 100%; height: auto; }
.mark-zoom-seed { background: #fff; color: var(--ink); font: 600 .7rem/1.4 var(--mono); padding: .45rem .55rem; word-break: break-all; border-top: 2px solid var(--ink); }

/* new-wallet seed: a blurred decoy until revealed */
.seed-box { font-size: 1.05rem; letter-spacing: .04em; filter: blur(7px); user-select: none; transition: filter .15s; }
.seed-box.shown { filter: none; user-select: text; }
@media (prefers-reduced-motion: reduce) { .seed-box { transition: none; } }

/* backup tiers */
.choice.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.choice.tiers button { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; text-align: left; }
.pill.bad { background: #ffd9d9; color: #7a0000; }

.btn-sm { padding: .3rem .7rem; font-size: .75rem; min-height: 0; gap: .35rem; }
.btn-sm svg { width: 14px; height: 14px; }
.balance .btn-sm { color: #fff; border-color: #9fb0c2; background: transparent; }

/* addresses page */
.wallet-tabs { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.wallet-tabs button { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem .9rem .5rem .6rem; background: #fff; border: 2px solid var(--ink); color: var(--ink); }
.wallet-tabs button span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.wallet-tabs button small { font-family: var(--mono); font-size: .68rem; color: var(--muted); }
.wallet-tabs button[aria-selected="true"] { background: var(--accent); }
.chip { display: inline-flex; gap: .3rem; align-items: center; font-family: var(--mono); font-size: .72rem; font-weight: 700; border: 1px solid var(--ink); padding: .05rem .4rem; background: #fff; color: var(--ink); }
.addr-list { display: grid; }
.addr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .7rem .6rem; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.addr-row:last-child { border-bottom: 0; }
.addr-row:hover, .addr-row:focus-visible { background: var(--wash); outline: none; }
.addr-row.sel { background: var(--accent-soft, #f4ffd0); box-shadow: inset 4px 0 0 var(--accent); }
.addr-row.is-hidden { opacity: .6; }
.addr-row .item-sub { display: flex; gap: .5rem; align-items: center; white-space: normal; }
.qr-wrap { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.open-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; align-items: end; }
.open-grid .field { margin: 0; }
.idx-wrap { display: flex; gap: .4rem; align-items: stretch; } .idx-wrap input { flex: 1; min-width: 0; }
.seg { display: inline-flex; border: 2px solid var(--ink); }
.seg button { border: 0; border-right: 2px solid var(--ink); background: #fff; color: var(--ink); padding: .55rem .8rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"], .seg button:hover { background: var(--accent); }
.req { font-size: .65rem; color: var(--bad, #b00020); margin-left: .3rem; }
.seg.wrap { flex-wrap: wrap; } .seg.wrap button { border-right: 2px solid var(--ink); border-bottom: 0; }

/* addresses page: alignment */
.addr-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: stretch; }
.copy-row .mono-box { margin: 0; display: flex; align-items: center; }
.copy-row button { align-self: stretch; }
.qr-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.25rem; align-items: center; }
.qr-wrap .field { margin: 0; }
.open-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 1rem 1.25rem; align-items: end; }
.open-grid .field { display: grid; gap: .4rem; align-content: end; margin: 0; }
.open-grid .lbl { display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); white-space: nowrap; }
.req { display: inline-block; font-size: .62rem; font-weight: 800; letter-spacing: .06em; color: #7a0000; background: #ffd9d9; padding: .05rem .35rem; margin-left: .4rem; vertical-align: middle; }
.seg button { padding: .8rem .9rem; line-height: 1.2; }
.seg.wrap { display: flex; }
@media (max-width: 720px) { .addr-grid, .open-grid { grid-template-columns: 1fr; } .qr-wrap { grid-template-columns: 1fr; justify-items: center; } }
/* random-index sizes: equal cells that fill the row, wrapping into equal rows */
.seg.wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); border: 2px solid var(--ink); }
.seg.wrap button { border: 0; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); margin: 0 0 -2px 0; padding: .8rem .4rem; text-align: center; white-space: nowrap; }
.seg.wrap button:nth-last-child(1) { border-right: 0; }
/* one row of nine, always */
.seg.wrap { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.seg.wrap button { padding: .8rem .2rem; font-size: .72rem; letter-spacing: .03em; min-width: 0; }
.seg.wrap button:nth-last-child(1) { border-right: 0; }
@media (max-width: 1100px) { .seg.wrap button { font-size: .62rem; letter-spacing: 0; } }
@media (max-width: 720px) { .seg.wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); } .seg.wrap button:nth-last-child(1) { border-right: 2px solid var(--ink); } }

/* home: wallet → addresses tree */
.acct-tree { display: grid; gap: .25rem; }
.wallet-group { padding: .5rem 0; border-bottom: 1px solid var(--line-2); }
.wallet-group:last-child { border-bottom: 0; }
.wallet-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .4rem 0; }
.sub-row { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .45rem 0 .45rem 1.1rem; color: inherit; text-decoration: none; }
.sub-row:hover { background: var(--wash); }
.tree-line { display: block; width: 14px; height: 18px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); margin-top: -14px; }
.item-title.small { font-size: .9rem; }
.money.small { font-size: .95rem; }
.item-sub.full { white-space: normal; overflow: visible; text-overflow: clip; word-break: break-all; font-size: .78rem; }

/* The animated Xalon mark (js/knot.js) */
.brand-knot { display: inline-block; width: 32px; height: 32px; border: 0 !important; border-radius: 0; overflow: visible; }
.brand-knot canvas, .brand-knot img { width: 100% !important; height: 100% !important; display: block; }
.hero-knot { width: min(62vw, 300px); aspect-ratio: 1; margin: 0 0 1.25rem -1rem; }
.hero-knot canvas { width: 100% !important; height: 100% !important; display: block; }
@media (max-width: 860px) { .hero-knot { width: min(70vw, 260px); margin: 0 auto 1rem; } }

/* ── landing: copy left, knot centre, sign-in right ── */
.hero.hero-tri {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center; gap: clamp(1rem, 2.5vw, 2.5rem);
  max-width: 1480px; min-height: calc(100vh - 160px); padding: 2rem clamp(1rem, 3vw, 3rem) 3rem;
}
.hero-tri .hero-copy { position: relative; z-index: 1; }
.hero-tri .eyebrow { margin: 0 0 1rem; }
.hero-tri h1 { font-size: clamp(2rem, 3.3vw, 3.6rem); line-height: 1; letter-spacing: -.05em; }
.hero-tri .lede { max-width: 34ch; font-size: clamp(.98rem, 1.1vw, 1.1rem); line-height: 1.6; margin-top: 1.4rem; }
.hero-stage { display: grid; justify-items: center; gap: .5rem; }
.hero-tri .hero-knot { width: min(100%, 560px); margin: 0; }
.hero-tri .signin { position: relative; z-index: 1; justify-self: end; width: 100%; max-width: 400px; }
.hero-hint { margin: 0; font: 700 .7rem var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
@media (max-width: 1100px) {
  .hero.hero-tri { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 0; }
  .hero-stage { grid-column: 1 / -1; order: -1; }
  .hero-tri .hero-knot { width: min(70vw, 420px); }
  .hero-tri .signin { justify-self: stretch; max-width: none; }
}
@media (max-width: 760px) {
  .hero.hero-tri { grid-template-columns: 1fr; }
  .hero-tri .hero-knot { width: min(82vw, 360px); }
  .hero-tri .lede { max-width: none; }
}
.hero-tri ~ .facts { max-width: 1480px; padding: 0 clamp(1rem, 3vw, 3rem); }

/* ── landing: black, white type, acid-lime brutalist accents ── */
.landing { --muted: #a6a6a6; background: #0a0a0a; color: #fff; }
.landing .topbar { border-bottom: 2px solid var(--accent); }
.landing .brand { color: #fff; }
.landing .brand-logo { border: 0; }
.landing .topbar .btn-primary:hover { box-shadow: 4px 4px 0 #fff; }
.landing h1, .landing h2, .landing h3 { color: #fff; }
.landing .eyebrow { color: var(--accent); }
.landing .hero h1::after { border-color: #fff; }
.landing .lede { color: #e6e6e6; }
.landing .muted { color: var(--muted); }
.landing mark.hl { background: var(--accent); color: #0a0a0a; padding: 0 .14em; margin: 0 -.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.landing .hl-text { color: var(--accent); font-weight: 700; }
.landing .signin { background: #0a0a0a; border: 2px solid #fff; box-shadow: 12px 12px 0 var(--accent); }
.landing .provider { background: #0a0a0a; color: #fff; border: 2px solid #fff; }
.landing .provider:hover { background: #1a1a1a; }
.landing .provider[href="/auth/google"] { background: var(--accent); color: #0a0a0a; border-color: var(--accent); }
.landing .provider[href="/auth/google"]:hover { box-shadow: 4px 4px 0 #fff; transform: translate(-2px, -2px); }
.landing .provider[href="/auth/google"] svg { background: #fff; padding: 2px; }
.landing .pill { background: transparent; color: #fff; border-color: #fff; }
.landing .notice { background: #141414; color: #fff; border: 2px solid var(--accent); }
.landing .notice.bad { border-color: #ff6b5e; }
.landing .hero-hint { color: var(--accent); }
.landing .fact { border-top: 4px solid var(--accent); }
.landing .fact .muted { color: #bdbdbd; }
.landing .foot { background: #0a0a0a; border-top: 2px solid var(--accent); color: #a6a6a6; }
.landing :focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: reduce) { .landing .provider[href="/auth/google"]:hover { transform: none; } }
.landing .hero-tri h1 { line-height: 1.14; }
.landing h1 mark.hl { padding: .02em .14em 0; }
/* knot: two-thirds size, pops in once its canvas appears */
.hero-tri .hero-knot { width: min(66%, 373px); }
@media (max-width: 1100px) { .hero-tri .hero-knot { width: min(47vw, 280px); } }
@media (max-width: 760px) { .hero-tri .hero-knot { width: min(55vw, 240px); } }
.hero-knot canvas { animation: knot-pop 2.2s cubic-bezier(.16, 1, .3, 1) .15s both; transform-origin: 50% 50%; }
.hero-stage .hero-hint { animation: knot-hint .5s ease-out 2s both; }
@keyframes knot-pop { 0% { opacity: 0; transform: scale(.02) rotate(-720deg); filter: blur(6px); } 20% { opacity: 1; } 65% { transform: scale(1.12) rotate(12deg); filter: blur(0); } 82% { transform: scale(.98) rotate(-3deg); } 100% { opacity: 1; transform: scale(1) rotate(0); filter: none; } }
@keyframes knot-hint { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-knot canvas, .hero-stage .hero-hint { animation: none; } }
