:root {
  color-scheme: dark;
  --bg: #07080a;
  --bg-2: #0c0e11;
  --panel: #101318;
  --panel-2: #151920;
  --line: rgba(220, 235, 225, .09);
  --line-2: rgba(220, 235, 225, .16);
  --text: #e8ece8;
  --muted: #8d968f;
  --dim: #5b635d;
  --acid: #b6ff3b;
  --acid-2: #7dff9e;
  --acid-ink: #0b1400;
  --red: #ff5c6c;
  --up: #7dff9e;
  --down: #ff6b7a;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 5vw, 80px);
  --r: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(182, 255, 59, .15);
  touch-action: manipulation;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--acid); color: var(--acid-ink); }
h1, h2, h3 { scroll-margin-top: 90px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--acid); color: var(--acid-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.mono { font-family: var(--mono); }
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.eyebrow b { color: var(--acid); font-weight: 500; }
.tnum { font-variant-numeric: tabular-nums; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter); padding-top: max(14px, env(safe-area-inset-top));
  background: linear-gradient(rgba(7, 8, 10, .85), rgba(7, 8, 10, 0));
  backdrop-filter: blur(0px);
  transition: background-color .3s ease, backdrop-filter .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: rgba(7, 8, 10, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; font: 400 26px/1 var(--serif); letter-spacing: -.01em; }
.brand-mark { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: 999px; text-decoration: none; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); transition: color .2s ease, background-color .2s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .05); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 10px var(--acid); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 255, 255, .03); text-decoration: none; white-space: nowrap;
  font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s var(--ease);
}
.btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); }
.btn:active { transform: scale(.97); }
.btn-acid { background: var(--acid); border-color: var(--acid); color: var(--acid-ink); box-shadow: 0 0 0 1px rgba(182, 255, 59, .3), 0 10px 40px -10px rgba(182, 255, 59, .55); }
.btn-acid:hover { background: #cbff6e; border-color: #cbff6e; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 11px/1 var(--mono); letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.chip-acid { border-color: rgba(182, 255, 59, .35); color: var(--acid); background: rgba(182, 255, 59, .06); }

.avatar { --h: 92; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font: 400 22px/1 var(--serif); color: hsl(var(--h) 100% 80%); background: radial-gradient(circle at 30% 25%, hsl(var(--h) 90% 55% / .55), hsl(var(--h) 60% 12%) 70%); box-shadow: inset 0 0 0 1px hsl(var(--h) 90% 70% / .25); }

/* Footer */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding: 40px var(--gutter) max(40px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--dim); font: 12px/1.6 var(--mono); }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot .brand { font-size: 22px; color: var(--text); }
.foot p { margin: 0; max-width: 60ch; }
.foot nav { display: flex; gap: 18px; margin-left: auto; }

@media (max-width: 720px) {
  .nav { gap: 12px; }
  .nav-links a:not(.keep) { display: none; }
  .status-pill { display: none; }
  .nav .brand { font-size: 21px; gap: 8px; }
  .nav .brand-mark { width: 18px; height: 18px; }
  .wallet-btn { padding: 0 12px; }
  .foot nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Wallet */
.wallet-wrap { position: relative; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 11px; }
.wallet-btn.is-on { border-color: rgba(182, 255, 59, .4); color: var(--acid); }
.wallet-btn.is-on::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 8px var(--acid); }
.wallet-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; display: none; min-width: 240px; padding: 6px; border: 1px solid var(--line-2); border-radius: 14px; background: #0f1216; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .9); }
.wallet-menu.is-on { display: grid; }
.wallet-menu p { margin: 0; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--dim); overflow-wrap: anywhere; }
.wallet-menu a, .wallet-menu button { display: block; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; text-align: left; text-decoration: none; font-size: 14px; line-height: 40px; color: var(--text); }
.wallet-menu a:hover, .wallet-menu button:hover, .wallet-menu :focus-visible { background: rgba(255, 255, 255, .06); }
.wallet-dialog { width: min(420px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line-2); border-radius: 20px; background: #0f1216; color: var(--text); overscroll-behavior: contain; }
.wallet-dialog::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); }
.wallet-dialog h2 { margin: 0; font: 400 30px/1.05 var(--serif); }
.wallet-dialog p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.wd-list { display: grid; gap: 8px; margin-top: 18px; }
.wd-item { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, .02); text-decoration: none; font-size: 15px; color: var(--text); transition: border-color .2s ease, background-color .2s ease; }
.wd-item:hover { border-color: rgba(182, 255, 59, .45); background: rgba(182, 255, 59, .04); }
.wd-item small { font: 11px/1 var(--mono); color: var(--dim); }
.wd-err { color: var(--red) !important; min-height: 1em; }
.wd-close { margin-top: 12px; width: 100%; }
