/* Orbitpad — main stylesheet
   1. Theme  2. Base  3. App shell  4. Controls  5. Shared components
   6. Home  7. Explore  8. Trending  9. Shared page blocks  10. Launch
   11. Token  12. Overlays  13. Space and HUD  14. Responsive
   Motion lives in animations.css, single-purpose helpers in utilities.css.
   The look: near-black space, a particle planet behind everything (js/space.js), a serif for
   display type, mono uppercase for instrument labels, and one warm signal colour. */

/* ---------- 1. Theme ---------- */
:root {
  color-scheme: dark;
  --bg: #05070b;
  --bg-rgb: 5, 7, 11;
  --surface: rgba(11, 15, 22, .78);
  --surface-2: rgba(16, 21, 30, .84);
  --surface-3: #141b26;
  --surface-4: #1c2533;
  --line: rgba(150, 180, 215, .1);
  --line-2: rgba(150, 180, 215, .16);
  --line-3: rgba(150, 180, 215, .28);
  --text: #e2eaf1;
  --text-2: #a3b1bf;
  --text-3: #75838f;
  --text-4: #4a5561;
  --accent: #e2eaf1;
  --accent-hover: #ffffff;
  --accent-ink: #05070b;
  --accent-soft: rgba(170, 205, 240, .07);
  --signal: #f0b44c;
  --signal-soft: rgba(240, 180, 76, .12);
  --ice: #8fc4f0;
  --ring: rgba(143, 196, 240, .6);
  --pulse: 240, 180, 76;
  --up: #9fe0b8;
  --down: #f0a08c;
  --danger: #f3a497;
  --overlay: rgba(2, 3, 6, .7);
  --topbar-bg: rgba(5, 7, 11, .55);
  --topbar-solid: rgba(5, 7, 11, .82);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 18px 40px rgba(0, 0, 0, .5);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .65);
  --glow: 0 0 0 1px rgba(143, 196, 240, .22), 0 0 32px rgba(143, 196, 240, .1);

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --topbar-h: 64px;
  --page-max: 1240px;
  --gutter: 32px;
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --glyph: 'Manrope', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.2, .75, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f5;
  --bg-rgb: 238, 241, 245;
  --surface: rgba(255, 255, 255, .8);
  --surface-2: rgba(250, 251, 253, .9);
  --surface-3: #e8edf3;
  --surface-4: #dbe2ea;
  --line: rgba(20, 40, 70, .1);
  --line-2: rgba(20, 40, 70, .15);
  --line-3: rgba(20, 40, 70, .26);
  --text: #0b1119;
  --text-2: #3f4c5a;
  --text-3: #5f6c79;
  --text-4: #98a3ae;
  --accent: #0b1119;
  --accent-hover: #000000;
  --accent-ink: #f4f7fa;
  --accent-soft: rgba(20, 40, 70, .05);
  --signal: #b1700f;
  --signal-soft: rgba(177, 112, 15, .1);
  --ice: #2d6ea6;
  --ring: rgba(45, 110, 166, .5);
  --pulse: 177, 112, 15;
  --up: #1b7a45;
  --down: #b0452c;
  --danger: #b42318;
  --overlay: rgba(12, 18, 28, .35);
  --topbar-bg: rgba(238, 241, 245, .55);
  --topbar-solid: rgba(238, 241, 245, .86);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 18px 40px rgba(16, 24, 40, .1);
  --shadow-lg: 0 30px 80px rgba(16, 24, 40, .18);
  --glow: 0 0 0 1px rgba(45, 110, 166, .2), 0 10px 30px rgba(45, 110, 166, .08);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; letter-spacing: -.015em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
table { border-spacing: 0; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
::selection { background: var(--signal); color: var(--accent-ink); }

.i {
  width: 18px; height: 18px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.glyph { font-family: var(--glyph); }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 300;
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* Display type: a serif for page and section titles, set large and light. */
.page-head h1, .section-head h2, .display, .token-head h1, .empty h3, .success h3, .modal-head h2 {
  font-family: var(--display); font-weight: 400; letter-spacing: -.01em;
}

/* Instrument labels: mono, uppercase, tracked out. */
.eyebrow, .sr-group, .side-title, .uppercase-label, .ft-h, .hud-status, .top-nav a, .label-mono {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .14em;
}

/* ---------- 3. App shell ---------- */
.space {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0; transition: opacity 1.2s ease;
}
.space.is-on { opacity: 1; }
/* A soft vignette and a faint grid over the particles, so text always has a calm backdrop. */
.space-veil {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(var(--bg-rgb), .75) 100%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 120px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 120px 100%;
  -webkit-mask-image: radial-gradient(90% 70% at 50% 30%, #000 20%, transparent 85%);
  mask-image: radial-gradient(90% 70% at 50% 30%, #000 20%, transparent 85%);
  opacity: .5;
}

.app {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* The drawer (mobile navigation). Hidden above 1024px, where the links sit in the top bar. */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 90;
  width: min(320px, 88vw);
  display: flex; flex-direction: column;
  background: var(--topbar-solid);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border-right: 1px solid var(--line-2);
  overflow-y: auto;
  transform: translateX(-100%); visibility: hidden;
  transition: transform .45s var(--ease-out), visibility 0s .45s;
}
.nav-open .sidebar { transform: none; visibility: visible; transition: transform .45s var(--ease-out); }
.sb-head { display: flex; align-items: center; gap: 10px; padding: 0 16px 0 20px; min-height: var(--topbar-h); border-bottom: 1px solid var(--line); }
.sb-nav { display: flex; flex-direction: column; padding: 18px 12px; }
.sb-link {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--display); font-size: 30px; line-height: 1.1; color: var(--text-2);
  transition: color .2s, padding .3s var(--ease);
}
.sb-link .i { margin-left: auto; width: 18px; height: 18px; opacity: .4; transition: opacity .2s, transform .3s var(--ease); }
.sb-link:hover, .sb-link[aria-current="page"] { color: var(--text); padding-left: 16px; }
.sb-link:hover .i { opacity: 1; transform: translate(2px, -2px); }
.sb-link[aria-current="page"] .sb-no { color: var(--signal); }
.sb-no { font: 500 11px var(--mono); letter-spacing: .1em; color: var(--text-3); }
.sb-spacer { flex: 1; min-height: 20px; }
.sb-foot { display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 22px; border-top: 1px solid var(--line); }
.sb-mini {
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 10px; border-radius: var(--radius);
  color: var(--text-3); font-size: 13px;
  transition: color .15s, background .15s;
}
.sb-mini .i { width: 16px; height: 16px; }
.sb-mini:hover { color: var(--text); background: var(--accent-soft); }

.nav-scrim {
  position: fixed; inset: 0; z-index: 80;
  background: var(--overlay);
  opacity: 0; pointer-events: none;
  transition: opacity .35s;
}
.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 22px;
  padding: 0 var(--gutter);
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.topbar.is-solid { background: var(--topbar-solid); border-bottom-color: var(--line); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar .burger, .topbar .search-toggle, .topbar .search-close { display: none; }

.top-nav { display: flex; align-items: center; gap: 4px; }
.top-nav a {
  position: relative;
  padding: 8px 12px;
  font-size: 11.5px; font-weight: 500; color: var(--text-3);
  transition: color .2s;
}
.top-nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px;
  background: var(--signal);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.top-nav a:hover { color: var(--text); }
.top-nav a:hover::after, .top-nav a[aria-current="page"]::after { transform: scaleX(1); }
.top-nav a[aria-current="page"] { color: var(--text); }

.page {
  flex: 1;
  width: 100%;
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 40px var(--gutter) 80px;
  outline: none;
}

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; font-family: var(--display); font-size: 24px; font-weight: 400; letter-spacing: -.01em; line-height: 1; }
.logo-mark { width: 28px; height: 28px; color: var(--text); overflow: visible; transition: transform .6s var(--ease-out); }
.brand:hover .logo-mark { transform: rotate(-24deg) scale(1.06); }
.brand-name b { font-weight: 400; font-style: italic; color: var(--text-2); }

/* Search */
.search { position: relative; width: min(340px, 100%); margin-left: auto; }
.search-field {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 8px 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: rgba(var(--bg-rgb), .45);
  color: var(--text-3);
  cursor: text;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search-field:focus-within { border-color: var(--line-3); background: var(--surface-2); box-shadow: var(--glow); }
.search-field input { flex: 1; min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: none; color: var(--text); }
.search-field input::placeholder { color: var(--text-3); }
.kbd {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  font: 500 11px/1 var(--mono); color: var(--text-3);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px;
  background: var(--surface-2);
}
.search-pop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  min-width: 320px;
  padding: 6px;
  max-height: min(440px, 70vh); overflow-y: auto;
  background: var(--topbar-solid);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.search-pop[hidden] { display: none; }
.sr-group { padding: 8px 10px 6px; font-size: 10.5px; font-weight: 500; color: var(--signal); }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); }
.sr-item .art { width: 30px; height: 30px; border-radius: 6px; }
.sr-item[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--signal); }
.sr-name { font-weight: 600; }
.sr-name mark { background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 3px; }
.sr-ticker { display: block; font: 12px var(--mono); color: var(--text-3); }
.sr-mc { margin-left: auto; font: 12px var(--mono); color: var(--text-2); }
.sr-empty { padding: 18px 12px 14px; color: var(--text-2); font-size: 13px; }
.sr-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 4px; padding: 10px 10px 6px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-3);
}
.sr-foot a { color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.sr-foot a .i { width: 14px; height: 14px; }
.sr-foot a:hover { color: var(--text); }

/* Wallet */
.wallet { position: relative; }
.wallet-chip { padding: 0 12px 0 10px; gap: 9px; }
.wallet-chip .mono { font-size: 12.5px; }

/* Footer */
.site-footer { position: relative; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(var(--bg-rgb), .85) 40%); }
.ft-in {
  width: 100%; max-width: calc(var(--page-max) + 2 * var(--gutter));
  margin: 0 auto; padding: 48px var(--gutter) 64px;
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.3fr); gap: 32px;
  font-size: 13px; color: var(--text-3);
}
.ft-brand { display: grid; gap: 12px; align-content: start; }
.ft-brand .brand { font-size: 28px; color: var(--text); }
.ft-brand p { max-width: 38ch; color: var(--text-2); }
.ft-brand .ft-note { font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.ft-col { display: grid; gap: 10px; align-content: start; }
.ft-col a { width: fit-content; transition: color .15s; }
.ft-col a:hover { color: var(--text); }
.ft-h { font-size: 10.5px; color: var(--signal); margin-bottom: 4px; }
.ft-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; }

/* The featured-token card (in the footer). */
.sb-pot {
  display: grid; gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color .2s, background .2s, box-shadow .3s;
}
a.sb-pot:hover { border-color: var(--line-3); box-shadow: var(--glow); }
.sb-pot-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); }
.sb-pot-top .i { width: 15px; height: 15px; }
.sb-pot-label { display: inline-flex; align-items: center; gap: 8px; font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--signal); }
.sb-pot-pct { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.sb-pot-val { font-family: var(--display); font-size: 26px; color: var(--text); line-height: 1.1; }
.sb-pot.is-empty { cursor: default; }
.sb-tok { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sb-tok .art { width: 36px; height: 36px; border-radius: 6px; }
.sb-tok b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; color: var(--text); }
.sb-tok small { display: block; font: 11px var(--mono); color: var(--text-3); }
.sb-tok-note { font-size: 12px; color: var(--text-3); }

/* Page loader (first visit of a session): the mark with an orbit drawn around it. */
.loader { display: none; }
.first-visit .loader {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center;
  background: var(--bg);
}
.loader-inner { position: relative; display: grid; justify-items: center; gap: 22px; }
.loader-orbit { position: relative; width: 96px; height: 96px; }
.loader-orbit svg { width: 100%; height: 100%; overflow: visible; }
.loader-orbit .lo-ring { fill: none; stroke: var(--line-3); stroke-width: 1; }
.loader-orbit .lo-arc { fill: none; stroke: var(--signal); stroke-width: 1.5; stroke-linecap: round; }
.loader-orbit .lo-core { fill: var(--text); }
.loader-word { font: 500 11px var(--mono); letter-spacing: .4em; text-transform: uppercase; color: var(--text-2); padding-left: .4em; }
.loader-bar { width: 148px; height: 1px; background: var(--line-2); overflow: hidden; }
.loader-bar span { display: block; height: 100%; background: var(--signal); transform-origin: left; }

/* ---------- 4. Controls ---------- */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px;
  border: 1px solid transparent; border-radius: 6px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .2s, transform .15s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 30px rgba(143, 196, 240, .16); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 0 0 1px rgba(255, 255, 255, .15), 0 10px 40px rgba(143, 196, 240, .3); }
.btn-signal { background: var(--signal); color: #120c02; }
.btn-signal:hover { filter: brightness(1.08); box-shadow: 0 10px 40px rgba(240, 180, 76, .28); }
.btn-outline { background: rgba(var(--bg-rgb), .4); border-color: var(--line-3); color: var(--text); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-outline:hover { background: var(--surface-3); border-color: var(--line-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--text); }
.btn-sm { --h: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 5px; }
.btn-lg { --h: 48px; padding: 0 22px; font-size: 14.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; box-shadow: none; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translate(2px, -2px); }
.btn.is-loading { pointer-events: none; }
.btn .spin-sm { width: 14px; height: 14px; border-width: 2px; }

.icon-btn {
  width: 40px; height: 40px; flex-shrink: 0;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--surface); color: var(--text-2);
  transition: color .15s, background .15s, border-color .15s, transform .15s var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--surface-3); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 5px; }
.icon-btn.sm .i { width: 16px; height: 16px; }
.icon-btn.bare { border-color: transparent; background: none; }
.icon-btn.bare:hover { background: var(--accent-soft); }

.link-quiet { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 13px; transition: color .15s; }
button.link-quiet { padding: 0; border: 0; background: none; }
.link-quiet .i { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.link-quiet:hover { color: var(--text); }
.link-quiet:hover .i { transform: translateX(2px); }
.link-quiet:hover .i.arrow { transform: translate(2px, -2px); }

.segmented {
  position: relative;
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--surface);
}
.segmented button {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border: 0; border-radius: 5px; background: none;
  color: var(--text-3); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: color .2s;
}
.segmented button:hover { color: var(--text-2); }
.segmented button[aria-selected="true"] { color: var(--text); }
.segmented:not(.has-ind) button[aria-selected="true"] { background: var(--surface-4); }
.seg-ind {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0;
  border-bottom: 1px solid var(--signal);
  border-radius: 5px;
  background: var(--surface-4);
  box-shadow: inset 0 0 0 1px var(--line-3);
  transition: transform .35s var(--ease), width .35s var(--ease);
}
.soon { font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: var(--surface-3); color: var(--text-3); }

.field {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--surface); color: var(--text-3);
  transition: border-color .15s, box-shadow .15s;
}
.field:focus-within { border-color: var(--line-3); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input { flex: 1; min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: none; color: var(--text); }
.field input::placeholder { color: var(--text-3); }
.field .i { width: 16px; height: 16px; }

.select { position: relative; display: inline-flex; }
.select select {
  appearance: none; -webkit-appearance: none;
  height: 38px; padding: 0 36px 0 12px;
  border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--surface); color: var(--text);
  cursor: pointer;
}
.select select:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.select option { background: var(--surface); color: var(--text); }
.select .i { position: absolute; right: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); pointer-events: none; color: var(--text-3); }

/* ---------- 5. Shared components ---------- */
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card-pad { padding: 20px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; margin-bottom: 14px; }
.section-head h2 { font-size: 30px; line-height: 1.05; }
.section-head p { color: var(--text-2); font-size: 13px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(40px, 5.6vw, 68px); line-height: 1; }
.page-head p { margin-top: 8px; max-width: 62ch; color: var(--text-2); font-size: 14.5px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 11px; font-weight: 500; color: var(--signal); }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--surface-3); color: var(--text-2);
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.badge .i { width: 12px; height: 12px; stroke-width: 2.2; }
.badge-solid { background: var(--accent); border-color: transparent; color: var(--accent-ink); }

.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex-shrink: 0; }

.bar { position: relative; height: 6px; border-radius: 99px; background: var(--surface-4); overflow: hidden; }
.bar > span {
  position: absolute; inset: 0 auto 0 0;
  width: var(--p, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ice), var(--signal));
  box-shadow: 0 0 10px rgba(var(--pulse), .35);
  transition: width .9s var(--ease);
}
.bar-thin { height: 4px; }

.art { display: block; overflow: hidden; border-radius: 6px; background: var(--surface-3); flex-shrink: 0; }
.art svg, .art img { width: 100%; height: 100%; object-fit: cover; }

.up { color: var(--up); }
.down { color: var(--down); }

/* Relative, so a visually hidden header label cannot escape and widen the page. */
.table-wrap { position: relative; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  padding: 12px 16px; text-align: left; white-space: nowrap;
  font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3);
  border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.who { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12.5px; }

/* Token card */
.token-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.token-card {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .2s, background .2s, box-shadow .25s, transform .25s var(--ease);
}
.token-card:hover { border-color: var(--line-3); background: var(--surface-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.tc-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tc-top .art { width: 52px; height: 52px; border-radius: 8px; transition: transform .35s var(--ease); }
.token-card:hover .tc-top .art { transform: scale(1.05) rotate(-2deg); }
.tc-id { flex: 1; min-width: 0; }
.tc-name { display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; }
.tc-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-name .i { width: 14px; height: 14px; color: var(--text-2); stroke-width: 2; }
.tc-sub { display: flex; gap: 8px; margin-top: 2px; font: 12px var(--mono); color: var(--text-3); }
.tc-change { align-self: flex-start; font: 500 12.5px var(--mono); }
.tc-mc { align-self: flex-start; text-align: right; font: 600 14px var(--mono); letter-spacing: -.01em; white-space: nowrap; }
.tc-mc small { display: block; margin-top: 1px; font: 400 10.5px var(--font); color: var(--text-3); letter-spacing: .04em; }
.badge-ours { border-color: rgba(var(--pulse), .45); color: var(--signal); background: var(--signal-soft); }
.tc-stats { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-3); }
.tc-stats b { color: var(--text); font-family: var(--mono); font-weight: 500; margin-left: 4px; }
.tc-pot { display: grid; gap: 7px; }
.bar.is-done > span { background: var(--signal); }
.ic-done { width: 13px; height: 13px; color: var(--text-2); }

/* Skeleton card */
.sk-card { display: flex; flex-direction: column; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.sk-row { display: flex; align-items: center; gap: 12px; }

/* Winners */
.winners { padding: 6px; }
.win-row { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 6px; transition: background .15s; }
.win-row:hover { background: var(--surface-2); }
.win-row + .win-row { margin-top: 2px; }
.win-addr { font: 13px var(--mono); }
.win-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--text-3); }
.win-amt { margin-left: auto; text-align: right; font: 500 13px var(--mono); }
.win-amt small { display: block; margin-top: 2px; font: 11.5px var(--font); color: var(--text-3); }
.rank {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--surface-4); color: var(--text-2);
  font: 600 10.5px var(--mono);
}

/* Empty state */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 20px; text-align: center; }
.empty-ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text-2); }
.empty h3 { font-size: 24px; }
.empty p { max-width: 38ch; color: var(--text-2); font-size: 13px; }
.empty .btn, .empty .link-quiet { margin-top: 4px; }
.token-grid > .empty { grid-column: 1 / -1; border: 1px dashed var(--line-2); border-radius: 8px; }

/* Charts */
.chart { position: relative; height: 220px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 2 4; }
.chart .axis { fill: var(--text-3); font: 10.5px var(--mono); }
.chart .line { fill: none; stroke: var(--signal); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.chart .area-top { stop-color: var(--signal); stop-opacity: .2; }
.chart .area-bottom { stop-color: var(--signal); stop-opacity: 0; }
.chart .bar-rect { fill: var(--surface-4); transition: fill .15s; }
.chart .bar-rect.is-hot { fill: var(--signal); }
.chart .cursor { stroke: var(--line-3); stroke-dasharray: 3 3; }
.chart .dot { fill: var(--signal); stroke: var(--surface); stroke-width: 2.5; }
.chart-tip {
  position: absolute; left: 0; top: 0; z-index: 2;
  padding: 7px 10px; border-radius: 5px;
  background: var(--surface-4); border: 1px solid var(--line-3);
  box-shadow: var(--shadow);
  font: 500 12.5px var(--mono); white-space: nowrap;
  pointer-events: none; opacity: 0;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity .12s;
}
.chart-tip.show { opacity: 1; }
.chart-tip small { display: block; font: 11px var(--font); color: var(--text-3); }

/* ---------- 6. Home ---------- */

.art.sm { width: 34px; height: 34px; border-radius: 5px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.feature-card {
  position: relative;
  display: flex; flex-direction: column;
  height: 236px; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .2s, box-shadow .25s, transform .25s var(--ease);
}
.feature-card:hover { border-color: var(--line-3); box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-scene { position: relative; flex: 1; overflow: hidden; }
.feature-label {
  position: relative; z-index: 2;
  font-family: var(--display); font-size: 21px !important; font-weight: 400 !important;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px 14px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 14px; font-weight: 600;
}
.feature-label small { display: block; margin-top: 2px; font-family: var(--font); font-size: 12px; font-weight: 400; color: var(--text-3); }
.arrow-chip {
  width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 5px;
  color: var(--text-2);
  transition: background .2s, color .2s, border-color .2s;
}
.arrow-chip .i { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.feature-card:hover .arrow-chip { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.feature-card:hover .arrow-chip .i { transform: translate(1px, -1px); }

/* Explore scene: drifting token lanes */
.scene-explore {
  background: radial-gradient(120% 90% at 50% 0%, var(--surface-3), var(--surface) 70%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 86%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 86%, transparent 100%);
}
.lanes { position: absolute; top: -40%; bottom: -40%; left: -12%; right: -12%; display: flex; justify-content: center; gap: 10px; transform: rotate(-9deg); }
.lane { display: flex; flex-direction: column; gap: 10px; width: 108px; flex-shrink: 0; }
.lane-tile { padding: 6px 6px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 6px 16px rgba(0, 0, 0, .22); }
.lane-tile .art { width: 100%; height: auto; aspect-ratio: 1; border-radius: 7px; }
.lane-tile b { display: block; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.lane-tile small { display: block; font: 10px var(--mono); color: var(--text-3); }

/* King of the hill scene: the busiest token on its curve right now */
.scene-king { display: grid; place-items: center; background: radial-gradient(90% 80% at 50% 26%, var(--surface-3), var(--surface) 72%); }
.king-wrap { width: 100%; display: grid; place-items: center; padding: 0 16px; }
.king { display: grid; justify-items: center; gap: 7px; width: 100%; max-width: 208px; text-align: center; }
.king-crown {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 5px;
  background: var(--accent-soft); border: 1px solid var(--line-2); color: var(--text);
}
.king-crown .i { width: 14px; height: 14px; }
.king .art { width: 58px; height: 58px; border-radius: 8px; box-shadow: 0 10px 24px rgba(0, 0, 0, .28); }
.king-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.king-meta { display: flex; align-items: center; gap: 6px; font: 11px var(--mono); color: var(--text-3); }
.king-bar { width: 100%; margin-top: 3px; }

/* Launch scene: floating form sheet */
.scene-launch { display: grid; place-items: center; background: radial-gradient(90% 80% at 62% 28%, var(--surface-3), var(--surface) 72%); }
.orbit { position: absolute; left: 50%; top: 50%; width: 250px; height: 250px; margin: -125px 0 0 -125px; border-radius: 50%; border: 1px solid var(--line-2); }
.orbit::before { content: ""; position: absolute; inset: 34px; border-radius: 50%; border: 1px dashed var(--line-2); }
.orbit::after { content: ""; position: absolute; top: -4px; left: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--text); box-shadow: 0 0 14px var(--text-3); }
.sheet {
  position: relative;
  width: 212px; padding: 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line-3);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .3);
  transform: rotate(-4deg);
}
.sheet-head { display: flex; align-items: center; gap: 9px; padding-bottom: 9px; border-bottom: 1px solid var(--line-2); }
.sheet-avatar { position: relative; width: 32px; height: 32px; border-radius: 5px; border: 1px dashed var(--line-3); overflow: hidden; flex-shrink: 0; }
.sheet-avatar .art { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.sheet small { display: block; font-size: 9.5px; color: var(--text-3); line-height: 1.3; }
.sheet-title { display: block; height: 17px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.sheet-check {
  margin-left: auto; width: 20px; height: 20px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink);
}
.sheet-check .i { width: 12px; height: 12px; stroke-width: 3; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.sheet-row .val { display: inline-flex; align-items: center; height: 16px; font: 11.5px var(--mono); }
.typed { display: inline-block; overflow: hidden; white-space: nowrap; width: calc(var(--n, 6) * 1ch); }
.caret { display: inline-block; width: 1.5px; height: 12px; margin-left: 1px; background: currentColor; visibility: hidden; }
.sheet-progress { height: 4px; margin-top: 10px; border-radius: 99px; background: var(--surface-4); overflow: hidden; }
.sheet-progress span { display: block; height: 100%; border-radius: inherit; background: var(--text); transform-origin: left; }

/* Market */
.market { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 24px; align-items: start; margin-top: 36px; }
.market-aside { display: grid; gap: 12px; }
.market .section-head .link-quiet { margin-left: auto; }

/* ---------- 7. Explore ---------- */
.scroller-wrap { position: relative; }
.scroller { display: flex; gap: 10px; overflow-x: auto; padding: 2px; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
.scroller::-webkit-scrollbar { display: none; }
.trend-chip {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
  scroll-snap-align: start;
  transition: border-color .2s, background .2s;
}
.trend-chip:hover { border-color: var(--line-3); background: var(--surface-2); }
.trend-chip .art { width: 38px; height: 38px; border-radius: 5px; }
.trend-chip b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; }
.trend-chip small { display: block; font: 11.5px var(--mono); color: var(--text-3); white-space: nowrap; }
.trend-no { font: 500 11px var(--mono); color: var(--text-3); width: 16px; text-align: center; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.toolbar .field { flex: 1 1 220px; max-width: 340px; }
.toolbar .select { margin-left: auto; }
.result-count { margin-bottom: 12px; font-size: 12.5px; color: var(--text-3); }
.load-more { display: flex; justify-content: center; margin-top: 20px; }

/* ---------- 8. Trending ---------- */
.table-card { padding: 0; overflow: hidden; }
.table th button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit;
}
.table th button::after {
  content: ""; width: 0; height: 0; opacity: .35;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
}
.table th button:hover { color: var(--text); }
.table th button.is-sorted { color: var(--text); }
.table th button.is-sorted::after { opacity: 1; }
.table th[aria-sort="ascending"] button::after { border-top: 0; border-bottom: 4px solid currentColor; }

.trend-table th, .trend-table td { padding-left: 11px; padding-right: 11px; }
.trend-table td { padding-top: 10px; padding-bottom: 10px; vertical-align: middle; }
.trend-table .num small { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; }
.trend-table .num b { font-weight: 600; }
.trend-table .tr-token { white-space: nowrap; }
.tr-id { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.tr-id:hover .tr-name b { text-decoration: underline; }
.tr-name { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13.5px; }
.tr-name b { font-weight: 600; }
.tr-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 13ch; color: var(--text-3); font-size: 12.5px; }
.tr-sub { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 11.5px; color: var(--text-3); }
.trend-table .btn-sm { padding: 5px 11px; }
.trend-table .btn .i { width: 13px; height: 13px; }

/* Wallet page */
.wallet-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); letter-spacing: -.02em; }
.wallet-grid { display: grid; gap: 14px; }
.wallet-card { padding: 18px 20px; min-width: 0; }
.wallet-card .card-head { margin-bottom: 10px; }
.wallet-card .token-grid { margin-top: 4px; }
.fees-amount { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.fees-amount b { font: 600 26px var(--mono); letter-spacing: -.03em; }
.fee-tokens { display: grid; gap: 6px; margin-top: 12px; }
.fee-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); font-size: 13px; }

/* ---------- 9. Shared page blocks ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.fine { font-size: 12px; color: var(--text-3); line-height: 1.6; }

.bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.bullets li { position: relative; padding-left: 20px; color: var(--text-2); font-size: 13px; }
.bullets li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 6px; height: 6px; border-radius: 2px; background: var(--text-3); }
.bullets b { color: var(--text); font-weight: 600; }

/* ---------- 10. Launch ---------- */
.launch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.launch-side { position: sticky; top: calc(var(--topbar-h) + 20px); display: grid; gap: 12px; }
.form { padding: 4px 22px 22px; }
.fieldset { display: grid; gap: 14px; margin: 0; padding: 20px 0; border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
.legend-title { display: flex; align-items: baseline; gap: 8px; padding: 0; font-size: 14px; font-weight: 600; }
.legend-title small { font-size: 12px; font-weight: 400; color: var(--text-3); }
.form-row { display: grid; gap: 7px; min-width: 0; }
.form-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.label .opt, .label .count { font-weight: 400; color: var(--text-3); }
.label .count { font: 11.5px var(--mono); }
.input, .textarea {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--surface-2); color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus { border-color: var(--line-3); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-wrap { position: relative; }
.input-wrap .input { padding-left: 28px; }
.input-wrap .pre { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-family: var(--mono); color: var(--text-3); pointer-events: none; }
.input-wrap .suf { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 12px var(--mono); color: var(--text-3); pointer-events: none; }
.input-wrap.has-suf .input { padding-left: 12px; padding-right: 52px; }
.input.mono { font-family: var(--mono); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.hint { font-size: 12px; color: var(--text-3); }
.error { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--danger); }
.error .i { width: 14px; height: 14px; }
.error:empty { display: none; }

.dropzone {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border: 1.5px dashed var(--line-3); border-radius: 8px;
  background: var(--surface-2);
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--text-3); background: var(--surface-3); }
.dropzone:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--text-3); }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dz-thumb { width: 64px; height: 64px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: var(--surface-4); color: var(--text-3); }
.dz-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dz-text b { display: block; font-size: 13.5px; font-weight: 600; }
.dz-text span { font-size: 12px; color: var(--text-3); }
.dz-clear { position: relative; z-index: 1; margin-left: auto; }

.form-foot { display: grid; gap: 12px; padding-top: 20px; }
.summary { display: grid; gap: 8px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-2); }
.summary-line b { font-family: var(--mono); font-weight: 500; color: var(--text); text-align: right; }
.side-title { padding: 14px 16px 0; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.preview-slot { padding: 12px; }
.preview-slot .token-card { pointer-events: none; }

.success { display: grid; justify-items: center; gap: 12px; padding: 10px 0 4px; text-align: center; }
.success .art { width: 84px; height: 84px; border-radius: 20px; }
.success h3 { font-size: 28px; }
.success p { color: var(--text-2); font-size: 13px; max-width: 34ch; }
.confirming { display: grid; justify-items: center; gap: 14px; padding: 18px 0 8px; text-align: center; }
.confirming p { color: var(--text-2); font-size: 13px; }

/* Logo drop zone on the launch form */
.drop {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; cursor: pointer;
  border: 1px dashed var(--line-3); border-radius: 8px;
  background: var(--surface-2);
  transition: border-color .2s, background .2s;
}
.drop:hover, .drop.is-over { border-color: var(--text-3); background: var(--surface-3); }
.drop:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; }
.drop.is-bad { border-color: var(--danger); }
.drop.has-image { border-style: solid; }
.drop.is-off { cursor: default; opacity: .65; border-style: solid; }
.drop.is-off:hover { border-color: var(--line-3); background: var(--surface-2); }
.drop-art {
  width: 46px; height: 46px; flex-shrink: 0; overflow: hidden;
  display: grid; place-items: center;
  border-radius: 6px; background: var(--surface-4); color: var(--text-3);
}
.drop-art img { width: 100%; height: 100%; object-fit: cover; }
.drop-text { display: grid; gap: 2px; min-width: 0; }
.drop-text b { font-size: 13.5px; font-weight: 600; }
.drop-text small { font-size: 12px; color: var(--text-3); }
.drop [data-drop-clear] { margin-left: auto; }

/* ---------- 11. Token ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 13px; color: var(--text-3); }
.crumbs a:hover { color: var(--text); }
.crumbs .i { width: 14px; height: 14px; }
.token-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.token-head > .art { width: 68px; height: 68px; border-radius: 12px; }
.token-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: clamp(34px, 4vw, 48px); line-height: 1.05; }
.ticker-pill { padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 7px; font: 500 13px var(--mono); letter-spacing: 0; color: var(--text-2); }
.token-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.addr-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 9px;
  border: 1px solid var(--line-2); border-radius: 7px;
  background: var(--surface); color: var(--text-2);
  font: 12px var(--mono);
  transition: color .15s, background .15s;
}
.addr-btn .i { width: 13px; height: 13px; }
.addr-btn:hover { color: var(--text); background: var(--surface-3); }
.head-actions { margin-left: auto; display: flex; gap: 8px; }
.stat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.stat { padding: 14px 16px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat small { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.stat b { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 17px var(--mono); letter-spacing: -.02em; }
.stat b .sub { margin-left: 6px; font-size: 12px; font-weight: 500; }
.token-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; margin-top: 16px; }
.token-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.token-side { position: sticky; top: calc(var(--topbar-h) + 16px); display: grid; gap: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 16px 18px 0; }
.card-head h2 { font-size: 15px; }
.price-now { display: flex; align-items: baseline; gap: 10px; padding: 8px 18px 0; }
.price-now b { font: 600 24px var(--mono); letter-spacing: -.03em; }
.price-now span { font: 500 13px var(--mono); }
.chart-pad { padding: 8px 18px 12px; }
.trade { display: grid; gap: 14px; padding: 16px; }
.trade .segmented { display: flex; }
.trade .segmented button { flex: 1; }
.amount-field {
  display: flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 12px 0 14px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--surface-2);
  transition: border-color .15s, box-shadow .15s;
}
.amount-field:focus-within { border-color: var(--line-3); box-shadow: 0 0 0 3px var(--accent-soft); }
.amount-field input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: none; font: 500 20px var(--mono); color: var(--text); }
.trade > * { min-width: 0; }
.amount-field input::placeholder { color: var(--text-4); }
.amount-field .cur { padding: 4px 8px; border-radius: 7px; background: var(--surface-4); font: 500 12px var(--mono); color: var(--text-2); }
.quick { display: flex; gap: 6px; }
.quick button {
  flex: 1; height: 30px;
  border: 1px solid var(--line-2); border-radius: 5px;
  background: var(--surface); color: var(--text-2);
  font: 12px var(--mono);
  transition: color .15s, background .15s;
}
.quick button:hover { color: var(--text); background: var(--surface-3); }
.est { display: grid; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.est div { display: flex; justify-content: space-between; gap: 10px; }
.est b { font-family: var(--mono); font-weight: 500; color: var(--text); }
.about { padding: 18px; display: grid; gap: 12px; }
.about p { color: var(--text-2); font-size: 13.5px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 12. Overlays ---------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: var(--overlay); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal {
  position: relative;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  width: min(440px, 100%);
  max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--topbar-solid);
  border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow-lg);
}
.modal.lg { width: min(620px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 14px 0 20px; }
.modal-head h2 { font-size: 24px; }
.modal-body { padding: 14px 20px 20px; }
.modal-root.is-locked .modal-head [data-close] { visibility: hidden; }

.wallet-list { display: grid; gap: 8px; }
.wallet-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px; text-align: left;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--surface-2);
  transition: border-color .15s, background .15s;
}
.wallet-opt:hover:not([disabled]) { border-color: var(--line-3); background: var(--surface-3); }
.wallet-opt[disabled] { opacity: .55; cursor: not-allowed; }
.wallet-opt img, .wallet-ic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 5px; }
.wallet-ic { display: grid; place-items: center; background: var(--surface-4); color: var(--text-2); }
.wallet-opt b { display: block; font-size: 14px; font-weight: 600; }
.wallet-opt small { font-size: 12px; color: var(--text-3); }
.wallet-opt > .i { margin-left: auto; color: var(--text-3); }

.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70;
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  min-width: 232px; padding: 6px;
  background: var(--topbar-solid);
  border: 1px solid var(--line-2); border-radius: 8px;
  box-shadow: var(--shadow-lg);
}
.menu[hidden] { display: none; }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.menu-head small { display: block; font-size: 11.5px; color: var(--text-3); }
.menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 36px; padding: 0 10px;
  border: 0; border-radius: 5px; background: none;
  color: var(--text-2); font-size: 13px; text-align: left;
}
.menu-item .i { width: 16px; height: 16px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-3); color: var(--text); outline: none; }

.toasts {
  position: fixed; right: 16px; bottom: 16px; z-index: 120;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  display: flex; align-items: flex-start; gap: 10px;
  width: 100%; padding: 12px 10px 12px 14px;
  background: var(--surface-3);
  border: 1px solid var(--line-3); border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
}
.toast > .i { margin-top: 1px; color: var(--text-2); }
.toast b { display: block; font-weight: 600; }
.toast p { margin-top: 2px; font-size: 12.5px; color: var(--text-2); }
.toast .icon-btn { margin: -4px 0 -4px auto; }

.confetti { position: fixed; inset: 0; z-index: 150; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -16px; left: var(--x); width: var(--w); height: var(--h); border-radius: 2px; background: var(--c); }

.spinner { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--surface-4); border-top-color: var(--text); }


/* ---------- 13. Space, HUD and the home hero ---------- */

/* Panels get small corner ticks, like the frame of an instrument readout. */
.card, .feature-card, .stat-row, .token-card, .sk-card, .step {
  background-image:
    linear-gradient(var(--line-3), var(--line-3)), linear-gradient(var(--line-3), var(--line-3)),
    linear-gradient(var(--line-3), var(--line-3)), linear-gradient(var(--line-3), var(--line-3));
  background-size: 10px 1px, 1px 10px, 10px 1px, 1px 10px;
  background-position: 0 0, 0 0, 100% 100%, 100% 100%;
  background-repeat: no-repeat;
}

/* 3D tilt (driven by js/shell.js) with a light that follows the pointer. */
.token-card, .feature-card, .tilt { transform-style: preserve-3d; will-change: transform; }
.token-card.is-tilting, .feature-card.is-tilting, .tilt.is-tilting {
  transform: perspective(900px) var(--tilt, none) translateY(-3px);
  transition: border-color .2s, background .2s, box-shadow .25s, transform .12s linear;
}
.token-card::before, .feature-card::before, .tilt::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(143, 196, 240, .12), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
[data-theme="light"] .token-card::before, [data-theme="light"] .feature-card::before, [data-theme="light"] .tilt::before {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(45, 110, 166, .09), transparent 45%);
}
.token-card.is-tilting::before, .feature-card.is-tilting::before, .tilt.is-tilting::before { opacity: 1; }
.token-card > *, .feature-card > * { position: relative; z-index: 1; }

/* HUD status line, bottom left of every page. */
.hud-status {
  position: fixed; left: 16px; bottom: 14px; z-index: 25;
  display: flex; align-items: center; gap: 9px;
  padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 10px; font-weight: 500; letter-spacing: .12em; color: var(--text-3);
  pointer-events: none;
}
.hud-status b { font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.hud-sep { color: var(--text-4); }
.hud-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); }
.hud-status.is-live .hud-dot { background: var(--up); box-shadow: 0 0 8px var(--up); }

.scroll-line {
  position: fixed; left: 0; right: 0; top: 0; z-index: 35; height: 1px;
  background: linear-gradient(90deg, transparent, var(--signal) 30%, var(--ice));
  transform: scaleX(0); transform-origin: left;
  pointer-events: none;
}

/* Hero: the planet sits behind the title, with instrument readouts in the corners. */
.hero {
  position: relative;
  min-height: calc(100vh - var(--topbar-h));
  min-height: calc(100svh - var(--topbar-h));
  margin: -40px calc(-1 * var(--gutter)) 0;
  padding: 28px var(--gutter);
  display: grid; grid-template-rows: auto 1fr auto;
  border-bottom: 1px solid var(--line);
}
.hud-row { display: flex; justify-content: space-between; gap: 20px; }
.hud-cell { display: grid; gap: 4px; font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.hud-cell b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.hud-cell.right { text-align: right; justify-items: end; }
.hud-cell .live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; vertical-align: 1px; background: var(--up); }
.hero-center { align-self: center; display: grid; justify-items: center; gap: 18px; padding: 40px 0; text-align: center; }
.hero-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(64px, 13.5vw, 196px); line-height: .86; letter-spacing: -.02em;
  color: var(--text);
  text-shadow: 0 0 60px rgba(var(--bg-rgb), .9);
}
.hero-title .ch { display: inline-block; }
.hero-title .it { font-style: italic; color: var(--text-2); }
.hero-sub { font-family: var(--display); font-style: italic; font-size: clamp(18px, 2vw, 24px); color: var(--text-2); }
.hero-tags { font: 500 11.5px var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--signal); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; font: 500 10.5px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); }
.scroll-cue i { display: block; width: 1px; height: 28px; background: linear-gradient(var(--signal), transparent); }

/* Numbered sections, as on an instrument panel. */
.block { padding-top: 96px; }
.block-head { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px 32px; margin-bottom: 28px; align-items: end; }
.block-no { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--signal); align-self: start; padding-top: 10px; border-top: 1px solid var(--signal); }
.block-head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.02; letter-spacing: -.015em; }
.block-head p { margin-top: 12px; max-width: 60ch; color: var(--text-2); font-size: 15px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { position: relative; padding: 24px 22px 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background-color: var(--surface); }
.step-no { font: 500 11px var(--mono); letter-spacing: .16em; color: var(--text-3); }
.step h3 { margin: 18px 0 8px; font-family: var(--display); font-weight: 400; font-size: 30px; }
.step p { color: var(--text-2); font-size: 13.5px; }
.step-fig { display: flex; align-items: baseline; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font: 500 12px var(--mono); color: var(--text-3); }
.step-fig b { font-family: var(--display); font-weight: 400; font-size: 34px; color: var(--text); letter-spacing: -.01em; }
.step-fig b small { font-size: 18px; color: var(--text-2); }

.counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.counter { padding: 18px 20px; border-left: 1px solid var(--line); }
.counter:first-child { border-left: 0; }
.counter small { display: block; font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.counter b { display: block; margin-top: 6px; font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- 14. Responsive ---------- */
@media (max-width: 1180px) {
  .market { grid-template-columns: minmax(0, 1fr); }
  .market-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .launch-layout, .token-layout { grid-template-columns: minmax(0, 1fr); }
  .launch-side, .token-side { position: static; }
  .launch-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .token-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .ft-in { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ft-feat { grid-column: 1 / -1; max-width: 420px; }
}

@media (max-width: 1023px) {
  .top-nav { display: none; }
  .topbar { gap: 12px; }
  .topbar .burger { display: inline-grid; }
  .block-head { grid-template-columns: minmax(0, 1fr); }
  .block-no { width: fit-content; padding-right: 24px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counter:nth-child(3) { border-left: 0; }
  .counter:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; --topbar-h: 58px; }
  .page { padding-top: 24px; }
  .hero { margin-top: -24px; padding-top: 18px; padding-bottom: 18px; }
  .hud-row .hud-cell:nth-child(2) { display: none; }
  .hud-row { flex-wrap: wrap; }
  .hero-center { gap: 14px; }
  .block { padding-top: 64px; }
  .topbar .search { display: none; }
  .topbar .search-toggle { display: inline-grid; }
  .topbar.is-searching .search {
    display: block; position: absolute; left: 12px; right: 12px; top: 10px;
    width: auto; z-index: 5; margin: 0;
  }
  .topbar.is-searching .search-pop { min-width: 0; }
  .topbar.is-searching .search-field { padding-right: 4px; background: var(--topbar-solid); }
  .topbar.is-searching .search-close { display: inline-grid; }
  .topbar.is-searching .search-field .kbd { display: none; }
  .brand { font-size: 21px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .feature-card { height: 216px; }
  .grid-2, .market-aside, .launch-side, .token-side { grid-template-columns: minmax(0, 1fr); }
  .token-grid { grid-template-columns: minmax(0, 1fr); }
  .form { padding: 0 16px 18px; }
  .form-row.two { grid-template-columns: minmax(0, 1fr); }
  .toolbar .field { max-width: none; }
  .toolbar .select { margin-left: 0; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .head-actions { margin-left: 0; width: 100%; }
  .ft-in { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 80px; }
  .ft-brand { grid-column: 1 / -1; }
  .hud-status { left: 50%; transform: translateX(-50%); bottom: 10px; white-space: nowrap; }
  .hud-status [data-hud-state], .hud-status .hud-sep:first-of-type { display: none; }
}

@media (max-width: 420px) {
  .wallet .btn-primary span { display: none; }
  .wallet .btn-primary { width: 40px; padding: 0; }
  .counter b { font-size: 28px; }
}
.tilt > * { position: relative; z-index: 1; }
.scroll-cue { justify-self: center; }
.hud-row > .scroll-cue { align-self: end; }
@media (max-width: 760px) { .hud-row > .scroll-cue { display: none; } .hero .hud-row:last-child { padding-bottom: 44px; } }
/* A soft pool of darkness behind the hero text, so it stays readable over the brightest particles. */
.hero-center { position: relative; }
.hero-center::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: min(760px, 110%); height: 120%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(var(--bg-rgb), .72), transparent); pointer-events: none; }
.hero-sub, .hero-tags { text-shadow: 0 0 18px rgba(var(--bg-rgb), 1), 0 0 4px rgba(var(--bg-rgb), 1); }
.feature-card { height: 268px; }
@media (max-width: 760px) { .feature-card { height: 250px; } }
.hero { padding-bottom: 64px; }
.ft-social { display: inline-flex; align-items: center; gap: 8px; }
.ft-social .i { width: 15px; height: 15px; }
.ft-in { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); }
@media (max-width: 1180px) { .ft-in { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ft-brand { grid-column: 1 / -1; } }
@media (max-width: 760px) { .ft-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
