/* ─────────────────────────────────────────────────────────────────────────────
   Meridian Assets Market Design System
   Background #050816 · Primary #15399a · Accent #a93e17
   Bloomberg Terminal · PrimeXBT · BlackRock
   ───────────────────────────────────────────────────────────────────────────── */

/* ─── 1. Design Tokens ───────────────────────────────────────────────────── */
:root {
  /* Brand */
  --color-background: #050816;
  --color-primary:    #15399a;
  --color-accent:     #a93e17;

  /* Backgrounds */
  --bg-base:          #050816;
  --bg-surface:       #080d1a;
  --bg-elevated:      #0a0f1e;
  --bg-raised:        #0d1526;
  --bg-overlay:       #111c30;
  --bg-subtle:        #162038;

  /* Primary scale */
  --primary-400: #4e7acf;
  --primary-500: #2c62c4;
  --primary-600: #15399a;
  --primary-700: #102d7a;
  --primary-alpha-10: rgba(21,57,154,.10);
  --primary-alpha-20: rgba(21,57,154,.20);
  --primary-alpha-30: rgba(21,57,154,.30);
  --primary-alpha-50: rgba(21,57,154,.50);

  /* Accent scale */
  --accent-400: #d16641;
  --accent-500: #bc5028;
  --accent-600: #a93e17;
  --accent-700: #883112;
  --accent-alpha-10: rgba(169,62,23,.10);
  --accent-alpha-20: rgba(169,62,23,.20);
  --accent-alpha-30: rgba(169,62,23,.30);

  /* Text */
  --text-primary:     #e8ecf4;
  --text-secondary:   #8a9bb5;
  --text-tertiary:    #4a5b77;
  --text-disabled:    #344259;
  --text-placeholder: #4a5b77;
  --text-link:        #4e7acf;
  --text-link-hover:  #7697da;
  --text-accent:      #d16641;

  /* Borders */
  --border-hairline: #0d1526;
  --border-subtle:   #162038;
  --border-default:  #1a2d4d;
  --border-strong:   #243d63;
  --border-primary:  #15399a;
  --border-accent:   #a93e17;
  --border-error:    #d50000;

  /* Market data */
  --price-up:      #00e676;
  --price-down:    #ff1744;
  --price-neutral: #8a9bb5;

  /* Semantic */
  --status-success: #00c853;
  --status-warning: #ff9100;
  --status-error:   #d50000;
  --status-info:    #2979ff;
  --success-fill:   rgba(0,200,83,.10);
  --warning-fill:   rgba(255,145,0,.10);
  --error-fill:     rgba(213,0,0,.10);
  --info-fill:      rgba(41,121,255,.10);

  /* Spacing */
  --space-1: .25rem; --space-2: .5rem;  --space-3: .75rem;
  --space-4: 1rem;   --space-5: 1.25rem;--space-6: 1.5rem;
  --space-8: 2rem;   --space-10:2.5rem; --space-12:3rem;
  --space-16:4rem;   --space-20:5rem;   --space-24:6rem;

  /* Radius - near-zero; institutional fintech */
  --radius-none: 0;
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   6px;
  --radius-xl:   8px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.80);
  --shadow-md: 0 4px 8px rgba(0,0,0,.80);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.90);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.95);
  --glow-primary: 0 0 20px rgba(21,57,154,.35);
  --glow-accent:  0 0 20px rgba(169,62,23,.35);
  --glow-up:      0 0 12px rgba(0,230,118,.25);
  --glow-down:    0 0 12px rgba(255,23,68,.25);

  /* Motion */
  --duration-instant: 50ms;
  --duration-fast:   100ms;
  --duration-base:   200ms;
  --duration-slow:   350ms;
  --duration-enter:  300ms;
  --ease-standard:   cubic-bezier(.4,0,.2,1);
  --ease-decelerate: cubic-bezier(0,0,.2,1);
  --ease-accelerate: cubic-bezier(.4,0,1,1);

  /* Typography */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Z-index */
  --z-sticky:   200;
  --z-dropdown: 100;
  --z-modal:    400;
  --z-toast:    500;
  --z-tooltip:  600;
}

/* ─── 2. Bootstrap 5 Overrides ───────────────────────────────────────────── */
[data-bs-theme="dark"],
:root {
  --bs-body-bg:              var(--bg-base);
  --bs-body-color:           var(--text-primary);
  --bs-body-font-family:     var(--font-sans);
  --bs-body-font-size:       .875rem;
  --bs-body-line-height:     1.5;
  --bs-primary:              var(--color-primary);
  --bs-primary-rgb:          21,57,154;
  --bs-link-color:           var(--text-link);
  --bs-link-hover-color:     var(--text-link-hover);
  --bs-border-color:         var(--border-default);
  --bs-card-bg:              var(--bg-elevated);
  --bs-card-border-color:    var(--border-subtle);
  --bs-card-border-radius:   var(--radius-md);
  --bs-modal-bg:             var(--bg-raised);
  --bs-modal-border-color:   var(--border-default);
  --bs-dropdown-bg:          var(--bg-elevated);
  --bs-dropdown-border-color:var(--border-default);
  --bs-dropdown-link-color:  var(--text-secondary);
  --bs-dropdown-link-hover-color: var(--text-primary);
  --bs-dropdown-link-hover-bg: var(--bg-overlay);
  --bs-input-bg:             var(--bg-elevated);
  --bs-input-border-color:   var(--border-default);
  --bs-input-color:          var(--text-primary);
  --bs-input-placeholder-color: var(--text-placeholder);
  --bs-input-focus-border-color: var(--color-primary);
  --bs-input-focus-box-shadow: 0 0 0 3px var(--primary-alpha-20);
  --bs-navbar-color:         var(--text-secondary);
  --bs-navbar-hover-color:   var(--text-primary);
  --bs-navbar-active-color:  var(--text-primary);
  --bs-navbar-toggler-border-color: var(--border-default);
  --bs-secondary-bg:         var(--bg-surface);
  --bs-tertiary-bg:          var(--bg-elevated);
}

/* ─── 3. Base & Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: var(--header-height, 64px);
  overflow-x: hidden; /* safe now that header is position:fixed, not sticky */
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: .875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-top: var(--header-height, 64px);
}

/* Belt-and-suspenders: also clip inside main so inner transforms can't escape */
main#main-content { overflow-x: hidden; }

/* Data / price elements always use monospace */
.mono, .price, .percent, .ticker-price, .ticker-change,
.market-table td, .stat-value, .return-figure {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

a { color: var(--text-link); transition: color var(--duration-fast) var(--ease-standard); }
a:hover { color: var(--text-link-hover); }

img { max-width: 100%; height: auto; }

/* Scrollbar */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }
* { scrollbar-width: thin; scrollbar-color: var(--border-default) var(--bg-base); }

/* Focus */
:focus-visible { outline: 2px solid var(--border-primary); outline-offset: 2px; }

/* Selection */
::selection { background: var(--primary-alpha-30); color: var(--text-primary); }

/* Skip link */
.skip-to-content {
  position: absolute; top: -100%; left: var(--space-4);
  background: var(--color-primary); color: var(--text-primary);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  font-weight: 600; z-index: var(--z-tooltip);
  transition: top var(--duration-fast);
}
.skip-to-content:focus { top: var(--space-4); color: var(--text-primary); }

/* ─── 4. Typography ──────────────────────────────────────────────────────── */
.display-hero { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.display-xl   { font-size: clamp(2rem, 4vw, 3.5rem);  font-weight: 800; letter-spacing: -.03em; line-height: 1.1;  }
.display-lg   { font-size: clamp(1.5rem, 3vw, 2.25rem);font-weight: 700; letter-spacing: -.02em; line-height: 1.2;  }

h1 { font-size: 2.25rem;  font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 1.75rem;  font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
h3 { font-size: 1.25rem;  font-weight: 600; letter-spacing: -.01em; }
h4 { font-size: 1.0625rem;font-weight: 600; }
h5 { font-size: .9375rem; font-weight: 600; }
h6 { font-size: .875rem;  font-weight: 600; }

.section-label {
  display: block; font-size: .6875rem; font-weight: 600;
  color: var(--text-tertiary); letter-spacing: .10em; text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.lead { font-size: 1.0625rem; color: var(--text-secondary); line-height: 1.65; }
.text-muted { color: var(--text-secondary) !important; }
.text-dim    { color: var(--text-tertiary)  !important; }
.text-accent { color: var(--accent-400) !important; }
.text-up     { color: var(--price-up) !important; }
.text-down   { color: var(--price-down) !important; }

/* ─── 5. Promo Banner ────────────────────────────────────────────────────── */
.promo-banner {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: var(--space-2); padding: 0 var(--space-4);
  height: 44px; min-height: 44px;
  background: var(--accent-alpha-20);
  border-bottom: 1px solid var(--accent-alpha-30);
  font-size: .75rem; font-weight: 500;
}
.promo-link { color: var(--accent-400); font-weight: 600; }
.promo-dismiss {
  background: none; border: none; color: var(--text-tertiary);
  cursor: pointer; padding: 0 var(--space-2); font-size: 1.1rem; line-height: 1;
  transition: color var(--duration-fast);
}
.promo-dismiss:hover { color: var(--text-primary); }

/* ─── 6. Navigation ──────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--z-sticky);
  background: var(--bg-base);
}

.navbar {
  background: transparent;
  border-bottom: 1px solid var(--border-hairline);
  padding: 0;
  min-height: 64px;
  /* Bootstrap sets position:relative - this is what mega menus anchor to */
}

.navbar-brand { padding: 0; margin-right: var(--space-6); }
.logo-svg        { width: 140px; height: 32px; }
.logo-svg--footer{ width: 130px; height: 28px; }

.nav-link {
  color: var(--text-secondary) !important;
  font-size: .875rem;
  font-weight: 500;
  padding: .5rem var(--space-3) !important;
  border-radius: var(--radius-md);
  transition: color var(--duration-fast), background var(--duration-fast);
  position: relative;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active { color: var(--text-primary) !important; background: var(--bg-elevated); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: var(--space-3);
  right: var(--space-3);
  height: 2px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

/* Caret on mega-menu toggles */
.mega-caret {
  display: inline-block;
  vertical-align: middle;
  margin-left: 3px;
  opacity: .5;
  transition: transform var(--duration-fast), opacity var(--duration-fast);
  flex-shrink: 0;
}
.mega-toggle[aria-expanded="true"] .mega-caret {
  transform: rotate(-180deg);
  opacity: 1;
}

/* Toggler - animated hamburger/close */
.navbar-toggler {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 7px 9px;
  color: var(--text-secondary);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}
.navbar-toggler:hover  { border-color: var(--border-primary); background: var(--bg-elevated); }
.navbar-toggler:focus  { box-shadow: 0 0 0 3px var(--primary-alpha-20); outline: none; }
/* hide default Bootstrap icon */
.navbar-toggler-icon   { display: none; }
.nav-toggle-open,
.nav-toggle-close      { display: block; color: var(--text-secondary); }
.nav-toggle-close      { display: none; }
.navbar-toggler[aria-expanded="true"] .nav-toggle-open  { display: none; }
.navbar-toggler[aria-expanded="true"] .nav-toggle-close { display: block; }

/* ─── 7. Mega-menu (DESKTOP ≥ 1200px) ───────────────────────────────────── */

/* Hidden by default; custom JS adds/removes .open */
.mega-menu { display: none; }
.mega-menu.open { display: block; }

/* Full-width mega menu: anchors to .navbar (position:relative in Bootstrap) */
.mega-dropdown { position: static; }
.mega-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 1050;
  background: var(--bg-elevated);
  border: none;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: var(--space-6) 0;
  box-shadow: 0 12px 48px rgba(0,0,0,.70), 0 2px 0 rgba(21,57,154,.15);
  min-width: 100%;
  margin-top: 0;
}
.mega-menu.open { animation: menuEnter 180ms var(--ease-decelerate) both; }

/* Narrow variant: anchored to its own li so it drops under the toggle */
.mega-dropdown--narrow { position: relative; }
.mega-menu--narrow {
  left: auto;
  right: 0;
  min-width: 540px;
  max-width: 620px;
  border-radius: var(--radius-xl) 0 var(--radius-xl) var(--radius-xl);
  border: 1px solid var(--border-subtle) !important;
  padding: var(--space-5);
}

.mega-menu-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-8);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-12);
}
.mega-menu--narrow .mega-menu-inner { padding: 0; gap: var(--space-6); }

.mega-col   { display: flex; flex-direction: column; gap: var(--space-1); }
.mega-label {
  font-size: .6875rem; font-weight: 600; color: var(--text-tertiary);
  letter-spacing: .10em; text-transform: uppercase; margin-bottom: var(--space-2);
}
.mega-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  text-decoration: none; color: var(--text-secondary);
  transition: background var(--duration-fast), color var(--duration-fast);
}
.mega-item:hover { background: var(--bg-overlay); color: var(--text-primary); }
.mega-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-alpha-10); border: 1px solid var(--primary-alpha-20);
  border-radius: var(--radius-md); color: var(--primary-400);
}
.mega-item:hover .mega-icon { background: var(--primary-alpha-20); border-color: var(--primary-alpha-30); }
.mega-title { display: block; font-size: .875rem; font-weight: 500; color: var(--text-primary); line-height: 1.2; }
.mega-desc  { display: block; font-size: .6875rem; color: var(--text-tertiary); margin-top: 1px; }
.mega-footer {
  grid-column: 1 / -1; border-top: 1px solid var(--border-hairline);
  padding-top: var(--space-4); margin-top: var(--space-2);
  font-size: .75rem; color: var(--text-secondary);
}
.mega-footer a { color: var(--primary-400); font-weight: 500; text-decoration: none; }
.mega-footer a:hover { color: var(--text-link-hover); }
.mega-demo-prompt {
  margin-top: var(--space-4); padding: var(--space-4);
  background: var(--bg-overlay); border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.mega-demo-prompt p { font-size: .75rem; color: var(--text-secondary); margin-bottom: var(--space-3); }

/* Backdrop shown when a mega menu is open (desktop only) */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(5,8,22,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.nav-backdrop.active { display: block; animation: fadeIn 160ms ease both; }

@keyframes menuEnter { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }

/* Open state highlight on the toggle link */
.mega-dropdown.mega-open > .mega-toggle {
  color: var(--text-primary) !important;
  background: var(--bg-elevated);
}

/* ─── Auth buttons in nav ────────────────────────────────────────────────── */
.navbar-auth { display: flex; align-items: center; gap: var(--space-2); }

/* ─── Mobile collapsed nav (< 1200px) ───────────────────────────────────── */
@media (max-width: 1199.98px) {
  /* Full-screen overlay - sits below the header (z-index: 200) */
  #mainNav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 199;
    padding-top: var(--header-height, 64px); /* pushes content below fixed header */
    background: var(--bg-base);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  #mainNav.show { display: block; }
  #mainNav::-webkit-scrollbar { display: none; }

  /* Mobile close X - in-flow, pinned to the right */
  .nav-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    margin-right: 16px;
    margin-top: 14px;
    margin-bottom: 2px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
    transition: color var(--duration-fast), background var(--duration-fast);
  }
  .nav-close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
  }

  /* Stack nav items vertically */
  .navbar-nav {
    padding: var(--space-3) var(--space-2) 0;
    gap: 0 !important;
    flex-direction: column !important;
  }
  .nav-link {
    padding: .75rem var(--space-3) !important;
    border-radius: var(--radius-md);
  }

  /* Submenus: collapse inline, toggled by .open class (same as desktop logic) */
  .mega-dropdown,
  .mega-dropdown--narrow { position: static; }

  .mega-menu,
  .mega-menu--narrow {
    position: static !important;
    left: auto !important; right: auto !important; top: auto !important;
    min-width: 0 !important; max-width: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    border-top: 1px solid var(--border-hairline) !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding: var(--space-2) 0 var(--space-3) !important;
    margin: 0 !important;
    background: var(--bg-surface);
    animation: none !important;
  }
  /* Hide until opened - .open added by JS just like on desktop */
  .mega-menu:not(.open) { display: none !important; }
  .mega-menu.open       { display: block !important; }

  .mega-menu-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    max-width: 100%;
  }
  .mega-item { padding: var(--space-2); }
  .mega-icon { width: 28px; height: 28px; }
  .mega-title { font-size: .8125rem; }
  .mega-footer { padding: var(--space-3) var(--space-3) 0; }
  /* Caret visible on mobile - rotates to show open/closed state */
  .mega-caret { display: inline-block; }

  /* Auth buttons */
  .navbar-auth {
    padding: var(--space-4) var(--space-3);
    border-top: 1px solid var(--border-hairline);
    margin-top: var(--space-2);
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .navbar-auth .btn { flex: 1; min-width: 100px; justify-content: center; }

  /* No backdrop on mobile */
  .nav-backdrop { display: none !important; }
}

@media (max-width: 575.98px) {
  .mega-menu-inner { grid-template-columns: 1fr; }
}

/* ─── 8. Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  border-radius: var(--radius-md);
  font-family: var(--font-sans); font-weight: 600; font-size: .875rem;
  letter-spacing: .01em; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--duration-fast) var(--ease-standard),
              border-color     var(--duration-fast) var(--ease-standard),
              box-shadow       var(--duration-fast) var(--ease-standard),
              color            var(--duration-fast) var(--ease-standard);
}
.btn:focus-visible { outline: 2px solid var(--border-primary); outline-offset: 2px; }
.btn:disabled      { cursor: not-allowed; pointer-events: none; opacity: .5; }

.btn-xs  { height: 26px; padding: 0 .625rem; font-size: .6875rem; border-radius: var(--radius-sm); }
.btn-sm  { height: 32px; padding: 0 .75rem;  font-size: .75rem;   border-radius: var(--radius-sm); }
.btn-md  { height: 40px; padding: 0 1rem;    font-size: .875rem; }
.btn-lg  { height: 48px; padding: 0 1.5rem;  font-size: 1rem; }
.btn-xl  { height: 56px; padding: 0 2rem;    font-size: 1.0625rem; }

/* Primary */
.btn-primary { background: var(--primary-600); color: var(--text-primary); border-color: var(--primary-600); }
.btn-primary:hover  { background: var(--primary-500); border-color: var(--primary-500); box-shadow: var(--glow-primary); color: var(--text-primary); }
.btn-primary:active { background: var(--primary-700); border-color: var(--primary-700); box-shadow: none; }

/* Accent / CTA */
.btn-accent { background: var(--accent-600); color: var(--text-primary); border-color: var(--accent-600); }
.btn-accent:hover  { background: var(--accent-500); border-color: var(--accent-500); box-shadow: var(--glow-accent); color: var(--text-primary); }
.btn-accent:active { background: var(--accent-700); border-color: var(--accent-700); box-shadow: none; }

/* Secondary */
.btn-secondary { background: transparent; color: var(--text-primary); border-color: var(--border-default); }
.btn-secondary:hover  { background: var(--bg-elevated); border-color: var(--border-strong); color: var(--text-primary); }
.btn-secondary:active { background: var(--bg-surface); }

/* Ghost */
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover  { background: rgba(255,255,255,.04); color: var(--text-primary); border-color: transparent; }

/* Danger */
.btn-danger { background: transparent; color: var(--status-error); border-color: rgba(213,0,0,.40); }
.btn-danger:hover { background: var(--error-fill); border-color: var(--status-error); color: var(--status-error); }

/* Bootstrap override */
.btn.btn-primary   { --bs-btn-color: var(--text-primary); --bs-btn-bg: var(--primary-600); --bs-btn-border-color: var(--primary-600); --bs-btn-hover-bg: var(--primary-500); --bs-btn-active-bg: var(--primary-700); }
.btn.btn-outline-secondary { --bs-btn-color: var(--text-primary); --bs-btn-border-color: var(--border-default); }

/* ─── 9. Form Controls ───────────────────────────────────────────────────── */
.form-control, .form-select {
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  color: var(--text-primary); border-radius: var(--radius-md);
  font-family: var(--font-sans); font-size: .875rem;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.form-control::placeholder { color: var(--text-placeholder); }
.form-control:hover { border-color: var(--border-strong); }
.form-control:focus {
  background: var(--bg-surface); border-color: var(--border-primary);
  box-shadow: 0 0 0 3px var(--primary-alpha-20); color: var(--text-primary);
}
.form-label { font-size: .6875rem; font-weight: 600; color: var(--text-tertiary); letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--space-2); }

.form-control.mono { font-family: var(--font-mono); letter-spacing: .02em; }

/* Input group */
.input-group .form-control { border-right: none; }
.input-group .btn { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* ─── 10. Cards ──────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

/* Feature card */
.card-feature {
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: var(--space-6);
  transition: border-color var(--duration-base), box-shadow var(--duration-base);
  height: 100%;
}
.card-feature:hover { border-color: var(--primary-alpha-50); box-shadow: var(--glow-primary); }
.card-feature .feature-icon {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--primary-alpha-10); border: 1px solid var(--primary-alpha-20);
  border-radius: var(--radius-md); color: var(--primary-400); margin-bottom: var(--space-4);
}
.card-feature .feature-title { font-size: 1rem; font-weight: 600; margin-bottom: var(--space-2); }
.card-feature .feature-desc  { font-size: .875rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* Strategy card */
.card-strategy {
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--accent-600); border-radius: var(--radius-md);
  padding: var(--space-6); height: 100%;
}
.card-strategy .return-figure {
  font-family: var(--font-mono); font-size: 3rem; font-weight: 700;
  color: var(--price-up); letter-spacing: -.02em; line-height: 1;
  margin-bottom: var(--space-2);
}
.card-strategy .strategy-type { font-size: .75rem; color: var(--text-tertiary); margin-bottom: var(--space-4); }
.card-strategy .strategy-desc { font-size: .875rem; color: var(--text-secondary); margin-bottom: var(--space-4); line-height: 1.6; }
.card-strategy .strategy-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.card-strategy .strategy-disclaimer { font-size: .6875rem; color: var(--text-tertiary); font-style: italic; border-top: 1px solid var(--border-hairline); padding-top: var(--space-3); margin-top: var(--space-2); }

/* Stat card */
.card-stat {
  text-align: center; padding: var(--space-6);
  border-right: 1px solid var(--border-hairline);
}
.card-stat:last-child { border-right: none; }
.stat-value { font-family: var(--font-mono); font-size: 2.25rem; font-weight: 700; color: var(--text-primary); letter-spacing: -.02em; line-height: 1; display: block; }
.stat-label { font-size: .6875rem; font-weight: 500; color: var(--text-tertiary); letter-spacing: .08em; text-transform: uppercase; margin-top: var(--space-2); display: block; }

/* Testimonial card */
.card-testimonial {
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: var(--space-6); height: 100%;
}
.testimonial-quote { font-size: .9375rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--space-4); font-style: italic; }
.testimonial-name  { font-size: .875rem; font-weight: 600; color: var(--text-primary); }
.testimonial-role  { font-size: .75rem; color: var(--text-tertiary); }

/* ─── 11. Badges ─────────────────────────────────────────────────────────── */
.badge-zi {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: .6875rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; white-space: nowrap; border: 1px solid;
}
.badge-default  { background: rgba(138,155,181,.10); color: var(--text-secondary); border-color: var(--border-subtle); }
.badge-primary  { background: var(--primary-alpha-10); color: var(--primary-400);  border-color: var(--primary-alpha-30); }
.badge-accent   { background: var(--accent-alpha-10);  color: var(--accent-400);   border-color: var(--accent-alpha-20); }
.badge-success  { background: var(--success-fill); color: var(--status-success); border-color: rgba(0,200,83,.25); }
.badge-warning  { background: var(--warning-fill); color: var(--status-warning); border-color: rgba(255,145,0,.25); }
.badge-error    { background: var(--error-fill);   color: var(--status-error);   border-color: rgba(213,0,0,.25); }
.badge-up       { background: rgba(0,230,118,.08); color: var(--price-up);   border-color: rgba(0,230,118,.20); font-family: var(--font-mono); }
.badge-down     { background: rgba(255,23,68,.08);  color: var(--price-down); border-color: rgba(255,23,68,.20);  font-family: var(--font-mono); }
.badge-beginner     { background: rgba(0,200,83,.08);  color: var(--status-success); border-color: rgba(0,200,83,.20);  }
.badge-intermediate { background: rgba(255,145,0,.08); color: var(--status-warning); border-color: rgba(255,145,0,.20); }
.badge-advanced     { background: rgba(213,0,0,.08);   color: var(--status-error);   border-color: rgba(213,0,0,.20);   }

/* ─── 12. Market Data Table ──────────────────────────────────────────────── */
.market-table-wrap { overflow-x: auto; }
.market-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-mono); font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.market-table thead tr { background: var(--bg-elevated); border-bottom: 1px solid var(--border-default); }
.market-table th {
  padding: 10px 12px; text-align: right; white-space: nowrap;
  font-family: var(--font-sans); font-size: .6875rem; font-weight: 500;
  color: var(--text-tertiary); letter-spacing: .08em; text-transform: uppercase;
}
.market-table th:first-child { text-align: left; }
.market-table tbody tr { border-bottom: 1px solid var(--border-hairline); transition: background var(--duration-instant) linear; }
.market-table tbody tr:hover { background: var(--bg-elevated); }
.market-table tbody tr:nth-child(even) { background: var(--bg-surface); }
.market-table tbody tr:nth-child(even):hover { background: var(--bg-elevated); }
.market-table td { padding: 10px 12px; text-align: right; color: var(--text-primary); white-space: nowrap; }
.market-table td:first-child { text-align: left; font-weight: 600; font-family: var(--font-sans); }
.market-table td:last-child { text-align: right; }
.market-table .price-up   { color: var(--price-up);  }
.market-table .price-down { color: var(--price-down); }
.market-table .btn-trade  {
  height: 26px; padding: 0 10px;
  font-family: var(--font-sans); font-size: .6875rem; font-weight: 600;
  background: var(--primary-alpha-10); color: var(--primary-400);
  border: 1px solid var(--primary-alpha-30); border-radius: var(--radius-sm);
  white-space: nowrap; letter-spacing: .02em; text-transform: uppercase;
  cursor: pointer; transition: background var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast);
  text-decoration: none; display: inline-flex; align-items: center;
}
.market-table .btn-trade:hover { background: var(--primary-600); color: var(--text-primary); border-color: var(--primary-600); }

/* Flash animations */
@keyframes flash-up   { 0% { background: rgba(0,230,118,.25); } 100% { background: transparent; } }
@keyframes flash-down { 0% { background: rgba(255,23,68,.25);  } 100% { background: transparent; } }
.flash-up   { animation: flash-up   600ms var(--ease-standard); }
.flash-down { animation: flash-down 600ms var(--ease-standard); }

/* Arrow indicators */
.arrow-up::before   { content: '▲ '; font-size: .65em; }
.arrow-down::before { content: '▼ '; font-size: .65em; }

/* ─── 13. Section Layouts ────────────────────────────────────────────────── */
.section { padding: var(--space-20) 0; }
.section-sm { padding: var(--space-12) 0; }
.section-lg { padding: var(--space-24) 0; }
.section-alt { background: var(--bg-surface); }

/* ─── 14. Hero Section ───────────────────────────────────────────────────── */
.hero {
  padding: var(--space-24) 0 var(--space-20);
  background: var(--bg-base);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(21,57,154,.18) 0%, transparent 60%);
  pointer-events: none;
}
.hero-headline { font-size: clamp(2.25rem, 5vw, 4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.hero-sub      { font-size: 1.0625rem; color: var(--text-secondary); max-width: 560px; margin: var(--space-5) 0; line-height: 1.65; }
.hero-ctas     { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.hero-note     { font-size: .75rem; color: var(--text-tertiary); margin-top: var(--space-3); }

/* Page hero (inner pages) */
.page-hero {
  padding: var(--space-16) 0 var(--space-12);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-hairline);
}
.page-hero .hero-headline { font-size: clamp(1.75rem, 4vw, 2.75rem); }

/* ─── 15. Partner Logo Strip ─────────────────────────────────────────────── */
.partner-strip { padding: var(--space-8) 0; border-top: 1px solid var(--border-hairline); border-bottom: 1px solid var(--border-hairline); background: var(--bg-surface); }
.partner-strip-label { font-size: .6875rem; font-weight: 500; color: var(--text-tertiary); letter-spacing: .08em; text-transform: uppercase; margin-right: var(--space-8); white-space: nowrap; }
.partner-logos { display: flex; align-items: center; gap: var(--space-8); flex-wrap: wrap; }
.partner-logo  { color: var(--text-tertiary); font-size: .875rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .6; transition: opacity var(--duration-fast); }
.partner-logo:hover { opacity: 1; }

/* ─── 16. Stats Bar ──────────────────────────────────────────────────────── */
.stats-bar { padding: var(--space-8) 0; border-bottom: 1px solid var(--border-hairline); }
.stats-bar .card-stat { padding: var(--space-4) var(--space-6); }

/* ─── 17. Step Process ───────────────────────────────────────────────────── */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-6); }
.step {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-6); background: var(--bg-elevated);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  position: relative;
}
.step-number {
  font-family: var(--font-mono); font-size: 2rem; font-weight: 700;
  color: var(--primary-alpha-50); line-height: 1;
}
.step-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.step-desc  { font-size: .875rem; color: var(--text-secondary); line-height: 1.6; }

/* ─── 18. FAQ Accordion ──────────────────────────────────────────────────── */
.faq-accordion { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border-hairline); }
.faq-item:last-child { border-bottom: none; }
.faq-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-4) var(--space-6); background: var(--bg-elevated);
  cursor: pointer; font-size: .9375rem; font-weight: 500; color: var(--text-primary);
  text-align: left; border: none; transition: background var(--duration-fast);
}
.faq-trigger:hover { background: var(--bg-overlay); }
.faq-trigger[aria-expanded="true"] { color: var(--primary-400); }
.faq-icon { color: var(--text-tertiary); flex-shrink: 0; transition: transform var(--duration-base) var(--ease-standard); }
.faq-trigger[aria-expanded="true"] .faq-icon { transform: rotate(180deg); color: var(--primary-400); }
.faq-body { padding: var(--space-4) var(--space-6); background: var(--bg-surface); font-size: .9375rem; color: var(--text-secondary); line-height: 1.7; border-top: 1px solid var(--border-hairline); }
.faq-body a { color: var(--text-link); }

/* ─── 19. Ticker Bar ─────────────────────────────────────────────────────── */
.ticker-bar {
  display: flex; align-items: center; gap: var(--space-6); overflow-x: auto;
  background: var(--bg-surface); border-bottom: 1px solid var(--border-hairline);
  height: 38px; padding: 0 var(--space-6);
  scrollbar-width: none;
}
.ticker-bar::-webkit-scrollbar { display: none; }
.ticker-item { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; cursor: pointer; text-decoration: none; }
.ticker-symbol { font-family: var(--font-sans); font-size: .6875rem; font-weight: 600; color: var(--text-tertiary); letter-spacing: .04em; text-transform: uppercase; }
.ticker-price  { font-family: var(--font-mono); font-size: .6875rem; font-weight: 500; color: var(--text-primary); }
.ticker-change { font-family: var(--font-mono); font-size: .6875rem; font-weight: 600; }
.ticker-sep    { width: 1px; height: 14px; background: var(--border-hairline); flex-shrink: 0; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--price-up); flex-shrink: 0; animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity:1; } 50% { opacity:.35; } }

/* ─── 20. CTA Section ────────────────────────────────────────────────────── */
.cta-section {
  padding: var(--space-20) 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-hairline);
  text-align: center;
}
.cta-section .cta-headline { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -.02em; }
.cta-section .cta-sub { font-size: 1rem; color: var(--text-secondary); max-width: 540px; margin: var(--space-4) auto var(--space-8); }
.cta-section .cta-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--space-3); }

/* ─── 21. Risk Disclaimer ────────────────────────────────────────────────── */
.risk-inline {
  font-size: .6875rem; color: var(--text-tertiary); font-style: italic;
  border-top: 1px solid var(--border-hairline); padding-top: var(--space-3); margin-top: var(--space-3);
}

/* ─── 22. Footer ─────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border-hairline); }

.footer-risk {
  background: rgba(169,62,23,.06); border-bottom: 1px solid rgba(169,62,23,.15);
  padding: var(--space-5) 0;
}
.footer-risk p { font-size: .75rem; color: var(--text-tertiary); line-height: 1.6; margin: 0; }
.footer-risk strong { color: var(--accent-400); }

.footer-main { padding: var(--space-16) 0; }

.footer-brand { display: inline-block; margin-bottom: var(--space-4); }
.footer-tagline { font-size: .875rem; color: var(--text-tertiary); margin: 0; }

.footer-col-title {
  font-size: .6875rem; font-weight: 600; color: var(--text-tertiary);
  letter-spacing: .10em; text-transform: uppercase; margin-bottom: var(--space-4);
}
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: .875rem; transition: color var(--duration-fast); }
.footer-links a:hover { color: var(--text-primary); }

.footer-social { display: flex; gap: var(--space-3); }
.social-link {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); color: var(--text-secondary);
  text-decoration: none; transition: background var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast);
}
.social-link:hover { background: var(--bg-overlay); color: var(--text-primary); border-color: var(--border-default); }

.footer-newsletter-desc { font-size: .875rem; color: var(--text-secondary); margin-bottom: var(--space-4); }
.footer-newsletter-note { font-size: .6875rem; color: var(--text-tertiary); margin-top: var(--space-2); margin-bottom: 0; }
.footer-newsletter .form-control { background: var(--bg-elevated); }

.footer-bottom {
  background: var(--bg-surface); border-top: 1px solid var(--border-hairline);
  padding: var(--space-5) 0;
}
.footer-copyright { font-size: .75rem; color: var(--text-tertiary); margin: 0; }
.footer-legal-links {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: flex-start;
}
@media (min-width: 768px) { .footer-legal-links { justify-content: flex-end; } }
.footer-legal-links a { font-size: .75rem; color: var(--text-tertiary); text-decoration: none; transition: color var(--duration-fast); }
.footer-legal-links a:hover { color: var(--text-primary); }
.footer-jurisdictions { font-size: .6875rem; color: var(--text-tertiary); margin-top: var(--space-4); line-height: 1.6; border-top: 1px solid var(--border-hairline); padding-top: var(--space-4); }

/* ─── 23. Utility Sections ───────────────────────────────────────────────── */
.section-divider { border: none; border-top: 1px solid var(--border-hairline); margin: 0; }

/* Skeleton loader */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-overlay) 50%, var(--bg-elevated) 75%);
  background-size: 800px 100%; animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* Alert */
.alert-zi { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); border: 1px solid; font-size: .875rem; line-height: 1.5; }
.alert-zi.success { background: var(--success-fill); border-color: rgba(0,200,83,.25); color: var(--status-success); }
.alert-zi.error   { background: var(--error-fill);   border-color: rgba(213,0,0,.25);  color: var(--status-error);   }

/* ─── 24. Animations ─────────────────────────────────────────────────────── */
@keyframes fadeIn    { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp   { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
.animate-fade-in  { animation: fadeIn  var(--duration-enter) var(--ease-decelerate); }
.animate-slide-up { animation: slideUp var(--duration-enter) var(--ease-decelerate); }

/* ─── 25. Reduced Motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .live-dot { animation: none; }
}

/* ─── 26. Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .section    { padding: var(--space-12) 0; }
  .section-lg { padding: var(--space-16) 0; }
  .hero       { padding: var(--space-16) 0 var(--space-12); }
  .card-stat  { border-right: none; border-bottom: 1px solid var(--border-hairline); padding: var(--space-4); }
}
@media (max-width: 575.98px) {
  .hero-headline { font-size: 2rem; }
  .hero-ctas     { flex-direction: column; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .cta-section .cta-btns .btn { width: 100%; }
}
