/* Devoid. Soft paper, near-black ink, redaction bars over anything private.
   Colour carries meaning and nothing else: green = done and private, blue = waiting,
   gold = visible to everyone, red = a problem, violet = testnet play money. */

@font-face { font-family: "Righteous"; src: url("fonts/righteous.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("fonts/outfit.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #f2f3f5; --surface: #ffffff; --surface-2: #f6f7f9; --surface-3: #eceef2;
  --line: #e6e8ec; --line-2: #d6d9e0;
  --ink: #0f1115; --ink-2: #585d69; --ink-3: #9297a3;
  --primary: #0f1115; --on-primary: #ffffff; --primary-hover: #272a31;
  --ok: #12a150; --ok-bg: #e6f6ed; --ok-ink: #0b7a3c;
  --info: #2f5bea; --info-bg: #ebf0ff; --info-ink: #2448c4;
  --public: #e3a008; --public-bg: #fff5d9; --public-ink: #8a5a00;
  --err: #e5484d; --err-bg: #fff0f0; --err-ink: #b42318;
  --test: #7c5cff; --test-bg: #f1edff; --test-ink: #5b3fd6;
  --redact: #0f1115;
  --focus: #2f5bea;
  --shadow-1: 0 1px 2px rgb(15 17 21 / 0.05);
  --shadow-2: 0 1px 2px rgb(15 17 21 / 0.04), 0 14px 34px -14px rgb(15 17 21 / 0.16);
  --shadow-3: 0 24px 60px -20px rgb(15 17 21 / 0.35);
  --brand: "Righteous", "Outfit", system-ui, sans-serif;
  --sans: "Outfit", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --side: 248px;
  color-scheme: light;
  --side-bg: #fbfbfc; --nav-hover: #f1f2f5; --nav-active: #eaecf0; --field: #ffffff;
  --tip-bg: #0f1115; --tip-ink: #ffffff; --kbd-bg: #f3f4f6; --seg-on: #ffffff;
}
/* Dark tokens: written once, used for the system preference and for an explicit choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0c; --surface: #131316; --surface-2: #19191d; --surface-3: #222227;
    --line: #222227; --line-2: #2f2f36;
    --ink: #f2f2f4; --ink-2: #a3a3ad; --ink-3: #6e6e79;
    --primary: #ececf0; --on-primary: #0a0a0c; --primary-hover: #ffffff;
    --ok: #34d399; --ok-bg: rgb(52 211 153 / 0.12); --ok-ink: #6ee7b7;
    --info: #8aa4ff; --info-bg: rgb(124 156 255 / 0.13); --info-ink: #aebfff;
    --public: #f5b82e; --public-bg: rgb(245 184 46 / 0.12); --public-ink: #f7cd6b;
    --err: #f87171; --err-bg: rgb(248 113 113 / 0.12); --err-ink: #fca5a5;
    --test: #a78bfa; --test-bg: rgb(167 139 250 / 0.14); --test-ink: #c4b5fd;
    --redact: #34343c;
    --focus: #8aa6ff;
    --side-bg: #0e0e11; --nav-hover: #17171b; --nav-active: #1f1f24; --field: #17171b;
    --tip-bg: #ececf0; --tip-ink: #0a0a0c; --kbd-bg: #1c1c21; --seg-on: #2e2e35;
    --shadow-1: inset 0 1px 0 rgb(255 255 255 / 0.03);
    --shadow-2: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 18px 40px -18px rgb(0 0 0 / 0.75);
    --shadow-3: 0 30px 70px -20px rgb(0 0 0 / 0.85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0c; --surface: #131316; --surface-2: #19191d; --surface-3: #222227;
  --line: #222227; --line-2: #2f2f36;
  --ink: #f2f2f4; --ink-2: #a3a3ad; --ink-3: #6e6e79;
  --primary: #ececf0; --on-primary: #0a0a0c; --primary-hover: #ffffff;
  --ok: #34d399; --ok-bg: rgb(52 211 153 / 0.12); --ok-ink: #6ee7b7;
  --info: #8aa4ff; --info-bg: rgb(124 156 255 / 0.13); --info-ink: #aebfff;
  --public: #f5b82e; --public-bg: rgb(245 184 46 / 0.12); --public-ink: #f7cd6b;
  --err: #f87171; --err-bg: rgb(248 113 113 / 0.12); --err-ink: #fca5a5;
  --test: #a78bfa; --test-bg: rgb(167 139 250 / 0.14); --test-ink: #c4b5fd;
  --redact: #34343c;
  --focus: #8aa6ff;
  --side-bg: #0e0e11; --nav-hover: #17171b; --nav-active: #1f1f24; --field: #17171b;
  --tip-bg: #ececf0; --tip-ink: #0a0a0c; --kbd-bg: #1c1c21; --seg-on: #2e2e35;
  --shadow-1: inset 0 1px 0 rgb(255 255 255 / 0.03);
  --shadow-2: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 18px 40px -18px rgb(0 0 0 / 0.75);
  --shadow-3: 0 30px 70px -20px rgb(0 0 0 / 0.85);
  color-scheme: dark;
}

/* ---- base ---------------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font: 400 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: color-mix(in srgb, var(--focus) 25%, transparent); }
.ic { width: 18px; height: 18px; flex: none; }

h1, h2, h3 { margin: 0; color: var(--ink); }
h1 { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -0.028em; }
h2 { font-size: 17px; line-height: 1.3; font-weight: 650; letter-spacing: -0.012em; }
h3 { font-size: 15px; line-height: 1.35; font-weight: 600; }
p { margin: 0; }
.sub { color: var(--ink-2); font-size: 15px; margin-top: 6px; max-width: 62ch; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -0.01em; }
.num, .amt { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.wordmark { font-family: var(--brand); font-weight: 400; letter-spacing: -0.01em; line-height: 1; }
.break { word-break: break-all; }

/* ---- shell --------------------------------------------------------------------------------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns 0.22s cubic-bezier(.2, .8, .2, 1); }
.app.side-collapsed { --side: 76px; }
.band { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; padding: 8px 16px; text-align: center; margin: -26px -34px 22px; }
.band .ic { width: 15px; height: 15px; }
.band.sim { background: var(--public-bg); color: var(--public-ink); border-bottom: 1px solid color-mix(in srgb, var(--public) 35%, transparent); }
.band.testnet { background: repeating-linear-gradient(-45deg, var(--test-bg) 0 10px, color-mix(in srgb, var(--test-bg) 55%, var(--bg)) 10px 20px); color: var(--test-ink); font-weight: 600; letter-spacing: 0.01em; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.warn { background: var(--public); }
.dot.test { background: var(--test); }

/* sidebar: a calm surface with grouped navigation, live counts, the wallet's state, and the theme */
.side { position: sticky; top: 0; height: 100vh; z-index: 20; display: flex; flex-direction: column; gap: 14px; padding: 14px 12px; background: var(--side-bg); border-right: 1px solid var(--line); }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 2px 4px 8px; min-height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); border-radius: 10px; }
.brand .mark { width: 32px; height: 32px; flex: none; }
.brand .wordmark { font-size: 25px; }
.mark-bg { fill: var(--primary); }
.mark-o { stroke: var(--on-primary); }
.mark-bar { fill: var(--public); }
.side-icon { appearance: none; width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-3); display: inline-grid; place-items: center; cursor: pointer; flex: none; transition: background 0.15s, color 0.15s; }
.side-icon:hover { background: var(--nav-hover); color: var(--ink); }
.side-icon .ic { width: 18px; height: 18px; }
.side-cta { appearance: none; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 12px; border-radius: 12px; border: 0; background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 14.5px; cursor: pointer; box-shadow: var(--shadow-2); transition: background 0.15s, transform 0.08s; }
.side-cta:hover { background: var(--primary-hover); }
.side-cta:active { transform: translateY(1px); }
.side-cta .ic { width: 18px; height: 18px; }
.side-cta kbd { margin-left: auto; background: color-mix(in srgb, var(--on-primary) 12%, transparent); border-color: transparent; color: inherit; opacity: 0.75; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group + .nav-group { margin-top: 12px; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px; margin: 4px 0 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 8px 0 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; transition: background 0.12s, color 0.12s; }
.nav a .ic { width: 18px; height: 18px; color: var(--ink-3); transition: color 0.12s; }
.nav a:hover { background: var(--nav-hover); color: var(--ink); }
.nav a:hover .ic { color: var(--ink-2); }
.nav a[aria-current="page"] { background: var(--nav-active); color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"] .ic { color: var(--ink); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ink); }
.tail { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.badge:empty { display: none; }
.badge.live { background: var(--info-bg); color: var(--info-ink); }
kbd { font: 600 11px/1 var(--sans); padding: 3px 6px; border-radius: 6px; background: var(--kbd-bg); border: 1px solid var(--line); color: var(--ink-3); white-space: nowrap; }
.nav kbd.key { display: none; }
.nav a:hover kbd.key { display: inline-block; }
.nav a:hover .badge { display: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.wallet-card { appearance: none; text-align: left; font: inherit; color: var(--ink); border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 5px; cursor: pointer; box-shadow: var(--shadow-1); transition: border-color 0.15s; }
.wallet-card:hover { border-color: var(--line-2); }
.wc-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.wc-top .pill { margin-left: auto; height: 20px; font-size: 11px; padding: 0 8px; }
.wc-bal { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; min-height: 25px; display: flex; align-items: center; }
.wc-bal .skel { width: 96px; height: 14px; }
.wc-sync { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.pulse.on { background: var(--info); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.8); } }
.side-row { display: flex; align-items: center; gap: 6px; }
.side-row .theme-switch { flex: 1; }
.side .theme-btn { display: none; }

/* the light/dark switch, with a sliding thumb */
.theme-switch { position: relative; display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-3); isolation: isolate; }
.theme-switch::before { content: ""; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 8px; background: var(--seg-on); box-shadow: var(--shadow-2); transition: transform 0.24s cubic-bezier(.2, .8, .2, 1); }
.theme-switch[data-on="dark"]::before { transform: translateX(100%); }
.theme-switch button { appearance: none; flex: 1; height: 30px; min-width: 42px; border: 0; background: transparent; border-radius: 8px; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; transition: color 0.15s; }
.theme-switch button:hover { color: var(--ink-2); }
.theme-switch button[aria-pressed="true"] { color: var(--ink); }
.theme-switch .ic { width: 16px; height: 16px; }

/* collapsed to an icon rail, by choice or on a narrow window, with tooltips */
.side-collapsed .side { align-items: center; }
.side-collapsed .side-top { flex-direction: column; padding: 4px 0; gap: 10px; }
.side-collapsed .brand .wordmark, .side-collapsed .side .lbl, .side-collapsed .side .tail, .side-collapsed .nav-label,
.side-collapsed .side-cta kbd, .side-collapsed .wc-bal, .side-collapsed .wc-sync, .side-collapsed .wc-top b,
.side-collapsed .wc-top .pill, .side-collapsed .side-row .theme-switch, .side-collapsed .kbd-btn { display: none; }
.side-collapsed .nav-group + .nav-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.side-collapsed .side .nav a, .side-collapsed .side-cta { width: 44px; height: 42px; padding: 0; justify-content: center; }
.side-collapsed .wallet-card { width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center; }
.side-collapsed .side-row { flex-direction: column; }
.side-collapsed .side .theme-btn { display: inline-grid; }
.side-collapsed .side [data-tip] { position: relative; }
.powered { display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; padding: 5px 11px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 12.5px; text-decoration: none; transition: border-color 0.15s, color 0.15s; }
.powered:hover { border-color: var(--line-2); color: var(--ink); }
.powered b { color: var(--ink); font-weight: 600; }
.powered .zec-sign { width: 20px; height: 20px; flex: none; }
.side-powered { margin-top: 2px; }
.side-collapsed .side-powered { align-self: center; padding: 5px; }
.side-collapsed .side-powered .lbl { display: none; }
.side-collapsed .side [data-tip]:hover::after, .side-collapsed .side [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%); padding: 7px 10px; border-radius: 8px; background: var(--tip-bg); color: var(--tip-ink); font: 600 12.5px/1 var(--sans); white-space: nowrap; pointer-events: none; z-index: 60; box-shadow: var(--shadow-3); }
@media (max-width: 1040px) { #side-toggle { display: none; } }
@media (max-height: 660px) { .wallet-card { display: none; } }

.main { min-width: 0; padding: 26px 34px 90px; max-width: 1320px; width: 100%; }
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top .wordmark, .top .net, .top .top-theme { display: none; }
.shortcuts { display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; margin: 0; align-items: center; }
.shortcuts dt { white-space: nowrap; }
.shortcuts dd { margin: 0; color: var(--ink-2); }

.tabbar { display: none; }

/* ---- surfaces ------------------------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-1); min-width: 0; }
.card + .card { margin-top: 18px; }
.card.pad-lg { padding: 28px; }
.card.inset { background: var(--surface-2); box-shadow: none; }
/* the money card: dark in both themes, with its own tokens so everything inside inverts */
.card.dark { --ink: #f3f3f5; --ink-2: #a9a9b4; --ink-3: #74747f; --surface-3: #22222a; --line: #26262e; --line-2: #3a3a44; --redact: #f3f3f5; --primary: #f3f3f5; --on-primary: #0b0b0e; --primary-hover: #dcdce1; --bg: #0f1115;
  background: radial-gradient(120% 140% at 100% 0%, #24242c 0%, #121216 46%, #0b0b0e 100%); color: var(--ink); border-color: #0b0b0e; box-shadow: var(--shadow-2); }
:root[data-theme="dark"] .card.dark { border-color: #26262c; background: radial-gradient(120% 140% at 100% 0%, #2a2a31 0%, #17171b 52%, #131316 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card.dark { border-color: #26262c; background: radial-gradient(120% 140% at 100% 0%, #2a2a31 0%, #17171b 52%, #131316 100%); } }
.card.dark .pill.ok { background: rgb(52 211 153 / 0.14); color: #6ee7b7; }
.card.dark .pill.public { background: rgb(245 184 46 / 0.16); color: #f7cd6b; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-h .link { font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.card-h .link:hover { color: var(--ink); background: var(--surface-3); }
.grid { display: grid; gap: 18px; }
.grid > .card + .card, .stack > .card + .card, .stack-lg > .card + .card { margin-top: 0; }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); align-items: start; }
.g-send { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "rec sum" "led sum"; align-items: start; }
.a-rec { grid-area: rec; } .a-sum { grid-area: sum; } .a-led { grid-area: led; min-width: 0; }
.a-led:empty { display: none; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }
.stack-xs { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.nowrap { flex-wrap: nowrap; }
.sticky { position: sticky; top: 20px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.pad-top { padding-top: 12px; }
.pad-top:empty { display: none; }
.span-all { grid-column: 1 / -1; }
details.more.facts { margin-top: 14px; }
.card.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 35%, transparent); } }
.spacer { flex: 1; }

/* ---- buttons ------------------------------------------------------------------------------- */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 15px; letter-spacing: -0.005em; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.08s, box-shadow 0.15s; background: var(--primary); color: var(--on-primary); }
.btn:hover:not(:disabled) { background: var(--primary-hover); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }
.btn .ic { width: 17px; height: 17px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-3); border-color: var(--line-2); }
.btn.soft { background: var(--surface-3); color: var(--ink); }
.btn.soft:hover:not(:disabled) { background: var(--line-2); }
.btn.danger { background: var(--err); color: #fff; }
.btn.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--err) 85%, #000); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.xs { height: 30px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn.xs .ic { width: 15px; height: 15px; }
.btn.lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.trail { flex-direction: row-reverse; }
.btn.icon-only { width: 32px; padding: 0; }
.icon-btn { appearance: none; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: background 0.15s; }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* quick actions: round icon tiles with a label underneath */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick button { appearance: none; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; font-weight: 500; padding: 4px; border-radius: 14px; }
.quick button span.tile { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); transition: background 0.15s, transform 0.12s; }
.quick button:hover span.tile { background: var(--line-2); transform: translateY(-1px); }
.quick button.primary span.tile { background: var(--primary); color: var(--on-primary); }
.quick .ic { width: 21px; height: 21px; }

/* ---- form controls ------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.hint { font-size: 12.5px; color: var(--ink-2); }
.input, input[type=text], input[type=password], input[type=search], input[type=number], textarea, select {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--field); color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent); }
textarea { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; min-height: 190px; resize: vertical; background: var(--surface-2); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; cursor: pointer; }
.input-group { display: flex; gap: 8px; }
.input-group > input { flex: 1; }
.suffix-wrap { position: relative; }
.suffix-wrap .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; font-size: 14px; pointer-events: none; }
.suffix-wrap input { padding-right: 52px; }
.check { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; font-size: 14px; line-height: 1.45; }
.check input { margin: 2px 0 0; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }

/* segmented control + filter chips */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface-3); }
.seg button { appearance: none; border: 0; background: transparent; height: 34px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background 0.15s, color 0.15s; }
.seg button .ic { width: 15px; height: 15px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: var(--shadow-2); }
.seg.block { display: flex; }
.seg.block button { flex: 1; justify-content: center; }
.seg { max-width: 100%; }
@media (max-width: 400px) {
  .seg button { padding: 0 11px; font-size: 13.5px; }
  .seg:not(.block) button .ic { display: none; }
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { appearance: none; height: 34px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip .count { font-size: 12px; opacity: 0.7; }

/* ---- status --------------------------------------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.pill .ic { width: 13px; height: 13px; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill.pending, .pill.info { background: var(--info-bg); color: var(--info-ink); }
.pill.fail { background: var(--err-bg); color: var(--err-ink); }
.pill.public { background: var(--public-bg); color: var(--public-ink); }
.pill.test { background: var(--test-bg); color: var(--test-ink); }
.pill.solid-ok { background: var(--ok); color: #fff; }
.pill.lg { height: 30px; padding: 0 14px; font-size: 13.5px; }
.net { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 999px; font-weight: 600; font-size: 13px; border: 1px solid var(--line); background: var(--surface); }
.net.test { background: var(--test-bg); border-color: color-mix(in srgb, var(--test) 35%, transparent); color: var(--test-ink); }

.note { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 13px 15px; border-radius: var(--r-md); background: var(--surface-2); font-size: 14px; line-height: 1.45; }
.note > .ic { width: 19px; height: 19px; margin-top: 1px; color: var(--ink-2); }
.note b { display: block; font-weight: 650; margin-bottom: 1px; }
.note.ok { background: var(--ok-bg); } .note.ok > .ic { color: var(--ok); }
.note.warn { background: var(--public-bg); } .note.warn > .ic { color: var(--public); }
.note.err { background: var(--err-bg); } .note.err > .ic { color: var(--err); }
.note.info { background: var(--info-bg); } .note.info > .ic { color: var(--info); }
.note.test { background: var(--test-bg); } .note.test > .ic { color: var(--test); }

/* ---- the signature: private numbers sit behind redaction bars until you ask ---------------- */
.balance-card { position: relative; overflow: hidden; }
.balance-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.eyebrow { font-size: 13.5px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.redact { appearance: none; position: relative; display: inline-flex; align-items: baseline; gap: 10px; cursor: pointer; background: none; border: 0; padding: 0; color: var(--ink); text-align: left; border-radius: 10px; min-width: 230px; } /* the bar keeps room for "Tap to reveal" while the balance is still "—" */
.redact .figure { font-size: 58px; line-height: 1; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.redact .unit { font-size: 19px; color: var(--ink-3); font-weight: 600; letter-spacing: -0.01em; }
.redact .bar { position: absolute; left: -6px; right: 42px; top: 2px; bottom: -2px; background: var(--redact); border-radius: 10px; transition: transform 0.28s cubic-bezier(.2,.8,.2,1); transform-origin: left center; }
.redact[aria-pressed="true"] .bar { transform: scaleX(0); }
.redact .hint-tap { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--bg); font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; opacity: 0.9; transition: opacity 0.15s; pointer-events: none; }
.redact[aria-pressed="true"] .hint-tap { opacity: 0; }
.balance-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); align-items: center; }
.balance-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.sens { border-radius: 6px; transition: background 0.2s, color 0.2s; }
body:not(.reveal) .sens { background: var(--redact); color: transparent !important; user-select: none; }
body:not(.reveal) .sens * { visibility: hidden; }

/* pools: where the ZEC sits, as one stacked bar */
.poolbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-3); gap: 3px; }
.poolbar i { display: block; flex: 1 1 0; height: 100%; min-width: 4px; border-radius: 999px; }
.p-ironwood { background: var(--ink); }
.p-orchard { background: color-mix(in srgb, var(--ink) 62%, var(--surface)); }
.p-sapling { background: color-mix(in srgb, var(--ink) 34%, var(--surface)); }
.p-transparent { background: var(--public); }
.legend { display: grid; gap: 10px; margin-top: 16px; }
.legend > div { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend .amt { font-weight: 600; }
.shield-score { display: flex; align-items: baseline; gap: 6px; }
.shield-score b { font-size: 26px; letter-spacing: -0.03em; }

/* ---- lists of things ------------------------------------------------------------------------ */
.items { display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 11px 4px; border-radius: 14px; }
.item + .item { border-top: 1px solid var(--line); border-radius: 0; }
.item .title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.item .amt { font-weight: 650; text-align: right; font-size: 15px; white-space: nowrap; }
.item .amt.in { color: var(--ok-ink); }
.tile-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); }
.tile-ico .ic { width: 19px; height: 19px; }
.tile-ico.sent { background: var(--surface-3); }
.tile-ico.received { background: var(--ok-bg); color: var(--ok-ink); }
.tile-ico.shielded { background: var(--info-bg); color: var(--info-ink); }
.tile-ico.fail { background: var(--err-bg); color: var(--err-ink); }
.tile-ico.public { background: var(--public-bg); color: var(--public-ink); }
.day { font-size: 12.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin: 22px 4px 4px; }
.day:first-child { margin-top: 0; }

/* activity rows expand in place */
.tx { border-radius: 16px; transition: background 0.15s; }
.tx + .tx { border-top: 1px solid var(--line); }
.tx > button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 18px; gap: 13px; align-items: center; padding: 12px 8px; cursor: pointer; border-radius: 16px; }
.tx > button:hover { background: var(--surface-2); }
.tx > button:focus-visible { outline: 2px solid var(--focus); }
.tx .chev { color: var(--ink-3); transition: transform 0.2s; }
.tline { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tx .title, .ledger .title, .pick .title, .recips .title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx .meta { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tx > button[aria-expanded="true"] .chev { transform: rotate(90deg); }
.tx .detail { margin: 0 8px 14px 63px; padding: 14px 16px; background: var(--surface-2); border-radius: 14px; display: grid; gap: 10px; font-size: 13.5px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 14px; align-items: baseline; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; min-width: 0; }
.out-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 8px 0; border-top: 1px dashed var(--line-2); }
.out-row:first-child { border-top: 0; }

/* avatars */
.avatar { --h: 220; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; letter-spacing: 0.02em; background: hsl(var(--h) 75% 92%); color: hsl(var(--h) 45% 28%); flex: none; }
:root[data-theme="dark"] .avatar { background: hsl(var(--h) 40% 22%); color: hsl(var(--h) 80% 82%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: hsl(var(--h) 40% 22%); color: hsl(var(--h) 80% 82%); } }
.avatar.lg { width: 56px; height: 56px; font-size: 17px; }
.people { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.people::-webkit-scrollbar { display: none; }
.person { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 7px; width: 64px; flex: none; color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.person span.n { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person:hover .avatar { transform: translateY(-1px); }
.person .avatar { transition: transform 0.12s; }
.person.add .avatar { background: var(--surface-3); color: var(--ink); border: 1.5px dashed var(--line-2); }

/* list / template cards */
.tpl { display: flex; flex-direction: column; gap: 14px; }
.tpl .top-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tpl .stats { display: flex; gap: 18px; }
.tpl .stats div { display: flex; flex-direction: column; }
.tpl .stats b { font-size: 20px; letter-spacing: -0.02em; }
.tpl .stats span { font-size: 12.5px; color: var(--ink-2); }
.tpl .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* ---- send flow ------------------------------------------------------------------------------ */
.steps { display: flex; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: s; flex-wrap: wrap; }
.steps li { counter-increment: s; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); font-weight: 600; font-size: 13.5px; }
.steps li::before { content: counter(s); width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; }
.steps li[aria-current="step"] { color: var(--ink); border-color: var(--ink); }
.steps li[aria-current="step"]::before { background: var(--primary); color: var(--on-primary); }
.steps li.done { color: var(--ok-ink); }
.steps li.done::before { content: "✓"; background: var(--ok-bg); color: var(--ok-ink); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* Recipients, one card per person */
.rcps { display: grid; gap: 12px; }
.rcp { display: grid; gap: 12px; padding: 14px 16px 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.rcp.bad { border-color: color-mix(in srgb, var(--err) 50%, var(--line)); background: color-mix(in srgb, var(--err-bg) 55%, var(--surface-2)); }
.rcp-h { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 36px; }
.rcp-h b { font-size: 14.5px; white-space: nowrap; }
.rcp-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--on-ink, var(--surface)); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rcp-kind { min-width: 0; display: flex; }
.rcp-h .icon-btn { margin-left: auto; flex: none; }
.rcp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; }
.rcp-grid .wide { grid-column: 1 / -1; }
.rcp-grid input { width: 100%; min-width: 0; }
.rcp-grid textarea { min-height: 0; height: auto; resize: none; overflow: hidden; line-height: 1.5; padding-top: 12px; padding-bottom: 12px; }
.rcp-grid .addr-in { font-family: var(--mono); font-size: 13px; word-break: break-all; background: var(--surface); }
.rcp-grid .memo-in { font-family: var(--sans); font-size: 15px; background: var(--surface); }
.rcp .opt { font-weight: 500; color: var(--ink-3); }
.rcp-status:empty { display: none; }
.rcp-status { display: grid; gap: 4px; }
.rcp .why { color: var(--err-ink); font-size: 13px; font-weight: 500; display: flex; gap: 6px; align-items: flex-start; }
.rcp .why .ic { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.amount-in { position: relative; }
.amount-in input { padding-right: 56px; font-variant-numeric: tabular-nums; }
.amount-in span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 13px; font-weight: 600; pointer-events: none; }
.add-rcp { appearance: none; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; border-radius: var(--r-md); border: 1.5px dashed var(--line-2); background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.add-rcp:hover { background: var(--surface-2); border-color: var(--ink-3); }
.add-rcp .ic { width: 17px; height: 17px; }
@media (max-width: 560px) {
  .rcp { padding: 12px 12px 14px; }
  .rcp-grid { grid-template-columns: minmax(0, 1fr); }
}

.tools-tray { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); align-items: center; }

.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 11px 16px; margin: 0; font-size: 14.5px; }
.summary dt { color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.summary dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary .total { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; margin-top: 3px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.summary .total b { font-size: 24px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.summary dd.neg { color: var(--err-ink); }
.big-count { font-size: 44px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }

/* the batch ledger */
.tablewrap { overflow-x: auto; margin: 0 -6px; }
.ledger { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.ledger th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ledger td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger td.amt, .ledger th.amt { text-align: right; white-space: nowrap; font-weight: 600; }
.ledger tr.bad td { background: var(--err-bg); }
.ledger tr.dup td { background: var(--public-bg); }
.ledger tr.bad td:first-child, .ledger tr.dup td:first-child { border-radius: 12px 0 0 12px; }
.ledger tr.bad td:last-child, .ledger tr.dup td:last-child { border-radius: 0 12px 12px 0; }
.ledger .addr { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.addr-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ledger .why { color: var(--err-ink); font-size: 13px; font-weight: 500; margin-top: 4px; display: flex; gap: 5px; align-items: center; }
.ledger .why .ic { width: 14px; height: 14px; }
.ledger .gutter { width: 34px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }

/* confirm sheet, after the reference wallets: one big number, then the facts */
.sheet { max-width: 620px; margin: 0 auto; }
.sheet-head { text-align: center; padding: 6px 0 22px; }
.sheet-head h2 { font-size: 20px; }
.sheet-head p { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.amount-xl { font-size: 56px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-top: 20px; font-variant-numeric: tabular-nums; }
.amount-xl small { font-size: 20px; color: var(--ink-3); font-weight: 600; letter-spacing: -0.01em; margin-left: 6px; }
.facts { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.facts > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 14px 16px; align-items: center; font-size: 14.5px; }
.facts > div + div { border-top: 1px solid var(--line); }
.facts .k { color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.facts .k .ic { width: 16px; height: 16px; }
.facts .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; }
.facts .v .sub2 { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.facts > div.total { background: var(--surface-2); font-size: 15.5px; }
.facts > div.total .v { font-size: 18px; }
.recips { max-height: 260px; overflow: auto; }
.recips .r { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; padding: 9px 16px; font-size: 13px; align-items: center; }
.recips .r + .r { border-top: 1px solid var(--line); }
details.more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; font-weight: 600; font-size: 14.5px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .ic { transition: transform 0.2s; color: var(--ink-3); }
details.more[open] > summary .ic { transform: rotate(180deg); }
.privacy-level { display: flex; align-items: center; gap: 12px; }
.unlocked { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.unlocked > div { flex: 1; min-width: 0; }
.privacy-level .tile-ico { width: 46px; height: 46px; }

/* sending + sent */
.result { text-align: center; padding: 18px 0 6px; }
.result .badge-ring { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; }
.result .badge-ring .ic { width: 34px; height: 34px; }
.result .badge-ring.info { background: var(--info-bg); color: var(--info); }
.result .badge-ring.fail { background: var(--err-bg); color: var(--err); }
.result .badge-ring.busy { background: var(--surface-3); color: var(--ink); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 18px 0 10px; }
.progress i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--primary); transition: width 0.4s ease; }
.txid { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-family: var(--mono); font-size: 12px; text-align: left; }
.txid .n { flex: none; min-width: 20px; }
.txid .id { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- receive -------------------------------------------------------------------------------- */
.receive { max-width: 520px; margin: 0 auto; }
.qr-frame { width: min(100%, 290px); margin: 22px auto 18px; padding: 16px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.qr { width: 100%; height: auto; display: block; }
.qr path { fill: #0f1115; }
.addr-box { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; word-break: break-all; padding: 13px 15px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); user-select: all; text-align: left; }
.addr-box.short { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.uri { font-size: 11.5px; }

/* ---- welcome ------------------------------------------------------------------------------- */
.welcome { position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.hero { position: relative; overflow: hidden; background: #0b0b0e; color: #f3f3f5; padding: 44px 56px; display: flex; flex-direction: column; gap: 34px; }
.hero .brand .wordmark { font-size: 32px; color: #f3f3f5; }
.hero .mark-bg { fill: #f3f3f5; } .hero .mark-o { stroke: #0b0b0e; }
.hero h1 { color: #fff; font-size: clamp(38px, 4.6vw, 62px); line-height: 1.02; letter-spacing: -0.045em; max-width: 13ch; }
.hero h1 em { font-style: normal; white-space: nowrap; background: #f3f3f5; color: #0b0b0e; padding: 0 0.14em 0.04em; border-radius: 0.16em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero .lede { color: #b7b7c2; font-size: 17px; max-width: 46ch; line-height: 1.55; }
.hero .points { display: grid; gap: 14px; margin-top: auto; }
.hero .points div { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; font-size: 14.5px; color: #c9c9d3; }
.hero .points b { color: #fff; display: block; font-weight: 600; }
.hero .points .tile-ico { width: 38px; height: 38px; border-radius: 12px; background: #1d1d23; color: #fff; }
.hero .built-on { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 13px; color: #8d8d99; }
.hero .powered { background: #1d1d23; border-color: #2b2b33; color: #c9c9d3; }
.hero .powered:hover { border-color: #44444e; color: #fff; }
.hero .powered b { color: #fff; }
.flow { display: grid; grid-template-columns: 1fr 64px 1.1fr; align-items: center; gap: 0; max-width: 520px; }
.flow .rows { display: grid; gap: 7px; }
.flow .rows i { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 10px; background: #18181d; border: 1px solid #26262d; font-style: normal; font-family: var(--mono); font-size: 11px; color: #9a9aa6; }
.flow .rows i b { color: #f3f3f5; margin-left: auto; font-family: var(--sans); font-weight: 600; font-size: 12px; }
.flow svg.lines { width: 64px; height: 150px; }
.flow svg.lines path { stroke: #3a3a44; stroke-width: 1.5; fill: none; }
.flow .one { padding: 16px; border-radius: 18px; background: #f3f3f5; color: #0b0b0e; }
.flow .one .row { gap: 8px; }
.flow .one b { font-size: 22px; letter-spacing: -0.03em; }
.flow .one .redline { height: 8px; border-radius: 4px; background: #0b0b0e; margin-top: 8px; }
.flow .one .redline.w2 { width: 70%; }
.panel-side { display: flex; align-items: center; justify-content: center; padding: 40px 28px; background: var(--bg); }
.form-card { width: 100%; max-width: 440px; }
.form-card h2 { font-size: 26px; letter-spacing: -0.03em; }
.or-open { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.form-card input[type=file] { width: 100%; font: inherit; font-size: 14px; color: var(--ink-2); }
.phrase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: w; }
.phrase span { counter-increment: w; display: flex; align-items: baseline; gap: 8px; padding: 9px 11px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 13.5px; }
.phrase span::before { content: counter(w); color: var(--ink-3); font-size: 11px; min-width: 15px; }
.strength { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; transition: width 0.25s, background 0.25s; background: var(--err); }
.strength.s2 i { background: var(--public); } .strength.s3 i { background: var(--ok); }

/* ---- feedback ------------------------------------------------------------------------------- */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--on-primary); padding: 12px 18px; border-radius: 999px; z-index: 60; max-width: 90vw; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-3); display: inline-flex; gap: 8px; align-items: center; animation: rise 0.22s ease; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
.empty { padding: 42px 22px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .tile-ico { width: 54px; height: 54px; border-radius: 18px; }
.empty .tile-ico .ic { width: 24px; height: 24px; }
.empty h3 { color: var(--ink); }
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

dialog.modal { border: 1px solid var(--line); padding: 0; border-radius: 26px; background: var(--surface); color: var(--ink); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-3); }
dialog.modal::backdrop { background: rgb(8 8 12 / 0.5); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop 0.2s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { font-size: 19px; }
.pick { display: flex; flex-direction: column; max-height: 46vh; overflow: auto; margin: 0 -8px; }
.pick label { display: grid; grid-template-columns: 22px 42px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 8px; border-radius: 12px; cursor: pointer; }
.pick label:hover { background: var(--surface-2); }
.pick input { width: 18px; height: 18px; accent-color: var(--primary); }

/* menu sheet (mobile "More") */
.menu-list { display: flex; flex-direction: column; }
.menu-list a, .menu-list button { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 42px 1fr 18px; gap: 13px; align-items: center; padding: 12px 6px; cursor: pointer; border-radius: 14px; font-weight: 600; }
.menu-list a + a, .menu-list a + button, .menu-list button + a { border-top: 1px solid var(--line); border-radius: 0; }
.menu-list .chev { color: var(--ink-3); }

/* ---- responsive ----------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .g-main { grid-template-columns: minmax(0, 1fr); }
  .g-send { grid-template-columns: minmax(0, 1fr); grid-template-areas: "rec" "sum" "led"; }
  .sticky { position: static; }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding: 18px 16px calc(116px + env(safe-area-inset-bottom)); }
  .top { margin-bottom: 18px; align-items: center; }
  .top .wordmark { display: inline-block; font-size: 24px; }
  .top .net, .top .top-theme { display: inline-flex; }
  .top .top-theme { display: inline-grid; }
  .band { margin: -18px -16px 16px; }
  .top .titles h1 { font-size: 24px; }
  .top .titles .sub { display: none; }
  .top.home .titles h1, .top.home .titles .sub { display: none; }
  .top:not(.home) .wordmark { display: none; }
  h1 { font-size: 24px; }
  .card { padding: 18px; border-radius: 20px; }
  .redact .figure { font-size: 46px; }
  .amount-xl { font-size: 44px; }
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .quick { gap: 4px; }
  /* The page behind and around the floating tab bar fades into the background, so content that
     scrolls under it never shows through or peeks out below it. */
  .app::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(96px + env(safe-area-inset-bottom)); z-index: 39; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--bg) 42%); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; padding: 7px; border-radius: 26px; background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(16px) saturate(1.6); border: 1px solid var(--line); box-shadow: var(--shadow-3); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; border-radius: 19px; color: var(--ink-3); text-decoration: none; font-size: 11px; font-weight: 600; }
  .tabbar a .ic { width: 21px; height: 21px; }
  .tabbar a[aria-current="page"] { color: var(--on-primary); background: var(--primary); }
  .tabbar a.send-tab .ic { width: 22px; height: 22px; }
  .tx .detail { margin-left: 8px; }
  .card-h:has(.toolbar) { flex-direction: column; align-items: flex-start; }
  .tx > button { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .tx .chev { display: none; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
  .welcome { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 30px 22px 34px; gap: 24px; }
  .hero .points { display: none; }
  .flow { display: none; }
  .panel-side { padding: 26px 16px 40px; align-items: flex-start; }
  .phrase { grid-template-columns: repeat(2, 1fr); }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .facts .v { text-align: left; }
  .band { font-size: 12px; padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.welcome-theme { position: absolute; top: 18px; right: 18px; z-index: 5; }
