/* MASKHOOD — design system shared by every page (home, token, docs, 404 and the app shell).
   "Midnight heist": a moonlit night sky (core.js → home-sky.js), loot gold accents, aurora violet, moon-cream paper.
   Older token names (--rh, --neon, --ghost, --cream …) stay as aliases so every page and the app shell keep working. */
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces-var.woff2') format('woff2'); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces-italic-var.woff2') format('woff2'); font-weight: 300 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/assets/fonts/geist-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/assets/fonts/geist-mono-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  /* palette: night, moon, loot gold, aurora */
  --night: #07060F; --night-2: #0E0B1E; --night-3: #171330; --night-4: #221B45; --night-5: #2E2560;
  --moon: #FFF3DC; --text: #F5F0FF; --muted-c: #A39EC0;
  --gold: #FFB547; --gold-glow: #FFD27A; --gold-deep: #E08A00; --gold-ink: #8A5200;
  --violet: #8B5CF6; --violet-2: #B794FF; --magenta: #FF5FA2;
  --fur: #8A8FA3; --fur-2: #4A4E5E; --fur-3: #2A2C36; --cream: #F4EBDD;
  --up-c: #34D399; --down-c: #F87171;
  --paper: #FBF6EC; --paper-2: #F3EBDC;
  /* aliases (app shell + older pages) */
  --rh: var(--gold); --neon: var(--gold-glow); --mint: var(--gold-glow); --blush: var(--magenta); --green-deep: var(--gold-ink);
  --ghost: var(--paper); --mist: var(--paper-2); --mist-2: #E9DFCC;
  --navy-900: var(--night); --navy-800: var(--night-2); --navy: var(--night-3); --rh-green: var(--gold); --rh-green-2: var(--gold-deep); --ink-real: var(--night);
  --blue-600: var(--violet); --sky: var(--violet-2);
  --gold-300: var(--gold-glow); --gold-600: var(--gold-deep); --cream-2: var(--paper-2); --white: #fff; --soft: #FFF1D6; --line: #E4D9C4;
  --warn: #E0A100; --warn-ink: #8A5A00; --violet-ink: #5B3FC4;
  --green: var(--up-c); --red: var(--down-c); --green-ink: #0F7A55; --red-ink: #C23B3B;
  --ink: var(--night-2); --ink-2: rgba(14, 11, 30, .74); --ink-3: #625C7E; --ink-line: rgba(14, 11, 30, .12);
  --on: var(--text); --on-2: rgba(245, 240, 255, .78); --on-3: rgba(207, 199, 236, .62); --on-line: rgba(183, 148, 255, .14);
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-2xl: 32px; --r-full: 999px;
  --ease: cubic-bezier(.19, 1, .22, 1); --spring: cubic-bezier(.175, .885, .32, 1.1);
  --wrap: 1240px; --nav-h: 72px;
  --gold-grad: linear-gradient(180deg, #FFDD94 0%, #FFB547 52%, #F09A2A 100%);
  --hl-grad: linear-gradient(100deg, #FFE7B0 0%, #FFB547 34%, #FF9C6E 62%, #FFD27A 100%);
  color-scheme: dark;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 88px; background: var(--night); }
body { margin: 0; background: var(--night); color: var(--on); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body[data-sky] { background: transparent; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--gold); color: var(--night); }
:focus-visible { outline: 2px solid var(--gold-glow); outline-offset: 3px; border-radius: 6px; }
.mono, code { font-family: var(--mono); font-feature-settings: 'zero' 1; }
.num { font-variant-numeric: tabular-nums; }
.display { font-family: var(--display); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--gold); color: var(--night); padding: 8px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 768px) { .wrap { padding: 0 var(--s6); } }

/* ---------- the night sky (core.js → home-sky.js): fixed behind every page that sets body[data-sky] ---------- */
.sky { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; contain: strict;
  background: radial-gradient(120% 80% at 50% 118%, rgba(139, 92, 246, .30), transparent 58%), radial-gradient(80% 60% at 85% 10%, rgba(255, 243, 220, .06), transparent 60%), linear-gradient(180deg, #05040C 0%, #0A0818 42%, #120E28 78%, #1A1436 100%); }
.sky canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.sky__soft { opacity: 1; }
.sky__still { position: absolute; inset: 0; background:
  radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 243, 220, .9), transparent 60%), radial-gradient(1px 1px at 28% 8%, rgba(255, 243, 220, .7), transparent 60%),
  radial-gradient(1.4px 1.4px at 43% 26%, rgba(255, 243, 220, .8), transparent 60%), radial-gradient(1px 1px at 61% 12%, rgba(255, 243, 220, .7), transparent 60%),
  radial-gradient(1.2px 1.2px at 74% 32%, rgba(255, 243, 220, .75), transparent 60%), radial-gradient(1px 1px at 88% 21%, rgba(255, 243, 220, .7), transparent 60%),
  radial-gradient(1px 1px at 7% 44%, rgba(255, 243, 220, .6), transparent 60%), radial-gradient(1.3px 1.3px at 53% 46%, rgba(255, 210, 122, .7), transparent 60%),
  radial-gradient(1px 1px at 93% 52%, rgba(255, 243, 220, .55), transparent 60%), radial-gradient(1px 1px at 33% 58%, rgba(255, 243, 220, .5), transparent 60%),
  radial-gradient(90px 90px at 82% 16%, rgba(255, 243, 220, .9), rgba(255, 243, 220, .9) 58%, rgba(255, 210, 122, .18) 62%, transparent 100%); }
.sky.is-live .sky__still { display: none; }
.sky--calm { background: radial-gradient(100% 70% at 50% 120%, rgba(139, 92, 246, .18), transparent 60%), linear-gradient(180deg, #05040C 0%, #0A0818 50%, #110D25 100%); }

/* ---------- colour helpers ---------- */
.up { color: var(--up-c); } .down { color: var(--down-c); } .flat { color: var(--on-3); }
.on-light .up, .card .up, .tile .up { color: var(--green-ink); }
.on-light .down, .card .down, .tile .down { color: var(--red-ink); }
.on-light .flat, .card .flat, .tile .flat { color: var(--ink-3); }
.muted { color: var(--on-3); } .on-light .muted, .card .muted { color: var(--ink-3); }

/* ---------- panels: night glass over the sky (no backdrop-filter: weak GPUs) / moon-paper ---------- */
.panel { position: relative; isolation: isolate; margin: 0 var(--s2); border-radius: var(--r-2xl); overflow: hidden; }
.panel + .panel { margin-top: var(--s2); }
.panel--ink, .panel--navy { background: radial-gradient(70% 60% at 85% 0%, rgba(139, 92, 246, .16), transparent 62%), linear-gradient(180deg, rgba(23, 19, 48, .86) 0%, rgba(10, 8, 22, .9) 100%); box-shadow: inset 0 0 0 1px var(--on-line); }
.panel--deep { background: radial-gradient(60% 60% at 15% 0%, rgba(255, 181, 71, .07), transparent 70%), rgba(10, 8, 22, .9); box-shadow: inset 0 0 0 1px var(--on-line); }
.panel--ghost, .panel--gold { background: radial-gradient(60% 80% at 100% 0%, rgba(255, 210, 122, .35), transparent 62%), var(--paper); color: var(--ink); }
.panel--mist, .panel--cream { background: var(--paper-2); color: var(--ink); }
.panel--ghost, .panel--gold, .panel--mist, .panel--cream, .on-light { --hl-grad: linear-gradient(100deg, #B86A00 0%, #E08A00 45%, #C2185B 100%); }
.dots { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.section { padding: 88px 0; }
@media (min-width: 768px) { .section { padding: 136px 0; } .panel { margin: 0 var(--s3); } }

/* ---------- type ---------- */
.label { position: relative; display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-glow); }
.label::before { content: ''; width: 18px; height: 8px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 16'%3E%3Cpath d='M1 6C4 2 12 1 18 4c6-3 14-2 17 2 1 4-2 8-7 9-4 1-7-1-8-3-1-1-3-1-4 0-1 2-4 4-8 3-5-1-8-5-7-9zm6 2c1 2 5 3 7 1-1-2-5-3-7-1zm22 0c-1 2-5 3-7 1 1-2 5-3 7-1z' fill-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 16'%3E%3Cpath d='M1 6C4 2 12 1 18 4c6-3 14-2 17 2 1 4-2 8-7 9-4 1-7-1-8-3-1-1-3-1-4 0-1 2-4 4-8 3-5-1-8-5-7-9zm6 2c1 2 5 3 7 1-1-2-5-3-7-1zm22 0c-1 2-5 3-7 1 1-2 5-3 7-1z' fill-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat; }
.panel--ghost .label, .panel--gold .label, .panel--mist .label, .panel--cream .label, .on-light .label { color: var(--gold-ink); }
.hl { font-family: var(--display); font-style: italic; font-weight: 500; color: transparent; background: var(--hl-grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; padding: 0 .06em 0 .02em; margin: 0 -.02em; }
.hl .w { color: transparent; background-image: var(--hl-grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; }
.sh { display: flex; flex-direction: column; gap: var(--s4); max-width: 780px; margin-bottom: var(--s7); }
.sh--center { margin-inline: auto; text-align: center; align-items: center; }
.sh__title { font-family: var(--display); font-size: 40px; line-height: 1.02; font-weight: 500; letter-spacing: -.025em; text-wrap: balance; }
.sh__lead { font-size: 17.5px; line-height: 1.55; color: var(--on-2); max-width: 620px; }
.panel--ghost .sh__lead, .panel--gold .sh__lead, .panel--mist .sh__lead, .panel--cream .sh__lead, .on-light .sh__lead { color: var(--ink-2); }
@media (min-width: 768px) { .sh__title { font-size: 66px; line-height: .98; } .sh__lead { font-size: 19px; } }
.words .w { display: inline-block; will-change: transform; }
/* light-sweep reveal (core.js reveals()): the title is uncovered left → right by a moving band of moonlight */
.sweep { --sw: -30%; }
.sweep.is-sweeping { clip-path: inset(-25% var(--clip, 100%) -25% -4%); }
.sweep__band { position: absolute; top: -10%; bottom: -10%; width: 22%; left: var(--sw); pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255, 231, 176, .0) 10%, rgba(255, 231, 176, .55) 48%, rgba(255, 255, 255, .85) 50%, rgba(255, 231, 176, .55) 52%, transparent 90%); filter: blur(6px); opacity: 0; z-index: 2; }

/* ---------- buttons ---------- */
.btn { --bh: 44px; position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: var(--bh); padding: 0 20px; border-radius: var(--r-full); border: 0; cursor: pointer; text-decoration: none; white-space: nowrap; font-size: 15px; font-weight: 560; letter-spacing: -.005em; transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .35s var(--ease), transform .45s var(--ease); -webkit-tap-highlight-color: transparent; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--lg { --bh: 54px; padding: 0 28px; font-size: 16px; }
.btn--sm { --bh: 36px; padding: 0 15px; font-size: 14px; }
.btn--gold, .btn--green { background: var(--gold-grad); color: #1C1204; box-shadow: 0 0 0 1px rgba(255, 221, 148, .5) inset, 0 -2px 0 rgba(120, 60, 0, .25) inset, 0 14px 34px -14px rgba(255, 166, 40, .85), 0 0 0 0 rgba(255, 181, 71, 0); }
.btn--gold::after, .btn--green::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .65) 48%, transparent 66%); transform: translateX(-120%); transition: transform .9s var(--ease); }
.btn--gold:hover::after, .btn--green:hover::after { transform: translateX(120%); }
.btn--gold:hover, .btn--green:hover { box-shadow: 0 0 0 1px rgba(255, 231, 176, .7) inset, 0 -2px 0 rgba(120, 60, 0, .25) inset, 0 18px 44px -12px rgba(255, 181, 71, .95), 0 0 0 6px rgba(255, 181, 71, .12); }
.btn--navy { background: var(--night-3); color: #fff; }
.btn--navy:hover { background: var(--night-4); }
.btn--ink { background: var(--night-2); color: #fff; box-shadow: inset 0 0 0 1px rgba(183, 148, 255, .18); }
.btn--ink:hover { background: var(--night-3); }
.btn--ghost { background: rgba(245, 240, 255, .05); color: var(--text); box-shadow: inset 0 0 0 1px rgba(183, 148, 255, .3); }
.btn--ghost:hover { background: rgba(255, 181, 71, .08); box-shadow: inset 0 0 0 1px rgba(255, 210, 122, .55); color: #fff; }
.panel--ghost .btn--ghost, .panel--gold .btn--ghost, .panel--mist .btn--ghost, .panel--cream .btn--ghost, .on-light .btn--ghost, .card .btn--ghost { background: rgba(14, 11, 30, .04); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(14, 11, 30, .24); }
.panel--ghost .btn--ghost:hover, .panel--gold .btn--ghost:hover, .panel--mist .btn--ghost:hover, .panel--cream .btn--ghost:hover, .on-light .btn--ghost:hover, .card .btn--ghost:hover { background: rgba(14, 11, 30, .08); }
.btn--cream, .btn--white { background: var(--moon); color: var(--ink); }
.btn--cream:hover, .btn--white:hover { background: #fff; }
.btn--danger { background: rgba(248, 113, 113, .14); color: var(--down-c); box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .4); }
.card .btn--danger { color: var(--red-ink); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-busy { opacity: .55; cursor: not-allowed; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn .arrow { transition: transform .45s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--magnetic { will-change: transform; }
.btn--magnetic > * { transition: transform .45s var(--ease); }

/* ---------- pills, chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-full); font-size: 12px; font-weight: 550; background: rgba(245, 240, 255, .08); color: var(--on-2); white-space: nowrap; }
.card .pill, .on-light .pill { background: rgba(14, 11, 30, .07); color: var(--ink-2); }
.pill--gold, .pill--green { background: var(--gold); color: var(--night) !important; }
.pill--ok { background: rgba(52, 211, 153, .14); color: var(--up-c); }
.card .pill--ok, .on-light .pill--ok { background: rgba(15, 122, 85, .12); color: var(--green-ink); }
.pill--warn { background: rgba(255, 181, 71, .16); color: var(--gold-glow); }
.card .pill--warn, .on-light .pill--warn { background: rgba(224, 161, 0, .16); color: var(--warn-ink); }
.pill--bad { background: rgba(248, 113, 113, .16); color: var(--down-c); }
.card .pill--bad, .on-light .pill--bad { background: rgba(194, 59, 59, .12); color: var(--red-ink); }
.pill--example { background: var(--violet-2); color: var(--night) !important; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; font-weight: 600; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(255, 181, 71, .6); animation: pulse 2.2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 181, 71, .55); } 70% { box-shadow: 0 0 0 9px rgba(255, 181, 71, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 181, 71, 0); } }

/* ---------- cards ---------- */
.card { background: var(--paper); color: var(--ink); border-radius: var(--r-xl); padding: var(--s5); min-width: 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 20px 50px -30px rgba(0, 0, 0, .55); }
.card--flat { box-shadow: none; }
.card--glass { background: rgba(23, 19, 48, .7); color: var(--on); box-shadow: inset 0 0 0 1px var(--on-line); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.card__title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.card a:not(.btn) { color: var(--gold-ink); }
.grid { display: grid; gap: var(--s4); }
.grid > * { min-width: 0; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(var(--s2) * -1); padding: 0 var(--s2); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.35; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--ink-line); white-space: nowrap; }
.tbl td { padding: 14px 12px; border-bottom: 1px solid var(--ink-line); white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl .sub { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.tbl--dark th { color: var(--on-3); border-color: var(--on-line); }
.tbl--dark td { border-color: var(--on-line); }
.tbl--dark .sub { color: var(--on-3); }
@media (max-width: 720px) { .hide-sm { display: none; } }
@media (max-width: 1000px) { .hide-md { display: none; } }

/* ---------- avatars, token logos ---------- */
.ava { position: relative; width: 36px; height: 36px; border-radius: 10px; flex: none; overflow: hidden; background: var(--night-3); color: var(--gold-glow); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.ava img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.tok-logo { width: 28px; height: 28px; border-radius: 50%; flex: none; background: #fff; object-fit: contain; box-shadow: 0 0 0 1px rgba(14, 11, 30, .08); }
.cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell > span { min-width: 0; }
.cell b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* ---------- forms ---------- */
.input { width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--ink-line); background: #fff; color: var(--ink); font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(255, 181, 71, .25); }
.input--dark { background: rgba(245, 240, 255, .05); border-color: var(--on-line); color: #fff; }
.input--dark::placeholder { color: var(--on-3); }
.input--dark:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 181, 71, .18); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 550; color: var(--ink-2); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-full); background: rgba(14, 11, 30, .07); }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: var(--r-full); background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--night-2); color: #fff; }
.seg--dark { background: rgba(245, 240, 255, .07); }
.seg--dark button { color: var(--on-2); }
.seg--dark button[aria-pressed="true"] { background: var(--gold); color: var(--night); }

/* ---------- skeleton + states ---------- */
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, rgba(14, 11, 30, .06) 25%, rgba(14, 11, 30, .13) 50%, rgba(14, 11, 30, .06) 75%); background-size: 200% 100%; animation: sk 1.3s linear infinite; }
.on-dark .sk, .panel--ink .sk, .panel--navy .sk, .panel--deep .sk, .tbl--dark .sk { background: linear-gradient(90deg, rgba(245, 240, 255, .05) 25%, rgba(245, 240, 255, .11) 50%, rgba(245, 240, 255, .05) 75%); background-size: 200% 100%; }
@keyframes sk { to { background-position: -200% 0; } }
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 36px 18px; color: var(--ink-2); }
.state__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(14, 11, 30, .07); color: var(--night-3); }
.state__icon svg { width: 22px; height: 22px; }
.state b { color: var(--ink); font-size: 16px; }
.state p { max-width: 420px; font-size: 14px; }
.state--err .state__icon { background: rgba(194, 59, 59, .1); color: var(--red-ink); }
.on-dark .state { color: var(--on-2); }
.on-dark .state b { color: #fff; }
.on-dark .state__icon { background: rgba(245, 240, 255, .08); color: var(--gold-glow); }

/* ---------- top nav (marketing pages) ---------- */
.nav { position: sticky; top: 0; z-index: 100; transition: background-color .4s var(--ease), box-shadow .4s var(--ease), transform .5s var(--ease), opacity .4s; }
.nav.is-scrolled { background: rgba(7, 6, 15, .86); box-shadow: 0 1px 0 var(--on-line), 0 18px 40px -26px rgba(0, 0, 0, .8); }
.nav.nav--hide { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.nav__bar { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; color: var(--moon); }
.brand img { width: 34px; height: 34px; flex: none; transition: transform .6s var(--spring); }
.brand:hover img { transform: translateY(-2px) rotate(-8deg); }
.brand span i { font-style: italic; color: var(--gold-glow); font-weight: 500; }
.nav__links { display: none; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__links a { position: relative; display: inline-flex; height: 38px; align-items: center; padding: 0 13px; border-radius: var(--r-full); text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--on-2); transition: color .25s; }
.nav__links a::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); transform: translateX(-50%) scale(0); transition: transform .4s var(--spring); }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: #fff; }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: translateX(-50%) scale(1); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; border: 0; background: rgba(245, 240, 255, .06); box-shadow: inset 0 0 0 1px rgba(183, 148, 255, .2); color: #fff; cursor: pointer; text-decoration: none; transition: background-color .25s, box-shadow .25s, transform .4s var(--ease); flex: none; }
.icon-btn:hover { background: rgba(255, 181, 71, .1); box-shadow: inset 0 0 0 1px rgba(255, 210, 122, .5); }
.icon-btn svg { width: 17px; height: 17px; }
.nav__social { display: none; }
.menu-btn { display: inline-grid; }
@media (min-width: 1000px) { .nav__links { display: flex; } .menu-btn { display: none; } .nav__social { display: inline-grid; } }
@media (max-width: 380px) { .nav__actions .btn--sm { padding: 0 12px; } .brand { font-size: 20px; } .brand img { width: 30px; height: 30px; } }
.menu { position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99; background: radial-gradient(90% 60% at 80% 0%, rgba(139, 92, 246, .22), transparent 60%), rgba(7, 6, 15, .98); padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.menu a { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px; font-family: var(--display); font-size: 28px; font-weight: 500; letter-spacing: -.02em; text-decoration: none; border-bottom: 1px solid var(--on-line); }
.menu .menu__social { display: flex; gap: 10px; margin-top: 18px; border: 0; }
.menu .menu__social a { border: 0; font-family: var(--sans); font-size: 15px; padding: 10px 16px; background: rgba(245, 240, 255, .07); border-radius: var(--r-full); }

/* ---------- footer: rooftops on top, a gold wordmark at the bottom ---------- */
.footer { position: relative; isolation: isolate; margin-top: 0; padding: 0; overflow: hidden; color: var(--on-2); font-size: 14px; }
.footer__roof { display: block; width: 100%; height: auto; margin-bottom: -1px; color: #0A0816; }
.footer__body { position: relative; background: linear-gradient(180deg, #0A0816 0%, #07060F 100%); padding-top: var(--s6); }
.footer__grid { display: grid; gap: var(--s6) var(--s5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer__brand { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--s3); max-width: 380px; }
.footer__brand p { color: var(--on-3); }
.footer__col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.footer__col h3 { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-glow); margin-bottom: 4px; }
.footer__col a { text-decoration: none; color: var(--on-2); width: fit-content; transition: color .2s; }
.footer__col a:hover { color: var(--gold-glow); }
.footer__status { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 12px; border-radius: var(--r-full); background: rgba(245, 240, 255, .05); box-shadow: inset 0 0 0 1px var(--on-line); font-size: 12.5px; color: var(--on-2); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--on-line); font-size: 13px; color: var(--on-3); }
.footer__bottom b { color: var(--gold-glow); font-weight: 600; }
.footer__mark { position: relative; margin: var(--s5) 0 -.16em; text-align: center; font-family: var(--display); font-style: italic; font-weight: 500; letter-spacing: -.04em; line-height: .9; font-size: 21vw; color: transparent; background: linear-gradient(180deg, rgba(255, 221, 148, .95) 0%, rgba(255, 181, 71, .55) 38%, rgba(139, 92, 246, .12) 78%, transparent 96%); -webkit-background-clip: text; background-clip: text; user-select: none; pointer-events: none; white-space: nowrap; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .footer__brand { grid-column: auto; } }

/* ---------- modal / dialog / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(4, 3, 10, .78); }
.modal__box { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; background: radial-gradient(90% 60% at 50% 0%, rgba(255, 181, 71, .14), transparent 60%), linear-gradient(180deg, #1B1638, #0E0B1E); color: var(--text); border-radius: var(--r-xl); padding: 30px 26px 26px; box-shadow: inset 0 0 0 1px rgba(255, 210, 122, .22), 0 40px 100px -30px rgba(0, 0, 0, .8); animation: pop .4s var(--spring); }
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.modal__x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(245, 240, 255, .08); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.modal__x svg { width: 16px; height: 16px; }
.modal h2 { font-family: var(--display); font-size: 30px; letter-spacing: -.01em; font-weight: 500; }
.modal p { color: var(--on-2); font-size: 15px; }
.modal .btn--ink { background: var(--gold-grad); color: #1C1204; box-shadow: none; }
.modal .soon-mark { width: 72px; height: 72px; margin-bottom: 14px; animation: soonbob 3.2s ease-in-out infinite; }
@keyframes soonbob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 260; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--gold-grad); color: #1C1204; font-weight: 600; font-size: 14px; padding: 12px 18px; border-radius: var(--r-full); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .6); transition: transform .4s var(--spring), opacity .25s; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- wallet list (connect modal) ---------- */
.wl-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.wl { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ink-line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; text-align: left; }
.wl img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.wl b { flex: 1; font-weight: 600; font-size: 15px; }
.wl small { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-full); background: rgba(14, 11, 30, .07); color: var(--ink-2); }

/* ---------- app shell (legacy inner pages) ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 60px; padding: 0 12px 0 16px; background: var(--night); border-bottom: 1px solid var(--on-line); }
.side__nav { display: none; }
.side__foot { display: none; }
.main { min-width: 0; padding: 12px 8px 0; }
.page { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
.page-head { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-2xl); padding: 32px 20px; color: var(--ink); background: radial-gradient(60% 120% at 100% 0%, rgba(255, 210, 122, .45), transparent 60%), var(--paper); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.page-head h1 { font-family: var(--display); font-size: 40px; line-height: 1.02; font-weight: 500; letter-spacing: -.02em; }
.page-head p { margin-top: 10px; font-size: 16.5px; color: var(--ink-2); max-width: 620px; }
.page-head--navy { color: #fff; background: radial-gradient(70% 120% at 100% 0%, rgba(139, 92, 246, .22), transparent 60%), linear-gradient(160deg, #171330, var(--night)); box-shadow: inset 0 0 0 1px var(--on-line); }
.page-head--navy p { color: var(--on-2); }
@media (min-width: 1080px) {
  .shell { grid-template-columns: 248px minmax(0, 1fr); }
  .side { height: 100vh; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 18px 14px; border-bottom: 0; border-right: 1px solid var(--on-line); overflow-y: auto; }
  .side .menu-btn { display: none; }
  .side__nav { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; }
  .side__foot { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 16px; }
}
.side__group { font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--on-3); padding: 16px 10px 6px; }
.side__nav a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--on-2); }
.side__nav a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.side__nav a:hover { background: rgba(245, 240, 255, .06); color: #fff; }
.side__nav a[aria-current="page"], .side__nav a.is-on { background: var(--gold); color: var(--night); font-weight: 600; }
.who { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(245, 240, 255, .06); font-size: 13px; min-width: 0; }
.who img { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.who b { display: block; font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: #fff; overflow: hidden; text-overflow: ellipsis; }
.who small { display: flex; align-items: center; gap: 5px; color: var(--on-3); font-size: 11.5px; }
.who small.ok { color: var(--gold-glow); }
.who > span { min-width: 0; flex: 1; }
.shell .footer { margin: 16px -8px 0; }
.drawer { position: fixed; inset: 60px 0 0 0; z-index: 95; background: var(--night); overflow-y: auto; padding: 8px 12px 32px; }
.drawer .side__nav { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.drawer .side__nav a { height: 46px; font-size: 16px; }
.drawer .side__foot { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* ---------- misc ---------- */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ink-line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--ink-3); }
.kv b { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.spark { width: 100%; height: 44px; overflow: visible; }
.ev { font-family: var(--mono); font-size: 12px; text-decoration: none; color: var(--gold-ink); display: inline-flex; align-items: center; gap: 4px; }
.ev:hover { text-decoration: underline; }
.ev svg { width: 12px; height: 12px; }
.on-dark .ev, .tbl--dark .ev { color: var(--gold-glow); }
.badge-ver { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 6px; border-radius: var(--r-full); background: rgba(255, 181, 71, .14); color: var(--gold-ink); font-size: 12px; font-weight: 650; }
.badge-ver svg { width: 16px; height: 16px; }
.on-dark .badge-ver { color: var(--gold-glow); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- odometer ticker ---------- */
.odo { display: inline-flex; align-items: baseline; overflow: hidden; line-height: 1; height: 1em; }
.odo__d { display: inline-block; height: 1em; overflow: hidden; }
.odo__d > span { display: flex; flex-direction: column; transition: transform 1.6s var(--ease); }
.odo__d i { font-style: normal; height: 1em; line-height: 1; display: block; }
.odo__s { display: inline-block; }

/* ---------- EXAMPLE flag (sample data while an API is not connected) ---------- */
.ex-flag { position: fixed; left: 12px; bottom: 12px; z-index: 150; display: flex; align-items: center; gap: 10px; max-width: min(460px, calc(100vw - 24px)); padding: 8px 14px 8px 8px; border-radius: var(--r-full); background: var(--night-2); color: var(--on-2); font-size: 12.5px; line-height: 1.3; box-shadow: 0 0 0 1px rgba(183, 148, 255, .5), 0 16px 40px -16px rgba(0, 0, 0, .7); }
[data-example-note] { font-family: var(--mono); }

/* ---------- charts ---------- */
.lc { position: relative; }
.lc svg { overflow: visible; touch-action: pan-y; }
.lc__tip { position: absolute; top: 4px; z-index: 5; min-width: 150px; padding: 8px 10px; border-radius: 10px; background: var(--night-2); color: #fff; font-size: 12px; line-height: 1.5; pointer-events: none; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); }
.lc__tip small { display: block; color: var(--on-3); font-size: 11px; }
.lc__tip div { display: flex; align-items: center; gap: 6px; }
.lc__tip i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.lc__tip b { margin-left: auto; padding-left: 10px; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; }
.bc { display: flex; align-items: flex-end; gap: 4px; position: relative; }
.bc__col { flex: 1; height: 100%; display: flex; align-items: flex-end; border-radius: 4px; }
.bc__bar { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--gold-deep); }
.bc__x { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.card, .on-light, .panel--ghost, .panel--gold, .panel--mist, .panel--cream, .page-head { --spark-up: var(--green-ink); --spark-down: var(--red-ink); }
.panel--ghost .btn--ink, .panel--gold .btn--ink, .page-head .btn--ink { background: var(--ink); color: #fff; }
.page-head .btn--ghost { background: rgba(14, 11, 30, .06); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(14, 11, 30, .3); }
.panel--ghost .pill, .panel--gold .pill { background: rgba(14, 11, 30, .08); color: var(--ink); }
