/* $EDGE elite layer — global polish + mobile fixes.
 *
 * Linked from every page BEFORE the page's own <style> block so it acts as
 * a base that page-specific styles can still override. Doesn't redefine
 * design tokens (those live inline per page for fastest first paint) —
 * this is purely behavioral / responsive / a11y polish.
 */

/* ── Reset / hardening ────────────────────────────────────────────────── */

*, *::before, *::after {
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  /* Safe-area insets for notched devices */
  padding-bottom: env(safe-area-inset-bottom);
}

/* Branded text selection — uses lime as default, magenta inside .selection-mag scope */
::selection {
  background: rgba(196, 255, 0, 0.85);
  color: #050507;
}
.selection-mag ::selection {
  background: rgba(255, 0, 110, 0.85);
  color: #F5F5F0;
}

/* ── Focus states (accessibility + elite feel) ───────────────────────── */

a:focus-visible,
button:focus-visible,
input:focus-visible,
[role="button"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid #C4FF00;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Remove the default outline on click (we keep it only for keyboard nav via :focus-visible) */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ── Touch targets (≥44×44 on mobile) ────────────────────────────────── */

@media (max-width: 768px) {
  nav a,
  .btn-copy,
  .threshold-toggle button,
  .filter-pills button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
  /* Primary action buttons get bigger */
  .btn,
  .search-box button,
  .hero-ctas a {
    min-height: 44px;
  }
}

/* ── Mobile hamburger drawer (≤768px) ────────────────────────────────── */
/*
 * Desktop: hamburger button hidden via display:none, nav renders inline as
 *   always.
 * Mobile: nav transforms into a slide-in drawer triggered by hamburger.
 *   Backdrop dims the page. Tap any link to close + navigate.
 *
 * elite.js injects the hamburger button + backdrop element + toggles the
 * `elite-drawer-open` class on <html>. CSS owns the visual.
 */

.elite-hamburger { display: none; }
.elite-backdrop { display: none; }

@media (max-width: 768px) {
  /* Hamburger button — 3 bars, lime hover */
  .elite-hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(245, 245, 240, 0.12);
    border-radius: 2px;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
  }
  .elite-hamburger:hover,
  .elite-hamburger:focus-visible {
    border-color: var(--lime, #C4FF00);
    background: rgba(196, 255, 0, 0.06);
  }
  .elite-hamburger-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--white, #F5F5F0);
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  /* X icon when drawer is open */
  .elite-drawer-open .elite-hamburger { border-color: var(--lime, #C4FF00); }
  .elite-drawer-open .elite-hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--lime, #C4FF00);
  }
  .elite-drawer-open .elite-hamburger-bar:nth-child(2) { opacity: 0; }
  .elite-drawer-open .elite-hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--lime, #C4FF00);
  }

  /* Backdrop — dims everything behind the drawer. Filter is gated on .show
   * so the backdrop is fully invisible (no filter chain) when drawer closed. */
  .elite-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 7, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 90;
  }
  .elite-backdrop.show {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  /* The nav becomes a slide-in drawer. Using !important across the board
   * because page-level CSS (dashboard especially has viewport-fit layout
   * with overflow:hidden) tends to override sub-rules at smaller widths. */
  header > nav#elite-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(85vw, 320px) !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    background: var(--void-2, #0c0c10) !important;
    border-left: 1px solid var(--border-bright, rgba(196, 255, 0, 0.2)) !important;
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.5);
    padding: 80px 24px 32px !important;
    margin: 0 !important;
    mask-image: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    transform: translateX(100%) !important;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    z-index: 95 !important;
  }
  /* When html.elite-drawer-open is set, override with translateX(0).
   * Selector specificity matches the closed rule (both use #elite-drawer). */
  html.elite-drawer-open header > nav#elite-drawer {
    transform: translateX(0) !important;
  }

  /* Drawer items — full width, big tap targets */
  header > nav.elite-drawer ul,
  header > nav#elite-drawer ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    padding: 0 !important;
  }
  header > nav.elite-drawer ul li,
  header > nav#elite-drawer ul li {
    flex-shrink: 0;
    width: 100%;
  }
  header > nav.elite-drawer a,
  header > nav#elite-drawer a {
    display: flex !important;
    align-items: center;
    padding: 14px 16px;
    border-radius: 2px;
    font-size: 14px !important;
    letter-spacing: 0.1em !important;
    border: 1px solid transparent;
    opacity: 0.85;
    white-space: nowrap;
    min-height: 48px;
  }
  header > nav.elite-drawer a:hover,
  header > nav#elite-drawer a:hover,
  header > nav.elite-drawer a.active,
  header > nav#elite-drawer a.active {
    background: rgba(196, 255, 0, 0.06);
    border-color: var(--border-bright, rgba(196, 255, 0, 0.2));
    color: var(--lime, #C4FF00);
    opacity: 1;
  }

  /* Lock body scroll when drawer is open */
  html.elite-drawer-open,
  html.elite-drawer-open body {
    overflow: hidden;
  }

  /* Header itself — make sure logo, hamburger, and CTA all fit cleanly */
  header > .logo {
    flex-shrink: 0;
  }
}

/* Reset previous mobile-nav-scroll behavior — drawer replaces it.
 * The above rules only apply when nav has the elite-drawer class added by
 * elite.js. Older browsers without JS still get a usable (if cramped) nav. */

/* ── No horizontal page scroll ever ──────────────────────────────────── */

html, body {
  overflow-x: hidden;
}

/* ── Branded slim scrollbars ──────────────────────────────────────────────
   Windows renders chunky gray scrollbars by default (Mac uses thin overlays).
   Give every scroll surface a thin, dark, on-theme bar instead. ─────────── */
* { scrollbar-width: thin; scrollbar-color: var(--void-4, #1c1c22) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--void-4, #1c1c22);
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.35);
}
::-webkit-scrollbar-thumb:hover { background: var(--lime-dim, #8aa800); }

/* ── Smoother scroll for inner scrollable regions ────────────────────── */

.panel-body,
.firehose-list,
.feed-list,
.trending-grid,
.heat-grid {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ── Reduced motion ──────────────────────────────────────────────────── */

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

/* ── Print: minimal sanity (in case someone screenshots / prints) ─────── */

@media print {
  body::before, body::after { display: none; }
  header, footer, nav, .elite-ticker { display: none; }
  main { padding: 0; }
}

/* ── LIVE ACTIVITY TICKER ───────────────────────────────────────────── */
/* Bloomberg-style scrolling tape that lives directly under the page header
 * on every page. Auto-injected by ticker.js. Whale trades · news drops ·
 * Edge calls merge into a single chronological strip.
 */

.elite-ticker {
  position: sticky;
  top: var(--header-h, 71px);
  display: flex;
  align-items: stretch;
  background: var(--void-2, #0c0c10);
  border-bottom: 1px solid var(--border, rgba(245, 245, 240, 0.08));
  height: 36px;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  z-index: 50;
}

.elite-ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: var(--void-3, #141418);
  border-right: 1px solid var(--border, rgba(245, 245, 240, 0.08));
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--lime, #C4FF00);
  flex-shrink: 0;
}

.elite-ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime, #C4FF00);
  box-shadow: 0 0 10px var(--lime, #C4FF00);
  animation: ticker-pulse 1.2s infinite;
}
@keyframes ticker-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}

.elite-ticker-viewport {
  flex: 1 1 auto;
  overflow: hidden;
  position: relative;
  min-width: 0;
  /* Soft edge fades to hint endless scroll */
  mask-image: linear-gradient(
    to right,
    transparent 0,
    black 16px,
    black calc(100% - 32px),
    transparent 100%
  );
}

.elite-ticker-track {
  display: inline-flex;
  align-items: center;
  height: 36px;
  white-space: nowrap;
  animation: ticker-scroll 80s linear infinite;
  will-change: transform;
}
.elite-ticker:hover .elite-ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.elite-ticker-placeholder {
  padding: 0 18px;
  font-size: 11px;
  color: var(--muted, #6B6B73);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.elite-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  font-size: 12px;
  color: var(--white, #F5F5F0);
  text-decoration: none;
  border-right: 1px solid var(--border, rgba(245, 245, 240, 0.06));
  height: 100%;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.elite-ticker-item:hover {
  background: var(--void-3, #141418);
  color: var(--lime, #C4FF00);
}

.elite-ticker-icon {
  font-size: 11px;
  line-height: 1;
  display: inline-block;
  flex-shrink: 0;
}
.elite-ticker-WHALE_TRADE .elite-ticker-icon { color: var(--lime, #C4FF00); }
.elite-ticker-NEWS_DROP .elite-ticker-icon { color: var(--green, #00FF85); }
.elite-ticker-EDGE_CALL .elite-ticker-icon {
  color: var(--magenta, #FF006E);
  text-shadow: 0 0 8px var(--magenta, #FF006E);
}

.elite-ticker-amount {
  font-weight: 700;
  color: var(--lime, #C4FF00);
  letter-spacing: 0.02em;
}
.elite-ticker-NEWS_DROP .elite-ticker-amount { color: var(--green, #00FF85); }
.elite-ticker-EDGE_CALL .elite-ticker-amount { color: var(--magenta, #FF006E); }

.elite-ticker-text {
  font-weight: 400;
  opacity: 0.85;
}

/* Don't pause on hover for touch devices — the pause is for cursor users */
@media (hover: none) {
  .elite-ticker:hover .elite-ticker-track {
    animation-play-state: running;
  }
}

/* Reduced motion: hold the ticker still rather than animate forever */
@media (prefers-reduced-motion: reduce) {
  .elite-ticker-track {
    animation: none !important;
  }
  /* Keep the tape scrollable (still readable without motion) but NEVER show a
     visible scrollbar — on Windows that bar is always-on and ugly. */
  .elite-ticker-viewport {
    overflow-x: auto;
    mask-image: none;
    scrollbar-width: none;
  }
  .elite-ticker-viewport::-webkit-scrollbar { display: none; }
}

/* On the dashboard specifically, the page uses a fixed viewport-fit layout.
 * The ticker adds 36px; we let the dashboard's main grid recalculate by
 * being a standard flow element. The dashboard's `main` height calc accounts
 * for header + strip, so the ticker effectively becomes another row. The
 * inline page CSS reads --header-h / --strip-h; we leave those alone and
 * let body scroll if needed on the dashboard specifically.
 */
body:has(.elite-ticker) main {
  /* No-op: present for documentation. The dashboard's main has its own
   * height calc; adding the ticker pushes the grid down by 36px which is
   * within an acceptable visual buffer. */
}

/* ── COMMAND PALETTE (Cmd+K) ────────────────────────────────────────── */

.elite-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 7, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: none;
  z-index: 999;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(40px, 12vh, 120px) 16px 16px;
}
.elite-palette-overlay.show {
  display: flex;
  animation: palette-fade-in 0.15s ease-out;
}
@keyframes palette-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

html.elite-palette-open,
html.elite-palette-open body {
  overflow: hidden;
}

.elite-palette {
  width: min(720px, 100%);
  max-height: 70vh;
  background: var(--void-2, #0c0c10);
  border: 1px solid var(--border-bright, rgba(196, 255, 0, 0.2));
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  font-family: 'DM Sans', sans-serif;
  animation: palette-slide-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}
@keyframes palette-slide-in {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.elite-palette-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border, rgba(245, 245, 240, 0.08));
  flex-shrink: 0;
}
.elite-palette-search-icon {
  font-size: 18px;
  color: var(--lime, #C4FF00);
  font-weight: 700;
  line-height: 1;
}
.elite-palette-input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  color: var(--white, #F5F5F0);
  font-weight: 500;
}
.elite-palette-input::placeholder {
  color: var(--muted, #6B6B73);
  font-weight: 400;
}
.elite-palette-kbd,
.elite-palette-footer kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted, #6B6B73);
  background: var(--void-3, #141418);
  padding: 3px 7px;
  border-radius: 3px;
  border: 1px solid var(--border, rgba(245, 245, 240, 0.08));
  letter-spacing: 0.05em;
  font-weight: 500;
}

.elite-palette-results {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--void-4, #1c1c22) transparent;
}
.elite-palette-results::-webkit-scrollbar { width: 6px; }
.elite-palette-results::-webkit-scrollbar-thumb {
  background: var(--void-4, #1c1c22);
  border-radius: 3px;
}

.elite-palette-group + .elite-palette-group {
  border-top: 1px solid var(--border, rgba(245, 245, 240, 0.04));
  margin-top: 4px;
  padding-top: 4px;
}
.elite-palette-group-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted, #6B6B73);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 12px 18px 6px;
}

.elite-palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 18px;
  background: transparent;
  border: none;
  color: var(--white, #F5F5F0);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s ease;
}
.elite-palette-item:hover,
.elite-palette-item.selected {
  background: rgba(196, 255, 0, 0.07);
}
.elite-palette-item.selected {
  background: rgba(196, 255, 0, 0.1);
  box-shadow: inset 3px 0 0 var(--lime, #C4FF00);
}

.elite-palette-item-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: var(--void-3, #141418);
  border: 1px solid var(--border, rgba(245, 245, 240, 0.08));
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.elite-palette-item-icon.icon-lime { color: var(--lime, #C4FF00); border-color: rgba(196, 255, 0, 0.3); }
.elite-palette-item-icon.icon-magenta { color: var(--magenta, #FF006E); border-color: rgba(255, 0, 110, 0.3); }

.elite-palette-item-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.elite-palette-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--white, #F5F5F0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.elite-palette-item-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted, #6B6B73);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.elite-palette-item-arrow {
  font-size: 14px;
  color: var(--muted, #6B6B73);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.1s ease, color 0.1s ease;
}
.elite-palette-item.selected .elite-palette-item-arrow,
.elite-palette-item:hover .elite-palette-item-arrow {
  opacity: 1;
  color: var(--lime, #C4FF00);
}

.elite-palette-empty {
  padding: 32px 24px;
  text-align: center;
  color: var(--muted, #6B6B73);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.elite-palette-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--border, rgba(245, 245, 240, 0.08));
  background: var(--void-3, #141418);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted, #6B6B73);
  flex-shrink: 0;
}
.elite-palette-footer kbd {
  font-size: 9px;
  padding: 2px 5px;
  margin-right: 4px;
}
.elite-palette-brand {
  margin-left: auto;
  color: var(--lime, #C4FF00);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Hide footer hints on mobile (less space, fingers > kbd) */
@media (max-width: 640px) {
  .elite-palette-footer span:not(.elite-palette-brand) { display: none; }
  .elite-palette-input { font-size: 16px; /* prevent iOS zoom */ }
  .elite-palette-overlay { padding-top: 24px; }
  .elite-palette { max-height: 85vh; }
}

/* ── JOIN WAITLIST CTA pill — added to every page header as a separate */
/* element outside the nav <ul>. High-contrast lime, pulses subtly to */
/* draw the eye without being annoying. Stays visible on mobile by */
/* anchoring beside the nav (which scrolls), shrinks padding gracefully. */

.cta-waitlist {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--lime, #C4FF00);
  color: var(--void, #050507);
  font-family: 'Anton', sans-serif;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid var(--lime, #C4FF00);
  transition: background 0.15s, transform 0.05s;
  margin-left: 18px;
  flex-shrink: 0;
  position: relative;
}
.cta-waitlist:hover { background: #d8ff33; }
.cta-waitlist:active { transform: scale(0.98); }
.cta-waitlist::before {
  content: '';
  position: absolute;
  inset: -2px;
  border: 1px solid rgba(196, 255, 0, 0.4);
  border-radius: 2px;
  animation: cta-pulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes cta-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 0; }
}
.cta-waitlist .arrow { font-weight: 400; opacity: 0.85; }

@media (max-width: 768px) {
  .cta-waitlist {
    padding: 8px 12px;
    font-size: 12px;
    margin-left: 12px;
  }
  .cta-waitlist .arrow { display: none; }
}

/* ════════════════════════════════════════════════════════════════════
   PREMIUM HEADER — shared glass nav, scroll-reactive, site-wide.
   `elite.js` adds class `elite-nav` to every page's <header>. Rules are
   class-scoped so they override per-page bare `header`/`nav` styles by
   specificity (0,1,1 > 0,0,1) WITHOUT editing each page. Strictly a skin:
   only decorative props + forced sticky positioning — never height/padding,
   so the dashboard's viewport-fit math (--header-h) is left intact.
   ──────────────────────────────────────────────────────────────────── */
header.elite-nav {
  /* Forced stationary everywhere (no-op where already sticky / in fixed layouts) */
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 12, 0.68);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(245, 245, 240, 0.06);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
/* Top-lit hairline — light catching the glass edge */
header.elite-nav::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 255, 0, 0.5), transparent);
  opacity: 0.75;
  pointer-events: none;
}
/* Scroll-progress hairline along the bottom edge (driven by --scroll-progress) */
header.elite-nav::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: 100%;
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, var(--lime, #C4FF00), var(--magenta, #FF006E));
  box-shadow: 0 0 10px rgba(196, 255, 0, 0.6);
  pointer-events: none;
}
/* Scrolled: glass intensifies, header lifts with a shadow */
header.elite-nav.is-scrolled {
  background: rgba(5, 7, 9, 0.85);
  border-bottom-color: rgba(196, 255, 0, 0.16);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
}

/* ⌘K command-palette chip (added by elite.js where a .nav-right cluster exists) */
.elite-cmdk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(245, 245, 240, 0.04);
  border: 1px solid rgba(245, 245, 240, 0.12);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted, #6B6B73);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.elite-cmdk:hover {
  border-color: var(--border-bright, rgba(196, 255, 0, 0.3));
  color: var(--lime, #C4FF00);
  background: rgba(196, 255, 0, 0.05);
}
.elite-cmdk kbd { font: inherit; color: inherit; }

/* Desktop nav: animated hover underline + active-page indicator */
@media (min-width: 769px) {
  header.elite-nav nav a {
    position: relative;
    padding-bottom: 3px;
  }
  header.elite-nav nav a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 100%;
    height: 2px;
    background: var(--lime, #C4FF00);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  header.elite-nav nav a:hover::after,
  header.elite-nav nav a.is-active::after { transform: scaleX(1); }
  header.elite-nav nav a.is-active { color: var(--lime, #C4FF00); opacity: 1; }
}

@media (max-width: 768px) {
  .elite-cmdk { display: none; } /* keyboard-less context — Cmd+K shortcut still global */
}

/* ════════════════════════════════════════════════════════════════════
   FLOATING ISLAND + FULL FEATURE RAIL + ELITE MOBILE DRAWER
   ──────────────────────────────────────────────────────────────────── */

/* On scroll the header detaches into a floating glass slab (margins + radius).
   Only triggers on pages that actually scroll, so the dashboard's fixed
   viewport-fit header (never scrolls) stays full-width and untouched. */
header.elite-nav {
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
/* "Floating" = a rock-solid PINNED glass bar that simply gains depth on scroll.
   No detach / margin / resize motion — that movement is what read as "jumpy".
   The bar stays stationary and full-width; only its shadow + glass deepen. */
header.elite-nav.is-scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

/* Dashboard = the app / home-base button (▤ glyph) */
.btn-app::before { content: "\25A4"; margin-right: 7px; font-size: 0.9em; line-height: 1; }

/* Feature glyphs — hidden on the desktop rail, shown as icon rows in the drawer */
.nav-ico { display: none; }

/* Primary actions block — only rendered inside the mobile drawer */
.elite-drawer-cta { display: none; }

/* Keep the full feature rail fitting before the drawer takes over */
@media (max-width: 1024px) { header.elite-nav .elite-cmdk { display: none; } }
@media (max-width: 900px)  { header.elite-nav .nav-right .live-pill { display: none; } }

/* ── Elite mobile: minimal bar, rich drawer ──────────────────────────── */
@media (max-width: 768px) {
  /* Bar stays clean — logo + hamburger; the actions move into the drawer */
  header.elite-nav .nav-right .btn { display: none; }

  /* Glyph icons lead each drawer row */
  header > nav.elite-drawer a .nav-ico,
  header > nav#elite-drawer a .nav-ico {
    display: inline-flex;
    justify-content: center;
    width: 22px;
    margin-right: 12px;
    flex-shrink: 0;
    color: var(--lime, #C4FF00);
    font-size: 14px;
  }

  /* Pinned primary actions at the foot of the drawer */
  header > nav.elite-drawer .elite-drawer-cta,
  header > nav#elite-drawer .elite-drawer-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 16px 8px;
    margin-top: 14px;
    border-top: 1px solid var(--border, rgba(245, 245, 240, 0.08));
  }
  .elite-drawer-cta .elite-drawer-live {
    display: flex; align-items: center; gap: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 11px;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--green, #00FF85); margin-bottom: 2px;
  }
  .elite-drawer-cta .elite-drawer-live .live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green, #00FF85); box-shadow: 0 0 8px var(--green, #00FF85);
  }
  .elite-drawer-cta a {
    display: flex; align-items: center; justify-content: center;
    padding: 15px; border-radius: 10px; text-decoration: none;
    font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
  }
  .elite-drawer-cta a:active { transform: scale(0.98); }
  .elite-drawer-cta .cta-dash { background: var(--lime, #C4FF00); color: var(--void, #050507); }
  .elite-drawer-cta .cta-buy {
    background: transparent; color: var(--white, #F5F5F0);
    border: 1px solid var(--border-bright, rgba(196, 255, 0, 0.3));
  }
}

/* ════════════════════════════════════════════════════════════════════
   UNIFIED SITE HEADER ("command rail") — identical on every marketing page
   so navigating between features never shifts the bar. Component layout lives
   here, class-scoped to beat per-page inline header CSS. `site-nav` is baked
   into the static markup (no JS flash-in). Dashboard keeps its own app header.
   ──────────────────────────────────────────────────────────────────── */
:root { --header-h: 64px; }   /* ticker sits flush under the 64px bar; dashboard overrides to 60 */

header.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  padding: 0 28px;
}
header.site-nav .logo {
  font-family: 'Anton', sans-serif;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
header.site-nav .logo .dollar { color: var(--lime, #C4FF00); }
header.site-nav .logo .word { color: var(--white, #F5F5F0); }
header.site-nav > nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}
header.site-nav nav ul {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0; padding: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
header.site-nav nav a {
  color: rgba(245, 245, 240, 0.66);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}
header.site-nav nav a:hover { color: var(--lime, #C4FF00); }
header.site-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
header.site-nav .live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green, #00FF85); white-space: nowrap;
}
header.site-nav .live-pill .live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green, #00FF85); box-shadow: 0 0 8px var(--green, #00FF85);
  animation: ticker-pulse 1.4s infinite;
}
header.site-nav .nav-right .btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px; border: 1px solid transparent; border-radius: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
header.site-nav .nav-right .btn-app { background: var(--lime, #C4FF00); color: var(--void, #050507); }
header.site-nav .nav-right .btn-app:hover { box-shadow: 0 0 26px rgba(196, 255, 0, 0.45); transform: translateY(-1px); }
header.site-nav .nav-right .btn-ghost { background: transparent; color: var(--white, #F5F5F0); border-color: rgba(245, 245, 240, 0.2); }
header.site-nav .nav-right .btn-ghost:hover { border-color: var(--lime, #C4FF00); color: var(--lime, #C4FF00); }

@media (max-width: 768px) {
  header.site-nav { gap: 12px; padding: 0 18px; }
}

/* ── Real-time flash on live updates (lib/client/live.js) ─────────────────
   A row whose data ticked flashes; green/red when the leading number moved. */
@keyframes live-flash-kf { 0% { background: rgba(196, 255, 0, 0.16); } 100% { background: transparent; } }
@keyframes live-up-kf    { 0% { background: rgba(0, 255, 133, 0.18); } 100% { background: transparent; } }
@keyframes live-dn-kf    { 0% { background: rgba(255, 51, 68, 0.18); } 100% { background: transparent; } }
@keyframes live-in-kf    { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.live-flash    { animation: live-flash-kf 0.9s ease-out; }
.live-flash-up { animation: live-up-kf 0.9s ease-out; }
.live-flash-dn { animation: live-dn-kf 0.9s ease-out; }
.live-in       { animation: live-in-kf 0.4s ease-out; }
