/* ============================================================
   MomentumEdge — Main Stylesheet
   Sections:
     1. Design tokens & reset
     2. Typography helpers
     3. Buttons & pills
     4. Layout & container
     5. Navigation
     6. Hero
     7. Filter bar
     8. Movers table
     9. Paywall overlay
    10. Stock detail modal
    11. Modal tabs
    12. Chart wrappers
    13. Stats grid / stat cards
    14. Social cards
    15. Fundamentals grid
    16. Risk / expected-move
    17. Backtest section
    18. Pricing section
    19. Footer
    20. Animations & utilities
    21. Responsive overrides
   ============================================================ */


/* ── 1. Design tokens & reset ─────────────────────────────── */
/* ═══ "The Lab" — Swiss quant precision ═══
   White ground, one engineered blue, hairline structure, sharp corners.
   Hierarchy comes from type weight (300/500/700) and hairlines, not
   shadows or gradients. Semantic colors (green/red/amber) are reserved
   for data meaning and never used decoratively. */
:root {
  --bg:        #fafbfc;
  --surface:   #ffffff;
  --surface2:  #f2f4f7;
  --surface3:  #e9edf1;
  --border:    #d8dde2;
  --border2:   #c3cad1;

  --text:      #15181b;
  --text2:     #49515a;
  --muted:     #7a838c;

  --accent:    #0f62fe;
  --accent2:   #0043ce;
  --green:     #0e8345;
  --green2:    #0a6b38;
  --red:       #c2372c;
  --amber:     #8a5a00;
  --cyan:      #0072c3;
  --purple:    #6929c4;
  --gold:      #8a5a00;

  --radius-sm: 2px;
  --radius:    3px;
  --radius-lg: 4px;
  --radius-xl: 6px;

  --shadow:    0 1px 3px rgba(21, 24, 27, 0.08);
  --shadow-sm: 0 1px 2px rgba(21, 24, 27, 0.05);

  --font: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select { font-family: inherit; }


/* ── 2. Typography helpers ────────────────────────────────── */
.text-muted    { color: var(--text2); }
.text-faint    { color: var(--muted); }
.text-green    { color: var(--green); }
.text-red      { color: var(--red); }
.text-amber    { color: var(--amber); }
.text-cyan     { color: var(--cyan); }
.text-purple   { color: var(--purple); }
.text-accent   { color: var(--accent); }
.text-mono     { font-family: var(--font-mono); }

.label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

/* Lab: no gradient type — identity comes from weight contrast.
   Class names kept so markup doesn't need touching. */
.gradient-text {
  color: var(--accent);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.gradient-text-green {
  color: var(--green);
  font-weight: 300;
  letter-spacing: -0.02em;
}


/* ── 3. Buttons & pills ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  border: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}
.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(15,98,254,0.05);
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: none;
}
.btn-ghost:hover { color: var(--text); }

.btn-discord {
  background: #fff;
  color: #5865F2;
  font-weight: 700;
}
.btn-discord:hover { opacity: 0.92; transform: translateY(-1px); }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-full { width: 100%; }

/* Pill badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-accent  { background: rgba(15,98,254,0.12); border: 1px solid rgba(15,98,254,0.3); color: var(--accent); }
.badge-amber   { background: rgba(138,90,0,0.10); border: 1px solid rgba(138,90,0,0.3); color: var(--amber); }
.badge-green   { background: rgba(14,131,69,0.10); border: 1px solid rgba(14,131,69,0.3); color: var(--green); }
.badge-red     { background: rgba(194,55,44,0.10);  border: 1px solid rgba(194,55,44,0.3);  color: var(--red); }
.badge-purple  { background: rgba(105,41,196,0.10);border: 1px solid rgba(105,41,196,0.3);color: var(--purple); }

/* Trust pills */
.trust-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
}
.trust-A { background: rgba(14,131,69,0.12);  border: 1px solid rgba(14,131,69,0.3);  color: var(--green); }
.trust-B { background: rgba(0,114,195,0.12);   border: 1px solid rgba(0,114,195,0.3);   color: var(--cyan); }
.trust-C { background: rgba(138,90,0,0.12);  border: 1px solid rgba(138,90,0,0.3);  color: var(--amber); }
.trust-D { background: rgba(194,55,44,0.12);   border: 1px solid rgba(194,55,44,0.3);   color: var(--red); }
.trust-F { background: rgba(194,55,44,0.18);   border: 1px solid rgba(194,55,44,0.4);   color: #a02318; }

/* Risk pills */
.risk-pill {
  display: inline-block;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.risk-LOW       { background: rgba(14,131,69,0.10); color: var(--green); }
.risk-MEDIUM    { background: rgba(138,90,0,0.10); color: var(--amber); }
.risk-HIGH      { background: rgba(194,55,44,0.10);  color: var(--red); }
.risk-VERY-HIGH { background: rgba(194,55,44,0.18);  color: #a02318; }


/* ── 4. Layout & container ────────────────────────────────── */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
}

.section { padding: 44px 0; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.inset {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}


/* ── 5. Navigation ────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 58px;
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.nav-logo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  transition: all 0.15s;
  border: none;
  background: none;
  cursor: pointer;
}
.nav-link:hover { color: var(--text); background: var(--surface2); }
.nav-link.active { color: var(--text); background: var(--surface2); }

.nav-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s ease-in-out infinite;
}

/* ── 6. Hero ──────────────────────────────────────────────── */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% -10%, rgba(15,98,254,0.05), transparent),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(15,98,254,0.02), transparent);
  pointer-events: none;
}

.hero-inner { position: relative; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}

.hero-sub {
  color: var(--text2);
  font-size: 17px;
  max-width: 500px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 60px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stat {
  flex: 1;
  padding: 20px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.hero-stat:last-child { border-right: none; }

.hero-stat-num {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero-stat-lbl {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}


/* ── 7. Filter bar ────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 20px;
  flex-wrap: wrap;
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.filter-item {}
.filter-item .fi-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.filter-item .fi-value { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 2px; }

/* Interactive filter controls */
.filter-control { cursor: default; }
.filter-control[title] { cursor: help; }
.fi-control {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}
.fi-lock { font-size: 11px; opacity: 0.5; }
.fi-input {
  width: 44px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 2px 5px;
  text-align: center;
  outline: none;
  transition: border-color .15s;
}
.fi-input:not(:disabled):focus { border-color: var(--cyan); }
.fi-input:disabled { opacity: 0.45; cursor: not-allowed; }
.fi-unit { font-size: 11px; color: var(--muted); font-weight: 600; }

.filter-sep {
  width: 1px; height: 36px;
  background: var(--border);
}


/* ── 8. Movers table ──────────────────────────────────────── */
.movers-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.movers-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* Column widths — compacted to fit YouTube + Momentum without overflow */
.movers-table .col-ticker  { width: 11%; }
.movers-table .col-price   { width: 8%;  }
.movers-table .col-change  { width: 7%;  }
.movers-table .col-volume  { width: 10%; }
.movers-table .col-vratio  { width: 8%;  }
.movers-table .col-reddit  { width: 11%; }
.movers-table .col-youtube { width: 6%;  }
.movers-table .col-trust   { width: 12%; }
.movers-table .col-risk    { width: 9%;  }
.movers-table .col-momentum{ width: 9%;  }
.movers-table .col-action  { width: 4%;  }

/* Header */
.movers-table thead tr {
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.movers-table thead th {
  padding: 9px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  white-space: nowrap;
}

.movers-table thead th.align-right { text-align: right; }
.movers-table thead th.align-center { text-align: center; }

/* Body rows */
.movers-table tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.movers-table tbody tr:last-child { border-bottom: none; }
.movers-table tbody tr:hover { background: var(--surface2); }

.movers-table tbody td {
  padding: 10px 10px;
  vertical-align: middle;
  font-size: 12px;
}

.movers-table tbody td.align-right  { text-align: right; }
.movers-table tbody td.align-center { text-align: center; }

/* Ticker cell */
.td-ticker-sym {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}
.td-ticker-name {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* Price cell */
.td-price {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Change cell */
.td-change {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--green);
}

/* Volume cell */
.td-vol-main {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-align: right;
}
.td-vol-sub {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  margin-top: 2px;
}

/* Volume ratio */
.td-vratio {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--cyan);
  text-align: right;
}
.vratio-bar {
  height: 3px;
  background: var(--border2);
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
}
.vratio-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* Reddit cell */
.td-reddit-count {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-align: right;
}
.td-reddit-sent {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  margin-top: 2px;
}

/* Arrow */
.td-arrow {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  transition: color 0.15s;
}
tr:hover .td-arrow { color: var(--accent); }

/* Locked row styling */
.movers-table tbody tr.row-locked {
  opacity: 0.35;
  pointer-events: none;
  filter: blur(2px);
}


/* ── 9. Paywall overlay ───────────────────────────────────── */
.paywall-wrap {
  position: relative;
  margin-top: -1px; /* merge with table border */
  /* Hidden until movers load successfully */
}
.paywall-wrap.hidden { display: none; }

.paywall-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  min-height: 160px;
}

.paywall-ghost-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  filter: blur(6px);
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
}
.paywall-ghost-row:last-child { border-bottom: none; }

.ghost-block {
  background: var(--surface3);
  border-radius: 4px;
  height: 16px;
}

/* ── Skeleton loading rows ────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton-row td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
}
.skeleton-block {
  border-radius: 4px;
  height: 14px;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-block.short  { width: 40%; }
.skeleton-block.medium { width: 65%; }
.skeleton-block.long   { width: 85%; }
.paywall-wrap.loading-hidden { visibility: hidden; opacity: 0; }

/* Status row + spinner */
.skeleton-status-row td {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.skeleton-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── YouTube buzz cell ────────────────────────────────────── */
.td-yt-buzz {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  letter-spacing: .02em;
}

/* ── Lazy-loading cell placeholder ───────────────────────── */
.td-loading {
  color: var(--muted);
  font-size: 12px;
  opacity: 0.5;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* ── Admin badge (nav) ────────────────────────────────────── */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: rgba(14,131,69,.12);
  border: 1px solid rgba(14,131,69,.3);
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: .02em;
}

/* ── Admin login panel ────────────────────────────────────── */
.admin-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(21,24,27,0.38);
  backdrop-filter: blur(4px);
  z-index: 10000;
}
.admin-panel-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  width: 380px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 12px 40px rgba(21,24,27,0.16);
}
.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.admin-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.admin-panel-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.admin-panel-close:hover { color: var(--text); }
.admin-panel-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.admin-panel-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: monospace;
  padding: 10px 12px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color .15s;
}
.admin-panel-input:focus { border-color: var(--cyan); }
.admin-panel-actions {
  display: flex;
  gap: 8px;
}
.admin-panel-footer {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}

.paywall-cta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 20px 20px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(to bottom,
    rgba(250,251,252,0)    0%,
    rgba(250,251,252,0.7) 25%,
    rgba(250,251,252,0.96) 55%,
    rgba(250,251,252,1)   100%);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  text-align: center;
}

.paywall-cta .lock-icon { font-size: 28px; }
.paywall-cta h3 { font-size: 16px; font-weight: 700; }
.paywall-cta p  { font-size: 13px; color: var(--text2); text-align: center; max-width: 300px; line-height: 1.5; }


/* ── 10. Stock detail modal ───────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21,24,27,0.45);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 20px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 880px;
  padding: 32px;
  position: relative;
  transform: translateY(12px);
  transition: transform 0.2s;
  margin: auto;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { border-color: var(--red); color: var(--red); }

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.modal-ticker-block {}
.modal-ticker { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.modal-fullname { color: var(--text2); font-size: 13px; margin-top: 4px; }

.modal-price-block { margin-left: auto; text-align: right; }
.modal-change { font-size: 26px; font-weight: 800; color: var(--green); }
.modal-price  { color: var(--text2); font-size: 13px; margin-top: 4px; }

.modal-pills { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }


/* ── 11. Modal tabs ───────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 24px;
  width: fit-content;
}

.tab-btn {
  padding: 6px 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  background: none;
  border: none;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: var(--surface2);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(21,24,27,0.10);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }


/* ── 12. Chart wrappers ───────────────────────────────────── */
.chart-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.chart-box canvas { max-height: 220px; }


/* ── 13. Stats grid / stat cards ──────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-card .sc-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.stat-card .sc-value { font-size: 18px; font-weight: 700; margin-top: 5px; }
.stat-card .sc-sub   { font-size: 11px; color: var(--muted); margin-top: 2px; }


/* ── 14. Social cards ─────────────────────────────────────── */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.social-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.social-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.social-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-big-num { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.social-sub     { font-size: 11px; color: var(--muted); }

.sent-bar-wrap { margin-top: 14px; }
.sent-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}
.sent-bar {
  height: 6px;
  background: var(--border2);
  border-radius: 3px;
  overflow: hidden;
}
.sent-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.sent-bull { background: var(--green); }
.sent-bear { background: var(--red); }

/* Trust gauge row */
.trust-gauge-row {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.trust-grade-circle {
  flex-shrink: 0;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
}
.tgc-A { background: rgba(14,131,69,0.15); border: 2px solid rgba(14,131,69,0.6); color: var(--green); }
.tgc-B { background: rgba(0,114,195,0.15);  border: 2px solid rgba(0,114,195,0.6);  color: var(--cyan); }
.tgc-C { background: rgba(138,90,0,0.15); border: 2px solid rgba(138,90,0,0.6); color: var(--amber); }
.tgc-D { background: rgba(194,55,44,0.15);  border: 2px solid rgba(194,55,44,0.6);  color: var(--red); }
.tgc-F { background: rgba(194,55,44,0.2);   border: 2px solid rgba(194,55,44,0.8);  color: #a02318; }

.trust-grade-label { font-size: 17px; font-weight: 700; }
.trust-grade-desc  { font-size: 12px; color: var(--text2); margin-top: 4px; line-height: 1.5; }
.trust-bot-row {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}
.trust-bot-row span { color: var(--text); font-weight: 600; }


/* ── 15. Fundamentals grid ────────────────────────────────── */
.fund-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}

.fund-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.fund-block-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); margin-bottom: 10px;
}

.fund-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(216,221,226,0.8);
}
.fund-row:last-child { border-bottom: none; }
.fund-key  { font-size: 12px; color: var(--text2); }
.fund-val  { font-size: 13px; font-weight: 600; }

.company-desc-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.company-desc-box .fund-health-score {
  font-size: 26px; font-weight: 800;
  display: inline-block; margin-right: 10px;
}
.company-desc-box .fund-health-label {
  font-size: 13px; font-weight: 600;
}
.company-desc-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
  margin-top: 10px;
}

.analyst-bar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.analyst-item .ai-label { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.analyst-item .ai-val   { font-size: 17px; font-weight: 700; margin-top: 3px; }


/* ── 16. Risk / expected-move ─────────────────────────────── */
.expected-move-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.expected-move-box .em-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); margin-bottom: 14px;
}

.em-track {
  position: relative;
  height: 48px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 8px 0;
}
.em-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: linear-gradient(90deg,
    rgba(194,55,44,0.25),
    rgba(138,90,0,0.15),
    rgba(14,131,69,0.25));
}
.em-center-line {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--muted);
  transform: translateX(-50%);
}
.em-labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  font-size: 11px;
  margin-top: 6px;
}
.em-labels span:nth-child(1),
.em-labels span:nth-child(2) { color: var(--red); }
.em-labels span:nth-child(3) { color: var(--muted); text-align: center; }
.em-labels span:nth-child(4),
.em-labels span:nth-child(5) { color: var(--green); text-align: right; }

.em-disclaimer {
  font-size: 11px;
  color: var(--muted);
  background: rgba(21,24,27,0.02);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-top: 12px;
  line-height: 1.5;
}


/* ── 17. Backtest section ─────────────────────────────────── */
.backtest-section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.section-eyebrow { text-align: center; margin-bottom: 12px; }
.section-title   { font-size: 30px; font-weight: 800; letter-spacing: -0.8px; text-align: center; }
.section-sub     { color: var(--text2); font-size: 15px; text-align: center; margin-top: 8px; }

.backtest-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
  margin-top: 36px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.backtest-kpis {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.kpi-card .kpi-num   { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.kpi-card .kpi-label { font-size: 11px; color: var(--muted); margin-top: 3px; }

.backtest-lock-notice {
  margin-top: 24px;
  text-align: center;
}
.lock-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(138,90,0,0.06);
  border: 1px solid rgba(138,90,0,0.2);
  color: var(--amber);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 13px;
  margin-bottom: 16px;
}


/* ── 18. Pricing section ──────────────────────────────────── */
.pricing-section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 660px;
  margin: 40px auto 0;
}

.pricing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--accent);
  background: rgba(15,98,254,0.04);
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.plan-tier   { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.plan-price  { font-size: 38px; font-weight: 800; letter-spacing: -1px; margin: 8px 0 2px; }
.plan-price span { font-size: 14px; font-weight: 400; color: var(--text2); }
.plan-tagline { font-size: 12px; color: var(--muted); margin-bottom: 20px; }

.plan-features { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 24px; }
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.4;
}
.feat-icon { flex-shrink: 0; font-size: 13px; margin-top: 1px; }
.feat-text-muted { color: var(--muted); }

.discord-strip {
  max-width: 660px;
  margin: 20px auto 0;
  background: linear-gradient(135deg, #5865F2, #4752C4);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.discord-strip-text h4   { font-weight: 700; font-size: 15px; }
.discord-strip-text p    { font-size: 12px; opacity: 0.8; margin-top: 3px; }


/* ── 19. Footer ───────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text2); }
.footer-links { display: flex; gap: 20px; justify-content: center; margin-bottom: 8px; }
.footer-disclaimer { margin-top: 6px; font-size: 11px; }


/* ── 20. Animations & utilities ───────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 2px rgba(14,131,69,0.3); }
  50%       { opacity: 0.4; box-shadow: none; }
}

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

.fade-in { animation: fadeIn 0.25s ease both; }

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

.upgrade-inline {
  background: rgba(138,90,0,0.06);
  border: 1px solid rgba(138,90,0,0.2);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--amber);
}


/* ── 22. Signals tab ──────────────────────────────────────── */

/* Momentum score card */
.sig-momentum-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.sig-momentum-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 14px;
}
.sig-section-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted);
}
.sig-momentum-label { font-size: 17px; font-weight: 700; margin-top: 4px; }
.sig-momentum-num {
  font-size: 36px; font-weight: 900; letter-spacing: -1px; line-height: 1;
}
.sig-momentum-num span { font-size: 14px; font-weight: 400; color: var(--muted); }

.sig-progress-track {
  height: 10px; background: var(--border2);
  border-radius: 5px; overflow: hidden; margin-bottom: 6px;
}
.sig-progress-fill {
  height: 100%; border-radius: 5px;
  transition: width 0.5s ease;
}
.sig-progress-labels {
  display: flex; justify-content: space-between;
  font-size: 9px; color: var(--muted);
}

/* Sentiment trio */
.sig-sent-trio {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 4px;
}
.sig-sent-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.sig-sent-icon   { font-size: 16px; margin-bottom: 6px; }
.sig-sent-name   { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.sig-sent-score  { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-top: 8px; }
.sig-sent-lbl    { font-size: 11px; color: var(--text2); margin-top: 2px; margin-bottom: 10px; }
.sig-sent-track  {
  position: relative; height: 5px;
  background: var(--border2); border-radius: 3px; overflow: hidden;
}
.sig-sent-fill   { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; transition: width 0.4s; }
.sig-sent-midline {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; background: rgba(21,24,27,0.10);
}

/* Social sources grid */
.sig-sources-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sig-source-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.sig-source-header {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 12px;
}
.sig-source-icon { font-size: 14px; }
.sig-source-name { font-size: 12px; font-weight: 700; color: var(--text2); }
.sig-source-window {
  margin-left: auto;
  font-size: 9px; color: var(--muted);
  background: var(--surface2); border-radius: 10px;
  padding: 2px 7px;
}
.sig-source-metrics {
  display: flex; gap: 4px; margin-bottom: 10px;
}
.sig-metric {
  flex: 1; text-align: center;
  background: var(--surface2); border-radius: 6px; padding: 7px 4px;
}
.sig-metric-val  { font-size: 14px; font-weight: 700; }
.sig-metric-lbl  { font-size: 9px; color: var(--muted); margin-top: 2px; }
.sig-source-sent-bar {
  height: 5px; background: var(--border2); border-radius: 3px; overflow: hidden;
}
.sig-bar-fill-green { height: 100%; background: var(--green); border-radius: 3px; }
.sig-bar-label {
  display: flex; justify-content: space-between;
  font-size: 10px; margin-top: 4px;
}
.sig-channels   { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.sig-channel-chip {
  background: var(--surface2); border-radius: 10px;
  padding: 2px 8px; font-size: 9px; color: var(--text2);
}

/* Analyst panel */
.sig-consensus-row {
  display: flex; align-items: center; gap: 20px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  flex-wrap: wrap;
}
.sig-consensus-rating { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.sig-consensus-meta   { font-size: 13px; font-weight: 600; }
.sig-consensus-targets { margin-left: auto; text-align: right; }
.sig-target-mean { font-size: 20px; font-weight: 700; }

.sig-rating-bar-wrap { margin: 10px 0; }
.sig-rating-bar {
  height: 8px; display: flex; border-radius: 4px; overflow: hidden;
}
.sig-rating-bar > div { transition: width 0.4s; }
.sig-rating-bar-labels {
  display: flex; gap: 16px; font-size: 11px; margin-top: 5px;
}

.sig-analyst-actions { display: flex; flex-direction: column; gap: 6px; }
.sig-analyst-action {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 12px; flex-wrap: wrap;
}
.sig-action-badge   { font-weight: 700; min-width: 70px; }
.sig-action-firm    { font-weight: 600; color: var(--text); }
.sig-action-rating  { color: var(--text2); }
.sig-action-date    { margin-left: auto; font-size: 11px; }

.sig-articles { display: flex; flex-direction: column; gap: 6px; }
.sig-article-row {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.sig-article-title { font-size: 12px; font-weight: 500; line-height: 1.4; }
.sig-article-meta  { font-size: 10px; color: var(--muted); margin-top: 3px; }

.sig-vol-chip {
  background: var(--surface2); border-radius: 10px;
  padding: 1px 8px; font-size: 10px; color: var(--text2);
  margin-left: 6px; font-weight: 500; text-transform: none; letter-spacing: 0;
}

/* ── 23. ATH warning ──────────────────────────────────────── */
.ath-warning-banner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(194,55,44,0.07);
  border: 1px solid rgba(194,55,44,0.3);
  border-radius: var(--radius-sm);
  padding: 8px 14px; margin-top: 10px;
  font-size: 12px; color: var(--red);
}
.ath-warning-banner .ath-icon { font-size: 16px; flex-shrink: 0; }
.ath-warning-banner strong { font-weight: 700; }

/* ATH warning in table */
.ath-warn-icon {
  color: var(--red); font-size: 12px;
  cursor: help;
}

/* Momentum score in table */
.td-momentum {
  font-size: 13px; font-weight: 700;
  font-family: var(--font-mono);
  text-align: right;
}
.momentum-bar {
  height: 3px; background: var(--border2);
  border-radius: 2px; margin-top: 5px; overflow: hidden;
}
.momentum-bar-fill { height: 100%; border-radius: 2px; }

/* Candlestick chart container */
.lw-chart-container {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0; overflow: hidden;
  margin-bottom: 20px; height: 260px;
}

/* ── WSB timeframe tab buttons (signals modal + DD page) ────── */
.wsb-tf-btn {
  padding: 4px 12px; border-radius: 6px; font-size: 11px;
  font-weight: 700; border: 1px solid var(--border);
  background: transparent; color: var(--text2); cursor: pointer;
  transition: all 0.15s;
}
.wsb-tf-btn:hover { border-color: var(--accent); color: var(--text); }
.wsb-tf-btn.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}

/* ── Similar tickers strip (DD page) ──────────────────────── */
.dd-similar-strip {
  margin: 10px 0 0;
  padding: 7px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.dd-similar-strip > .dd-similar-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text2); margin-bottom: 6px;
}
.dd-similar-cards {
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none;
}
.dd-similar-cards::-webkit-scrollbar { display: none; }
.dd-similar-card {
  flex: 0 0 auto; min-width: 160px; max-width: 200px;
  padding: 6px 10px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.dd-similar-card:hover {
  border-color: var(--accent); background: rgba(15,98,254,0.06);
}
.dd-similar-card-left {
  flex: 1; min-width: 0;
}
.dd-similar-card-right {
  flex: 0 0 auto; text-align: right;
}
.dd-similar-ticker {
  font-size: 13px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 1px;
}
.dd-similar-name {
  font-size: 10px; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dd-similar-score {
  font-size: 15px; font-weight: 800; line-height: 1;
}
.dd-similar-label-sm {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; color: inherit;
}
.dd-similar-chg {
  font-size: 10px; font-weight: 700;
}

/* ── 24. Movers table — extra columns ─────────────────────── */
.movers-table .col-momentum { width: 10%; }
.movers-table .col-score    { width: 10%; }

/* ── 21. Responsive overrides ─────────────────────────────── */
@media (max-width: 900px) {
  .movers-table .col-vratio,
  .movers-table .col-reddit  { display: none; }
}

@media (max-width: 700px) {
  .container { padding: 0 16px; }
  .hero { padding: 48px 0 40px; }
  .hero-stats { flex-direction: column; gap: 0; }

  .backtest-layout { grid-template-columns: 1fr; }
  .pricing-grid    { grid-template-columns: 1fr; }
  .fund-cols       { grid-template-columns: 1fr; }
  .social-grid     { grid-template-columns: 1fr; }
  .stats-grid      { grid-template-columns: repeat(2, 1fr); }

  .movers-table .col-risk,
  .movers-table .col-trust   { display: none; }

  .modal { padding: 20px; }
  .modal-header { flex-direction: column; gap: 10px; }
  .modal-price-block { margin-left: 0; text-align: left; }
}
