/* =====================================================================
   TradeBotPro — "Bullion" black + gold trading theme
   Palette: warm near-black base, classic gold primary, monochrome-gold
   trading semantics (bright gold = up, deep olive-gold = down). Candle
   chart hero + scramble text + Lenis smooth scroll + scroll reveals.
   ===================================================================== */

:root {
  /* ---- Base (warm near-black) ---- */
  --bg:           #060504;
  --bg-1:         #0d0b07;
  --bg-2:         #16120a;
  --bg-3:         #1f1a0d;
  --line:         rgba(245, 236, 214, 0.08);
  --line-strong:  rgba(245, 236, 214, 0.16);
  --line-faint:   rgba(245, 236, 214, 0.04);

  /* ---- Ink (warm off-white) ---- */
  --ink:          #f5ecd6;
  --ink-soft:     rgba(245, 236, 214, 0.78);
  --ink-quiet:    rgba(245, 236, 214, 0.52);
  --ink-faint:    rgba(245, 236, 214, 0.32);

  /* ---- Brand (classic gold) ---- */
  --brand:        #d4af37;
  --brand-hi:     #f0c850;
  --brand-dim:    rgba(212, 175, 55, 0.18);
  --brand-line:   rgba(212, 175, 55, 0.42);
  --brand-glow:   rgba(212, 175, 55, 0.55);

  /* ---- Trading semantic (monochrome gold) ---- */
  --up:           #e8c250;
  --up-dim:       rgba(232, 194, 80, 0.14);
  --up-line:      rgba(232, 194, 80, 0.42);
  --down:         #7a2a1f;
  --down-dim:     rgba(122, 42, 31, 0.18);
  --down-line:    rgba(122, 42, 31, 0.45);
  --warn:         #e8b43c;

  /* ---- Geometry ---- */
  --radius:       4px;
  --radius-lg:    10px;
  --max:          1280px;

  /* ---- Type ---- */
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ---- Motion ---- */
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* =====================================================================
     Legacy-editorial aliases
     ---------------------------------------------------------------------
     Several pages (markets, pricing, login, signup, older partials) still
     reference the old "Quiet Ledger" editorial tokens in inline <style>
     blocks and JS strings. Rather than rewrite every page, we resolve the
     old names to the new "Bullion" gold/black equivalents here. This keeps
     existing rules rendering without a per-page migration.
     ===================================================================== */
  --oxblood:       var(--brand);         /* was dark red accent, now gold */
  --oxblood-ink:   var(--brand-hi);
  --forest:        var(--up);            /* was dark green gain, now bright gold */
  --forest-ink:    var(--up);
  --bronze:        var(--brand-dim);
  --bronze-ink:    var(--brand);
  --cream:         var(--ink);
  --cream-soft:    var(--ink-soft);
  --paper:         var(--bg);
  --paper-2:       var(--bg-1);
  --paper-3:       var(--line-strong);
  --paper-edge:    var(--line);
  --serif-display: var(--font-display);
  --serif-body:    var(--font-body);
  --mono:          var(--font-mono);
  --gain:          var(--up);
  --loss:          var(--down);
}

/* =====================================================================
   Reset
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ambient dark gradient — warm gold nebula under everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(212, 175, 55, 0.07), transparent 60%),
    radial-gradient(900px 700px at 85% 20%, rgba(240, 200, 80, 0.045), transparent 65%),
    radial-gradient(1400px 900px at 50% 110%, rgba(212, 175, 55, 0.05), transparent 60%);
}

main, section, header, footer, nav { position: relative; z-index: 1; }

img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--brand); color: #000; }

/* focus-visible — accessible keyboard focus ring on all interactive elements */
*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline-offset: 0;
}

/* skip-nav — hidden until focused via keyboard */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--brand);
  color: #000;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-nav:focus {
  top: 1rem;
}

/* scrollbar polish */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-dim); }

/* =====================================================================
   Typography
   ===================================================================== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.5rem, 6vw, 5.75rem); font-weight: 500; letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

h1 em, h2 em {
  font-style: normal;
  color: var(--brand);
}

p { margin: 0 0 1rem; color: var(--ink-soft); }

.mono { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.02em; }
.data { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}
.eyebrow--brand { color: var(--brand); }

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

/* semantic price flash — applied briefly when a price tick arrives */
@keyframes flash-up   { 0% { color: var(--up);   text-shadow: 0 0 14px var(--up-line); } 100% { color: var(--ink); text-shadow: none; } }
@keyframes flash-down { 0% { color: var(--down); text-shadow: 0 0 14px var(--down-line); } 100% { color: var(--ink); text-shadow: none; } }
.flash-up   { animation: flash-up 1.1s ease-out; }
.flash-dn   { animation: flash-down 1.1s ease-out; }

/* =====================================================================
   Layout primitives
   ===================================================================== */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.container--wide { max-width: 1480px; }
.container--tight { max-width: 960px; }

.section { padding: clamp(4rem, 9vw, 8rem) 0; position: relative; }
.section--sm { padding: clamp(3rem, 6vw, 5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* section header — numbered roman hint kept from editorial, but smaller + mono */
.section__header {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: baseline;
}
.section__num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--brand);
  letter-spacing: 0.18em;
}
.section__title { font-family: var(--font-display); margin: 0 0 0.5rem; }
.section__sub { color: var(--ink-quiet); max-width: 62ch; margin: 0; }
@media (max-width: 640px) {
  .section__header { grid-template-columns: 1fr; gap: 0.5rem; margin-bottom: 2rem; }
}

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #000;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  transition: transform 150ms ease, box-shadow 200ms ease, background 200ms ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  background: var(--brand-hi);
  transform: translateY(-1px);
  box-shadow: 0 10px 40px -10px var(--brand-glow);
}
.btn:active { transform: translateY(0); }

.btn--lg { padding: 1.1rem 1.9rem; font-size: 12px; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.03);
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 10px 40px -12px var(--brand-glow);
}
.btn--up { background: var(--up); color: #001712; border-color: var(--up); }
.btn--up:hover { background: #4affc8; box-shadow: 0 10px 40px -10px var(--up-line); }
.btn--full { width: 100%; justify-content: center; }

.btn .arrow { display: inline-block; transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(4px); }

.txt-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 200ms ease, border-color 200ms ease;
}
.txt-link:hover { color: var(--brand); border-color: var(--brand); }

/* =====================================================================
   Nav
   ===================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 8, 20, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.nav__brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--brand);
  color: #000;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  border-radius: 3px;
  box-shadow: 0 0 18px -2px var(--brand-glow);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}
.nav__links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  transition: color 200ms ease;
  position: relative;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active { color: var(--brand); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 1px;
  background: var(--brand);
}
.nav__cta { display: flex; gap: 0.75rem; align-items: center; }
.nav__mobile-auth { display: none; }
@media (max-width: 900px) {
  .nav__mobile-auth { display: block; }
  .nav__mobile-auth--cta {
    background: var(--brand);
    color: #000 !important;
    text-align: center;
    font-weight: 600;
    border-bottom: 0 !important;
  }
}

.nav__burger {
  display: none;
  width: 34px; height: 34px;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}
.nav__burger span {
  position: absolute;
  left: 8px; right: 8px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 220ms ease, opacity 220ms ease, top 220ms ease;
}
.nav__burger span:nth-child(1) { top: 11px; }
.nav__burger span:nth-child(2) { top: 16px; }
.nav__burger span:nth-child(3) { top: 21px; }
.nav__burger.is-open span:nth-child(1) { top: 16px; transform: rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { top: 16px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav__burger { display: block; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
    background: rgba(5, 8, 20, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 220ms ease, transform 220ms ease, visibility 0s 220ms;
  }
  .nav__links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 220ms ease, transform 220ms ease, visibility 0s;
  }
  .nav__links a {
    font-size: 13px;
    padding: 12px 1.5rem;
    border-bottom: 1px solid var(--line);
    display: block;
  }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__links a:hover,
  .nav__links a.is-active {
    background: rgba(212, 175, 55, 0.06);
  }
  .nav__cta { display: none; }
}

/* =====================================================================
   Hero — cinematic gradient beams + confident typography
   ===================================================================== */
.hero {
  position: relative;
  min-height: min(95vh, 980px);
  padding: clamp(5rem, 10vw, 10rem) 0 clamp(5rem, 9vw, 9rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

/* --- Trading chart canvas (primary hero visual) ---
   Canvas draws its own grid + candles on top of the gold beam ambient.
   Content sits over a radial "reading pool" vignette so the chart recedes
   behind the headline without hiding either. */
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
  opacity: 0;
  animation: hero-canvas-fade 1400ms cubic-bezier(0.22, 1, 0.36, 1) 180ms forwards;
}
@keyframes hero-canvas-fade {
  to { opacity: 1; }
}

/* Reading-pool vignette: a soft radial darkness anchored to the left-center
   where the headline sits, fading to fully transparent over the chart on
   the right. Sits above the canvas (z-index 1) and below the content (2). */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 72% at 30% 48%,
      rgba(6, 5, 4, 0.86) 0%,
      rgba(6, 5, 4, 0.55) 38%,
      rgba(6, 5, 4, 0.18) 65%,
      transparent 85%),
    linear-gradient(180deg,
      rgba(6, 5, 4, 0.55) 0%,
      transparent 18%,
      transparent 82%,
      rgba(6, 5, 4, 0.72) 100%);
}

/* With the chart live, the CSS grid lattice would double up on the chart's
   own grid — hide it. Beams stay behind as pure-CSS fallback. */
.hero:has(.hero__canvas) .hero__grid { display: none; }

/* --- Animated beam field ---
   Four large, slow-moving colored blobs blurred together behind the hero.
   This is what reads as "depth" without touching WebGL. */
.hero__beams {
  position: absolute;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  filter: blur(90px) saturate(130%);
  opacity: 0.9;
}
.hero__beam {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}
.hero__beam--1 {
  top: 8%; left: 10%;
  width: 46vw; height: 46vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.60), transparent 60%);
  animation: beam-drift-1 22s ease-in-out infinite;
}
.hero__beam--2 {
  top: 40%; left: 55%;
  width: 38vw; height: 38vw; max-width: 620px; max-height: 620px;
  background: radial-gradient(circle at 60% 60%, rgba(240, 200, 80, 0.35), transparent 60%);
  animation: beam-drift-2 26s ease-in-out infinite;
}
.hero__beam--3 {
  top: -10%; left: 48%;
  width: 34vw; height: 34vw; max-width: 560px; max-height: 560px;
  background: radial-gradient(circle at 50% 50%, rgba(184, 134, 11, 0.42), transparent 60%);
  animation: beam-drift-3 30s ease-in-out infinite;
}
.hero__beam--4 {
  top: 55%; left: 8%;
  width: 28vw; height: 28vw; max-width: 460px; max-height: 460px;
  background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.48), transparent 60%);
  animation: beam-drift-4 34s ease-in-out infinite;
}
@keyframes beam-drift-1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(6%, 4%, 0) scale(1.12); }
}
@keyframes beam-drift-2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-7%, -5%, 0) scale(1.18); }
}
@keyframes beam-drift-3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(4%, 8%, 0) scale(0.92); }
}
@keyframes beam-drift-4 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(8%, -6%, 0) scale(1.14); }
}

/* --- Grid overlay — subtle technical lattice --- */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, #000 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, #000 40%, transparent 80%);
}

/* --- Content (with transform for mouse parallax) --- */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  will-change: transform;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__eyebrow {
  margin-bottom: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(10, 15, 31, 0.6);
  backdrop-filter: blur(10px);
}
.hero__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 10px var(--up);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.hero h1 {
  max-width: 14ch;
  margin-bottom: 2rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  /* initial state for intro animation — see .hero h1.is-in */
  opacity: 0;
  filter: blur(18px);
  transform: translateY(40px);
  transition: opacity 1100ms cubic-bezier(0.22, 1, 0.36, 1), filter 1100ms cubic-bezier(0.22, 1, 0.36, 1), transform 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hero h1.is-in { opacity: 1; filter: blur(0); transform: translateY(0); }

.hero__lede {
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1100ms cubic-bezier(0.22, 1, 0.36, 1) 200ms, transform 1100ms cubic-bezier(0.22, 1, 0.36, 1) 200ms;
}
.hero__lede.is-in { opacity: 1; transform: translateY(0); }

.hero__actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1100ms cubic-bezier(0.22, 1, 0.36, 1) 360ms, transform 1100ms cubic-bezier(0.22, 1, 0.36, 1) 360ms;
}
.hero__actions.is-in { opacity: 1; transform: translateY(0); }

/* reduced-motion guard */
@media (prefers-reduced-motion: reduce) {
  .hero__beam { animation: none; }
  .hero h1, .hero__lede, .hero__actions { opacity: 1; filter: none; transform: none; transition: none; }
}
.hero__stats {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: clamp(3rem, 6vw, 5rem) auto 0;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.hero__stat {
  padding: 1.5rem 1.5rem 0;
  border-right: 1px solid var(--line);
}
.hero__stat:last-child { border-right: 0; }
.hero__stat-val {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.hero__stat-val em { font-style: normal; color: var(--brand); }
.hero__stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (max-width: 880px) {
  .hero__stat { padding: 1rem; }
}

/* =====================================================================
   Live ticker strip
   ===================================================================== */
.ticker {
  position: relative;
  z-index: 3;
  height: 44px;
  overflow: hidden;
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
}
.ticker__track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: ticker-slide 60s linear infinite;
  padding: 0 1.5rem;
  will-change: transform;
}
@keyframes ticker-slide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker__item {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-quiet);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  gap: 0.6rem;
  align-items: baseline;
}
.ticker__item strong {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* =====================================================================
   Card
   ===================================================================== */
.card {
  position: relative;
  padding: 2rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 220ms ease, transform 220ms ease, background 220ms ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), var(--brand-dim), transparent 50%);
  opacity: 0;
  transition: opacity 300ms ease;
}
.card {
  cursor: pointer;
}
.card:hover {
  border-color: var(--brand-line);
  transform: translateY(-3px);
}
.card:hover::before { opacity: 1; }

.card__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--brand);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}
.card p {
  color: var(--ink-quiet);
  font-size: 14.5px;
  margin: 0;
}

/* =====================================================================
   CTA banner
   ===================================================================== */
.cta {
  position: relative;
  text-align: center;
  padding: clamp(4rem, 9vw, 7rem) 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 520px at 50% 120%, var(--brand-dim), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-1));
}
.cta::before, .cta::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: min(720px, 82%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-line), transparent);
}
.cta::before { top: 28px; }
.cta::after  { bottom: 28px; }
.cta h2 {
  max-width: 18ch;
  margin: 0 auto 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  padding-bottom: 0.25em;
}
.cta p {
  max-width: 56ch;
  margin: 0 auto 2rem;
  color: var(--ink-quiet);
}
.cta__note {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* =====================================================================
   Marquee exchange strip
   ===================================================================== */
.marquee {
  overflow: hidden;
  position: relative;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.marquee::before, .marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(90deg, var(--bg-1), transparent); }
.marquee::after  { right: 0; background: linear-gradient(-90deg, var(--bg-1), transparent); }
.marquee__track {
  display: flex;
  gap: 4.5rem;
  white-space: nowrap;
  animation: ticker-slide 40s linear infinite;
  align-items: center;
}
.marquee__item {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink-quiet);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.65;
  transition: opacity 200ms ease, color 200ms ease;
}
.marquee__item:hover { opacity: 1; color: var(--ink); }
.marquee__item--soon { opacity: 0.35; }
.marquee__item--soon:hover { opacity: 0.55; }
.marquee__soon {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.marquee__item::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--brand);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--brand-glow);
}
.marquee__item--soon::before {
  background: var(--ink-faint);
  box-shadow: none;
}

/* =====================================================================
   Scramble text (used by GSAP/JS effect)
   ===================================================================== */
.scramble { display: inline-block; }

/* reveal-on-scroll primitives */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms cubic-bezier(0.22, 1, 0.36, 1), transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }

/* =====================================================================
   Footer
   ===================================================================== */
.foot {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.foot__grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 880px) {
  .foot__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .foot__brand { grid-column: 1 / -1; }
}
.foot__brand p {
  color: var(--ink-quiet);
  max-width: 42ch;
  margin-top: 1rem;
  font-size: 13.5px;
}
.foot__col h5 {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  font-weight: 500;
}
.foot__col a {
  display: block;
  color: var(--ink-quiet);
  font-size: 13.5px;
  padding: 0.35rem 0;
  transition: color 180ms ease;
}
.foot__col a:hover { color: var(--brand); }

.foot__bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* =====================================================================
   Dashboard chrome (reused from editorial, adapted)
   ===================================================================== */
.dash {
  min-height: 100vh;
  padding-top: 1rem;
}
.dash__header {
  max-width: var(--max);
  margin: 0 auto 2rem;
  padding: 2rem 1.5rem 0;
}
.dash__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}
.dash__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}
.dash__sub {
  color: var(--ink-quiet);
  max-width: 70ch;
  margin: 0;
}

/* tool bar — search, sort, filters for markets/history/etc */
.toolbar {
  max-width: var(--max);
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar__search {
  flex: 1;
  min-width: 260px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: 0;
  transition: border-color 180ms ease;
}
.toolbar__search:focus { border-color: var(--brand); }
.toolbar__search::placeholder { color: var(--ink-faint); }

.toolbar__sort { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.toolbar__sort button {
  padding: 0.75rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  transition: color 150ms ease, background 150ms ease;
}
.toolbar__sort button:last-child { border-right: 0; }
.toolbar__sort button.is-active { color: var(--brand); background: var(--brand-dim); }
.toolbar__sort button:hover { color: var(--ink); }

/* summary chips row */
.summary {
  max-width: var(--max);
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 880px) { .summary { grid-template-columns: repeat(2, 1fr); } }
.chip {
  padding: 1rem 1.2rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.chip__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}
.chip__value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* =====================================================================
   Market grid (cards) — replaces editorial .markets
   ===================================================================== */
.markets {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.market {
  position: relative;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: block;
  color: inherit;
  transition: border-color 200ms ease, transform 200ms ease;
  overflow: hidden;
}
.market::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(300px circle at var(--mx, 50%) 0%, var(--brand-dim), transparent 60%);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}
.market:hover { border-color: var(--brand-line); transform: translateY(-2px); }
.market:hover::before { opacity: 1; }

.market__num {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-faint);
  letter-spacing: 0.18em;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
}
.market__symbol {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.market__name {
  font-size: 12px;
  color: var(--ink-quiet);
  margin-bottom: 1rem;
  text-transform: capitalize;
}
.market__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
}
.market__price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.market__change {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.market__change.up { color: var(--up); }
.market__change.down { color: var(--down); }
.market__bar {
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.25rem;
}
.market__bar span {
  display: block;
  height: 100%;
  background: var(--brand);
  transition: width 400ms ease, background 400ms ease;
}

.done {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* =====================================================================
   Forms (auth pages)
   ===================================================================== */
.form-box {
  max-width: 440px;
  margin: 4rem auto;
  padding: 2.5rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.form-box h1 {
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
}
.form-box p { color: var(--ink-quiet); font-size: 14px; margin-bottom: 1.5rem; }
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  margin-bottom: 0.45rem;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
  outline: 0;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.field input:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}
.form-box .btn { width: 100%; justify-content: center; margin-top: 0.5rem; }
.form-box__foot {
  margin-top: 1.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-quiet);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.form-box__foot a { color: var(--brand); }

/* =====================================================================
   Editorial auth pages (login, signup, forgot, reset)
   Two-column: left = pitch, right = form
   ===================================================================== */
.auth {
  min-height: calc(100vh - 130px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
}
.auth__left {
  padding: clamp(3rem, 6vw, 5rem) clamp(2rem, 5vw, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
  position: relative;
  background:
    radial-gradient(700px 500px at 0% 0%, rgba(212,175,55,0.06), transparent 60%),
    var(--bg);
}
.auth__right {
  padding: clamp(3rem, 6vw, 5rem) clamp(2rem, 5vw, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-1);
  position: relative;
}
.auth__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-quiet);
}
.auth__eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--brand);
}
.auth h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--ink);
}
.auth h1 em {
  color: var(--brand);
  font-style: italic;
  font-weight: 400;
}
.auth__lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-quiet);
  max-width: 44ch;
  margin-bottom: 2rem;
  font-style: italic;
}
.auth__perks {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  margin-top: 1rem;
  list-style: none;
  padding-left: 0;
}
.auth__perks li {
  font-size: 14px;
  color: var(--ink-soft);
  padding: 0.6rem 0 0.6rem 1.5rem;
  border-bottom: 1px dotted var(--line);
  position: relative;
}
.auth__perks li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--brand);
}
.auth__perks li:last-child { border-bottom: 0; }

.auth__form {
  width: 100%;
  max-width: 440px;
}
.auth__switch {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-quiet);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.auth__switch a {
  color: var(--ink);
  border-bottom: 1px solid var(--brand);
  padding-bottom: 1px;
}
.auth__switch a:hover { color: var(--brand); }

.auth__forgot {
  display: block;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-quiet);
  text-decoration: none;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px dotted transparent;
  width: fit-content;
  margin-left: auto;
}
.auth__forgot:hover { color: var(--brand); border-bottom-color: var(--brand); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth__left { border-right: 0; border-bottom: 1px solid var(--line); padding: 5rem 1.5rem 3rem; }
  .auth__right { padding: 3rem 1.5rem 5rem; }
  .auth__form { margin: 0 auto; }
}

/* Editorial-style stacked field controls used by auth forms */
.field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-quiet);
  margin-bottom: 0.5rem;
}
.field__input {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 0;
  outline: none;
  transition: border-color 180ms ease, padding 180ms ease;
}
.field__input::placeholder {
  color: var(--ink-faint);
  font-style: italic;
  font-weight: 300;
}
.field__input:focus {
  border-bottom-color: var(--brand);
  border-bottom-width: 2px;
  padding-bottom: 9px;
}
.field__input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 30px var(--bg-1) inset;
  caret-color: var(--ink);
}
.field__pw-wrap { position: relative; }
.field__pw-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-quiet);
  background: transparent;
  border: 0;
  padding: 4px 6px;
  cursor: pointer;
  transition: color 180ms ease;
}
.field__pw-toggle:hover { color: var(--brand); }
.field__check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--ink-quiet);
  line-height: 1.6;
  cursor: pointer;
}
.field__check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  margin-top: 3px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: background 180ms ease, border-color 180ms ease;
}
.field__check input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand);
}
.field__check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 5px;
  height: 9px;
  border: solid #0a0703;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}
.field__check a { color: var(--brand); }

.pw-meter {
  display: flex;
  gap: 3px;
  margin-top: 10px;
}
.pw-meter__bar {
  flex: 1;
  height: 2px;
  background: var(--line);
  transition: background 260ms ease;
}
.pw-meter__bar.on { background: var(--down); }
.pw-meter__bar.on.strong { background: var(--brand); }
.pw-meter__text {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-quiet);
  margin-top: 6px;
  min-height: 11px;
}

.notice {
  font-size: 13px;
  line-height: 1.55;
  padding: 12px 14px;
  border-left: 2px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
.notice--error { border-left-color: var(--down); color: var(--ink); background: var(--down-dim); }
.notice--success { border-left-color: var(--up); color: var(--ink); background: var(--up-dim); }

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--down-line);
  background: var(--down-dim);
  color: var(--ink);
  font-size: 13.5px;
  margin-bottom: 1.2rem;
}
.alert--ok {
  border-color: var(--up-line);
  background: var(--up-dim);
}

/* =====================================================================
   Legal / long-form prose (terms, privacy, disclaimer)
   ===================================================================== */
.legal { padding: 7rem 0 5rem; }
.legal__head {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.legal__head h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.legal__updated {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.legal__body h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 3rem 0 0.85rem;
  color: var(--brand);
  letter-spacing: -0.005em;
}
.legal__body h2:first-child { margin-top: 0; }
.legal__body p,
.legal__body li {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-quiet);
  margin-bottom: 0.85rem;
}
.legal__body ul {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}
.legal__body li { margin-bottom: 0.4rem; }
.legal__body strong { color: var(--ink); font-weight: 600; }
.legal__body a { color: var(--brand); }
.legal__body a:hover { color: var(--brand-hi, #f0c850); }

.legal__warn {
  background: var(--down-dim);
  border: 1px solid var(--down-line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 2rem 0;
}
.legal__warn p {
  color: var(--ink);
  font-weight: 500;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  letter-spacing: 0.005em;
}
.legal__notice {
  background: var(--brand-dim);
  border: 1px solid var(--brand-line, rgba(212,175,55,0.28));
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
}
.legal__notice p {
  color: var(--brand);
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.005em;
}
.legal__hypo {
  background: var(--down-dim);
  border-left: 3px solid var(--down-line);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.legal__hypo p {
  font-size: 12.5px;
  color: var(--ink-quiet);
  margin: 0;
  line-height: 1.75;
  font-style: italic;
  letter-spacing: 0.005em;
}

/* =====================================================================
   Utilities
   ===================================================================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.hide-mobile { }
@media (max-width: 720px) { .hide-mobile { display: none; } }
.show-mobile { display: none; }
@media (max-width: 720px) { .show-mobile { display: inline-block; } }

/* =====================================================================
   Ledger table (pricing comparison)
   ===================================================================== */
.ledger-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
}
.ledger {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  min-width: 560px;
}
.ledger th,
.ledger td {
  padding: 1.25rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}
.ledger th {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  font-weight: 500;
  border-bottom: 2px solid var(--line-strong);
}
.ledger td.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--ink);
  text-align: right;
}
.ledger td.note {
  font-style: italic;
  color: var(--ink-faint);
}
.ledger tbody tr:hover { background: rgba(212,175,55,0.03); }
.ledger tbody tr:last-child td { border-bottom: 0; }

/* =====================================================================
   Skeleton loading states
   ===================================================================== */
@keyframes shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
  background: var(--bg-2);
  background-image: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-3) 40%, var(--bg-2) 80%);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  border-radius: var(--radius);
  animation: shimmer 1.4s ease infinite;
  color: transparent !important;
}
.skeleton--text {
  display: inline-block;
  height: 1em;
  min-width: 60px;
  vertical-align: middle;
}
.skeleton--bar {
  display: block;
  height: 12px;
  width: 80%;
  margin: 4px 0;
}

/* =====================================================================
   Pricing plan cards (ported from editorial.css for trading.css-only pages)
   ===================================================================== */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 2px solid var(--line-strong);
  border-left: 1px solid var(--line);
}
.plan {
  padding: 3rem 2.25rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  background: var(--bg);
  transition: background 280ms var(--ease);
}
.plan:hover { background: var(--bg-1); }
.plan--featured {
  background: var(--bg-2);
}
.plan--featured:hover { background: var(--bg-2); }
.plan--featured h3,
.plan--featured .plan__price,
.plan--featured .plan__price em { color: var(--ink); }
.plan--featured .plan__kicker { color: var(--brand); }
.plan--featured .plan__features li { color: var(--ink-soft); border-bottom-color: var(--line); }
.plan--featured .plan__features li::before { color: var(--brand); }
.plan--featured .btn { background: var(--brand); color: #000; border-color: var(--brand); }
.plan--featured .btn:hover { background: var(--brand-hi); border-color: var(--brand-hi); }
.plan--featured .plan__tag { color: var(--ink-quiet); }

.plan__kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--brand);
  margin-bottom: 1.25rem;
}
.plan h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.plan__tag {
  font-size: 13px;
  font-style: italic;
  color: var(--ink-quiet);
  margin-bottom: 1.75rem;
  max-width: 30ch;
}
.plan__price {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.plan__price em {
  font-family: var(--font-body);
  font-size: 15px;
  font-style: italic;
  color: var(--ink-quiet);
  font-weight: 400;
  margin-left: 0.4rem;
  letter-spacing: 0;
}
.plan__features {
  margin: 2rem 0;
  list-style: none;
  padding: 0;
}
.plan__features li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  padding: 0.7rem 0 0.7rem 1.5rem;
  border-bottom: 1px dotted var(--line);
  position: relative;
}
.plan__features li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--brand);
}
.plan__features li.out::before { content: "\00D7"; font-size: 15px; }
.plan__features li.out { color: var(--ink-faint); }
.plan .btn { width: 100%; }

.plan__corner {
  position: absolute;
  top: 0;
  right: 0;
  padding: 6px 14px;
  background: var(--brand);
  color: #000;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
}

/* CTA banner — full-width inverted section */
.cta-banner {
  padding: clamp(4rem, 8vw, 7rem) 1.5rem;
  text-align: center;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.cta-banner::before,
.cta-banner::after {
  content: "";
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-line), transparent);
}
.cta-banner::before { top: 24px; }
.cta-banner::after  { bottom: 24px; }
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.cta-banner h2 em { color: var(--brand); font-style: normal; }
.cta-banner p {
  font-size: clamp(14px, 1.4vw, 17px);
  color: var(--ink-quiet);
  max-width: 52ch;
  margin: 0 auto 2.5rem;
}
.cta-banner__note {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}

/* =====================================================================
   Comprehensive Mobile Responsive
   ===================================================================== */

/* ---- Tablet (≤880px) ---- */
@media (max-width: 880px) {
  .plans { grid-template-columns: 1fr; border-left: 0; }
  .plan { border-left: 1px solid var(--line); }
  .plan__price { font-size: 48px; }
  .plan__corner { position: static; display: inline-block; margin-bottom: 1rem; }
}

/* ---- Small tablet / large phone (≤640px) ---- */
@media (max-width: 640px) {
  /* Hero */
  .hero { min-height: auto; padding: clamp(5rem, 12vw, 7rem) 0 clamp(3rem, 6vw, 5rem); }
  .hero__content { padding: 0 1rem; }
  .hero h1 { font-size: clamp(2rem, 10vw, 3rem); max-width: 100%; }
  .hero__lede { font-size: 15px; margin-bottom: 2rem; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { text-align: center; justify-content: center; }
  .hero__actions .txt-link { text-align: center; }
  .hero__eyebrow { font-size: 9px; padding: 0.4rem 0.8rem; }

  /* Hero stats */
  .hero__stats { padding: 0 1rem; }
  .hero__stat { padding: 1rem; }
  .hero__stat-val { font-size: 1.4rem; }

  /* Nav */
  .nav__inner { height: 56px; padding: 0 1rem; }

  /* Sections */
  .section { padding: clamp(3rem, 7vw, 5rem) 0; }
  .container { padding: 0 1rem; }
  .container--wide { padding: 0 1rem; }

  /* Cards */
  .card { padding: 1.5rem; }
  .card h3 { font-size: 1.1rem; }

  /* Ticker */
  .ticker { height: 38px; }
  .ticker__track { gap: 2rem; }
  .ticker__item { font-size: 10px; }

  /* Marquee */
  .marquee { padding: 1.5rem 0; }
  .marquee__item { font-size: 12px; letter-spacing: 0.15em; }

  /* CTA */
  .cta { padding: clamp(3rem, 7vw, 5rem) 1rem; }
  .cta h2 { font-size: clamp(1.8rem, 7vw, 2.5rem); }

  /* Plans */
  .plan { padding: 2rem 1.5rem; }
  .plan__price { font-size: 40px; }
  .plan h3 { font-size: 24px; }

  /* CTA banner */
  .cta-banner { padding: clamp(3rem, 7vw, 5rem) 1rem; }
  .cta-banner::before, .cta-banner::after { width: 80%; }

  /* Footer */
  .foot__grid { grid-template-columns: 1fr; gap: 2rem; padding: 0 1rem; }
  .foot__brand { grid-column: 1; }
  .foot__bottom { flex-direction: column; text-align: center; padding: 1.5rem 1rem 0; }

  /* Auth */
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth__left { border-right: 0; border-bottom: 1px solid var(--line); padding: 5rem 1rem 2.5rem; }
  .auth__right { padding: 2.5rem 1rem 4rem; }
  .auth__form { max-width: 100%; margin: 0; }
  .auth h1 { font-size: clamp(32px, 8vw, 48px); }
  .auth__lede { font-size: 15px; }
  .auth__perks li { font-size: 13px; }

  /* Dashboard (via style.css but these cascade) */
  .dash__header { padding: 1.5rem 1rem 0; }
  .dash__title { font-size: clamp(1.6rem, 5vw, 2rem); }

  /* Markets */
  .markets { padding: 0 1rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; }
  .market { padding: 1rem; }
  .market__symbol { font-size: 1.1rem; }

  /* Leaderboard */
  .lb-stats { gap: 1.5rem; }
  .lb-stat-num { font-size: 1.5rem; }

  /* Typography scale down */
  h2 { font-size: clamp(1.6rem, 5vw, 2.5rem); }

  /* Buttons minimum height for touch */
  .btn, .btn--ghost, .btn--lg { min-height: 48px; padding: 0.9rem 1.4rem; }
}

/* ---- Phone (≤375px) ---- */
@media (max-width: 400px) {
  /* Tighten everything */
  .container, .container--wide { padding: 0 0.75rem; }
  .hero__content { padding: 0 0.75rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero__lede { font-size: 14px; }
  .hero__eyebrow { font-size: 8px; letter-spacing: 0.12em; }

  /* Stats 2-col still, but tighter */
  .hero__stat { padding: 0.75rem; }
  .hero__stat-val { font-size: 1.2rem; }
  .hero__stat-label { font-size: 9px; }

  /* Nav */
  .nav__inner { padding: 0 0.75rem; }
  .nav__brand { font-size: 15px; gap: 0.4rem; }
  .nav__brand-mark { width: 26px; height: 26px; font-size: 8px; }

  /* Cards */
  .card { padding: 1.25rem; }
  .card h3 { font-size: 1rem; }
  .card p { font-size: 13px; }

  /* Sections */
  .section__header { gap: 0.25rem; }
  .section__num { font-size: 10px; }

  /* Plans */
  .plan { padding: 1.5rem 1rem; }
  .plan__price { font-size: 36px; }
  .plan h3 { font-size: 22px; }
  .plan__features li { font-size: 13px; padding: 0.6rem 0 0.6rem 1.25rem; }

  /* Auth */
  .auth__left { padding: 4rem 0.75rem 2rem; }
  .auth__right { padding: 2rem 0.75rem 3rem; }
  .auth h1 { font-size: 28px; }

  /* Footer */
  .foot__grid { padding: 0 0.75rem; }
  .foot__col a { font-size: 12.5px; }

  /* Markets */
  .markets { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .market { padding: 0.75rem; }
  .market__symbol { font-size: 1rem; }
  .market__row { flex-direction: column; gap: 0.15rem; }

  /* Buttons */
  .btn { font-size: 10px; letter-spacing: 0.12em; }

  /* CTA banner */
  .cta-banner::before, .cta-banner::after { display: none; }
}

/* =====================================================================
   Touch-friendly improvements
   ===================================================================== */

/* Ensure all interactive elements meet 44px minimum touch target */
@media (hover: none), (pointer: coarse) {
  .nav__links a { padding: 12px 0; }
  .nav__burger { width: 44px; height: 44px; }
  .txt-link { padding: 8px 0; }
  .auth__forgot { padding: 8px 0; }
  .sort-btn { min-height: 44px; }
  .faq__item summary { padding: 1.25rem 2.5rem 1.25rem 0; min-height: 44px; }
  .ticker__item { padding: 4px 0; }
  .plan__features li { padding: 0.8rem 0 0.8rem 1.5rem; }
}

/* iOS safe area insets for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
  .nav { padding-top: env(safe-area-inset-top); }
  .foot__bottom { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
  .auth__right { padding-bottom: max(3rem, env(safe-area-inset-bottom)); }

  /* Mobile nav overlay respects safe areas */
  @media (max-width: 900px) {
    .nav__links {
      padding-left: max(1.5rem, env(safe-area-inset-left));
      padding-right: max(1.5rem, env(safe-area-inset-right));
      padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
  }
}

/* Prevent text size inflation on iOS */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Prevent horizontal overflow globally */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ticker__track, .marquee__track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .skeleton { animation: none; }
  html { scroll-behavior: auto; }
}
