/* ── Variables & Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0a0a0a;
  --surface:      #141414;
  --surface2:     #1a1a1a;
  --border:       rgba(255,255,255,0.08);
  --border-light: #27272a;
  --accent:       #fafafa;
  --accent-hover: #ffffff;
  --accent-dark:  #d4d4d8;
  --accent-glow:  rgba(255, 255, 255, 0.06);
  --accent-gradient: linear-gradient(135deg, #fafafa 0%, #a1a1aa 100%);
  --green:        #34d399;
  --red:          #f87171;
  --green-glow:   rgba(52, 211, 153, 0.08);
  --red-glow:     rgba(248, 113, 113, 0.08);
  --text:         #fafafa;
  --text-secondary: #a1a1aa;
  --muted:        #52525b;
  --card-bg:      rgba(20, 20, 20, 0.8);
  --card-border:  rgba(255, 255, 255, 0.06);
  --warn:         #fbbf24;
  --blue:         #60a5fa;
  --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.6);
  --shadow-lg:  0 12px 28px rgba(0, 0, 0, 0.7);
  --shadow-xl:  0 20px 40px rgba(0, 0, 0, 0.8);
  --font-ui:   'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
}

.gradient-text {
  background: linear-gradient(to bottom, #fafafa, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: none;
  margin: 0;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: contain;
}

.logo-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.logo-tag {
  font-size: 10px;
  font-weight: 500;
  font-family: var(--font-mono);
  color: #71717a;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 20px;
}

.header-nav { display: flex; gap: 6px; }

.nav-pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}
.nav-pill:hover { color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.06); }
.nav-pill.active { color: #fafafa; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); }

/* ── Main ─────────────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  width: 100%;
  margin: 0 auto;
  padding: 12px 0 60px 0;
}
/* Non-dashboard views get constrained width + padding */
#view-analyzer, #view-options, #view-calendar, #view-guide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
}

/* ── Search ───────────────────────────────────────────────────────────────── */
.search-section { margin-bottom: 28px; }

.search-wrap {
  max-width: 580px;
  margin: 0 auto;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 4px 4px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar:focus-within {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04), 0 0 40px rgba(255,255,255,0.02);
}

.search-dollar {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--accent);
  margin-right: 8px;
  flex-shrink: 0;
  user-select: none;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.search-input::placeholder {
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.analyze-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 24px;
  background: #fafafa;
  color: #0a0a0a;
  border: none;
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.12s;
  flex-shrink: 0;
  white-space: nowrap;
}
.analyze-btn:hover  { background: #ffffff; box-shadow: 0 0 20px rgba(255,255,255,0.1); }
.analyze-btn:active { transform: scale(0.97); }
.analyze-btn:disabled { background: #27272a; color: var(--muted); cursor: not-allowed; }

.btn-arrow { width: 14px; height: 14px; flex-shrink: 0; }

.search-hint {
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.hint-ticker {
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.15s;
}
.hint-ticker:hover { background: rgba(255,255,255,0.06); }

/* ── Status ───────────────────────────────────────────────────────────────── */
.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
}
.status-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #d4d4d8;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error ────────────────────────────────────────────────────────────────── */
.error-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239,68,68,0.09);
  border: 1px solid rgba(239,68,68,0.28);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--red);
  margin-bottom: 20px;
  font-size: 13px;
}

/* ── Results ──────────────────────────────────────────────────────────────── */
.results-section {
  animation: fadeUp 0.3s ease-out;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Ticker meta ──────────────────────────────────────────────────────────── */
.ticker-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.ticker-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.company-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.ticker-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.06);
  color: var(--accent);
  border: 1px solid rgba(255,255,255,0.12);
}
.sector-tag {
  font-size: 11px;
  color: var(--muted);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
}
.price-cluster { text-align: right; }
.price-main {
  display: block;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
}
.price-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  display: block;
}

/* ── Section label ────────────────────────────────────────────────────────── */
.section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ── Results grid ─────────────────────────────────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 780px) {
  .results-grid { grid-template-columns: 1fr; }
}

/* ── Prediction cards ─────────────────────────────────────────────────────── */
.prediction-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 780px) {
  .prediction-cards { grid-template-columns: 1fr; }
}

.pred-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  box-shadow: var(--shadow-sm);
}
.pred-card.up {
  border-color: rgba(52,211,153,0.2);
  box-shadow: var(--shadow-sm), 0 0 28px rgba(52,211,153,0.06), inset 0 1px 0 rgba(52,211,153,0.08);
}
.pred-card.down {
  border-color: rgba(248,113,113,0.2);
  box-shadow: var(--shadow-sm), 0 0 28px rgba(248,113,113,0.06), inset 0 1px 0 rgba(248,113,113,0.08);
}

.pred-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Arc gauge */
.arc-gauge { flex-shrink: 0; display: block; }

/* Card body */
.pred-info { display: flex; flex-direction: column; gap: 3px; }

.pred-horizon {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pred-direction {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.pred-direction.up   { color: var(--green); }
.pred-direction.down { color: var(--red); }

.conf-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 4px;
}
.conf-high   { background: rgba(255,255,255,0.10); color: var(--text); border: 1px solid rgba(255,255,255,0.15); }
.conf-medium { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid rgba(255,255,255,0.10); }
.conf-low    { background: rgba(255,255,255,0.03); color: var(--muted); border: 1px solid rgba(255,255,255,0.06); }

/* Feature pills */
.pred-features {
  display: none;  /* hidden in compact horizontal layout — signals shown in backtest */
}
.feat-label {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.feat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.feat-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* Backtest strip */
.pred-backtest {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bt-item {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.bt-val { color: var(--text); }

/* ── TradingView Chart ────────────────────────────────────────────────────── */
.tv-chart-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 480px;
  box-shadow: var(--shadow-sm);
}
.tv-chart-wrap .tradingview-widget-container { width: 100%; height: 480px; }

/* ── TradingView Technical Analysis ──────────────────────────────────────── */
.tv-ta-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 425px;
  box-shadow: var(--shadow-sm);
}
.tv-ta-wrap .tradingview-widget-container { width: 100%; height: 425px; }

.chart-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

/* ── Model meta ───────────────────────────────────────────────────────────── */
.model-meta {
  margin-top: 10px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.model-meta strong { color: var(--text); }

/* ── Panel ────────────────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.panel-empty {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 12px 0;
  line-height: 1.8;
}

/* ── Fundamentals ─────────────────────────────────────────────────────────── */
.fund-group { margin-bottom: 14px; }
.fund-group:last-child { margin-bottom: 0; }

.fund-group-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}

.fund-rows { display: flex; flex-direction: column; gap: 5px; }

.fund-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  gap: 8px;
}
.fund-key {
  color: var(--muted);
  font-weight: 400;
  flex: 1;
}
.fund-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

/* ── Sentiment ────────────────────────────────────────────────────────────── */
.sentiment-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
#sentiment-panel {
  min-height: 425px;
  display: flex;
  flex-direction: column;
}
.sentiment-gauge-wrap {
  position: relative;
  width: 100px;
  height: 60px;
  flex-shrink: 0;
}
.sentiment-gauge-inner {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sent-score {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}
.sent-score.pos { color: var(--green); }
.sent-score.neg { color: var(--red); }
.sent-score.neu { color: var(--muted); }
.sent-label {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.sentiment-bars { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.sent-bar-row { display: flex; align-items: center; gap: 8px; }
.sent-bar-lbl { width: 26px; font-size: 10px; color: var(--muted); font-weight: 500; }
.sent-bar-track {
  flex: 1;
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}
.sent-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.sent-bar-fill.pos { background: var(--green); }
.sent-bar-fill.neg { background: var(--red); }
.sent-bar-fill.neu { background: var(--muted); }
.sent-bar-pct {
  width: 30px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.sentiment-headlines {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hl-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.headline-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
}
.headline-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
}
.headline-item a {
  color: var(--accent);
  text-decoration: none;
}
.headline-item a:hover {
  text-decoration: underline;
}
.hl-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.hl-dot.pos { background: var(--green); }
.hl-dot.neg { background: var(--red); }
.hl-dot.neu { background: var(--muted); }

/* ── History table ────────────────────────────────────────────────────────── */
.history-section { margin-top: 4px; }

.history-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.history-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.history-table td {
  padding: 9px 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:nth-child(even) td { background: rgba(30,30,30,0.4); }

.dir-up   { color: var(--green); font-weight: 600; }
.dir-down { color: var(--red);   font-weight: 600; }
.prob-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 16px 24px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── View panels ──────────────────────────────────────────────────────────── */
.view-panel { width: 100%; }

/* ══════════════════════════════════════════════════════════════════════════════
   DASHBOARD VIEW
══════════════════════════════════════════════════════════════════════════════ */

/* Top bar */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 16px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-title-group { display: flex; align-items: baseline; gap: 14px; }

.dash-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(to bottom, #fafafa, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dash-status {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted);
}

.dash-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Horizon toggle */
.horizon-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.horizon-btn {
  padding: 5px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.horizon-btn:hover  { color: var(--text); }
.horizon-btn.active {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Refresh button */
.refresh-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.refresh-btn:hover { border-color: rgba(255,255,255,0.12); color: var(--text); box-shadow: 0 0 0 1px rgba(255,255,255,0.04); }
.refresh-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.refresh-btn.spinning .refresh-icon { animation: spin 1s linear infinite; }
.refresh-icon { width: 13px; height: 13px; flex-shrink: 0; }

/* Progress bar */
.refresh-progress {
  margin-bottom: 20px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.rp-bar-wrap {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.rp-bar {
  height: 100%;
  background: linear-gradient(90deg, #52525b, #a1a1aa);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.rp-text {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted);
  white-space: nowrap;
  min-width: 180px;
}

/* Dashboard groups */
.dashboard-groups {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.dash-group {}

.dash-group-header {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-group-header::before {
  content: '';
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: #71717a;
  display: inline-block;
}

/* Card grid */
.dash-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px;
  perspective: 800px;
}

/* Individual ticker card */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.25s ease-out;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.dash-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md), 0 0 15px rgba(255,255,255,0.025); }

/* Direction tints — monochrome (color only on direction text/gauges) */
.dash-card.up, .dash-card.down {
  border-color: rgba(255,255,255,0.10);
  box-shadow: var(--shadow-sm);
}
.dash-card.up:hover, .dash-card.down:hover {
  border-color: rgba(255,255,255,0.18);
}

/* Directional left-border tint — neutral */
.dc-tint-up, .dc-tint-down {
  border-left: 2px solid rgba(255,255,255,0.12) !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 45%) !important;
}

.dash-card.pending {
  opacity: 0.6;
}
.dash-card.loading {
  animation: cardPulse 1.5s ease-in-out infinite;
}
@keyframes cardPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 0.9; }
}

/* Card rows */
.dc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
}
.dc-ticker {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}
.dc-price {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.dc-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  min-height: 28px;
  overflow: hidden;
}
.dc-name {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.dc-sparkline {
  flex-shrink: 0;
  margin-left: 6px;
  display: block;
  opacity: 0.75;
}

/* Direction + probability */
.dc-dir {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.dc-dir.up   { color: var(--green); }
.dc-dir.down { color: var(--red); }
.dc-dir.pending { color: var(--muted); font-size: 14px; font-weight: 400; }

.dc-prob {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
}

/* Probability bar */
.dc-bar {
  height: 3px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.dc-fill {
  height: 100%;
  border-radius: 2px;
  width: 0;
  animation: fillGrow 0.8s ease-out forwards;
}
.dc-fill.up   { background: var(--green); }
.dc-fill.down { background: var(--red); }
@keyframes fillGrow {
  to { width: var(--fill-width, 0%); }
}

/* Footer */
.dc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dc-age {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* Dashboard empty state */
.dash-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}
.dash-empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.3;
}
.dash-empty p { font-size: 15px; margin-bottom: 6px; }
.dash-empty-sub { font-size: 12px; }

/* ── Prediction Modal ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.15s ease;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.2s ease;
  border: 1px solid rgba(255,255,255,0.06);
}
@keyframes modalSlideUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-ticker-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}
.modal-company {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.modal-price-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.modal-close-btn:hover { background: var(--surface2); color: var(--text); box-shadow: 0 0 0 1px rgba(255,255,255,0.04); }

.modal-htabs {
  display: flex;
  gap: 6px;
  padding: 14px 22px 0;
  flex-shrink: 0;
}
.modal-htab {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.modal-htab.active { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); color: #fafafa; }
.modal-htab:hover:not(.active) { background: var(--surface2); color: var(--text); }

.modal-body { padding: 18px 22px; flex: 1; }

.modal-spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 36px 0;
  color: var(--muted);
  font-size: 13px;
}
.modal-spinner {
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #d4d4d8;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.modal-error {
  padding: 24px;
  text-align: center;
  color: var(--red);
  font-size: 13px;
}

/* Modal body content */
.modal-main-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
.arc-gauge-lg { flex-shrink: 0; }
.modal-verdict { display: flex; flex-direction: column; gap: 7px; }
.modal-direction {
  font-family: var(--font-ui);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}
.modal-direction.up { color: var(--green); }
.modal-direction.down { color: var(--red); }
.modal-prob-detail {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.modal-backtest-row {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 12px;
  background: var(--surface2);
  border-radius: 6px;
  margin-bottom: 18px;
}
.modal-backtest-row strong { color: var(--text); }
.bt-sep { color: var(--border); }

.modal-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  margin-top: 18px;
}
.modal-section-label:first-child { margin-top: 0; }

.modal-explanation {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}
.modal-explanation .mup   { color: var(--green); font-weight: 600; }
.modal-explanation .mdown { color: var(--red);   font-weight: 600; }

.modal-feat-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}
.modal-feat-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  align-items: start;
}
.modal-feat-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #d4d4d8;
  padding-top: 1px;
}
.modal-feat-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* SHAP "Why This Prediction" section */
.shap-explain-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.shap-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shap-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.shap-feat-label {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  min-width: 100px;
}
.shap-feat-val {
  color: var(--muted);
  font-size: 11px;
  font-family: var(--font-mono);
}
.shap-dir {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.shap-dir.shap-bar-bull { color: var(--green); }
.shap-dir.shap-bar-bear { color: var(--red); }
.shap-bar-track {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}
.shap-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.shap-bar-fill.shap-bar-bull { background: var(--green); }
.shap-bar-fill.shap-bar-bear { background: var(--red); }

/* Other timeframes mini cards */
.moh-row {
  display: flex;
  gap: 10px;
}
.moh-card {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  transition: border-color 0.15s;
}
.moh-card:hover { border-color: rgba(255,255,255,0.12); }
.moh-card.up  { border-color: rgba(52, 211, 153, 0.2); }
.moh-card.down { border-color: rgba(248, 113, 113, 0.2); }
.moh-label-text {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}
.moh-dir { font-size: 14px; font-weight: 700; }
.moh-dir.up   { color: var(--green); }
.moh-dir.down { color: var(--red);   }
.moh-prob {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.modal-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-disclaimer {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}
.modal-open-analyzer {
  font-size: 13px;
  font-weight: 600;
  color: #fafafa;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-ui);
}
.modal-open-analyzer:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

body.modal-open { overflow: hidden; }

/* ── Guide / README View ──────────────────────────────────────────────────── */
.guide-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.guide-hero {
  margin-bottom: 44px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.guide-hero-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #a1a1aa;
  margin-bottom: 10px;
}
.guide-hero-title {
  font-family: var(--font-ui);
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(to bottom, #fafafa, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.guide-hero-subtitle {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 620px;
  margin: 0;
}

.guide-section { margin-bottom: 44px; }

.guide-section-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.guide-section-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #d4d4d8;
  flex-shrink: 0;
  margin-top: 2px;
}
.guide-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 3px;
  letter-spacing: -0.01em;
}
.guide-section-subtitle { font-size: 12px; color: var(--muted); margin: 0; }

.guide-p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 10px;
}
.guide-p:last-child { margin-bottom: 0; }
.guide-p strong { color: var(--text); }
.guide-p code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text);
}

.guide-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.guide-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.guide-info-card-icon {
  font-size: 18px;
  color: #a1a1aa;
  margin-bottom: 8px;
}
.guide-info-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}
.guide-info-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.guide-info-card-desc code {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--surface2);
  padding: 1px 4px;
  border-radius: 3px;
}

.guide-steps { display: flex; flex-direction: column; gap: 16px; }
.guide-step { display: flex; gap: 16px; align-items: flex-start; }
.guide-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #d4d4d8;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.guide-step-content h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.guide-step-content p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.guide-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 44px 0 28px;
}
.guide-tech-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 28px;
}

.guide-code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  line-height: 1.65;
  overflow-x: auto;
  margin: 12px 0;
  white-space: pre;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 12px 0;
}
.guide-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.guide-table td {
  padding: 8px 12px;
  color: var(--text);
  border-bottom: 1px solid rgba(42, 42, 42, 0.6);
  vertical-align: top;
  line-height: 1.5;
}
.guide-table td:first-child {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #d4d4d8;
  white-space: nowrap;
}
.guide-table td code {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1px 4px;
  border-radius: 3px;
}
.guide-table tr:last-child td { border-bottom: none; }
.guide-table tr:hover td { background: rgba(42, 42, 42, 0.3); }

.guide-disclaimer {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #71717a;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
.guide-disclaimer strong { color: #fafafa; }

/* ── Market Pulse ────────────────────────────────────────────────────────── */
.dash-pulse {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.dash-pulse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.dash-pulse-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.dash-pulse-horizon {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #a1a1aa;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2px 10px;
  border-radius: var(--radius-xs);
}
.dash-pulse-breadth { margin-bottom: 16px; }
.dpb-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.dpb-up-label   { color: var(--green); }
.dpb-down-label { color: var(--red); }
.dpb-bar {
  height: 8px;
  background: var(--red);
  border-radius: 4px;
  overflow: hidden;
}
.dpb-fill-up {
  height: 100%;
  background: var(--green);
  border-radius: 3px 0 0 3px;
  transition: width 0.4s ease;
}
.dpb-pct {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  text-align: center;
}
.dash-pulse-sectors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px 12px;
  margin-bottom: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.dps-item { display: flex; align-items: center; gap: 8px; }
.dps-name {
  font-size: 12px;
  color: var(--muted);
  width: 95px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.dps-bar {
  flex: 1;
  height: 5px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}
.dps-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.dps-fill.up    { background: var(--green); }
.dps-fill.down  { background: var(--red); }
.dps-fill.mixed { background: var(--warn); }
.dps-val {
  font-family: var(--font-mono);
  font-size: 12px;
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}
.dps-val.up    { color: var(--green); }
.dps-val.down  { color: var(--red); }
.dps-val.mixed { color: var(--warn); }
.dash-pulse-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 4px;
}
.dash-pulse-text .mp-bull { color: var(--green); font-weight: 600; }
.dash-pulse-text .mp-bear { color: var(--red); font-weight: 600; }
.dash-pulse-text .mp-warn { color: var(--warn); font-weight: 600; }

/* ── Fear & Greed Index (Dial Gauge) ──────────────────────────────────── */
.dash-fng-panel {
  background: rgba(20, 20, 20, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 340px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.fng-gauge-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fng-gauge-svg {
  display: block;
  width: 100%;
  height: auto;
}
.fng-needle {
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: 150px 140px;
}
.fng-score-text {
  font-family: var(--font-mono);
  font-weight: 700;
}
.fng-label-text {
  font-family: var(--font-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fng-tick-label {
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ── Dashboard Viz Row (F&G gauge + heatmap side-by-side) ─────────────── */
.dash-viz-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .dash-viz-row { grid-template-columns: 1fr; } }
.dash-viz-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.dash-heatmap,
.dash-sector-rs {
  background: rgba(20, 20, 20, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.dash-heatmap { overflow: hidden; min-width: 0; display: flex; flex-direction: column; min-height: 340px; }
.dash-heatmap-body {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  justify-content: center;
  flex: 1;
  align-items: center;
}
.dash-heatmap-body svg { display: block; margin: 0 auto; }
@media (max-width: 600px) {
  .dash-heatmap-body { justify-content: flex-start; }
}

/* ── Heatmap tooltip ─────────────────────────────────────────────────── */
.hm-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 5000;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text);
  font-family: var(--font-mono);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s;
}
.hm-tooltip.visible { opacity: 1; }

/* ── Heatmap Group Popup ──────────────────────────────────────────────── */
.group-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 8998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.15s ease;
}
.group-popup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalSlideUp 0.2s ease;
}
.group-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.gph-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.gph-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-top: 2px;
}
.group-popup-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.group-popup-close:hover { background: var(--surface2); color: var(--text); }

.group-popup-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.group-stat {
  background: var(--surface);
  padding: 12px 14px;
  text-align: center;
}
.gs-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.gs-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.gs-value.up { color: var(--green); }
.gs-value.down { color: var(--red); }

.group-popup-tickers {
  padding: 8px 0;
}
.group-ticker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid rgba(42,42,42,0.4);
}
.group-ticker-row:last-child { border-bottom: none; }
.group-ticker-row:hover { background: var(--surface2); }
.gtr-left { display: flex; align-items: center; gap: 10px; }
.gtr-ticker {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 55px;
}
.gtr-name {
  font-size: 12px;
  color: var(--muted);
}
.gtr-right { display: flex; align-items: center; gap: 12px; }
.gtr-price {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.gtr-dir {
  font-size: 13px;
  font-weight: 700;
}
.gtr-dir.up { color: var(--green); }
.gtr-dir.down { color: var(--red); }
.gtr-prob {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  min-width: 40px;
  text-align: right;
}

@media (max-width: 480px) {
  .group-popup-overlay { padding: 0; align-items: flex-end; }
  .group-popup-card {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
  }
  .group-popup-stats { grid-template-columns: 1fr; }
}

/* ── Globe Tab Layout ─────────────────────────────────────────────────── */
.globe-map-container {
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-sm);
  min-height: 70vh;
  overflow: hidden;
}
.globe-map-body {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 70vh;
}

/* Globe modal overlay */
.globe-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 8998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: globeModalFadeIn 0.2s ease;
}
@keyframes globeModalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.globe-modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  animation: globeModalSlideUp 0.25s ease;
}
@keyframes globeModalSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.globe-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  z-index: 1;
  line-height: 1;
  padding: 4px;
}
.globe-modal-close:hover { color: var(--text); }
.globe-sentiment-summary {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  line-height: 1.65;
}
.globe-sentiment-summary .gss-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.globe-no-news {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* Region info panel content */
.globe-region-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.grh-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.grh-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.grh-ticker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #fafafa;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}
.grh-price {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.globe-region-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px;
  color: var(--muted);
  font-size: 13px;
}

.globe-pred-cards {
  display: flex;
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.globe-pred-card {
  flex: 1;
  background: var(--surface);
  padding: 14px 12px;
  text-align: center;
}
.globe-pred-card.clickable { cursor: pointer; transition: background 0.12s; }
.globe-pred-card.clickable:hover { background: var(--surface2); }
.gpc-horizon {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.gpc-dir {
  font-size: 16px;
  font-weight: 700;
}
.gpc-dir.up { color: var(--green); }
.gpc-dir.down { color: var(--red); }
.gpc-prob {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.globe-news-section {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.gns-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.globe-news-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(42,42,42,0.3);
}
.globe-news-item:last-child { border-bottom: none; }
.gni-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #71717a;
  flex-shrink: 0;
  margin-top: 6px;
}
.gni-text {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
}

.globe-open-analyzer {
  display: block;
  width: calc(100% - 32px);
  margin: 14px 16px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fafafa;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.globe-open-analyzer:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

/* ── Globe Region Stats Bar ─────────────────────────────────────────── */
.globe-region-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.grs-region {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}
.grs-name {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.grs-counts {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 2px;
}
.grs-up { color: var(--green); }
.grs-down { color: var(--red); }
.grs-pct {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

/* ── Globe News Ticker ─────────────────────────────────────────────── */
.globe-news-ticker {
  overflow: hidden;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 0;
  margin-bottom: 10px;
}
.gnt-track {
  display: inline-block;
  animation: tickerScroll 45s linear infinite;
}
.gnt-track:hover { animation-play-state: paused; }
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.gnt-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 28px;
}
.gnt-ticker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: #fafafa;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}
.gnt-text {
  font-size: 11px;
  color: var(--muted);
}

/* ── Globe Sparkline (modal) ───────────────────────────────────────── */
.globe-sparkline-section {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.globe-sparkline-section .gss-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.globe-sparkline-wrap {
  position: relative;
  width: 100%;
  height: 80px;
}
.globe-sparkline-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}

/* ── Globe Fundamentals Strip (modal) ──────────────────────────────── */
.globe-funds-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.gfs-item {
  flex: 1 1 auto;
  min-width: 70px;
  text-align: center;
  padding: 6px 8px;
}
.gfs-key {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.gfs-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* ── Globe Session Indicator (modal header) ────────────────────────── */
.grh-session {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.grh-change {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}
.session-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.session-label {
  font-size: 11px;
  color: var(--muted);
}

/* ── Globe Pulse Animation ─────────────────────────────────────────── */
@keyframes globePulse {
  0%, 100% { filter: drop-shadow(0 0 2px var(--pulse-color)); }
  50%      { filter: drop-shadow(0 0 8px var(--pulse-color)) drop-shadow(0 0 16px var(--pulse-color)); }
}

/* ── Globe Correlation Lines ───────────────────────────────────────── */
.correlation-line-group line {
  stroke-dasharray: 4 4;
  animation: flowLine 2s linear infinite;
}
@keyframes flowLine { to { stroke-dashoffset: -8; } }

@media (max-width: 900px) {
  .globe-map-container { min-height: 50vh; }
  .globe-map-body { min-height: 45vh; }
}
@media (max-width: 768px) {
  .globe-region-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .globe-news-ticker .gnt-text { font-size: 10px; }
  .gnt-track { animation-duration: 30s; }
  .globe-sparkline-canvas { height: 60px; }
}
@media (max-width: 480px) {
  .globe-region-stats { grid-template-columns: 1fr; }
  .globe-funds-strip { gap: 0; }
  .gfs-item { min-width: 50%; }
  .globe-news-ticker .gnt-text { font-size: 9px; }
}
.jvm-tooltip {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  color: var(--text) !important;
  font-family: var(--font-mono) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
  z-index: 1000 !important;
}
.jvm-marker > circle { transition: r 0.15s ease; }
.jvm-zoom-btn {
  background: #18181b !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: #a1a1aa !important;
  border-radius: 4px !important;
  width: 28px !important;
  height: 28px !important;
  line-height: 28px !important;
  cursor: pointer;
}
.jvm-zoom-btn:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #fafafa !important;
}

/* ── Regime Banner ────────────────────────────────────────────────────── */
.regime-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 20px;
  margin: 0 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  flex-wrap: wrap;
}
.regime-banner.regime-risk-on  { background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.2); }
.regime-banner.regime-risk-off { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2); }
.regime-banner.regime-mixed    { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2); }
.regime-banner.regime-bull     { background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.2); }
.regime-banner.regime-bear     { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2); }
.regime-banner.regime-sideways { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2); }
.regime-label {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.regime-label.risk-on  { color: #34d399; }
.regime-label.risk-off { color: #f87171; }
.regime-label.mixed    { color: #fbbf24; }
.regime-label.bull     { color: #34d399; }
.regime-label.bear     { color: #f87171; }
.regime-label.sideways { color: #fbbf24; }
.regime-conf { opacity: 0.7; font-size: 13px; }
.regime-since { opacity: 0.6; font-size: 13px; }

/* ── Rolling Accuracy Badge (Modal) ────────────────────────────────── */
.modal-rolling-accuracy {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; margin: 6px 0 2px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  font-size: 12.5px; font-family: var(--font-mono);
  color: var(--text-muted);
}
.modal-rolling-accuracy .ra-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ra-good .ra-dot { background: #34d399; }
.ra-fair .ra-dot { background: #fbbf24; }
.ra-poor .ra-dot { background: #f87171; }
.ra-good { color: #34d399; }
.ra-fair { color: #fbbf24; }
.ra-poor { color: #f87171; }

/* ── Rolling Accuracy (Analyzer Cards) ─────────────────────────────── */
.pred-track-record {
  padding: 4px 10px; font-size: 11.5px; font-family: var(--font-mono);
  color: var(--text-muted); opacity: 0.85;
}

/* ── Calibration Badges ────────────────────────────────────────────── */
.modal-calibration-row {
  font-size: 12px; font-family: var(--font-mono);
  color: var(--text-muted); padding: 0 0 4px;
  opacity: 0.75;
}
.pred-calibration {
  padding: 2px 10px; font-size: 11px; font-family: var(--font-mono);
  color: var(--text-muted); opacity: 0.7;
}
.cal-good { color: #34d399; }
.cal-fair { color: #fbbf24; }
.cal-poor { color: #f87171; }
.regime-sep { opacity: 0.4; }

/* ── Sector Relative Strength ─────────────────────────────────────────── */
.dash-sector-rs { margin-bottom: 20px; }
.dash-sector-rs-body { height: 340px; position: relative; }
.dash-sector-rs-body canvas { border-radius: var(--radius-sm); }

/* ── AI Investment Analysis ──────────────────────────────────────────────── */
.ai-analysis-section { margin-bottom: 4px; }

.ai-panel { padding: 24px; }

.ai-header-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ai-rec-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.ai-rec-buy  { background: rgba(52, 211, 153, 0.12); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.2); }
.ai-rec-sell { background: rgba(248, 113, 113, 0.12); color: var(--red);   border: 1px solid rgba(248, 113, 113, 0.2); }
.ai-rec-hold { background: rgba(255, 255, 255, 0.06); color: #a1a1aa; border: 1px solid rgba(255, 255, 255, 0.12); }

.ai-meta-pills { display: flex; gap: 8px; flex-wrap: wrap; }

.ai-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.ai-factors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.ai-factor-col {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
}
.ai-bull { border-left: 3px solid var(--green); }
.ai-bear { border-left: 3px solid var(--red); }

.ai-factor-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ai-bull .ai-factor-label { color: var(--green); }
.ai-bear .ai-factor-label { color: var(--red); }

.ai-factor-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ai-factor-list li {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  padding-left: 12px;
  position: relative;
}
.ai-factor-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
}

.ai-outlook-section { margin-bottom: 16px; }
.ai-outlook-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.ai-outlook-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.65;
  margin: 0;
}

.ai-targets-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ai-targets-row.compact { margin-bottom: 0; margin-top: 10px; }

.ai-target {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.ai-target-up {
  background: rgba(52, 211, 153, 0.1);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.2);
}
.ai-target-down {
  background: rgba(248, 113, 113, 0.1);
  color: var(--red);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.ai-summary-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}
.ai-summary-box p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}

.ai-footer {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* Modal AI compact */
.modal-ai-summary { margin-bottom: 4px; }
.modal-ai-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.modal-ai-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 640px) {
  .ai-factors-grid { grid-template-columns: 1fr; }
  .ai-targets-row { flex-direction: column; }
}

/* ── Landing Page ─────────────────────────────────────────────────────────── */
.landing-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 255, 255, 0.03), transparent);
}

.landing-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.landing-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  padding: 40px 24px;
}

.landing-logo-wrap {
  position: relative;
  display: block;
  margin: 0 auto 16px;
  width: 200px;
  opacity: 0;
  animation: landingLogoIn 1s ease forwards 0.2s, landingFloat 4s ease-in-out 1.2s infinite;
}
.landing-logo-wrap::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255,255,255,0.06) 45%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.06) 55%,
    transparent 70%
  );
  background-size: 250% 100%;
  animation: landingShimmer 6s ease-in-out 1.5s infinite;
  pointer-events: none;
}
@keyframes landingShimmer {
  0%, 100% { background-position: 200% 0; }
  50%      { background-position: -50% 0; }
}
.landing-logo {
  width: 200px;
  height: 200px;
  display: block;
}
@keyframes landingLogoIn {
  from { opacity: 0; transform: scale(0.85) rotate(-5deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes landingFloat {
  0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 20px rgba(255,255,255,0.08)); }
  50%      { transform: translateY(-6px); filter: drop-shadow(0 0 28px rgba(255,255,255,0.15)); }
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: #a1a1aa;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 24px;
}
.landing-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a1a1aa;
  animation: landingPulse 2s ease-in-out infinite;
}
@keyframes landingPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.landing-title {
  font-family: var(--font-ui);
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.landing-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 36px;
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: #fafafa;
  color: #0a0a0a;
  border: none;
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.15s;
  box-shadow: 0 4px 20px rgba(255,255,255,0.08);
}
.landing-cta:hover {
  background: #ffffff;
  box-shadow: 0 6px 30px rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.landing-cta:active { transform: translateY(0) scale(0.98); }

.landing-features {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.landing-feat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.lf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #71717a;
}
.lf-dot.lf-green { background: var(--green); }
.lf-dot.lf-amber { background: var(--warn); }

/* ── Custom scrollbar ─────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ══════════════════════════════════════════════════════════════════════════════
   AUTH UI
══════════════════════════════════════════════════════════════════════════════ */
.header-auth { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.auth-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); font-family: var(--font-ui);
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all 0.18s;
}
.auth-btn:hover { color: var(--text); background: var(--surface2); border-color: rgba(255,255,255,0.12); }
.auth-btn-sm { padding: 4px 10px; font-size: 11px; }
.user-info { display: flex; align-items: center; gap: 8px; }
.user-name { font-size: 12px; color: #d4d4d8; font-weight: 500; }


/* ══════════════════════════════════════════════════════════════════════════════
   ECONOMIC CALENDAR
══════════════════════════════════════════════════════════════════════════════ */
.calendar-filter-btn {
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid transparent; background: transparent;
  color: var(--muted); font-family: var(--font-ui);
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all 0.18s;
}
.calendar-filter-btn:hover { color: var(--text); background: var(--surface2); }
.calendar-filter-btn.active { color: #fafafa; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); }

.calendar-week-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 24px;
}
.calendar-week-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.calendar-week-count { font-size: 32px; font-weight: 700; color: var(--accent); }
.calendar-week-label { font-size: 12px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

.calendar-date-group {
  margin-bottom: 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.calendar-today { border-color: var(--accent); }
.calendar-date-header {
  padding: 10px 16px; font-size: 13px; font-weight: 600;
  color: var(--text); background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.calendar-today-badge {
  display: inline-block; padding: 2px 8px; margin-left: 8px;
  font-size: 10px; font-weight: 600; border-radius: 10px;
  background: var(--accent); color: #fff;
}
.calendar-event {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.calendar-event:last-child { border-bottom: none; }
.calendar-event:hover { background: rgba(255,255,255,0.02); }
.cal-high { border-left: 3px solid var(--accent); }
.cal-medium { border-left: 3px solid var(--border); }
.cal-icon { font-size: 16px; flex-shrink: 0; }
.cal-event-info { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-event-name { font-size: 13px; color: var(--text); }
.cal-ticker-badge {
  display: inline-block; padding: 2px 8px; font-size: 11px;
  font-family: var(--font-mono); font-weight: 500;
  border-radius: 6px; background: var(--surface2);
  color: var(--accent); cursor: pointer;
  transition: background 0.15s;
}
.cal-ticker-badge:hover { background: var(--accent); color: #fff; }
.cal-cat-badge {
  font-size: 10px; padding: 3px 8px; border-radius: 10px;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
  flex-shrink: 0;
}
.cal-cat-fed { background: rgba(59,130,246,0.15); color: #60a5fa; }
.cal-cat-inflation { background: rgba(245,158,11,0.15); color: #fbbf24; }
.cal-cat-jobs { background: rgba(34,197,94,0.15); color: #4ade80; }
.cal-cat-growth { background: rgba(168,85,247,0.15); color: #c084fc; }
.cal-cat-retail { background: rgba(236,72,153,0.15); color: #f472b6; }
.cal-cat-earnings { background: rgba(124,58,237,0.15); color: var(--accent); }
.cal-cat-general { background: rgba(115,115,115,0.15); color: var(--muted); }


/* ══════════════════════════════════════════════════════════════════════════════
   OPTIONS CHAIN
══════════════════════════════════════════════════════════════════════════════ */
.options-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.options-stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; text-align: center;
}
.options-stat-value { font-size: 20px; font-weight: 700; color: var(--text); font-family: var(--font-mono); }
.options-stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

.options-expiry-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.options-expiry-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.options-expiry-select {
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); font-family: var(--font-mono);
  font-size: 13px; cursor: pointer;
}
.options-dte { font-size: 12px; color: var(--muted); }

.options-chain {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 20px;
}
.options-chain-half { overflow-x: auto; }
.options-chain-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  padding: 8px 12px; text-transform: uppercase;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
}
.calls-title { background: rgba(34,197,94,0.1); color: var(--green); }
.puts-title { background: rgba(239,68,68,0.1); color: var(--red); }

.options-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px; font-family: var(--font-mono);
}
.options-table thead th {
  padding: 8px 6px; text-align: right; font-size: 10px;
  color: var(--muted); font-weight: 600; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase; position: sticky; top: 0;
  background: var(--surface);
}
.options-table thead th:first-child { text-align: left; }
.options-table tbody td {
  padding: 6px; text-align: right;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.options-table tbody td:first-child { text-align: left; }
.options-strike { font-weight: 600; color: var(--text); }
.options-itm { background: rgba(124,58,237,0.05); }
.options-atm td { border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); }

.options-table-wrap { max-height: 400px; overflow-y: auto; border: 1px solid var(--border); border-radius: 0 0 var(--radius-xs) var(--radius-xs); }
.options-empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }

.options-unusual { margin-bottom: 20px; }
.unusual-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.unusual-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-xs);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-family: var(--font-mono);
}
.unusual-call { border-left: 3px solid var(--green); }
.unusual-put { border-left: 3px solid var(--red); }
.unusual-type { font-weight: 700; width: 40px; }
.unusual-call .unusual-type { color: var(--green); }
.unusual-put .unusual-type { color: var(--red); }
.unusual-strike { font-weight: 600; color: var(--text); }
.unusual-vol, .unusual-oi { color: var(--text-secondary); }
.unusual-ratio { font-weight: 700; color: var(--accent); margin-left: auto; }

/* ── Options Prediction Alignment Card ── */
.options-prediction-align { margin-bottom: 16px; }
.options-align-inner {
  padding: 14px 18px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-left: 3px solid;
}
.options-align-view {
  font-size: 14px; color: var(--text); margin-bottom: 4px;
}
.options-align-view strong { font-weight: 700; }
.options-align-hint { font-size: 13px; font-weight: 500; }
.options-align-note {
  font-size: 10px; color: var(--muted); margin-top: 4px;
  font-style: italic; letter-spacing: 0.02em;
}
.options-pred-align {
  background: rgba(124,58,237,0.04);
  border-left: 2px solid rgba(124,58,237,0.25);
}

/* ══════════════════════════════════════════════════════════════════════════════
   SOCIAL BUZZ — Trending tickers grid + modal
══════════════════════════════════════════════════════════════════════════════ */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.show-more-btn {
  display: block;
  margin: 24px auto;
  padding: 10px 32px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.show-more-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface2);
}
.social-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
  cursor: pointer; transition: all 0.15s;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 4px; position: relative;
}
.social-card:hover { border-color: var(--accent); background: rgba(255,255,255,0.02); transform: translateY(-1px); }
.social-card-rank {
  position: absolute; top: 6px; left: 8px;
  font-size: 10px; color: var(--muted); font-family: var(--font-mono);
}
.social-card-ticker { font-size: 18px; font-weight: 700; color: var(--accent); font-family: var(--font-mono); }
.social-card-mentions { font-size: 11px; color: var(--muted); }
.social-card-sent { font-size: 12px; font-weight: 600; }
.social-card-score { font-size: 14px; font-weight: 700; font-family: var(--font-mono); }
.social-card-subs { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Signal alignment badges */
.social-align-badge {
  position: absolute; top: 5px; right: 5px;
  font-size: 8px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 6px; border-radius: 4px;
  line-height: 1.3; text-transform: uppercase;
  white-space: nowrap; pointer-events: none;
}
.social-align-bull {
  background: rgba(34,197,94,0.15); color: var(--green);
  border: 1px solid rgba(34,197,94,0.3);
}
.social-align-bear {
  background: rgba(239,68,68,0.15); color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
}
.social-align-diverge {
  background: rgba(255,255,255,0.06); color: #d4d4d8;
  border: 1px solid rgba(124,58,237,0.25);
}

/* Social modal overlay */
.social-modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.social-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto;
  position: relative;
}
.social-modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: var(--muted);
  font-size: 24px; cursor: pointer; line-height: 1;
}
.social-modal-close:hover { color: var(--text); }
.social-modal-header {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px;
}
.social-modal-ticker { font-size: 28px; font-weight: 700; color: var(--accent); font-family: var(--font-mono); }
.social-modal-label { font-size: 16px; font-weight: 600; }
.social-modal-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-bottom: 20px;
}
.social-modal-actions { margin-top: 20px; text-align: center; }

/* Shared stat cards (used in modal) */
.social-stat-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; text-align: center;
}
.social-stat-value { font-size: 18px; font-weight: 700; font-family: var(--font-mono); }
.social-stat-label { font-size: 10px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Subreddit breakdown (shared) */
.social-sub-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
}
.social-sub-name { font-size: 13px; color: var(--text); width: 140px; flex-shrink: 0; }
.social-sub-bar-wrap {
  flex: 1; height: 6px; background: var(--surface2);
  border-radius: 3px; overflow: hidden;
}
.social-sub-bar { height: 100%; background: var(--accent-gradient); border-radius: 3px; transition: width 0.3s; }
.social-sub-count { font-size: 13px; font-family: var(--font-mono); color: var(--accent); width: 30px; text-align: right; }

/* Trending posts (shared) */
.social-posts-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.social-post {
  display: block; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); text-decoration: none;
  transition: all 0.15s; cursor: pointer;
}
.social-post:hover { border-color: var(--accent); background: rgba(255,255,255,0.02); }
.social-post-bull { border-left: 3px solid var(--green); }
.social-post-bear { border-left: 3px solid var(--red); }
.social-post-neutral { border-left: 3px solid var(--muted); }
.social-post-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted); margin-bottom: 4px;
}
.social-post-sub { color: var(--accent); font-weight: 500; }
.social-post-score { color: var(--text-secondary); }
.social-post-sent { padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 500; }
.social-post-bull .social-post-sent { background: rgba(34,197,94,0.15); color: var(--green); }
.social-post-bear .social-post-sent { background: rgba(239,68,68,0.15); color: var(--red); }
.social-post-neutral .social-post-sent { background: rgba(115,115,115,0.15); color: var(--muted); }
.social-post-time { margin-left: auto; }
.social-post-title { font-size: 13px; color: var(--text); line-height: 1.5; }


/* ══════════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
══════════════════════════════════════════════════════════════════════════════ */

/* ── Tablet & small desktop ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-content { padding: 16px 14px 32px; }

  /* Header: scrollable nav for 8 tabs, hide logo-tag */
  .header-inner {
    padding: 10px 14px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .header-inner::-webkit-scrollbar { display: none; }
  .logo-tag { display: none; }
  .logo-text { font-size: 15px; }
  .logo-mark { width: 28px; height: 28px; font-size: 10px; }
  .logo { gap: 8px; flex-shrink: 0; }
  .header-nav { gap: 2px; flex-shrink: 0; }
  .nav-pill { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
  .header-auth { flex-shrink: 0; }
  .auth-btn { font-size: 11px; padding: 4px 10px; }
  .user-name { font-size: 11px; }

  /* Options chain: stack calls/puts */
  .options-chain { grid-template-columns: 1fr; }
  .options-summary { grid-template-columns: repeat(3, 1fr); }

  /* Social grid */
  .social-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .social-modal-stats { grid-template-columns: repeat(2, 1fr); }

  /* Dashboard topbar: stack title + controls */
  .dash-topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .dash-title-group { flex-direction: column; gap: 4px; }
  .dash-title { font-size: 18px; }

  /* Dashboard viz row already goes 1fr at 900px, shrink gap */
  .dash-viz-row { gap: 12px; }

  /* Market cards */
  .dash-card-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }

  /* Analyzer search */
  .search-wrap { max-width: 100%; }
  .search-bar { padding: 4px 4px 4px 12px; }
  .search-dollar { font-size: 16px; margin-right: 4px; }
  .search-input { font-size: 15px; }
  .analyze-btn { padding: 9px 16px; font-size: 13px; }

  /* Prediction cards: tighter padding */
  .pred-card { padding: 16px; }
  .pred-card-main { gap: 10px; }

  /* Fundamentals table */
  .fund-table td:first-child { font-size: 12px; }
  .fund-table td:last-child { font-size: 13px; }

  /* Modal: full-width on tablet */
  .modal-overlay { padding: 12px; }
  .modal-card { max-width: 100%; border-radius: 16px; max-height: 90vh; }

  /* AI Analysis */
  .ai-header-row { flex-wrap: wrap; gap: 8px; }

  /* Landing */
  .landing-content { padding: 32px 16px; }
  .landing-subtitle { font-size: 14px; }

  /* Guide */
  .guide-features { grid-template-columns: 1fr; }

  /* Footer */
  .site-footer { padding: 16px; font-size: 11px; }
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  body { font-size: 13px; }
  .main-content { padding: 12px 10px 24px; }

  /* Header: horizontal scroll nav */
  .header-inner {
    padding: 8px 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .header-inner::-webkit-scrollbar { display: none; }
  .logo { flex-shrink: 0; margin-right: 6px; }
  .header-nav { flex-shrink: 0; }
  .nav-pill { padding: 5px 10px; font-size: 11px; white-space: nowrap; }

  /* Dashboard */
  .dash-title { font-size: 16px; }
  .dash-status { font-size: 10px; }
  .horizon-btn { padding: 5px 12px; font-size: 11px; }
  .refresh-all-btn { padding: 5px 12px; font-size: 11px; }
  .dash-pulse-title { font-size: 16px; }
  .dash-pulse-text { font-size: 13px; }

  /* Market cards: single column on small phones */
  .dash-card-grid { grid-template-columns: 1fr 1fr; gap: 6px; }

  /* Heatmap & Sector RS */
  .dash-viz-panel { padding: 12px; }
  .dash-heatmap { padding: 12px 8px; }
  .dash-sector-rs { padding: 12px 8px; }

  /* Analyzer search: stack input + button if very tight */
  .search-bar { border-radius: var(--radius-sm); }
  .search-dollar { font-size: 15px; }
  .search-input { font-size: 14px; min-width: 0; }
  .analyze-btn { padding: 8px 14px; font-size: 12px; gap: 4px; }
  .btn-arrow { width: 12px; height: 12px; }

  /* Ticker meta */
  .ticker-meta { flex-direction: column; gap: 8px; }
  .ticker-identity { flex-wrap: wrap; gap: 6px; }
  .company-name { font-size: 16px; }
  .price-cluster { text-align: left; }
  .price-current { font-size: 28px; }

  /* Prediction cards */
  .pred-card { padding: 14px; border-radius: var(--radius-sm); }
  .pred-card-main { gap: 8px; }
  .pred-signals { grid-column: 1 / -1; margin-top: 6px; }
  .pred-gauge { width: 56px; height: 56px; }
  .pred-gauge-pct { font-size: 12px; }
  .pred-direction { font-size: 18px; }
  .pred-timeframe { font-size: 11px; }
  .pred-confidence { font-size: 10px; padding: 3px 8px; }
  .pred-metrics { font-size: 11px; padding-top: 8px; margin-top: 8px; }

  /* Chart */
  .chart-panel canvas { height: 180px !important; }
  .chart-panel { padding: 12px; }

  /* Results grid: already 1col at 780px */
  .section-label { font-size: 10px; letter-spacing: 0.08em; }

  /* Fundamentals */
  .fund-row { padding: 8px 12px; }
  .fund-label { font-size: 11px; }
  .fund-value { font-size: 12px; }

  /* Sentiment */
  .sent-gauge-wrap { transform: scale(0.85); transform-origin: left center; }

  /* AI Analysis */
  .ai-rec-badge { font-size: 13px; padding: 6px 14px; }
  .ai-meta-pills { flex-wrap: wrap; gap: 6px; }
  .ai-meta-pill { font-size: 11px; padding: 4px 10px; }
  .ai-outlook-title { font-size: 10px; }
  .ai-outlook-text { font-size: 13px; }
  .ai-target { font-size: 13px; padding: 10px 14px; }
  .ai-summary-box { padding: 14px; }
  .ai-summary-text { font-size: 13px; }

  /* Modal: full-screen sheet */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-card {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    animation: modalSlideUpMobile 0.25s ease;
  }
  @keyframes modalSlideUpMobile {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .modal-header { padding: 14px 16px 12px; }
  .modal-header-left { gap: 8px; }
  .modal-ticker { font-size: 14px; }
  .modal-company { font-size: 11px; }
  .modal-body { padding: 12px 16px 16px; }
  .modal-section-label { font-size: 9px; }
  .modal-gauge-row { flex-wrap: wrap; gap: 6px; }
  .modal-signal-chips { gap: 4px; }
  .modal-signal-chip { font-size: 10px; padding: 2px 6px; }
  .modal-metric-row { font-size: 11px; }
  .modal-footer { padding: 10px 16px; font-size: 10px; }
  .modal-footer .analyze-link { font-size: 11px; padding: 4px 12px; }

  /* Modal tabs */
  .modal-tabs { gap: 4px; }
  .modal-tab { font-size: 10px; padding: 5px 10px; }

  /* News headlines */
  .headlines-list { max-height: 160px; }
  .headline-item { font-size: 12px; }

  /* History section */
  .history-card { padding: 10px 12px; }

  /* Landing page tweaks */
  .landing-title { margin-bottom: 16px; }
  .landing-subtitle { font-size: 13px; line-height: 1.6; margin-bottom: 28px; }
  .landing-cta { padding: 12px 28px; font-size: 15px; }
  .landing-features { gap: 12px; margin-top: 24px; }
  .landing-feat { font-size: 12px; }

  /* Guide: tighter spacing */
  .guide-hero { padding: 24px 0; }
  .guide-hero h1 { font-size: 28px; }
  .guide-section-title { font-size: 16px; }
  .guide-text { font-size: 13px; }
  .guide-step { padding-left: 36px; }

  /* Auth */
  .header-auth { margin-left: 4px; }
  .auth-btn { padding: 4px 8px; font-size: 10px; gap: 4px; }
  .auth-btn svg { width: 10px; height: 10px; }
  .user-name { display: none; }

  /* Options mobile */
  .options-summary { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .options-stat-value { font-size: 16px; }
  .options-stat-label { font-size: 10px; }
  .options-expiry-row { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .options-table { font-size: 11px; }
  .options-table thead th { font-size: 9px; padding: 6px 4px; }
  .options-table tbody td { padding: 4px; }
  .unusual-item { font-size: 11px; gap: 8px; padding: 8px 10px; }

  /* Social mobile */
  .social-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .social-card-ticker { font-size: 15px; }
  .social-modal { padding: 20px; }
  .social-modal-ticker { font-size: 22px; }
  .social-modal-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .social-stat-value { font-size: 15px; }
  .social-sub-name { width: 100px; font-size: 12px; }
  .social-post { padding: 10px 12px; }
  .social-post-title { font-size: 12px; }
  .social-post-header { font-size: 10px; }
}

/* ── Small phones (iPhone SE, etc.) ──────────────────────────────────────── */
@media (max-width: 360px) {
  .header-inner { padding: 8px 8px; }
  .logo-text { font-size: 14px; }
  .nav-pill { padding: 4px 8px; font-size: 10px; }
  .dash-card-grid { grid-template-columns: 1fr; }
  .pred-card-main { flex-direction: column; text-align: center; }
  .pred-gauge { margin: 0 auto; }
  .options-summary { grid-template-columns: 1fr 1fr; }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
  .social-modal-stats { grid-template-columns: repeat(2, 1fr); }
  .header-auth { display: none; }  /* hide auth on very small screens */
  .search-input { font-size: 13px; }
  .analyze-btn { padding: 8px 12px; font-size: 11px; }
}

/* ── Landing Ambient Background ───────────────────────────────────────────── */
.aurora-canvas {
  display: none;
}

/* Grid pattern */
.landing-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 4rem 4rem;
  z-index: 0;
  pointer-events: none;
}

/* Floating shapes — disabled */
.landing-shape { display: none; }

/* Spotlight beam */
.landing-spotlight {
  --spot-r: -35deg;
  position: absolute;
  top: -30%;
  right: -10%;
  width: 500px;
  height: 140%;
  background: linear-gradient(180deg,
    rgba(124,58,237,0.14) 0%,
    rgba(124,58,237,0.06) 40%,
    transparent 80%
  );
  transform: rotate(-35deg);
  transform-origin: top right;
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
  animation: spotlightSweep 12s ease-in-out infinite;
}
.landing-spotlight.s2 {
  --spot-r: 30deg;
  right: auto;
  left: -15%;
  transform: rotate(30deg);
  transform-origin: top left;
  width: 400px;
  opacity: 0.6;
  animation: spotlightSweep 16s ease-in-out infinite reverse;
  animation-delay: 3s;
}
@keyframes spotlightSweep {
  0%, 100% { transform: rotate(var(--spot-r, -35deg)) translateX(0); opacity: 0.7; }
  50%      { transform: rotate(var(--spot-r, -35deg)) translateX(60px); opacity: 1; }
}

/* Gradient vignette */
.landing-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 0%, rgba(9,9,11,0.85) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ── 3D Tilt Cards ────────────────────────────────────────────────────────── */
.dash-card {
  transform-style: preserve-3d;
  will-change: transform;
}
.dash-card .dc-ticker,
.dash-card .dc-dir {
  transform: translateZ(20px);
}
.dash-card .dc-prob,
.dash-card .dc-bar {
  transform: translateZ(10px);
}

/* ── Staggered Card Entry ─────────────────────────────────────────────────── */
.dash-card-grid .dash-card {
  opacity: 0;
  animation: cardStaggerIn 0.35s ease-out forwards;
}
@keyframes cardStaggerIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Animated Counter Digits ──────────────────────────────────────────────── */
.counter-wrap {
  display: inline-flex;
  overflow: hidden;
  line-height: 1;
  vertical-align: baseline;
}
.counter-digit {
  display: inline-block;
  position: relative;
  width: 0.6em;
  height: 1em;
  overflow: hidden;
}
.counter-digit-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.counter-digit-char {
  display: block;
  height: 1em;
  line-height: 1;
  text-align: center;
}
/* Dot/percent are narrower */
.counter-digit.narrow {
  width: 0.4em;
}


/* ── Skeleton Loading ─────────────────────────────────────────────────────── */
.dash-card.loading {
  animation: none;
}
.dash-card.loading .dc-ticker,
.dash-card.loading .dc-name,
.dash-card.loading .dc-dir,
.dash-card.loading .dc-prob,
.dash-card.loading .dc-footer {
  color: transparent;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
  user-select: none;
}
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Utilities ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Landing Page Split Layout + Spline ──────────────────────────────────── */
.landing-content.landing-split {
  display: flex; align-items: center; max-width: 1100px; text-align: left; gap: 40px;
}
.landing-left { flex: 1; min-width: 0; }
.landing-right { flex: 1; min-width: 0; position: relative; height: 500px; }
.spline-canvas { width: 100%; height: 100%; display: block; border-radius: 16px; }
@media (max-width: 768px) {
  .landing-content.landing-split { flex-direction: column; text-align: center; }
  .landing-right { height: 300px; width: 100%; }
}

/* ── Empty States ───────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  opacity: 0.7;
}
.empty-state-icon { color: var(--muted); margin-bottom: 16px; }
.empty-state-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state-desc { font-size: 14px; color: var(--text-secondary); max-width: 400px; margin-bottom: 24px; }

/* ── Quick-pick ticker buttons ──────────────────────────────────────────── */
.quick-picks { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.quick-pick {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s;
}
.quick-pick:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface2);
}

/* ── Skeleton shimmer ───────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  height: 140px;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; width: 60%; margin-bottom: 8px; }
.skeleton-text.short { width: 40%; }

/* ── Gradient Text ──────────────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(to bottom, #fafafa 0%, #a1a1aa 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.landing-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.lf-dot.lf-blue { background: #a1a1aa; }

/* ══════════════════════════════════════════════════════════════════════════════
   PROBABILITY TERMINAL — Bloomberg / command-center UI
   New in feature-terminal branch
══════════════════════════════════════════════════════════════════════════════ */

/* ── Ticker Tape ─────────────────────────────────────────────────────────── */
.ticker-tape {
  width: 100%;
  height: 32px;
  background: #111111;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 199;
  position: sticky;
  top: 0;
}

.ticker-tape-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
  will-change: transform;
}
.ticker-tape-track:hover { animation-play-state: paused; }

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

.tt-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  border-right: 1px solid var(--border);
  height: 32px;
}
.tt-sym {
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}
.tt-price { color: var(--text-secondary); }
.tt-chg { font-weight: 500; }
.tt-chg.up, .tt-chg.tt-up     { color: var(--green); }
.tt-chg.down, .tt-chg.tt-down { color: var(--red); }
.tt-sep {
  width: 1px;
  height: 10px;
  background: var(--border);
  margin: 0 4px;
}

/* ── Bottom Navigation ───────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 6px 16px 8px;
}

.bnav-item {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 7px 18px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.bnav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.bnav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.bnav-icon {
  width: 20px;
  height: 20px;
  display: block;
  margin: 0 auto 3px;
}
.bnav-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.06em;
}

/* ── Terminal Grid ───────────────────────────────────────────────────────── */
.terminal-grid {
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  grid-template-rows: 1fr 240px;
  grid-template-areas:
    "watchlist  matrix   news"
    "pulse      sector   sector";
  gap: 1px;
  background: var(--border); /* 1px gap = border effect */
  height: calc(100vh - 130px); /* fill viewport */
}

/* ── Terminal Panels ─────────────────────────────────────────────────────── */
.terminal-panel {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.panel-header {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #0d0d0d;
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.panel-title-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  margin-left: 6px;
}

.panel-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
.panel-body::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Panel grid area assignments */
#panel-watchlist  { grid-area: watchlist; }
#panel-matrix     { grid-area: matrix; }
#panel-news       { grid-area: news; }
#panel-pulse      { grid-area: pulse; }
#panel-sector-rs  { grid-area: sector; }

/* ── Watchlist Panel ─────────────────────────────────────────────────────── */
.watchlist-row {
  display: grid;
  grid-template-columns: 58px 1fr auto 48px;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-left-color 0.12s;
  font-family: var(--font-mono);
  font-size: 12px;
}
.watchlist-row:last-child { border-bottom: none; }
.watchlist-row:hover { background: rgba(255, 255, 255, 0.05); }
.watchlist-row.up, .watchlist-row.wl-up     { border-left-color: rgba(52, 211, 153, 0.65); }
.watchlist-row.down, .watchlist-row.wl-down { border-left-color: rgba(248, 113, 113, 0.65); }
.watchlist-row.wl-up:hover   { background: rgba(52, 211, 153, 0.04); }
.watchlist-row.wl-down:hover { background: rgba(248, 113, 113, 0.04); }

.wl-ticker {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.03em;
}
.wl-price {
  color: var(--text-secondary);
  font-size: 11px;
  text-align: right;
}
.wl-dir {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.wl-dir.up, .watchlist-row.wl-up .wl-dir   { color: var(--green); }
.wl-dir.down, .watchlist-row.wl-down .wl-dir { color: var(--red); }
.wl-prob {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

.watchlist-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  line-height: 1.8;
}

.wl-show-all-btn {
  padding: 8px 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  cursor: pointer;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: color 0.1s, background 0.1s;
}
.wl-show-all-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* ── Panel Sub-sections (News + Social combined) ────────────────────────── */
.panel-sub-section { }
.panel-sub-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 12px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.panel-news-social-body {
  display: flex;
  flex-direction: column;
}
.panel-news-social-body .panel-sub-section:first-child {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.panel-news-social-body .panel-sub-section:last-child {
  flex-shrink: 0;
  max-height: 200px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}

/* ── News Feed Panel ─────────────────────────────────────────────────────── */
.news-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.1s;
}
.news-feed-item:last-child { border-bottom: none; }
.news-feed-item:hover { background: rgba(255, 255, 255, 0.025); }

.nf-sentiment-bar {
  width: 2px;
  min-height: 100%;
  height: auto;
  align-self: stretch;
  border-radius: 1px;
  flex-shrink: 0;
  margin-top: 2px;
}
.nf-sentiment-bar.pos { background: var(--green); opacity: 0.7; }
.nf-sentiment-bar.neg { background: var(--red); opacity: 0.7; }
.nf-sentiment-bar.neu { background: var(--muted); opacity: 0.4; }

.nf-content { flex: 1; min-width: 0; }
.nf-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 2px;
  letter-spacing: 0.05em;
}
.nf-ticker-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 5px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.nf-headline {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.nf-headline a {
  color: inherit;
  text-decoration: none;
}
.nf-headline a:hover { color: var(--text-secondary); }

.news-feed-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  line-height: 1.8;
}

/* ── Market Pulse Panel (compact) ────────────────────────────────────────── */
.pulse-panel-inner {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pulse-panel-breadth { }
.ppb-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
}
.ppb-up-label   { color: var(--green); }
.ppb-down-label { color: var(--red); }
.ppb-bar {
  height: 6px;
  background: var(--red);
  border-radius: 3px;
  overflow: hidden;
}
.ppb-fill-up {
  height: 100%;
  background: var(--green);
  border-radius: 2px 0 0 2px;
  transition: width 0.4s ease;
}
.ppb-pct {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
  text-align: center;
}

.pulse-panel-fng {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.ppf-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.ppf-gauge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-panel-narrative {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.pulse-panel-narrative .mp-bull { color: var(--green); font-weight: 600; }
.pulse-panel-narrative .mp-bear { color: var(--red); font-weight: 600; }
.pulse-panel-narrative .mp-warn { color: var(--warn); font-weight: 600; }

/* ── Mini Globe Panel ────────────────────────────────────────────────────── */
#panel-globe-mini .panel-body {
  padding: 0;
  overflow: hidden;
  position: relative;
}
.mini-globe-wrap {
  width: 100%;
  height: 100%;
  min-height: 250px;
  position: relative;
}
.mini-globe-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 10;
}
.mini-globe-expand-btn {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.mini-globe-expand-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.12); }

/* ── Social Buzz Panel ───────────────────────────────────────────────────── */
.social-buzz-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.1s;
}
.social-buzz-row:last-child { border-bottom: none; }
.social-buzz-row:hover { background: rgba(255, 255, 255, 0.03); }

.sb-rank {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  width: 14px;
  flex-shrink: 0;
}
.sb-ticker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  min-width: 42px;
}
.sb-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}
.sb-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.sb-bar-fill.pos { background: var(--green); }
.sb-bar-fill.neg { background: var(--red); }
.sb-bar-fill.neu { background: var(--muted); }
.sb-mentions {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  min-width: 32px;
  text-align: right;
}
.sb-sent {
  font-size: 10px;
  font-weight: 600;
  min-width: 38px;
  text-align: right;
}
.sb-sent.pos { color: var(--green); }
.sb-sent.neg { color: var(--red); }
.sb-sent.neu { color: var(--muted); }

/* ── Probability Matrix Panel ────────────────────────────────────────────── */
#panel-matrix .panel-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0;
}

/* Compact Market Pulse inside matrix */
#panel-matrix .dash-pulse {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#panel-matrix .dash-pulse-header { margin-bottom: 4px; }
#panel-matrix .dash-pulse-title { font-size: 12px; }
#panel-matrix .dash-pulse-breadth { margin-bottom: 4px; }
#panel-matrix .dpb-labels { font-size: 11px; }
#panel-matrix .dpb-bar { height: 6px; }
#panel-matrix .dpb-pct { font-size: 9px; margin-top: 2px; }
#panel-matrix .dash-pulse-sectors {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  font-size: 10px; margin-bottom: 4px;
}
#panel-matrix .dps-item { padding: 0; }
#panel-matrix .dps-label { font-size: 10px; }
#panel-matrix .dps-bar { height: 3px; }
#panel-matrix .dash-pulse-text {
  font-size: 11px; line-height: 1.5;
  max-height: 60px; overflow: hidden;
}

/* Heatmap fills remaining space */
#panel-matrix .dash-heatmap-body {
  flex: 1;
  min-height: 0;
  padding: 8px 12px;
  overflow-y: auto;
}

/* ── Fear & Greed in terminal panel ─────────────────────────────────────── */
#panel-pulse .dash-fng-panel {
  min-height: 0;
  padding: 8px;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#panel-pulse .fng-gauge-container {
  max-width: 240px;
  margin: 0 auto;
}
#panel-pulse .fng-gauge-svg {
  max-height: 180px;
}

/* ── Sector RS Panel ─────────────────────────────────────────────────────── */
#panel-sector-rs .panel-body {
  padding: 8px 12px;
}
#panel-sector-rs .dash-sector-rs {
  border: none;
  border-radius: 0;
  background: transparent;
  margin: 0;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#panel-sector-rs .dash-sector-rs-body {
  height: 200px;
}

/* ── Panel Loading States ────────────────────────────────────────────────── */
.panel-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.panel-spinner {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--muted);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ── Terminal Status Dots ────────────────────────────────────────────────── */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.live    { background: var(--green); animation: statusPulse 2s ease-in-out infinite; }
.status-dot.stale   { background: var(--warn); }
.status-dot.offline { background: var(--red); }
@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── Panel Action Buttons ────────────────────────────────────────────────── */
.panel-action-btn {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s;
}
.panel-action-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

/* ── Compact Horizon Toggle (panel header) ───────────────────────────────── */
.horizon-toggle-sm {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
  gap: 1px;
}
.horizon-btn-sm {
  padding: 2px 8px;
  border-radius: 3px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.12s;
}
.horizon-btn-sm:hover { color: var(--text); }
.horizon-btn-sm.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* ── Terminal Views (non-dashboard full-page views inside terminal) ──────── */
/* When non-terminal views are shown inside the terminal layout main-content */
.terminal-view-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

/* ── Terminal divider lines ──────────────────────────────────────────────── */
.t-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   DASHBOARD SCROLL LAYOUT (replaces terminal-grid for the dashboard view)
══════════════════════════════════════════════════════════════════════════════ */

/* ── Scroll container ────────────────────────────────────────────────────── */
.dash-scroll {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Base card ───────────────────────────────────────────────────────────── */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.dash-scroll .dash-card:hover {
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 0 20px rgba(255,255,255,0.04), 0 0 40px rgba(255,255,255,0.02);
}
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.dash-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.dash-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 5px rgba(52, 211, 153, 0.7);
  animation: live-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 5px rgba(52, 211, 153, 0.7); }
  50%       { opacity: 0.55; box-shadow: 0 0 2px rgba(52, 211, 153, 0.3); }
}

/* ── Hero row: Market Pulse + F&G ────────────────────────────────────────── */
.dash-hero-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 8px;
  align-items: stretch;
}

.dash-card-pulse {
  padding: 12px 16px;
}

/* Pulse card overrides — reset compact terminal styles so it renders full */
.dash-card-pulse #dash-pulse {
  padding: 0;
  border-bottom: none;
}
.dash-card-pulse .dash-pulse-header { margin-bottom: 10px; }
.dash-card-pulse .dash-pulse-title  { font-size: 13px; }
.dash-card-pulse .dpb-labels        { font-size: 12px; }
.dash-card-pulse .dpb-bar           { height: 8px; }
.dash-card-pulse .dpb-pct           { font-size: 10px; margin-top: 4px; }
.dash-card-pulse .dash-pulse-sectors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 11px;
  margin: 10px 0 6px;
}
.dash-card-pulse .dps-item { padding: 0; }
.dash-card-pulse .dps-label { font-size: 11px; }
.dash-card-pulse .dps-bar   { height: 4px; }
.dash-card-pulse .dash-pulse-text {
  font-size: 11px;
  line-height: 1.5;
  max-height: none;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.dash-card-fng {
  display: flex;
  flex-direction: column;
}
.dash-card-fng .dash-fng-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  min-height: 0;
}
.dash-card-fng .fng-gauge-container {
  max-width: 320px;
  width: 100%;
}

/* ── Probability Matrix card ─────────────────────────────────────────────── */
.dash-card-matrix .dash-heatmap-body {
  padding: 8px 12px;
}
.dash-card-sector {
  display: flex;
  flex-direction: column;
}
.dash-card-sector .dash-sector-rs-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.dash-card-sector .dash-sector-rs-body {
  flex: 1;
  min-height: 0;
}

/* ── Sector RS card ──────────────────────────────────────────────────────── */
.dash-sector-rs-wrap {
  padding: 8px 12px 12px;
}

/* ── Two-column: Top Movers + Market Feed ────────────────────────────────── */
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dash-row-matrix { grid-template-columns: 2fr 3fr; }
.dash-row-feed   { grid-template-columns: 3fr 2fr; }

.dash-watchlist-body {
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}
.dash-watchlist-body::-webkit-scrollbar { width: 4px; }
.dash-watchlist-body::-webkit-scrollbar-track { background: transparent; }
.dash-watchlist-body::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

.dash-feed-body {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}
.dash-feed-body::-webkit-scrollbar { width: 4px; }
.dash-feed-body::-webkit-scrollbar-track { background: transparent; }
.dash-feed-body::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

.dash-feed-section {
  border-bottom: 1px solid var(--border);
}
.dash-feed-section:last-child { border-bottom: none; }

.dash-feed-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 10px 16px 6px;
}

/* ── Dash scroll responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dash-hero-row  { grid-template-columns: 1fr; }
  .dash-two-col, .dash-row-matrix, .dash-row-feed { grid-template-columns: 1fr; }
  .dash-card-fng  { min-height: 260px; }
}
@media (max-width: 768px) {
  .dash-scroll { padding: 0 14px 80px; gap: 12px; }
  .dash-card-pulse { padding: 14px; }
  .dash-watchlist-body,
  .dash-feed-body { max-height: 320px; }
}
@media (max-width: 480px) {
  .dash-scroll { padding: 0 10px 80px; gap: 10px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   TERMINAL RESPONSIVE
══════════════════════════════════════════════════════════════════════════════ */

/* ── Large desktop: widen side panels ───────────────────────────────────── */
@media (min-width: 1600px) {
  .terminal-grid {
    grid-template-columns: 320px 1fr 320px;
  }
}

/* ── Tablet (1024px) → single column stack ──────────────────────────────── */
@media (max-width: 1024px) {
  .terminal-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "matrix"
      "watchlist"
      "news"
      "pulse"
      "sector";
    height: auto;
    min-height: auto;
  }

  .terminal-panel {
    min-height: 300px;
  }

  #panel-sector-rs .dash-sector-rs-body {
    height: 240px;
  }

  .bottom-nav {
    gap: 1px;
    padding: 5px 8px 7px;
  }
  .bnav-item {
    padding: 6px 12px;
    font-size: 10px;
  }

  .ticker-tape { display: none; } /* hide tape on tablet, reclaim space */
}

/* ── Mobile (768px) ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .terminal-grid {
    gap: 0;
    background: var(--bg);
  }
  .terminal-panel {
    border-bottom: 1px solid var(--border);
    min-height: 260px;
  }
  .panel-header { padding: 8px 12px; }
  .panel-title { font-size: 9px; }

  .bottom-nav {
    padding: 4px 6px 6px;
    gap: 1px;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .bottom-nav::-webkit-scrollbar { display: none; }
  .bnav-item {
    padding: 5px 10px;
    font-size: 9px;
    flex-shrink: 0;
  }

  .watchlist-row { font-size: 11px; }
  .wl-price { display: none; }

  .social-buzz-row .sb-bar-wrap { display: none; }
}

/* ── Small mobile (480px) ────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .terminal-panel { min-height: 220px; }

  .bnav-item {
    padding: 5px 8px;
    font-size: 9px;
    letter-spacing: 0;
  }

  .news-feed-item { padding: 6px 10px; }
  .nf-headline { font-size: 10px; }

  .watchlist-row { grid-template-columns: 48px 1fr 40px; }
  .wl-price { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
══════════════════════════════════════════════════════════════════════════════ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════════════════════
   THEME TOGGLE
══════════════════════════════════════════════════════════════════════════════ */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: rgba(255,255,255,0.15);
}
[data-theme="dark"] .theme-icon-moon,
:root:not([data-theme="light"]) .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }

/* ══════════════════════════════════════════════════════════════════════════════
   LIGHT MODE
══════════════════════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:           #f8f8f8;
  --surface:      #ffffff;
  --surface2:     #f0f0f0;
  --border:       rgba(0,0,0,0.08);
  --border-light: #e0e0e0;
  --accent:       #171717;
  --accent-hover: #000000;
  --accent-dark:  #404040;
  --accent-glow:  rgba(0,0,0,0.04);
  --accent-gradient: linear-gradient(135deg, #171717 0%, #6b7280 100%);
  --text:         #171717;
  --text-secondary: #6b7280;
  --muted:        #9ca3af;
  --card-bg:      rgba(255,255,255,0.9);
  --card-border:  rgba(0,0,0,0.08);
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 28px rgba(0,0,0,0.10);
  --shadow-xl:  0 20px 40px rgba(0,0,0,0.12);
}

/* Light mode overrides for hardcoded colors */
[data-theme="light"] .gradient-text {
  background: linear-gradient(to bottom, #171717, #6b7280);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .site-header {
  background: rgba(248, 248, 248, 0.92);
}

[data-theme="light"] .bottom-nav {
  background: rgba(248, 248, 248, 0.95);
  border-top-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .ticker-tape {
  background: var(--surface);
  border-bottom-color: var(--border);
}

[data-theme="light"] .conf-high {
  background: rgba(0,0,0,0.06);
  color: var(--text);
  border-color: rgba(0,0,0,0.10);
}
[data-theme="light"] .conf-medium {
  background: rgba(0,0,0,0.04);
  color: var(--text-secondary);
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .conf-low {
  background: rgba(0,0,0,0.02);
  color: var(--muted);
  border-color: rgba(0,0,0,0.04);
}

/* Light neon hover → dark glow instead of white */
[data-theme="light"] .dash-scroll .dash-card:hover {
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 0 20px rgba(0,0,0,0.04), 0 0 40px rgba(0,0,0,0.02);
}
[data-theme="light"] .dash-card:hover {
  box-shadow: var(--shadow-md), 0 0 15px rgba(0,0,0,0.025);
}
[data-theme="light"] .dash-card.up,
[data-theme="light"] .dash-card.down {
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .dash-card.up:hover,
[data-theme="light"] .dash-card.down:hover {
  border-color: rgba(0,0,0,0.15);
}
[data-theme="light"] .dc-tint-up,
[data-theme="light"] .dc-tint-down {
  border-left-color: rgba(0,0,0,0.10) !important;
  background: linear-gradient(135deg, rgba(0,0,0,0.02) 0%, transparent 45%) !important;
}

[data-theme="light"] .theme-toggle-btn:hover {
  border-color: rgba(0,0,0,0.15);
}

/* Light mode scrollbar */
[data-theme="light"] ::-webkit-scrollbar-track { background: #f0f0f0; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #d4d4d8; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #a1a1aa; }

/* Landing page stays dark regardless of theme */
[data-theme="light"] .landing-page {
  color: #fafafa;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PREMIUM EFFECTS
══════════════════════════════════════════════════════════════════════════════ */

/* ── 1. Animated gradient border on dashboard panel cards ──────────────── */
@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes gradient-rotate {
  to { --gradient-angle: 360deg; }
}
.dash-scroll .dash-card {
  position: relative;
}
.dash-scroll .dash-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--gradient-angle),
    transparent 0%,
    transparent 70%,
    rgba(255,255,255,0.12) 80%,
    rgba(255,255,255,0.04) 90%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  animation: gradient-rotate 4s linear infinite;
}
.dash-scroll .dash-card:hover::before {
  opacity: 1;
}

/* ── 2. Cursor-tracking glow (JS adds --glow-x/--glow-y) ──────────────── */
.glow-card {
  position: relative;
  overflow: hidden;
}
.glow-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(255,255,255,0.06) 0%,
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.glow-card:hover::after {
  opacity: 1;
}
[data-theme="light"] .glow-card::after {
  background: radial-gradient(
    400px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(0,0,0,0.04) 0%,
    transparent 60%
  );
}

/* ── 3. Film grain overlay ─────────────────────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}
[data-theme="light"] .grain-overlay {
  opacity: 0.015;
}

/* ── 4. Enhanced shimmer skeleton ──────────────────────────────────────── */
.skeleton-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.skeleton-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.04) 40%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

/* ── 5. Pulse ring on live dot ─────────────────────────────────────────── */
.live-dot {
  position: relative;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.4);
  animation: live-ring 2s ease-out infinite;
}
@keyframes live-ring {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ── 6. Enhanced modal glassmorphism ───────────────────────────────────── */
.modal-card {
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    var(--shadow-xl),
    0 0 0 1px rgba(255,255,255,0.06),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.globe-modal-inner {
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    var(--shadow-xl),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ── 7. Staggered card entrance with scale ─────────────────────────────── */
@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.card-enter {
  animation: cardEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── 8. Horizon toggle pill indicator ──────────────────────────────────── */
.horizon-toggle {
  position: relative;
}
.horizon-btn {
  position: relative;
  z-index: 1;
}
.horizon-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  animation: pillGrow 0.2s ease-out;
}
@keyframes pillGrow {
  from { width: 0; opacity: 0; }
  to   { width: 16px; opacity: 1; }
}

/* ── 9. Subtle inner glow on hero row cards ────────────────────────────── */
.dash-card-pulse,
.dash-card-fng {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── 10. Number ticker flash on update ─────────────────────────────────── */
@keyframes numFlash {
  0%   { color: var(--text); }
  30%  { color: var(--accent-hover); text-shadow: 0 0 8px rgba(255,255,255,0.15); }
  100% { color: var(--text); text-shadow: none; }
}
.num-flash {
  animation: numFlash 0.6s ease-out;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PHASE 13: MACRO STRIP
   ══════════════════════════════════════════════════════════════════════════════ */
.macro-strip {
  display: flex;
  gap: 12px;
  padding: 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
  min-height: 0;
}
.macro-strip:empty { display: none; }
.macro-strip::-webkit-scrollbar { display: none; }

.macro-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface, rgba(255,255,255,0.03));
  border: 1px solid var(--border);
}
.macro-label {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.macro-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
}
.macro-trend { font-size: 10px; }
.macro-trend.trend-up { color: var(--clr-up); }
.macro-trend.trend-down { color: var(--clr-down); }
.macro-trend.trend-flat { color: var(--text-muted); }
.macro-warning {
  color: #f59e0b;
  font-weight: 600;
  border-color: rgba(245,158,11,0.3);
  background: rgba(245,158,11,0.08);
}
.macro-unavailable {
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PHASE 13: BREADTH GAUGES
   ══════════════════════════════════════════════════════════════════════════════ */
.breadth-panel { padding: 8px 0; }
.breadth-row {
  display: flex;
  gap: 12px;
}
.breadth-gauge {
  flex: 1;
  min-width: 0;
}
.breadth-gauge-bar {
  height: 6px;
  background: rgba(128,128,128,0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.breadth-gauge-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.breadth-gauge-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.breadth-gauge-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}
.breadth-stats {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}
.breadth-stats strong {
  color: var(--text);
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════════════════════════════════
   PHASE 13: CORRELATION PANEL
   ══════════════════════════════════════════════════════════════════════════════ */
.corr-panel { padding: 4px 0; }
.corr-regime {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 12px;
}
.corr-regime.regime-on {
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.25);
}
.corr-regime.regime-off {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.25);
}
.corr-regime.regime-trans {
  background: rgba(234,179,8,0.1);
  border: 1px solid rgba(234,179,8,0.25);
}
.corr-regime-label {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}
.corr-regime-value {
  font-weight: 600;
  font-family: var(--font-mono);
}
.regime-on .corr-regime-value { color: var(--clr-up); }
.regime-off .corr-regime-value { color: var(--clr-down); }
.regime-trans .corr-regime-value { color: #eab308; }

.corr-grid {
  display: grid;
  gap: 1px;
  font-size: 10px;
  font-family: var(--font-mono);
}
.corr-cell {
  padding: 3px 4px;
  text-align: center;
  border-radius: 2px;
  min-width: 0;
  overflow: hidden;
}
.corr-corner { background: transparent; }
.corr-header {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 9px;
  text-transform: uppercase;
}
.corr-row-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 9px;
  text-align: right;
  padding-right: 6px;
}
.corr-data {
  color: var(--text);
  cursor: default;
  transition: opacity 0.2s;
}
.corr-data:hover { opacity: 0.8; }
.corr-unavailable {
  color: var(--text-muted);
  font-size: 11px;
  padding: 8px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PHASE 13: SIGNAL BADGES
   ══════════════════════════════════════════════════════════════════════════════ */
.signal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 4px 0 2px;
}
.signal-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.4;
}
.sig-bull {
  background: rgba(52,211,153,0.15);
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.3);
}
.sig-bear {
  background: rgba(248,113,113,0.15);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.3);
}
.sig-warn {
  background: rgba(234,179,8,0.15);
  color: #eab308;
  border: 1px solid rgba(234,179,8,0.3);
}
.sig-info {
  background: rgba(96,165,250,0.15);
  color: #60a5fa;
  border: 1px solid rgba(96,165,250,0.3);
}

/* ══════════════════════════════════════════════════════════════════════════════
   PHASE 13: FUTURES & FX MONITOR
   ══════════════════════════════════════════════════════════════════════════════ */
.futures-content {
  padding: 0 16px 80px;
}
.futures-group {
  margin-bottom: 24px;
}
.futures-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.futures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.futures-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.futures-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.futures-card.fut-up { border-left: 3px solid var(--clr-up); }
.futures-card.fut-down { border-left: 3px solid var(--clr-down); }

.fut-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.fut-symbol {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.fut-name {
  font-size: 11px;
  color: var(--text-muted);
}
.fut-price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.fut-change {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.fut-change.fut-up { color: var(--clr-up); }
.fut-change.fut-down { color: var(--clr-down); }
.fut-spark {
  opacity: 0.7;
}

/* ── Responsive: futures ── */
@media (max-width: 768px) {
  .futures-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .futures-grid {
    grid-template-columns: 1fr;
  }
  .breadth-row {
    flex-direction: column;
    gap: 8px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   HISTORICAL BACKTEST
   ══════════════════════════════════════════════════════════════════════════════ */
.backtest-section { margin-top: 8px; }
.bt-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

/* Summary cards */
.bt-summary { margin-top: 16px; }
.bt-period {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}
.bt-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.bt-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.bt-card-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.bt-card-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}
.bt-card-value.bt-good { color: var(--clr-up); }
.bt-card-value.bt-ok { color: #eab308; }
.bt-card-value.bt-bad { color: var(--clr-down); }
.bt-card-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
  margin-bottom: 8px;
}
.bt-card-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 4px;
}
.bt-bucket {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(128,128,128,0.1);
}
.bt-warning {
  font-size: 10px;
  color: #eab308;
  margin-top: 6px;
}

/* Results table row highlighting */
.bt-correct { background: rgba(52, 211, 153, 0.06); }
.bt-incorrect { background: rgba(248, 113, 113, 0.06); }

/* Chart containers */
#backtest-chart-wrap,
#backtest-cal-wrap {
  position: relative;
}

/* Responsive */
@media (max-width: 768px) {
  .bt-cards {
    grid-template-columns: 1fr;
  }
  .bt-card-value { font-size: 24px; }
}
