/* ─────────────────────────────────────────────────────────────────
   ZonedInOut — Risk Scores & Market Analysis
   Design System v5 · Clean Institutional
   ───────────────────────────────────────────────────────────────── */

/* ── DESIGN TOKENS ──────────────────────────────────────────────── */
:root {
  /* Layout */
  --maxw:        1440px;   /* page content width — wider = less dead space on big screens */

  /* Surfaces — true neutral near-black, no blue tint */
  --bg:          #080808;
  --bg-card:     #101010;
  --bg-alt:      #0a0a0a;
  --bg-hover:    #161616;
  --bg-input:    #0d0d0d;
  --bg-elevated: #1c1c1c;

  /* Borders — neutral hairlines */
  --border:      #1e1e1e;
  --border-sub:  #131313;
  --border-hi:   #2c2c2c;

  /* Text — neutral ink scale */
  --text:        #f2f2f2;
  --muted:       #888888;
  --subtle:      #484848;

  /* Data */
  --green:       #22c55e;
  --amber:       #e8971a;
  --red:         #e84545;

  /* Brand */
  --brand:       #10b981;
  --brand-dim:   rgba(16,185,129,0.10);
  --brand-hi:    rgba(16,185,129,0.18);

  /* Typography — Plus Jakarta Sans for display, Inter for body */
  --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  --font: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Geometry */
  --r:    10px;
  --r-sm: 6px;
  --r-lg: 16px;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0,0,0,0.65), 0 8px 28px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-lift: 0 8px 32px rgba(0,0,0,0.7), 0 24px 64px rgba(0,0,0,0.45), 0 0 0 1px rgba(16,185,129,0.14), 0 0 60px rgba(16,185,129,0.06);
  --glow-brand:  0 0 0 1px rgba(16,185,129,0.3), 0 0 40px rgba(16,185,129,0.13);

  /* Transitions */
  --t:      0.15s ease;
  --t-fast: 0.1s ease;
  --t-slow: 0.22s cubic-bezier(0.4,0,0.2,1);
  --transition: 0.15s ease;
}

/* ── LIGHT THEME ────────────────────────────────────────────────────
   Overrides the design tokens; the ~2000 var()-based colors flip with it.
   Hardcoded dark surfaces get targeted overrides further below. */
html[data-theme="light"] {
  color-scheme: light;

  --bg:          #f5f6f8;
  --bg-card:     #ffffff;
  --bg-alt:      #eceff3;
  --bg-hover:    #eef1f4;
  --bg-input:    #ffffff;
  --bg-elevated: #ffffff;

  --border:      #e4e7ec;
  --border-sub:  #eef0f3;
  --border-hi:   #d3d8e0;

  --text:        #0f141a;
  --muted:       #586172;
  --subtle:      #939dab;

  --green:       #16a34a;
  --amber:       #b8730e;
  --red:         #dc2626;

  --brand:       #059669;
  --brand-dim:   rgba(5,150,105,0.10);
  --brand-hi:    rgba(5,150,105,0.16);

  --shadow-card: 0 1px 2px rgba(16,24,40,0.05), 0 4px 14px rgba(16,24,40,0.06), 0 0 0 1px rgba(16,24,40,0.045);
  --shadow-lift: 0 10px 34px rgba(16,24,40,0.13), 0 0 0 1px rgba(5,150,105,0.18);
  --glow-brand:  0 0 0 1px rgba(5,150,105,0.28), 0 0 26px rgba(5,150,105,0.12);
}
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cbd2db; }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #b3bcc8; }

/* Theme toggle button */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background var(--t), transform var(--t);
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-hi); background: var(--bg-hover); }
.theme-toggle:active { transform: scale(0.92); }
/* Icon swap, animated: both icons stack in the same slot and cross-fade with
   a quarter-turn rotation instead of an instant display:none/block swap —
   this button gets pressed on every visit and never had any feedback beyond
   the static browser click. Respects reduced-motion by disabling the
   transition (still swaps, just without the rotation). */
.theme-toggle svg,
#soundToggle svg {
  transition: opacity 220ms ease, transform 220ms ease;
}
.theme-toggle .tt-sun,
.theme-toggle .tt-moon,
#soundToggle .st-on,
#soundToggle .st-off {
  grid-area: 1 / 1;
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.theme-toggle, #soundToggle { display: inline-grid; place-items: center; }
.theme-toggle .tt-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
html[data-theme="light"] .theme-toggle .tt-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
html[data-theme="light"] .theme-toggle .tt-sun  { opacity: 1; transform: rotate(0deg) scale(1); }
/* Sound toggle: show speaker when on, muted icon when off */
#soundToggle .st-off { opacity: 0; transform: rotate(-90deg) scale(0.5); }
#soundToggle.sound-off .st-on  { opacity: 0; transform: rotate(90deg) scale(0.5); }
#soundToggle.sound-off .st-off { opacity: 1; transform: rotate(0deg) scale(1); }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg, #soundToggle svg { transition: opacity 120ms linear; }
  .theme-toggle .tt-sun, .theme-toggle .tt-moon, #soundToggle .st-on, #soundToggle .st-off,
  html[data-theme="light"] .theme-toggle .tt-moon, html[data-theme="light"] .theme-toggle .tt-sun,
  #soundToggle.sound-off .st-on, #soundToggle.sound-off .st-off { transform: none; }
}
#soundToggle.sound-off .st-off { display: block; }
#soundToggle.sound-off { color: var(--subtle); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── PAGE PRELOADER ──────────────────────────────────────────────
   The candlestick mark lights up red → amber → green (the exact
   language the whole score system uses) instead of a generic spinner,
   then reveals the page. Plays on every real load — refresh included. */
.preloader {
  position: fixed; inset: 0;
  z-index: 20000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  background: var(--bg);
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1), filter 0.4s cubic-bezier(0.4,0,0.2,1);
}
.preloader--out {
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
}
.preloader-mark {
  width: 56px; height: 56px;
  overflow: visible;
}
.pl-candle {
  transform-origin: 14px 28px; /* common baseline for all three candles */
  transform: scaleY(0);
  opacity: 0;
  animation: pl-rise 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.pl-candle--1 { color: var(--red);   animation-delay: 0.05s; }
.pl-candle--2 { color: var(--amber); animation-delay: 0.22s; }
.pl-candle--3 { color: var(--green); animation-delay: 0.39s; }
@keyframes pl-rise {
  0%   { transform: scaleY(0);   opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: scaleY(1);   opacity: 1; }
}
.preloader-word {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text);
  opacity: 0;
  animation: pl-word-in 0.5s ease forwards;
  animation-delay: 0.62s;
}
.preloader-word .logo-hi { color: var(--brand); }
.preloader-tag {
  font-family: var(--mono);
  font-size: 10px; font-weight: 600; letter-spacing: 0.18em;
  color: var(--subtle);
  opacity: 0;
  animation: pl-word-in 0.5s ease forwards;
  animation-delay: 0.74s;
}
@keyframes pl-word-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .pl-candle, .preloader-word, .preloader-tag {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .preloader { transition: opacity 0.25s ease; }
  .preloader--out { filter: none; }
}

/* Light-mode overrides for components with hardcoded dark surfaces */
html[data-theme="light"] .nav {
  background: rgba(255,255,255,0.82);
  border-bottom: 1px solid rgba(16,24,40,0.07);
}
html[data-theme="light"] .nav.scrolled {
  background: rgba(255,255,255,0.95);
  border-bottom-color: rgba(16,24,40,0.10);
  box-shadow: 0 4px 24px rgba(16,24,40,0.08), 0 1px 0 rgba(5,150,105,0.05);
}
html[data-theme="light"] .nav-links a,
html[data-theme="light"] .nav-dd-btn { color: rgba(16,24,40,0.55); }
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.nav-active,
html[data-theme="light"] .nav-dd-btn:hover,
html[data-theme="light"] .nav-dd-btn.nav-active { color: var(--text); }

html[data-theme="light"] .nav-dropdown {
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(247,248,250,0.97) 100%);
  border-color: rgba(16,24,40,0.10);
  box-shadow: 0 24px 60px rgba(16,24,40,0.16), 0 2px 8px rgba(16,24,40,0.08), inset 0 1px 0 rgba(255,255,255,0.7);
}
html[data-theme="light"] .nav-dropdown::before {
  background: rgba(255,255,255,0.96);
  border-color: rgba(16,24,40,0.10);
}
html[data-theme="light"] .ndd-ic { background: rgba(16,24,40,0.045); border-color: rgba(16,24,40,0.08); color: var(--muted); }
html[data-theme="light"] .ndd-label { color: var(--text); }
html[data-theme="light"] .ndd-head { color: var(--subtle); }

html[data-theme="light"] .hover-chart {
  background: linear-gradient(165deg, #ffffff 0%, #f6f7f9 100%);
  border-color: rgba(5,150,105,0.3);
  box-shadow: 0 18px 48px rgba(16,24,40,0.18), 0 0 0 1px rgba(16,24,40,0.04);
}
html[data-theme="light"] .hc-chart { background: rgba(16,24,40,0.025); }
html[data-theme="light"] .hc-stat { background: rgba(16,24,40,0.04); }

/* Light-mode: flip the cards/panels that use hardcoded dark gradients */
html[data-theme="light"] .card,
html[data-theme="light"] .card-featured,
html[data-theme="light"] .learn-card,
html[data-theme="light"] .news-terminal,
html[data-theme="light"] .psych-card,
html[data-theme="light"] .psych-featured,
html[data-theme="light"] .psych-rules,
html[data-theme="light"] .checklist-item {
  background: var(--bg-card);
  border-color: var(--border);
}
html[data-theme="light"] .checklist-item:hover { background: var(--bg-hover); }
html[data-theme="light"] .mc-idx-card { background: var(--bg-card); border-color: var(--border); }
html[data-theme="light"] .form-select option { background: #ffffff; color: var(--text); }
html[data-theme="light"] .mobile-nav { background: rgba(255,255,255,0.97); border-color: rgba(16,24,40,0.08); }
html[data-theme="light"] .alert-toast { background: var(--bg-card); }
/* Article reader: white body text → readable dark ink in light mode */
html[data-theme="light"] .art-text p,
html[data-theme="light"] .art-text .art-ul li,
html[data-theme="light"] .art-text .art-ol li { color: rgba(16,24,40,0.82); }
html[data-theme="light"] .art-text .art-h,
html[data-theme="light"] .art-text .art-quote,
html[data-theme="light"] .art-text strong { color: var(--text); }
html[data-theme="light"] .art-text code { background: rgba(16,24,40,0.06); }
html[data-theme="light"] .art-text .art-hr { border-top-color: rgba(16,24,40,0.12); }

/* ── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}
html { overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "calt", "kern", "liga";
  /* clip, not hidden: hidden makes <body> its own scroll container, so any
     position:sticky descendant (rankings table header) binds to body's
     never-scrolling scrollport instead of the page and silently never
     sticks. clip prevents horizontal overflow identically without creating
     a scroll container. (hidden first as a fallback for old engines.) */
  overflow-x: hidden;
  overflow-x: clip;
  font-size: 15px;
  position: relative;
}
/* Same faint grid already used in the hero, extended site-wide at a fixed
   position so it doesn't scroll with the page. On an ultra-wide monitor the
   space either side of --maxw content reads as an intentional canvas
   texture instead of a stark, empty black void. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(16,185,129,0.022) 0, rgba(16,185,129,0.022) 1px, transparent 1px, transparent 80px),
    repeating-linear-gradient(0deg,  rgba(16,185,129,0.014) 0, rgba(16,185,129,0.014) 1px, transparent 1px, transparent 80px);
  pointer-events: none;
  z-index: 0;
}
html[data-theme="light"] body::before { display: none; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ── CUSTOM SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #242424; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #343434; }

/* ── LAYOUT ─────────────────────────────────────────────────────── */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--r);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: background var(--t), transform var(--t-fast), box-shadow var(--t);
  font-family: var(--font);
}
.btn-primary {
  background: var(--brand);
  color: #000;
  font-weight: 700;
}
.btn-primary:hover {
  background: #0ed499;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16,185,129,0.38), 0 0 0 1px rgba(16,185,129,0.18), 0 0 50px rgba(16,185,129,0.08);
}
.btn-outline {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-hi);
}
.btn-outline:hover { border-color: var(--muted); color: var(--text); }
.btn-sm   { padding: 6px 13px; font-size: 11px; }
.btn-lg   { padding: 11px 24px; font-size: 12px; }
.btn-full { width: 100%; margin-top: auto; justify-content: center; }

/* ── NAV ────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(8,8,8,0.88);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled {
  background: rgba(5,5,5,0.97);
  border-bottom-color: rgba(255,255,255,0.09);
  box-shadow: 0 4px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(16,185,129,0.04);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
}
.logo-mark { width: 26px; height: 26px; flex-shrink: 0; display: block; }
.logo-hi { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 14px; flex: 1; }
.nav-links a {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
  transition: color var(--t);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a:hover { color: rgba(255,255,255,0.75); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform var(--t-slow);
  transform-origin: left;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-pro { color: var(--amber) !important; }
.nav-cta { margin-left: auto; flex-shrink: 0; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  border-radius: 8px;
  transition: background var(--t);
}
.nav-toggle:hover { background: rgba(255,255,255,0.06); }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--muted);
  transition: transform 0.28s cubic-bezier(0.2,1.15,0.3,1), opacity 0.2s ease, background var(--t);
  border-radius: 1px;
}
.nav-toggle:hover span { background: var(--text); }
/* Morph into an X while the mobile menu is open — matches the panel's own
   open/close state instead of sitting static regardless of it. */
.nav-toggle--open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle--open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ── NAV DROPDOWNS ──────────────────────────────────────────────── */
.nav-dd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  transition: color var(--t);
}
.nav-dd-btn:hover { color: rgba(255,255,255,0.75); }
.nav-dd-btn.nav-active { color: var(--text) !important; }
.dd-chevron {
  width: 8px;
  height: 5px;
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
}
.nav-dd-wrap.open .dd-chevron { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  min-width: 252px;
  background: linear-gradient(180deg, rgba(20,20,26,0.92) 0%, rgba(11,11,15,0.95) 100%);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 7px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.7), 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(16,185,129,0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px) scale(0.97);
  transform-origin: top center;
  transition: opacity 0.18s ease, transform 0.24s cubic-bezier(0.22,1,0.36,1), visibility 0.18s;
  pointer-events: none;
  z-index: 300;
}
/* little caret connecting the menu to its button */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -5px; left: 50%;
  width: 10px; height: 10px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(20,20,26,0.92);
  border-left: 1px solid rgba(255,255,255,0.08);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px 0 0 0;
}
.nav-dd-wrap.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}
.ndd-head {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.3);
  padding: 6px 10px 7px;
  text-transform: uppercase;
}
.nav-dd-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  transition: background 0.15s ease;
}
.ndd-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ndd-ic svg { width: 15px; height: 15px; }
.ndd-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ndd-label {
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}
.ndd-desc {
  font-size: 10.5px;
  font-weight: 400;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.005em;
  transition: color 0.15s ease;
}
.nav-dd-item:hover {
  background: rgba(16,185,129,0.10);
}
.nav-dd-item:hover .ndd-ic {
  background: rgba(16,185,129,0.16);
  border-color: rgba(16,185,129,0.35);
  color: var(--brand);
  transform: scale(1.05);
}
.nav-dd-item:hover .ndd-label { color: #fff; }
.nav-dd-item:hover .ndd-desc { color: rgba(255,255,255,0.55); }
.nav-dd-item.nav-active .ndd-ic {
  background: rgba(16,185,129,0.18);
  border-color: rgba(16,185,129,0.4);
  color: var(--brand);
}
.nav-dd-item.nav-active .ndd-label { color: var(--brand); }

/* ── MOBILE NAV ─────────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 82px; left: 0; right: 0;
  z-index: 199;
  background: rgba(5,5,10,0.97);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px 18px;
  flex-direction: column;
  gap: 2px;
  backdrop-filter: blur(24px);
  max-height: calc(100vh - 82px);
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.mobile-nav.open { display: flex; }
.mnav-link {
  display: block;
  padding: 9px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--border-sub);
  transition: color var(--t);
}
.mnav-link:hover { color: var(--text); }
.mnav-link.pro { color: var(--amber); }

/* ── TICKER BAR ─────────────────────────────────────────────────── */
.ticker-bar {
  position: fixed;
  top: 52px; left: 0; right: 0;
  z-index: 198;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-sub);
  height: 30px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ticker-bar::before,
.ticker-bar::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 56px;
  z-index: 2;
  pointer-events: none;
}
.ticker-bar::before { left: 0;  background: linear-gradient(to right, var(--bg-alt), transparent); }
.ticker-bar::after  { right: 0; background: linear-gradient(to left,  var(--bg-alt), transparent); }
.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 80s linear infinite;
  will-change: transform;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.tick-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}
.tick-item:hover { background: rgba(255,255,255,0.05); }
.tick-item:hover .tick-sym { color: var(--brand); }
.tick-sym   { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--text); letter-spacing: 0.04em; }
.tick-price { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.tick-up    { font-family: var(--mono); font-size: 9.5px; color: var(--green); font-weight: 600; }
.tick-dn    { font-family: var(--mono); font-size: 9.5px; color: var(--red);   font-weight: 600; }
.tick-sep   { font-size: 9px; color: var(--border-hi); padding: 0 2px; }

/* ── HERO ───────────────────────────────────────────────────────── */
.hero {
  padding: calc(96px + var(--banner-h, 0px)) 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  /* Always-present base layer, independent of the video. iOS Safari can't
     play the WebM source at all (no MP4 fallback exists), which silently
     fails autoplay and leaves Safari showing its own "tap to play" button
     over a broken video — this background means that's never the only
     thing there: if the video hides itself (see the script by the video
     tag), this clean static image is what's left, not a play button. */
  background-image: url('hero-poster.png');
  background-size: cover;
  background-position: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(16,185,129,0.028) 0, rgba(16,185,129,0.028) 1px, transparent 1px, transparent 80px),
    repeating-linear-gradient(0deg,  rgba(16,185,129,0.018) 0, rgba(16,185,129,0.018) 1px, transparent 1px, transparent 80px);
  pointer-events: none;
  z-index: 2;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 40%, rgba(0,0,0,0.6) 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 40%, rgba(0,0,0,0.6) 20%, transparent 80%);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 55% 55% at 82% 22%, rgba(59,130,246,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 45% 50% at 12% 75%, rgba(139,92,246,0.05) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.08) 30%, rgba(8,8,8,0.52) 78%, rgba(8,8,8,0.94) 100%);
}
.hero-glow {
  position: absolute;
  top: 44%;
  left: 50%;
  width: 1100px;
  height: 660px;
  background: radial-gradient(ellipse, rgba(16,185,129,0.11) 0%, rgba(16,185,129,0.05) 38%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.20em;
  color: var(--brand);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  animation: live-pulse 2.2s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 100px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin-bottom: 24px;
  color: #ffffff;
}
.hero-hi {
  background: linear-gradient(125deg, #10b981 0%, #34d399 35%, #a7f3d0 60%, #34d399 80%, #10b981 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-pan 5s ease-in-out infinite;
  display: inline;
}
@keyframes gradient-pan {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}
.hero-desc {
  max-width: 440px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 520px;
  margin: 44px auto 0;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.hstat { flex: 1; padding: 17px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hstat-div { width: 1px; height: 34px; background: var(--border); flex-shrink: 0; }
.hstat-num {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.hstat-lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--subtle);
  text-transform: uppercase;
}

/* ── SECTIONS ───────────────────────────────────────────────────── */
.section {
  padding: 112px 0;
  border-top: 1px solid var(--border-sub);
  position: relative;
  background: radial-gradient(ellipse 720px 280px at 50% -20px, rgba(16,185,129,0.032) 0%, transparent 70%);
}
.section-alt {
  background: radial-gradient(ellipse 700px 320px at 65% 120%, rgba(16,185,129,0.04) 0%, transparent 70%), var(--bg-alt);
  border-top: 1px solid var(--border);
  position: relative;
}
.section-alt::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(16,185,129,0.35) 30%, rgba(16,185,129,0.35) 70%, transparent 100%);
  pointer-events: none;
}
.sec-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; }
.sec-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sec-label::before {
  content: '';
  display: inline-block;
  width: 20px; height: 1px;
  background: var(--brand);
  flex-shrink: 0;
  opacity: 0.6;
}
.sec-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
}
.sec-sub { font-size: 15px; color: var(--muted); line-height: 1.7; max-width: 560px; }
.freshness-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 4px 10px;
  border-radius: 999px; font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.02em;
}
.freshness-badge--ok    { color: var(--muted); background: rgba(255,255,255,0.04); }
.freshness-badge--stale { color: var(--amber); background: rgba(232,151,26,0.1); border: 1px solid rgba(232,151,26,0.25); }

/* Rankings explanation */
.rankings-why {
  font-size: 13px;
  line-height: 1.75;
  color: var(--subtle);
  max-width: 780px;
  margin: 0 0 28px;
  padding: 16px 20px;
  border-left: 2px solid var(--border-hi);
  background: rgba(255,255,255,0.018);
  border-radius: 0 var(--r) var(--r) 0;
}

/* Origin story */
.story-wrap {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: start;
}
.story-right { display: flex; flex-direction: column; gap: 18px; }
.story-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
.story-body strong { color: var(--text); font-weight: 600; }
.story-close {
  color: var(--subtle);
  font-size: 14px;
  padding-top: 6px;
  border-top: 1px solid var(--border-sub);
}
.story-lead {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 20px 0 0;
  max-width: 360px;
}
.story-lead em { color: var(--text); font-style: italic; }

/* Old way → new way contrast */
.story-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 18px;
  margin-top: 52px;
}
.sc-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}
.sc-before { border-top: 2px solid rgba(239,68,68,0.5); }
.sc-after  { border-top: 2px solid var(--brand); background: linear-gradient(180deg, rgba(16,185,129,0.05) 0%, var(--bg-card) 60%); }
.sc-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.sc-before .sc-tag { color: #f87171; }
.sc-after  .sc-tag { color: var(--brand); }
.sc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sc-list li {
  position: relative;
  padding-left: 26px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.sc-list li::before {
  position: absolute;
  left: 0; top: 0;
  width: 17px; height: 17px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  line-height: 1;
}
.sc-before .sc-list li::before { content: '✕'; background: rgba(239,68,68,0.12); color: #f87171; }
.sc-after  .sc-list li::before { content: '✓'; background: rgba(16,185,129,0.14); color: var(--brand); }
.sc-after .sc-list li { color: var(--text); }
.sc-arrow {
  display: flex; align-items: center; justify-content: center;
  color: var(--subtle);
}
.sc-arrow svg { width: 26px; height: 26px; }

/* Editorial pull-quote */
.story-quote {
  position: relative;
  margin: 48px auto 0;
  max-width: 760px;
  padding: 6px 0 6px 30px;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text);
  font-style: italic;
}
.story-quote::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), rgba(16,185,129,0.1));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.story-quote.animate-in::before { transform: scaleY(1); }

/* Web-push opt-in button */
.push-btn {
  margin-top: 16px;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font); font-size: 12.5px; font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border-hi);
  border-radius: 9px; padding: 9px 16px; cursor: pointer;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.push-btn:hover { color: var(--text); border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.06); }
.push-btn--on { color: var(--brand); border-color: rgba(16,185,129,0.4); cursor: default; }

/* ── ARTICLE CARDS (Latest Analysis + Market Intel) ──────────── */
.art-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}
.art-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.art-card:hover {
  border-color: rgba(16,185,129,0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.ac-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0c0c12;
}
.ac-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.art-card:hover .ac-thumb img { transform: scale(1.04); }
.ac-thumb-label { display: none; }
.ac-thumb-chart {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}
/* Fallback when there's no image: editorial gradient + the ticker/kicker */
.ac-thumb--fb {
  background: linear-gradient(135deg, #0a1a14 0%, #0d2137 55%, #0e3a2f 100%);
  color: #10b981;
}
.ac-thumb--fb[data-fb-cat="essay"] {
  background: linear-gradient(135deg, #0d1f3c 0%, #1a3a5c 55%, #0f4c75 100%);
  color: #60a5fa;
}
.ac-thumb--fb[data-fb-cat="crypto"] {
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1b69 55%, #4c1d95 100%);
  color: #a78bfa;
}
.ac-thumb--fb[data-fb-cat="macro"] {
  background: linear-gradient(135deg, #1a0f00 0%, #3d2200 55%, #5c3300 100%);
  color: #f59e0b;
}
.ac-thumb--fb::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 46px);
  z-index: 0;
}
.ac-thumb--fb .ac-thumb-label {
  display: flex; align-items: center; justify-content: center;
  position: absolute; inset: 0;
  font-family: var(--mono); font-size: 26px; font-weight: 900; letter-spacing: 0.06em;
  color: currentColor; opacity: 0.18;
  z-index: 2;
}
.ac-body { display: flex; flex-direction: column; gap: 8px; padding: 15px 16px 16px; flex: 1; }
.ac-tags { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ac-kicker { font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--brand); }
.ac-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--text); line-height: 1.3; margin: 0;
}
.ac-excerpt { font-size: 12.5px; line-height: 1.55; color: var(--subtle); margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ac-rt { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.ac-rt::before { content: '◷ '; color: var(--subtle); }
.ac-date { font-family: var(--mono); font-size: 10px; color: var(--subtle); margin-left: auto; }

/* ── MARKET PULSE WIDGETS ────────────────────────────────────── */
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1000px) { .pulse-grid { grid-template-columns: repeat(2, 1fr); } }
.pulse-card {
  position: relative;
  background: linear-gradient(165deg, var(--bg-card) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-card);
  min-height: 230px;
  overflow: hidden;
}
.pulse-card::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16,185,129,0.45), transparent);
}
.pulse-skel { font-family: var(--mono); font-size: 12px; color: var(--subtle); padding: 60px 0; text-align: center; }
.pulse-card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pulse-kicker { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; color: var(--subtle); }
.pulse-live { font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--brand); display: inline-flex; align-items: center; gap: 5px; }
.pulse-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 6px var(--brand); animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.pulse-foot { font-size: 11px; line-height: 1.5; color: var(--subtle); margin: 12px 0 0; }

/* Risk gauge */
.pg-wrap { position: relative; }
.pg-svg { width: 100%; height: auto; display: block; max-width: 280px; margin: 0 auto; }
.pg-svg line { transition: opacity 0.4s ease; }
.pg-readout { text-align: center; margin-top: -14px; }
.pg-label { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: 0.02em; }
.pg-score { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 1px; }
.pg-score span { font-size: 10px; color: var(--subtle); }
.pg-inputs { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.pg-input { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; }
.pg-input-lbl { color: var(--muted); }
.pg-input-val { font-family: var(--mono); font-weight: 700; }

/* Top entry spotlight */
.ts-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 4px; }
.ts-sym { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: var(--text); }
.ts-name { font-size: 11px; color: var(--subtle); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.03em; }
.ts-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ts-price { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ts-chg { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.ts-chg.up { color: #22c55e; } .ts-chg.dn { color: #ef4444; }
.ts-score { font-family: var(--mono); font-size: 40px; font-weight: 800; line-height: 0.9; font-variant-numeric: tabular-nums; }
.ts-score span { font-size: 14px; color: var(--subtle); font-weight: 600; }
.ts-spark { width: 100%; height: 38px; margin-top: 14px; display: block; opacity: 0.85; }
.ts-cta {
  width: 100%; margin-top: 12px; padding: 10px;
  background: rgba(16,185,129,0.10); border: 1px solid rgba(16,185,129,0.28);
  border-radius: 9px; color: var(--brand); font-family: var(--font); font-size: 12px; font-weight: 700;
  letter-spacing: 0.02em; cursor: pointer; transition: background var(--t), border-color var(--t);
}
.ts-cta:hover { background: rgba(16,185,129,0.18); border-color: rgba(16,185,129,0.5); }
/* Since Last Week */
.slw-hero { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; }
.slw-num { font-family: var(--mono); font-size: 44px; font-weight: 800; line-height: 0.85; color: var(--brand); font-variant-numeric: tabular-nums; }
.slw-num-lbl { font-size: 12px; line-height: 1.25; color: var(--muted); }
.pulse-sub { font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: 0.08em; color: var(--subtle); }
.slw-list { display: flex; flex-direction: column; gap: 5px; }
.slw-row {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; gap: 8px; padding: 7px 9px;
  background: rgba(255,255,255,0.025); border: 1px solid var(--border-sub);
  border-radius: 8px; text-align: left;
}
button.slw-row { cursor: pointer; transition: border-color var(--t), background var(--t); font-family: inherit; }
button.slw-row:hover { border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.06); }
.slw-in { border-left: 2px solid var(--brand); }
.slw-sym { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--text); }
.slw-row-r { display: flex; align-items: center; gap: 9px; }
.slw-sc { font-family: var(--mono); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.slw-d { font-family: var(--mono); font-size: 10.5px; font-weight: 700; }
.slw-d.up { color: #22c55e; } .slw-d.dn { color: #ef4444; }
.slw-empty { font-size: 11.5px; color: var(--subtle); line-height: 1.5; padding: 2px 0 6px; }
.slw-moves-lbl { font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--subtle); margin: 12px 0 6px; }
.slw-cold { text-align: center; padding: 26px 8px 18px; }
.slw-cold-ic { width: 34px; height: 34px; color: var(--brand); opacity: 0.7; margin: 0 auto 12px; display: block; }
.slw-cold-t { font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.slw-cold-s { font-size: 11.5px; line-height: 1.6; color: var(--subtle); margin: 0; }

/* Check-in streak */
.strk-hero { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; }
.strk-num { font-family: var(--mono); font-size: 46px; font-weight: 800; line-height: 0.8; color: var(--brand); font-variant-numeric: tabular-nums; }
.strk-unit { font-size: 12px; line-height: 1.25; color: var(--muted); font-weight: 600; }
.strk-track { display: flex; align-items: center; gap: 0; margin: 6px 0 4px; }
.strk-pip {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-hi);
  color: #fff;
}
.strk-pip svg { width: 12px; height: 12px; }
.strk-pip.on { background: rgba(16,185,129,0.16); border-color: var(--brand); color: var(--brand); }
.strk-pip.now { box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
.strk-pip.now.on { animation: live-pulse 2s ease-in-out infinite; }
.strk-link { flex: 1; height: 2px; background: var(--border-hi); min-width: 6px; }
.strk-link { background: linear-gradient(90deg, var(--border-hi), var(--border-hi)); }

/* Market session clock */
.mclk-hero { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 14px; }
.mclk-lbl { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--subtle); }
.mclk-time { font-family: var(--mono); font-size: 38px; font-weight: 800; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.mclk-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06); overflow: hidden; }
.mclk-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand), #34d399); transition: width 0.6s ease; }
.mclk-ends { display: flex; justify-content: space-between; margin-top: 5px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; color: var(--subtle); }

@media (max-width: 720px) {
  .pulse-grid { grid-template-columns: 1fr; }
}

/* ── Editorial divider — hairline that draws in from center on scroll ── */
.edivider {
  position: relative;
  max-width: var(--maxw);
  margin: 4px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 28%, rgba(16,185,129,0.32) 50%, rgba(255,255,255,0.12) 72%, transparent 100%);
  transform: scaleX(0);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.22,1,0.36,1), opacity 0.6s ease;
}
.edivider.animate-in { transform: scaleX(1); opacity: 1; }
.edivider::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 5px; height: 5px;
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  background: var(--brand);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(16,185,129,0.6);
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1) 0.45s;
}
.edivider.animate-in::after { transform: translate(-50%, -50%) rotate(45deg) scale(1); }

@media (max-width: 860px) {
  .story-wrap { grid-template-columns: 1fr; gap: 32px; }
  .story-lead { max-width: none; }
  .story-compare { grid-template-columns: 1fr; gap: 14px; margin-top: 36px; }
  .sc-arrow { transform: rotate(90deg); padding: 2px 0; }
  .story-quote { font-size: 19px; padding-left: 20px; margin-top: 34px; }
}
.see-all {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--subtle);
  padding-bottom: 2px;
  transition: color var(--t);
  flex-shrink: 0;
  border-bottom: 1px solid transparent;
}
.see-all:hover { color: var(--brand); border-bottom-color: rgba(16,185,129,0.4); }

/* ── ANALYSIS CARDS ─────────────────────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card {
  background: linear-gradient(160deg, #111118 0%, #0c0c12 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s ease, transform 0.35s cubic-bezier(0.22,1,0.36,1), box-shadow 0.35s cubic-bezier(0.22,1,0.36,1);
}
.card:hover { border-color: rgba(16,185,129,0.22); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card-featured {
  grid-column: span 2;
  border-color: rgba(16,185,129,0.28);
  background: linear-gradient(135deg, #0b1020 0%, #0a1018 40%, #080e12 70%, #070d10 100%);
  box-shadow: var(--glow-brand), var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.card-featured::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--brand) 30%, var(--brand) 70%, transparent 100%);
  opacity: 0.5;
}
.card-featured:hover { border-color: rgba(16,185,129,0.42); box-shadow: var(--glow-brand), var(--shadow-lift); }
.card-locked { opacity: 0.68; }
.card-locked:hover { transform: none; box-shadow: var(--shadow-card); }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Category tags */
.cat-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  padding: 2px 7px;
  border-radius: 2px;
}
.cat-stocks { background: rgba(59,130,246,0.1);  color: #5b9af5; border: 1px solid rgba(59,130,246,0.18); }
.cat-crypto { background: rgba(232,151,26,0.1);  color: #e8971a; border: 1px solid rgba(232,151,26,0.18); }
.cat-sector { background: rgba(139,92,246,0.1);  color: #9b7cf7; border: 1px solid rgba(139,92,246,0.18); }

/* Score badges */
.score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  margin-left: auto;
  background: rgba(0,0,0,0.5);
  flex-shrink: 0;
}
.badge-green { border: 1px solid rgba(34,197,94,0.3);   box-shadow: 0 0 32px rgba(34,197,94,0.16),   inset 0 0 20px rgba(34,197,94,0.05); }
.badge-amber { border: 1px solid rgba(232,151,26,0.3); box-shadow: 0 0 32px rgba(232,151,26,0.16), inset 0 0 20px rgba(232,151,26,0.05); }
.badge-red   { border: 1px solid rgba(232,69,69,0.3);  box-shadow: 0 0 32px rgba(232,69,69,0.16),  inset 0 0 20px rgba(232,69,69,0.05); }
.badge-num {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-feature-settings: "tnum";
}
.badge-green .badge-num { color: var(--green); }
.badge-amber .badge-num { color: var(--amber); }
.badge-red   .badge-num { color: var(--red); }
.badge-sub { font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.12em; color: var(--subtle); margin-top: 4px; text-transform: uppercase; }

/* Score pills — text-semantic only, no background fill */
.score-pill { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 3px; margin-left: auto; }
.pill-green { color: var(--green); border: 1px solid rgba(34,197,94,0.22); background: transparent; }
.pill-amber { color: var(--amber); border: 1px solid rgba(232,151,26,0.22); background: transparent; }
.pill-red   { color: var(--red);   border: 1px solid rgba(232,69,69,0.22);  background: transparent; }

.card-signal { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.14em; }
.signal-green { color: var(--green); }
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; color: var(--text); }
.card-body { font-size: 12.5px; color: var(--muted); line-height: 1.72; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; flex-wrap: wrap; gap: 8px; }
.card-date { font-family: var(--mono); font-size: 10px; color: var(--subtle); }
.action-tag { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 2px; }
.action-buy { background: rgba(34,197,94,0.08);  color: var(--green); border: 1px solid rgba(34,197,94,0.16); }
.action-acc { background: rgba(232,151,26,0.08); color: var(--amber); border: 1px solid rgba(232,151,26,0.16); }
.lock-badge { font-size: 12px; }
.pro-badge { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--amber); margin-left: auto; letter-spacing: 0.06em; }
.unlock-link { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; color: var(--brand); transition: opacity var(--t); }
.unlock-link:hover { opacity: 0.7; }

/* ── RANKINGS TABLE ─────────────────────────────────────────────── */
/* No inner scroll: a scrollable table inside a scrollable page double-grabs
   the wheel/thumb. The table flows with the page and the column headers
   stick just below the fixed nav. `clip` (not hidden/auto) keeps the
   rounded-corner clipping without creating a scroll container, so the
   sticky headers track the page scroll. */
.table-wrap { border: 1px solid var(--border); border-radius: var(--r); overflow: clip; box-shadow: var(--shadow-card), 0 0 0 1px rgba(16,185,129,0.04); background: repeating-linear-gradient(90deg, rgba(16,185,129,0.016) 0, rgba(16,185,129,0.016) 1px, transparent 1px, transparent 120px), linear-gradient(180deg, #0e0e1c 0%, #0b0b16 100%); scrollbar-width: thin; scrollbar-color: var(--border-hi) transparent; }
.table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
.rtable { width: 100%; border-collapse: collapse; }
.rtable th {
  position: sticky;
  top: 52px; /* below the fixed nav — the wrapper no longer scrolls */
  z-index: 2;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--subtle);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  text-transform: uppercase;
}
.rtable th:nth-child(3),
.rtable th:nth-child(4),
.rtable th:nth-child(5),
.rtable th:nth-child(6) { text-align: right; }
.rtable td {
  padding: 13px 14px;
  font-size: 12px;
  border-bottom: 1px solid var(--border-sub);
  white-space: nowrap;
}
.rtable tr:last-child td { border-bottom: none; }
.rtable tbody tr { transition: background var(--t); cursor: pointer; }
.rtable tbody tr:hover td { background: rgba(16,185,129,0.04); }
.rtable tbody tr:hover td:first-child { box-shadow: inset 4px 0 0 var(--brand), inset 56px 0 0 rgba(16,185,129,0.035); }
.rtable tbody tr:hover td:last-child { box-shadow: inset -4px 0 0 rgba(16,185,129,0.55); }
.rtable tbody tr:hover .asset-icon { transform: scale(1.08); }

/* ── RANKINGS ROW HINT ───────────────────────────────────────── */
.rnk-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 10px;
  background: rgba(34,197,94,.05);
  border: 1px solid rgba(34,197,94,.15);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  animation: rnk-hint-in .4s ease both;
}
@keyframes rnk-hint-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rnk-hint-icon { color: var(--green); flex-shrink: 0; }
.rnk-hint-text { flex: 1; }

/* ── MACRO CAUTION BANNER ───────────────────────────────────────── */
.macro-caution {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 14px;
  background: rgba(245,158,11,.06);
  border: 1px solid rgba(245,158,11,.22);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  animation: rnk-hint-in .4s ease both;
}
.macro-caution-icon { color: #f59e0b; flex-shrink: 0; }
.macro-caution-text strong { color: var(--text); }
.rnk-hint-text strong { color: var(--text); }
.rnk-hint-close {
  background: none;
  border: none;
  color: var(--subtle);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
  transition: color var(--t);
}
.rnk-hint-close:hover { color: var(--muted); }
.table-loading-cell {
  padding: 40px !important;
  text-align: center;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.td-rank { font-family: var(--mono); font-size: 11px; color: var(--subtle); width: 32px; font-weight: 500; }
.asset-cell { display: flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; cursor: pointer; }
.asset-cell .asset-symbol { transition: color var(--t); }
.asset-cell:hover .asset-symbol { color: var(--brand); }
.asset-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
  font-family: var(--mono);
  transition: transform var(--t);
  overflow: hidden;
}
.asset-logo { width: 22px; height: 22px; object-fit: contain; display: block; }
.asset-logo-fb { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.asset-symbol   { font-family: var(--mono); font-weight: 700; font-size: 13px; display: block; letter-spacing: 0.02em; }
.asset-name-sm  { font-size: 10px; color: var(--subtle); display: block; margin-top: 1px; }
.td-price { font-family: var(--mono); font-size: 12px; font-weight: 500; text-align: right; white-space: nowrap; }
.td-ext-price {
  display: block; font-size: 10px; margin-top: 3px; white-space: nowrap;
  font-family: var(--mono); font-weight: 600;
}
.td-ext-price .ext-badge {
  font-size: 8.5px; font-weight: 700; letter-spacing: 0.05em; padding: 1px 4px;
  border-radius: 3px; background: rgba(148,163,184,0.16); color: var(--subtle); margin-right: 3px;
}
.td-ext-price.ext-up   { color: var(--green); }
.td-ext-price.ext-down { color: var(--red); }
.td-up    { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--green); text-align: right; }
.td-down  { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--red);   text-align: right; }
.td-score { font-family: var(--mono); font-size: 12px; font-weight: 700; text-align: right; }
.td-score.sc-high { color: var(--green); text-shadow: 0 0 18px rgba(34,197,94,0.65); }
.td-score.sc-mid  { color: var(--amber); text-shadow: 0 0 12px rgba(232,151,26,0.45); }
.td-score.sc-low  { color: var(--red);   text-shadow: 0 0 16px rgba(232,69,69,0.55); }
.td-signal { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }
.sig-pill        { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 3px; white-space: nowrap; }
.sig-strong-buy  { color: #052e16; background: #22c55e; border: 1px solid #16a34a; animation: sig-pulse 2.4s ease-out infinite; }
@keyframes sig-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.sig-green       { color: var(--green); background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.30); }
.sig-amber       { color: var(--amber); background: rgba(232,151,26,0.10); border: 1px solid rgba(232,151,26,0.28); }
.sig-hold        { color: #94a3b8;      background: rgba(148,163,184,0.08); border: 1px solid rgba(148,163,184,0.20); }
.sig-teal        { color: #2dd4bf;      background: rgba(45,212,191,0.10); border: 1px solid rgba(45,212,191,0.28); }
.sig-extended    { color: #f97316;      background: rgba(249,115,22,0.10); border: 1px solid rgba(249,115,22,0.28); }
.sig-red         { color: var(--red);   background: rgba(232,69,69,0.10);  border: 1px solid rgba(232,69,69,0.28); }
/* ROTATE — blue, used for bond/treasury ETFs in flight-to-safety context */
.sig-blue        { color: #60a5fa;      background: rgba(59,130,246,0.10); border: 1px solid rgba(59,130,246,0.28); }
.rtable td:nth-child(3),
.rtable td:nth-child(4),
.rtable td:nth-child(5),
.rtable td:nth-child(6) { text-align: right; }
.rtable td .score-pill { margin-left: auto; display: block; width: fit-content; }

/* ── ARCHIVE LIST ───────────────────────────────────────────────── */
.archive-list { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-card); }
.archive-more-wrap { display: flex; justify-content: center; margin-top: 18px; }
.archive-more-wrap:empty { margin-top: 0; }
.archive-more-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: 10px;
  padding: 11px 26px;
  cursor: pointer;
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.archive-more-btn:hover {
  border-color: rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.06);
  transform: translateY(-1px);
}
.archive-more-btn .amb-count {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--subtle);
  text-transform: uppercase;
}
.archive-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-sub);
  transition: background var(--t), box-shadow var(--t);
}
.archive-row:last-child { border-bottom: none; }
.archive-row[data-artid] { cursor: pointer; }
.archive-row:hover { background: var(--bg-hover); box-shadow: inset 3px 0 0 var(--brand); }
.locked-row { opacity: 0.6; }
.archive-row-meta { display: flex; align-items: center; gap: 8px; }
.archive-title  { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.4; }
.archive-excerpt { font-size: 11px; color: var(--subtle); line-height: 1.5; margin: 0; }
.archive-row-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.archive-date   { font-family: var(--mono); font-size: 10px; color: var(--subtle); margin-left: auto; }
.archive-read-cta {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.15s;
}
.archive-row:hover .archive-read-cta { opacity: 1; }

.arc-ticker {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--bg-elevated);
  color: var(--muted);
  border: 1px solid var(--border-hi);
}
.arc-conviction {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand);
}

/* ── Article reader panel ──────────────────────────────────────── */
.artread {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 900;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.artread.artread--open { transform: translateX(0); }
.artread-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5,5,14,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-sub);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  height: 52px;
}
.artread-back {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--subtle);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.15s;
}
.artread-back:hover { color: var(--brand); }
.artread-breadcrumb {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.14);
  text-transform: uppercase;
}
.artread-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 28px 120px;
}
.art-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.art-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
  letter-spacing: 0.06em;
}
.art-headline {
  font-size: clamp(24px, 4.5vw, 40px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 28px;
}
.art-byline {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--border-sub);
  border-bottom: 1px solid var(--border-sub);
  margin-bottom: 44px;
}
.art-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 52px;
}
.art-score-num {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.art-score-lbl {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--subtle);
  text-transform: uppercase;
}
.art-byline-div {
  width: 1px;
  height: 36px;
  background: var(--border-sub);
  flex-shrink: 0;
}
.art-signal-block { display: flex; flex-direction: column; gap: 5px; }
.art-signal-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--subtle);
  text-transform: uppercase;
}
.art-signal-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.art-author {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--subtle);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.art-read-time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.06em;
}
.art-hero {
  margin: 4px 0 34px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}
.art-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.art-hero figcaption {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--subtle);
  padding: 8px 14px;
  border-top: 1px solid var(--border-sub);
}
.art-text p {
  font-size: 17px;
  line-height: 1.82;
  color: rgba(255,255,255,0.8);
  margin: 0 0 26px;
}
.art-text p:last-child { margin-bottom: 0; }
.art-text .art-h {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800; letter-spacing: -0.01em;
  color: #fff; margin: 36px 0 14px; line-height: 1.25;
}
.art-text .art-h4 {
  font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--brand); text-transform: uppercase; margin: 28px 0 10px;
}
.art-text .art-ul, .art-text .art-ol { margin: 0 0 26px; padding-left: 22px; }
.art-text .art-ul li, .art-text .art-ol li {
  font-size: 16px; line-height: 1.7; color: rgba(255,255,255,0.8); margin-bottom: 9px;
}
.art-text .art-ul li::marker { color: var(--brand); }
.art-text .art-quote {
  margin: 28px 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--brand);
  font-size: 20px; font-style: italic; font-weight: 600;
  line-height: 1.45; color: #fff; letter-spacing: -0.01em;
}
.art-text .art-hr { border: none; border-top: 1px solid rgba(255,255,255,0.12); margin: 36px 0; }
.art-text strong { color: #fff; font-weight: 700; }
.art-text em { font-style: italic; }
.art-text code { font-family: var(--mono); font-size: 0.88em; background: rgba(255,255,255,0.08); padding: 1px 6px; border-radius: 4px; }
.art-text a { color: var(--brand); text-decoration: underline; }
.art-text .art-table-wrap { margin: 0 0 26px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.art-text .art-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.art-text .art-table th, .art-text .art-table td {
  padding: 10px 14px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.art-text .art-table th {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--border-hi);
  white-space: normal; vertical-align: bottom; min-width: 64px;
}
.art-text .art-table td { color: var(--text); font-variant-numeric: tabular-nums; }
.art-text .art-table tr:last-child td { border-bottom: none; }

/* ── GLOSSARY TERMS — tap-to-explain jargon (VIX, regime, buy line…) ── */
.gloss-term {
  font: inherit; color: inherit; background: none; padding: 0; margin: 0;
  border: none; border-bottom: 1px dotted var(--brand);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.gloss-term:hover, .gloss-term:focus-visible { border-bottom-style: solid; outline: none; }

.gloss-pop {
  position: fixed;
  /* Above .artread (z-index: 900) — the full-screen article reader — since
     these terms mainly appear inside it. Below toast/modal z-indices
     (9000+), which should still win if one happens to be open. */
  z-index: 950;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  box-shadow: var(--shadow-lift);
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.5;
  font-style: normal;
  font-weight: 400;
  color: var(--text);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--t-fast), transform var(--t-fast);
  pointer-events: none;
}
.gloss-pop--in { opacity: 1; transform: translateY(0); pointer-events: auto; }
.gloss-pop::before {
  content: '';
  position: absolute;
  left: var(--gloss-arrow-x, 20px);
  width: 9px; height: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hi);
  transform: translateX(-50%) rotate(45deg);
}
.gloss-pop--below::before { top: -5px; border-right: none; border-bottom: none; }
.gloss-pop--above::before { bottom: -5px; border-left: none; border-top: none; }
.artread-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.artread-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand) 0%, #34d399 100%);
  border-radius: 0 2px 2px 0;
  transition: width 0.12s linear;
}
@media (max-width: 600px) {
  .artread-body { padding: 40px 20px 80px; }
  .art-byline { flex-wrap: wrap; gap: 14px; }
  .art-read-time { margin-left: 0; }
}

/* ── FRAMEWORK (legacy table — kept for fallback) ───────────────── */
.fw-table { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-card); }
.fw-head {
  display: grid; grid-template-columns: 230px 1fr 1fr;
  padding: 10px 18px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.12em; color: var(--subtle); text-transform: uppercase;
}
.fw-row {
  display: grid; grid-template-columns: 230px 1fr 1fr;
  border-bottom: 1px solid var(--border-sub);
  transition: background var(--t);
}
.fw-row:last-child { border-bottom: none; }
.fw-row:hover { background: var(--bg-hover); }
.fw-sector, .fw-thesis, .fw-assets { padding: 16px 18px; }
.fw-sector { border-right: 1px solid var(--border-sub); display: flex; align-items: flex-start; gap: 10px; }
.fw-thesis { border-right: 1px solid var(--border-sub); font-size: 12px; color: var(--muted); line-height: 1.65; font-style: italic; }
.fw-icon   { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.fw-sname  { font-size: 12px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.fw-alloc  { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--brand); }
.fw-assets { display: flex; flex-direction: column; gap: 9px; }
.asset-row { display: flex; align-items: flex-start; gap: 8px; }
.ticker-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  color: var(--brand); background: var(--brand-dim);
  border: 1px solid rgba(16,185,129,0.14);
  padding: 1px 6px; border-radius: 2px; flex-shrink: 0; letter-spacing: 0.02em;
}
.asset-desc { font-size: 11px; color: var(--muted); line-height: 1.5; }

/* ── SUBSCRIBE CTA ──────────────────────────────────────────────── */
.sub-cta {
  padding: 76px 0;
  text-align: center;
  border-top: 1px solid var(--border-sub);
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
  position: relative;
  overflow: hidden;
}
.sub-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 300px;
  background: radial-gradient(ellipse at center top, rgba(16,185,129,0.14) 0%, transparent 60%);
  pointer-events: none;
}
.cta-pre { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--brand); margin-bottom: 16px; text-transform: uppercase; opacity: 0.8; }
.cta-title { font-size: clamp(22px, 3vw, 38px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.18; max-width: 560px; margin: 0 auto 18px; }
.cta-sub { font-size: 14px; line-height: 1.7; color: var(--muted); max-width: 460px; margin: 0 auto 28px; }
.sub-form { display: flex; gap: 8px; max-width: 380px; margin: 0 auto; }
.email-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-sm);
  padding: 9px 14px;
  color: var(--text); font-size: 13px; outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.email-input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(16,185,129,0.1); }
.email-input::placeholder { color: var(--subtle); }
.sub-msg { margin-top: 12px; font-family: var(--mono); font-size: 11px; color: var(--brand); min-height: 18px; }

.chart-wrap { width: 100%; height: 520px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-card); }

/* ── INDEXES & GOLD ─────────────────────────────────────────────── */
.idx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.idx-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 7px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-slow), box-shadow var(--t-slow), border-color var(--t);
}
.idx-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 3px; height: 100%;
  background: var(--card-accent, var(--brand));
  opacity: 0.55;
  transition: opacity var(--t), width var(--t);
}
.idx-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--border-hi); }
.idx-card:hover::before { opacity: 1; width: 4px; }
.idx-icon   { font-size: 20px; }
.idx-sym    { font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.idx-name   { font-size: 10px; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.09em; font-family: var(--mono); }
.idx-score  { margin: 3px 0; }
.idx-why    { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 4px 0 6px; flex: 1; }
.idx-signal { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; }

/* ── NEWS LAYOUT ────────────────────────────────────────────────── */
.news-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
/* ── NEWS TERMINAL ──────────────────────────────────────────────── */
.news-terminal {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  background: linear-gradient(160deg, #111120 0%, #0d0d1a 100%);
  box-shadow: var(--shadow-card);
}
.news-terminal-loader { padding: 20px 14px; font-family: var(--mono); font-size: 11px; color: var(--subtle); }
.nt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.nt-date {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}
.nt-live {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 5px;
}
.nt-live::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 6px var(--brand);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.nt-scroll { max-height: 460px; overflow-y: auto; }
.nt-scroll::-webkit-scrollbar { width: 3px; }
.nt-scroll::-webkit-scrollbar-track { background: transparent; }
.nt-scroll::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 2px; }
.nt-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-sub);
  text-decoration: none;
  transition: background 0.12s, border-left-color 0.12s;
  border-left: 2px solid transparent;
}
.nt-item:last-child { border-bottom: none; }
.nt-item:hover { background: var(--bg-hover); border-left-color: var(--brand); }
.nt-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}
.nt-item:hover .nt-title { color: #fff; }
.nt-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nt-source { font-family: var(--mono); font-size: 9.5px; color: var(--subtle); letter-spacing: 0.03em; }
.nt-time   { font-family: var(--mono); font-size: 9.5px; color: var(--subtle); }

/* ── ECONOMIC CALENDAR ──────────────────────────────────────────── */
.cal-table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.cal-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cal-table thead tr { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.cal-table th {
  padding: 9px 12px;
  text-align: left;
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: 0.12em; color: var(--subtle); white-space: nowrap; text-transform: uppercase;
}
.cal-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-sub); color: var(--muted); vertical-align: middle; }
.cal-table tbody tr:last-child td { border-bottom: none; }
.cal-table tbody tr { transition: background var(--t); }
.cal-table tbody tr:hover { background: var(--bg-hover); }
.cal-event-name { color: var(--text); font-weight: 500; font-size: 12px; }
.cal-cur  { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--brand); }
.cal-impact-high {
  display: inline-block; padding: 1px 6px; border-radius: 2px;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  background: rgba(232,69,69,0.1); color: var(--red); border: 1px solid rgba(232,69,69,0.18);
}
.cal-impact-medium {
  display: inline-block; padding: 1px 6px; border-radius: 2px;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  background: rgba(232,151,26,0.1); color: var(--amber); border: 1px solid rgba(232,151,26,0.18);
}
.cal-loading { text-align: center; padding: 36px; color: var(--subtle); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }
.cal-date { font-family: var(--mono); font-size: 10px; white-space: nowrap; }
.cal-time { font-family: var(--mono); font-size: 10px; color: var(--subtle); white-space: nowrap; }
.cal-bias {
  display: inline-block; padding: 1px 6px; border-radius: 2px;
  font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.07em;
  white-space: nowrap;
}
.bias-bull { background: rgba(34,197,94,0.1);  color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.bias-bear { background: rgba(232,69,69,0.1);   color: var(--red);   border: 1px solid rgba(232,69,69,0.2); }
.bias-neu  { background: rgba(99,102,241,0.08); color: #818cf8;      border: 1px solid rgba(99,102,241,0.18); }
.cal-actual { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--text); }
/* ── Insider Trades table ─────────────────────────────────────────────── */
.it-table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.it-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.it-table thead tr { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.it-table th { padding: 10px 12px; text-align: left; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; color: var(--subtle); white-space: nowrap; }
.it-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-sub); color: var(--muted); vertical-align: middle; white-space: nowrap; }
.it-table tbody tr:last-child td { border-bottom: none; }
.it-table tbody tr { transition: background var(--t); }
.it-table tbody tr { transition: background var(--t); }
.it-table tbody tr:hover { background: var(--bg-hover); }
.it-ticker { font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--brand); text-decoration: none; }
.it-ticker:hover { text-decoration: underline; }
.it-name-link { color: var(--text); text-decoration: none; transition: color var(--t); }
.it-name-link:hover { color: var(--brand); }
.it-date { font-family: var(--mono); font-size: 10px; color: var(--subtle); }
.it-role { font-size: 11px; color: var(--subtle); max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.it-shares { font-family: var(--mono); font-size: 11px; }
.it-value  { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--text); }
.it-type { display: inline-block; padding: 2px 7px; border-radius: 3px; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.07em; white-space: nowrap; }
.it-buy  { background: rgba(34,197,94,0.1);  color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.it-sale { background: rgba(232,69,69,0.1);  color: var(--red);   border: 1px solid rgba(232,69,69,0.2); }
@media (max-width: 600px) {
  .it-table th:nth-child(3), .it-table td:nth-child(3),
  .it-table th:nth-child(4), .it-table td:nth-child(4) { display: none; }
  /* Institutional Ownership has a different column order — hide VALUE/REPORTED instead */
  .it-table--inst th:nth-child(3), .it-table--inst td:nth-child(3) { display: table-cell; }
  .it-table--inst th:nth-child(4), .it-table--inst td:nth-child(4) { display: none; }
  .it-table--inst th:nth-child(6), .it-table--inst td:nth-child(6) { display: none; }
  /* Congress Trades: DATE(1) TICKER(3) AMOUNT(5) least essential on a phone —
     keep POLITICIAN, TYPE, RETURN SINCE, SCORE TODAY visible. */
  .it-table--pt th:nth-child(1), .it-table--pt td:nth-child(1),
  .it-table--pt th:nth-child(3), .it-table--pt td:nth-child(3),
  .it-table--pt th:nth-child(5), .it-table--pt td:nth-child(5) { display: none; }
  /* Reddit Buzz: RANK(1) and UPVOTES(5) least essential on a phone —
     keep TICKER, MENTIONS, VS YESTERDAY, SCORE TODAY visible. */
  .it-table--rb th:nth-child(1), .it-table--rb td:nth-child(1),
  .it-table--rb th:nth-child(5), .it-table--rb td:nth-child(5) { display: none; }
}

/* ── CONGRESS TRADES ──────────────────────────────────────────────
   Stat strip + search/filter above the table, party-colored politician
   name, source-computed return-since-trade, and our own live score
   badge for any ticker we already track — the whole point of the
   section: not just "here's a list," but "here's what it's worth now." */
.pt-stats {
  display: flex; flex-wrap: wrap; gap: 24px;
  padding: 16px 20px; margin-bottom: 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r);
}
.pt-stat { display: flex; flex-direction: column; gap: 2px; }
.pt-stat-num { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--text); }
.pt-stat-lbl { font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: 0.08em; color: var(--subtle); text-transform: uppercase; }
.pt-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.pt-search {
  flex: 1; min-width: 200px;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 9px 13px; font-size: 13px; color: var(--text); font-family: var(--font);
}
.pt-search:focus { outline: none; border-color: var(--brand); }
.pt-filters { display: flex; gap: 6px; }
.pt-filter {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 8px 14px; font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--muted); cursor: pointer; transition: all var(--t);
}
.pt-filter:hover { color: var(--text); border-color: var(--border-hi); }
.pt-filter--active { color: var(--brand); border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.06); }
.pt-politician { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.pt-party-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pt-party-D { background: #3b82f6; }
.pt-party-R { background: #ef4444; }
.pt-party-I, .pt-party-other { background: var(--subtle); }
.pt-late { font-family: var(--mono); font-size: 8px; color: var(--amber); border: 1px solid rgba(232,151,26,0.3); border-radius: 3px; padding: 0 4px; margin-left: 5px; }
.pt-ret { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.pt-ret--up { color: var(--green); }
.pt-ret--down { color: var(--red); }
.it-table--pt td .score-pill { display: inline-block; }
.pt-empty { text-align: center; color: var(--subtle); padding: 28px 12px !important; }

/* ── REDDIT BUZZ (shares pt-*/it-* table styling) ───────────────── */
.rb-rank { font-family: var(--mono); font-size: 11px; color: var(--subtle); }
.rb-name { color: var(--subtle); font-size: 11px; margin-left: 6px; }
.rb-new { font-family: var(--mono); font-size: 9px; font-weight: 700; color: var(--amber); border: 1px solid rgba(232,151,26,0.3); border-radius: 3px; padding: 1px 5px; }
.it-table--rb td .score-pill { display: inline-block; }

/* ── TOOL CARDS ─────────────────────────────────────────────────── */
.tool-card {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
}
.tool-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(16,185,129,0.28) 40%, rgba(16,185,129,0.28) 60%, transparent 95%);
}
.tool-left {
  padding: 26px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
}
.tool-right { padding: 26px; display: flex; flex-direction: column; overflow: hidden; }

#analyzerForm { display: flex; flex-direction: column; gap: 16px; height: 100%; }
#calcForm     { display: flex; flex-direction: column; gap: 14px; }

.quick-row, .mode-section { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.field-label {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.12em; color: var(--subtle); white-space: nowrap;
  padding-top: 3px; flex-shrink: 0; text-transform: uppercase;
}
.quick-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  background: var(--bg); border: 1px solid var(--border-hi);
  color: var(--muted); font-family: var(--mono); font-size: 10px;
  font-weight: 700; letter-spacing: 0.04em; padding: 3px 10px;
  border-radius: var(--r-sm); cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t), transform var(--t-fast);
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-dim); transform: translateY(-1px); }
.chip:active { transform: translateY(0); }
.ticker-input {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-hi);
  border-radius: var(--r-sm); padding: 11px 13px;
  color: var(--text); font-family: var(--mono); font-size: 18px;
  font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  outline: none; transition: border-color var(--t), box-shadow var(--t);
}
.ticker-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.ticker-input::placeholder { font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--subtle); }
.mode-section { flex-direction: column; gap: 8px; }
.mode-opts { display: flex; gap: 5px; flex-wrap: wrap; }
.mode-opt {
  display: flex; align-items: center; cursor: pointer;
  padding: 6px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--border-hi); background: var(--bg);
  font-size: 11px; font-weight: 600; color: var(--muted);
  transition: border-color var(--t), color var(--t), background var(--t), transform var(--t-fast);
  user-select: none;
}
.mode-opt input[type="radio"] { display: none; }
.mode-opt.active,
.mode-opt:has(input:checked) { border-color: var(--brand); color: var(--brand); background: var(--brand-dim); }
.mode-opt:hover:not(.active):not(:has(input:checked)) { border-color: var(--border-hi); color: var(--text); transform: translateY(-1px); }

/* Result pane */
.result-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; min-height: 200px; gap: 10px;
  color: var(--subtle); font-family: var(--mono); font-size: 11px;
  text-align: center; letter-spacing: 0.06em;
}
.result-icon { font-size: 26px; display: block; opacity: 0.35; }
.analyzer-lock-overlay { display: flex; align-items: center; justify-content: center; }
.lock-gate { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 28px 20px; max-width: 300px; }
.lock-icon  { font-size: 30px; color: var(--brand); display: block; }
.lock-title { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--brand); }
.lock-desc  { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0; }
.result-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; min-height: 200px; gap: 12px;
  color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
}
.spinner { width: 18px; height: 18px; border: 1.5px solid var(--border-hi); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.result-ticker { font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: 0.02em; }
.result-mode {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--brand); background: var(--brand-dim);
  border: 1px solid rgba(16,185,129,0.14); padding: 2px 8px; border-radius: 2px;
}
.result-body { font-size: 12px; line-height: 1.72; color: var(--muted); overflow-y: auto; max-height: 400px; }
.result-body strong { color: var(--text); font-weight: 600; }

/* Calculator form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fg { display: flex; flex-direction: column; gap: 5px; }
.fg-full { grid-column: span 2; }
.form-input {
  background: var(--bg-input); border: 1px solid var(--border-hi); border-radius: var(--r-sm);
  padding: 9px 12px; color: var(--text); font-size: 13px; outline: none;
  transition: border-color var(--t), box-shadow var(--t); width: 100%; font-family: var(--font);
}
.form-input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(16,185,129,0.1); }
.form-input::placeholder { color: var(--subtle); }
.form-select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%234d4d65' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.form-select option { background: #0d0d1a; color: var(--text); }

/* Score display */
.score-display { width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; }
.score-circle {
  width: 96px; height: 96px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 0 auto 13px; border: 2px solid;
  box-shadow: 0 0 22px rgba(0,0,0,0.5);
}
.score-circle-num { font-family: var(--mono); font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.score-circle-sub { font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.1em; color: var(--subtle); margin-top: 3px; text-transform: uppercase; }
.score-signal { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; margin-bottom: 5px; text-transform: uppercase; }
.score-sub-text { font-size: 11px; color: var(--muted); margin-bottom: 18px; text-align: center; line-height: 1.5; }
.breakdown-list { display: flex; flex-direction: column; gap: 9px; text-align: left; width: 100%; }
.breakdown-item { display: flex; align-items: center; gap: 8px; }
.bd-label { font-family: var(--mono); font-size: 9px; color: var(--subtle); width: 90px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.bd-track { flex: 1; height: 3px; background: var(--border-hi); border-radius: 2px; overflow: hidden; }
.bd-fill  { height: 100%; border-radius: 2px; width: 0; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.bd-val   { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--muted); width: 46px; text-align: right; flex-shrink: 0; }

/* ── FOOTER ─────────────────────────────────────────────────────── */
.footer { padding: 48px 0 40px; border-top: 1px solid var(--border); }
.footer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; flex-wrap: wrap; gap: 14px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.09em; color: var(--subtle); transition: color var(--t); }
.footer-nav a:hover { color: var(--muted); }
.footer-copy { font-family: var(--mono); font-size: 10px; color: var(--subtle); margin-bottom: 48px; letter-spacing: 0.04em; }
.plans-wrap { margin-top: 0; }
.plans-title { font-size: 20px; font-weight: 700; letter-spacing: -0.025em; margin: 7px 0 22px; }
.plans-grid { display: grid; grid-template-columns: 280px 280px; gap: 14px; justify-content: start; }
.plan-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 24px; display: flex; flex-direction: column;
  position: relative; box-shadow: var(--shadow-card);
  transition: transform var(--t-slow), box-shadow var(--t-slow);
}
.plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.plan-pro { border-color: rgba(232,151,26,0.22); }
.plan-pro:hover { box-shadow: 0 4px 16px rgba(232,151,26,0.1), var(--shadow-lift); }
.plan-badge-top {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.1em;
  background: var(--amber); color: #000; padding: 2px 10px; border-radius: 0 0 3px 3px;
}
.plan-name   { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--subtle); margin-bottom: 9px; text-transform: uppercase; }
.plan-price  { font-family: var(--mono); font-size: 32px; font-weight: 700; line-height: 1; margin-bottom: 3px; letter-spacing: -0.02em; }
.plan-price span { font-size: 14px; color: var(--muted); font-weight: 400; }
.plan-period { font-family: var(--mono); font-size: 10px; color: var(--subtle); margin-bottom: 18px; letter-spacing: 0.04em; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; flex: 1; }
.plan-features li { font-size: 12px; color: var(--muted); }

/* ── SCROLLBAR ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(16,185,129,0.2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(16,185,129,0.38); }

/* ── PORTFOLIO ALLOCATION BAR ───────────────────────────────────── */
.alloc-bar-wrap { margin-bottom: 26px; }
.alloc-bar { display: flex; height: 50px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); }
.alloc-seg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: filter var(--t); }
.alloc-seg:hover { filter: brightness(1.12); }
.alloc-seg-icon  { font-size: 11px; line-height: 1; }
.alloc-seg-label { font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.08em; }
.alloc-seg-pct   { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.alloc-bar-note  { font-family: var(--mono); font-size: 9px; color: var(--subtle); text-align: right; margin-top: 6px; letter-spacing: 0.06em; }

/* ── PORTFOLIO CARDS ────────────────────────────────────────────── */
.fw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fw-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-slow), box-shadow var(--t-slow), border-color var(--t);
}
.fw-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--border-hi); }
.fw-card-accent { height: 2px; width: 100%; flex-shrink: 0; }
.fw-card-body   { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.fw-card-top    { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fw-card-meta   { display: flex; align-items: flex-start; gap: 9px; flex: 1; }
.fw-card-icon   { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.fw-card-name   { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text); }
.fw-card-alloc-wrap { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.fw-card-alloc  { font-family: var(--mono); font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.fw-card-alloc-lbl { font-family: var(--mono); font-size: 7px; font-weight: 700; letter-spacing: 0.1em; color: var(--subtle); margin-top: 3px; text-transform: uppercase; }
.fw-card-thesis { font-size: 12px; color: var(--muted); line-height: 1.65; font-style: italic; border-left: 2px solid rgba(255,255,255,0.12); padding-left: 10px; margin: 0; }
.fw-card-assets { display: flex; flex-direction: column; margin-top: 4px; }
.fw-asset {
  padding: 12px 0;
  border-top: 1px solid var(--border-sub);
}
.fw-asset:first-child { border-top: none; padding-top: 4px; }
.fw-asset-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.fw-asset-left { display: flex; align-items: baseline; gap: 9px; }
.fw-asset-sym  { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; min-width: 38px; }
.fw-asset-name { font-size: 12px; font-weight: 600; color: var(--text); }
.fw-asset-stat { font-family: var(--mono); font-size: 9px; color: var(--subtle); letter-spacing: 0.04em; white-space: nowrap; flex-shrink: 0; }
.fw-asset-why  { font-size: 11.5px; color: var(--muted); line-height: 1.65; margin: 0; }

/* ── ENTRY RISK CALCULATOR ──────────────────────────────────────── */
/* ── CALCULATOR V2 ──────────────────────────────────────────────── */
.calc-tagline {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
  line-height: 1.6;
}
.calc-wrap {
  max-width: 600px;
  margin: 0 auto;
}
.calc-search-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.calc-search-input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.calc-search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(16,185,129,0.12);
}
.calc-search-input::placeholder { color: var(--subtle); font-weight: 400; }
.calc-search-btn { height: 52px; padding: 0 24px; flex-shrink: 0; }
.calc-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.calc-chip {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.calc-chip:hover { border-color: var(--brand); color: var(--brand); background: rgba(16,185,129,0.06); }

/* autocomplete wrapper */
.calc-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.calc-input-wrap .calc-search-input { width: 100%; }

/* suggestions dropdown */
.calc-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-top: none;
  border-radius: 0 0 var(--r) var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.calc-sug-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border-sub);
}
.calc-sug-item:last-child { border-bottom: none; }
.calc-sug-item:hover,
.calc-sug-item.active { background: var(--bg-hover); }
.calc-sug-sym {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  min-width: 52px;
  letter-spacing: 0.03em;
}
.calc-sug-name { font-size: 12px; color: var(--muted); }
.calc-sug-exch { font-family: var(--mono); font-size: 10px; color: var(--subtle); margin-left: auto; }

/* loading state */
.calc-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

/* result card */
.calc-card {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-card);
  animation: fadeUpIn 0.3s ease-out;
}
@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.calc-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.calc-ticker-info { display: flex; flex-direction: column; gap: 3px; }
.calc-sym  { font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: 0.02em; color: var(--text); }
.calc-name { font-size: 12px; color: var(--muted); }
.calc-ext-num {
  font-family: var(--mono);
  font-size: clamp(44px, 8vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  text-align: center;
}
.calc-ext-label {
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-top: 6px;
}
.calc-stat-row {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 20px;
}
.calc-stat { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.calc-stat-div { width: 1px; height: 32px; background: var(--border-sub); flex-shrink: 0; }
.calc-stat-val { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); }
.calc-stat-lbl { font-size: 9px; font-weight: 600; letter-spacing: 0.08em; color: var(--subtle); text-transform: uppercase; }
.calc-verdict {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
  border-top: 1px solid var(--border-sub);
  padding-top: 14px;
}

/* ── Radial risk gauge ───────────────────────────────────────── */
.rbi-section--gauge {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 16px 20px;
}
.rg-svg { width: 100%; max-width: 200px; display: block; }
.rg-track {
  fill: none; stroke: var(--border); stroke-width: 12; stroke-linecap: round;
}
.rg-fill {
  fill: none; stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 267.04 267.04;
  stroke-dashoffset: 267.04;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.rg-center {
  display: flex; flex-direction: column; align-items: center;
  margin-top: -14px;
}
.rg-num {
  font-size: 52px; font-weight: 800; font-family: var(--font-display);
  line-height: 1; letter-spacing: -0.03em;
}
.rg-lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--subtle); margin-top: 5px; text-transform: uppercase;
}
.rg-indicators {
  display: flex; gap: 6px; margin-top: 16px;
  flex-wrap: wrap; justify-content: center;
}
.rg-ind {
  display: flex; align-items: center; gap: 3px;
  padding: 4px 10px; background: var(--bg-card);
  border: 1px solid var(--border-sub); border-radius: 999px;
  font-family: var(--mono); font-size: 10px; color: var(--subtle);
  letter-spacing: 0.04em; white-space: nowrap;
}
.rg-ind-up   { color: #22c55e; border-color: rgba(34,197,94,0.3); }
.rg-ind-down { color: #ef4444; border-color: rgba(239,68,68,0.3); }

/* ── CSS for markdown output ────────────────────────────────────── */
.md-h  { display: block; color: var(--text); font-weight: 600; margin-top: 12px; margin-bottom: 2px; }
.md-li { display: block; color: var(--muted); padding-left: 8px; }

/* ── FINANCIAL DATA TYPOGRAPHY — tnum for precision alignment ───── */
/* Tabular numerals for all data that must align in columns          */
.tick-price, .tick-up, .tick-dn,
.td-price, .td-up, .td-down, .td-score,
.hstat-num, .score-circle-num,
.badge-num, .plan-price,
.fw-card-alloc, .fw-alloc,
.idx-sym, .result-ticker {
  font-feature-settings: "tnum", "ss01";
}

/* ── CARD EDGE HIGHLIGHT — Linear-style pixel-lit top edge ──────── */
/* Adds a subtle white top hairline that reads as "lifted from canvas" */
.card {
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  border-radius: var(--r) var(--r) 0 0;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
  z-index: 1;
}

/* ── ANIMATIONS ─────────────────────────────────────────────────── */
@keyframes loading-pulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.7; }
}
.table-loading-cell, .cal-loading { animation: loading-pulse 1.8s ease-in-out infinite; }

/* ── FIGTREE — display font for all headlines ───────────────────── */
h1, h2, h3,
.hero-title, .sec-title, .cta-title, .plans-title,
.psych-title, .learn-q, .card-title, .faq-q {
  font-family: var(--font-display);
}

/* ── PAGE ROUTING — hash-based SPA navigation ──────────────────── */
[data-page] { display: none; }
[data-page].page-active {
  display: block;
  animation: pageFadeIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
}
/* Added by JS on animationend: fill-mode keeps the final keyframe applied
   forever as an identity matrix (Chrome fills even `to { transform: none }`
   as matrix(1,0,0,1,0,0)), and ANY transform/filter on the section breaks
   position:sticky for every descendant — the rankings table header,
   .pf-summary. Removing the animation once it has played restores a
   genuinely clean computed state. */
[data-page].page-active.page-settled { animation: none; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(28px) scale(0.984); filter: blur(5px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0px); }
}

/* ── CONTENT TRANSITION — wrapper fade on page switch ──────────── */
.app-content {
  transition: opacity 0.14s ease, transform 0.14s ease, filter 0.14s ease;
}
.app-content.page-transitioning {
  opacity: 0;
  transform: translateY(5px) scale(0.997);
  filter: blur(2px);
  pointer-events: none;
}
/* Nav link active state */
.nav-links a.nav-active {
  color: var(--text) !important;
}
.nav-links a.nav-active::after { transform: scaleX(1) !important; }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1380px) {
  .nav-links { gap: 7px; }
  .nav-links a { font-size: 10px; }
}
@media (max-width: 1240px) {
  .nav-links { gap: 6px; }
  .nav-links a { font-size: 9.5px; }
}
@media (max-width: 1100px) {
  .nav-links { gap: 5px; }
  .nav-links a { font-size: 9px; }
}
@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { top: 82px; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .card-featured { grid-column: span 2; }
  .tool-card { grid-template-columns: 1fr; }
  .tool-left { border-right: none; border-bottom: 1px solid var(--border); }
  .fw-head, .fw-row { grid-template-columns: 1fr; }
  .fw-sector { border-right: none; border-bottom: 1px solid var(--border-sub); }
  .fw-thesis { border-right: none; border-bottom: 1px solid var(--border-sub); }
  .fw-grid { grid-template-columns: 1fr; }
  .alloc-seg-label { display: none; }
  .plans-grid { grid-template-columns: 1fr; max-width: 320px; }
  .idx-grid { grid-template-columns: 1fr; }
  .news-layout { grid-template-columns: 1fr; }

  /* Rankings table — hide YTD only on tablet. Risk Score stays visible —
     hiding the actual score on a risk-score site was the same regression
     fixed below for phones. */
  .rtable th:nth-child(6),
  .rtable td:nth-child(6) { display: none; }
  .table-wrap { overflow-x: auto; }
}
@media (max-width: 640px) {
  .ticker-bar { display: none; }
  .hero { padding-top: 24px; padding-bottom: 40px; }
  /* Increase touch targets on tappable chips and small buttons */
  .chip { padding: 7px 14px !important; min-height: 38px; display: inline-flex; align-items: center; }
  .btn-sm { padding: 9px 18px !important; }
  .mobile-nav { top: 52px; }
  .cards-grid { grid-template-columns: 1fr; }
  .card-featured { grid-column: span 1; }
  .hero-stats { flex-direction: column; }
  .hstat-div { width: 100%; height: 1px; }
  .form-grid { grid-template-columns: 1fr; }
  .fg-full { grid-column: span 1; }
  .sub-form { flex-direction: column; }
  .sec-header { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* Rankings table on phones: a real stacked card per row, not a cramped
     table with hidden columns. Hiding columns until things "fit" was how
     Price and the Risk Score itself ended up invisible — this eliminates
     horizontal scrolling by design instead of guessing a pixel budget.
     Rank, the sparkline, YTD and 24H drop entirely (least essential; full
     breakdown incl. 24H is one tap away); Asset, Price, Score and Signal
     each get their own spot in the card. */
  .table-wrap { overflow-x: visible; }
  .rtable thead { display: none; }
  .rtable, .rtable tbody { display: block; width: 100%; }
  /* Score gets a real badge on the left — it's the entire point of the
     product, and burying it as small right-aligned text (the old layout)
     gave it no more visual weight than the price, and left every card
     reading as four unrelated text fragments pinned to its corners with
     empty space between them. The badge is a fixed 44px circle, sized to
     match the two text rows beside it, so it can span both without the
     "excess vertical whitespace" bug a past version of this hit spanning
     Asset across rows of MISMATCHED height — here every row is sized to
     the badge on purpose, not fighting it. */
  .rtable tr {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    grid-template-areas:
      "score asset   actions"
      "score price   signal";
    column-gap: 12px; row-gap: 6px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-sub);
    border-radius: var(--r);
  }
  .rtable td { display: block; padding: 0; border: none; background: transparent; }
  /* !important: ".rtable td" above has HIGHER specificity (2 selector parts)
     than a plain ".td-rank" (1 part) — it was silently winning regardless of
     source order, so rank/sparkline/YTD/24H were never actually hidden at
     all. That's what was showing as the stray boxes and leftover rank
     number in the screenshot. */
  .td-rank, .td-spark, .td-ytd, .td-chg { display: none !important; }
  .td-asset  { grid-area: asset; align-self: end; min-width: 0; }
  .td-asset .asset-cell { gap: 8px; }
  .td-asset .asset-icon { display: none; } /* redundant next to the score badge's own color */
  .td-asset .asset-symbol { font-size: 15px; }
  /* !important throughout this block: several of these properties (min-width,
     justify-content, display) have same-specificity desktop rules defined
     LATER in this file, which would otherwise silently win the cascade over
     a media query positioned earlier — exactly what caused the last two
     mobile layout bugs. Forcing these to actually apply on mobile. */
  /* border/background need !important: ".rtable td" a few lines up is a
     compound selector (class + element) with higher specificity than the
     plain ".td-score-cell" class here, so its border:none/background:
     transparent silently wins over this regardless of source order —
     the same trap called out throughout this block already. */
  .td-score-cell {
    grid-area: score; grid-row: 1 / 3; align-self: center; justify-self: center;
    min-width: 0 !important; padding: 0;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex !important; align-items: center; justify-content: center;
    border: 2px solid var(--mrow-score-color, var(--border-hi)) !important;
    background: color-mix(in srgb, var(--mrow-score-color, var(--subtle)) 14%, transparent) !important;
  }
  .td-score-cell .score-bar-wrap { display: contents; }
  .td-score-cell .score-bar-track,
  .td-score-cell .score-trend,
  .td-score-cell .score-rsi,
  .td-score-cell .earnings-warn,
  .td-score-cell .earnings-miss-warn,
  .td-score-cell .knife-warn,
  .td-score-cell .insider-warn,
  .td-score-cell .score-extra-hover { display: none !important; }
  .td-score-cell .score-num { font-family: var(--mono); font-size: 15px; font-weight: 800; }
  .td-price  { grid-area: price; align-self: start; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--muted); font-family: var(--mono); }
  .td-signal { grid-area: signal; align-self: start; justify-self: end; display: flex !important; align-items: center; justify-content: flex-end !important; }
  .td-actions {
    grid-area: actions; display: flex !important; align-items: center; justify-content: flex-end !important;
    align-self: start;
  }
  .asset-name-sm { display: inline; }
  .score-bar-track { display: none; }
  /* This badge is meant to be desktop-hover-only ("tr:hover .score-extra-hover
     { display:inline }" elsewhere) — but touch has no real hover, and iOS
     leaves elements "stuck" in a hover state after a tap, so it was showing
     up and staying visible on whichever row was last tapped. Keep it off
     entirely on mobile; nothing here depends on hover working correctly. */
  .score-extra-hover { display: none !important; }

  /* Calendar — hide BIAS + PREV columns on mobile */
  .cal-table th:nth-child(7),
  .cal-table td:nth-child(7),
  .cal-table th:nth-child(8),
  .cal-table td:nth-child(8) { display: none; }
  .cal-event-name { max-width: 140px; font-size: 10px; }

  /* Portfolio asset stat hidden on mobile */
  .fw-asset-stat { display: none; }
  .fw-asset-row  { gap: 4px; }

  /* Archive rows */
  .archive-row   { flex-wrap: wrap; gap: 4px; }
  .archive-date  { display: none; }

  /* Calc */
  .calc-search-row { gap: 6px; }
  .calc-search-btn { padding: 0 14px; font-size: 11px; }

  /* News */
  .nt-time { display: none; }
  .nt-title { font-size: 12px; }

  /* Alloc bar — just show percentages */
  .alloc-seg-icon { display: none; }
  .alloc-seg-pct  { font-size: 11px; }

  /* Rankings actions — the card layout gives this its own row, so all three
     (star / add / alert) fit now instead of hiding two of them. Slightly
     larger than desktop for touch. */
  .td-actions .wl-star,
  .td-actions .paper-add-btn,
  .td-actions .alert-bell { width: 32px !important; height: 32px !important; opacity: 0.85 !important; }
}

@media (max-width: 480px) {
  /* Hide sparkline on very small screens — tap drawer shows full chart */
  .rtable th:nth-child(3),
  .rtable td:nth-child(3) { display: none; }
  .asset-name-full { display: none; }
  .asset-name-sm   { display: inline !important; }

}

/* ── HERO ANIMATION ─────────────────────────────────────────────── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-anim-1 { animation: heroFadeUp 0.7s cubic-bezier(0.4,0,0.2,1) 0.1s both; }
.hero-anim-2 { animation: heroFadeUp 0.85s cubic-bezier(0.4,0,0.2,1) 0.3s both; }
.hero-anim-3 { animation: heroFadeUp 0.85s cubic-bezier(0.4,0,0.2,1) 0.52s both; }
.hero-anim-4 { animation: heroFadeUp 0.85s cubic-bezier(0.4,0,0.2,1) 0.74s both; }

/* Hero title — large screens get the full scale */
.hero-title { font-size: clamp(56px, 9vw, 110px); }

/* ── FEAR & GREED INDEX ─────────────────────────────────────────── */
.fng-card {
  display: flex;
  gap: 40px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
}
.fng-gauge-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.fng-svg { width: 210px; height: auto; display: block; }

/* Needle starts pointing left (extreme fear = 0). JS rotates it on scroll. */
#fngNeedle {
  transform-origin: 110px 115px;
  transform: rotate(-90deg);
  transition: transform 1.5s cubic-bezier(0.34, 1.05, 0.64, 1);
}
.fng-reading { text-align: center; }
.fng-val {
  font-family: var(--mono);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.03em;
}
.fng-cls {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 5px;
}
.fng-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.fng-cmp-header {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--subtle);
  text-transform: uppercase;
}
.fng-row { display: flex; gap: 20px; flex-wrap: wrap; }
.fng-cmp { display: flex; flex-direction: column; gap: 4px; min-width: 72px; }
.fng-cmp-val {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}
.fng-cmp-lbl {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--subtle);
  text-transform: uppercase;
}
.fng-legend { display: flex; flex-direction: column; gap: 7px; }
.fng-leg-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  color: var(--muted);
}
.fng-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .fng-card { flex-direction: column; gap: 20px; padding: 22px 20px; }
  .fng-svg  { width: 170px; }
  .fng-val  { font-size: 42px; }
  .fng-legend { display: none; }
}

/* ── MAGNIFICENT 7 ──────────────────────────────────────────────── */
.mag7-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.mag7-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--m7c, var(--brand));
  border-radius: var(--r);
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-slow), box-shadow var(--t-slow);
}
.mag7-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.mag7-sym {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--m7c, var(--brand));
  letter-spacing: 0.03em;
}
.mag7-name { font-size: 12px; font-weight: 600; color: var(--text); }
.mag7-role {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--subtle);
  text-transform: uppercase;
  margin: 5px 0 7px;
}
.mag7-why { font-size: 11.5px; color: var(--muted); line-height: 1.65; margin: 0; flex: 1; }
@media (max-width: 640px) {
  .mag7-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .mag7-grid { grid-template-columns: 1fr; }
}

/* ── DIVIDEND STARS ─────────────────────────────────────────────── */
.div-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.div-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--dv-color, var(--brand));
  border-radius: var(--r);
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-slow), box-shadow var(--t-slow), border-color var(--t);
}
.div-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--border-hi); }
.div-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.div-left { display: flex; flex-direction: column; gap: 3px; }
.div-sym {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--dv-color, var(--brand));
  letter-spacing: 0.02em;
}
.div-name { font-size: 11px; color: var(--muted); }
.div-yield {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.div-streak {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--amber);
  text-transform: uppercase;
}
.div-why { font-size: 11.5px; color: var(--muted); line-height: 1.65; margin: 0; flex: 1; }
@media (max-width: 960px) {
  .div-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .div-grid { grid-template-columns: 1fr; }
}

/* ── FUNDAMENTALS PANEL ─────────────────────────────────────────── */
.fund-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  margin-top: 10px;
}
.fund-card {
  margin-top: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 24px 18px;
  box-shadow: var(--shadow-card);
  animation: fadeUpIn 0.3s ease-out;
}
.fund-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-sub);
}
.fund-head-left { display: flex; align-items: center; gap: 10px; }
.fund-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand);
  text-transform: uppercase;
}
.fund-sector {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--subtle);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
}
.fund-rec {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.fund-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 12px;
}
.fund-metric { display: flex; flex-direction: column; gap: 4px; }
.fund-lbl {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--subtle);
  text-transform: uppercase;
}
.fund-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.fund-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-sub);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  letter-spacing: 0.04em;
}
@media (max-width: 640px) {
  .fund-grid { grid-template-columns: repeat(2, 1fr); }
  .fund-card { padding: 16px; }
}

/* ── FAIR VALUE ESTIMATOR ────────────────────────────────────── */
.rbi-fv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.rbi-fv-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.rbi-fv-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}
.rbi-fv-cur {
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.rbi-fv-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  background-image: linear-gradient(to right, var(--green) 50%, var(--border-hi) 50%);
  margin: 4px 0 6px;
}
.rbi-fv-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px rgba(34,197,94,.35);
  cursor: pointer;
  transition: box-shadow .15s;
}
.rbi-fv-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 4px rgba(34,197,94,.25);
}
.rbi-fv-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg);
  cursor: pointer;
}
.rbi-fv-minmax {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--subtle);
  margin-bottom: 12px;
}
.rbi-fv-result {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.rbi-fv-arrow {
  color: var(--subtle);
}
.rbi-fv-mult {
  font-family: var(--mono, monospace);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  min-width: 36px;
}
.rbi-fv-value {
  font-family: var(--mono, monospace);
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
}
.rbi-fv-delta {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}
.rbi-fv-delta.fv-up   { background: rgba(34,197,94,.12); color: var(--green); }
.rbi-fv-delta.fv-down { background: rgba(239,68,68,.12); color: var(--red); }
@media (max-width: 540px) {
  .rbi-fv-grid { grid-template-columns: 1fr; }
}

/* ── TECHNICAL PICTURE ───────────────────────────────────────── */
.tech-loading-wrap {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 14px 20px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg);
  font-family: var(--mono); font-size: 10px; color: var(--subtle);
}
.tech-card {
  margin-top: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  animation: fadeUp 0.3s ease both;
}
.tech-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px;
}
.tech-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  color: var(--brand); font-weight: 700;
}
.tech-badge {
  font-family: var(--mono); font-size: 8px; font-weight: 700;
  letter-spacing: 0.1em; padding: 3px 9px; border-radius: 3px;
  white-space: nowrap;
}
.tech-bull { background: rgba(34,197,94,0.10);  color: var(--green); border: 1px solid rgba(34,197,94,0.22); }
.tech-bear { background: rgba(232,69,69,0.10);  color: var(--red);   border: 1px solid rgba(232,69,69,0.22); }
.tech-neu  { background: rgba(232,151,26,0.10); color: var(--amber); border: 1px solid rgba(232,151,26,0.22); }

.tech-bars { display: flex; flex-direction: column; gap: 16px; }

.tech-row { animation: fadeUp 0.4s ease var(--delay, 0s) both; }
.tech-row-top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.tech-row-label {
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em;
  color: var(--subtle); font-weight: 600; text-transform: uppercase;
}
.tech-row-score {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
}
.tech-bar-track {
  height: 5px; background: var(--bg-hover); border-radius: 3px; overflow: hidden;
}
.tech-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 60%, transparent), var(--c));
  border-radius: 3px;
  transition: width 0.75s cubic-bezier(0.34, 1.2, 0.64, 1);
  transition-delay: var(--delay, 0s);
  box-shadow: 0 0 8px color-mix(in srgb, var(--c) 40%, transparent);
}
.tech-row-desc {
  margin-top: 5px; font-size: 10px; color: var(--subtle);
  font-family: var(--mono); letter-spacing: 0.02em;
}
.tech-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-sub);
}
.tech-verdict {
  display: flex; align-items: center; gap: 8px;
}
.tech-verdict-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.tech-bull .tech-verdict-dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.tech-bear .tech-verdict-dot { background: var(--red);   box-shadow: 0 0 8px var(--red); }
.tech-neu  .tech-verdict-dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.tech-verdict-text {
  font-size: 12px; font-weight: 600; color: var(--text); letter-spacing: 0.01em;
}
.tech-composite { display: flex; align-items: baseline; gap: 3px; }
.tech-composite-num { font-family: var(--mono); font-size: 26px; font-weight: 700; }
.tech-composite-max { font-family: var(--mono); font-size: 12px; color: var(--subtle); }

@media (max-width: 640px) {
  .tech-card { padding: 16px; }
  .tech-composite-num { font-size: 22px; }
}

/* ── ROBINHOOD-INSPIRED CALC PAGE ────────────────────────────── */
.rbi-page { margin-top: 24px; animation: fadeUpIn 0.3s ease-out; }
.rbi-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.rbi-identity { display: flex; flex-direction: column; gap: 3px; }
.rbi-ticker { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.rbi-company { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2; }

.rbi-hero { margin-bottom: 4px; }
.rbi-live-price {
  font-family: var(--mono);
  font-size: clamp(36px, 7vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 10px;
  font-feature-settings: "tnum";
}
.rbi-ext { font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.rbi-ext-sub { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--subtle); letter-spacing: 0.07em; text-transform: uppercase; margin-top: 4px; }

.rbi-section { padding: 22px 0; border-top: 1px solid var(--border-sub); }
.earn-warn-banner { display: flex; align-items: center; gap: 8px; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.35); border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #f59e0b; margin-bottom: 4px; }
.rbi-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.rbi-section-title { font-size: 17px; font-weight: 600; color: var(--text); }
.rbi-section-meta { display: flex; align-items: center; gap: 10px; }
.rbi-rec { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

.rbi-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 12px; }
.rbi-stats-wide { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.rbi-stat { display: flex; flex-direction: column; gap: 5px; }
.rbi-stat-lbl { font-size: 11px; font-weight: 500; color: var(--muted); }
.rbi-stat-val { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--text); font-feature-settings: "tnum"; display: flex; align-items: center; gap: 8px; }
.rbi-stat-read.sig-pill { font-size: 9px; padding: 1px 6px; }
.rbi-stat-hint { font-size: 11px; line-height: 1.4; color: var(--subtle); font-weight: 400; }

.rbi-about { font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 18px; max-width: 540px; }

.rbi-guide { display: flex; flex-direction: column; gap: 2px; }
.rbi-guide-row {
  display: grid;
  grid-template-columns: 68px 108px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  opacity: 0.35;
  transition: opacity 0.15s;
}
.rbi-guide-active { opacity: 1; background: var(--bg-hover); }
.rbi-guide-range { font-family: var(--mono); font-size: 11px; font-weight: 700; font-feature-settings: "tnum"; }
.rbi-gc-green { color: var(--green); }
.rbi-gc-amber { color: var(--amber); }
.rbi-gc-red   { color: var(--red); }
.rbi-guide-sig { font-size: 12px; font-weight: 600; color: var(--text); }
.rbi-guide-desc { font-size: 11px; color: var(--muted); }

.rbi-footer-note { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border-sub); font-family: var(--mono); font-size: 9px; color: var(--subtle); letter-spacing: 0.04em; }
.rbi-tech-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-sub); }

@media (max-width: 640px) {
  .rbi-stats, .rbi-stats-wide { grid-template-columns: repeat(2, 1fr); }
  .rbi-live-price { font-size: 36px; }
  .rbi-guide-desc { display: none; }
  .rbi-guide-row  { grid-template-columns: 60px 100px; }
  .rbi-company    { font-size: 18px; }
}

/* ── NEWS: FLAT ROBINHOOD STYLE ──────────────────────────────── */
.news-terminal { border: none; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.nt-header { background: transparent; border-bottom: 1px solid var(--border-sub); padding: 0 0 10px 0; }
.nt-scroll { max-height: 560px; }
.nt-item { padding: 14px 0; border-left: none; }
.nt-item:hover { background: transparent; border-left-color: transparent; }
.nt-meta { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; justify-content: flex-start; }
.nt-sep  { color: var(--border-hi); font-size: 9px; }
.nt-source { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.nt-time   { font-size: 11px; color: var(--subtle); }
.nt-title  { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.5; margin-bottom: 0; display: block; }
.nt-item:hover .nt-title { color: #fff; }

/* ── TOP MOVERS PANEL ────────────────────────────────────────── */
.movers-panel { margin-top: 20px; }
.movers-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; padding-top: 18px; border-top: 1px solid var(--border-sub); }
.movers-label { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.movers-sub   { font-family: var(--mono); font-size: 9px; color: var(--subtle); }
.movers-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.movers-col   { display: flex; flex-direction: column; gap: 1px; }
.movers-col-head { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; padding: 4px 0; margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.movers-up-head { color: var(--green); }
.movers-dn-head { color: var(--red); }
.mvr-tabs { display: flex; gap: 4px; }
.mvr-tab  { background: none; border: 1px solid var(--border-sub); border-radius: 5px; color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 8px; cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s; }
.mvr-tab:hover { border-color: var(--border-hi); color: var(--text); }
.mvr-tab--active { background: var(--brand); border-color: var(--brand); color: #000; }
.mover-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border-sub); text-decoration: none; color: inherit; border-radius: 6px; }
.mover-row:last-child { border-bottom: none; }
.mover-dot  { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; font-weight: 700; flex-shrink: 0; overflow: hidden; padding: 3px; }
.mover-logo { width: 100%; height: 100%; object-fit: contain; }
.mover-logo-fb { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.mover-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mover-sym  { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text); letter-spacing: 0.03em; }
.mover-name { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mover-right { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.mover-chg  { font-family: var(--mono); font-size: 12px; font-weight: 700; font-feature-settings: "tnum"; text-align: right; }
.mover-price { font-family: var(--mono); font-size: 10px; color: var(--muted); font-feature-settings: "tnum"; text-align: right; }
.mover-up { color: var(--green); }
.mover-dn { color: var(--red); }
.movers-empty { font-size: 11px; color: var(--subtle); padding: 8px 0; margin: 0; }


/* ── SPARKLINE CHART ─────────────────────────────────────────── */
.rbi-chart-wrap {
  position: relative;
  width: 100%;
  height: 130px;
  margin: 8px 0 0;
  overflow: hidden;
}
.rbi-sparkline {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── TIME PERIOD TABS ────────────────────────────────────────── */
.rbi-tabs {
  display: flex;
  gap: 2px;
  margin: 12px 0 0;
  border-bottom: 1px solid var(--border-sub);
  padding-bottom: 0;
}
.rbi-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 10px 8px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  margin-bottom: -1px;
}
.rbi-tab:hover { color: var(--muted); }
.rbi-tab.active { color: var(--text); border-bottom-color: var(--text); }

/* ── PRICE CHANGE ROW ────────────────────────────────────────── */
.rbi-price-change {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
}
.rbi-change-label {
  font-size: 11px;
  color: var(--subtle);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ── COMPANY INFO ROW ────────────────────────────────────────── */
.rbi-co-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-sub);
}
.rbi-co-item { display: flex; flex-direction: column; gap: 4px; }
.rbi-co-lbl  { font-size: 10px; font-weight: 500; color: var(--subtle); letter-spacing: 0.06em; text-transform: uppercase; }
.rbi-co-val  { font-size: 13px; font-weight: 600; color: var(--text); }

/* ── ANALYST RATING BARS ─────────────────────────────────────── */
.rbi-ratings { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.rbi-rating-row {
  display: grid;
  grid-template-columns: 38px 1fr 36px;
  align-items: center;
  gap: 10px;
}
.rbi-rating-lbl {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.rbi-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.rbi-bar-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.rbi-bar-buy  { background: var(--green); }
.rbi-bar-hold { background: var(--amber); }
.rbi-bar-sell { background: var(--red); }

/* ── PRICE VS. ANALYST TARGET BAR ────────────────────────────────
   Sourced consensus range, not a modeled fair value — see the comment
   above priceTargetBarHtml in app.js for why. */
.ptb-callout {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  line-height: 1.1;
}
.ptb-callout span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 3px;
}
.ptb-green { color: var(--green); }
.ptb-red   { color: var(--red); }
.ptb-amber { color: var(--amber); }
.ptb-wrap { padding: 26px 0 34px; }
.ptb-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green) 0%, var(--amber) 50%, var(--red) 100%);
  opacity: 0.28;
}
.ptb-range {
  position: absolute;
  top: -3px;
  bottom: -3px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}
.ptb-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}
.ptb-marker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-card, #14151c);
  border: 3px solid var(--text);
  margin: 0 auto;
  box-shadow: 0 0 0 3px var(--bg);
}
.ptb-marker--target .ptb-marker-dot { border-color: var(--brand); }
.ptb-marker-label {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.ptb-marker--price .ptb-marker-label { top: auto; bottom: 18px; }
.ptb-marker-label span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-top: 1px;
}
.ptb-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--subtle);
  margin-top: -18px;
}
@media (max-width: 600px) {
  .ptb-callout { font-size: 21px; }
  .ptb-marker-label { font-size: 10.5px; }
}
.rbi-rating-pct {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  font-feature-settings: "tnum";
}

/* ── ABOUT SECTION EXPANDABLE ────────────────────────────────── */
.rbi-desc-wrap { position: relative; }
.rbi-desc-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rbi-desc-text.expanded {
  display: block;
  overflow: visible;
}
.rbi-show-more {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0 0;
  display: block;
  transition: opacity var(--t);
}
.rbi-show-more:hover { opacity: 0.8; }

/* ── NEWS WITH THUMBNAIL ─────────────────────────────────────── */
.nt-item-inner {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 12px;
  align-items: center;
}
.nt-thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-card);
  flex-shrink: 0;
}

/* ── CHART LOADING STATE ─────────────────────────────────────── */
.rbi-chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--subtle);
  font-size: 12px;
}

@media (max-width: 640px) {
  .rbi-co-info { grid-template-columns: repeat(2, 1fr); }
  .rbi-tabs .rbi-tab { padding: 6px 7px 8px; font-size: 10px; }
  .rbi-chart-wrap { height: 100px; }
}

/* ── ECONOMIC CALENDAR EVENT GLOSSARY ───────────────────────── */
.cal-has-gloss { cursor: pointer; }
.cal-has-gloss:hover { background: rgba(255,255,255,0.03); }
.cal-row-open { background: rgba(16,185,129,0.05) !important; }
.cal-row-open .cal-ev-info { color: var(--brand); }

.cal-ev-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  font-size: 12px;
  color: var(--subtle);
  cursor: pointer;
  vertical-align: middle;
  transition: color 0.12s;
  user-select: none;
}

.cal-explain-row td { padding: 0 !important; }
.cal-explain-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  background: var(--bg-card);
  border-left: 3px solid var(--brand);
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), padding 0.2s ease;
}
.cal-explain-row.open .cal-explain-body {
  max-height: 400px;
  padding: 14px 16px 18px;
}
.cal-ex-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.cal-ex-what {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 8px;
}
.cal-ex-impact {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
}
.cal-ex-dir {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand);
  background: var(--brand-dim);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════
   ANIMATION SYSTEM
   ══════════════════════════════════════════════════════════════ */

/* ── Ripple ──────────────────────────────────────────────────── */
.ripple-host { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.13);
  transform: scale(0);
  pointer-events: none;
  animation: ripple-burst 0.55s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes ripple-burst {
  to { transform: scale(1); opacity: 0; }
}

/* ── Button press ────────────────────────────────────────────── */
.btn-primary:active   { transform: scale(0.96) translateY(0) !important; transition-duration: 0.08s !important; }
.btn-outline:active   { transform: scale(0.96) !important; transition-duration: 0.08s !important; }
.chip:active          { transform: scale(0.93) !important; transition-duration: 0.08s !important; }
.calc-chip:active     { transform: scale(0.93) !important; transition-duration: 0.08s !important; }
.mode-opt:active      { transform: scale(0.95) !important; transition-duration: 0.08s !important; }
.rbi-tab:active       { transform: scale(0.92) !important; transition-duration: 0.06s !important; }
.rbi-show-more:active { transform: scale(0.95) !important; }
.cal-has-gloss:active td { background: rgba(16,185,129,0.04); }

/* Add transition to chips/calc-chips so press feels snappy */
.chip      { transition: background var(--t), border-color var(--t), color var(--t), transform 0.12s cubic-bezier(0.4,0,0.2,1) !important; }
.calc-chip { transition: background var(--t), border-color var(--t), color var(--t), transform 0.12s cubic-bezier(0.4,0,0.2,1) !important; }
.mode-opt  { transition: background var(--t), border-color var(--t), color var(--t), transform 0.12s cubic-bezier(0.4,0,0.2,1) !important; }
.rbi-tab   { transition: color 0.12s, border-color 0.12s, transform 0.1s cubic-bezier(0.4,0,0.2,1) !important; }

/* ── Sliding tab indicator ───────────────────────────────────── */
.rbi-tabs { position: relative; }
.rbi-tab-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: left 0.22s cubic-bezier(0.4,0,0.2,1), width 0.22s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}

/* ── Scroll-triggered entrance ───────────────────────────────── */
.anim-ready {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1), transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.animate-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ── Staggered children ──────────────────────────────────────── */
.stagger-children > *:nth-child(1)  { transition-delay: 0.03s; }
.stagger-children > *:nth-child(2)  { transition-delay: 0.07s; }
.stagger-children > *:nth-child(3)  { transition-delay: 0.11s; }
.stagger-children > *:nth-child(4)  { transition-delay: 0.15s; }
.stagger-children > *:nth-child(5)  { transition-delay: 0.19s; }
.stagger-children > *:nth-child(6)  { transition-delay: 0.23s; }
.stagger-children > *:nth-child(7)  { transition-delay: 0.27s; }
.stagger-children > *:nth-child(8)  { transition-delay: 0.31s; }
.stagger-children > *:nth-child(9)  { transition-delay: 0.35s; }
.stagger-children > *:nth-child(10) { transition-delay: 0.39s; }
.stagger-children > *:nth-child(11) { transition-delay: 0.43s; }
.stagger-children > *:nth-child(12) { transition-delay: 0.47s; }

/* ── Calc chip selected state pop ────────────────────────────── */
.calc-chip.selected {
  border-color: var(--brand) !important;
  color: var(--brand) !important;
  background: rgba(16,185,129,0.1) !important;
  animation: chip-pop 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes chip-pop {
  0%   { transform: scale(0.9); }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ── News item hover ─────────────────────────────────────────── */
.nt-item {
  transition: background 0.15s, transform 0.15s cubic-bezier(0.4,0,0.2,1) !important;
}
.nt-item:hover {
  transform: translateX(3px) !important;
}

/* ── Calendar row click flash ────────────────────────────────── */
.cal-has-gloss {
  transition: background 0.15s;
}
.cal-row-open {
  animation: row-flash 0.3s ease-out;
}
@keyframes row-flash {
  0%   { background: rgba(16,185,129,0.12); }
  100% { background: rgba(16,185,129,0.05); }
}

/* ── Signal result entrance ──────────────────────────────────── */
.rbi-hero .rbi-live-price {
  animation: price-drop 0.4s cubic-bezier(0.34,1.4,0.64,1);
}
@keyframes price-drop {
  0%   { opacity: 0; transform: translateY(-10px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.rbi-chart-wrap {
  animation: fade-in-chart 0.5s ease-out 0.1s both;
}
@keyframes fade-in-chart {
  from { opacity: 0; transform: scaleY(0.85); transform-origin: bottom; }
  to   { opacity: 1; transform: scaleY(1); }
}
.sig-pill {
  animation: pill-pop 0.35s cubic-bezier(0.34,1.56,0.64,1) 0.15s both;
}
@keyframes pill-pop {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Analyst bar entrance (called via JS) ────────────────────── */
.rbi-bar-fill {
  transition: width 0.7s cubic-bezier(0.4,0,0.2,1) !important;
}

/* ── Mover row hover ─────────────────────────────────────────── */
.mover-row {
  transition: background 0.12s;
}
.mover-row:hover { background: var(--bg-hover, rgba(255,255,255,0.04)); }

/* ── Reduce motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── SCORE BARS (rankings table) ─────────────────────────────── */
.td-score-cell { min-width: 96px; vertical-align: middle; }
.score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}
.score-rsi {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  letter-spacing: 0.04em;
  margin-top: 3px;
  display: block;
}
.rsi-low  { color: #22c55e; }
.rsi-high { color: #ef4444; }
.score-bar-track {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.score-bar-inner {
  height: 100%;
  width: 0%;
  border-radius: 2px;
}
.score-num {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 800;
  min-width: 26px;
  text-align: right;
  font-feature-settings: "tnum";
  line-height: 1;
}

/* ── SCORE BAR — gradient fill for high scores ───────────────── */
.score-bar-inner { border-radius: 3px; transition: width 0.65s cubic-bezier(0.4,0,0.2,1); }
/* score-num tabular, tighter tracking */
.score-num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ── NUMBER ANIMATIONS ────────────────────────────────────────── */
@keyframes num-flash-up {
  0%   { color: #4ade80; text-shadow: 0 0 12px rgba(74,222,128,0.7); }
  100% { color: inherit;  text-shadow: none; }
}
@keyframes num-flash-dn {
  0%   { color: #f87171; text-shadow: 0 0 12px rgba(248,113,113,0.7); }
  100% { color: inherit;  text-shadow: none; }
}
.num-flash-up { animation: num-flash-up 0.9s ease-out forwards; }
.num-flash-dn { animation: num-flash-dn 0.9s ease-out forwards; }

/* ── CARD HOVER LIFT ──────────────────────────────────────────── */
.card, .mh-tile, .opp-card, .sig-tile, .fng-cmp {
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.card:hover       { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.06); }
.mh-tile:hover    { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.22), 0 0 0 1px rgba(16,185,129,0.18); border-color: rgba(16,185,129,0.35) !important; }

/* ── MH TILE VALUE — bigger, bolder ─────────────────────────── */
.mh-tile-val {
  font-size: 26px !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ── SCORE GLOW — stronger for 90+ ──────────────────────────── */
.td-score.sc-high { text-shadow: 0 0 20px rgba(34,197,94,0.8), 0 0 6px rgba(34,197,94,0.5); }

/* ── PRICE FLASH ─────────────────────────────────────────────── */
@keyframes flash-up {
  0%   { background: rgba(34,197,94,0.35); color: #22c55e; }
  100% { background: transparent; }
}
@keyframes flash-dn {
  0%   { background: rgba(239,68,68,0.35); color: #ef4444; }
  100% { background: transparent; }
}
.flash-up { animation: flash-up 1.1s ease-out forwards; border-radius: 3px; }
.flash-dn { animation: flash-dn 1.1s ease-out forwards; border-radius: 3px; }

/* ── RANKINGS ROW TRANSITIONS ────────────────────────────────── */
.rtable tbody tr {
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.4,0,0.2,1), background var(--t);
}

/* ── MAG7 LIVE DATA ──────────────────────────────────────────── */
.mag7-live {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 8px;
}
.mag7-price {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-feature-settings: "tnum";
}
.mag7-up { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--green); }
.mag7-dn { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--red); }

/* ── DIVIDEND LIVE DATA ──────────────────────────────────────── */
.div-live-price {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  font-feature-settings: "tnum";
}
.div-up { color: var(--green); }
.div-dn { color: var(--red); }

/* ── FRAMEWORK LIVE DATA ─────────────────────────────────────── */
.fw-live {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 6px;
}
.fw-live-price {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-feature-settings: "tnum";
}
.fw-up   { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--green); }
.fw-dn   { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--red); }

/* ── SKELETON LOADING ────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton-row td { border-bottom: 1px solid var(--border-sub) !important; }
.sk-cell { padding: 13px 14px !important; }
.sk-cell::after {
  content: '';
  display: block;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bg-alt) 0%, var(--bg-hover) 50%, var(--bg-alt) 100%);
  background-size: 600px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
.sk-rank::after  { width: 14px; }
.sk-asset::after { width: 110px; }
.sk-price::after { width: 64px; margin-left: auto; }
.sk-score::after { width: 78px; margin-left: auto; }
.sk-sig::after   { width: 44px; margin-left: auto; }
.sk-sm::after    { width: 36px; margin-left: auto; }

/* ── MARKET STATUS BADGE ─────────────────────────────────────── */
.market-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  padding: 3px 8px 3px 6px;
  border-radius: 3px;
  border: 1px solid currentColor;
  white-space: nowrap;
  flex-shrink: 0;
}
.market-status::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.ms-open   { color: var(--green); background: rgba(34,197,94,0.07);   border-color: rgba(34,197,94,0.22); }
.ms-pre    { color: var(--amber); background: rgba(232,151,26,0.07);  border-color: rgba(232,151,26,0.22); }
.ms-after  { color: var(--amber); background: rgba(232,151,26,0.07);  border-color: rgba(232,151,26,0.22); }
.ms-closed { color: var(--subtle); background: rgba(85,87,110,0.06); border-color: rgba(85,87,110,0.2); }
/* Pulse whenever trading is actually happening — open AND extended hours,
   both real trading with live data moving. Only CLOSED stays static, since
   that's the one state where a "live" pulse would be misleading. */
.ms-open::before, .ms-pre::before, .ms-after::before { animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
@media (max-width: 640px) { .market-status { display: none; } }

/* ── RANKINGS META (legend + timestamp) ─────────────────────── */
.rankings-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 2px;
  flex-wrap: wrap;
  gap: 6px;
}
.score-legend {
  display: flex;
  align-items: center;
  gap: 12px;
}
.score-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--subtle);
  text-transform: uppercase;
}
.score-legend-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sl-green { background: var(--green); }
.sl-amber { background: var(--amber); }
.sl-red   { background: var(--red); }
.rankings-ts {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  letter-spacing: 0.04em;
}

/* ── INDEX CARD PRICE ────────────────────────────────────────── */
.idx-price {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 8px 0 3px;
  font-feature-settings: "tnum";
}
.idx-chg {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
  font-feature-settings: "tnum";
}
.idx-chg-up { color: var(--green); }
.idx-chg-dn { color: var(--red); }

/* ── FOOTER DISCLAIMER ───────────────────────────────────────── */
.footer-disclaimer {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  letter-spacing: 0.03em;
  line-height: 1.7;
  border-top: 1px solid var(--border-sub);
  padding-top: 14px;
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════
   MACRO PULSE
   ══════════════════════════════════════════════════════════════ */

.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.macro-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: var(--shadow-card);
}
.macro-tile-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--subtle);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.macro-tile-sub {
  font-size: 11px;
  color: var(--subtle);
  line-height: 1.45;
  margin-bottom: 4px;
  opacity: 0.7;
}
.macro-tile-val {
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}
.macro-tile-chg {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--subtle);
  min-height: 18px;
}
.macro-tile-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  border-radius: 5px;
  padding: 3px 9px;
  width: fit-content;
  margin-top: 6px;
  background: rgba(255,255,255,0.06);
  color: var(--subtle);
}
.mbadge-calm     { background: rgba(34,197,94,0.14);  color: #4ade80; }
.mbadge-normal   { background: rgba(234,179,8,0.14);  color: #fbbf24; }
.mbadge-elevated { background: rgba(249,115,22,0.14); color: #fb923c; }
.mbadge-panic    { background: rgba(239,68,68,0.18);  color: #f87171; }
/* Deliberately reads as a DATA problem, not a market condition — a stale
   series must not look like a bearish signal. */
.mbadge-stale    { background: rgba(148,163,184,0.20); color: #cbd5e1; border: 1px dashed rgba(148,163,184,0.55); }
.mbadge-steep    { background: rgba(34,197,94,0.14);  color: #4ade80; }
.mbadge-normal-c { background: rgba(234,179,8,0.14);  color: #fbbf24; }
.mbadge-flat     { background: rgba(249,115,22,0.14); color: #fb923c; }
.mbadge-inverted { background: rgba(239,68,68,0.18);  color: #f87171; }
.mbadge-dovish   { background: rgba(34,197,94,0.14);  color: #4ade80; }
.mbadge-neutral  { background: rgba(234,179,8,0.14);  color: #fbbf24; }
.mbadge-hawkish  { background: rgba(249,115,22,0.14); color: #fb923c; }

/* ── SECTOR HEATMAP ──────────────────────────────────────────── */

.sector-heatmap-wrap {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sector-heatmap {
  position: relative;
  width: 100%;
  background: #0a0a12;
}

/* ── Top Gems strip (above heatmap) ─────────────────────────── */
.hm-gems-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(99,102,241,0.06);
}
.hm-gems-lbl {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--subtle);
  text-transform: uppercase;
  margin-right: 4px;
  white-space: nowrap;
}
.hm-gem {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-hi);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.hm-gem:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }
.hm-gem-sym {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.hm-gem-score {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
}
.hm-gem-chg {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
}
.hm-gem-chg.up { color: var(--green); }
.hm-gem-chg.dn { color: var(--red); }

/* ── Treemap sector groups ───────────────────────────────────── */
.hm-sector {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 2px;
}
.hm-sector-lbl {
  position: absolute;
  top: 4px;
  left: 6px;
  right: 4px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
/* ── Individual stock tiles ──────────────────────────────────── */
.hm-tile {
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: filter 0.15s;
  border: 1px solid rgba(0,0,0,0.2);
}
.hm-tile:hover { filter: brightness(1.25); z-index: 2; }
.hm-sym {
  font-family: var(--font-display);
  font-size: clamp(8px, 1.6vw, 13px);
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
  text-align: center;
  line-height: 1;
}
.hm-pct {
  font-family: var(--mono);
  font-size: clamp(7px, 1.2vw, 10px);
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   EARNINGS CALENDAR
   ══════════════════════════════════════════════════════════════ */

/* ── EARNINGS CALENDAR — card-row list ────────────────────────
   Modeled on Google Finance's "Upcoming earnings" list: a compact date
   badge on the left, company + meta line in the middle, a status badge
   trailing on the right — one column of rows, no table, so it reads
   cleanly at any width instead of needing horizontal scroll on mobile. */
.ecal-wrap {
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.ecal-loading { padding: 32px 16px; text-align: center; color: var(--subtle); font-size: 13px; }
.ecal-section-hdr {
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--subtle);
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--border);
}
.ecal-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--t);
}
.ecal-wrap > .ecal-row:last-child { border-bottom: none; }
.ecal-row:hover { background: rgba(255,255,255,0.025); }
.ecal-date {
  flex-shrink: 0;
  width: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}
.ecal-date-top {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--subtle);
}
.ecal-date-bot {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-top: 1px;
}
.ecal-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ecal-company {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ecal-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.ecal-ticker { font-weight: 700; color: var(--brand); text-decoration: none; }
.ecal-ticker:hover { text-decoration: underline; }
.ecal-dot { color: var(--subtle); }
.ecal-vs { color: var(--subtle); font-weight: 400; }
.ecal-trail { flex-shrink: 0; }
.earn-eps { color: var(--text); font-weight: 600; }
.earn-rev { color: var(--muted); }
.earn-days-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
}
.earn-days-soon  { background: rgba(234,179,8,0.15);  color: var(--amber); }
.earn-days-today { background: rgba(34,197,94,0.18);  color: var(--green); }
@media (max-width: 480px) {
  .ecal-row { gap: 10px; padding: 11px 12px; }
  .ecal-date { width: 40px; }
  .earn-rev { display: none; }
  .ecal-dot:has(+ .earn-rev) { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   PORTFOLIO RISK SCORE
   ══════════════════════════════════════════════════════════════ */

.port-wrap {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 24px;
  align-items: start;
}
.port-templates {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.port-tmpl-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--subtle);
}
.port-tmpl {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.port-tmpl:hover { border-color: var(--brand); color: var(--brand); }
.port-holding-row {
  display: grid;
  grid-template-columns: 1fr 80px 34px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.port-ticker-input,
.port-weight-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.port-ticker-input:focus,
.port-weight-input:focus { border-color: var(--brand); }
.port-weight-input { text-align: right; }
.port-del-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  color: var(--subtle);
  cursor: pointer;
  font-size: 17px;
  width: 34px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.port-del-btn:hover { border-color: var(--red); color: var(--red); }
.port-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.port-add-btn {
  background: none;
  border: none;
  color: var(--brand);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
  transition: opacity var(--t);
}
.port-add-btn:hover { opacity: 0.75; }
.port-total-wrap {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--subtle);
  display: flex;
  gap: 6px;
}
.port-total      { color: var(--text); font-weight: 600; }
.port-total-warn { color: var(--amber); }
.port-total-ok   { color: var(--green); }
.port-result-wrap { display: flex; flex-direction: column; gap: 16px; }
.port-score-display {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}
.port-score-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--subtle);
  margin-bottom: 10px;
}
.port-score-num {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.port-score-max {
  font-size: 22px;
  color: var(--subtle);
  font-weight: 400;
}
.port-score-signal { margin-top: 10px; }
.port-breakdown {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.port-bd-header {
  display: grid;
  grid-template-columns: 70px 55px 1fr 50px;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--subtle);
}
.port-breakdown-row {
  display: grid;
  grid-template-columns: 70px 55px 1fr 50px;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: center;
}
.port-breakdown-row:last-child { border-bottom: none; }
.port-bd-ticker { font-family: var(--mono); font-weight: 700; color: var(--text); font-size: 13px; }
.port-bd-weight { font-family: var(--mono); color: var(--subtle); font-size: 12px; }
.port-bd-bar-wrap { height: 5px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; }
.port-bd-bar { height: 100%; border-radius: 3px; width: 0%; transition: width 0.7s cubic-bezier(0.4,0,0.2,1); }
.port-bd-score { font-family: var(--mono); font-weight: 700; font-size: 13px; text-align: right; }

.port-sector-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.port-sector-title {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--subtle); margin-bottom: 10px;
}
.port-sector-warn {
  font-size: 12.5px; line-height: 1.5; color: #e8971a;
  background: rgba(232,151,26,0.08); border: 1px solid rgba(232,151,26,0.2);
  border-radius: 8px; padding: 9px 12px; margin-bottom: 12px;
}
.port-sector-row {
  display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px;
  align-items: center; padding: 6px 0;
}
.port-sector-name { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text); }
.port-sector-bar-wrap { height: 6px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; }
.port-sector-bar { height: 100%; border-radius: 3px; width: 0%; background: var(--brand); transition: width 0.7s cubic-bezier(0.4,0,0.2,1); }
.port-sector-pct { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--subtle); text-align: right; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .macro-grid { grid-template-columns: repeat(2, 1fr); }
  .sector-heatmap { min-height: 240px; }
  .sector-loading { grid-column: span 6; }
  .port-wrap { grid-template-columns: 1fr; }
  .smart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .macro-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .macro-tile-val { font-size: 24px; }
  .sector-heatmap { min-height: 200px; }
  .sector-loading { grid-column: span 4; }
  .port-wrap { grid-template-columns: 1fr; }
  /* opp-grid is now a list — no column override needed */
  .squeeze-table th:nth-child(4),
  .squeeze-table td:nth-child(4),
  .squeeze-table th:nth-child(6),
  .squeeze-table td:nth-child(6) { display: none; }
  .smart-grid { grid-template-columns: 1fr; }
}

/* ── Opportunities Board ─────────────────────────────────────── */
.opp-grid {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-card);
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 480px;
  box-shadow: var(--shadow-card);
}
.opp-grid::-webkit-scrollbar { width: 4px; }
.opp-grid::-webkit-scrollbar-track { background: transparent; }
.opp-grid::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }
.opp-grid::-webkit-scrollbar-thumb:hover { background: var(--subtle); }
.opp-loading { color: var(--subtle); font-size: 14px; padding: 24px 0; }
.opp-head {
  display: grid;
  grid-template-columns: 52px 72px 1fr 100px 70px 110px;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  position: sticky;
  top: 0;
  z-index: 2;
}
.opp-head-cell {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--subtle);
}
.opp-row {
  display: grid;
  grid-template-columns: 52px 72px 1fr 100px 70px 110px;
  gap: 8px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-sub);
  text-decoration: none;
  color: inherit;
  transition: background var(--t);
  cursor: pointer;
}
.opp-row:last-child { border-bottom: none; }
.opp-row:hover { background: var(--bg-hover); }
.opp-score-num {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 15px;
  color: #22c55e;
}
.opp-ticker {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.03em;
}
.opp-name {
  font-size: 12px;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opp-price { font-family: var(--mono); font-size: 13px; color: var(--text); font-weight: 600; }
.opp-chg-up { font-family: var(--mono); font-size: 12px; color: #4ade80; }
.opp-chg-dn { font-family: var(--mono); font-size: 12px; color: #f87171; }
.opp-signal {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: 3px;
  background: transparent;
  border: 1px solid rgba(34,197,94,0.26);
  color: #4ade80;
  white-space: nowrap;
}
.opp-empty {
  color: var(--subtle);
  font-size: 14px;
  padding: 24px 16px;
  text-align: center;
}
@media (max-width: 640px) {
  /* Keep Price visible — hiding it was the same "basic info missing on
     mobile" bug as the main rankings table. Only 24H drops, with the grid
     widened from 4 to 5 tracks to actually fit Price now that it's shown. */
  .opp-head { grid-template-columns: 44px 64px 1fr 64px 80px; }
  .opp-head-cell:nth-child(5) { display: none; }
  .opp-row  { grid-template-columns: 44px 64px 1fr 64px 80px; }
  .opp-row > .opp-chg-up,.opp-row > .opp-chg-dn { display: none; }
}

/* ── Squeeze Radar ───────────────────────────────────────────── */
.squeeze-wrap { overflow-x: auto; }
.squeeze-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.squeeze-table thead tr { border-bottom: 1px solid var(--border); }
.squeeze-table th {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--subtle);
  padding: 0 14px 12px;
  text-align: left;
  white-space: nowrap;
}
.squeeze-table th:first-child { padding-left: 0; }
.squeeze-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
  white-space: nowrap;
}
.squeeze-table td:first-child { padding-left: 0; }
.squeeze-table tbody tr:last-child td { border-bottom: none; }
.squeeze-rank { font-family: var(--mono); color: var(--subtle); font-size: 13px; width: 28px; }
.squeeze-ticker { font-family: var(--mono); font-weight: 800; font-size: 15px; color: var(--text); }
.squeeze-name   { font-size: 12px; color: var(--subtle); display: block; }
.squeeze-price  { font-family: var(--mono); font-size: 14px; color: var(--text); }
.squeeze-chg-up { font-family: var(--mono); font-size: 13px; color: #4ade80; }
.squeeze-chg-dn { font-family: var(--mono); font-size: 13px; color: #f87171; }
.squeeze-chg-flat { font-family: var(--mono); font-size: 13px; color: var(--subtle); }
.squeeze-short { font-family: var(--mono); font-size: 14px; color: var(--text); font-weight: 600; }
.squeeze-ratio  { font-family: var(--mono); font-size: 13px; color: var(--subtle); }
.squeeze-score-cell { min-width: 140px; }
.squeeze-score-wrap { display: flex; align-items: center; gap: 10px; }
.squeeze-score-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}
.squeeze-score-fill { height: 100%; border-radius: 3px; transition: width 0.7s cubic-bezier(0.4,0,0.2,1); }
.squeeze-score-num {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 14px;
  min-width: 28px;
  text-align: right;
}

/* ── Smart Money Tracker ─────────────────────────────────────── */
.smart-loading { color: var(--subtle); font-size: 14px; padding: 24px 0; }
.smart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.smart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.smart-card-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.smart-investor { display: flex; flex-direction: column; gap: 3px; }
.smart-investor-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.smart-investor-firm {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.smart-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.smart-filing-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--subtle);
  background: rgba(255,255,255,0.05);
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.smart-aum {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--subtle);
}
.smart-holdings-table { width: 100%; padding: 0 0 10px; }
.smart-holdings-table table { width: 100%; border-collapse: collapse; }
.smart-holdings-table thead tr { border-bottom: 1px solid rgba(255,255,255,0.04); }
.smart-holdings-table th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--subtle);
  padding: 8px 20px;
  text-align: left;
}
.smart-holdings-table td {
  padding: 9px 20px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}
.smart-holdings-table tbody tr:last-child td { border-bottom: none; }
.smart-h-ticker {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}
.smart-h-name { font-size: 12px; color: var(--subtle); display: block; }
.smart-h-val { font-family: var(--mono); font-size: 13px; color: var(--text); text-align: right; }
.smart-h-pct-wrap { display: flex; align-items: center; gap: 8px; }
.smart-h-pct-bar-bg {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}
.smart-h-pct-bar { height: 100%; border-radius: 2px; background: var(--brand); transition: width 0.7s cubic-bezier(0.4,0,0.2,1); }
.smart-h-pct-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--subtle);
  min-width: 36px;
  text-align: right;
}
.smart-error {
  padding: 24px 20px;
  color: var(--subtle);
  font-size: 13px;
  text-align: center;
}
.smart-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 20px 0;
}
.smart-change {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 3px;
}
.smart-new  { background: rgba(34,197,94,0.14);  color: #4ade80; }
.smart-exit { background: rgba(232,69,69,0.14);  color: #f87171; }
.smart-notes {
  font-size: 11px;
  line-height: 1.6;
  color: var(--subtle);
  padding: 10px 20px 14px;
  margin: 0;
  border-top: 1px solid var(--border-sub);
}

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}
.faq-group { display: flex; flex-direction: column; }
.faq-group-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  list-style: none;
  padding: 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
  transition: color 0.15s;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: var(--subtle);
  flex-shrink: 0;
  transition: transform 0.2s, color 0.15s;
  line-height: 1;
}
.faq-item[open] > .faq-q { color: var(--brand); }
.faq-item[open] > .faq-q::after { transform: rotate(45deg); color: var(--brand); }
.faq-a {
  padding: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-a p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}
.faq-a strong { color: var(--text); }
.faq-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-list li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}
.faq-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--brand);
}
@media (max-width: 768px) {
  .faq-grid { grid-template-columns: 1fr; gap: 0; }
  .faq-group + .faq-group { margin-top: 32px; }
}

/* ── Psychology / Mindset section ───────────────────────────── */

/* Unforgettable moment — "Anything can happen." */
.mindset-moment {
  text-align: center;
  padding: 64px 24px 52px;
  max-width: 560px;
  margin: 0 auto 52px;
}
.mindset-moment-mark {
  display: block;
  font-size: 60px; line-height: 0.8;
  color: var(--brand); opacity: 0.35;
  font-family: Georgia, serif;
  margin-bottom: 12px;
}
.mindset-quote-text {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(38px, 8vw, 70px);
  font-weight: 800; font-style: italic;
  line-height: 1.0; letter-spacing: -0.02em;
  color: var(--text); margin: 0 0 22px;
  animation: mindset-rise 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}
.mindset-attr {
  display: block;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; color: var(--subtle);
  text-transform: uppercase;
  animation: mindset-rise 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.35s forwards;
  opacity: 0;
}
@keyframes mindset-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Featured quote (legacy) */
.psych-featured {
  position: relative;
  background: linear-gradient(160deg, #090916 0%, #07070f 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 44px 52px 40px;
  margin-bottom: 2px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.psych-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand) 0%, transparent 60%);
}
.psych-quote-mark {
  font-family: Georgia, serif;
  font-size: 80px;
  line-height: 0.6;
  color: var(--brand);
  opacity: 0.18;
  margin-bottom: 16px;
  display: block;
  user-select: none;
}
.psych-quote {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.45;
  color: var(--text);
  margin: 0 0 16px;
  max-width: 780px;
  font-style: italic;
}
.psych-quote-attr {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--subtle);
}

/* Principles grid */
.psych-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 2px;
}
.psych-card {
  background: linear-gradient(160deg, #0f0f1e 0%, #0c0c18 100%);
  padding: 40px 32px 44px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  border-right: 1px solid var(--border);
  transition: background var(--t);
  overflow: hidden;
}
.psych-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--cc, var(--brand));
  opacity: 0.7;
}
.psych-card:nth-child(3n) { border-right: none; }
.psych-card:nth-child(1),
.psych-card:nth-child(2),
.psych-card:nth-child(3) { border-bottom: 2px solid var(--bg); }
.psych-card:hover { background: linear-gradient(160deg, #131328 0%, #10101e 100%); }
.psych-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.psych-num {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cc, var(--brand));
  opacity: 0.8;
  flex-shrink: 0;
}
.psych-topic {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.20em;
  color: var(--subtle);
  text-transform: uppercase;
}
.psych-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.35;
  color: var(--text);
  margin: 4px 0 0;
}
.psych-body {
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
  flex: 1;
}

/* Hard Rules */
.psych-rules {
  background: linear-gradient(160deg, #08080f 0%, #060610 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
}
.psych-rules-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.psych-rules-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.psych-rules-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.psych-rule {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-sub);
}
.psych-rule:nth-child(odd)  { padding-right: 36px; border-right: 1px solid var(--border-sub); }
.psych-rule:nth-child(even) { padding-left: 36px; }
.psych-rule:nth-child(5),
.psych-rule:nth-child(6)    { border-bottom: none; }
.psych-rule-num {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--brand);
  opacity: 0.45;
  flex-shrink: 0;
  letter-spacing: 0.08em;
}
.psych-rule-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

@media (max-width: 860px) {
  .psych-featured  { padding: 32px 24px; }
  .psych-quote     { font-size: 18px; }
  .psych-grid      { grid-template-columns: 1fr; }
  .psych-card      { border-right: none; border-bottom: 1px solid var(--border) !important; }
  .psych-card:last-child { border-bottom: none !important; }
  .psych-rules     { padding: 28px 20px; }
  .psych-rules-list { grid-template-columns: 1fr; }
  .psych-rule      { padding-right: 0 !important; padding-left: 0 !important; border-right: none !important; }
  .psych-rule:nth-child(5) { border-bottom: 1px solid var(--border-sub) !important; }
  .psych-rule:last-child   { border-bottom: none !important; }
}

/* ── Pre-Trade Checklist ─────────────────────────────────────── */
.checklist-grid {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 28px 36px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(160deg, #0f0f1e 0%, #0c0c18 100%);
  transition: background var(--t);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item:hover { background: linear-gradient(160deg, #131328 0%, #10101e 100%); }
.checklist-item--close {
  background: linear-gradient(160deg, #0c1a12 0%, #090f0e 100%);
}
.checklist-item--close:hover { background: linear-gradient(160deg, #0e2018 0%, #0b1410 100%); }
.checklist-item--close .checklist-num { color: var(--brand); opacity: 1; font-size: 20px; }
.checklist-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand);
  opacity: 0.5;
  flex-shrink: 0;
  width: 28px;
  padding-top: 3px;
}
.checklist-content { display: flex; flex-direction: column; gap: 8px; }
.checklist-q {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.checklist-a {
  font-size: 13px;
  line-height: 1.72;
  color: var(--muted);
  margin: 0;
  max-width: 680px;
}
@media (max-width: 600px) {
  .checklist-item { padding: 22px 20px; gap: 18px; }
}

/* ── Wisdom from the Masters ─────────────────────────────────── */
.masters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.masters-card {
  background: linear-gradient(160deg, #111120 0%, #0d0d1a 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--t), transform var(--t);
  position: relative;
  overflow: hidden;
}
.masters-card::before {
  content: '"';
  position: absolute;
  top: -10px; right: 20px;
  font-family: Georgia, serif;
  font-size: 120px;
  color: var(--brand);
  opacity: 0.06;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.masters-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.masters-quote {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.65;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
  flex: 1;
}
.masters-foot {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 18px;
  border-top: 1px solid var(--border-sub);
}
.masters-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.01em;
}
.masters-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--subtle);
}
@media (max-width: 900px) {
  .masters-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .masters-grid { grid-template-columns: 1fr; }
}

/* ── Screener bar ────────────────────────────────────────────── */
.screener-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.screener-types {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}
.scr-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--subtle);
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.scr-tab:hover { border-color: var(--border-hi); color: var(--muted); }
.scr-tab--active { background: var(--brand); border-color: var(--brand); color: #fff; }
.scr-tab--active:hover { background: var(--brand); }
.scr-count {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 1px 5px;
  font-size: 9px;
}
.scr-tab--active .scr-count { background: rgba(255,255,255,0.25); }
.screener-right {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
}
.scr-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--t);
}
.scr-select:focus { border-color: var(--brand); }
.scr-search {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 12px;
  width: 200px;
  outline: none;
  transition: border-color var(--t);
}
.scr-search::placeholder { color: var(--subtle); }
.scr-search:focus { border-color: var(--brand); }
.scr-csv-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--t), color var(--t);
}
.scr-csv-btn:hover { border-color: var(--brand); color: var(--text); }

/* Filter chips scroll wrapper */
.scr-type-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

/* Filter chips: scroll horizontally on mobile instead of wrapping */
@media (max-width: 480px) {
  .screener-types {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .screener-types::-webkit-scrollbar { display: none; }
  /* Right fade hint: shows there are more chips to scroll to */
  .scr-type-wrap::after {
    content: '';
    display: block;
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 36px;
    background: linear-gradient(to left, var(--bg-page, #080808) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
  }
  .screener-right { margin-left: 0; width: 100%; }
  .scr-select { flex: 1; min-width: 0; }
  .scr-search { width: 100%; flex: 1; }
}

/* ── Sparkline column ────────────────────────────────────────── */
.th-chart { width: 70px; text-align: center; color: var(--subtle); }
.td-spark  { text-align: center; padding: 0 8px; }
.spark     { display: block; width: 62px; height: 32px; overflow: visible; }
.spark-na  { color: var(--subtle); font-size: 11px; }
.sk-spark  { width: 62px; height: 20px; border-radius: 4px; }

/* ── Type badges ─────────────────────────────────────────────── */
.type-tag--crypto {
  background: rgba(153,69,255,0.12);
  color: #9945ff;
  border: 1px solid rgba(153,69,255,0.25);
}
.type-tag--index {
  background: rgba(16,185,129,0.1);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.25);
}

/* ── Actions column (paper + alert bell) ─────────────────────── */
.th-paper { width: 72px; text-align: center; }
/* Row action cluster (watchlist star / add to portfolio / price alert) —
   one consistent icon-button treatment so the three read as a single group
   instead of three different shapes at three different sizes. */
/* .td-actions is a real <td> — must keep the default table-cell display so
   it stretches to match its row's height like every sibling cell. Overriding
   a table cell's own display to flex takes it out of the row-height-matching
   algorithm entirely: its box shrinks to fit content instead of filling the
   row, so a hover background/accent scoped to it stops short of the row's
   real height — reads as a separate box sitting inside the highlighted row.
   The flex centering lives on this inner wrapper instead. */
.td-actions-inner { display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; height: 100%; }
.td-actions .wl-star,
.td-actions .paper-add-btn,
.td-actions .alert-bell {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: transparent; border: 1px solid transparent; border-radius: 7px;
  color: var(--subtle); opacity: 0.7;
  cursor: pointer; transition: all var(--t);
  padding: 0; margin: 0; line-height: 1; flex-shrink: 0;
}
.td-actions .wl-star:hover,
.td-actions .paper-add-btn:hover,
.td-actions .alert-bell:hover {
  opacity: 1; background: var(--bg-hover); border-color: var(--border-hi); color: var(--text);
}

.td-actions .wl-star:hover { color: #f59e0b !important; transform: none; }
.td-actions .wl-star--on { color: #f59e0b; opacity: 1; }
.td-actions .wl-star--on:hover { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); }

.paper-add-btn:hover { color: var(--brand) !important; }
.paper-add-btn--done { color: var(--green); opacity: 1; cursor: default; }
.paper-add-btn--done:hover { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: var(--green) !important; }

.alert-bell--active { color: #fbbf24; opacity: 1; border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.08); }
.alert-bell--active:hover { color: #fbbf24 !important; }

/* ── Alert overlay + modal ───────────────────────────────────── */
.alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* JS toggles this element's display directly (none <-> flex) rather than a
     class, and a keyframe `animation` (unlike `transition`) restarts on its
     own every time an element re-enters the render tree — so this plays
     automatically on every open with no JS changes. Was an instant snap to
     full opacity/scale, which is what actually read as "boring terminal." */
  animation: modalBackdropIn 220ms ease both;
}
@keyframes modalBackdropIn { from { opacity: 0; } to { opacity: 1; } }
.alert-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  overflow: hidden;
  animation: modalCardIn 260ms cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes modalCardIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .alert-overlay, .alert-modal { animation: none; }
}
.alert-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.alert-modal-ticker {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.alert-modal-label { font-size: 12px; color: var(--subtle); }
.alert-modal-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 18px;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  transition: all var(--t);
}
.alert-modal-close:hover { border-color: var(--border-hi); color: var(--text); }
.alert-modal-body { padding: 20px; }
.alert-modal-desc { font-size: 12px; color: var(--subtle); margin: 0 0 20px; line-height: 1.6; }
.alert-modal-lbl { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.alert-modal-lbl strong { color: var(--brand); font-size: 16px; }
.alert-score-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-hi);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}
.alert-score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.3);
}
.alert-score-hints {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  margin-top: 8px;
}
.alert-modal-foot {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

/* ── Alert toast ─────────────────────────────────────────────── */
.alert-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid rgba(251,191,36,0.4);
  border-radius: var(--r);
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 999;
  max-width: 340px;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
.alert-toast--show { transform: translateY(0); opacity: 1; }

/* ── Milestone notification cards ───────────────────────────────── */
.milestone-stack {
  position: fixed;
  bottom: 18px;
  left: 18px;
  top: auto; right: auto;
  z-index: 9700;                /* below the entry sidebar / score guide */
  display: flex;
  flex-direction: column-reverse;  /* newest closest to the corner, stack upward */
  gap: 12px;
  pointer-events: none;
  max-width: 252px;
}
.milestone-card {
  position: relative;          /* laid out by .milestone-stack — no overlap */
  width: 252px;
  background: linear-gradient(165deg, var(--bg-elevated) 0%, var(--bg-card) 60%);
  border: 1px solid var(--border-hi);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.35);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  transition: opacity 0.4s cubic-bezier(0.16,1,0.3,1), transform 0.5s cubic-bezier(0.2,1.15,0.3,1);
  pointer-events: none;
}
.milestone-card.mc-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.milestone-card.mc-leaving {
  opacity: 0;
  transform: translateX(-16px) scale(0.96);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.4,0,1,1);
}
.mc-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.mc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px 9px;
}
.mc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mc-label {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  flex: 1;
}
.mc-close {
  background: none;
  border: none;
  color: var(--subtle);
  cursor: pointer;
  padding: 3px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.15s, background 0.15s;
}
.mc-close:hover { opacity: 1; background: rgba(255,255,255,0.06); }
.mc-body { padding: 2px 12px 12px; }
.mc-sym-row { display: flex; align-items: baseline; gap: 7px; margin-bottom: 7px; }
.mc-sym  { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.mc-name { font-size: 10.5px; color: var(--subtle); }
.mc-details { display: flex; align-items: center; gap: 8px; }
.mc-price { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); }
.mc-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: none;
  border-top: 1px solid var(--border-sub);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.mc-cta svg { transition: transform 0.2s cubic-bezier(0.2,1.15,0.3,1); }
.mc-cta:hover { background: rgba(16,185,129,0.09); }
.mc-cta:hover svg { transform: translateX(3px); }
.mc-progress {
  height: 2px;
  background: var(--border-sub);
}
.mc-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
}
@media (max-width: 480px) {
  .milestone-stack { left: 10px; right: 10px; bottom: 10px; top: auto; max-width: none; }
  .milestone-card { width: auto; }
}

.paper-market-closed {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: var(--r);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.25);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #93c5fd;
}
.paper-concentration-warn {
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: var(--r);
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fbbf24;
}
.paper-stats {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.paper-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  background: linear-gradient(160deg, #0f0f1e 0%, #0c0c18 100%);
  border-right: 1px solid var(--border);
  gap: 4px;
}
.paper-stat:last-child { border-right: none; }
.paper-stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}
.paper-stat-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--subtle);
}

.paper-section-hd {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--subtle);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.paper-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.paper-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.paper-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.paper-table thead tr { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.paper-table th {
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--subtle);
  text-align: left;
}
.paper-table tbody tr {
  border-bottom: 1px solid var(--border-sub);
  background: linear-gradient(160deg, #0f0f1e 0%, #0c0c18 100%);
  transition: background var(--t);
}
.paper-table tbody tr:last-child { border-bottom: none; }
.paper-table tbody tr:hover { background: var(--bg-hover); }
.paper-table td { padding: 12px 14px; vertical-align: middle; }

.paper-asset { display: flex; align-items: center; gap: 10px; }
.paper-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.paper-ticker { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text); display: block; }
.paper-signal-sm { font-size: 10px; color: var(--subtle); display: block; margin-top: 1px; }
.paper-num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.paper-pnl { font-family: var(--mono); font-size: 13px; }
.paper-close-btn {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border: 1px solid var(--border-hi);
  border-radius: 4px;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.paper-close-btn:hover { border-color: var(--red); color: var(--red); }

.paper-empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.paper-empty-icon { font-size: 32px; color: var(--border-hi); margin-bottom: 12px; }

@media (max-width: 700px) {
  .paper-stats { flex-wrap: wrap; }
  .paper-stat  { flex: 0 0 calc(50% - 1px); border-bottom: 1px solid var(--border); }
  .th-paper, .td-actions, .th-chart, .td-spark { display: none; }
}



/* ── Learn section ───────────────────────────────────────────── */
/* ── MARKET BASICS GLOSSARY ──────────────────────────────────── */
.basics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.basics-card {
  background: rgba(16,185,129,0.03);
  border: 1px solid rgba(16,185,129,0.12);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--t), background var(--t);
}
.basics-card:hover {
  border-color: rgba(16,185,129,0.25);
  background: rgba(16,185,129,0.055);
}
.basics-icon { font-size: 24px; line-height: 1; }
.basics-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.basics-def {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
  flex: 1;
}
.basics-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  color: var(--brand);
  opacity: 0.75;
  text-transform: uppercase;
  margin-top: 2px;
}
@media (max-width: 900px) {
  .basics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .basics-grid { grid-template-columns: 1fr; }
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.learn-card {
  background: linear-gradient(160deg, #111120 0%, #0d0d1a 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--t), box-shadow var(--t);
}
.learn-card:hover { border-color: rgba(16,185,129,0.30); box-shadow: var(--shadow-lift); }
.learn-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--brand);
  opacity: 0.85;
  text-transform: uppercase;
}
.learn-q {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--text);
  margin: 0;
  line-height: 1.32;
}
.learn-a {
  font-size: 13px;
  line-height: 1.72;
  color: var(--muted);
  margin: 0;
}
@media (max-width: 768px) {
  .learn-grid { grid-template-columns: 1fr; }
}

/* ── FOUNDATION BUILD ────────────────────────────────────────── */
.fd-wrap {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}
.fd-bucket {
  border-radius: var(--r);
  border: 1px solid var(--border);
  padding: 24px;
}
.fd-bucket--safety {
  background: linear-gradient(160deg, #0b1220 0%, #091018 100%);
  border-color: #1e3050;
}
.fd-bucket--growth {
  background: var(--bg-card);
}
.fd-bucket-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--subtle);
  margin-bottom: 8px;
}
.fd-bucket-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.fd-bucket-desc {
  font-size: 11px;
  color: var(--subtle);
  margin-bottom: 20px;
}
.fd-rate-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.fd-rate-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--green);
  font-family: var(--mono);
  letter-spacing: -0.02em;
}
.fd-rate-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.fd-safety-where {
  font-size: 11px;
  color: var(--subtle);
  margin-bottom: 16px;
}
.fd-verdict-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.fd-verdict-q {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fd-verdict-yes {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
  color: #000;
  background: var(--green);
  padding: 2px 8px;
  border-radius: 4px;
}
.fd-safety-why {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.fd-safety-note-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fd-note-pill {
  font-family: var(--mono);
  font-size: 10px;
  color: #3a9f6e;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 4px;
  padding: 3px 8px;
}
/* Ticker grid inside growth bucket */
.fd-ticker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.fd-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fd-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.fd-card-sym {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--text);
  display: block;
}
.fd-card-name {
  font-size: 10px;
  color: var(--subtle);
  display: block;
  margin-top: 2px;
}
.fd-card-alloc {
  font-size: 20px;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--accent, #5b6af0);
}
.fd-card-role {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.fd-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.fd-pill {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
}
.fd-card-timing {
  background: rgba(91, 106, 240, 0.06);
  border: 1px solid rgba(91, 106, 240, 0.15);
  border-radius: 6px;
  padding: 10px 12px;
}
.fd-timing-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--subtle);
  display: block;
  margin-bottom: 4px;
}
.fd-timing-val {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fd-live-score {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.fd-live-score.score-hi { color: var(--green); }
.fd-live-score.score-mid { color: var(--amber); }
.fd-live-score.score-lo { color: var(--red); }
.fd-live-sig {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.fd-live-sig.sig-strong-buy { color: var(--green); }
.fd-live-sig.sig-buy { color: #6ee7b7; }
.fd-live-sig.sig-accumulate { color: var(--amber); }
.fd-live-sig.sig-hold { color: var(--muted); }
.fd-live-sig.sig-avoid { color: var(--red); }
.fd-card-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--border-sub);
}
.fd-worth-why {
  font-size: 10px;
  color: var(--subtle);
  line-height: 1.5;
  flex-basis: 100%;
}
.fd-disclaimer {
  font-size: 10px;
  color: var(--subtle);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 960px) {
  .fd-wrap { grid-template-columns: 1fr; }
  .fd-ticker-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .fd-ticker-grid { grid-template-columns: 1fr; }
}

/* ── Earnings beat/miss result badge ──────────────────────────── */
.earn-result {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 5px;
}
.earn-beat { background: rgba(34,197,94,0.14);  color: #4ade80; }
.earn-miss { background: rgba(239,68,68,0.14);  color: #f87171; }

/* ── Risk news alert badges (rankings table) ─────────────────── */
.risk-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  cursor: default;
  position: relative;
  top: -1px;
  white-space: nowrap;
}
.risk-caution {
  background: rgba(232,151,26,0.18);
  color: #f59e0b;
  border: 1px solid rgba(232,151,26,0.30);
}
.risk-avoid {
  background: rgba(232,69,69,0.18);
  color: #f87171;
  border: 1px solid rgba(232,69,69,0.35);
  animation: risk-pulse 2.5s ease-in-out infinite;
}
@keyframes risk-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
.row-risk-avoid td { opacity: 0.75; transition: opacity var(--t); }
.row-risk-avoid:hover td { opacity: 1; }

/* Tooltip that appears on the rank cell */
.risk-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 200;
  background: #15151f;
  border: 1px solid var(--border-hi);
  border-left: 3px solid var(--red);
  border-radius: var(--r);
  padding: 10px 14px;
  width: 300px;
  box-shadow: var(--shadow-lift);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  gap: 8px;
  align-items: flex-start;
  white-space: normal;
  pointer-events: none;
}
.risk-caution + .risk-tip,
.risk-avoid  + .risk-tip { border-left-color: var(--amber); }
/* Invisible bridge across the gap so the mouse can travel from the row up
   into the card without the hover dropping (which made it "uncatchable"). */
.risk-tip::after {
  content: '';
  position: absolute;
  top: 100%; left: 0; right: 0;
  height: 12px;
}
.risk-badge:hover ~ .risk-tip,
tr:hover .risk-tip,
.risk-tip:hover { display: flex; pointer-events: auto; }
.risk-tip-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.risk-tip-text { flex: 1; }
.risk-tip-link {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand);
  text-decoration: none;
  margin-top: 6px;
  flex-shrink: 0;
}
.risk-tip-link:hover { text-decoration: underline; }

/* position context for tooltip anchor */
td:first-child { position: relative; }

/* ── Treasury / bond type tag in rankings ───────────────────── */
.type-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #60a5fa;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.22);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
/* Subtle left accent on bond rows */
tr[data-type="bond"] td:first-child {
  border-left: 2px solid rgba(59,130,246,0.35);
}

/* ── Macro yield curve interpretation callout ────────────────── */
.macro-interp {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  line-height: 1.68;
  color: var(--muted);
}

/* ── Macro events strip ──────────────────────────────────────── */
.macro-events { }
.macro-ev-head { margin-bottom: 10px; }
.macro-ev-list { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--border-sub); border-radius: var(--r); overflow: hidden; }
.macro-ev-item { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg-card); font-size: 12px; }
.macro-ev-item + .macro-ev-item { border-top: 1px solid var(--border-sub); }
.macro-ev--past { opacity: 0.55; }
.macro-ev-when { font-family: var(--mono); font-size: 11px; color: var(--subtle); white-space: nowrap; }
.macro-ev-name { color: var(--text); font-weight: 500; }
.macro-ev-nums { font-family: var(--mono); font-size: 11px; text-align: right; white-space: nowrap; }
.macro-ev-actual   { color: var(--text); font-weight: 700; }
.macro-ev-forecast { color: var(--muted); }
.macro-ev-prev     { color: var(--subtle); }

/* ── Analyst consensus ───────────────────────────────────────── */
.analyst-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.analyst-target-price { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--text); }
.analyst-target-sub   { font-size: 11px; color: var(--muted); margin-top: 3px; }
.analyst-range        { font-family: var(--mono); font-size: 11px; color: var(--subtle); margin-top: 5px; }
.macro-interp--warn    { border-color: rgba(232,69,69,0.35);    background: rgba(232,69,69,0.05); }
.macro-interp--caution { border-color: rgba(232,151,26,0.35);   background: rgba(232,151,26,0.04); }
.macro-interp--info    { border-color: rgba(59,130,246,0.35);   background: rgba(59,130,246,0.05); }
.macro-interp-icon {
  font-size: 16px;
  flex-shrink: 0;
  color: var(--brand);
  margin-top: 1px;
}
.macro-interp--warn    .macro-interp-icon { color: var(--red); }
.macro-interp--caution .macro-interp-icon { color: var(--amber); }
.macro-interp--info    .macro-interp-icon { color: #60a5fa; }
.macro-interp-text { flex: 1; }
.macro-interp-cta {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
  align-self: center;
  padding: 6px 12px;
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--r-sm);
  transition: background var(--t);
}
.macro-interp-cta:hover { background: var(--brand-dim); }

/* ── Bond duration explainer ─────────────────────────────────── */
.bond-duration-explainer {
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
}
.bond-dur-intro {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #60a5fa;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.bond-dur-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 16px;
}
.bond-dur-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bond-dur-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 999px;
}
.bond-dur-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: #93c5fd;
  white-space: nowrap;
}
.bond-dur-desc {
  font-size: 11px;
  color: var(--muted);
}

/* ── Safe Haven Bonds explain grid ──────────────────────────── */
.bond-explain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.bond-explain-card {
  background: var(--bg-card);
  padding: 28px 24px 32px;
  border-right: 1px solid var(--border);
  transition: background 0.18s;
}
.bond-explain-card:last-child { border-right: none; }
.bond-explain-card:hover { background: var(--bg-hover); }
.bond-explain-icon { font-size: 20px; margin-bottom: 12px; }
.bond-explain-sym {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 2px;
}
.bond-explain-name {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--subtle);
  margin-bottom: 16px;
}
.bond-explain-why {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 14px;
}
.bond-explain-when {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--brand);
  line-height: 1.5;
}
.bond-score-note {
  font-size: 12px;
  line-height: 1.65;
  color: var(--subtle);
  padding: 14px 18px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-left: 3px solid rgba(59,130,246,0.4);
  border-radius: var(--r-sm);
}
@media (max-width: 900px) {
  .bond-explain-grid { grid-template-columns: repeat(2, 1fr); }
  .bond-explain-card:nth-child(2) { border-right: none; }
  .bond-explain-card:nth-child(3) { border-top: 1px solid var(--border); }
}
@media (max-width: 540px) {
  .bond-explain-grid { grid-template-columns: 1fr; }
  .bond-explain-card { border-right: none; border-bottom: 1px solid var(--border); }
  .macro-interp { flex-direction: column; gap: 10px; }
  .macro-interp-cta { align-self: flex-start; }
}

/* ── Nav paper count badge ────────────────────────────────────── */
.nav-paper-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--brand);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0;
  line-height: 1;
  margin-left: 5px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ── Paper trade toast ────────────────────────────────────────── */
.paper-toast {
  position: fixed;
  bottom: 92px;          /* sits above the alert toast (bottom:24px) so they never overlap */
  right: 24px;
  z-index: 9999;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hi);
  border-left: 3px solid var(--brand);
  border-radius: var(--r);
  padding: 14px 18px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow-lift);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.paper-toast--show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.paper-toast-tick {
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}
.paper-toast-link {
  color: var(--brand);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  margin-left: 4px;
}
.paper-toast-link:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .paper-toast { right: 12px; left: 12px; bottom: 16px; white-space: normal; }
}

/* ── BACKTEST ──────────────────────────────────────────────────── */
.bt-controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 28px;
}
.bt-search-wrap {
  flex: 1; min-width: 200px; position: relative;
}
.bt-input {
  width: 100%;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 9px 14px;
  font-family: var(--mono); font-size: 12px; color: var(--text);
  outline: none; transition: border-color var(--t);
}
.bt-input:focus { border-color: var(--brand); }
.bt-input::placeholder { color: var(--subtle); }
.bt-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50;
  background: var(--bg-card); border: 1px solid var(--border-hi);
  border-radius: var(--r); box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;
}
.bt-dd-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  cursor: pointer; transition: background 0.1s;
}
.bt-dd-item:hover, .bt-dd-item--active {
  background: var(--bg-hover);
}
.bt-dd-sym {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--text); min-width: 52px;
}
.bt-dd-name {
  font-size: 12px; color: var(--subtle); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.bt-dd-type {
  font-family: var(--mono); font-size: 9px; color: var(--subtle);
  margin-left: auto; flex-shrink: 0; letter-spacing: 0.06em;
}
.bt-dd-loading {
  padding: 10px 14px; font-size: 11px; color: var(--subtle); font-family: var(--mono);
}
.bt-periods { display: flex; gap: 4px; }
.bt-period {
  padding: 8px 14px; border-radius: var(--r); border: 1px solid var(--border);
  background: transparent; color: var(--subtle); font-family: var(--mono);
  font-size: 11px; font-weight: 600; cursor: pointer; transition: all var(--t);
}
.bt-period:hover { border-color: var(--brand); color: var(--text); }
.bt-period--active { background: var(--brand); border-color: var(--brand); color: #fff; }
.bt-placeholder {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  padding: 60px 20px; color: var(--subtle); font-size: 13px;
  border: 1px dashed var(--border); border-radius: var(--r);
}
.bt-placeholder-icon { font-size: 24px; opacity: 0.4; }
.bt-loading {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  padding: 60px 20px; color: var(--subtle); font-size: 13px;
}
.bt-spinner {
  width: 16px; height: 16px; border: 2px solid var(--border);
  border-top-color: var(--brand); border-radius: 50%;
  animation: spin 0.8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.bt-error {
  padding: 20px 24px; background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25); border-radius: var(--r);
  color: var(--red); font-size: 13px;
}
.bt-meta {
  font-family: var(--mono); font-size: 10px; color: var(--subtle);
  letter-spacing: 0.06em; margin-bottom: 16px;
}
.bt-table-wrap { overflow-x: auto; margin-bottom: 24px; }
.bt-table {
  width: 100%; min-width: 540px; border-collapse: collapse;
  font-size: 12px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
}
.bt-section-label {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--subtle); margin-bottom: 12px;
}
.bt-range-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.bt-table th {
  background: var(--bg-card); color: var(--subtle); font-family: var(--mono);
  font-size: 9px; letter-spacing: 0.08em; font-weight: 600;
  padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--border);
}
.bt-sub { color: var(--subtle); font-size: 8px; opacity: 0.7; padding-top: 2px !important; padding-bottom: 6px !important; }
.bt-table td { padding: 10px 14px; border-bottom: 1px solid var(--border-sub); }
.bt-table tbody tr:last-child td { border-bottom: none; }
.bt-table tbody tr { transition: background var(--t); }
.bt-table tbody tr:hover { background: var(--bg-hover); }
.bt-num { text-align: right; font-family: var(--mono); font-weight: 600; font-size: 12px; font-feature-settings: "tnum"; }
.bt-chart-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px; margin-bottom: 16px; overflow: hidden;
}
.bt-chart { width: 100%; height: auto; display: block; }
.bt-legend {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px;
  font-size: 10px; font-family: var(--mono); color: var(--subtle); letter-spacing: 0.04em;
}
.bt-leg-item { display: flex; align-items: center; gap: 5px; }
.bt-disclaimer {
  font-size: 10px; color: var(--subtle); line-height: 1.6;
  border-top: 1px solid var(--border-sub); padding-top: 12px; margin: 0;
}
.bt-table-note {
  font-size: 10px; color: var(--subtle); margin: -16px 0 20px; padding-top: 6px;
}
.bt-th-note { font-size: 8px; font-weight: 400; opacity: 0.7; }
.bt-row-dim { opacity: 0.55; }
.bt-low-n {
  font-family: var(--mono); font-size: 9px; color: var(--amber);
  background: rgba(232,151,26,0.10); border: 1px solid rgba(232,151,26,0.24);
  border-radius: 3px; padding: 1px 4px; margin-left: 5px; vertical-align: middle;
}

/* ── Backtest interpretation section ─────────────────────────── */
.bt-interpret { margin: 0 0 24px; display: flex; flex-direction: column; gap: 12px; }
.bt-insight {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.18);
  border-radius: var(--r); padding: 14px 16px;
  font-size: 13px; line-height: 1.65; color: var(--text);
}
.bt-score-ctx {
  font-size: 12px; color: var(--subtle); line-height: 1.6;
  padding: 10px 14px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--r);
}
.bt-guide {
  border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
}
.bt-guide-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--text);
  cursor: pointer; list-style: none; user-select: none;
  background: var(--bg-card);
  transition: background var(--t);
}
.bt-guide-toggle::-webkit-details-marker { display: none; }
.bt-guide-toggle:hover { background: var(--bg-hover); }
.bt-guide-caret {
  font-family: var(--mono); font-size: 14px; color: var(--subtle);
  transition: transform 0.2s;
}
details[open] .bt-guide-caret { transform: rotate(90deg); }
.bt-guide-body {
  border-top: 1px solid var(--border); padding: 6px 0;
}
.bt-guide-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 10px 16px; border-bottom: 1px solid var(--border-sub);
}
.bt-guide-row:last-child { border-bottom: none; }
.bt-guide-pill { min-width: 86px; text-align: center; flex-shrink: 0; margin-top: 1px; }
.bt-guide-desc {
  font-size: 12px; color: var(--subtle); line-height: 1.65; margin: 0;
}

@media (max-width: 640px) {
  .bt-controls { flex-direction: column; align-items: stretch; }
  .bt-search-wrap { min-width: 0; }
  .bt-periods { justify-content: center; }
  .bt-guide-row { flex-direction: column; gap: 6px; }
  .bt-guide-pill { min-width: 0; text-align: left; }
}


/* Mobile nav icons */
.mnav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--subtle);
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.mnav-link {
  display: flex;
  align-items: center;
}

/* ── MARKET HEALTH (Task 2) ─────────────────────────────────────── */
.mh-section {
  margin-top: 36px;
}
.mh-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.mh-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--muted);
  text-transform: uppercase;
}
.mh-sub {
  font-size: 11px;
  color: var(--subtle);
}
.mh-sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.mh-sector-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-sub);
  border-radius: 8px;
  transition: border-color var(--t);
}
.mh-sector-row:hover { border-color: var(--border-hi); }
.mh-sector-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mh-sector-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
}
.mh-sector-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.mh-sector-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  min-width: 0;
}
.mh-sector-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.mh-sector-pct {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.mh-sector-tag {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 2px 5px;
  border-radius: 3px;
  flex-shrink: 0;
  white-space: nowrap;
}
.mh-sector-tag-spacer { width: 0; }
.mh-tag-lead { background: rgba(16,185,129,0.15); color: var(--brand); }
.mh-tag-lag  { background: rgba(232,69,69,0.15);  color: var(--red);   }

.mh-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.mh-row--4 { grid-template-columns: repeat(4, 1fr); }
.mh-row--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .mh-row { grid-template-columns: 1fr; }
  .mh-row--4 { grid-template-columns: 1fr 1fr; }
  .mh-row--3 { grid-template-columns: 1fr 1fr; }
  .mh-sector-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .mh-row--4 { grid-template-columns: 1fr; }
  .mh-row--3 { grid-template-columns: 1fr; }
}
.mh-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-sub);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  position: relative;
  overflow: hidden;
}
.mh-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}
.mh-tile:hover { border-color: rgba(16,185,129,0.35); box-shadow: 0 6px 28px rgba(0,0,0,0.22), 0 0 0 1px rgba(16,185,129,0.12); transform: translateY(-2px); }
.mh-tile-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--subtle);
  text-transform: uppercase;
}
.mh-tile-val {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.mh-tile-signal {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}
.mh-tile-signal.mh-green { color: var(--green); }
.mh-tile-signal.mh-red   { color: var(--red); }
.mh-tile-signal.mh-amber { color: var(--amber); }

/* ── Homepage Phase 2 — Decision Engine ─────────────────────── */
.hw-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.hw-bar-left { flex: 1; min-width: 240px; }
.hw-bar-right {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
  padding-top: 4px;
}
.hw-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--brand);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hw-eyebrow::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}
.hw-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin: 0 0 10px;
}
.hw-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
  letter-spacing: 0.02em;
  margin: 0;
}
.hw-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.hw-stat-num {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hw-stat-date {
  font-size: 14px;
  color: var(--muted);
}
.hw-stat-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--subtle);
  text-transform: uppercase;
}

/* Entry list */
.hw-entries {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow-y: auto;
  max-height: 340px;
  background: var(--bg-card);
  margin-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hi) transparent;
}
.hw-entries::-webkit-scrollbar { width: 4px; }
.hw-entries::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 2px; }
.hw-entries::-webkit-scrollbar-track { background: transparent; }
.hw-entry {
  display: grid;
  grid-template-columns: 28px 100px 1fr 130px 100px 90px 32px;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-sub);
  cursor: pointer;
  transition: background var(--t);
  text-decoration: none;
  color: inherit;
}
.hw-entry:last-child { border-bottom: none; }
.hw-entry:hover { background: var(--bg-hover); }
.hw-entry-rank {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
  text-align: right;
}
.hw-entry-asset { min-width: 0; }
.hw-entry-sym {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
}
.hw-entry-name {
  font-size: 11px;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.hw-entry-score-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hw-score-bar-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.hw-score-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--brand);
  transition: width 0.4s ease;
}
.hw-entry-score-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  min-width: 24px;
  text-align: right;
}
.hw-entry-sig { justify-self: start; }
.hw-entry-price {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
.hw-entry-chg {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}
.hw-entry-chg.pos { color: var(--green); }
.hw-entry-chg.neg { color: var(--red); }
.hw-entry-arrow {
  font-size: 14px;
  color: var(--subtle);
  text-align: center;
  transition: color var(--t);
}
.hw-entry:hover .hw-entry-arrow { color: var(--brand); }
.hw-empty {
  padding: 48px 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
  letter-spacing: 0.06em;
}

/* Skeleton */
.hw-skeleton { padding: 0; }
.hw-sk-row {
  height: 54px;
  border-bottom: 1px solid var(--border-sub);
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: loading-pulse 1.6s ease-in-out infinite;
}
.hw-sk-row:last-child { border-bottom: none; }

/* Avoid strip */
.hw-avoid-wrap {
  border: 1px solid var(--border-sub);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 0;
}
.hw-avoid-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  background: rgba(239,68,68,0.05);
  border-bottom: 1px solid rgba(239,68,68,0.12);
}
.hw-avoid-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--red);
  opacity: 0.8;
}
.hw-avoid-note {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--subtle);
}
.hw-avoid-list {
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hi) transparent;
}
.hw-avoid-list::-webkit-scrollbar { width: 4px; }
.hw-avoid-list::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 2px; }
.hw-avoid-list::-webkit-scrollbar-track { background: transparent; }
.hw-avoid-row {
  display: grid;
  grid-template-columns: 80px 1fr 60px 80px;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-sub);
  cursor: pointer;
  transition: background var(--t);
  text-decoration: none;
  color: inherit;
}
.hw-avoid-row:last-child { border-bottom: none; }
.hw-avoid-row:hover { background: var(--bg-hover); }
.hw-avoid-sym {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.hw-avoid-name {
  font-size: 11px;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hw-avoid-score {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
  text-align: right;
}

/* Compact article list */
.hw-article-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-card);
}
.hw-art-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-sub);
  cursor: pointer;
  transition: background var(--t);
  text-decoration: none;
  color: inherit;
}
.hw-art-row:last-child { border-bottom: none; }
.hw-art-row:hover { background: var(--bg-hover); }
.hw-art-tags { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hw-art-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.hw-art-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.hw-art-date {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--subtle);
  white-space: nowrap;
}
.hw-art-loading {
  padding: 32px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--subtle);
  letter-spacing: 0.08em;
}

@media (max-width: 900px) {
  .hw-entry {
    grid-template-columns: 22px 80px 1fr 80px 32px;
  }
  .hw-entry-score-wrap,
  .hw-entry-sig { display: none; }
}

/* ── CONTEXT FLAGS (VIX / 52W HI / EARNINGS) ─────────────────── */
.ctx-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}
.ctx-flag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid;
  line-height: 1.3;
}
.ctx-flag--vix  { color: #ef4444; background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.25); }
.ctx-flag--hi   { color: #f59e0b; background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.25); }
.ctx-flag--earn { color: #6366f1; background: rgba(99,102,241,0.10); border-color: rgba(99,102,241,0.25); }

/* ── SECTOR RELATIVE STRENGTH ─────────────────────────────────── */
.sector-delta {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 3px;
}
.sd-pos  { color: #22c55e; background: rgba(34,197,94,0.08); }
.sd-neg  { color: #ef4444; background: rgba(239,68,68,0.08); }
.sd-flat { color: var(--subtle); background: transparent; }

/* ── SCORE TREND (7-day delta) ───────────────────────────────── */
.score-trend {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.st-up { color: #22c55e; background: rgba(34,197,94,0.10); }
.st-dn { color: #ef4444; background: rgba(239,68,68,0.10); }

/* ── EARNINGS PROXIMITY WARNING ──────────────────────────────── */
.earnings-warn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f59e0b;
  background: rgba(245,158,11,0.10);
  border: 1px solid rgba(245,158,11,0.25);
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 3px;
}

/* Falling-knife flag — same shape as the earnings warning but red: a 79+
   score on a name down >10% over 3 months. Backtested worst cohort. */
.knife-warn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ef4444;
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.25);
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 3px;
}

/* Same shape as knife-warn — a recent earnings miss (not just upcoming
   earnings) and heavy recent insider selling, both real data. */
.earnings-miss-warn, .insider-warn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 3px;
}
.earnings-miss-warn {
  color: #ef4444;
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.25);
}
.insider-warn {
  color: #f59e0b;
  background: rgba(245,158,11,0.10);
  border: 1px solid rgba(245,158,11,0.25);
}

/* ── RELATIVE STRENGTH VS SPY ────────────────────────────────── */
.rs-spy {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 3px;
}
.rs-pos  { color: #22c55e; background: rgba(34,197,94,0.08); }
.rs-neg  { color: #ef4444; background: rgba(239,68,68,0.08); }
.rs-flat { color: var(--subtle); background: transparent; }

/* RS vs SPY visible only on row hover */
.score-extra-hover { display: none; }
tr:hover .score-extra-hover { display: inline; }

/* ── CONTEXT ADJUSTMENT SECTION (score drawer) ────────────────── */
.rbi-ctx-adj {
  border: 1px solid var(--border-hi);
  background: rgba(239,68,68,0.04);
}
.rbi-ctx-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-sub);
}
.rbi-ctx-row:last-child { border-bottom: none; }
.rbi-ctx-row--final { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--border); border-bottom: none; }
.rbi-ctx-label { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.06em; }
.rbi-ctx-val   { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text); }
.rbi-ctx-delta { font-size: 10px; color: #ef4444; margin-left: 4px; }
.rbi-ctx-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 0 6px;
}
.rbi-ctx-reason {
  font-family: var(--mono);
  font-size: 9px;
  color: #ef4444;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 3px;
  padding: 2px 6px;
  letter-spacing: 0.05em;
}
@media (max-width: 600px) {
  .hw-bar { flex-direction: column; gap: 16px; }
  .hw-bar-right { flex-direction: row; gap: 20px; padding-top: 0; }
  .hw-stat { align-items: flex-start; }
  .hw-title { font-size: clamp(24px, 7vw, 36px); }
  .hw-entry { grid-template-columns: 70px 1fr 70px 24px; gap: 8px; padding: 11px 14px; }
  .hw-entry-rank { display: none; }
  .hw-art-row { grid-template-columns: 1fr auto; }
  .hw-art-tags { display: none; }
}

/* ── CRYPTO ANALYTICS PANELS ─────────────────────────────────── */
.ci-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 0;
}
.ci-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 160px;
}
.ci-panel-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ci-panel-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--subtle);
  text-transform: uppercase;
}
.ci-panel-sub {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted, rgba(255,255,255,0.3));
}
.ci-loading {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
  padding: 8px 0;
}

/* Stablecoin list */
.ci-stable-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ci-stable-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
}
.ci-stable-sym {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  width: 40px;
  flex-shrink: 0;
}
.ci-stable-total {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  flex: 1;
}
.ci-stable-deltas {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 9px;
}
.ci-delta-label {
  color: var(--subtle);
  font-size: 8px;
  letter-spacing: 0.05em;
}
.ci-delta { font-weight: 700; }
.ci-delta-pos { color: #22c55e; }
.ci-delta-neg { color: #ef4444; }
.ci-delta-flat { color: var(--subtle); }

/* BTC Cycle */
.ci-cycle-body {
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 1;
}
.ci-cycle-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 72px;
}
.ci-cycle-score {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}
.ci-cycle-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}
.ci-cycle-regime {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 4px;
}
.ci-regime-fear    { color: #ef4444; background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25); }
.ci-regime-neutral { color: #f59e0b; background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25); }
.ci-regime-greed   { color: #22c55e; background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.25); }
.ci-cycle-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.ci-cycle-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ci-cycle-stat-label {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ci-cycle-stat-val {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
}
.ci-cycle-stat-sub {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
}

/* Volatility panel */
.ci-vol-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.ci-vol-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ci-vol-row:last-of-type { border-bottom: none; }
.ci-vol-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  letter-spacing: 0.06em;
  width: 56px;
  flex-shrink: 0;
}
.ci-vol-val {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.ci-vol-unit {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
}
.ci-vol-signal {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 2px;
  text-align: center;
  text-transform: uppercase;
}
.ci-vol-cheap    { color: #22c55e; background: rgba(34,197,94,0.10); border: 1px solid rgba(34,197,94,0.2); }
.ci-vol-rich     { color: #ef4444; background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.2); }
.ci-vol-balanced { color: #f59e0b; background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.2); }

/* 2-column row for dominance + network */
.ci-row-2 {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 12px;
}

/* Dominance panel */
.ci-dom-body { display: flex; flex-direction: column; gap: 10px; }
.ci-dom-stats { display: flex; gap: 12px; }
.ci-dom-stat { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.ci-dom-key { font-family: var(--mono); font-size: 8px; color: var(--subtle); letter-spacing: 0.06em; }
.ci-dom-val { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--text); }
.ci-dom-bar { height: 8px; border-radius: 4px; display: flex; overflow: hidden; background: rgba(255,255,255,0.06); gap: 1px; margin: 2px 0; }
.ci-dom-seg { height: 100%; transition: width 0.4s; border-radius: 2px; }
.ci-dom-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.ci-dom-lg { font-family: var(--mono); font-size: 8px; color: var(--subtle); }
.ci-dom-footer { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--subtle); margin-top: 2px; }
.ci-dom-footer strong { color: var(--text); }

/* BTC Network panel */
.ci-net-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ci-net-stat { display: flex; flex-direction: column; gap: 2px; }
.ci-net-label { font-family: var(--mono); font-size: 8px; color: var(--subtle); letter-spacing: 0.06em; }
.ci-net-val { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.1; }
.ci-net-sub { font-family: var(--mono); font-size: 9px; color: var(--subtle); }

@media (max-width: 900px) {
  .ci-row { grid-template-columns: 1fr 1fr; }
  .ci-panel:last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .ci-row { grid-template-columns: 1fr; }
  .ci-panel:last-child { grid-column: auto; }
}

/* ── NEWS CARD GRID ──────────────────────────────────────────── */
.nc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.nc-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.nc-card:hover { border-color: rgba(255,255,255,0.18); transform: translateY(-2px); }
.nc-img {
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}
.nc-placeholder-yahoo   { background: linear-gradient(135deg,#4f0dc8,#2563eb); }
.nc-placeholder-ct      { background: linear-gradient(135deg,#1a3a5c,#2563eb); }
.nc-placeholder-reuters { background: linear-gradient(135deg,#c00,#800); }
.nc-placeholder-default { background: linear-gradient(135deg,#1e293b,#334155); }
.nc-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}
.nc-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.nc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.nc-source {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.nc-time {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
}
@media (max-width: 900px) { .nc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .nc-grid { grid-template-columns: 1fr; } }

/* ── SCORE DRAWER ────────────────────────────────────────────── */
.score-drawer {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
}
.score-drawer--open { pointer-events: auto; }
.sd-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity 0.28s ease;
  backdrop-filter: blur(2px);
}
.score-drawer--open .sd-backdrop { opacity: 1; }
.sd-panel {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(400px, 96vw);
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
  box-shadow: -12px 0 48px rgba(0,0,0,0.45), var(--shadow-card);
}
.score-drawer--open .sd-panel { transform: translateX(0); }
.sd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sd-asset-info { display: flex; flex-direction: column; gap: 2px; }
.sd-ticker { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--text); }
.sd-aname  { font-size: 12px; color: var(--subtle); }
.sd-close  { background: none; border: none; color: var(--subtle); font-size: 18px; cursor: pointer; padding: 6px; border-radius: 6px; transition: background 0.15s, color 0.15s; min-width: 36px; min-height: 36px; display: flex; align-items: center; justify-content: center; }
.sd-close:hover { background: var(--border); color: var(--text); }
.sd-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.sd-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 24px; color: var(--subtle); font-size: 13px; }
.sd-spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: #6366f1; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sd-content { padding: 0 0 40px; }
.sd-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sd-ring-wrap { position: relative; flex-shrink: 0; width: 80px; height: 80px; }
.sd-ring-svg  { width: 80px; height: 80px; transform: rotate(-90deg); }
.sd-ring-bg   { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 6; }
.sd-ring-arc  { fill: none; stroke-width: 6; transition: stroke-dasharray 0.8s cubic-bezier(0.4,0,0.2,1), stroke 0.4s ease; }
.sd-ring-inner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.sd-score-big { font-family: var(--mono); font-size: 22px; font-weight: 800; transition: color 0.4s ease; }
.sd-hero-text { display: flex; flex-direction: column; gap: 8px; }
.sd-hero-q { margin: 0; font-size: 12px; color: var(--subtle); line-height: 1.4; }
.sd-section { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.sd-section:last-of-type { border-bottom: none; }
.sd-section-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #6366f1;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.sd-bd-table { display: flex; flex-direction: column; gap: 0; }
.sd-bd-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 13px;
}
.sd-bd-row:last-child { border-bottom: none; }
.sd-bd-label { color: var(--subtle); }
.sd-bd-hint  { font-size: 11px; color: var(--subtle); text-align: right; }
.sd-bd-pts   { font-family: var(--mono); font-size: 14px; font-weight: 700; min-width: 32px; text-align: right; }
.sd-bd-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.sd-explain { font-size: 13px; line-height: 1.75; color: var(--subtle); margin: 0; }
.sd-explain strong { color: var(--text); }
.sd-hist-nums { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.sd-hist-item { display: flex; flex-direction: column; gap: 2px; }
.sd-hist-lbl  { font-size: 10px; color: var(--subtle); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.sd-hist-val  { font-size: 18px; font-weight: 700; font-family: var(--mono); color: var(--text); }
.sd-hist-trend {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 4px;
  align-self: center;
}
.hist-up   { color: #22c55e; background: rgba(34,197,94,0.1); }
.hist-dn   { color: #ef4444; background: rgba(239,68,68,0.1); }
.hist-flat { color: var(--subtle); background: var(--border); }
.sd-hist-svg { width: 100%; height: 60px; display: block; overflow: visible; }
.sd-disclaimer { padding: 0 20px; font-size: 10px; color: var(--subtle); margin: 0; line-height: 1.5; }
.sd-valid-table { display: flex; flex-direction: column; gap: 4px; }
.sd-valid-row {
  display: grid;
  grid-template-columns: 48px 1fr 1fr 1fr 1fr 32px;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 6px;
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
}
.sd-valid-row--current { background: rgba(16,185,129,0.07); border: 1px solid rgba(16,185,129,0.18); }
.sd-valid-range { font-weight: 700; color: var(--subtle); font-size: 10px; }
.sd-valid-cell { display: flex; flex-direction: column; gap: 1px; }
.sd-valid-lbl  { font-size: 8px; color: var(--subtle); letter-spacing: 0.04em; }
.sd-valid-val  { font-size: 11px; font-weight: 700; color: var(--text); }
.sd-valid-count { color: var(--subtle); font-size: 9px; text-align: right; }
.sd-percentile-row {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: 6px;
  font-size: 11px;
  color: var(--subtle);
  line-height: 1.5;
}
/* ── Alternatives strip (score drawer) ────────────────────────── */
.sd-alt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sd-alt-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color var(--t), transform var(--t-fast), box-shadow var(--t);
}
.sd-alt-chip:hover { border-color: var(--border-hi); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.sd-alt-chip:active { transform: scale(0.97); transition-duration: 0.08s; }
.sd-alt-sym { font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--text); }
.sd-alt-score { font-family: var(--mono); font-size: 12px; font-weight: 700; }
.sd-alt-pill { font-size: 8px !important; padding: 2px 6px !important; }

.td-score-cell { cursor: pointer; }
.td-score-cell:hover .score-num { text-decoration: underline; text-decoration-style: dotted; }
body.sd-open { overflow: hidden; }
/* Drag handle — hidden by default, visible only in mobile bottom-sheet */
.sd-drag-handle { display: none; }

@media (max-width: 640px) {
  .sd-panel {
    right: 0; left: 0;
    top: auto; bottom: 0;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    max-height: 88vh;
    transform: translateY(100%);
    box-shadow: 0 -12px 48px rgba(0,0,0,0.45), var(--shadow-card);
  }
  .score-drawer--open .sd-panel { transform: translateY(0); }
  /* Drag handle pill */
  .sd-drag-handle {
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border-hi);
    border-radius: 2px;
    margin: 10px auto 2px;
    flex-shrink: 0;
  }
  /* Large, obvious close button on mobile bottom sheet */
  .sd-close {
    min-width: 44px;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 20px;
    background: var(--bg-alt);
    border-radius: 8px;
    color: var(--text);
  }
  .sd-header { padding: 14px 16px; }
}

/* ── MARKET HOURS TIMELINE ─────────────────────────────────────── */
.mht-wrap { margin-bottom: 36px; }
.mht-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.mht-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--brand);
  flex-shrink: 0;
}
.mht-card {
  background: linear-gradient(150deg, rgba(255,255,255,0.022) 0%, transparent 45%), var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.mht-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(16,185,129,0.38) 28%, rgba(255,255,255,0.07) 50%, rgba(16,185,129,0.38) 72%, transparent 100%);
  pointer-events: none;
}
html[data-theme="light"] .mht-card {
  background: var(--bg-card);
}
.mht-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.mht-exch-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--subtle);
  margin-bottom: 6px;
}
.mht-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mht-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--subtle);
  flex-shrink: 0;
}
.mht-dot.open  { background: var(--brand); box-shadow: 0 0 0 2px rgba(16,185,129,0.22), 0 0 10px rgba(16,185,129,0.55); animation: pulse-dot 2s ease-in-out infinite; }
.mht-dot.pre   { background: var(--amber); }
.mht-dot.after { background: var(--amber); }
.mht-status-txt {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}
.mht-countdown-wrap { text-align: right; }
.mht-countdown-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--subtle);
  margin-bottom: 2px;
}
.mht-countdown-val {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  transition: color 0.4s ease;
}
.mht-countdown-val.is-open {
  color: var(--brand);
  text-shadow: 0 0 24px rgba(16,185,129,0.45);
}
.mht-countdown-val.is-close-soon {
  color: var(--amber);
  text-shadow: 0 0 24px rgba(245,158,11,0.45);
}
.mht-countdown-label.is-open  { color: var(--brand); }
.mht-countdown-label.is-close-soon { color: var(--amber); }
/* timeline */
.mht-timeline-wrap {
  position: relative;
  margin-bottom: 28px;
}
.mht-axis {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-left: 48px;
}
.mht-axis-tick {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  letter-spacing: 0.04em;
  opacity: 0.55;
  flex: 1;
  text-align: left;
}
.mht-rows { display: flex; flex-direction: column; gap: 9px; position: relative; }
.mht-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mht-row-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--subtle);
  width: 38px;
  flex-shrink: 0;
  letter-spacing: 0.06em;
  transition: color 0.3s ease;
}
.mht-row[data-open="true"] .mht-row-label { color: var(--brand); }
.mht-row-track {
  flex: 1;
  height: 16px;
  background: rgba(255,255,255,0.024);
  border: 1px solid rgba(255,255,255,0.048);
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}
html[data-theme="light"] .mht-row-track {
  background: rgba(0,0,0,0.035);
  border-color: rgba(0,0,0,0.08);
}
.mht-row-bar {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 4px;
  opacity: 0.60;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.18) 0%, transparent 70%);
  background-blend-mode: overlay;
}
.mht-row-bar.is-open {
  opacity: 1;
  box-shadow: 0 0 10px var(--mht-bar-glow, rgba(16,185,129,0.35)) inset;
}
.mht-now-line {
  position: absolute;
  top: 22px;
  bottom: 0;
  width: 1.5px;
  background: rgba(255,255,255,0.78);
  pointer-events: none;
  box-shadow: 0 0 6px rgba(255,255,255,0.38), 0 0 16px rgba(255,255,255,0.14);
  transition: left 1s linear;
}
html[data-theme="light"] .mht-now-line { background: rgba(0,0,0,0.6); box-shadow: none; }
.mht-now-line::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.25), 0 0 10px rgba(255,255,255,0.55);
}
html[data-theme="light"] .mht-now-line::before { background: #111; box-shadow: none; }
/* clock grid */
.mht-clocks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.055);
  padding-top: 20px;
}
html[data-theme="light"] .mht-clocks { border-top-color: var(--border-sub); }
.mht-clock {
  position: relative;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.058);
  border-left: 3px solid var(--mht-accent, rgba(255,255,255,0.14));
  border-radius: 10px;
  padding: 12px 14px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.35s ease, opacity 0.35s ease;
}
html[data-theme="light"] .mht-clock {
  background: var(--bg-card);
  border-color: var(--border);
}
.mht-clock[data-status="open"] {
  background: rgba(var(--mht-accent-rgb, 16,185,129), 0.07);
  border-color: rgba(var(--mht-accent-rgb, 16,185,129), 0.28);
  border-left-color: var(--mht-accent, var(--brand));
  box-shadow: 0 0 0 1px rgba(var(--mht-accent-rgb, 16,185,129), 0.10) inset;
}
html[data-theme="light"] .mht-clock[data-status="open"] {
  background: rgba(var(--mht-accent-rgb, 16,185,129), 0.06);
}
.mht-clock[data-status="closed"] { opacity: 0.55; }
.mht-clock-time {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.mht-clock[data-status="open"] .mht-clock-time {
  color: var(--text);
}
.mht-clock-time-sec {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.55;
  letter-spacing: 0;
}
.mht-clock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.mht-clock-city {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.10em;
  color: var(--subtle);
  font-weight: 600;
  text-transform: uppercase;
}
.mht-clock-exch {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--mht-accent, var(--subtle));
  background: rgba(var(--mht-accent-rgb, 255,255,255), 0.10);
  padding: 1px 5px;
  border-radius: 3px;
}
.mht-clock-time {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.mht-clock-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}
.mht-clock-tz {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  letter-spacing: 0.06em;
}
.mht-clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--subtle);
}
html[data-theme="light"] .mht-clock-badge { border-color: var(--border); }
.mht-clock-badge.open {
  color: var(--brand);
  border-color: rgba(16,185,129,0.35);
  background: rgba(16,185,129,0.08);
}
.mht-clock-badge.open::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}
.mht-clock-badge.pre, .mht-clock-badge.after {
  color: var(--amber);
  border-color: rgba(232,151,26,0.35);
  background: rgba(232,151,26,0.08);
}
.mht-clock-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--mht-accent, var(--brand));
  border-radius: 0 1px 0 0;
  opacity: 0.55;
  max-width: 100%;
  pointer-events: none;
}
@media (max-width: 640px) {
  .mht-clocks { grid-template-columns: repeat(2,1fr); }
  .mht-countdown-val { font-size: 24px; }
  .mht-row-label { font-size: 9px; width: 30px; }
  .mht-clock-time { font-size: 22px; }
  .mht-axis { padding-left: 40px; }
}

/* ── SCORE GUIDE STRIP ───────────────────────────────────────── */
/* ── HOME-PAGE FOLD — collapses secondary sections one click deep ─ */
.home-fold-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 8px 0 40px;
  padding: 14px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.home-fold-toggle:hover { border-color: rgba(16,185,129,0.35); color: var(--text); }
.hft-chevron { transition: transform 0.25s ease; font-size: 10px; }
.home-fold-toggle[aria-expanded="true"] .hft-chevron { transform: rotate(180deg); }
@media (max-width: 640px) {
  .hft-label { text-align: left; }
}

/* ── IS TODAY A BUY DAY? strip ───────────────────────────────── */
.buyday {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
}
.buyday-q {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--subtle);
  white-space: nowrap;
}
.buyday-verdict {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.bd-green { color: var(--brand); }
.bd-acc   { color: #facc15; }
.bd-amber { color: #e8971a; }
.bd-red   { color: #ef4444; }
.buyday-detail {
  font-size: 13px;
  color: var(--subtle);
  flex: 1;
  min-width: 220px;
  line-height: 1.5;
}
.buyday-link {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}
.buyday-link:hover { text-decoration: underline; }

.score-guide {
  padding: 12px 4px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.sg-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.sg-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--subtle);
  white-space: nowrap;
}
.sg-today {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--subtle);
  white-space: nowrap;
}
.sg-today b { color: var(--text); font-weight: 700; }
.sg-track {
  position: relative;
  display: flex;
  height: 6px;
  border-radius: 3px;
}
.sg-seg { height: 100%; }
.sg-seg:first-child { border-radius: 3px 0 0 3px; }
.sg-seg:nth-last-child(2) { border-radius: 0 3px 3px 0; }
.sg-seg--avoid { background: rgba(239,68,68,0.30); }
.sg-seg--hold  { background: rgba(232,151,26,0.28); }
.sg-seg--acc   { background: rgba(250,204,21,0.30); }
.sg-seg--buy   { background: rgba(34,197,94,0.55); }
.sg-seg--sbuy  { background: var(--brand); }
.sg-marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  background: var(--text);
  border-radius: 1px;
}
.sg-ticks {
  position: relative;
  height: 13px;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
}
.sg-ticks span { position: absolute; transform: translateX(-50%); }
.sg-ticks span:first-child { transform: none; }
.sg-ticks span:last-child  { transform: translateX(-100%); }
.sg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--subtle);
}
.sg-key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sg-dot { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.sg-dot--avoid { background: #ef4444; }
.sg-dot--hold  { background: #e8971a; }
.sg-dot--acc   { background: #facc15; }
.sg-dot--buy   { background: #22c55e; }
.sg-dot--sbuy  { background: var(--brand); }
@media (max-width: 640px) {
  .sg-legend { gap: 3px 12px; font-size: 9px; }
}

/* ── ENTRY PLAN ──────────────────────────────────────────────── */
.sd-ep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.ep-card {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.ep-card--entry { border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.06); }
.ep-card--stop  { border-color: rgba(239,68,68,0.35);  background: rgba(239,68,68,0.06); }
.ep-card--t1    { border-color: rgba(16,185,129,0.30); background: rgba(16,185,129,0.05); }
.ep-card--t2    { border-color: rgba(99,102,241,0.30); background: rgba(99,102,241,0.05); }
.ep-card-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--subtle);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ep-rr-badge {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--subtle);
}
.ep-card-val {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.ep-card--entry .ep-card-val { color: #22c55e; }
.ep-card--stop  .ep-card-val { color: #ef4444; }
.ep-card--t1    .ep-card-val { color: #10b981; }
.ep-card--t2    .ep-card-val { color: #818cf8; }
.ep-sep { color: var(--subtle); }
.ep-card-sub {
  font-size: 12px;
  color: var(--subtle);
  line-height: 1.3;
}
/* Position size calculator */
.sd-possize { margin-top: 4px; padding: 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 10px; }
.sd-possize-label { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.10em; color: var(--subtle); margin-bottom: 10px; }
.sd-possize-row { display: flex; gap: 10px; margin-bottom: 10px; }
.sd-ps-field { display: flex; flex-direction: column; gap: 4px; flex: 1; font-family: var(--mono); font-size: 10px; color: var(--subtle); }
.sd-ps-iw { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; background: rgba(255,255,255,0.04); overflow: hidden; }
.sd-ps-prefix, .sd-ps-suffix { padding: 6px 7px; color: var(--subtle); font-size: 11px; background: rgba(255,255,255,0.03); }
.sd-ps-iw input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--text); font-family: var(--mono); font-size: 13px; font-weight: 600; padding: 6px 8px; }
.sd-ps-result { display: flex; flex-direction: column; gap: 4px; }
.ps-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.ps-row:last-child { border-bottom: none; }
.ps-lbl { font-family: var(--mono); font-size: 10px; color: var(--subtle); }
.ps-val { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text); }
.ps-risk { color: #ef4444; }
.ps-row--risk { margin-top: 2px; }

/* ── ENTRY CHECKLIST ─────────────────────────────────────────── */
.sd-checklist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
/* Passing/unknown rows stay quiet (no box) since passing is the common
   case — only a failing check needs to visually interrupt the list, so
   only .chk-fail gets the colored border+fill treatment. Six identical
   bordered pills per panel was the "wall of boxes" flat/AI-slop look. */
.sd-chk-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.sd-chk-row.chk-fail { border-color: rgba(239,68,68,0.25); background: rgba(239,68,68,0.05); padding: 9px 11px; }
.chk-icon {
  font-size: 13px;
  font-weight: 700;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  padding-top: 1px;
}
.chk-pass .chk-icon { color: #22c55e; }
.chk-fail .chk-icon { color: #ef4444; }
.chk-na   .chk-icon { color: var(--subtle); }
.chk-body { flex: 1; min-width: 0; }
.chk-label { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.chk-detail { font-size: 10px; color: var(--subtle); line-height: 1.4; }
.sd-cv {
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
}
.sd-cv--pass { background: rgba(34,197,94,0.10); border: 1px solid rgba(34,197,94,0.30); color: #22c55e; }
.sd-cv--mid  { background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.30); color: #f59e0b; }
.sd-cv--fail { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.25);  color: #ef4444; }

/* ── ENTRY PRICE ANALYSIS SIDEBAR ───────────────────────────── */
.ep-sidebar {
  display: none; /* mobile: hidden; shown via media query below */
}
.ep-sidebar-show-tab { display: none; }

@media (min-width: 1200px) {
  .ep-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 82px; /* below nav (52px) + ticker bar (30px) so close btn is never covered */
    width: 380px;
    height: calc(100vh - 82px);
    overflow-y: auto;
    background: var(--bg);
    border-left: 1px solid var(--border);
    z-index: 100;
    padding: 42px 18px 40px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    transition: transform 0.26s cubic-bezier(0.16,1,0.3,1);
  }

  /* Collapsed — slide off-screen */
  body.ep-sidebar-hidden .ep-sidebar {
    transform: translateX(100%);
  }

  /* Push ALL page content left when sidebar is visible.
     margin-right on body narrows the available viewport so the
     container (max-width: 1100px) naturally stays clear of the
     fixed sidebar — no content width is lost inside the container. */
  body:not(.ep-sidebar-hidden) {
    margin-right: 380px;
  }

  /* Close button — sticky at top of sidebar */
  .ep-sidebar-close-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    top: 10px;
    right: 12px;
    background: var(--bg-card, #0f1117);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--subtle);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    z-index: 2;
    white-space: nowrap;
  }
  .ep-sidebar-close-btn:hover {
    color: var(--text);
    border-color: var(--subtle);
    background: var(--bg-hover, #1a1d23);
  }

  /* Show tab — appears when sidebar is hidden */
  .ep-sidebar-show-tab {
    display: none;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card, #0f1117);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 6px 0 0 6px;
    color: var(--subtle);
    font-size: 18px;
    line-height: 1;
    padding: 10px 7px;
    cursor: pointer;
    z-index: 110;
    transition: color 0.15s, background 0.15s;
  }
  .ep-sidebar-show-tab:hover { color: var(--text); background: var(--bg-hover, #1a1d23); }

  body.ep-sidebar-hidden .ep-sidebar-show-tab {
    display: flex;
  }
}

/* Default (empty) state */
.ep-sidebar-default {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  gap: 12px;
  padding: 40px 20px;
}
.ep-sb-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--brand);
}
.ep-sb-default-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}
.ep-sb-default-desc {
  font-size: 13px;
  color: var(--subtle);
  line-height: 1.65;
  max-width: 280px;
}
.ep-sb-arrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
  margin-top: 8px;
  animation: ep-pulse 2s ease-in-out infinite;
}
@keyframes ep-pulse {
  0%, 100% { opacity: 0.4; } 50% { opacity: 1; }
}

/* Idle-state top picks */
.ep-sb-top-picks {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.ep-sb-picks-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--subtle);
  text-align: center;
  margin-bottom: 2px;
}
.ep-sb-pick-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  width: 100%;
  text-align: left;
}
.ep-sb-pick-btn:hover { border-color: var(--brand); background: rgba(16,185,129,0.06); }
.ep-sb-pick-sym {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.ep-sb-pick-score {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
}
.ep-sb-pick-sig {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  white-space: nowrap;
}

/* Filled state */
.ep-sb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ep-sb-asset { display: flex; flex-direction: column; gap: 3px; }
.ep-sb-ticker {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
}
.ep-sb-name {
  font-size: 13px;
  color: var(--subtle);
}
.ep-sb-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  color: var(--subtle);
  font-size: 12px;
}

/* Score hero in sidebar */
.ep-score-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
}
.ep-ring-wrap { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.ep-ring-svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.ep-ring-bg  { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 6; }
.ep-ring-arc { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
.ep-ring-score {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ep-hero-text { flex: 1; min-width: 0; }
.ep-hero-signal { margin-bottom: 4px; }
/* Plain-word translation of the technical signal — same score, friendlier
   word, shown alongside (not instead of) the original vocabulary. */
.ep-plain-word {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-left: 6px;
}
.ep-positioning {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--subtle);
  margin: 10px 0 16px;
  padding: 9px 11px;
  background: rgba(148, 163, 184, 0.06);
  border-left: 2px solid var(--border);
  border-radius: 4px;
}
.ep-rr-line {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 12px;
}
.ep-odds-inline {
  display: block;
  color: var(--subtle);
  font-size: 11.5px;
  font-style: italic;
  margin-top: 2px;
}
.ep-hero-q {
  font-size: 13px;
  color: var(--subtle);
  line-height: 1.4;
}
.ep-hero-price {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

/* Section label in sidebar */
.ep-sec-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--subtle);
  margin-bottom: 10px;
  margin-top: 16px;
}
.ep-sec-label-sub { font-weight: 500; letter-spacing: 0.02em; text-transform: none; color: var(--subtle); opacity: 0.75; }

/* Entry panel content — fades/lifts in on every ticker switch, not just
   first open. Was an instant snap before; clicking through several rows in
   a row felt like the panel was flickering rather than updating smoothly. */
.ep-sb-content-in { animation: epContentIn 0.28s cubic-bezier(0.16,1,0.3,1) both; }
@keyframes epContentIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ep-sb-content-in { animation: none; }
}

/* Plan cards in sidebar — reuse .ep-card styles from drawer */
.ep-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 12px;
}

/* Position size in sidebar */
.ep-possize {
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 4px;
}
.ep-possize-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--subtle);
  margin-bottom: 8px;
}
.ep-possize-row { display: flex; gap: 8px; margin-bottom: 8px; }
.ep-ps-field { display: flex; flex-direction: column; gap: 3px; flex: 1; font-family: var(--mono); font-size: 11px; color: var(--subtle); }
.ep-ps-iw { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 5px; background: rgba(255,255,255,0.04); overflow: hidden; }
.ep-ps-prefix, .ep-ps-suffix { padding: 5px 6px; color: var(--subtle); font-size: 12px; background: rgba(255,255,255,0.03); }
.ep-ps-iw input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--text); font-family: var(--mono); font-size: 14px; font-weight: 600; padding: 5px 6px; }
.ep-ps-result { display: flex; flex-direction: column; gap: 3px; }
.ep-ps-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.ep-ps-row:last-child { border-bottom: none; }
.ep-ps-lbl { font-family: var(--mono); font-size: 11px; color: var(--subtle); }
.ep-ps-val { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); }
.ep-ps-risk { color: #ef4444; }

/* Checklist in sidebar */
.ep-checklist { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
/* Same "quiet unless it fails" treatment as .sd-chk-row — passing/unknown
   rows stay unboxed, only a fail earns the colored border+fill. */
.ep-chk-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 3px;
  border-radius: 7px;
  border: 1px solid transparent;
}
.ep-chk-row.chk-fail { border-color: rgba(239,68,68,0.22); background: rgba(239,68,68,0.05); padding: 7px 10px; }
.ep-chk-icon { font-size: 13px; font-weight: 700; width: 16px; text-align: center; flex-shrink: 0; padding-top: 1px; }
.ep-chk-row.chk-pass .ep-chk-icon { color: #22c55e; }
.ep-chk-row.chk-fail .ep-chk-icon { color: #ef4444; }
.ep-chk-row.chk-na   .ep-chk-icon { color: var(--subtle); }
.ep-chk-label { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text); }
.ep-chk-detail { font-size: 11px; color: var(--subtle); margin-top: 1px; line-height: 1.4; }

.ep-verify-note { font-size: 11px; color: var(--subtle); line-height: 1.5; margin: 0 0 10px; }
.ep-verify-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.ep-verify-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  text-decoration: none;
  transition: border-color var(--t), background var(--t);
}
.ep-verify-item:hover { border-color: rgba(16,185,129,0.3); background: var(--brand-dim); }
.ep-verify-q { font-size: 11px; color: var(--text); line-height: 1.4; }
.ep-verify-link { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--brand); white-space: nowrap; flex-shrink: 0; }
.ep-cv {
  padding: 8px 12px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 4px;
}
.ep-cv--pass { background: rgba(34,197,94,0.10); border: 1px solid rgba(34,197,94,0.30); color: #22c55e; }
.ep-cv--mid  { background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.30); color: #f59e0b; }
.ep-cv--fail { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.25);  color: #ef4444; }

/* Score breakdown in sidebar */
.ep-bd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ep-bd-row:last-child { border-bottom: none; }
.ep-bd-label { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--subtle); flex: 1; }
.ep-bd-hint  { font-size: 11px; color: var(--subtle); max-width: 100px; text-align: right; }
.ep-bd-pts   { font-family: var(--mono); font-size: 13px; font-weight: 700; min-width: 30px; text-align: right; }

/* Score history in entry panel sidebar */
.ep-hist-wrap {
  margin-bottom: 16px;
}
.ep-hist-svg {
  width: 100%;
  height: 52px;
  display: block;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 8px;
}
.ep-hist-nums {
  display: flex;
  gap: 16px;
}
.ep-hist-num {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ep-hist-lbl {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--subtle);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ep-hist-num > span:last-child {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

/* Explain text */
.ep-explain {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
}

/* Alternatives strip (desktop entry sidebar) — same chip language as the
   mobile drawer's .sd-alt-*, just narrower since the sidebar is 380px. */
.ep-alt-row { display: flex; flex-direction: column; gap: 6px; }
.ep-alt-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.ep-alt-chip:hover { border-color: var(--border-hi); background: var(--bg-hover); }
.ep-alt-chip:active { transform: scale(0.98); transition-duration: 0.08s; }
.ep-alt-sym { font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--text); flex-shrink: 0; }
.ep-alt-score { font-family: var(--mono); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.ep-alt-pill { font-size: 8px !important; padding: 2px 6px !important; margin-left: auto; }

/* Deep dive link */
.ep-deep-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--subtle);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.ep-deep-link:hover { border-color: var(--brand); color: var(--brand); }

/* Active row highlight in rankings */
tr.row-active td { background: rgba(99,102,241,0.07) !important; }
tr.row-active td:first-child { border-left: 2px solid #6366f1; }

/* ── SCORE ACCURACY TRACKER ──────────────────────────────────── */
.acc-dashboard { margin-bottom: 8px; }
/* ── HOVER-TO-CHART POPOVER ──────────────────────────────────── */
.hover-chart {
  position: fixed; top: 0; left: 0; z-index: 9000;
  width: 250px; padding: 13px 14px 14px;
  background: linear-gradient(165deg, #121212 0%, #0c0c0c 100%);
  border: 1px solid rgba(16,185,129,0.28);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.03), 0 0 40px rgba(16,185,129,0.06);
  pointer-events: none;
  opacity: 0;
  /* scale as its own property (not folded into `transform`) — the JS
     positioning code sets `transform: translate(x,y)` on every mousemove,
     which would silently overwrite a scale baked into that same property.
     `scale` composes independently, so it survives that and actually
     animates instead of being permanently overwritten to 1 on first move. */
  scale: 0.93;
  transform-origin: 0 0;
  transition: opacity 0.18s cubic-bezier(0.16,1,0.3,1), scale 0.18s cubic-bezier(0.16,1,0.3,1);
  will-change: transform, scale, opacity;
}
.hover-chart--show { opacity: 1; scale: 1; }
.hc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hc-sym { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; line-height: 1.1; }
.hc-name { display: block; font-size: 9.5px; font-weight: 500; color: var(--subtle); letter-spacing: 0.02em; margin-top: 2px; text-transform: uppercase; }
.hc-price-wrap { text-align: right; }
.hc-price { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.hc-chg { font-family: var(--mono); font-size: 11px; font-weight: 600; margin-top: 1px; }
.hc-chg.up { color: #22c55e; }
.hc-chg.dn { color: #ef4444; }
.hc-chart { position: relative; height: 64px; margin-bottom: 11px; border-radius: 7px; overflow: hidden; background: rgba(255,255,255,0.015); }
.hc-svg { width: 100%; height: 100%; display: block; }
.hc-chart-lbl { position: absolute; top: 6px; left: 8px; font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.12em; color: rgba(255,255,255,0.28); }
.hc-noschart { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 10px; color: var(--subtle); }
.hc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.hc-stat { background: rgba(255,255,255,0.025); border-radius: 6px; padding: 7px 8px; text-align: center; }
.hc-stat span { display: block; font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.08em; color: var(--subtle); margin-bottom: 3px; }
.hc-stat b { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.hc-range { margin-top: 10px; }
.hc-range-track { position: relative; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #ef4444, #e8971a, #22c55e); opacity: 0.55; }
.hc-range-dot { position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid #0c0c0c; transform: translate(-50%, -50%); box-shadow: 0 0 6px rgba(255,255,255,0.5); }
.hc-range-lbls { display: flex; justify-content: space-between; margin-top: 4px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.05em; color: var(--subtle); }

/* ── TRACK RECORD / EDGE REPORT ──────────────────────────────── */
.edge-report { margin-bottom: 8px; }
.edge-loading, .edge-empty {
  font-family: var(--mono); font-size: 12.5px; color: var(--subtle);
  padding: 28px 16px; text-align: center;
}
.edge-head-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
}
.edge-periods { display: flex; gap: 6px; }
.edge-period {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  padding: 6px 14px; border-radius: 6px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--subtle);
  transition: border-color var(--t), color var(--t), background var(--t);
}
.edge-period:hover { border-color: var(--brand); color: var(--text); }
.edge-period--active { background: var(--brand); border-color: var(--brand); color: #fff; }
.edge-meta { font-family: var(--mono); font-size: 10.5px; color: var(--subtle); letter-spacing: 0.03em; }

.edge-headline {
  font-family: var(--font-display); font-size: clamp(18px, 2.6vw, 23px);
  font-weight: 700; letter-spacing: -0.01em; line-height: 1.45;
  color: var(--text); text-align: center; margin: 4px auto 22px; max-width: 620px;
}
.edge-headline .edge-num { font-size: inherit; font-weight: 800; }
.edge-headline .sig-pill { font-size: 13px; padding: 3px 10px; }

.edge-legend {
  font-size: 12.5px; line-height: 1.6; color: var(--muted);
  background: rgba(16,185,129,0.05); border: 1px solid rgba(16,185,129,0.14);
  border-radius: 8px; padding: 11px 14px; margin-bottom: 18px;
}
.edge-legend-row + .edge-legend-row { margin-top: 8px; }
.edge-legend strong { color: var(--brand); }

.edge-table-wrap { margin-bottom: 22px; }
.edge-table-title {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--subtle); text-transform: uppercase; margin-bottom: 8px;
}
.edge-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.edge-table th {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--subtle); text-align: right;
  padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.edge-table th:first-child { text-align: left; }
.edge-table td { padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); text-align: right; transition: background var(--t); }
.edge-table tbody tr:last-child td { border-bottom: none; }
.edge-table tbody tr:hover td { background: rgba(255,255,255,0.018); }
.edge-tier { text-align: left !important; }
.edge-range { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text); }
.edge-num { font-family: var(--mono); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.edge-sample { font-family: var(--mono); font-size: 11px; color: var(--subtle); font-variant-numeric: tabular-nums; }
/* Beats-market colour scale */
.edge-num.edge-strong { color: #22c55e; }
.edge-num.edge-ok     { color: #e8971a; }
.edge-num.edge-weak   { color: #ef4444; }
.edge-num.edge-pos    { color: #22c55e; }
.edge-num.edge-neg    { color: #ef4444; }
.edge-disclaimer { font-size: 11px; line-height: 1.55; color: var(--subtle); margin: 4px 0 0; }

.edge-regime-badge {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: 3px; white-space: nowrap; text-transform: uppercase;
}
.edge-regime-calm, .edge-regime-normal       { background: rgba(34,197,94,0.12);  color: #22c55e; }
.edge-regime-elevated                        { background: rgba(232,151,26,0.12); color: #e8971a; }
.edge-regime-stressed, .edge-regime-inverted { background: rgba(239,68,68,0.12);  color: #ef4444; }
@media (max-width: 560px) {
  .edge-table th, .edge-table td { padding: 9px 9px; }
  .edge-table th:nth-child(3), .edge-table td:nth-child(3) { display: none; } /* hide raw Win Rate on narrow */
}

.acc-divider { border: none; border-top: 1px solid var(--border); margin: 48px 0 0; }

.acc-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--subtle);
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

/* Summary cards */
.acc-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
@media (max-width: 640px) { .acc-cards { grid-template-columns: 1fr; } }

.acc-card {
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.acc-card--high { border-color: rgba(34,197,94,0.25);  background: rgba(34,197,94,0.04); }
.acc-card--mid  { border-color: rgba(245,158,11,0.25); background: rgba(245,158,11,0.04); }
.acc-card--low  { border-color: rgba(239,68,68,0.25);  background: rgba(239,68,68,0.04); }

.acc-card-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--subtle);
}
.acc-card--high .acc-card-label { color: #22c55e; }
.acc-card--mid  .acc-card-label { color: #f59e0b; }
.acc-card--low  .acc-card-label { color: #ef4444; }

.acc-card-sub   { font-size: 11px; color: var(--subtle); margin-bottom: 8px; }
.acc-card-empty { font-size: 12px; color: var(--subtle); font-style: italic; padding: 8px 0; }

.acc-card-pct {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 2px;
}
.acc-pct--good { color: #22c55e; }
.acc-pct--mid  { color: #f59e0b; }
.acc-pct--bad  { color: #ef4444; }

.acc-card-ret { font-size: 13px; font-weight: 600; }
.acc-ret--pos { color: #22c55e; }
.acc-ret--neg { color: #ef4444; }

.acc-card-n { font-family: var(--mono); font-size: 11px; color: var(--subtle); margin-top: 4px; }

/* Pending / empty states */
.acc-pending {
  text-align: center;
  padding: 48px 24px;
  background: rgba(255,255,255,0.015);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 32px;
}
.acc-pending-icon { font-size: 36px; margin-bottom: 12px; }
.acc-pending p    { color: var(--subtle); font-size: 14px; line-height: 1.7; max-width: 480px; margin: 0 auto 8px; }
.acc-pending-sub  { font-size: 12px !important; color: var(--subtle) !important; opacity: 0.7; }
.acc-empty        { color: var(--subtle); font-size: 13px; padding: 24px 0; }
.acc-progress-wrap  { width: 100%; max-width: 280px; margin: 16px auto 4px; height: 6px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; }
.acc-progress-bar   { height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6); border-radius: 3px; transition: width 0.6s ease; min-width: 4px; }
.acc-progress-label { font-family: var(--mono); font-size: 11px; color: var(--subtle); margin: 6px 0 16px; }

/* Prediction log table */
.acc-table-wrap { overflow-x: auto; }
.acc-table-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--subtle);
  margin-bottom: 10px;
}
.acc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.acc-table th {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--subtle);
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.acc-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-sub, rgba(255,255,255,0.04));
  vertical-align: middle;
  transition: background var(--t);
}
.acc-table tr:hover td { background: rgba(255,255,255,0.02); }

.acc-td-date { color: var(--subtle); font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.acc-td-sym  { font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--text); }
.acc-td-score { }
.acc-td-price { font-family: var(--mono); font-size: 11px; color: var(--subtle); }
.acc-td-ret   { font-family: var(--mono); font-size: 12px; font-weight: 700; }
.acc-td-verdict { text-align: center; }
.acc-empty-row { text-align: center; color: var(--subtle); padding: 24px !important; }

.acc-score-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  min-width: 32px;
}
.acc-dot--high { background: rgba(34,197,94,0.15);  color: #22c55e; }
.acc-dot--mid  { background: rgba(245,158,11,0.15); color: #f59e0b; }
.acc-dot--low  { background: rgba(239,68,68,0.12);  color: #ef4444; }

.acc-icon { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.acc-icon--pass { color: #22c55e; }
.acc-icon--fail { color: #ef4444; }
.acc-icon--na   { color: var(--subtle); }

/* ── NEWS LOAD MORE ──────────────────────────────────────────── */
.news-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
}
.news-load-more-btn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--subtle);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 28px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.news-load-more-btn:hover {
  color: var(--text);
  border-color: var(--brand);
  background: rgba(16,185,129,0.06);
}

/* ── MARKET BREADTH WIDGET ───────────────────────────────────────── */
.breadth-widget {
  padding: 16px 4px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.breadth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.breadth-heading {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--subtle);
}
.breadth-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--subtle);
  opacity: 0.55;
}
.breadth-bar {
  position: relative;
  display: flex;
  height: 7px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-alt);
  margin-bottom: 14px;
  gap: 1px;
}
.breadth-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: breadth-sweep 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breadth-sweep {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(250%); }
  100% { transform: translateX(250%); }
}
.breadth-seg {
  height: 100%;
  transition: width 0.7s cubic-bezier(0.4,0,0.2,1);
  min-width: 0;
}
.bs-sbuy  { background: var(--green); }
.bs-buy   { background: rgba(16,185,129,0.55); }
.bs-acc   { background: var(--amber); }
.bs-hold  { background: rgba(245,158,11,0.4); }
.bs-avoid { background: var(--red); }
.breadth-live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  vertical-align: middle;
  margin-right: 4px;
  position: relative;
  top: -1px;
  animation: breadth-pulse 2s ease-in-out infinite;
}
@keyframes breadth-pulse {
  0%, 100% { opacity: 1;    transform: scale(1);   }
  50%       { opacity: 0.3; transform: scale(0.55); }
}
.breadth-tiers {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}
.breadth-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.bt-num {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--mono);
  line-height: 1;
}
.bt-green { color: var(--green); }
.bt-amber { color: var(--amber); }
.bt-red   { color: var(--red); }
.bt-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  color: var(--subtle);
  opacity: 0.65;
  text-align: center;
}
.breadth-verdict {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 8px 14px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.bv-green { background: rgba(16,185,129,0.1);  color: var(--green); }
.bv-amber { background: rgba(245,158,11,0.1);  color: var(--amber); }
.bv-red   { background: rgba(239,68,68,0.09);  color: var(--red); }
.bv-neutral { background: var(--bg-alt); color: var(--subtle); }

/* ══════════════════════════════════════════════════════════════
   WATCHLIST + DAILY BRIEF
   ══════════════════════════════════════════════════════════════ */

.wl-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
  flex-wrap: wrap;
}
.wl-count-label { font-family: var(--mono); font-size: 11px; color: var(--subtle); letter-spacing: 0.06em; }
.wl-clear-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
}
.wl-clear-btn:hover { border-color: var(--red); color: var(--red); }
.wl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.wl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.wl-card:hover { border-color: var(--border-hi); }
.wl-card--pending { opacity: 0.4; cursor: default; }
.wl-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.wl-card-asset { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wl-card-sym { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text); }
.wl-card-name { font-size: 11px; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.wl-card-remove {
  background: none; border: none; cursor: pointer; color: var(--subtle);
  font-size: 11px; padding: 2px 4px; border-radius: 3px; flex-shrink: 0; line-height: 1;
  transition: color var(--t), background var(--t);
}
.wl-card-remove:hover { color: var(--red); background: rgba(239,68,68,0.08); }
.wl-card-price { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--text); }
.wl-card-score-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wl-card-score-num { font-family: var(--mono); font-size: 22px; font-weight: 700; }
.wl-analyze-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  width: 100%;
  margin-top: 2px;
}
.wl-analyze-btn:hover { border-color: var(--brand); background: rgba(16,185,129,0.06); }
.wl-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 80px 24px; }
.wl-empty-icon { font-size: 40px; opacity: 0.35; }
.wl-empty-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--muted); }
.wl-empty-desc { font-size: 13px; color: var(--subtle); max-width: 300px; line-height: 1.65; }
.wl-empty-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand); font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; border: 1px solid rgba(16,185,129,0.3); border-radius: 6px;
  padding: 8px 18px; margin-top: 8px; text-decoration: none;
  transition: border-color var(--t), background var(--t);
}
.wl-empty-link:hover { border-color: var(--brand); background: rgba(16,185,129,0.06); }
.daily-brief {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(16,185,129,0.04);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--r);
  padding: 11px 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.brief-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--brand);
  flex-shrink: 0;
  padding-top: 2px;
}
.brief-text { font-size: 12px; color: var(--muted); line-height: 1.7; flex: 1; min-width: 0; }
.brief-text strong { color: var(--text); font-weight: 700; }
.brief-regime {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; margin-right: 2px; vertical-align: middle;
}
.br-risk-on  { background: rgba(34,197,94,0.1);  color: #22c55e; }
.br-neutral  { background: rgba(245,158,11,0.1); color: #f59e0b; }
.br-risk-off { background: rgba(239,68,68,0.1);  color: #ef4444; }
.brief-pick {
  color: var(--text); font-weight: 700; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.15); transition: color var(--t);
}
.brief-pick:hover { color: var(--brand); }

/* ══════════════════════════════════════════════════════════════
   WATCHLIST + DAILY BRIEF
   ══════════════════════════════════════════════════════════════ */

/* Hide entry panel sidebar on pages where it has no context */
body.sidebar-irrelevant #epSidebar,
body.sidebar-irrelevant .ep-sidebar-show-tab { display: none !important; }

/* Rankings error retry button */
.retry-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--brand);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
  margin-left: 12px;
  transition: border-color var(--t), background var(--t);
}
.retry-btn:hover { border-color: var(--brand); background: rgba(16,185,129,0.06); }

/* Daily brief shimmer loading state */
.daily-brief--loading { opacity: 1; }
.brief-shimmer {
  flex: 1;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--border) 25%, var(--border-hi) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  max-width: 480px;
  align-self: center;
}

/* ── THE RECEIPTS — home-page proof section: last week's 85+ calls,
   graded from the day each call fired. Hit-rate is the hook. */
@keyframes pfCardFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pf-grid { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.pf-summary {
  background: linear-gradient(160deg, rgba(99,102,241,0.12), rgba(99,102,241,0.04));
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: var(--r);
  padding: 32px 28px;
  display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.pf-rate {
  font-family: var(--font-display); font-size: 72px; font-weight: 800;
  color: var(--green); line-height: 0.95; letter-spacing: -0.02em;
  animation: pfCardFadeUp 600ms cubic-bezier(0.22,1,0.36,1) both;
}
.pf-rate-pct { font-size: 36px; }
.pf-rate-cap { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 8px; }
.pf-substats { display: flex; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.pf-substat { font-size: 12px; color: var(--muted); }
.pf-substat strong { font-family: var(--mono); color: var(--text); font-weight: 700; }
.pf-honest { font-size: 13px; color: var(--muted); line-height: 1.65; margin: 18px 0 24px; flex: 1; }
.pf-summary .btn { align-self: flex-start; }
.pf-winners { display: flex; flex-direction: column; gap: 16px; }
.pf-tabs {
  display: flex; gap: 8px; padding: 0 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.pf-tab {
  background: none; border: none; padding: 10px 12px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 200ms, border-color 200ms;
  display: flex; align-items: center; gap: 6px;
}
.pf-tab:hover { color: var(--text); }
.pf-tab--active {
  color: var(--green);
  border-bottom-color: var(--green);
}
.pf-tab-count {
  font-size: 10px; font-weight: 600;
  background: rgba(34,197,94,0.12); color: var(--green);
  padding: 2px 6px; border-radius: 3px;
}
.pf-tab-pane { display: none; }
.pf-tab-pane--active { display: block; animation: fadeUpIn 200ms ease-out; }
/* Ranked list — replaces a uniform card grid with rows sized by magnitude.
   Each row's own fill length is proportional to its % move (sequential,
   one hue, a wash never a block — the row IS the mini bar chart), so the
   whole list reads as a ranking at a glance instead of 50 identical boxes. */
/* Elevated panel wrapper — .pf-summary already carries a shadow+border
   treatment; the row list next to it used to float directly on the page
   background with no card of its own, the clearest "flat" gap on this
   component. Give it the same weight its sibling already has. */
.pf-list {
  display: flex; flex-direction: column;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  overflow: hidden;
}
.pf-row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-sub);
  text-align: left; cursor: pointer;
  font-family: inherit; color: inherit;
  background: none; border-left: none; border-right: none; border-top: none;
  width: 100%;
  overflow: hidden;
  animation: pfCardFadeUp 220ms cubic-bezier(0.22,1,0.36,1) both;
  transition: background 150ms;
}
.pf-row:first-child { border-top: none; }
.pf-row:last-child { border-bottom: none; }
.pf-row:hover { background: var(--bg-hover); }
.pf-row-fill {
  position: absolute; inset: 0 auto 0 0;
  width: var(--pf-fill, 0%);
  background: rgba(34,197,94,0.08);
  pointer-events: none;
  transition: width 500ms cubic-bezier(0.22,1,0.36,1);
}
.pf-row--top .pf-row-fill { background: rgba(34,197,94,0.14); }
.pf-rank {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--subtle); width: 16px; flex-shrink: 0; text-align: right;
  position: relative;
}
.pf-row--top .pf-rank { color: var(--green); }
.pf-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  position: relative;
  background: var(--pf-avatar-bg, var(--bg-hover));
  border: 1.5px solid var(--pf-score-color, var(--border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pf-score-color, transparent) 18%, transparent);
  transition: transform 150ms;
}
.pf-row:hover .pf-avatar { transform: scale(1.06); }
.pf-row--top .pf-avatar { width: 32px; height: 32px; }
.pf-avatar img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.pf-avatar-fb { font-family: var(--font-display); font-size: 11px; font-weight: 800; color: #fff; }
.pf-row-id {
  display: flex; align-items: baseline; gap: 7px; min-width: 0; flex: 1;
  position: relative;
}
.pf-row-sym { font-family: var(--mono); font-size: 13px; font-weight: 800; color: var(--text); letter-spacing: 0.01em; flex-shrink: 0; }
.pf-row--top .pf-row-sym { font-size: 14px; }
.pf-row-name { font-size: 11px; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-row-score {
  font-family: var(--mono); font-size: 10px; font-weight: 800;
  color: var(--pf-score-color, var(--muted));
  background: color-mix(in srgb, var(--pf-score-color, transparent) 14%, transparent);
  border-radius: 4px; padding: 1px 6px; flex-shrink: 0;
  position: relative;
}
.pf-row-meta {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  white-space: nowrap; flex-shrink: 0; display: none;
  position: relative;
}
.pf-row-pct {
  font-family: var(--font-display); font-size: 15px; font-weight: 800; color: var(--green);
  flex-shrink: 0; margin-left: auto; padding-left: 10px;
  position: relative;
}
.pf-row--top .pf-row-pct { font-size: 17px; }
@media (min-width: 720px) {
  .pf-row-meta { display: block; }
}
@media (max-width: 900px) {
  .pf-grid { grid-template-columns: 1fr; gap: 16px; }
  .pf-rate { font-size: 56px; }
  .pf-summary { padding: 24px 20px; }
}
@media (max-width: 640px) {
  .pf-row { padding: 9px 10px; gap: 9px; }
  .pf-row-sym { font-size: 12px; }
  .pf-row-pct { font-size: 13px; }
  .pf-row--top .pf-row-pct { font-size: 15px; }
  .pf-row-name { display: none; }
}

/* Star button */
.wl-star {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--subtle);
  transition: color var(--t), transform 0.15s, opacity var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex-shrink: 0;
}
.wl-star:hover { color: #f59e0b; transform: scale(1.25); }
/* Pop on the moment it turns on — was an instant color swap with zero
   feedback for the actual click; every other toggle-style control on the
   site (score bars, row fade-ins) animates something, this didn't. Runs
   once because a freshly-added class replays its animation; toggling off
   and back on replays it again, which is the expected feel for a favorite
   button. */
.wl-star--on { color: #f59e0b; animation: wlStarPop 380ms cubic-bezier(0.34,1.56,0.64,1); }
@keyframes wlStarPop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.45) rotate(-8deg); }
  65%  { transform: scale(0.92) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) { .wl-star--on { animation: none; } }
.wl-star--on:hover { opacity: 0.7; }

/* Watchlist page */
.wl-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
  flex-wrap: wrap;
}
.wl-count-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
  letter-spacing: 0.06em;
}
.wl-clear-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
}
.wl-clear-btn:hover { border-color: var(--red); color: var(--red); }
.wl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.wl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.wl-card:hover { border-color: var(--border-hi); }
.wl-card--pending { opacity: 0.4; cursor: default; }
.wl-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.wl-card-asset {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wl-card-sym {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.wl-card-name {
  font-size: 11px;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.wl-card-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--subtle);
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color var(--t), background var(--t);
  flex-shrink: 0;
  line-height: 1;
}
.wl-card-remove:hover { color: var(--red); background: rgba(239,68,68,0.08); }
.wl-card-price {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.wl-card-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wl-card-score-num {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
}
.wl-analyze-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  width: 100%;
  margin-top: 2px;
}
.wl-analyze-btn:hover { border-color: var(--brand); background: rgba(16,185,129,0.06); }
.wl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 80px 24px;
}
.wl-empty-icon { font-size: 40px; opacity: 0.35; }
.wl-empty-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--muted);
}
.wl-empty-desc { font-size: 13px; color: var(--subtle); max-width: 300px; line-height: 1.65; }
.wl-empty-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand); font-family: var(--mono); font-size: 11px;
  font-weight: 700; letter-spacing: 0.08em;
  border: 1px solid rgba(16,185,129,0.3); border-radius: 6px;
  padding: 8px 18px; margin-top: 8px; text-decoration: none;
  transition: border-color var(--t), background var(--t);
}
.wl-empty-link:hover { border-color: var(--brand); background: rgba(16,185,129,0.06); }

/* Daily Brief */
.daily-brief {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(16,185,129,0.04);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--r);
  padding: 11px 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.brief-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--brand);
  flex-shrink: 0;
  padding-top: 2px;
}
.brief-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  min-width: 0;
}
.brief-text strong { color: var(--text); font-weight: 700; }
.brief-regime {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 2px;
  vertical-align: middle;
}
.br-risk-on  { background: rgba(34,197,94,0.1); color: #22c55e; }
.br-neutral  { background: rgba(245,158,11,0.1); color: #f59e0b; }
.br-risk-off { background: rgba(239,68,68,0.1);  color: #ef4444; }
.brief-pick {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  transition: color var(--t);
}
.brief-pick:hover { color: var(--brand); }

/* ── AUTH NAV BUTTON ─────────────────────────────────────────── */
.auth-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-hi);
  background: var(--bg-card);
  color: var(--muted);
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t);
  flex-shrink: 0;
  margin-left: 6px;
}
.auth-nav-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-dim);
}
.auth-avatar {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.02em;
}
.auth-nav-btn[data-state="in"] {
  border-color: var(--brand);
  background: var(--brand-dim);
}

/* ── AUTH MODAL ──────────────────────────────────────────────── */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  /* Same reasoning as .alert-overlay above: a display-toggled element replays
     its keyframe animation on every re-open with zero JS changes needed. */
  animation: modalBackdropIn 220ms ease both;
}
.auth-modal-box {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  padding: 40px 36px 36px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lift);
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: modalCardIn 260ms cubic-bezier(0.16,1,0.3,1) both;
}
@media (prefers-reduced-motion: reduce) {
  .auth-modal-overlay, .auth-modal-box { animation: none; }
}
.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--t), border-color var(--t);
}
.auth-modal-close:hover { color: var(--text); border-color: var(--border-hi); }
.auth-modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-dim);
  border: 1px solid rgba(16,185,129,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin-bottom: 20px;
}
.auth-modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.auth-modal-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-email-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--t);
}
.auth-email-input::placeholder { color: var(--subtle); }
.auth-email-input:focus { border-color: var(--brand); }
.auth-submit-btn { width: 100%; padding: 12px; font-size: 13px; letter-spacing: 0.08em; }
.auth-msg {
  font-size: 12px;
  color: var(--red);
  margin-top: 8px;
  min-height: 18px;
}
.auth-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0 4px;
  text-align: center;
}
.auth-confirm-icon { font-size: 36px; line-height: 1; }
.auth-confirm-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.auth-close-btn {
  padding: 9px 24px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-hi);
  background: var(--bg-hover);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--t);
}
.auth-close-btn:hover { background: var(--bg-elevated); }

/* ── BACKTEST SAVE BUTTON ────────────────────────────────────── */
.bt-save-row {
  display: flex;
  justify-content: flex-end;
  padding: 12px 0 4px;
}
.bt-save-btn {
  padding: 7px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-hi);
  background: var(--bg-hover);
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.bt-save-btn:hover:not(:disabled) {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-dim);
}
.bt-save-btn:disabled { opacity: 0.5; cursor: default; }

/* ── SAVED BACKTESTS ─────────────────────────────────────────── */
.saved-bt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 40px 0 14px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.saved-bt-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--subtle);
  text-transform: uppercase;
}
.saved-bt-count { font-size: 11px; color: var(--subtle); }
.saved-bt-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.saved-bt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  flex: 1 1 160px;
  max-width: 220px;
}
.saved-bt-ticker {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.saved-bt-lbl {
  font-size: 11px;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.saved-bt-acts {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.saved-bt-run {
  flex: 1;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-hi);
  background: var(--brand-dim);
  color: var(--brand);
  font-size: 11px;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--t);
}
.saved-bt-run:hover { background: var(--brand-hi); }
.saved-bt-del {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--subtle);
  font-size: 11px;
  cursor: pointer;
  transition: color var(--t), border-color var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
}
.saved-bt-del:hover { color: var(--red); border-color: var(--red); }

/* ── ALERT EMAIL NOTE ────────────────────────────────────────── */
.alert-email-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--subtle);
  display: flex;
  align-items: center;
}
.alert-email-note--on {
  color: var(--brand);
  font-weight: 500;
}
.alert-signin-prompt {
  background: none;
  border: 1px dashed var(--border-hi);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  width: 100%;
  transition: border-color var(--t), color var(--t);
  font-family: var(--font);
}
.alert-signin-prompt:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL & BACKGROUND POLISH v64
   ═══════════════════════════════════════════════════════════════ */

/* ── Scroll progress bar ─────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand) 0%, rgba(16,185,129,0.4) 100%);
  z-index: 10000;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── Sections need position:relative for pseudo-element glows ── */
.section, .section-alt { position: relative; }

/* ── Dot-grid texture on alt sections ───────────────────────── */
.section-alt {
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ── Per-section ambient glows ───────────────────────────────── */
/* Rankings — brand green top-right */
#rankings::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -180px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(16,185,129,0.055) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
/* Backtest — indigo bottom-left */
#backtest::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -150px;
  width: 600px;
  height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.055) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
/* Macro — amber center-right */
#macro::after {
  content: '';
  position: absolute;
  top: 10%;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232,151,26,0.04) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
/* Watchlist — teal top-left */
#watchlist::after {
  content: '';
  position: absolute;
  top: -60px;
  left: -100px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(20,184,166,0.05) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
/* Smart money — purple mid */
#smart-money::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(139,92,246,0.04) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
/* Hero extra bottom glow */
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 280px;
  background: radial-gradient(ellipse, rgba(16,185,129,0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 2;
}

/* ── Section children sit above pseudo-element glows ─────────── */
.section .container,
.section-alt .container { position: relative; z-index: 1; }

/* ── Sec-header scroll entrance ──────────────────────────────── */
.sec-header.anim-ready   { opacity: 0; transform: translateY(22px); }
.sec-header.animate-in   { opacity: 1; transform: translateY(0); }
.sec-label.anim-ready    { opacity: 0; transform: translateY(12px); }
.sec-label.animate-in    { opacity: 1; transform: translateY(0); }
.sec-title.anim-ready    { opacity: 0; transform: translateY(16px); }
.sec-title.animate-in    { opacity: 1; transform: translateY(0); }
.sec-sub.anim-ready      { opacity: 0; }
.sec-sub.animate-in      { opacity: 1; }

/* Reuse existing transition from .anim-ready — add specificity */
.sec-header, .sec-label, .sec-title, .sec-sub {
  transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1),
              transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ── Horizontal slide variant (for stats / hw-stat) ─────────── */
.anim-from-left {
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 0.45s cubic-bezier(0.4,0,0.2,1),
              transform 0.45s cubic-bezier(0.4,0,0.2,1);
}
.anim-from-left.animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* ── Hero parallax — video moves slower than scroll ─────────── */
.hero-video { will-change: transform; }

/* ── Floating orb behind hero (pure CSS animation) ───────────── */
.hero-glow {
  animation: orb-drift 14s ease-in-out infinite alternate;
}
@keyframes orb-drift {
  from { transform: translate(-50%, -50%) scale(1);   opacity: 0.7; }
  to   { transform: translate(-50%, -50%) scale(1.22); opacity: 1;   }
}

/* ── Section-enter: stagger containers on page switch ────────── */
[data-page].page-active .sec-header    { animation: pageFadeIn 0.38s cubic-bezier(0.22,1,0.36,1) 0.06s both; }
[data-page].page-active .sec-sub       { animation: pageFadeIn 0.38s cubic-bezier(0.22,1,0.36,1) 0.13s both; }

/* Override — don't double-animate if scroll observer already handled it */
[data-page].page-active .sec-header.animate-in,
[data-page].page-active .sec-sub.animate-in {
  animation: none;
}

/* ── Wl-card and acc-dashboard cards enter on scroll ─────────── */
.wl-card.anim-ready  { opacity: 0; transform: translateY(16px) scale(0.98); }
.wl-card.animate-in  { opacity: 1; transform: translateY(0) scale(1); }
.wl-card {
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1),
              transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ── hw-stat numbers pop in ──────────────────────────────────── */
.hw-stat.anim-ready  { opacity: 0; transform: translateY(10px); }
.hw-stat.animate-in  { opacity: 1; transform: translateY(0); }
.hw-stat {
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ── Market Close Section ────────────────────────────────────── */
.mc-status {
  font-size: 12px;
  color: #555;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.mc-indices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 28px 0 36px;
}

.mc-idx-card {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 12px;
  padding: 20px 18px;
  transition: border-color 0.2s;
}
.mc-idx-card:hover { border-color: #2c2c2c; }

.mc-idx-name {
  font-size: 10px;
  font-weight: 700;
  color: #555;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.mc-idx-price {
  font-size: 22px;
  font-weight: 800;
  color: #f2f2f2;
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.mc-idx-change {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
}
.mc-idx-change.pos { color: #22c55e; }
.mc-idx-change.neg { color: #ef4444; }
.mc-idx-change.neu { color: #666; }

.mc-idx-pts {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.7;
}

.mc-sector-hd {
  font-size: 10px;
  font-weight: 700;
  color: #444;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
}

.mc-sectors {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.mc-sector-tile {
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  transition: opacity 0.2s;
}
.mc-sector-tile:hover { opacity: 0.85; }

.mc-sector-sym {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.mc-sector-name {
  font-size: 9px;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.mc-sector-pct {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

@media (max-width: 900px) {
  .mc-indices { grid-template-columns: repeat(2, 1fr); }
  .mc-sectors { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .mc-indices { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .mc-idx-price { font-size: 18px; }
  .mc-sectors { grid-template-columns: repeat(3, 1fr); }
}

/* ── Cookie Consent Banner ───────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  width: calc(100% - 40px);
  /* Below every modal/drawer (score drawer 900, toast 998, alert 1000) so an
     undismissed cookie notice can't sit on top of and collide with them —
     it only needs to clear the nav bar (200). */
  z-index: 250;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  animation: slideUp 0.3s cubic-bezier(0.22,1,0.36,1);
}
/* Still above the nav bar, so it was sitting on top of the open mobile
   menu's bottom links too — hide it while any full-screen overlay is up.
   !important because the cookie-consent script sets display:flex as an
   inline style, which otherwise beats a plain class/descendant rule. */
body:has(.mobile-nav.open) .cookie-banner,
body.sd-open .cookie-banner,
body:has(.artread--open) .cookie-banner { display: none !important; }
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}
.cookie-text {
  font-size: 12px;
  color: #888;
  margin: 0;
  line-height: 1.5;
  flex: 1;
}
.cookie-link { color: #10b981; text-decoration: none; }
.cookie-link:hover { text-decoration: underline; }
.cookie-ok {
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--t), transform var(--t-fast);
}
.cookie-ok:hover { background: #0d9a70; transform: translateY(-1px); }
.cookie-ok:active { transform: scale(0.96); transition-duration: 0.08s; }

/* ── First-visit score guide ─────────────────────────────────── */
.score-guide-toast {
  position: fixed;
  top: 72px;
  right: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hi);
  border-left: 3px solid var(--brand);
  border-radius: var(--r);
  padding: 14px 16px;
  max-width: 260px;
  z-index: 998;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  animation: slideIn 0.35s cubic-bezier(0.22,1,0.36,1);
}
/* Fixed top-right — collides with the open mobile menu or an open
   drawer/reader if the 12s auto-dismiss hasn't fired yet. */
body:has(.mobile-nav.open) .score-guide-toast,
body.sd-open .score-guide-toast,
body:has(.artread--open) .score-guide-toast { display: none; }
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.sgt-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.sgt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 12px;
  color: var(--muted);
}
.sgt-score {
  font-size: 15px;
  font-weight: 800;
  width: 34px;
  text-align: right;
  flex-shrink: 0;
}
.sgt-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--subtle);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  transition: color var(--t);
}
.sgt-close:hover { color: var(--text); }
/* On narrow viewports this was sitting directly on top of the hero
   headline (confirmed — the thing every first-time visitor sees first).
   Below ~560px it docks as a full-width bar under the nav instead of a
   floating card, so it never overlaps page content. */
@media (max-width: 560px) {
  .score-guide-toast {
    top: 60px;
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* ── Skip-to-content link (accessibility) ──────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 12px;
  padding: 8px 16px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

/* ── Market section skeleton shimmer ───────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.mc-skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 10px;
  pointer-events: none;
  min-height: 72px;
}

/* ── Share today's read (social distribution) ─────────────────── */
.sec-header-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.share-read-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand); color: #06111f;
  border: none; border-radius: 999px;
  padding: 9px 16px; font-size: 13px; font-weight: 700;
  letter-spacing: .01em; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, filter .12s ease;
}
.share-read-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.share-read-btn:active { transform: translateY(0); }

.share-pop { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.share-pop[hidden] { display: none; }
.share-pop-backdrop { position: absolute; inset: 0; background: rgba(4, 8, 16, .62); backdrop-filter: blur(3px); }
.share-pop-card {
  position: relative; width: 100%; max-width: 460px;
  background: var(--bg-card); border: 1px solid var(--border, rgba(148,163,184,.18));
  border-radius: 16px; padding: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.share-pop-head { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.share-pop-x { background: none; border: none; color: var(--subtle); font-size: 16px; cursor: pointer; line-height: 1; padding: 4px; transition: color var(--t); }
.share-pop-x:hover { color: var(--text); }
.share-pop-sub { color: var(--subtle); font-size: 12.5px; line-height: 1.55; margin: 0 0 14px; }
.share-pop-text {
  width: 100%; box-sizing: border-box; resize: vertical;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border, rgba(148,163,184,.22)); border-radius: 10px;
  padding: 12px; font-size: 14px; line-height: 1.5; font-family: inherit;
}
.share-pop-text:focus { outline: none; border-color: var(--brand); }
.share-pop-count { text-align: right; color: var(--subtle); font-size: 11px; margin: 6px 2px 14px; }
.share-pop-count.over { color: #f87171; }
.share-pop-actions { display: flex; gap: 10px; }
.share-btn { flex: 1; border: none; border-radius: 10px; padding: 11px 8px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: filter .12s ease, transform .12s ease; }
.share-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.share-btn--x  { background: #000; color: #fff; }
.share-btn--st { background: #1e88e5; color: #fff; }
.share-btn--cp { background: var(--bg); color: var(--text); border: 1px solid var(--border, rgba(148,163,184,.28)); }
.share-btn--cp.copied { background: var(--brand); color: #06111f; border-color: transparent; }
html[data-theme="light"] .share-read-btn,
html[data-theme="light"] .share-btn--cp.copied { color: #fff; }
@media (max-width: 480px) { .share-pop-actions { flex-wrap: wrap; } .share-btn { flex: 1 1 40%; } }

/* ── Homepage handoffs: no dead-end sections ──────────────────── */
.home-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 22px; color: var(--brand); font-weight: 700; font-size: 14px;
  text-decoration: none; letter-spacing: .01em;
}
.home-more:hover { text-decoration: underline; }
.home-more--center { display: flex; justify-content: center; width: 100%; margin-top: 28px; }

.hw-cta-row { display: flex; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.hw-cta-primary {
  display: inline-flex; align-items: center;
  background: var(--brand); color: #06111f; border-radius: 999px;
  padding: 11px 20px; font-weight: 700; font-size: 14px; text-decoration: none;
  transition: transform .12s ease, filter .12s ease;
}
.hw-cta-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.hw-cta-secondary { color: var(--subtle); font-weight: 600; font-size: 14px; text-decoration: none; transition: color var(--t); }
.hw-cta-secondary:hover { color: var(--text); }
html[data-theme="light"] .hw-cta-primary { color: #fff; }

/* Proof + email conversion strip */
.convert-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.convert-tile {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border, rgba(148,163,184,.18));
  border-radius: 16px; padding: 22px 24px; text-decoration: none;
  transition: transform .14s ease, border-color .14s ease;
}
.convert-tile:hover { transform: translateY(-2px); border-color: var(--brand); }
.convert-tile--mail { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--bg-card)), var(--bg-card)); }
.convert-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand); margin-bottom: 4px;
}
.convert-k  { font-weight: 800; font-size: 17px; color: var(--text); letter-spacing: -.01em; }
.convert-d  { color: var(--subtle); font-size: 14px; line-height: 1.55; }
.convert-go { margin-top: 6px; color: var(--brand); font-weight: 700; font-size: 14px; }
@media (max-width: 640px) { .convert-strip { grid-template-columns: 1fr; } }

/* ── SCROLL REVEAL ────────────────────────────────────────────
   Opt-in via the .reveal class rather than applied blanket to every
   .section — most of the page is live data, not marketing copy, and
   fading in a price table on every scroll would read as a glitch, not
   polish. Reserved for genuinely static content (feature cards, CTA
   copy). Wired up in app.js with an IntersectionObserver that only ever
   ADDS the --visible class — it never hides content the DOM already has,
   which is the failure mode a previous version of this pattern hit on
   this site (see the removed _numObserver: same idea applied to live
   numbers, which could get stuck blanked if the observer never fired).
   A JS-side safety net force-reveals everything after 2.5s regardless,
   so a script error or an unsupported browser can never leave text stuck
   invisible — this only ever adds motion, it never gates visibility. */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms cubic-bezier(0.16,1,0.3,1), transform 600ms cubic-bezier(0.16,1,0.3,1);
}
.reveal--visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Hero secondary CTA ───────────────────────────────────────── */
.hero-cta-row { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.hero-secondary { color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; opacity: .85; border-bottom: 1px solid transparent; transition: opacity var(--t), border-color var(--t), color var(--t); }
.hero-secondary:hover { opacity: 1; border-bottom-color: var(--brand); color: var(--brand); }

/* ── Start Fresh: starter-plan builder ────────────────────────── */
.sf-head { max-width: 620px; }
.sf-sub { color: var(--subtle); font-size: 15px; line-height: 1.6; margin-top: 8px; }
.sf-form { display: flex; align-items: center; gap: 12px; margin: 26px 0 0; flex-wrap: wrap; }
.sf-amount-wrap { position: relative; display: inline-flex; align-items: center; }
.sf-currency { position: absolute; left: 16px; font-size: 20px; font-weight: 700; color: var(--subtle); pointer-events: none; }
.sf-amount {
  width: 160px; box-sizing: border-box; padding: 14px 16px 14px 34px;
  background: var(--bg-card); color: var(--text); font-size: 20px; font-weight: 700;
  border: 1px solid var(--border, rgba(148,163,184,.22)); border-radius: 12px;
}
.sf-amount:focus { outline: none; border-color: var(--brand); }
.sf-risk { display: inline-flex; background: var(--bg-card); border: 1px solid var(--border, rgba(148,163,184,.22)); border-radius: 12px; padding: 4px; gap: 2px; }
.sf-risk-btn { border: none; background: none; color: var(--subtle); font-weight: 700; font-size: 13.5px; padding: 10px 16px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; }
.sf-risk-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
/* Active risk pill matches the score-pill style used in Smart Allocation */
.sf-risk-active { background: rgba(34,197,94,0.14); color: #22c55e; box-shadow: inset 0 0 0 1px rgba(34,197,94,0.3); }
#sfBuild { padding: 14px 22px; }

.sf-plan { margin-top: 30px; }
.sf-plan[hidden] { display: none; }
.sf-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* Cards match Smart Allocation card language */
.sf-block {
  background: var(--bg-card);
  border: 1px solid var(--border, rgba(148,163,184,.18));
  border-radius: 14px; padding: 20px 22px;
  position: relative; overflow: hidden;
}
.sf-block::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, rgba(34,197,94,0.5), transparent);
}
.sf-block--wide { margin-bottom: 16px; }
.sf-block p { color: var(--subtle); font-size: 14px; line-height: 1.6; margin: 4px 0 0; }
/* Step labels match pi-label style */
.sf-block-k {
  font-family: var(--mono, monospace); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px; display: block;
}
/* Big amounts match pi-dollar green */
.sf-block-big { font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: #22c55e; }

.sf-rules { margin: 6px 0 0; padding-left: 18px; }
.sf-rules li { color: var(--subtle); font-size: 14px; line-height: 1.7; }
.sf-rules strong, .sf-block p strong { color: var(--text); }

/* Buys table matches Smart Allocation table density */
.sf-buys { width: 100%; border-collapse: collapse; margin-top: 8px; }
.sf-buys th {
  text-align: left; font-family: var(--mono, monospace); font-size: 9px;
  letter-spacing: 0.1em; color: var(--subtle); text-transform: uppercase;
  padding: 6px 10px; border-bottom: 1px solid var(--border);
}
.sf-buys td { padding: 10px 10px; border-bottom: 1px solid var(--border-sub, rgba(148,163,184,.08)); font-size: 13px; }
.sf-buys tr:last-child td { border-bottom: none; }
.sf-buys th:nth-child(2), .sf-buys td:nth-child(2),
.sf-buys th:nth-child(3), .sf-buys td:nth-child(3) { text-align: right; }
.sf-sym  { font-weight: 800; font-family: var(--mono, monospace); color: var(--text); }
.sf-name { color: var(--subtle); font-size: 12px; margin-left: 6px; }
/* Score cell now uses the same score-pill class from Smart Allocation — no static color here */
.sf-amt-cell { font-family: var(--mono, monospace); font-weight: 700; color: #22c55e; }

.sf-note { color: var(--subtle); font-size: 12.5px; line-height: 1.55; margin-top: 12px; }
.sf-disc { color: var(--subtle); font-size: 11.5px; line-height: 1.6; margin-top: 16px; opacity: .85; }
@media (max-width: 640px) { .sf-plan-grid { grid-template-columns: 1fr; } .sf-amount { width: 140px; } }

/* ── On-demand ticker scoring (rankings search fallback) ──────── */
.scr-onde-cell { padding: 26px 16px !important; text-align: center; }
.scr-onde { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.scr-onde-txt { color: var(--subtle); font-size: 14px; }
.scr-onde-txt strong { color: var(--text); }
.scr-onde-btn {
  background: var(--brand); color: #06111f; border: none; border-radius: 999px;
  padding: 9px 18px; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}
.scr-onde-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.scr-onde-status { color: var(--subtle); font-size: 13px; }
html[data-theme="light"] .scr-onde-btn { color: #fff; }

/* ── Economic Calendar: This Week / Archive toggle ────────────────── */
.cal-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cal-view-toggle {
  display: inline-flex; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; flex-shrink: 0;
}
.cal-view-btn {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  background: none; border: none; color: var(--subtle); padding: 8px 14px;
  border-radius: 7px; cursor: pointer; transition: all var(--t); white-space: nowrap;
}
.cal-view-btn:hover { color: var(--text); }
.cal-view-btn--active { background: var(--brand); color: #06111f; }
html[data-theme="light"] .cal-view-btn--active { color: #fff; }
.cal-archive-more-wrap { display: flex; justify-content: center; margin-top: 18px; }
.cal-archive-more-wrap:empty { margin-top: 0; }

/* ── Correlation Check (watchlist quant widget) ───────────────────── */
.corrx {
  margin-top: 34px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 24px 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.corrx::before { /* same pixel-lit top edge as .card */
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: rgba(255,255,255,0.06); pointer-events: none;
}
.corrx-loading { color: var(--subtle); font-family: var(--mono); font-size: 11px; text-align: center; padding: 10px; }
.corrx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.corrx-pill { font-size: 10px; }
.corrx-verdict {
  font-family: var(--font-display); font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 700; letter-spacing: -0.01em; line-height: 1.45;
  margin: 12px 0 4px; max-width: 640px;
  animation: cmpFadeUp 460ms cubic-bezier(0.22,1,0.36,1) both;
}
.corrx-note { color: var(--subtle); font-size: 12px; margin: 2px 0 0; }

.corrx-matrix-wrap { overflow-x: auto; margin: 20px 0 6px; }
.corrx-matrix { display: grid; gap: 3px; min-width: 300px; }
.corrx-cell {
  display: flex; align-items: center; justify-content: center;
  min-height: 38px; border-radius: 7px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  font-feature-settings: "tnum"; color: var(--text);
}
.corrx-val {
  cursor: default;
  animation: corrCellIn 380ms cubic-bezier(0.22,1,0.36,1) var(--d, 0ms) both;
  transition: transform 0.12s ease;
}
.corrx-val:hover { transform: scale(1.12); z-index: 1; }
.corrx-self { color: var(--subtle); background: transparent; animation: corrCellIn 380ms cubic-bezier(0.22,1,0.36,1) var(--d, 0ms) both; }
.corrx-lbl  { font-size: 10px; letter-spacing: 0.04em; color: var(--muted); background: transparent; }
.corrx-corner { background: transparent; }
@keyframes corrCellIn {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

.corrx-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.corrx-tile {
  border-radius: 12px; padding: 16px 18px;
  border: 1px solid var(--border-sub); background: var(--bg-alt);
  display: flex; flex-direction: column; gap: 3px;
  animation: cmpFadeUp 460ms cubic-bezier(0.22,1,0.36,1) 240ms both;
}
.corrx-tile--twins { border-color: rgba(232,69,69,0.25); }
.corrx-tile--div   { border-color: rgba(34,197,94,0.25); }
.corrx-tile-k { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.14em; color: var(--subtle); }
.corrx-tile-pair { font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.corrx-tile-num { font-family: var(--mono); font-size: 22px; font-weight: 800; font-feature-settings: "tnum"; }
.corrx-tile p { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin: 4px 0 0; }

.corrx-foot { color: var(--subtle); font-size: 11px; line-height: 1.6; margin: 14px 0 0; }

@media (max-width: 640px) {
  .corrx { padding: 18px 16px 16px; }
  .corrx-tiles { grid-template-columns: 1fr; }
  .corrx-cell { min-height: 34px; font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .corrx-verdict, .corrx-val, .corrx-self, .corrx-tile { animation: none !important; }
}

/* ── Smart Allocation / Portfolio Ideas ("If I Had $X Today") ─────────── */
.pi-loading {
  text-align: center; font-family: var(--mono);
  font-size: 12px; color: var(--subtle); padding: 40px 0;
}
.pi-head { margin-bottom: 20px; }
.pi-title-row {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.pi-label {
  display: block; font-family: var(--mono); font-size: 10px;
  font-weight: 700; letter-spacing: 0.1em; color: var(--brand); margin-bottom: 8px;
}
.pi-h2 {
  font-size: clamp(22px, 4vw, 32px); font-weight: 800; color: var(--text);
  margin: 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.pi-amt-input {
  background: transparent; border: none; border-bottom: 2px solid var(--brand);
  color: var(--brand); font-size: inherit; font-weight: inherit; font-family: inherit;
  width: 8ch; outline: none; text-align: center; padding: 0 2px 2px;
  -moz-appearance: textfield;
}
.pi-amt-input::-webkit-outer-spin-button,
.pi-amt-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pi-live-badge {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--green); background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2);
  border-radius: 99px; padding: 5px 12px; white-space: nowrap; align-self: center;
}

.pi-regime-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: 10px; border-left: 3px solid;
}
.pi-regime--red    { background: rgba(239,68,68,0.07);  border-color: #ef4444; }
.pi-regime--orange { background: rgba(234,88,12,0.07);  border-color: #ea580c; }
.pi-regime--amber  { background: rgba(245,158,11,0.07); border-color: #f59e0b; }
.pi-regime--green  { background: rgba(34,197,94,0.07);  border-color: #22c55e; }
.pi-regime--blue   { background: rgba(99,102,241,0.06); border-color: var(--brand); }
.pi-regime-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.pi-regime-text { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text); opacity: 0.88; }

/* ── Two-column body: donut left, table right */
.pi-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: start;
}

/* Left visual panel */
.pi-visual {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.pi-donut-svg { display: block; overflow: visible; }

.pi-donut-stats {
  display: flex; justify-content: space-between; width: 100%; gap: 4px;
}
.pi-dstat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  flex: 1; padding: 8px 4px; border-radius: 8px; background: var(--bg-card);
  border: 1px solid var(--border);
}
.pi-dstat--mid { border-color: rgba(245,158,11,0.25); }
.pi-dstat-val {
  font-family: var(--mono); font-size: 13px; font-weight: 800; color: var(--text);
}
.pi-dstat-key { font-size: 9px; color: var(--subtle); letter-spacing: 0.06em; }

.pi-legend { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.pi-leg-row {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; color: var(--muted);
}
.pi-leg-dot {
  width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; display: inline-block;
}

/* Right table panel */
.pi-table-col { min-width: 0; }
.pi-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pi-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pi-table thead th {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--subtle); text-align: left; padding: 8px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.pi-row { border-bottom: 1px solid var(--border-sub); transition: background 0.15s; }
.pi-row:last-child { border-bottom: none; }
.pi-row:hover { background: var(--bg-hover); }
.pi-row td { padding: 11px 12px; vertical-align: middle; }

.pi-asset-cell { display: flex; align-items: center; gap: 10px; }
.pi-dot {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.pi-asset-text  { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pi-sym         { font-weight: 700; font-size: 13px; font-family: var(--mono); }
.pi-aname       { font-size: 10px; color: var(--subtle); }
.pi-reason      { font-size: 10px; color: var(--muted); font-style: italic; line-height: 1.35; margin-top: 2px; }

.pi-td-score { white-space: nowrap; }
.pi-score-pill {
  display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 800;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}

.pi-bar-row { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.pi-bar-track { flex: 1; height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; }
.pi-bar-fill  { height: 100%; border-radius: 99px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.pi-pct { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; min-width: 32px; }

.pi-dollar { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--green); }

/* Cash strip — replaces cash table row */
.pi-cash-strip {
  display: flex; align-items: center; gap: 10px;
  margin-top: 4px; padding: 9px 12px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  opacity: 0.65;
}
.pi-cash-dot {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  background: rgba(75,85,99,0.2); color: #9ca3af; border: 1px solid rgba(75,85,99,0.3);
}
.pi-cash-info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pi-cash-label { font-size: 10px; color: var(--subtle); }
.pi-cash-track { height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; }
.pi-cash-fill  { height: 100%; border-radius: 99px; background: #4b5563; opacity: 0.5; }
.pi-cash-pct   { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--subtle); white-space: nowrap; }
.pi-cash-amt   { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--subtle); white-space: nowrap; }

.pi-foot { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.pi-scale-tip {
  font-size: 12px; color: var(--amber); background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.15); border-radius: 8px; padding: 10px 14px; line-height: 1.5;
}
.pi-dyor { font-family: var(--mono); font-size: 10px; color: var(--subtle); margin: 0; line-height: 1.5; }

@media (max-width: 860px) {
  .pi-body { grid-template-columns: 1fr; }
  .pi-visual { flex-direction: row; align-items: flex-start; flex-wrap: wrap; }
  .pi-donut-svg { width: 120px; height: 120px; }
  .pi-donut-stats { width: auto; flex: 1; flex-direction: column; min-width: 100px; }
  .pi-legend { flex-direction: row; flex-wrap: wrap; gap: 10px; flex: 100%; }
}
@media (max-width: 480px) {
  .pi-body { gap: 16px; }
  .pi-visual { display: none; }
  .pi-td-score { display: none; }
  .pi-table thead th:nth-child(2) { display: none; }
  .pi-bar-row { min-width: 70px; }
  /* Tighten asset cell on small phones */
  .pi-row td { padding: 9px 8px; }
  .pi-reason { display: none; } /* hide italic reason at narrowest */
  /* Cash strip: hide bar, keep dot + label + amount */
  .pi-cash-strip { padding: 8px 10px; gap: 8px; }
  .pi-cash-info .pi-cash-track { display: none; }
  .pi-cash-pct { display: none; }
}

/* ── Shared labeled-input fields (Trade Plan Builder) ────────────────── */
.ps-field  { display: flex; flex-direction: column; gap: 5px; }
.ps-label  {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--muted);
}
.ps-input {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 10px 14px; color: var(--text);
  font-family: var(--mono); font-size: 13px; width: 100%;
  transition: border-color 0.15s; box-sizing: border-box;
}
.ps-input:focus { outline: none; border-color: var(--brand); }
.ps-input::placeholder { color: var(--subtle); }
.tp-textarea { resize: vertical; min-height: 72px; font-family: var(--font); font-size: 13px; line-height: 1.5; }

/* ── Conviction Check ─────────────────────────────────────────────────── */
.cv-wrap      { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.cv-questions { display: flex; flex-direction: column; gap: 14px; }
.cv-q {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 18px; transition: border-color 0.15s;
}
.cv-q-num {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border-hi);
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.cv-q-body  { flex: 1; min-width: 0; }
.cv-q-text  { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; line-height: 1.4; }
.cv-q-hint  { font-size: 11px; color: var(--subtle); margin-bottom: 12px; line-height: 1.5; }
.cv-btns    { display: flex; gap: 8px; }
.cv-btn {
  padding: 5px 18px; border-radius: 4px; border: 1px solid var(--border-hi);
  background: var(--bg-elevated); color: var(--muted);
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  cursor: pointer; transition: all 0.15s;
}
.cv-btn:hover      { border-color: var(--brand); color: var(--brand); }
.cv-btn-no:hover   { border-color: var(--red);   color: var(--red);   }
.cv-btn-active     { border-color: var(--brand) !important; color: var(--brand) !important; background: rgba(16,185,129,0.08) !important; }
.cv-btn-no.cv-btn-active { border-color: var(--red) !important; color: var(--red) !important; background: rgba(232,69,69,0.08) !important; }

.cv-result { position: sticky; top: 100px; }
.cv-out {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 28px 24px; text-align: center;
}
.cv-out.cv-green { border-color: rgba(34,197,94,0.35); }
.cv-out.cv-amber { border-color: rgba(232,151,26,0.35); }
.cv-out.cv-red   { border-color: rgba(232,69,69,0.35);  }
.cv-score {
  font-family: var(--mono); font-size: 42px; font-weight: 800;
  letter-spacing: -0.02em; line-height: 1; margin-bottom: 12px;
}
.cv-green .cv-score { color: var(--green); }
.cv-amber .cv-score { color: var(--amber); }
.cv-red   .cv-score { color: var(--red);   }
.cv-advice { font-size: 13px; color: var(--text); line-height: 1.6; margin-bottom: 16px; }
.cv-nos    { text-align: left; margin-bottom: 16px; }
.cv-no-item {
  font-size: 11px; color: var(--red); padding: 5px 0;
  border-bottom: 1px solid rgba(232,69,69,0.12); line-height: 1.4;
}
.cv-reset {
  background: none; border: 1px solid var(--border-hi); border-radius: 4px;
  padding: 6px 18px; color: var(--muted); font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.08em; cursor: pointer; transition: all 0.15s;
}
.cv-reset:hover { border-color: var(--muted); color: var(--text); }

/* ── Trade Plan Builder ───────────────────────────────────────────────── */
.tp-wrap { display: flex; flex-direction: column; gap: 24px; }
.tp-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; }
.tp-form-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tp-calc {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  margin-top: 10px; padding: 10px 14px;
  background: var(--bg-elevated); border-radius: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
}
.tp-calc:empty   { display: none; }
.tp-rr-val       { color: var(--brand); }
.tp-risk-val     { color: var(--red);   }
.tp-rew-val      { color: var(--green); }

.tp-plans    { display: flex; flex-direction: column; gap: 12px; }
.tp-empty    { color: var(--subtle); font-size: 13px; padding: 20px 0; }
.tp-plan {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px 20px; transition: border-color 0.15s;
}
.tp-plan:hover     { border-color: var(--border-hi); }
.tp-plan-closed    { opacity: 0.5; }
.tp-plan-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap;
}
.tp-sym   { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--text); }
.tp-date  { font-family: var(--mono); font-size: 10px; color: var(--subtle); }
.tp-rr-badge {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 3px;
  background: rgba(16,185,129,0.1); color: var(--brand); border: 1px solid rgba(16,185,129,0.25);
}
.tp-closed-badge {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 3px;
  background: rgba(85,87,110,0.12); color: var(--subtle); border: 1px solid rgba(85,87,110,0.2);
}
.tp-reason { font-size: 12px; color: var(--muted); margin-bottom: 10px; line-height: 1.5; }
.tp-prices { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.tp-price  { font-size: 11px; color: var(--muted); }
.tp-price strong { color: var(--text); font-family: var(--mono); }
.tp-price-stop   strong { color: var(--red);   }
.tp-price-target strong { color: var(--green); }
.tp-actions { display: flex; gap: 8px; }
.tp-act {
  padding: 4px 14px; border-radius: 4px; border: 1px solid var(--border-hi);
  background: none; color: var(--muted); font-family: var(--mono);
  font-size: 9px; font-weight: 700; letter-spacing: 0.07em; cursor: pointer; transition: all 0.15s;
}
.tp-act:hover     { border-color: var(--brand); color: var(--brand); }
.tp-act-del:hover { border-color: var(--red);   color: var(--red);   }
@media (max-width: 768px) {
  .cv-wrap { grid-template-columns: 1fr; }
  .cv-result { position: static; }
  .tp-form-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .tp-form-row { grid-template-columns: 1fr; }
}

/* ── Market Shock Banner ───────────────────────────────────────────────── */
.crash-banner {
  position: fixed;
  top: 52px; left: 0; right: 0;
  z-index: 300;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
  pointer-events: none;
}
@media (min-width: 641px) {
  .crash-banner { top: 82px; }
}
.crash-banner:not(:empty) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.crash-banner.cb-hiding {
  transform: translateY(-100%) !important;
  opacity: 0 !important;
}
.cb-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 28px;
  flex-wrap: wrap;
}
.cb-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.cb-icon { font-size: 20px; line-height: 1; }
.cb-text { display: flex; flex-direction: column; gap: 2px; }
.cb-label { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; opacity: 0.75; }
.cb-detail { font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: 0.03em; }
.cb-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cb-msg { font-family: var(--sans, system-ui, sans-serif); font-size: 12px; opacity: 0.85; max-width: 380px; line-height: 1.45; }
.cb-cta {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: background 0.15s;
}
.cb-cta:hover { background: rgba(255,255,255,0.26); }
.cb-dismiss {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.5;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.cb-dismiss:hover { opacity: 1; }

.cb-opp-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.14);
  flex-wrap: wrap;
}
.cb-opp-label { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.14em; opacity: 0.55; white-space: nowrap; margin-right: 2px; }
.cb-opp-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 5px;
  padding: 3px 9px;
}
.cb-opp-ticker { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.cb-opp-score  { font-family: var(--mono); font-size: 11px; font-weight: 600; opacity: 0.75; }
.cb-opp-delta  { font-family: var(--mono); font-size: 10px; font-weight: 700; color: #86efac; }
.cb-opp-cta {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
  white-space: nowrap;
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 5px;
  background: rgba(255,255,255,0.08);
  transition: background 0.15s, opacity 0.15s;
}
.cb-opp-cta:hover { background: rgba(255,255,255,0.18); opacity: 1; }

/* Rankings context bar — shown on crash / shock days */
.rankings-ctx-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.16);
  border-radius: 6px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  flex-wrap: wrap;
  line-height: 1.5;
}
.rankings-ctx-bar--icon { font-size: 13px; flex-shrink: 0; }
.rankings-ctx-bar--text { color: var(--text); opacity: 0.85; letter-spacing: 0.02em; }
.rankings-ctx-bar--hi { color: #4ade80; font-weight: 700; }

.crash-warn {
  background: linear-gradient(90deg, #78350f 0%, #92400e 100%);
  color: #fde68a;
  border-bottom: 1px solid #b45309;
}
.crash-sell {
  background: linear-gradient(90deg, #7c2d12 0%, #9a3412 100%);
  color: #fed7aa;
  border-bottom: 2px solid #ea580c;
}
.crash-critical {
  background: linear-gradient(90deg, #7f1d1d 0%, #991b1b 100%);
  color: #fecaca;
  border-bottom: 2px solid #ef4444;
  animation: cb-pulse-border 2s ease-in-out infinite;
}
.crash-rally {
  background: linear-gradient(90deg, #052e16 0%, #064e3b 100%);
  color: #bbf7d0;
  border-bottom: 1px solid #16a34a;
}
.crash-crypto {
  background: linear-gradient(90deg, #2e1065 0%, #3b0764 100%);
  color: #e9d5ff;
  border-bottom: 1px solid #7c3aed;
}
.crash-event {
  background: linear-gradient(90deg, #1e1b4b 0%, #312e81 100%);
  color: #c7d2fe;
  border-bottom: 1px solid #6366f1;
}

@keyframes cb-pulse-border {
  0%, 100% { border-bottom-color: #ef4444; }
  50%       { border-bottom-color: #fca5a5; }
}

@media (max-width: 768px) {
  .cb-inner  { padding: 10px 16px; gap: 10px; }
  .cb-msg    { display: none; }
  .cb-detail { font-size: 13px; }
}
@media (max-width: 480px) {
  .cb-cta  { display: none; }
  .cb-left { gap: 8px; }
}

/* ══════════════════════════════════════════════════════════════════════
   PREMIUM VISUAL POLISH — v1
   All motion via transform + opacity (GPU composited, layout-safe).
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. NOISE / GRAIN OVERLAY ────────────────────────────────────────
   SVG fractal-noise baked as a data URI — zero extra HTTP requests.
   Breaks the "flat display" feel without visible grain at ≤3% opacity. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.70' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 190px;
}
html[data-theme="light"] body::after { opacity: 0.011; }

/* ── 2. EDGE VIGNETTE — radial darkening at page margins ────────────
   Fixed overlay, independent of scroll, subtly frames content.
   Injected by JS as .page-vignette so it gracefully absent when JS is off. */
.page-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9996;
  background: radial-gradient(
    ellipse 88% 88% at 50% 50%,
    transparent 35%,
    rgba(0,0,0,0.40) 100%
  );
}
html[data-theme="light"] .page-vignette { display: none; }

/* ── 3. HERO GLOW — centered for parallax-readiness ─────────────────
   Replaces the old top/left positioning so JS can drive it smoothly. */
.hero-glow {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  /* Remove the previous orb-drift; JS drives parallax instead */
  animation: none;
}

/* ── 4. SECTION BACKGROUNDS — layered radial depth ──────────────────
   Scoped to :not(.section-alt) so combined class="section section-alt"
   elements keep the alt's background rather than having it overridden. */
.section:not(.section-alt) {
  background:
    radial-gradient(ellipse 900px 480px at 50% -50px,  rgba(16,185,129,0.052) 0%, transparent 68%),
    radial-gradient(ellipse 620px 320px at  7% 72%,    rgba(16,185,129,0.018) 0%, transparent 56%),
    radial-gradient(ellipse 540px 280px at 93% 28%,    rgba(59,130,246,0.013) 0%, transparent 56%);
}
/* Gradient top hairline — only on pure .section, not .section.section-alt
   (section-alt already has its own ::before hairline at line 734) */
.section:not(.section-alt)::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent                 0%,
    rgba(16,185,129,0.22)      22%,
    rgba(255,255,255,0.07)     50%,
    rgba(16,185,129,0.22)      78%,
    transparent                100%
  );
  pointer-events: none;
  z-index: 1;
}
/* Bottom diffuse glow beam */
.section:not(.section-alt)::after {
  content: '';
  position: absolute;
  bottom: -70px;
  left: 50%;
  transform: translateX(-50%);
  width: 840px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(16,185,129,0.045) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.section-alt {
  background:
    radial-gradient(ellipse 780px 400px at 63% 115%, rgba(16,185,129,0.058) 0%, transparent 68%),
    radial-gradient(ellipse 500px 250px at 88% 22%,  rgba(59,130,246,0.018) 0%, transparent 56%),
    radial-gradient(ellipse 640px 300px at  9% 55%,  rgba(16,185,129,0.016) 0%, transparent 56%),
    var(--bg-alt);
}

/* ── 5. CARDS — multi-layer depth + glass shimmer on hover ──────────
   Layered background = inner light source (top-left) + dark body.
   ::after = diagonal shimmer that sweeps on hover (GPU transform only). */
.card:not(.card-featured):not(.card-locked) {
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(255,255,255,0.028) 0%, transparent 36%),
    linear-gradient(160deg, #111118 0%, #0c0c12 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.045),
    0 1px 0   rgba(255,255,255,0.06),
    0 2px 4px  rgba(0,0,0,0.55),
    0 8px 22px rgba(0,0,0,0.44),
    0 22px 52px rgba(0,0,0,0.28);
}
.card:not(.card-featured):not(.card-locked)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    112deg,
    transparent         18%,
    rgba(255,255,255,0.038) 50%,
    transparent         82%
  );
  transform: translateX(-130%) skewX(-10deg);
  transition: transform 0.58s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 3;
}
.card:not(.card-featured):not(.card-locked):hover::after {
  transform: translateX(130%) skewX(-10deg);
}
.card:not(.card-featured):not(.card-locked):hover {
  box-shadow:
    0 0 0 1px rgba(16,185,129,0.19),
    0 1px 0   rgba(255,255,255,0.08),
    0 4px 8px  rgba(0,0,0,0.62),
    0 14px 36px rgba(0,0,0,0.52),
    0 36px 72px rgba(0,0,0,0.34),
    0 0 90px   rgba(16,185,129,0.055);
}
/* Featured card — ambient dual-source background */
.card-featured {
  background:
    radial-gradient(ellipse 70% 55% at 82% 12%, rgba(16,185,129,0.075) 0%, transparent 58%),
    radial-gradient(ellipse 55% 65% at 18% 88%, rgba(59,130,246,0.04)  0%, transparent 55%),
    linear-gradient(135deg, #0b1020 0%, #0a1018 40%, #080e12 70%, #070d10 100%);
}

/* ── 6. PULSE CARDS — glass morphism ────────────────────────────────
   Backdrop-filter on these cards makes them feel lifted from the section. */
.pulse-card {
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(255,255,255,0.038) 0%, transparent 40%),
    linear-gradient(165deg, #101418 0%, #0a0a10 100%);
  backdrop-filter: blur(12px) saturate(145%);
  -webkit-backdrop-filter: blur(12px) saturate(145%);
  border-color: rgba(255,255,255,0.075);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 1px 0   rgba(255,255,255,0.068),
    0 4px 18px rgba(0,0,0,0.58),
    0 22px 54px rgba(0,0,0,0.38);
}
.pulse-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    112deg,
    transparent          18%,
    rgba(255,255,255,0.03) 50%,
    transparent          82%
  );
  transform: translateX(-130%) skewX(-10deg);
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 3;
  border-radius: inherit;
}
.pulse-card:hover::after {
  transform: translateX(130%) skewX(-10deg);
}

/* ── 7. SCROLL PROGRESS BAR — shimmering gradient ───────────────────
   Replaces the plain brand-color bar with a moving shimmer. */
#scrollProgress,
.scroll-progress {
  background: linear-gradient(
    90deg,
    rgba(16,185,129,0)   0%,
    #10b981              20%,
    #34d399              50%,
    #10b981              80%,
    rgba(16,185,129,0) 100%
  );
  background-size: 220% 100%;
  animation: progress-shimmer 4.8s linear infinite;
  box-shadow: 0 0 12px rgba(16,185,129,0.52), 0 0 24px rgba(16,185,129,0.18);
}
@keyframes progress-shimmer {
  0%   { background-position:  220% 0; }
  100% { background-position: -220% 0; }
}



/* ── 9. MARKET HEALTH TILES — glass enrichment ───────────────────── */
.mh-tile {
  background:
    linear-gradient(140deg, rgba(255,255,255,0.034) 0%, transparent 42%),
    rgba(16,185,129,0.05);
  backdrop-filter: blur(10px) saturate(138%);
  -webkit-backdrop-filter: blur(10px) saturate(138%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    inset 0 0 0 1px rgba(16,185,129,0.08),
    0 4px 14px rgba(0,0,0,0.42);
}

/* ── 10. SCROLL REVEAL — upgraded to spring-like easing ─────────────
   Overrides the existing 0.5s ease-in-out with a more natural spring curve. */
.anim-ready {
  transition:
    opacity   0.76s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.76s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.sec-header,
.sec-label,
.sec-title,
.sec-sub {
  transition:
    opacity   0.76s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.76s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

/* ── 11. BUTTON PRIMARY — diagonal shine sweep ───────────────────── */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    transparent        22%,
    rgba(255,255,255,0.22) 50%,
    transparent        78%
  );
  transform: translateX(-120%);
  transition: transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(120%); }

/* ── 12. HERO EYEBROW — plain kicker, no glass pill ─────────────── */

/* ── 13. ARTICLE CARDS — richer hover ───────────────────────────── */
.art-card {
  transition:
    transform    0.38s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow   0.38s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.22s ease;
}
.art-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(16,185,129,0.20),
    0 8px 26px rgba(0,0,0,0.52);
}

/* ── 14. NAV DROPDOWN ITEMS — lift icon on hover ─────────────────── */
.nav-dd-item:hover .ndd-ic {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 0 4px 12px rgba(16,185,129,0.20);
}

/* ── 15. SCORE BAR — animated fill on render ─────────────────────── */
.score-bar-inner {
  transition: width 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 16. FNG GAUGE NEEDLE — smoother spring settle ───────────────── */
#fngNeedle {
  transition: transform 1.8s cubic-bezier(0.34, 1.06, 0.64, 1);
}

/* ── 17. SECTION LABEL — refined monospace weight ────────────────── */
.sec-label {
  letter-spacing: 0.30em;
}

/* ── 18. HERO TITLE TEXT GLOW ────────────────────────────────────── */
.hero-title {
  text-shadow: 0 0 120px rgba(16,185,129,0.07);
}

/* ── 19. MH-TILE HOVER — lighting shift ──────────────────────────── */
.mh-tile:hover {
  background:
    linear-gradient(140deg, rgba(16,185,129,0.08) 0%, rgba(16,185,129,0.03) 50%, transparent 100%),
    rgba(16,185,129,0.07);
  box-shadow:
    0 0 0 1px rgba(16,185,129,0.22),
    inset 0 0 0 1px rgba(16,185,129,0.14),
    0 8px 28px rgba(0,0,0,0.52),
    0 0 60px rgba(16,185,129,0.06);
}

/* ── THE SETUP ──────────────────────────────────────────────────── */
.nav-setup-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  margin-left: 4px;
  vertical-align: middle;
  animation: setup-dot-pulse 2s ease-in-out infinite;
}
@keyframes setup-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.65); }
}

.setup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.setup-time-ctx {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
  letter-spacing: 0.04em;
}
.setup-positioning {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--subtle);
  max-width: 46ch;
  margin: 0.5rem 0 0;
}
.setup-odds {
  font-size: 11px;
  font-style: italic;
  color: var(--subtle);
  padding: 8px 16px 4px;
}
.setup-regime {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
  background: var(--bg-card);
  color: var(--muted);
}
.setup-regime.bullish { border-color: rgba(34,197,94,0.3);  color: #22c55e; }
.setup-regime.mixed   { border-color: rgba(245,158,11,0.3); color: #f59e0b; }
.setup-regime.bearish { border-color: rgba(239,68,68,0.3);  color: #ef4444; }
.setup-regime-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.setup-cards { display: flex; flex-direction: column; gap: 1.5rem; }

.setup-loading {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 3rem; justify-content: center;
  color: var(--muted); font-size: 0.85rem;
}
.setup-empty {
  text-align: center; padding: 3rem 1rem; color: var(--muted);
}
.setup-empty h3 { margin-bottom: 0.5rem; font-size: 1.1rem; color: var(--text); }
.setup-empty p  { font-size: 0.85rem; }

/* ── Momentum Breakouts / Catalyst Watch ─────────────────────────── */
.setup-subsection { margin-top: 2.25rem; }
.setup-subsection-head { margin-bottom: 12px; }
.setup-subsection-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.setup-subsection-sub { font-size: 12px; color: var(--muted); max-width: 760px; line-height: 1.5; }

.bkt-list, .cat-list { border-top: 1px solid var(--border); }

.bkt-row {
  display: grid;
  grid-template-columns: 28px 1.6fr 1.6fr auto 1.4fr;
  gap: 14px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-sub);
  animation: rnk-hint-in 0.3s ease both;
  animation-delay: var(--sc-delay, 0ms);
}
.bkt-rank { font-family: var(--mono); font-size: 11px; color: var(--subtle); font-weight: 700; }
.bkt-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bkt-sym { font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; }
.bkt-name { font-size: 10px; color: var(--subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bkt-move { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bkt-move-pct { font-family: var(--mono); font-weight: 800; font-size: 15px; color: var(--green); }
.bkt-move-sub { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bkt-signal {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  color: var(--muted); background: rgba(148,163,184,0.08); border: 1px solid rgba(148,163,184,0.20);
  padding: 3px 8px; border-radius: 3px; white-space: nowrap; text-transform: uppercase; cursor: help;
}
.bkt-risk { font-size: 11px; color: var(--amber); line-height: 1.4; }

.cat-row {
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-sub);
  animation: rnk-hint-in 0.3s ease both;
  animation-delay: var(--sc-delay, 0ms);
}
.cat-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.cat-id { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cat-sym { font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; }
.cat-name { font-size: 11px; color: var(--subtle); }
.cat-date { font-family: var(--mono); font-size: 11px; color: var(--text); white-space: nowrap; font-weight: 600; }
.cat-days { color: var(--subtle); font-weight: 500; }
.cat-eps { font-size: 11px; color: var(--muted); font-family: var(--mono); margin-bottom: 8px; }
.cat-case { font-size: 12px; line-height: 1.45; margin-top: 4px; }
.cat-case-label {
  font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: 0.08em;
  padding: 1px 6px; border-radius: 3px; margin-right: 7px; vertical-align: 1px;
}
.cat-bull .cat-case-label { color: #052e16; background: var(--green); }
.cat-bear .cat-case-label { color: #450a0a; background: var(--red); }

.bkt-auto-badge {
  display: inline-block;
  font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: 0.06em;
  color: var(--brand); background: var(--brand-dim); border: 1px solid rgba(16,185,129,0.30);
  padding: 1px 4px; border-radius: 3px; margin-left: 6px; vertical-align: 1px; cursor: help;
}

.tkr-clickable { cursor: pointer; transition: background var(--t); }
.tkr-clickable:hover { background: rgba(16,185,129,0.04); }
.tkr-clickable:hover .bkt-sym,
.tkr-clickable:hover .cat-sym { color: var(--brand); }

/* ── BOARD VIEW — heatmap toggle for the rankings table ─────────────── */
.view-toggle {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.view-toggle-btn {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  transition: background var(--t), color var(--t);
}
.view-toggle-btn:hover { color: var(--text); }
.view-toggle-btn--active { background: var(--bg-elevated); color: var(--text); }

.board-view {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-auto-rows: 62px;
  grid-auto-flow: dense;
  gap: 3px;
  margin-bottom: 16px;
}
/* The [hidden] attribute alone loses to the explicit `display: grid` above
   (author styles always beat the UA stylesheet's [hidden]{display:none}) —
   without this, toggling back to LIST left the board painted underneath. */
.board-view[hidden] { display: none; }
.board-tile {
  position: relative;
  grid-column: span 1;
  grid-row: span 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--mono);
  padding: 0;
  /* Neutral until .board-tile--lit is added (next animation frame after
     render) — the slow, staggered fade-to-color is the point: a "market
     waking up" reveal, not an instant snap to red/green. --board-delay is
     set per-tile inline so tiles light up left-to-right in sequence. */
  background: var(--bg-elevated);
  transform: scale(0.93);
  opacity: 0.55;
  transition: background 1.3s cubic-bezier(0.4,0,0.2,1), transform 0.5s cubic-bezier(0.34,1.2,0.64,1), opacity 0.5s ease;
  transition-delay: var(--board-delay, 0ms);
}
.board-tile--lit {
  background: var(--board-color);
  transform: scale(1);
  opacity: 1;
}
.board-tile:hover { filter: brightness(1.12); transform: scale(1.03); z-index: 1; }
.board-tile-arrow { position: absolute; top: 4px; right: 6px; font-size: 9px; opacity: 0.7; }
.board-tile-sym { font-weight: 800; letter-spacing: 0.02em; font-size: 12px; line-height: 1.3; }
.board-tile-ytd { font-weight: 600; font-size: 9.5px; opacity: 0.85; margin-top: 1px; }
.board-tile[style*="span 2"] .board-tile-sym { font-size: 15px; }
.board-tile[style*="span 3"] .board-tile-sym { font-size: 20px; }
.board-tile[style*="span 2"] .board-tile-ytd,
.board-tile[style*="span 3"] .board-tile-ytd { font-size: 11px; }

@media (max-width: 720px) {
  .board-view { grid-template-columns: repeat(5, 1fr); grid-auto-rows: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .board-tile { transition: none; opacity: 1; transform: none; background: var(--board-color); }
}

/* ── MARKET MOOD — ambient background reflecting real market breadth ──
   Same getMarketRegime() the Setup page's "BULL/MIXED/BEAR REGIME" badge
   already uses — this is that same real number, just felt instead of read.
   Three glow layers always exist; JS toggles which one is at full opacity
   (a slow 2.5s crossfade when the regime changes), and whichever is active
   also breathes gently via a continuous transform pulse — an ambient
   "market is alive" cue, not a static color block. */
#rankings { position: relative; overflow: hidden; }
#rankings > .container { position: relative; z-index: 1; }
.market-mood {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.market-mood-layer {
  position: absolute;
  top: -10%;
  left: 0;
  right: 0;
  height: 70%;
  opacity: 0;
  transition: opacity 2.5s ease;
  animation: moodBreathe 7s ease-in-out infinite;
  transform-origin: 50% 0%;
}
.market-mood-layer--bullish {
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(34,197,94,0.24), transparent 70%);
}
.market-mood-layer--mixed {
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(232,151,26,0.20), transparent 70%);
}
.market-mood-layer--bearish {
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(232,69,69,0.22), transparent 70%);
}
.market-mood-layer--active { opacity: 1; }
@keyframes moodBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {
  .market-mood-layer { animation: none; transition: opacity 0.8s ease; }
}

@media (max-width: 720px) {
  .bkt-row { grid-template-columns: 1fr; gap: 6px; }
  .bkt-rank { display: none; }
}

/* Card shell */
.setup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  /* transform/opacity/box-shadow only — compositor-driven, stays at 60fps */
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.28s ease;
}
.setup-card:hover {
  transform: translateY(-5px) scale(1.004);
  border-color: rgba(16,185,129,0.35);
  box-shadow: 0 18px 48px rgba(0,0,0,0.28), 0 0 0 1px rgba(16,185,129,0.12);
}
.setup-card-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
/* #1/#2/#3 were rendering as three structurally identical cards with only
   a text label distinguishing them — no actual visual weight difference
   between "Best Setup Today" and "Also Watching." Runner-ups now read as
   genuinely secondary: quieter accent, tighter score badge, slightly
   smaller ticker — a real hierarchy instead of three equal repeats. */
.setup-card--secondary .setup-card-accent { opacity: 0.45; }
.setup-card--secondary .setup-card-ticker { font-size: 1.45rem; }
.setup-card--secondary .setup-card-info { padding-top: 1rem; padding-bottom: 0.75rem; }
.setup-card--secondary .setup-chart-wrap { padding-top: 0.55rem; padding-bottom: 0.55rem; }

/* Top section: info + chart side by side */
.setup-card-top {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 0;
}
.setup-card-info { padding: 1.25rem 1.5rem 1rem; }
.setup-card-rank {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--muted); margin-bottom: 0.35rem; text-transform: uppercase;
}
.setup-card-ticker {
  font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
}
.setup-card-name {
  font-size: 0.72rem; color: var(--muted);
  margin: 0.2rem 0 0.75rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
}
.setup-card-score-row { display: flex; align-items: center; gap: 0.5rem; }
.setup-score-badge {
  font-size: 1rem; font-weight: 700;
  padding: 0.2rem 0.55rem; border-radius: 6px;
  background: rgba(34,197,94,0.15); color: #22c55e;
}
.setup-score-badge.amber { background: rgba(245,158,11,0.15); color: #f59e0b; }
.setup-signal { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); }

/* Chart panel */
.setup-chart-wrap {
  padding: 0.75rem 1rem 0.75rem 0.25rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.setup-chart-label {
  font-size: 0.6rem; letter-spacing: 0.1em; font-weight: 700;
  color: var(--muted); padding-left: 0.25rem;
}
.setup-chart { width: 100%; display: block; border-radius: 6px; overflow: hidden; }
.setup-sparkline-wrap {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  padding-top: 0.25rem;
}
.setup-spark-label {
  font-size: 0.58rem; color: var(--muted); letter-spacing: 0.08em; font-weight: 600;
}

/* Prose */
.setup-prose {
  padding: 0.9rem 1.5rem;
  font-size: 0.82rem; line-height: 1.65; color: var(--text);
  border-top: 1px solid var(--border);
  border-left: 3px solid transparent;
}
.setup-prose.green { border-left-color: #22c55e; }
.setup-prose.amber { border-left-color: #f59e0b; }

/* Bottom: checklist + levels */
.setup-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
}
.setup-checklist {
  padding: 1rem 1.5rem;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.75rem;
  border-right: 1px solid var(--border);
  align-content: start;
}
.setup-checklist-head {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 0.2rem;
  grid-column: 1 / -1;
}
.setup-check-item {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.71rem; color: var(--muted);
  padding: 0.2rem 0;
}
/* A passing check is the expected, common case (most rows pass on most
   setups) — six identical loud green boxes per card, times three cards on
   screen at once, was the single biggest source of visual noise on this
   page. Passes now stay quiet (icon-only color, no box); only a fail or
   warn gets real visual weight, so the eye goes straight to the one or two
   rows that actually need attention instead of scanning past a wall of
   near-identical pills to find them. */
.setup-check-item.pass { color: var(--muted); }
.setup-check-item.pass .setup-check-icon { color: #22c55e; }
.setup-check-item.warn { color: #f59e0b; font-weight: 600; }
.setup-check-item.fail { color: #ef4444; font-weight: 600; }
.setup-check-icon {
  flex-shrink: 0; width: 14px; text-align: center;
  font-size: 0.68rem; font-weight: 700;
}

/* Levels grid */
.setup-levels {
  padding: 1rem 1.5rem;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem; align-content: start;
}
.setup-level-label {
  font-size: 0.58rem; letter-spacing: 0.09em; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
}
.setup-level-val {
  font-size: 0.88rem; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.setup-level-val.entry { color: #22c55e; }
.setup-level-val.stop  { color: #ef4444; }
.setup-level-val.t1    { color: #f59e0b; }
.setup-level-val.t2    { color: #60a5fa; }
/* Same reasoning as the checklist rows above: these four stats are the
   most-referenced numbers on the whole card and had zero visual weight of
   their own, just colored text sitting directly on the card background.
   Wrapping each pair in its own tinted block (matching .ep-card's existing
   entry/stop/t1/t2 variants) makes the grid scannable as four distinct
   values instead of a flat two-column list. */
.setup-level-block {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.setup-level-block.entry { border-color: rgba(34,197,94,0.30);  background: rgba(34,197,94,0.06); }
.setup-level-block.stop  { border-color: rgba(239,68,68,0.30);  background: rgba(239,68,68,0.06); }
.setup-level-block.t1    { border-color: rgba(245,158,11,0.28); background: rgba(245,158,11,0.05); }
.setup-level-block.t2    { border-color: rgba(96,165,250,0.28); background: rgba(96,165,250,0.05); }

/* Footer */
.setup-card-footer {
  padding: 0.7rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.setup-footer-meta { font-size: 0.7rem; color: var(--muted); }
.setup-analyzer-btn {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em;
  padding: 0.32rem 0.8rem; border-radius: 6px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text); text-decoration: none; white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.setup-analyzer-btn:hover { border-color: #22c55e; color: #22c55e; }

/* Responsive */
@media (max-width: 600px) {
  .setup-card-top    { grid-template-columns: 1fr; }
  .setup-bottom      { grid-template-columns: 1fr; }
  .setup-checklist   { border-right: none; border-bottom: 1px solid var(--border); }
  /* Chart goes full-width when stacked */
  .setup-chart-wrap  { align-items: stretch; padding: 0.5rem 1rem 0.75rem; }
  .setup-sparkline-wrap { align-items: flex-start; }
  /* Tighten levels on small screens */
  .setup-levels      { grid-template-columns: 1fr 1fr; gap: 0.5rem 0.5rem; padding: 0.75rem 1rem; }
  .setup-level-val   { font-size: 0.8rem; }
  /* Footer stacks on very small phones */
  .setup-card-footer { flex-wrap: wrap; gap: 0.5rem; }
}

/* Mobile nav setup link highlight */
.mnav-setup { color: #22c55e !important; }

/* ── 20. PARALLAX HERO GLOW — JS writes transform directly ──────────
   No transition here — JS uses RAF at full frame rate. */
.hero-glow { transition: none !important; }

/* ═══════════════════════════════════════════════════════════
   v141 ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

/* ─── Page-transition overlay ────────────────────────────────── */
#pto {
  position: fixed;
  inset: 0;
  z-index: 9800;
  pointer-events: none;
  background: var(--bg, #08090f);
  opacity: 0;
  will-change: opacity;
}
#pto.pto-in  { opacity: 1; transition: opacity 0.09s ease-in; }
#pto.pto-out { opacity: 0; transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1); }

/* Brand scan-line that sweeps top → bottom while the overlay flashes in */
#pto::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--brand, #6366f1) 40%,
    #818cf8 60%,
    transparent 100%);
  top: -2px;
  opacity: 0;
}
#pto.pto-in::after {
  animation: pto-scan 0.3s ease-out forwards;
}
@keyframes pto-scan {
  0%   { top: -2px; opacity: 0; }
  8%   { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { top: 100%; opacity: 0; }
}

/* ─── News cards — staggered fade-up ─────────────────────────── */
@keyframes nc-card-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nc-card {
  animation: nc-card-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--nc-delay, 0ms);
}

/* ─── Setup cards — staggered slide from left ────────────────── */
@keyframes sc-slide-in {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
.setup-card {
  animation: sc-slide-in 0.52s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--sc-delay, 0ms);
}

/* ─── Portfolio donut — spin + scale reveal ──────────────────── */
@keyframes donut-spin-in {
  from { opacity: 0; transform: scale(0.5) rotate(-60deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
.pi-donut-svg {
  animation: donut-spin-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  transform-origin: center;
  display: block;
}

/* ─── Macro tile badge — spring pop ─────────────────────────── */
@keyframes mbadge-pop {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}
.macro-tile-badge {
  animation: mbadge-pop 0.36s cubic-bezier(0.34, 1.56, 0.64, 1) 0.28s backwards;
}

/* ─── Signal Scorecard ───────────────────────────────────────── */
.sig-sc-wrap {
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.sig-sc-hd { margin-bottom: 24px; }
.sig-sc-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
}
.sig-sc-sub {
  color: var(--subtle);
  font-size: 0.88rem;
  margin: 0;
}
.sig-sc-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sig-sc-card {
  display: grid;
  grid-template-columns: 32px 36px 1fr auto auto auto 52px;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  animation: sc-slide-in 0.52s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--sc-delay, 0ms);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.sig-sc-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateX(4px);
}
.sig-sc-rank {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--subtle);
  letter-spacing: 0.04em;
}
.sig-sc-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  flex-shrink: 0;
}
.sig-sc-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sig-sc-sym {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.sig-sc-name {
  font-size: 0.75rem;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sig-sc-score {
  font-size: 0.8rem;
  color: var(--subtle);
  white-space: nowrap;
}
.sig-sc-score strong {
  color: var(--text);
  font-weight: 700;
}
.sig-sc-ret {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}
.sig-sc-up { color: var(--green); }
.sig-sc-dn { color: var(--red); }
.sig-sc-period {
  font-size: 0.7rem;
  color: var(--subtle);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-align: right;
}
.sig-sc-disclaimer {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--subtle);
  text-align: center;
  font-style: italic;
  opacity: 0.7;
}
@media (max-width: 600px) {
  .sig-sc-card {
    grid-template-columns: 28px 32px 1fr auto auto;
    gap: 8px;
  }
  .sig-sc-score, .sig-sc-period { display: none; }
}

/* ─── reduced-motion: kill new additions ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #pto, #pto::after,
  .nc-card, .setup-card, .pi-donut-svg, .macro-tile-badge {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── REDUCED MOTION — strip all new animations ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  body::after,
  .page-vignette { display: none !important; }

  .hero-glow { animation: none !important; will-change: auto; }

  .btn-primary::after,
  .card:not(.card-featured):not(.card-locked)::after,
  .pulse-card::after { display: none !important; }

  #scrollProgress,
  .scroll-progress {
    animation: none !important;
    box-shadow: none;
  }

  .anim-ready,
  .sec-header, .sec-label, .sec-title, .sec-sub {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }
}


/* ── SETUP CHART MOTION ─────────────────────────────────────────────
   Draw-in on load: pathLength="1" on the polylines lets one keyframe
   sweep any chart left-to-right. Zone/levels fade up after the line
   lands; the live-price dot breathes. Compositor-only properties. */
.scg-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: scgDraw 2s cubic-bezier(0.35, 0, 0.25, 1) 0.2s forwards;
}
.scg-draw--ma { animation-duration: 2.6s; animation-delay: 0.45s; }
@keyframes scgDraw { to { stroke-dashoffset: 0; } }
.scg-zone, .scg-level {
  opacity: 0;
  animation: scgFade 0.7s ease 1.9s forwards;
}
@keyframes scgFade { to { opacity: 1; } }
.scg-dot, .scg-pulse {
  opacity: 0;
  animation: scgFade 0.4s ease 2.2s forwards;
}
.scg-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: scgFade 0.4s ease 2.2s forwards, scgPulse 2.4s ease-in-out 2.6s infinite;
}
@keyframes scgPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.7); }
}

/* ── CARD MOTION — shared depth language for the main card surfaces ── */
.tool-card, .nc-card, .opp-row, .cards-grid .card {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.28s ease;
}
.tool-card:hover, .cards-grid .card:hover {
  transform: translateY(-4px);
  border-color: rgba(16,185,129,0.3);
  box-shadow: 0 16px 42px rgba(0,0,0,0.26);
}
.nc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.22);
}
.opp-row:hover { transform: translateX(3px); }

/* ── Small sparklines (rankings row, hover-preview, 7-day score trend) ──
   Same pathLength="1" trick as the setup chart above, reusing its scgDraw
   keyframe — shorter duration since these charts are tiny. The hover-preview
   card rebuilds its innerHTML on every new symbol, so this replays on each
   hover automatically (a fresh element re-entering the DOM re-triggers a
   CSS animation) rather than needing any JS timing logic. */
.spark-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: scgDraw 0.9s cubic-bezier(0.35, 0, 0.25, 1) 0.05s forwards;
}

/* Hover-preview chart — only plays once the hover-intent delay confirms the
   row is actually being looked at (see the mouseover handler), so unlike
   .spark-draw this is never mid-animation when the card gets torn down for
   the next row. Line + fill reveal together instead of the fill just
   appearing under a still-drawing line. */
.hc-line-draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.hc-area-draw { opacity: 0; }
/* Deliberately NOT cubic-bezier(0.16,1,0.3,1) (the curve everything else on
   the site uses for position/scale settling) — that curve front-loads ~80%
   of its motion into the first quarter of the duration, which is right for
   something decelerating into place but wrong for a line you're meant to
   watch grow: it read as an abrupt snap followed by an imperceptible crawl,
   not a smooth draw. A symmetric ease-in-out spreads the visible motion
   evenly across the whole animation instead. */
.hc-line-draw.hc-draw-play { animation: scgDraw 0.75s cubic-bezier(0.45, 0, 0.55, 1) forwards; }
.hc-area-draw.hc-draw-play { animation: hcAreaFade 0.75s cubic-bezier(0.45, 0, 0.55, 1) forwards; }
@keyframes hcAreaFade { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .scg-draw, .scg-draw--ma, .scg-zone, .scg-level, .scg-dot, .scg-pulse, .spark-draw,
  .hc-line-draw, .hc-area-draw {
    animation: none;
    opacity: 1;
    stroke-dashoffset: 0;
  }
  .setup-card, .tool-card, .nc-card, .opp-row, .cards-grid .card { transition: none; }
}

/* Market Intel series filter */
.archive-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.af-btn {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--subtle);
  border: 1px solid var(--border); transition: color .15s, border-color .15s, background .15s;
}
.af-btn:hover { color: var(--text); border-color: var(--brand); }
.af-btn--active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Voided entry plan — shown when price has traded through the stop (or past
   target 1) and every ma20-anchored level is on the wrong side of the market.
   Deliberately styled as a warning rather than a card grid: the failure mode
   being fixed is a dead plan rendering as though it were tradeable. */
.ep-void {
  border: 1px solid rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.06);
  border-radius: 10px;
  padding: 14px 16px;
}
.ep-void-title {
  font-size: 13px; font-weight: 700; color: var(--red, #ef4444);
  margin-bottom: 6px; line-height: 1.4;
}
.ep-void-body { font-size: 12.5px; line-height: 1.65; color: var(--subtle); }
.ep-void-body strong { color: var(--text); }

/* Removed: hero background video (another company's animation hotlinked from
   their CDN), the scrolling ticker tape, and the sound toggle. Offsets that
   assumed the 30px ticker bar now sit directly under the 52px nav. */
.ticker-bar, .hero-video, #soundToggle { display: none !important; }
.crash-banner { top: 52px !important; }
.mobile-nav { top: 52px !important; max-height: calc(100vh - 52px) !important; }
.ep-sidebar { top: 52px !important; height: calc(100vh - 52px) !important; }
.crash-banner .cb-left { flex-shrink: 1 !important; min-width: 0; }
.crash-banner .cb-text > * { white-space: normal !important; overflow-wrap: anywhere; }
@media (max-width: 640px) { .hero { padding-top: calc(76px + var(--banner-h, 0px)) !important; } }

/* ── The Wire: calm, slow-scrolling strip of dated, sourced facts ─────────── */
.wire { margin: 18px 0 6px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-card); overflow: hidden; }
.wire[hidden] { display: none; }
.wire-bar { display: flex; align-items: stretch; }
.wire-head { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 9px 16px; border-right: 1px solid var(--border); }
.wire-label { font: 600 11px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
.wire-updated { font: 500 11px/1.2 var(--font); color: var(--muted); white-space: nowrap; }
.wire-viewport { flex: 1 1 auto; min-width: 0; overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 40px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 40px), transparent 100%); }
.wire-track { display: flex; width: max-content; animation: wire-scroll var(--wire-dur, 240s) linear infinite; }
.wire:hover .wire-track, .wire:focus-within .wire-track, .wire.is-open .wire-track { animation-play-state: paused; }
.wire-run { display: flex; align-items: center; flex: 0 0 auto; }
.wire-item { display: inline-flex; align-items: baseline; gap: 10px; padding: 11px 0; white-space: nowrap; font: 400 13.5px/1.3 var(--font); color: var(--text); text-decoration: none; }
a.wire-item:hover .wire-text, a.wire-item:focus-visible .wire-text, a.wire-li:hover .wire-text, a.wire-li:focus-visible .wire-text { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
.wire-date { font: 500 12px/1 var(--mono); color: var(--muted); }
.wire-src { font: 500 11.5px/1 var(--font); color: var(--muted); }
.wire-src::before { content: '— '; }
.wire-sep { flex: 0 0 auto; width: 4px; height: 4px; border-radius: 50%; background: var(--border-hi); margin: 0 22px; }
.wire-toggle { flex: 0 0 auto; border: 0; border-left: 1px solid var(--border); background: transparent; color: var(--text); font: 600 12px/1 var(--font); padding: 0 16px; cursor: pointer; white-space: nowrap; }
.wire-toggle:hover { background: var(--bg-hover); }
.wire-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.wire-panel { border-top: 1px solid var(--border); }
.wire-panel[hidden] { display: none; }
.wire-list { list-style: none; margin: 0; padding: 4px 0; }
.wire-list li + li { border-top: 1px solid var(--border-sub); }
.wire-li { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: baseline; padding: 10px 16px; font: 400 14px/1.5 var(--font); color: var(--text); text-decoration: none; }
.wire-li .wire-src::before { content: ''; }
@keyframes wire-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .wire-track { animation: none; }
  .wire-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .wire-run[aria-hidden="true"] { display: none; }
}
@media (max-width: 640px) {
  .wire-bar { flex-wrap: wrap; }
  .wire-head { flex: 1 1 auto; flex-direction: row; align-items: baseline; gap: 10px; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px 14px; }
  .wire-toggle { border-left: 0; border-bottom: 1px solid var(--border); padding: 0 14px; }
  .wire-viewport { flex-basis: 100%; }
  .wire-li { grid-template-columns: 48px 1fr; gap: 10px; padding: 10px 14px; }
  .wire-li .wire-src { grid-column: 2; }
}
