/* ============================================================================
   GME PATTERN TRACKER DASHBOARD - Mission Control Theme
   Built on KALENIX Deepspace aesthetic with GameStop branding
   ============================================================================ */

/* ==========================================================================
   DESIGN TOKENS - GME Colors + Deepspace Base
   ========================================================================== */

:root {
  /* GME Brand Colors */
  --gme-red: #D31319;
  --gme-red-light: #FF4444;
  --gme-red-dark: #8B0000;
  --gme-red-glow: rgba(211, 19, 25, 0.5);

  /* Deep Space Background (from KALENIX) */
  --ds-bg-void: #0a0d14;
  --ds-bg-deep: #0e1219;
  --ds-bg-space: #121821;
  --ds-bg-panel: rgba(22, 29, 40, 0.85);
  --ds-bg-elevated: rgba(26, 34, 48, 0.75);
  --ds-bg-surface: rgba(30, 39, 56, 0.8);
  --ds-bg-hover: rgba(36, 46, 63, 0.85);

  /* Primary - GME Red accent */
  --ds-primary-500: var(--gme-red);
  --ds-primary-glow: var(--gme-red-glow);

  /* Accent - Aurora Teal for contrast */
  --ds-accent-400: #4dd0e1;
  --ds-accent-500: #26c6da;
  --ds-accent-glow: rgba(38, 198, 218, 0.4);

  /* Signal Colors */
  --signal-bullish: #00FF88;
  --signal-bearish: #FF4444;
  --signal-neutral: #FFAA00;
  --signal-bullish-glow: rgba(0, 255, 136, 0.4);
  --signal-bearish-glow: rgba(255, 68, 68, 0.4);

  /* Status Colors */
  --ds-success-base: #4caf50;
  --ds-success-glow: rgba(76, 175, 80, 0.35);
  --ds-warning-base: #ffc107;
  --ds-warning-glow: rgba(255, 193, 7, 0.35);
  --ds-error-base: #f44336;
  --ds-error-glow: rgba(244, 67, 54, 0.35);

  /* Text Colors */
  --ds-text-primary: #f0f4f8;
  --ds-text-secondary: #b0bec5;
  --ds-text-muted: #78909c;
  --ds-text-accent: var(--ds-accent-500);

  /* Borders */
  --ds-border-subtle: rgba(176, 190, 197, 0.1);
  --ds-border-default: rgba(176, 190, 197, 0.2);
  --ds-border-accent: rgba(211, 19, 25, 0.4);
  --ds-border-glow: rgba(211, 19, 25, 0.6);

  /* Shadows */
  --ds-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
  --ds-shadow-glow: 0 0 20px var(--gme-red-glow);

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

  /* Spacing */
  --ds-space-1: 0.25rem;
  --ds-space-2: 0.5rem;
  --ds-space-3: 0.75rem;
  --ds-space-4: 1rem;
  --ds-space-5: 1.25rem;
  --ds-space-6: 1.5rem;
  --ds-space-8: 2rem;

  /* Border Radius */
  --ds-radius-sm: 4px;
  --ds-radius-md: 8px;
  --ds-radius-lg: 12px;
  --ds-radius-xl: 16px;

  /* Transitions */
  --ds-transition-fast: all 150ms ease-out;
  --ds-transition-normal: all 250ms ease-out;

  /* Z-Index */
  --z-game: 0;
  --z-overlay: 10;
  --z-panels: 20;
  --z-header: 100;
  --z-modal: 200;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--ds-font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ds-text-primary);
  background: var(--ds-bg-void);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   PAGE VISIBILITY - Pause all animations when tab is hidden
   ========================================================================== */

body.page-hidden *,
body.page-hidden *::before,
body.page-hidden *::after {
  animation-play-state: paused !important;
  transition: none !important;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px var(--gme-red-glow); }
  50% { box-shadow: 0 0 25px var(--gme-red-glow), 0 0 40px var(--gme-red-glow); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes slide-in-right {
  0% { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes fade-in-up {
  0% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes signal-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes scan-line {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes number-flash {
  0% { color: var(--ds-text-primary); }
  50% { color: var(--gme-red-light); text-shadow: 0 0 10px var(--gme-red-glow); }
  100% { color: var(--ds-text-primary); }
}

/* ==========================================================================
   GAME CANVAS - INTERACTIVE BACKGROUND
   ========================================================================== */

#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-game);
  pointer-events: none; /* Dashboard elements handle clicks, game via JS forwarding */
  /* CRT-style blur effect to soften the game graphics */
  filter: blur(1.5px) saturate(1.2) contrast(1.1);
  opacity: 0.7;
}

/* Scanline overlay for retro CRT effect */
#ambient-canvas::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   DASHBOARD OVERLAY CONTAINER
   ========================================================================== */

.dashboard-overlay {
  position: relative;
  z-index: var(--z-panels);
  min-height: 100vh;
  pointer-events: auto; /* Handle clicks for UI elements */
}

/* ==========================================================================
   HEADER - GME Mission Control
   ========================================================================== */

.gme-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-3) var(--ds-space-6);
  background: linear-gradient(180deg, rgba(10, 13, 20, 0.95) 0%, rgba(10, 13, 20, 0.85) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ds-border-accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 30px var(--gme-red-glow);
}

.gme-logo {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
}

.gme-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gme-red);
  border-radius: var(--ds-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  box-shadow: 0 0 15px var(--gme-red-glow);
}

.gme-logo-text {
  font-family: var(--ds-font-mono);
}

.gme-logo-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ds-text-primary);
  letter-spacing: 0.5px;
}

.gme-logo-subtitle {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Price Display in Header */
.gme-price-display {
  display: flex;
  align-items: center;
  gap: var(--ds-space-6);
}

.price-main {
  text-align: right;
}

.price-label {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.price-value {
  font-family: var(--ds-font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ds-text-primary);
}

.price-change {
  font-family: var(--ds-font-mono);
  font-size: 0.9rem;
  font-weight: 600;
}

.price-change.positive { color: var(--signal-bullish); }
.price-change.negative { color: var(--signal-bearish); }

.performance-change {
  font-family: var(--ds-font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: var(--ds-space-1) var(--ds-space-2);
  border-radius: var(--ds-radius-sm);
}

.performance-change.positive {
  color: var(--signal-bullish);
  background: rgba(0, 255, 136, 0.1);
}

.performance-change.negative {
  color: var(--signal-bearish);
  background: rgba(255, 68, 68, 0.1);
}

.signal-badge {
  padding: var(--ds-space-2) var(--ds-space-4);
  border-radius: var(--ds-radius-lg);
  font-family: var(--ds-font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.signal-badge.bullish {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid var(--signal-bullish);
  color: var(--signal-bullish);
  box-shadow: 0 0 15px var(--signal-bullish-glow);
}

.signal-badge.bearish {
  background: rgba(255, 68, 68, 0.15);
  border: 1px solid var(--signal-bearish);
  color: var(--signal-bearish);
  box-shadow: 0 0 15px var(--signal-bearish-glow);
}

.signal-badge.neutral {
  background: rgba(255, 170, 0, 0.15);
  border: 1px solid var(--signal-neutral);
  color: var(--signal-neutral);
}

/* Signal Display with Label */
.signal-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: help;
}

.signal-label {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.gme-nav {
  display: flex;
  align-items: center;
  gap: var(--ds-space-1);
  padding: var(--ds-space-1);
  background: var(--ds-bg-panel);
  border-radius: var(--ds-radius-lg);
  border: 1px solid var(--ds-border-subtle);
  pointer-events: auto !important;
  position: relative;
  z-index: 100;
}

.nav-btn {
  padding: var(--ds-space-2) var(--ds-space-4);
  border: none;
  background: transparent;
  color: var(--ds-text-secondary);
  font-family: var(--ds-font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--ds-radius-md);
  cursor: pointer;
  transition: var(--ds-transition-fast);
  white-space: nowrap;
  pointer-events: auto !important;
  position: relative;
  z-index: 100;
}

.nav-btn:hover {
  background: var(--ds-bg-hover);
  color: var(--ds-text-primary);
}

.nav-btn.active {
  background: var(--gme-red);
  color: white;
  box-shadow: 0 0 15px var(--gme-red-glow);
}

/* ==========================================================================
   MAIN LAYOUT
   ========================================================================== */

.gme-main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--ds-space-4);
  padding: var(--ds-space-4);
  max-width: 1800px;
  margin: 0 auto;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.gme-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
}

/* ==========================================================================
   GLASS PANEL - Core Component
   ========================================================================== */

.glass-panel {
  background: var(--ds-bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--ds-border-default);
  border-radius: var(--ds-radius-lg);
  overflow: hidden;
  transition: var(--ds-transition-normal);
}

.glass-panel:hover {
  border-color: var(--ds-border-accent);
  box-shadow: var(--ds-shadow-md), 0 0 20px rgba(211, 19, 25, 0.1);
}

.glass-panel.glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-3) var(--ds-space-4);
  border-bottom: 1px solid var(--ds-border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.panel-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ds-text-secondary);
}

.panel-title .accent {
  color: var(--gme-red);
}

.panel-body {
  padding: var(--ds-space-4);
}

/* ==========================================================================
   SIGNAL GAUGE
   ========================================================================== */

.signal-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ds-space-3);
  padding: var(--ds-space-4);
}

.gauge-circle {
  position: relative;
  width: 120px;
  height: 120px;
}

.gauge-circle svg {
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: var(--ds-border-subtle);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out, stroke 0.5s ease;
}

.gauge-fill.bullish { stroke: var(--signal-bullish); }
.gauge-fill.bearish { stroke: var(--signal-bearish); }
.gauge-fill.neutral { stroke: var(--signal-neutral); }

.gauge-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-number {
  font-family: var(--ds-font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.gauge-label {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: var(--ds-space-1);
}

/* Signal Components */
.signal-components {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
}

.signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-2);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--ds-radius-sm);
  cursor: help;
  transition: background 0.2s;
}

.signal-row:hover {
  background: rgba(0, 0, 0, 0.4);
}

.signal-row[title]::after {
  content: " ?";
  font-size: 0.6rem;
  color: var(--ds-text-muted);
  opacity: 0.5;
}

.signal-name {
  font-size: 0.75rem;
  color: var(--ds-text-secondary);
}

.signal-value {
  font-family: var(--ds-font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.signal-value.positive { color: var(--signal-bullish); }
.signal-value.negative { color: var(--signal-bearish); }
.signal-value.neutral { color: var(--signal-neutral); }

/* ==========================================================================
   EXPECTED RANGE DISPLAY
   ========================================================================== */

.range-display {
  padding: var(--ds-space-4);
}

.range-bar {
  position: relative;
  height: 8px;
  background: var(--ds-border-subtle);
  border-radius: 4px;
  margin: var(--ds-space-4) 0;
  overflow: visible;
}

.range-fill {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, var(--signal-bearish) 0%, var(--signal-neutral) 50%, var(--signal-bullish) 100%);
  border-radius: 4px;
  opacity: 0.6;
}

.range-current {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 20px;
  background: white;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transform: translateX(-50%);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--ds-font-mono);
  font-size: 0.75rem;
}

.range-lower { color: var(--signal-bearish); }
.range-expected { color: var(--ds-text-muted); }
.range-upper { color: var(--signal-bullish); }

/* Range Visualization (Bollinger-style bar) */
.range-viz-container {
  padding: var(--ds-space-3) var(--ds-space-4) var(--ds-space-4);
}

.range-viz-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--ds-space-3);
  font-family: var(--ds-font-mono);
  font-size: 0.8rem;
}

.range-viz-current-price {
  color: var(--ds-text-secondary);
}

.range-viz-expected-price {
  font-weight: 600;
}

.range-loading {
  color: var(--ds-text-muted);
  font-size: 0.75rem;
  text-align: center;
  padding: var(--ds-space-4);
}

.range-viz-bar {
  position: relative;
  height: 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--ds-radius-md);
  overflow: visible;
  border: 1px solid var(--ds-border-subtle);
}

.range-viz-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: var(--ds-radius-md);
}

.range-viz-expected {
  position: absolute;
  top: 50%;
  width: 3px;
  height: 16px;
  background: var(--signal-neutral);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px var(--signal-neutral);
}

.range-viz-current {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  background: white;
  border: 2px solid var(--gme-red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--gme-red-glow);
  z-index: 2;
}

.range-viz-labels {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: var(--ds-space-2);
  font-family: var(--ds-font-mono);
  font-size: 0.7rem;
}

.range-label-endpoint {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.range-label-price {
  font-weight: 600;
  font-size: 0.75rem;
}

.range-label-pct {
  font-size: 0.6rem;
  color: var(--ds-text-muted);
}

.range-label-center {
  text-align: center;
}

.range-label-low { color: var(--signal-bearish); }
.range-label-conf { color: var(--ds-text-muted); font-size: 0.65rem; }
.range-label-high { color: var(--signal-bullish); }

/* Clean Range Visualization */
.range-viz-clean {
  padding: var(--ds-space-3);
}

.expected-main {
  text-align: center;
  margin-bottom: var(--ds-space-3);
}

.expected-label {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--ds-space-1);
}

.expected-price {
  font-family: var(--ds-font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.expected-change {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.8;
}

.expected-signal {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: var(--ds-space-1);
}

/* Horizontal range bar */
.range-bar-container {
  margin: var(--ds-space-3) 0;
}

.range-bar-track {
  position: relative;
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  border: 1px solid var(--ds-border-subtle);
}

.range-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
    rgba(255, 68, 68, 0.4) 0%,
    rgba(255, 170, 0, 0.3) 50%,
    rgba(0, 255, 136, 0.4) 100%);
  border-radius: 4px;
}

.range-marker {
  position: absolute;
  top: 50%;
  transform: translateX(-50%);
}

.range-marker-current {
  z-index: 2;
}

.range-marker-current .marker-dot {
  width: 16px;
  height: 16px;
  background: white;
  border: 3px solid var(--gme-red);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 10px var(--gme-red-glow);
}

.range-marker-current .marker-label {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--ds-font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--gme-red);
  white-space: nowrap;
}

.range-marker-expected .marker-line {
  width: 2px;
  height: 16px;
  background: var(--signal-neutral);
  transform: translateY(-50%);
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(255, 170, 0, 0.5);
}

/* Floor marker on range bar */
.range-marker-floor {
  position: absolute;
  top: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.range-marker-floor .marker-floor-line {
  width: 2px;
  height: 20px;
  background: #00FF88;
  transform: translateY(-50%);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

.range-marker-floor .marker-floor-label {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  font-weight: 600;
  color: #00FF88;
  white-space: nowrap;
  text-shadow: 0 0 4px rgba(0, 255, 136, 0.5);
}

/* Floor indicator section */
.floor-indicator {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.floor-indicator.floor-critical {
  background: rgba(0, 255, 136, 0.15);
  border-color: rgba(0, 255, 136, 0.5);
  animation: floor-pulse 2s ease-in-out infinite;
}

.floor-indicator.floor-near {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.4);
}

.floor-indicator.floor-distant {
  background: rgba(0, 255, 136, 0.03);
  border-color: rgba(0, 255, 136, 0.1);
}

@keyframes floor-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 136, 0.3); }
  50% { box-shadow: 0 0 15px rgba(0, 255, 136, 0.6); }
}

.floor-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.floor-label {
  color: var(--ds-text-muted);
  flex-shrink: 0;
}

.floor-value {
  color: #00FF88;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.floor-distance {
  color: var(--ds-text-muted);
  font-size: 0.65rem;
  margin-left: auto;
}

.floor-status {
  margin-top: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: #00FF88;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

.floor-critical .floor-status {
  animation: floor-text-pulse 1.5s ease-in-out infinite;
}

@keyframes floor-text-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.floor-breakdown {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
  font-size: 0.6rem;
  color: var(--ds-text-muted);
}

.range-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--ds-space-3);
  font-family: var(--ds-font-mono);
}

.range-endpoint {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.range-endpoint.low { align-items: flex-start; }
.range-endpoint.high { align-items: flex-end; }

.endpoint-price {
  font-size: 0.75rem;
  font-weight: 600;
}

.range-endpoint.low .endpoint-price { color: var(--signal-bearish); }
.range-endpoint.high .endpoint-price { color: var(--signal-bullish); }

.endpoint-pct {
  font-size: 0.6rem;
  color: var(--ds-text-muted);
}

.range-footer {
  text-align: center;
  font-size: 0.6rem;
  color: var(--ds-text-muted);
  margin-top: var(--ds-space-2);
  padding-top: var(--ds-space-2);
  border-top: 1px solid var(--ds-border-subtle);
}

.range-footer-sep {
  margin: 0 var(--ds-space-2);
  opacity: 0.5;
}

/* Performance Chart Overlay Legend */
.chart-overlay-legend {
  display: flex;
  gap: var(--ds-space-3);
  padding: var(--ds-space-2) var(--ds-space-4);
  font-size: 0.65rem;
  color: var(--ds-text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--ds-space-1);
  cursor: help;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background 0.2s;
}

.legend-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.legend-color {
  width: 12px;
  height: 3px;
  border-radius: 1px;
}

.legend-color.price { background: var(--signal-bullish); }
.legend-color.bands {
    background: rgba(100, 150, 200, 0.3);
    height: 8px;
    border-radius: 2px;
}
.legend-color.signal { background: rgba(255, 170, 0, 0.35); }
.legend-color.short { background: rgba(120, 144, 156, 0.4); }  /* Subtle muted gray */

/* ==========================================================================
   ANOMALY LIST
   ========================================================================== */

.anomaly-list {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
  max-height: 300px;
  overflow-y: auto;
}

.anomaly-item {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-3);
  padding: var(--ds-space-3);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--ds-radius-md);
  border-left: 3px solid transparent;
  transition: var(--ds-transition-fast);
  cursor: pointer;
}

.anomaly-item:hover {
  background: rgba(0, 0, 0, 0.3);
}

.anomaly-item.high,
.anomaly-item.major {
  border-left-color: var(--ds-error-base);
}

.anomaly-item.medium,
.anomaly-item.moderate {
  border-left-color: var(--ds-warning-base);
}

.anomaly-item.low {
  border-left-color: var(--ds-accent-500);
}

.anomaly-date {
  font-family: var(--ds-font-mono);
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  white-space: nowrap;
}

.anomaly-content {
  flex: 1;
}

.anomaly-type {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ds-text-primary);
  margin-bottom: var(--ds-space-1);
}

.anomaly-desc {
  font-size: 0.7rem;
  color: var(--ds-text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   CONTENT VIEWS
   ========================================================================== */

.view-container {
  display: none;
}

.view-container.active {
  display: block;
  animation: fade-in-up 0.3s ease-out;
}

/* ==========================================================================
   MISSION CONTROL VIEW (Landing)
   ========================================================================== */

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--ds-space-4);
}

.stat-card {
  padding: var(--ds-space-4);
}

.stat-card .stat-value {
  font-family: var(--ds-font-mono);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--ds-space-2);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card .stat-change {
  font-family: var(--ds-font-mono);
  font-size: 0.85rem;
  margin-top: var(--ds-space-2);
}

/* Stat Context - Human-readable interpretation */
.stat-context {
  font-size: 0.7rem;
  margin-top: var(--ds-space-2);
  padding: var(--ds-space-1) var(--ds-space-2);
  border-radius: var(--ds-radius-sm);
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}

.stat-context.context-normal {
  color: var(--ds-text-muted);
}

.stat-context.context-low {
  color: #64b5f6;  /* Soft blue */
  background: rgba(100, 181, 246, 0.1);
}

.stat-context.context-elevated {
  color: var(--ds-warning-base);
  background: rgba(255, 193, 7, 0.1);
}

.stat-context.context-high {
  color: #ff9800;  /* Orange */
  background: rgba(255, 152, 0, 0.15);
}

.stat-context.context-crisis {
  color: var(--ds-error-base);
  background: rgba(244, 67, 54, 0.15);
  font-weight: 600;
}

/* ==========================================================================
   CHART CONTAINER
   ========================================================================== */

.chart-container {
  position: relative;
  height: 400px;
  padding: var(--ds-space-4);
}

/* ==========================================================================
   TRADINGVIEW CHART CONTAINERS
   ========================================================================== */

.timeline-panel {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 750px !important;
  overflow: visible !important;  /* Override glass-panel's overflow:hidden to allow business section to show */
}

/* NOTE: indicators-active class no longer needed - using height:auto approach */

.timeline-header {
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: var(--ds-space-3) var(--ds-space-4);
}

.tv-chart-wrapper {
  flex: 0 0 auto !important;
  display: block !important;  /* Use block instead of flex to avoid flex height issues */
  height: auto !important;  /* Let content determine height */
  min-height: 350px !important;
  max-height: none !important;
  padding: 0 var(--ds-space-2);
  overflow: visible !important;
  position: relative !important;
}

.tv-chart-container {
  height: 280px !important;  /* Fixed price chart height */
  min-height: 250px !important;
  border-radius: var(--ds-radius-md);
  overflow: hidden;
  position: relative;  /* For tooltip positioning */
}

.tv-volume-container {
  height: 80px !important;  /* Fixed volume height */
  min-height: 60px !important;
  max-height: 100px !important;
  border-top: 1px solid var(--ds-border-subtle);
}

.tv-indicator-container {
  height: 180px !important;  /* Fixed indicator height when visible */
  min-height: 160px !important;
  border-top: 1px solid var(--ds-border-subtle);
  /* display controlled by JS - starts as display:none */
}

/* ==========================================================================
   BUSINESS FUNDAMENTALS TIMELINE
   Synchronized quarterly data displayed below stock charts
   ========================================================================== */

.business-timeline-section {
  flex: 0 0 auto !important;
  margin-top: 24px !important;  /* Extra margin to separate from charts above */
  padding: var(--ds-space-4);
  background: rgba(15, 17, 23, 0.98) !important;  /* Solid opaque background */
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-md);
  position: relative !important;
  z-index: 10 !important;  /* Higher z-index to ensure it's above chart elements */
  clear: both !important;
  min-height: 280px !important;
}

.business-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  margin-bottom: var(--ds-space-3);
  flex-wrap: wrap;
}

.business-timeline-subtitle {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  margin-left: auto;
}

.business-metric-toggles {
  display: flex;
  gap: var(--ds-space-3);
  align-items: center;
}

.metric-toggle {
  display: flex;
  align-items: center;
  gap: var(--ds-space-1);
  cursor: pointer;
  font-size: 0.75rem;
}

.metric-toggle input[type="checkbox"] {
  accent-color: var(--gme-red);
  cursor: pointer;
}

.toggle-label {
  color: var(--ds-text-secondary);
  transition: var(--ds-transition-fast);
}

.toggle-label.revenue { color: #4dd0e1; }
.toggle-label.netincome { color: #81c784; }
.toggle-label.cash { color: #ffb74d; }
.toggle-label.equity { color: #ba68c8; }

.metric-toggle input:not(:checked) + .toggle-label {
  opacity: 0.4;
}

.business-chart-container {
  height: 200px;
  position: relative;
}

.business-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.business-timeline-legend {
  display: flex;
  justify-content: center;
  gap: var(--ds-space-6);
  padding-top: var(--ds-space-3);
  border-top: 1px solid var(--ds-border-subtle);
  margin-top: var(--ds-space-3);
}

.biz-legend-item {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  font-size: 0.7rem;
  color: var(--ds-text-secondary);
  cursor: help;
}

.biz-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.biz-legend-color.revenue {
  background: #4dd0e1;
}

.biz-legend-color.netincome {
  background: linear-gradient(135deg, #81c784, #e57373);
}

.biz-legend-color.cash {
  background: #ffb74d;
}

.biz-legend-color.equity {
  background: #ba68c8;
}

/* Net Income Section - separate chart for profit/loss */
.net-income-section {
  margin-top: var(--ds-space-4);
  padding-top: var(--ds-space-3);
  border-top: 1px solid var(--ds-border-subtle);
}

.net-income-header {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-2);
}

.panel-title-small {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ds-text-primary);
}

.net-income-subtitle {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
}

.net-income-chart-container {
  height: 120px;
  position: relative;
}

/* Cost Structure Section */
.cost-structure-section {
  margin-top: var(--ds-space-4);
  padding-top: var(--ds-space-3);
  border-top: 1px solid var(--ds-border-subtle);
}

.cost-structure-header {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-2);
}

.cost-structure-subtitle {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
}

.cost-structure-chart-container {
  height: 150px;
  position: relative;
}

.cost-legend {
  display: flex;
  gap: var(--ds-space-4);
  margin-top: var(--ds-space-2);
  font-size: 0.7rem;
}

.biz-legend-color.cogs {
  background: rgba(255, 138, 101, 0.7);  /* Orange-red for COGS */
  border: 1px solid #ff8a65;
}

.biz-legend-color.sga {
  background: rgba(255, 213, 79, 0.7);   /* Yellow for SG&A */
  border: 1px solid #ffd54f;
}

.biz-legend-color.revenue-line {
  background: rgba(77, 208, 225, 0.7);   /* Cyan for Revenue (reference) */
  border: 1px solid #4dd0e1;
}

/* Liabilities Section */
.liabilities-section {
  margin-top: var(--ds-space-4);
  padding-top: var(--ds-space-3);
  border-top: 1px solid var(--ds-border-subtle);
}

.liabilities-header {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-2);
}

.liabilities-subtitle {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
}

.liabilities-chart-container {
  height: 150px;
  position: relative;
}

.liabilities-legend {
  display: flex;
  gap: var(--ds-space-4);
  margin-top: var(--ds-space-2);
  font-size: 0.7rem;
}

.biz-legend-color.total-liab {
  background: rgba(239, 83, 80, 0.7);   /* Red for Total Liabilities */
  border: 1px solid #ef5350;
}

.biz-legend-color.current-liab {
  background: rgba(255, 167, 38, 0.7);  /* Orange for Current Liabilities */
  border: 1px solid #ffa726;
}

.biz-legend-color.lt-debt {
  background: rgba(171, 71, 188, 0.7);  /* Purple for Long-term Debt */
  border: 1px solid #ab47bc;
}

/* Quarter markers on the chart */
.quarter-marker {
  position: absolute;
  bottom: 0;
  width: 2px;
  background: var(--ds-border-accent);
  opacity: 0.3;
}

/* Business metric values tooltip */
.biz-tooltip {
  background: var(--ds-bg-elevated);
  border: 1px solid var(--ds-border-accent);
  border-radius: var(--ds-radius-sm);
  padding: var(--ds-space-2) var(--ds-space-3);
  font-size: 0.75rem;
  color: var(--ds-text-primary);
  box-shadow: var(--ds-shadow-lg);
}

.biz-tooltip-title {
  font-weight: 600;
  margin-bottom: var(--ds-space-1);
  color: var(--ds-text-primary);
}

.biz-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: var(--ds-space-4);
  color: var(--ds-text-secondary);
}

.biz-tooltip-value {
  font-weight: 500;
}

.biz-tooltip-value.positive { color: #81c784; }
.biz-tooltip-value.negative { color: #e57373; }

/* Chart navigation hint */
.chart-navigation-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2) var(--ds-space-4);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  border-top: 1px solid var(--ds-border-subtle);
}

.chart-navigation-hint .hint-icon {
  color: var(--gme-red);
  font-size: 0.8rem;
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-4);
}

.chart-control-btn {
  padding: var(--ds-space-1) var(--ds-space-3);
  background: var(--ds-bg-surface);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-sm);
  color: var(--ds-text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--ds-transition-fast);
}

.chart-control-btn:hover {
  border-color: var(--ds-border-accent);
  color: var(--ds-text-primary);
}

.chart-control-btn.active {
  background: var(--gme-red);
  border-color: var(--gme-red);
  color: white;
}

.chart-control-btn.preset {
  background: var(--ds-bg-elevated);
  border: 1px solid var(--ds-border-subtle);
}

.chart-control-btn.preset:hover {
  border-color: var(--gme-red);
}

/* Era Preset Buttons */
.preset-controls {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  flex-wrap: wrap;
}

.era-presets {
  padding: var(--ds-space-2) 0;
  border-bottom: 1px solid var(--ds-border-subtle);
  margin-bottom: var(--ds-space-2);
}

.preset-label {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: var(--ds-space-1);
}

.chart-control-btn.era-btn {
  background: linear-gradient(135deg, rgba(30, 40, 60, 0.8), rgba(20, 25, 35, 0.9));
  border: 1px solid rgba(100, 120, 150, 0.3);
  color: var(--ds-text-secondary);
  font-size: 0.7rem;
  padding: var(--ds-space-1) var(--ds-space-2);
  transition: var(--ds-transition-fast);
}

.chart-control-btn.era-btn:hover {
  background: linear-gradient(135deg, rgba(40, 55, 80, 0.9), rgba(30, 35, 50, 0.95));
  border-color: var(--ds-accent-500);
  color: var(--ds-text-primary);
  box-shadow: 0 0 8px rgba(38, 198, 218, 0.2);
}

.chart-control-btn.era-btn:active,
.chart-control-btn.era-btn.active {
  background: var(--ds-accent-500);
  border-color: var(--ds-accent-500);
  color: var(--ds-bg-void);
}

/* ==========================================================================
   CUSTOM DATE RANGE CONTROLS
   ========================================================================== */

.date-range-controls {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
}

.date-range-inputs {
  display: none;
  align-items: center;
  gap: var(--ds-space-2);
  padding-left: var(--ds-space-2);
  border-left: 1px solid var(--ds-border-subtle);
  margin-left: var(--ds-space-2);
}

.date-range-inputs.visible {
  display: flex;
}

.date-input {
  padding: var(--ds-space-1) var(--ds-space-2);
  background: var(--ds-bg-deep);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-sm);
  color: var(--ds-text-primary);
  font-size: 0.75rem;
  font-family: var(--ds-font-mono);
  cursor: pointer;
  transition: var(--ds-transition-fast);
}

.date-input:hover,
.date-input:focus {
  border-color: var(--ds-border-accent);
  outline: none;
}

/* Style the date picker popup */
.date-input::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}

.date-separator {
  color: var(--ds-text-muted);
  font-size: 0.75rem;
}

.chart-control-btn.apply-btn {
  background: var(--gme-red);
  border-color: var(--gme-red);
  color: white;
}

.chart-control-btn.apply-btn:hover {
  background: var(--gme-red-light);
  border-color: var(--gme-red-light);
}

#toggle-date-range.active {
  background: var(--ds-accent-500);
  border-color: var(--ds-accent-500);
  color: var(--ds-bg-void);
}

/* ==========================================================================
   OVERLAY TOGGLES
   ========================================================================== */

.overlay-controls {
  background: rgba(0, 0, 0, 0.15);
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--ds-border-subtle);
}

.overlay-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--ds-text-secondary);
  transition: var(--ds-transition-fast);
}

.overlay-toggle input {
  accent-color: var(--gme-red);
  cursor: pointer;
}

.overlay-toggle:hover {
  color: var(--ds-text-primary);
}

.overlay-toggle input:checked + span {
  color: var(--ds-text-primary);
}

.overlay-toggle.floor-toggle input:checked + span {
  color: #00FF88;  /* Bright green for floor line */
}

/* Anomaly Legend */
.anomaly-legend {
  display: none;  /* Hidden by default, shown via JS */
  background: rgba(0, 0, 0, 0.3);
  padding: 0.4rem 1rem;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--ds-border-subtle);
}

.anomaly-legend.visible {
  display: flex;
}

.legend-title {
  color: var(--ds-text-secondary);
  font-weight: 500;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ds-text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-square {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.legend-arrow-up {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid;
  display: inline-block;
}

.legend-arrow-down {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid;
  display: inline-block;
}

/* Era Legend */
.era-legend {
  display: none;  /* Hidden by default, shown via JS */
  background: rgba(0, 0, 0, 0.25);
  padding: 0.4rem 1rem;
  gap: 1rem;
  align-items: center;
  font-size: 0.7rem;
  border-bottom: 1px solid var(--ds-border-subtle);
  flex-wrap: wrap;
}

.era-legend.visible {
  display: flex;
}

.era-legend .legend-item {
  gap: 0.3rem;
}

.era-legend .legend-color-box {
  width: 12px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
  opacity: 0.7;
}

/* Event Legend */
.event-legend {
  display: none;  /* Hidden by default, shown via JS */
  background: rgba(0, 0, 0, 0.25);
  padding: 0.4rem 1rem;
  gap: 1rem;
  align-items: center;
  font-size: 0.7rem;
  border-bottom: 1px solid var(--ds-border-subtle);
}

.event-legend.visible {
  display: flex;
}

.event-legend .legend-item {
  gap: 0.3rem;
}

.event-legend .legend-marker {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid;
  display: inline-block;
}

/* Era Backgrounds Container */
.era-backgrounds {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.era-band {
  position: absolute;
  top: 0;
  bottom: 0;
  opacity: 0.15;
  transition: opacity 0.3s ease;
}

.era-band:hover {
  opacity: 0.25;
}

.era-band-label {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Zoom Controls */
.zoom-controls {
  background: rgba(22, 29, 40, 0.8);
  padding: 4px;
  border-radius: var(--ds-radius-md);
  backdrop-filter: blur(8px);
}

.zoom-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--ds-text-secondary);
  padding: 4px 10px;
  border-radius: var(--ds-radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--ds-transition-fast);
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--ds-text-primary);
}

.zoom-btn:active {
  background: var(--gme-red);
  color: white;
}

/* Range slider for timeline navigation */
.range-slider-container {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--ds-border-subtle);
}

#timeline-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

#timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 20px;
  background: var(--gme-red);
  border-radius: var(--ds-radius-sm);
  cursor: grab;
  box-shadow: 0 2px 8px rgba(211, 19, 25, 0.4);
}

#timeline-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
}

#timeline-slider::-moz-range-thumb {
  width: 80px;
  height: 20px;
  background: var(--gme-red);
  border-radius: var(--ds-radius-sm);
  cursor: grab;
  border: none;
}

/* ==========================================================================
   EVENT CARDS (Story Mode)
   ========================================================================== */

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--ds-space-4);
}

.event-card {
  cursor: pointer;
  transition: var(--ds-transition-normal);
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ds-shadow-md), 0 0 30px var(--gme-red-glow);
}

.event-card .event-date {
  font-family: var(--ds-font-mono);
  font-size: 0.7rem;
  color: var(--gme-red);
  margin-bottom: var(--ds-space-2);
}

.event-card .event-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ds-text-primary);
  margin-bottom: var(--ds-space-2);
}

.event-card .event-description {
  font-size: 0.8rem;
  color: var(--ds-text-secondary);
  line-height: 1.5;
}

.event-category {
  display: inline-block;
  padding: var(--ds-space-1) var(--ds-space-2);
  background: rgba(211, 19, 25, 0.2);
  border-radius: var(--ds-radius-sm);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gme-red-light);
  margin-top: var(--ds-space-3);
}

/* ==========================================================================
   CORRELATION LAB
   ========================================================================== */

.correlation-controls {
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
  margin-bottom: var(--ds-space-4);
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
}

.control-label {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.control-select {
  padding: var(--ds-space-2) var(--ds-space-3);
  background: var(--ds-bg-surface);
  border: 1px solid var(--ds-border-default);
  border-radius: var(--ds-radius-md);
  color: var(--ds-text-primary);
  font-family: var(--ds-font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--ds-transition-fast);
}

.control-select:hover {
  border-color: var(--ds-border-accent);
}

.control-select:focus {
  outline: none;
  border-color: var(--gme-red);
  box-shadow: 0 0 10px var(--gme-red-glow);
}

.correlation-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ds-space-4);
  margin-top: var(--ds-space-4);
}

.corr-stat {
  text-align: center;
  padding: var(--ds-space-3);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--ds-radius-md);
}

.corr-value {
  font-family: var(--ds-font-mono);
  font-size: 1.5rem;
  font-weight: 700;
}

.corr-label {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  margin-top: var(--ds-space-1);
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.loading-skeleton {
  background: linear-gradient(90deg,
    var(--ds-bg-surface) 0%,
    var(--ds-bg-hover) 50%,
    var(--ds-bg-surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--ds-radius-sm);
}

.loading-text {
  height: 1em;
  width: 100%;
  margin: var(--ds-space-2) 0;
}

.loading-number {
  height: 2em;
  width: 60%;
}

/* ==========================================================================
   EMPTY STATES
   ========================================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--ds-space-8);
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: var(--ds-space-4);
  opacity: 0.3;
}

.empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ds-text-secondary);
  margin-bottom: var(--ds-space-2);
}

.empty-desc {
  font-size: 0.85rem;
  color: var(--ds-text-muted);
}

/* ==========================================================================
   SCROLLBAR STYLING
   ========================================================================== */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--ds-bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--ds-border-default);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gme-red);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1200px) {
  .gme-main {
    grid-template-columns: 1fr;
  }

  .gme-sidebar {
    order: 2;
  }
}

@media (max-width: 768px) {
  .gme-header {
    flex-direction: column;
    gap: var(--ds-space-3);
    padding: var(--ds-space-3);
  }

  .gme-nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .gme-price-display {
    width: 100%;
    justify-content: center;
  }

  .mission-grid {
    grid-template-columns: 1fr;
  }

  .chart-container {
    height: 300px;
  }

  /* TradingView chart responsive */
  .timeline-panel {
    height: auto;
    min-height: 500px;
  }

  .tv-chart-wrapper {
    height: auto !important;  /* Let content determine height */
    min-height: 280px;
  }

  .tv-chart-container {
    height: 220px !important;
    min-height: 180px !important;
  }

  .tv-volume-container {
    height: 60px !important;
  }

  .tv-indicator-container {
    height: 140px !important;
    min-height: 120px !important;
  }

  .business-timeline-section {
    min-height: 200px;
    margin-top: var(--ds-space-4);
  }

  .business-chart-container {
    height: 140px;
  }

  .timeline-header {
    gap: 0.5rem;
  }

  .chart-controls {
    flex-wrap: wrap;
  }

  .overlay-controls {
    gap: 0.5rem;
    font-size: 0.75rem;
  }

  .chart-navigation-hint {
    font-size: 0.65rem;
  }
}

/* ==========================================================================
   GAME INTERACTION HINTS
   ========================================================================== */

.game-hint {
  position: fixed;
  bottom: var(--ds-space-4);
  left: var(--ds-space-4);
  padding: var(--ds-space-2) var(--ds-space-4);
  background: var(--ds-bg-panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-lg);
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  z-index: var(--z-overlay);
  opacity: 0.7;
  transition: var(--ds-transition-fast);
}

.game-hint:hover {
  opacity: 1;
  border-color: var(--ds-border-accent);
}

.game-hint-icon {
  color: var(--gme-red);
  margin-right: var(--ds-space-2);
}

/* ==========================================================================
   BUSINESS FUNDAMENTALS SECTION
   ========================================================================== */

.fundamentals-section {
  margin-top: var(--ds-space-6);
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--ds-border-subtle);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-4);
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ds-text-secondary);
  margin: 0;
}

.section-title .accent {
  color: var(--gme-red);
}

.section-subtitle {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
}

/* Financial Summary Cards */
.fundamentals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-4);
}

.fundamental-card {
  text-align: center;
  padding: var(--ds-space-3);
}

.fundamental-card .panel-body {
  padding: var(--ds-space-2);
}

.fundamental-value {
  font-family: var(--ds-font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ds-text-primary);
  line-height: 1.2;
}

.fundamental-value.positive { color: var(--signal-bullish); }
.fundamental-value.negative { color: var(--signal-bearish); }

.fundamental-label {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--ds-space-1);
}

.fundamental-change {
  font-family: var(--ds-font-mono);
  font-size: 0.7rem;
  margin-top: var(--ds-space-1);
  padding: 2px 6px;
  border-radius: var(--ds-radius-sm);
  display: inline-block;
}

.fundamental-change.positive {
  color: var(--signal-bullish);
  background: rgba(0, 255, 136, 0.1);
}

.fundamental-change.negative {
  color: var(--signal-bearish);
  background: rgba(255, 68, 68, 0.1);
}

.fundamental-change.neutral {
  color: var(--ds-text-muted);
  background: rgba(120, 144, 156, 0.1);
}

/* Key Ratios Row */
.ratios-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-space-2);
  margin-bottom: var(--ds-space-4);
  padding: var(--ds-space-3);
  background: var(--ds-bg-panel);
  border-radius: var(--ds-radius-lg);
  border: 1px solid var(--ds-border-subtle);
}

.ratio-item {
  text-align: center;
  padding: var(--ds-space-2);
}

.ratio-value {
  font-family: var(--ds-font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ds-text-primary);
}

.ratio-label {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--ds-space-1);
}

.ratio-indicator {
  font-size: 0.6rem;
  margin-top: var(--ds-space-1);
  font-weight: 500;
}

.ratio-indicator.good {
  color: var(--signal-bullish);
}

.ratio-indicator.caution {
  color: var(--signal-neutral);
}

.ratio-indicator.warning {
  color: var(--signal-bearish);
}

/* Fundamentals Charts Row */
.fundamentals-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-4);
  margin-bottom: var(--ds-space-4);
}

.chart-panel {
  min-height: 250px;
}

.chart-panel .chart-container {
  padding: var(--ds-space-2) var(--ds-space-3);
}

/* Chart Reset Zoom Button */
.chart-reset-btn {
  appearance: none;
  padding: 0.25rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: var(--ds-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.chart-reset-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--ds-accent-500);
  color: var(--ds-text-primary);
}

.zoom-hint {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  font-style: italic;
}

/* Bitcoin Treasury Panel */
.bitcoin-panel {
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.1), rgba(30, 30, 50, 0.95));
  border: 1px solid rgba(247, 147, 26, 0.3);
}

.bitcoin-panel .panel-header {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
}

.btc-badge {
  font-family: var(--ds-font-mono);
  font-size: 0.75rem;
  color: #f7931a;
  background: rgba(247, 147, 26, 0.15);
  padding: 2px 8px;
  border-radius: var(--ds-radius-sm);
  border: 1px solid rgba(247, 147, 26, 0.3);
}

.bitcoin-content {
  padding: var(--ds-space-3);
}

.btc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-3);
}

.btc-stat {
  text-align: center;
}

.btc-value {
  font-family: var(--ds-font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: #f7931a;
  margin-bottom: 4px;
}

.btc-label {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btc-note {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  text-align: center;
  font-style: italic;
  padding-top: var(--ds-space-2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Bitcoin Coin Visual - Physical coin like the promo coins */
.btc-coin-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-4);
  margin-bottom: var(--ds-space-4);
  padding: var(--ds-space-3) 0;
}

.btc-coin {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f7931a 0%, #e8850f 50%, #c97208 100%);
  box-shadow:
    0 4px 15px rgba(247, 147, 26, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    0 0 0 3px #c97208,
    0 0 0 5px rgba(247, 147, 26, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: btc-pulse 3s ease-in-out infinite;
}

.btc-coin-inner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffa726 0%, #f7931a 50%, #e8850f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.3);
}

.btc-symbol {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(255, 255, 255, 0.3);
}

.btc-coin-shine {
  position: absolute;
  top: 5px;
  left: 10px;
  width: 20px;
  height: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 100%);
  border-radius: 50%;
  transform: rotate(-30deg);
}

.btc-coin-amount {
  font-family: var(--ds-font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: #f7931a;
  text-shadow: 0 0 20px rgba(247, 147, 26, 0.5);
}

@keyframes btc-pulse {
  0%, 100% {
    box-shadow:
      0 4px 15px rgba(247, 147, 26, 0.4),
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      inset 0 -2px 4px rgba(0, 0, 0, 0.2),
      0 0 0 3px #c97208,
      0 0 0 5px rgba(247, 147, 26, 0.3);
  }
  50% {
    box-shadow:
      0 4px 25px rgba(247, 147, 26, 0.6),
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      inset 0 -2px 4px rgba(0, 0, 0, 0.2),
      0 0 0 3px #c97208,
      0 0 0 8px rgba(247, 147, 26, 0.2);
  }
}

/* Institutional Holdings Panel */
/* Notable Holders Panel (Cohen, DFV) */
.notable-holders-panel {
  margin-bottom: var(--ds-space-4);
}

.notable-holders-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--ds-space-3);
  padding: var(--ds-space-3);
}

.notable-holder-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-3);
  transition: var(--ds-transition-fast);
}

.notable-holder-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--gme-red);
}

.holder-header {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  margin-bottom: var(--ds-space-2);
}

.holder-icon {
  font-size: 1.2rem;
}

.holder-name {
  font-weight: 600;
  color: var(--ds-text-primary);
  flex: 1;
}

.holder-type-badge {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.holder-type-badge.insider {
  background: rgba(149, 117, 205, 0.2);
  color: #ce93d8;
}

.holder-type-badge.individual {
  background: rgba(0, 255, 136, 0.2);
  color: #00FF88;
}

.holder-stats {
  display: flex;
  gap: var(--ds-space-4);
  margin-bottom: var(--ds-space-2);
}

.holder-stat {
  display: flex;
  flex-direction: column;
}

.holder-stat .stat-value {
  font-family: var(--ds-font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ds-text-primary);
}

.holder-stat .stat-label {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
}

.holder-notes {
  font-size: 0.7rem;
  color: var(--ds-text-secondary);
  margin-bottom: var(--ds-space-2);
  line-height: 1.4;
}

.holder-filing {
  display: flex;
  gap: var(--ds-space-2);
  font-size: 0.6rem;
  color: var(--ds-text-muted);
}

.filing-type {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
}

/* DRS Holdings Panel */
.drs-panel {
  margin-bottom: var(--ds-space-4);
}

.drs-badge {
  font-size: 0.65rem;
  background: rgba(156, 39, 176, 0.3);
  color: #ce93d8;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.drs-holdings {
  padding: var(--ds-space-3);
}

.drs-main {
  margin-bottom: var(--ds-space-3);
}

.drs-header {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  margin-bottom: var(--ds-space-2);
}

.drs-icon {
  font-size: 1.5rem;
}

.drs-title {
  font-weight: 600;
  color: var(--ds-text-primary);
}

.drs-stats {
  display: flex;
  gap: var(--ds-space-4);
  margin-bottom: var(--ds-space-2);
}

.drs-stat {
  display: flex;
  flex-direction: column;
}

.drs-stat.primary .drs-value {
  font-size: 1.5rem;
  color: #ce93d8;
}

.drs-value {
  font-family: var(--ds-font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ds-text-primary);
}

.drs-value.positive {
  color: var(--signal-bullish);
}

.drs-value.negative {
  color: var(--signal-bearish);
}

.drs-label {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
}

.drs-source {
  font-size: 0.6rem;
  color: var(--ds-text-muted);
  border-top: 1px solid var(--ds-border-subtle);
  padding-top: var(--ds-space-2);
}

.drs-history {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-3);
}

.drs-history-title {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  margin-bottom: var(--ds-space-2);
  text-transform: uppercase;
}

.drs-history-bars {
  display: flex;
  gap: var(--ds-space-2);
  align-items: flex-end;
  height: 60px;
}

.drs-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.drs-bar {
  width: 100%;
  background: linear-gradient(to top, rgba(156, 39, 176, 0.8), rgba(206, 147, 216, 0.6));
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  transition: var(--ds-transition-fast);
}

.drs-bar-container:hover .drs-bar {
  background: linear-gradient(to top, rgba(156, 39, 176, 1), rgba(206, 147, 216, 0.9));
}

.drs-bar-label {
  font-size: 0.55rem;
  color: var(--ds-text-muted);
  margin-top: 4px;
  white-space: nowrap;
}

.institutional-panel {
  margin-bottom: var(--ds-space-4);
}

.institutional-summary {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
}

.institutional-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--ds-space-4);
  padding: var(--ds-space-3) var(--ds-space-4);
}

.institutional-chart-container {
  width: 180px;
  height: 180px;
}

.institutional-table-container {
  overflow-x: auto;
}

.institutional-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.institutional-table th {
  text-align: left;
  padding: var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border-subtle);
  color: var(--ds-text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.institutional-table td {
  padding: var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border-subtle);
  color: var(--ds-text-secondary);
}

.institutional-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.institutional-table .institution-name {
  color: var(--ds-text-primary);
  font-weight: 500;
}

.institutional-table .institution-type {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  display: block;
}

.institutional-table .shares-value {
  font-family: var(--ds-font-mono);
  color: var(--ds-text-primary);
}

.institutional-table .ownership-pct {
  font-family: var(--ds-font-mono);
  color: #9575cd;  /* Purple for institutional data */
}

.institutional-table .ownership-pct .change-pct {
  font-size: 0.7rem;
  margin-left: 4px;
  opacity: 0.8;
}

.institutional-table .ownership-pct .change-pct.positive {
  color: #4caf50;
}

.institutional-table .ownership-pct .change-pct.negative {
  color: #ef5350;
}

/* Insider Activity Panel */
.insider-panel {
  margin-bottom: var(--ds-space-4);
}

.insider-summary {
  display: flex;
  gap: var(--ds-space-3);
}

.insider-stat {
  font-family: var(--ds-font-mono);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--ds-radius-sm);
}

.insider-stat.buy {
  color: var(--signal-bullish);
  background: rgba(0, 255, 136, 0.1);
}

.insider-stat.sell {
  color: var(--signal-bearish);
  background: rgba(255, 68, 68, 0.1);
}

.insider-transactions {
  padding: var(--ds-space-3) var(--ds-space-4);
  max-height: 200px;
  overflow-y: auto;
}

.insider-transaction {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  padding: var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border-subtle);
}

.insider-transaction:last-child {
  border-bottom: none;
}

.insider-transaction:hover {
  background: rgba(255, 255, 255, 0.02);
}

.insider-type-badge {
  font-family: var(--ds-font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--ds-radius-sm);
  min-width: 40px;
  text-align: center;
}

.insider-type-badge.buy {
  background: rgba(0, 255, 136, 0.15);
  color: var(--signal-bullish);
}

.insider-type-badge.sell {
  background: rgba(255, 68, 68, 0.15);
  color: var(--signal-bearish);
}

.insider-type-badge.grant {
  background: rgba(156, 39, 176, 0.15);
  color: #ce93d8;
}

.insider-info {
  flex: 1;
}

.insider-name {
  font-size: 0.8rem;
  color: var(--ds-text-primary);
  font-weight: 500;
}

.insider-title {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
}

.insider-details {
  text-align: right;
}

.insider-shares {
  font-family: var(--ds-font-mono);
  font-size: 0.8rem;
  color: var(--ds-text-primary);
}

.insider-value {
  font-family: var(--ds-font-mono);
  font-size: 0.7rem;
  color: var(--ds-text-muted);
}

.insider-date {
  font-family: var(--ds-font-mono);
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  min-width: 70px;
  text-align: right;
}

/* ==========================================================================
   RESPONSIVE - FUNDAMENTALS
   ========================================================================== */

@media (max-width: 1200px) {
  .fundamentals-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ratios-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fundamentals-charts-row {
    grid-template-columns: 1fr;
  }

  .institutional-content {
    grid-template-columns: 1fr;
  }

  .institutional-chart-container {
    margin: 0 auto;
  }
}

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

  .fundamental-value {
    font-size: 1.2rem;
  }

  .ratios-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-header {
    flex-direction: column;
    gap: var(--ds-space-1);
  }
}

/* ============================================================================
   KNOWLEDGE GRAPH EXPLORER
   ============================================================================ */

.kg-results-container {
  scrollbar-width: thin;
  scrollbar-color: var(--ds-border) transparent;
}

.kg-results-container::-webkit-scrollbar {
  width: 6px;
}

.kg-results-container::-webkit-scrollbar-track {
  background: transparent;
}

.kg-results-container::-webkit-scrollbar-thumb {
  background: var(--ds-border);
  border-radius: 3px;
}

.kg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.kg-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.kg-table th {
  background: rgba(22, 29, 40, 0.95);
  color: var(--ds-text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--ds-border);
}

.kg-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid rgba(176, 190, 197, 0.1);
  color: var(--ds-text-primary);
}

.kg-table tbody tr:hover {
  background: rgba(0, 217, 255, 0.05);
}

.kg-table .highlight-green {
  color: var(--ds-signal-green);
  font-weight: 600;
}

.kg-table .highlight-red {
  color: var(--ds-danger);
  font-weight: 600;
}

.kg-table .highlight-cyan {
  color: var(--ds-accent-primary);
  font-weight: 600;
}

.kg-table .institution-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kg-table .regime-badge,
.kg-table .type-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: capitalize;
  background: rgba(0, 217, 255, 0.1);
  color: var(--ds-accent-primary);
  border: 1px solid rgba(0, 217, 255, 0.2);
}

.kg-table .indicator-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 170, 0, 0.2);
  color: #ffaa00;
  font-weight: 600;
  font-size: 0.75rem;
}

.kg-loading,
.kg-error,
.kg-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.kg-error {
  color: var(--ds-danger);
}

/* ==========================================================================
   THE BOX - SWAP/BASKET DATA VISUALIZATION
   ========================================================================== */

.the-box-panel {
  min-height: 600px;
}

.the-box-header {
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
}

.the-box-subtitle {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
  font-weight: 400;
}

/* Ticker Selector Bar */
.ticker-selector-bar {
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
  padding: var(--ds-space-3) var(--ds-space-4);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--ds-radius-md);
  margin: var(--ds-space-4) var(--ds-space-4) var(--ds-space-2);
  flex-wrap: wrap;
}

.ticker-bar-label {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
  font-weight: 500;
}

.ticker-buttons {
  display: flex;
  gap: var(--ds-space-2);
  flex-wrap: wrap;
}

.ticker-btn {
  /* Reset browser defaults */
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  /* Styling */
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--ds-font-mono);
  letter-spacing: 0.02em;
  background: rgba(22, 29, 40, 0.8);
  border: 1px solid rgba(176, 190, 197, 0.2);
  border-radius: 6px;
  color: #b0bec5;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.ticker-btn:hover:not([disabled]):not(.active) {
  background: rgba(40, 50, 65, 0.9);
  border-color: rgba(211, 19, 25, 0.5);
  color: #f0f4f8;
  box-shadow: 0 0 8px rgba(211, 19, 25, 0.2);
}

.ticker-btn.active {
  background: rgba(211, 19, 25, 0.25);
  border-color: #D31319;
  color: #ff6b6b;
  box-shadow: 0 0 10px rgba(211, 19, 25, 0.3);
}

.ticker-btn.primary {
  background: linear-gradient(135deg, rgba(211, 19, 25, 0.4), rgba(211, 19, 25, 0.2));
  border-color: #D31319;
  color: #ffffff;
  cursor: default;
  box-shadow: 0 0 12px rgba(211, 19, 25, 0.4);
}

.ticker-btn[disabled]:not(.primary) {
  opacity: 0.5;
  cursor: not-allowed;
}

.ticker-date-range {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  margin-left: auto;
}

.ticker-date-range .date-input {
  padding: 0.3rem 0.5rem;
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-sm);
  color: var(--ds-text-secondary);
}

.ticker-date-range .date-separator {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
}

/* The Box Charts Grid */
.the-box-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-4);
  padding: var(--ds-space-4);
}

.the-box-charts-grid .chart-panel {
  background: rgba(0, 0, 0, 0.15);
}

.the-box-charts-grid .panel-header {
  padding: var(--ds-space-2) var(--ds-space-3);
  border-bottom: 1px solid var(--ds-border-subtle);
}

.box-legend {
  display: flex;
  gap: var(--ds-space-4);
  padding: var(--ds-space-2) var(--ds-space-3);
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  border-top: 1px solid var(--ds-border-subtle);
}

.box-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.box-legend .legend-color {
  width: 12px;
  height: 3px;
  border-radius: 1px;
}

/* Mini Charts Section */
.mini-charts-header {
  padding: var(--ds-space-2) var(--ds-space-4);
  border-top: 1px solid var(--ds-border-subtle);
  margin-top: var(--ds-space-2);
}

.mini-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--ds-space-3);
  padding: 0 var(--ds-space-4) var(--ds-space-4);
}

.mini-chart-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-3);
  transition: var(--ds-transition-fast);
}

.mini-chart-card:hover {
  border-color: var(--ds-border-accent);
  background: rgba(0, 0, 0, 0.3);
}

.mini-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--ds-space-2);
}

.mini-ticker {
  font-family: var(--ds-font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ds-text-primary);
}

.mini-ticker.primary {
  color: var(--gme-red);
}

.mini-correlation {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: var(--ds-radius-sm);
}

.mini-sparkline {
  height: 40px;
  margin: var(--ds-space-2) 0;
}

.mini-sparkline canvas {
  width: 100% !important;
  height: 100% !important;
}

.mini-stats {
  display: flex;
  justify-content: space-between;
  gap: var(--ds-space-2);
}

.mini-stat {
  text-align: center;
}

.mini-stat-label {
  display: block;
  font-size: 0.6rem;
  color: var(--ds-text-muted);
  margin-bottom: 0.15rem;
}

.mini-stat-value {
  font-family: var(--ds-font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ds-text-secondary);
}

.mini-stat-value.positive {
  color: var(--signal-bullish);
}

.mini-stat-value.negative {
  color: var(--signal-bearish);
}

.mini-chart-skeleton {
  height: 120px;
  border-radius: var(--ds-radius-md);
}

/* The Box Stats Panel */
.the-box-stats-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ds-space-4);
  padding: var(--ds-space-4);
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--ds-border-subtle);
  margin-top: var(--ds-space-2);
}

.box-stat {
  text-align: center;
  padding: var(--ds-space-3);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--ds-radius-md);
  border: 1px solid var(--ds-border-subtle);
}

.box-stat-value {
  font-family: var(--ds-font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ds-text-primary);
  margin-bottom: var(--ds-space-1);
}

.box-stat-label {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
}

/* Signal Value Warning State */
.signal-value.warning {
  color: var(--signal-neutral);
}

/* Responsive: The Box */
@media (max-width: 1024px) {
  .the-box-charts-grid {
    grid-template-columns: 1fr;
  }

  .mini-charts-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .the-box-stats-panel {
    grid-template-columns: 1fr;
  }

  .ticker-selector-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticker-date-range {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .mini-charts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   CARRY TRADE VIEW
   ========================================================================== */

.carry-trade-panel {
  padding-bottom: var(--ds-space-4);
}

.carry-trade-subtitle {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
  margin-left: var(--ds-space-4);
}

/* Status Cards Grid */
.carry-trade-status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-space-4);
  padding: var(--ds-space-4);
}

.carry-status-card {
  background: var(--ds-bg-elevated);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-4);
  text-align: center;
  border: 1px solid var(--ds-border-subtle);
}

.carry-status-card.thesis {
  background: linear-gradient(135deg, rgba(211, 19, 25, 0.1) 0%, rgba(38, 198, 218, 0.1) 100%);
  border-color: var(--ds-border-accent);
}

.carry-status-label {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--ds-space-2);
}

.carry-status-value {
  font-family: var(--ds-font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ds-text-primary);
}

.carry-status-regime {
  font-size: 0.75rem;
  font-weight: 600;
  padding: var(--ds-space-1) var(--ds-space-2);
  border-radius: var(--ds-radius-sm);
  margin-top: var(--ds-space-2);
  display: inline-block;
}

.carry-status-regime.bullish {
  background: rgba(0, 255, 136, 0.2);
  color: var(--signal-bullish);
}

.carry-status-regime.bearish {
  background: rgba(255, 68, 68, 0.2);
  color: var(--signal-bearish);
}

.carry-status-regime.neutral {
  background: rgba(255, 170, 0, 0.2);
  color: var(--signal-neutral);
}

.carry-status-direction {
  font-size: 0.75rem;
  margin-top: var(--ds-space-2);
}

.carry-status-direction.rising {
  color: #ff5722;
}

.carry-status-direction.falling {
  color: #4caf50;
}

.carry-status-date {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  margin-top: var(--ds-space-2);
}

.carry-thesis-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ds-space-1);
}

.thesis-icon {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.thesis-icon.bullish {
  color: var(--signal-bullish);
}

.thesis-icon.bearish {
  color: var(--signal-bearish);
}

.thesis-icon.neutral {
  color: var(--signal-neutral);
}

.thesis-text {
  font-size: 0.75rem;
  color: var(--ds-text-secondary);
}

/* Carry Controls */
.carry-controls {
  display: flex;
  justify-content: center;
  padding: var(--ds-space-3);
  border-bottom: 1px solid var(--ds-border-subtle);
}

/* Charts Grid */
.carry-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--ds-space-4);
  padding: var(--ds-space-4);
}

.carry-legend {
  padding: var(--ds-space-2) var(--ds-space-4);
  font-size: 0.7rem;
}

/* BOJ Timeline */
.boj-timeline-panel {
  margin: var(--ds-space-4);
  margin-top: 0;
}

.boj-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
  padding: var(--ds-space-4);
  max-height: 300px;
  overflow-y: auto;
}

.boj-decision-card {
  background: var(--ds-bg-elevated);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-3);
  min-width: 200px;
  flex: 1;
  max-width: 280px;
  border-left: 3px solid var(--ds-border-default);
}

.boj-decision-card.hike {
  border-left-color: #ff5722;
}

.boj-decision-card.cut {
  border-left-color: #4caf50;
}

.boj-decision-card.hold {
  border-left-color: #9e9e9e;
}

.boj-date {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
  margin-bottom: var(--ds-space-2);
}

.boj-rate {
  font-family: var(--ds-font-mono);
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  font-size: 0.9rem;
}

.rate-before {
  color: var(--ds-text-secondary);
}

.rate-arrow {
  color: var(--ds-text-muted);
}

.rate-after {
  color: var(--ds-text-primary);
  font-weight: 600;
}

.boj-change {
  font-family: var(--ds-font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: var(--ds-space-2);
}

.boj-change.hike {
  color: #ff5722;
}

.boj-change.cut {
  color: #4caf50;
}

.boj-change.hold {
  color: #9e9e9e;
}

.boj-summary {
  font-size: 0.7rem;
  color: var(--ds-text-secondary);
  margin-top: var(--ds-space-2);
  line-height: 1.4;
}

.boj-reaction {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  margin-top: var(--ds-space-1);
  font-style: italic;
}

/* Thesis Explanation */
.carry-thesis-explanation {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--ds-space-4);
  padding: var(--ds-space-4);
}

.thesis-box {
  background: var(--ds-bg-elevated);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-4);
  border-left: 4px solid;
}

.thesis-box.bullish {
  border-left-color: var(--signal-bullish);
}

.thesis-box.bearish {
  border-left-color: var(--signal-neutral);
}

.thesis-title {
  font-weight: 600;
  color: var(--ds-text-primary);
  margin-bottom: var(--ds-space-2);
}

.thesis-desc {
  font-size: 0.8rem;
  color: var(--ds-text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   DFV MEMES VIEW
   ========================================================================== */

.dfv-memes-panel {
  padding-bottom: var(--ds-space-4);
}

.dfv-memes-subtitle {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
  margin-left: var(--ds-space-4);
}

/* Stats Grid */
.dfv-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-space-4);
  padding: var(--ds-space-4);
}

.dfv-stat-card {
  background: var(--ds-bg-elevated);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-3);
  text-align: center;
  border: 1px solid var(--ds-border-subtle);
}

.dfv-stat-value {
  font-family: var(--ds-font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gme-red);
}

.dfv-stat-label {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--ds-space-1);
}

/* Era Navigation */
.dfv-era-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  padding: var(--ds-space-3) var(--ds-space-4);
  border-bottom: 1px solid var(--ds-border-subtle);
  background: rgba(0, 0, 0, 0.15);
}

.era-btn {
  appearance: none;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--ds-font-mono);
  background: rgba(22, 29, 40, 0.6);
  border: 1px solid rgba(176, 190, 197, 0.2);
  border-radius: 6px;
  color: var(--ds-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.era-btn:hover {
  border-color: rgba(211, 19, 25, 0.5);
  color: var(--ds-text-primary);
}

.era-btn.active {
  background: rgba(211, 19, 25, 0.2);
  border-color: var(--gme-red);
  color: var(--gme-red-light);
  box-shadow: 0 0 10px rgba(211, 19, 25, 0.3);
}

/* Filter Controls */
.dfv-controls {
  display: flex;
  gap: var(--ds-space-4);
  padding: var(--ds-space-3) var(--ds-space-4);
  border-bottom: 1px solid var(--ds-border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

/* Memes Timeline */
.dfv-memes-timeline {
  padding: var(--ds-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
  max-height: 600px;
  overflow-y: auto;
}

/* Meme Card */
.dfv-meme-card {
  background: var(--ds-bg-elevated);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-border-subtle);
  cursor: pointer;
  transition: var(--ds-transition-fast);
}

.dfv-meme-card:hover {
  border-color: var(--gme-red);
  box-shadow: 0 0 15px rgba(211, 19, 25, 0.2);
  transform: translateY(-2px);
}

.dfv-meme-card.compact {
  padding: var(--ds-space-3);
}

.meme-header {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-2);
}

.meme-date {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
}

.meme-platform {
  font-size: 0.7rem;
  color: var(--ds-accent-500);
  padding: 2px 6px;
  background: rgba(38, 198, 218, 0.1);
  border-radius: var(--ds-radius-sm);
}

.meme-significance {
  font-family: var(--ds-font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-left: auto;
}

.meme-significance.high {
  background: rgba(255, 68, 68, 0.3);
  color: #ff4444;
}

.meme-significance.medium {
  background: rgba(255, 170, 0, 0.3);
  color: #ffaa00;
}

.meme-significance.low {
  background: rgba(158, 158, 158, 0.3);
  color: #9e9e9e;
}

.meme-title {
  font-weight: 600;
  color: var(--ds-text-primary);
  font-size: 1rem;
  margin-bottom: var(--ds-space-2);
}

.meme-description {
  font-size: 0.85rem;
  color: var(--ds-text-secondary);
  line-height: 1.5;
  margin-bottom: var(--ds-space-3);
}

.meme-footer {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  font-size: 0.75rem;
}

.meme-price {
  font-family: var(--ds-font-mono);
  color: var(--ds-text-muted);
}

.meme-price-change {
  font-family: var(--ds-font-mono);
  font-weight: 600;
}

.meme-price-change.positive {
  color: var(--signal-bullish);
}

.meme-price-change.negative {
  color: var(--signal-bearish);
}

.meme-price-change.neutral {
  color: var(--signal-neutral);
}

.meme-series {
  font-size: 0.7rem;
  color: var(--ds-accent-500);
  margin-left: auto;
}

.meme-interpretation {
  font-size: 0.8rem;
  color: var(--ds-text-secondary);
  background: rgba(0, 0, 0, 0.2);
  padding: var(--ds-space-3);
  border-radius: var(--ds-radius-sm);
  margin-top: var(--ds-space-3);
  border-left: 3px solid var(--gme-red);
  line-height: 1.5;
}

.meme-expand-hint {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  text-align: center;
  margin-top: var(--ds-space-2);
  opacity: 0;
  transition: opacity 0.2s;
}

.dfv-meme-card:hover .meme-expand-hint {
  opacity: 1;
}

/* Series Group */
.dfv-series-group {
  background: var(--ds-bg-panel);
  border-radius: var(--ds-radius-lg);
  border: 1px solid var(--ds-border-default);
  overflow: hidden;
}

.dfv-series-group.movie-era {
  border-color: var(--gme-red);
  box-shadow: 0 0 20px rgba(211, 19, 25, 0.2);
}

.dfv-series-group.standalone {
  border-color: var(--ds-border-subtle);
  opacity: 0.9;
}

.dfv-series-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-4);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background 0.2s;
}

.dfv-series-header:hover {
  background: rgba(0, 0, 0, 0.3);
}

.series-name {
  font-weight: 600;
  color: var(--gme-red);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
}

.series-toggle {
  font-size: 0.8rem;
  transition: transform 0.3s;
}

.dfv-series-group.collapsed .series-toggle {
  transform: rotate(-90deg);
}

.series-count {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
}

.series-date-range {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  font-family: var(--ds-font-mono);
  margin-left: var(--ds-space-2);
}

.dfv-series-memes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--ds-space-3);
  padding: var(--ds-space-4);
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
}

.dfv-series-group.collapsed .dfv-series-memes {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Meme Detail Panel */
.dfv-meme-detail {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  background: var(--ds-bg-panel);
  border-radius: var(--ds-radius-lg);
  border: 1px solid var(--ds-border-accent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  z-index: var(--z-modal);
  overflow: hidden;
}

.dfv-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-4);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--ds-border-subtle);
}

.dfv-detail-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ds-text-primary);
}

.dfv-detail-close {
  background: none;
  border: none;
  color: var(--ds-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.dfv-detail-close:hover {
  color: var(--gme-red);
}

.dfv-detail-body {
  padding: var(--ds-space-4);
  overflow-y: auto;
  max-height: calc(85vh - 60px);
}

.meme-detail-content {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
}

.meme-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
  font-size: 0.85rem;
  color: var(--ds-text-secondary);
}

.meme-detail-description {
  font-size: 0.95rem;
  color: var(--ds-text-primary);
  line-height: 1.6;
  padding: var(--ds-space-3);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--ds-radius-md);
}

.meme-detail-themes {
  font-size: 0.85rem;
  color: var(--ds-text-secondary);
}

.meme-detail-interpretation,
.meme-detail-market-context {
  background: var(--ds-bg-elevated);
  padding: var(--ds-space-4);
  border-radius: var(--ds-radius-md);
}

.meme-detail-interpretation h4,
.meme-detail-market-context h4,
.meme-analysis-section h4,
.meme-price-context h4,
.meme-series-nav h4 {
  color: var(--gme-red);
  font-size: 0.9rem;
  margin-bottom: var(--ds-space-2);
}

.meme-analysis-section {
  background: var(--ds-bg-surface);
  padding: var(--ds-space-4);
  border-radius: var(--ds-radius-md);
}

.analysis-item {
  padding: var(--ds-space-3);
  border-bottom: 1px solid var(--ds-border-subtle);
}

.analysis-item:last-child {
  border-bottom: none;
}

.analysis-section-title {
  font-weight: 600;
  color: var(--ds-accent-500);
  margin-bottom: var(--ds-space-2);
}

.analysis-scene {
  font-size: 0.85rem;
  color: var(--ds-text-secondary);
  margin-bottom: var(--ds-space-2);
}

.analysis-meaning,
.analysis-market {
  font-size: 0.85rem;
  color: var(--ds-text-primary);
  margin-bottom: var(--ds-space-1);
}

.analysis-confidence {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--ds-radius-sm);
}

.meme-price-context {
  background: var(--ds-bg-elevated);
  padding: var(--ds-space-4);
  border-radius: var(--ds-radius-md);
}

.price-context-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}

.price-context-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--ds-space-2);
  background: var(--ds-bg-surface);
  border-radius: var(--ds-radius-sm);
  min-width: 80px;
}

.price-context-day.post-day {
  background: rgba(211, 19, 25, 0.2);
  border: 1px solid var(--gme-red);
}

.context-date {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
}

.context-price {
  font-family: var(--ds-font-mono);
  font-size: 0.85rem;
  color: var(--ds-text-primary);
}

.meme-series-nav {
  background: var(--ds-bg-elevated);
  padding: var(--ds-space-4);
  border-radius: var(--ds-radius-md);
}

.series-nav-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}

.series-nav-btn {
  padding: var(--ds-space-2) var(--ds-space-3);
  background: var(--ds-bg-surface);
  border: 1px solid var(--ds-border-default);
  border-radius: var(--ds-radius-sm);
  color: var(--ds-text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--ds-transition-fast);
}

.series-nav-btn:hover {
  border-color: var(--gme-red);
  color: var(--ds-text-primary);
}

/* Responsive: Carry Trade */
@media (max-width: 1024px) {
  .carry-trade-status-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .carry-charts-grid {
    grid-template-columns: 1fr;
  }

  .carry-thesis-explanation {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .carry-trade-status-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive: DFV Memes */
@media (max-width: 1024px) {
  .dfv-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dfv-controls {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .dfv-stats-grid {
    grid-template-columns: 1fr;
  }

  .dfv-meme-detail {
    width: 95%;
  }

  .dfv-series-memes {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   BAY WATCH TAB (EBAY tracking - hostile takeover saga)
   - Tab label uses eBay logo's classic 4-color treatment letter-by-letter:
     Red #E53238, Blue #0064D2, Yellow #F5AF02, Green #86B817
   - "Bay" portion mirrors eBay's blue-yellow-green sequence as a logo riff.
   - Chart content matches the rest of the dashboard's dark visual language.
   ========================================================================== */

/* Multi-color letters for the "Bay Watch" tab label and panel header */
.bw-b  { color: #0064D2; }   /* B - blue */
.bw-a1 { color: #F5AF02; }   /* a - yellow */
.bw-y  { color: #86B817; }   /* y - green */
.bw-w  { color: #E53238; }   /* W - red */
.bw-a2 { color: #0064D2; }   /* a - blue */
.bw-t  { color: #F5AF02; }   /* t - yellow */
.bw-c  { color: #86B817; }   /* c - green */
.bw-h  { color: #E53238; }   /* h - red */

/* Make the nav button display the multi-color text in a bold sans-serif,
   similar weight to the actual eBay logo. */
.nav-btn.bay-watch-nav {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  font-style: italic; /* eBay logo is italic-leaning */
  padding: var(--ds-space-2) var(--ds-space-3);
}

/* Hover/active should NOT recolor the letters (preserves brand colors).
   We just shift the background, not the foreground. */
.nav-btn.bay-watch-nav:hover {
  background: var(--ds-bg-hover);
}
.nav-btn.bay-watch-nav.active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px var(--ds-border-default), 0 0 12px rgba(0, 100, 210, 0.25);
  color: inherit; /* override the default white-on-red */
}
.nav-btn.bay-watch-nav .bw-space {
  display: inline-block;
  width: 0.25em;
}

/* Panel title in the view itself also uses the multi-color treatment */
.bay-watch-panel .panel-title {
  font-weight: 800;
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.bay-watch-subtitle {
  font-size: 0.75rem;
  color: var(--ds-text-muted);
  margin-left: auto;
  padding-right: var(--ds-space-3);
}

/* Headline strip */
.bay-watch-headline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-space-3);
  padding: var(--ds-space-3);
  border-bottom: 1px solid var(--ds-border-subtle);
}

.bw-stat {
  background: var(--ds-bg-elevated);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-3);
  text-align: center;
}

.bw-stat-label {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.bw-stat-value {
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ds-text-primary);
}

.bw-stat-change {
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.25rem;
}
.bw-stat-change.positive { color: #00FF88; }
.bw-stat-change.negative { color: #FF4444; }
.bw-stat-change.neutral  { color: var(--ds-text-muted); }

.bw-stat-context {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  margin-top: 0.25rem;
}

/* 2-column charts grid - reuses the "the-box-charts-grid" feel */
.bay-watch-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-3);
  padding: var(--ds-space-3);
}

.bay-watch-chart-subtitle {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  margin-left: auto;
}

.bay-watch-chart-subtitle.bw-saga {
  font-style: italic;
  color: rgba(245, 175, 2, 0.85);
  margin-left: 0.4rem;
}

/* ------------------------------------------------------------------
   Subtle eBay-color accents on Bay Watch panel headers.
   Each panel gets a thin colored left-border, rotating through the
   eBay palette: blue (#0064D2) -> yellow (#F5AF02) -> green (#86B817) -> red (#E53238).
   ------------------------------------------------------------------ */
.bay-watch-panel .chart-panel { position: relative; }
.bay-watch-panel .chart-panel.bw-accent-blue   { border-left: 2px solid rgba(0, 100, 210, 0.55); }
.bay-watch-panel .chart-panel.bw-accent-yellow { border-left: 2px solid rgba(245, 175, 2, 0.55); }
.bay-watch-panel .chart-panel.bw-accent-green  { border-left: 2px solid rgba(134, 184, 23, 0.55); }
.bay-watch-panel .chart-panel.bw-accent-red    { border-left: 2px solid rgba(229, 50, 56, 0.55); }

.bay-watch-panel .chart-panel.bw-accent-blue   > .panel-header { border-bottom: 1px solid rgba(0, 100, 210, 0.28); }
.bay-watch-panel .chart-panel.bw-accent-yellow > .panel-header { border-bottom: 1px solid rgba(245, 175, 2, 0.28); }
.bay-watch-panel .chart-panel.bw-accent-green  > .panel-header { border-bottom: 1px solid rgba(134, 184, 23, 0.28); }
.bay-watch-panel .chart-panel.bw-accent-red    > .panel-header { border-bottom: 1px solid rgba(229, 50, 56, 0.28); }

/* TradingView-style chart containers used in Bay Watch */
.bw-tv-chart {
  position: relative;
  width: 100%;
  height: 300px;
  margin: 0;
}
.bw-tv-chart.bw-tv-tall { height: 340px; }
.bw-tv-chart.bw-tv-short { height: 220px; }

/* Toolbar above each LightweightCharts panel */
.bw-chart-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem var(--ds-space-3);
  border-bottom: 1px solid var(--ds-border-subtle);
  flex-wrap: wrap;
}

.bw-toolbar-btn {
  background: var(--ds-bg-elevated);
  border: 1px solid var(--ds-border-subtle);
  color: var(--ds-text-secondary);
  padding: 0.25rem 0.6rem;
  border-radius: var(--ds-radius-sm);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.bw-toolbar-btn:hover {
  background: var(--ds-bg-hover);
  color: var(--ds-text-primary);
}
.bw-toolbar-btn.active {
  background: rgba(0, 100, 210, 0.18);
  border-color: rgba(0, 100, 210, 0.5);
  color: #4d9fea;
}

/* GME overlay toggle gets eBay yellow accent when active */
.bw-overlay-toggle {
  background: var(--ds-bg-elevated);
  border: 1px solid rgba(245, 175, 2, 0.4);
  color: rgba(245, 175, 2, 0.9);
  padding: 0.25rem 0.65rem;
  border-radius: var(--ds-radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  margin-left: auto;
}
.bw-overlay-toggle:hover {
  background: rgba(245, 175, 2, 0.12);
}
.bw-overlay-toggle.active {
  background: rgba(245, 175, 2, 0.22);
  border-color: rgba(245, 175, 2, 0.7);
  color: #F5AF02;
  box-shadow: 0 0 8px rgba(245, 175, 2, 0.18);
}

/* Filings / Holders / Events lists */
.bay-watch-filings,
.bay-watch-holders,
.bay-watch-events,
.bay-watch-insider-list {
  max-height: 360px;
  overflow-y: auto;
  padding: var(--ds-space-3);
}

.bw-row {
  display: grid;
  grid-template-columns: 90px 90px 1fr;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border-subtle);
  font-size: 0.8rem;
  align-items: baseline;
}
.bw-row:last-child { border-bottom: none; }

.bw-row .bw-row-date {
  color: var(--ds-text-muted);
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
}

.bw-row .bw-row-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: var(--ds-radius-sm);
  background: rgba(0, 100, 210, 0.18);
  border: 1px solid rgba(0, 100, 210, 0.4);
  color: #4d9fea;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
}

.bw-row .bw-row-text {
  color: var(--ds-text-secondary);
}

/* -------------------------------------------------------------
   Rich filing rows (new Task C layout)
   ------------------------------------------------------------- */
.bw-filing-card {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  grid-template-areas:
    "date    head    edgar"
    "date    summary edgar"
    "date    filer   edgar";
  column-gap: var(--ds-space-3);
  row-gap: 0.15rem;
  padding: var(--ds-space-2) var(--ds-space-3);
  border-bottom: 1px solid var(--ds-border-subtle);
  align-items: center;
  transition: background 0.12s ease;
}
.bw-filing-card:last-child { border-bottom: none; }
.bw-filing-card:hover { background: rgba(0, 100, 210, 0.05); }

.bw-filing-card.bw-takeover {
  border-left: 3px solid rgba(229, 50, 56, 0.7);
  background: linear-gradient(90deg, rgba(229, 50, 56, 0.06), transparent 50%);
}

.bw-filing-date {
  grid-area: date;
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  font-weight: 600;
  color: #86B817;
}

.bw-filing-head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bw-filing-tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: var(--ds-radius-sm);
  background: rgba(0, 100, 210, 0.18);
  border: 1px solid rgba(0, 100, 210, 0.4);
  color: #4d9fea;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.bw-filing-tag.bw-tag-takeover {
  background: rgba(229, 50, 56, 0.18);
  border-color: rgba(229, 50, 56, 0.5);
  color: #ff6b6b;
}
.bw-takeover-star {
  color: #F5AF02;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bw-filing-summary {
  grid-area: summary;
  color: var(--ds-text-primary);
  font-size: 0.82rem;
  line-height: 1.35;
}

.bw-filing-filer {
  grid-area: filer;
  color: var(--ds-text-muted);
  font-size: 0.72rem;
  font-style: italic;
}

.bw-filing-edgar {
  grid-area: edgar;
  align-self: center;
}
.bw-filing-edgar a {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: var(--ds-radius-sm);
  background: rgba(134, 184, 23, 0.12);
  border: 1px solid rgba(134, 184, 23, 0.4);
  color: #a8d44a;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.bw-filing-edgar a:hover {
  background: rgba(134, 184, 23, 0.2);
  color: #c2e070;
}

/* -------------------------------------------------------------
   Institutional holders - parent grouping with expandable funds (Task D)
   ------------------------------------------------------------- */
.bw-holder-group {
  border-bottom: 1px solid var(--ds-border-subtle);
}
.bw-holder-group:last-child { border-bottom: none; }

.bw-holder-parent {
  display: grid;
  grid-template-columns: 16px 1fr auto auto;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2) var(--ds-space-3);
  cursor: pointer;
  user-select: none;
  align-items: center;
  transition: background 0.12s ease;
}
.bw-holder-parent:hover { background: rgba(0, 100, 210, 0.05); }
.bw-holder-parent.expanded { background: rgba(0, 100, 210, 0.06); }

.bw-holder-caret {
  color: var(--ds-text-muted);
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}
.bw-holder-parent.expanded .bw-holder-caret {
  transform: rotate(90deg);
  color: #4d9fea;
}

.bw-holder-parent-name {
  color: var(--ds-text-primary);
  font-weight: 600;
  font-size: 0.85rem;
}
.bw-holder-fund-count {
  color: #4d9fea;
  font-weight: 500;
  font-size: 0.72rem;
  margin-left: 0.35rem;
}

.bw-holder-shares {
  color: var(--ds-text-secondary);
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
  font-size: 0.78rem;
}
.bw-holder-mv {
  color: var(--ds-text-muted);
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
}

.bw-holder-funds {
  display: none;
  padding: 0 var(--ds-space-3) var(--ds-space-2) calc(var(--ds-space-3) + 1rem);
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px dashed var(--ds-border-subtle);
}
.bw-holder-group.expanded .bw-holder-funds {
  display: block;
  animation: bwFundsSlide 0.18s ease-out;
}
@keyframes bwFundsSlide {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bw-holder-fund-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--ds-space-2);
  padding: 0.3rem 0;
  border-bottom: 1px dotted var(--ds-border-subtle);
  font-size: 0.76rem;
  align-items: baseline;
}
.bw-holder-fund-row:last-child { border-bottom: none; }
.bw-holder-fund-name { color: var(--ds-text-secondary); }
.bw-holder-fund-shares {
  color: var(--ds-text-muted);
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
}
.bw-holder-fund-date {
  color: var(--ds-text-muted);
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
  font-size: 0.68rem;
}

/* -------------------------------------------------------------
   Insider Behavior panel (Task E)
   ------------------------------------------------------------- */
.bw-insider-summary {
  display: flex;
  gap: var(--ds-space-3);
  padding: var(--ds-space-2) var(--ds-space-3);
  border-bottom: 1px solid var(--ds-border-subtle);
  flex-wrap: wrap;
  font-size: 0.78rem;
}
.bw-insider-stat {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
}
.bw-insider-stat-label {
  color: var(--ds-text-muted);
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}
.bw-insider-stat-value {
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
  font-weight: 600;
  color: var(--ds-text-primary);
}
.bw-insider-stat-value.buy  { color: #00FF88; }
.bw-insider-stat-value.sell { color: #FF4444; }

.bw-insider-tx-row {
  display: grid;
  grid-template-columns: 80px 1.2fr 80px 1fr 1fr;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border-subtle);
  font-size: 0.78rem;
  align-items: center;
}
.bw-insider-tx-row:last-child { border-bottom: none; }
.bw-insider-tx-row.buy  { border-left: 3px solid rgba(0, 255, 136, 0.55); }
.bw-insider-tx-row.sell { border-left: 3px solid rgba(255, 68, 68, 0.55); }
.bw-insider-tx-date {
  color: var(--ds-text-muted);
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
}
.bw-insider-tx-name {
  color: var(--ds-text-primary);
  font-weight: 600;
}
.bw-insider-tx-title {
  color: var(--ds-text-muted);
  font-size: 0.68rem;
  font-style: italic;
  display: block;
}
.bw-insider-tx-type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.bw-insider-tx-type.buy  { color: #00FF88; }
.bw-insider-tx-type.sell { color: #FF4444; }
.bw-insider-tx-shares,
.bw-insider-tx-value {
  font-family: var(--ds-font-mono, 'JetBrains Mono', monospace);
  text-align: right;
  color: var(--ds-text-secondary);
}

/* -------------------------------------------------------------
   Financials Trends panel (Task F)
   ------------------------------------------------------------- */
.bw-financials-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem var(--ds-space-3);
  border-bottom: 1px solid var(--ds-border-subtle);
  flex-wrap: wrap;
}
.bw-fin-tab {
  background: var(--ds-bg-elevated);
  border: 1px solid var(--ds-border-subtle);
  color: var(--ds-text-secondary);
  padding: 0.3rem 0.7rem;
  border-radius: var(--ds-radius-sm);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.bw-fin-tab:hover { background: var(--ds-bg-hover); }
.bw-fin-tab.active {
  background: rgba(134, 184, 23, 0.16);
  border-color: rgba(134, 184, 23, 0.5);
  color: #a8d44a;
}

.bw-fin-pane { display: none; }
.bw-fin-pane.active { display: block; }

.bw-fin-warning {
  margin: var(--ds-space-3) var(--ds-space-3) 0 var(--ds-space-3);
  padding: 0.5rem 0.75rem;
  border-radius: var(--ds-radius-sm);
  background: rgba(245, 175, 2, 0.1);
  border: 1px solid rgba(245, 175, 2, 0.35);
  border-left: 3px solid #F5AF02;
  color: #F5AF02;
  font-size: 0.74rem;
}

/* Empty-state messaging while data isn't wired up yet */
.bay-watch-empty {
  padding: var(--ds-space-3);
  color: var(--ds-text-muted);
  font-size: 0.8rem;
  background: var(--ds-bg-elevated);
  border: 1px dashed var(--ds-border-subtle);
  border-radius: var(--ds-radius-md);
}

.bay-watch-empty code {
  background: rgba(0, 100, 210, 0.15);
  border: 1px solid rgba(0, 100, 210, 0.3);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  font-size: 0.75rem;
  color: #4d9fea;
}

@media (max-width: 1100px) {
  .bay-watch-charts-grid { grid-template-columns: 1fr; }
  .bay-watch-headline { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   PUBLIC LAUNCH ADDITIONS (2026-10)
   Insider badge codes, DRS bars, balance sheet legend, freshness chips,
   price kill-switch notices, TradingView panel, footer, data-sources dialog,
   HODL Bot. Uses the existing --ds-* / --signal-* tokens.
   ========================================================================== */

/* ---- Insider transaction codes ---- */
.insider-type-badge.tax {
  background: rgba(255, 193, 7, 0.14);
  color: var(--ds-warning-base);
}
.insider-type-badge.other {
  background: rgba(120, 144, 156, 0.18);
  color: var(--ds-text-secondary);
}
.bw-insider-tx-type.grant { color: #ce93d8; }
.bw-insider-tx-type.tax   { color: var(--ds-warning-base); }
.bw-insider-tx-type.other { color: var(--ds-text-secondary); }

/* ---- DRS history bars ---- */
.drs-history-bars { height: 104px; }
.drs-bar-container { justify-content: flex-end; min-width: 0; }
.drs-bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.drs-bar-value {
  font-family: var(--ds-font-mono);
  font-size: 0.55rem;
  color: var(--ds-text-secondary);
  margin-bottom: 2px;
  white-space: nowrap;
}
.drs-bar-label { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---- Balance sheet composition ---- */
.balance-asof {
  font-size: 0.65rem;
  color: var(--ds-text-muted);
  padding: var(--ds-space-2) var(--ds-space-4) 0;
}
.balance-legend { padding: 0 var(--ds-space-4) var(--ds-space-3); }
.balance-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-2) var(--ds-space-4);
}
.balance-legend-title {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ds-text-secondary);
  border-bottom: 1px solid var(--ds-border-subtle);
  padding-bottom: 2px;
  margin-bottom: 2px;
}
.balance-legend-title span { font-family: var(--ds-font-mono); color: var(--ds-text-primary); }
.balance-legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 6px;
  align-items: center;
  font-size: 0.68rem;
  color: var(--ds-text-secondary);
  padding: 1px 0;
}
.balance-swatch { width: 10px; height: 10px; border-radius: 2px; }
.balance-legend-value { font-family: var(--ds-font-mono); color: var(--ds-text-primary); }
.balance-note-mark { color: var(--ds-warning-base); margin-left: 2px; }
.balance-note {
  margin-top: var(--ds-space-2);
  font-size: 0.6rem;
  line-height: 1.4;
  color: var(--ds-text-muted);
}
@media (max-width: 480px) {
  .balance-legend-grid { grid-template-columns: 1fr; }
}

/* ---- Correlation Lab hint ---- */
.corr-hint {
  font-size: 0.7rem;
  color: var(--ds-text-muted);
  margin: calc(-1 * var(--ds-space-2)) 0 var(--ds-space-3);
}
.corr-hint.warn { color: var(--ds-warning-base); }
.control-select option:disabled { color: var(--ds-text-muted); }

/* ---- Freshness chips ---- */
.panel-header:has(.panel-header-meta),
.section-header:has(.panel-header-meta) {
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}
.panel-header:has(.panel-header-meta) { justify-content: flex-start; }
.panel-header-meta { margin-left: auto; display: inline-flex; }
.panel-header-meta:empty { display: none; }
.panel-header-meta:empty + * { margin-left: auto; }
.stat-asof { margin-top: var(--ds-space-2); min-height: 1px; }

.fresh-chip {
  font-family: var(--ds-font-mono);
  font-size: 0.6rem;
  line-height: 1.2;
  letter-spacing: 0.3px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--ds-border-default);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ds-text-muted);
  white-space: nowrap;
  cursor: pointer;
  text-transform: none;
}
.fresh-chip:hover,
.fresh-chip:focus-visible { color: var(--ds-text-secondary); border-color: var(--ds-text-muted); outline: none; }
.fresh-chip:focus-visible { box-shadow: 0 0 0 2px var(--ds-accent-glow); }
.fresh-chip.ok { color: var(--ds-text-muted); }
.fresh-chip.stale {
  color: var(--ds-warning-base);
  border-color: rgba(255, 193, 7, 0.55);
  background: rgba(255, 193, 7, 0.1);
}
.fresh-chip.empty { color: var(--signal-bearish); border-color: rgba(255, 68, 68, 0.45); }
/* Provider switched off for licensing reasons: frozen, not failing */
.fresh-chip.disabled {
  color: var(--ds-text-secondary);
  border-color: var(--ds-border-default);
  border-style: dashed;
  background: transparent;
}
.fresh-chip.static { cursor: default; }
.price-change.frozen { color: var(--ds-text-muted); font-size: 0.75em; }

/* ---- Price kill switch ---- */
.has-price-notice { position: relative; }
.price-off-notice {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--ds-space-3);
  font-size: 0.75rem;
  color: var(--ds-text-secondary);
  background: rgba(10, 13, 20, 0.55);
  pointer-events: none;
  z-index: 5;
}
body.price-off [data-price-series] { display: none; }

/* ---- TradingView live panel ---- */
.tv-live-sub { font-size: 0.65rem; color: var(--ds-text-muted); }
.tv-widget-wrap { position: relative; height: 220px; padding: var(--ds-space-2) var(--ds-space-3) 0; }
.tradingview-widget-container,
.tradingview-widget-container__widget { width: 100%; height: 100%; }
.tv-widget-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--ds-text-muted);
}
.tv-widget-fallback[hidden] { display: none; }
.tv-widget-fallback a,
.tv-attribution a { color: var(--ds-accent-400); text-decoration: none; }
.tv-widget-fallback a:hover,
.tv-attribution a:hover { text-decoration: underline; }
.tv-attribution {
  font-size: 0.65rem;
  padding: var(--ds-space-1) var(--ds-space-3) var(--ds-space-2);
  text-align: right;
}

/* ---- Site footer ---- */
.site-footer {
  max-width: 1800px;
  margin: 0 auto;
  padding: var(--ds-space-4) var(--ds-space-4) calc(var(--ds-space-8) + 3.5rem);
  border-top: 1px solid var(--ds-border-subtle);
  color: var(--ds-text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
  background: linear-gradient(to bottom, rgba(10, 13, 20, 0.6), rgba(10, 13, 20, 0.9));
}
.footer-disclaimer { color: var(--ds-text-secondary); margin-bottom: var(--ds-space-2); }
.footer-disclaimer strong { color: var(--ds-text-primary); }
.footer-attribution {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-1) var(--ds-space-4);
  margin-bottom: var(--ds-space-3);
}
.footer-attribution a { color: var(--ds-accent-400); text-decoration: none; }
.footer-attribution .provider-status { color: var(--ds-text-secondary); }
.footer-notice { color: var(--ds-text-secondary); margin-bottom: var(--ds-space-2); }
.footer-notice a { color: var(--ds-accent-400); }
.ds-providers-wrap { margin-bottom: var(--ds-space-3); }
.footer-attribution a:hover { text-decoration: underline; }
.footer-link-btn {
  font: inherit;
  font-weight: 600;
  color: var(--ds-text-primary);
  background: var(--ds-bg-surface);
  border: 1px solid var(--ds-border-default);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-2) var(--ds-space-3);
  cursor: pointer;
}
.footer-link-btn:hover,
.footer-link-btn:focus-visible { border-color: var(--ds-border-accent); outline: none; }

/* ---- Data sources dialog ---- */
.data-sources-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: min(80vh, 720px);
  margin: auto;
  padding: 0;
  color: var(--ds-text-primary);
  background: var(--ds-bg-space);
  border: 1px solid var(--ds-border-default);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-md);
}
.data-sources-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.ds-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-3) var(--ds-space-4);
  border-bottom: 1px solid var(--ds-border-subtle);
  background: rgba(0, 0, 0, 0.2);
}
.ds-head h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ds-text-secondary); }
.ds-head .accent { color: var(--gme-red); }
.ds-close {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ds-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 var(--ds-space-2);
}
.ds-close:hover, .ds-close:focus-visible { color: var(--ds-text-primary); outline: none; }
.ds-meta, .ds-foot { font-size: 0.7rem; color: var(--ds-text-muted); padding: var(--ds-space-2) var(--ds-space-4); }
.ds-table-wrap { overflow: auto; max-height: calc(min(80vh, 720px) - 140px); padding: 0 var(--ds-space-4); }
.ds-table-el { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.ds-table-el th {
  position: sticky;
  top: 0;
  background: var(--ds-bg-space);
  text-align: left;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ds-text-muted);
  padding: var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border-default);
}
.ds-table-el td {
  padding: var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border-subtle);
  vertical-align: top;
  color: var(--ds-text-secondary);
}
.ds-label { color: var(--ds-text-primary); }
.ds-table, .ds-age { font-family: var(--ds-font-mono); font-size: 0.6rem; color: var(--ds-text-muted); }
.ds-empty { text-align: center; color: var(--ds-text-muted); }

/* ---- HODL Bot (satire) ---- */
.hodl-bot {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: var(--z-modal);
  font-family: var(--ds-font-sans);
}
.hodl-bot[hidden] { display: none; }
.hodl-launcher {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  margin-left: auto;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--ds-border-accent);
  background: var(--gme-red);
  color: #fff;
  font: 600 0.8rem var(--ds-font-sans);
  cursor: pointer;
  box-shadow: var(--ds-shadow-md), 0 0 16px var(--gme-red-glow);
}
.hodl-launcher:hover { background: var(--gme-red-light); }
.hodl-launcher:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hodl-launcher-icon { font-size: 1.1rem; }
.hodl-bot.is-open .hodl-launcher { display: none; }
.hodl-panel {
  width: min(360px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  background: var(--ds-bg-space);
  border: 1px solid var(--ds-border-default);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-md), 0 0 24px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.hodl-panel[hidden] { display: none; }
.hodl-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-2);
  padding: var(--ds-space-3) var(--ds-space-4);
  border-bottom: 1px solid var(--ds-border-subtle);
  background: rgba(211, 19, 25, 0.12);
}
.hodl-title { font-weight: 700; font-size: 0.9rem; color: var(--ds-text-primary); }
.hodl-sub { font-size: 0.65rem; color: var(--ds-text-muted); }
.hodl-close {
  font-size: 1.4rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--ds-text-secondary);
  cursor: pointer;
}
.hodl-close:hover, .hodl-close:focus-visible { color: var(--ds-text-primary); outline: none; }
.hodl-log {
  flex: 1;
  overflow-y: auto;
  padding: var(--ds-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
}
.hodl-msg {
  max-width: 88%;
  padding: var(--ds-space-2) var(--ds-space-3);
  border-radius: var(--ds-radius-md);
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.hodl-msg.hodl-from-bot {
  align-self: flex-start;
  background: var(--ds-bg-surface);
  color: var(--ds-text-primary);
  border: 1px solid var(--ds-border-subtle);
}
.hodl-msg.hodl-from-user {
  align-self: flex-end;
  background: rgba(211, 19, 25, 0.22);
  color: var(--ds-text-primary);
  border: 1px solid var(--ds-border-accent);
}
.hodl-disclaimer {
  margin-top: var(--ds-space-2);
  padding-top: var(--ds-space-2);
  border-top: 1px solid var(--ds-border-default);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ds-warning-base);
}
.hodl-thinking .hodl-status {
  font-family: var(--ds-font-mono);
  font-size: 0.72rem;
  color: var(--ds-accent-400);
}
.hodl-thinking .hodl-status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--ds-accent-400);
  animation: hodl-pulse 0.9s ease-in-out infinite;
}
@keyframes hodl-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) {
  .hodl-thinking .hodl-status::before { animation: none; }
}
.hodl-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 var(--ds-space-3) var(--ds-space-2); }
.hodl-chip {
  font: 500 0.68rem var(--ds-font-sans);
  color: var(--ds-text-secondary);
  background: transparent;
  border: 1px solid var(--ds-border-default);
  border-radius: 999px;
  padding: 3px 9px;
  cursor: pointer;
}
.hodl-chip:hover, .hodl-chip:focus-visible { color: var(--ds-text-primary); border-color: var(--ds-text-muted); outline: none; }
.hodl-form {
  display: flex;
  gap: var(--ds-space-2);
  padding: var(--ds-space-3);
  border-top: 1px solid var(--ds-border-subtle);
}
.hodl-input {
  flex: 1;
  min-width: 0;
  font: 0.85rem var(--ds-font-sans);
  color: var(--ds-text-primary);
  background: var(--ds-bg-deep);
  border: 1px solid var(--ds-border-default);
  border-radius: var(--ds-radius-md);
  padding: 0.5rem 0.7rem;
}
.hodl-input:focus { outline: none; border-color: var(--ds-accent-500); box-shadow: 0 0 0 2px var(--ds-accent-glow); }
.hodl-send {
  font: 600 0.8rem var(--ds-font-sans);
  color: #fff;
  background: var(--gme-red);
  border: none;
  border-radius: var(--ds-radius-md);
  padding: 0 1rem;
  cursor: pointer;
}
.hodl-send:disabled { opacity: 0.5; cursor: wait; }
.hodl-send:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.hodl-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (max-width: 768px) {
  .hodl-bot { right: 10px; bottom: 10px; }
  .hodl-launcher-text { display: none; }
  .hodl-launcher { padding: 0.7rem; }
  .hodl-input { font-size: 16px; } /* 16px+ stops iOS zooming into the field */
  .hodl-panel { height: min(480px, calc(100vh - 20px)); }
}

/* Bay Watch EBAY empty states: plain sentence first, API note as fine print */
.bw-empty-detail { margin-top: var(--ds-space-1); font-size: 0.68rem; opacity: 0.7; }

/* Timeline: loading state while /api/timeline (large payload) is in flight */
.tv-chart-wrapper.is-loading { position: relative; }
.tv-chart-wrapper.is-loading::after {
  content: 'Loading price history6';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--ds-text-muted);
  pointer-events: none;
}

/* Phones: the mission grid's "span 3" panels forced three squeezed columns.
   Stack everything in one column instead. */
@media (max-width: 768px) {
  .mission-grid { grid-template-columns: 1fr; }
  .mission-grid > .glass-panel { grid-column: auto !important; }
  .stat-card .stat-value { font-size: 1.6rem; }
}

/* Bitcoin Treasury: collateral disclosure (factual, not italic) */
.btc-note.btc-collateral { font-style: normal; border-top: none; padding-top: 0; color: var(--ds-text-secondary); }

/* ==========================================================================
   OPTIONS & GAMMA (options-panel.js)
   ========================================================================== */
.nav-btn[hidden] { display: none; }
.options-panel > .panel-header { row-gap: var(--ds-space-2); }
.opt-convention {
  display: inline-flex;
  border: 1px solid var(--ds-border-default);
  border-radius: var(--ds-radius-md);
  overflow: hidden;
}
.opt-conv-btn {
  font: 500 0.68rem var(--ds-font-sans);
  color: var(--ds-text-secondary);
  background: transparent;
  border: none;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}
.opt-conv-btn + .opt-conv-btn { border-left: 1px solid var(--ds-border-default); }
.opt-conv-btn.active { background: var(--gme-red); color: #fff; }
.opt-conv-btn:focus-visible { outline: 2px solid var(--ds-accent-400); outline-offset: -2px; }
.opt-empty { padding: var(--ds-space-8) var(--ds-space-4); text-align: center; color: var(--ds-text-muted); }
.opt-body[hidden], .opt-empty[hidden] { display: none; }

.opt-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-space-3);
  padding: var(--ds-space-4);
}
.opt-tile {
  background: var(--ds-bg-elevated);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-3);
}
.opt-tile-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ds-text-muted); }
.opt-tile-value { font-family: var(--ds-font-mono); font-size: 1.3rem; font-weight: 700; color: var(--ds-text-primary); margin: 2px 0; }
.opt-tile.pos .opt-tile-value { color: var(--signal-bullish); }
.opt-tile.neg .opt-tile-value { color: var(--signal-bearish); }
.opt-tile-sub { font-size: 0.65rem; color: var(--ds-text-secondary); }

.opt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-4);
  padding: 0 var(--ds-space-4) var(--ds-space-4);
}
.opt-grid .opt-wide { grid-column: 1 / -1; }
.opt-chart { height: 300px; }
.opt-sub { font-size: 0.65rem; color: var(--ds-text-muted); }
.opt-intro {
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--ds-text-secondary);
  padding: var(--ds-space-3) var(--ds-space-4) 0;
  max-width: 92ch;
}
.opt-select-label { font-size: 0.65rem; color: var(--ds-text-muted); display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.opt-select { font-size: 0.72rem; padding: 0.2rem 0.4rem; }
.opt-chart-note { font-size: 0.65rem; color: var(--ds-text-muted); padding: 0 var(--ds-space-4) var(--ds-space-3); }

.opt-table-wrap { overflow-x: auto; padding: 0 var(--ds-space-3) var(--ds-space-3); max-height: 420px; overflow-y: auto; }
.opt-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.opt-table th {
  position: sticky;
  top: 0;
  background: var(--ds-bg-space);
  text-align: right;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ds-text-muted);
  padding: var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border-default);
  white-space: nowrap;
}
.opt-table td {
  text-align: right;
  font-family: var(--ds-font-mono);
  color: var(--ds-text-secondary);
  padding: 6px var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border-subtle);
  white-space: nowrap;
}
.opt-table th:first-child, .opt-table td:first-child { text-align: left; font-family: var(--ds-font-sans); }
.opt-table tr.is-nm td { background: rgba(255, 183, 77, 0.06); color: var(--ds-text-primary); }
.opt-tag {
  font-family: var(--ds-font-sans);
  font-size: 0.55rem;
  padding: 1px 5px;
  margin-left: 4px;
  border-radius: 999px;
  border: 1px solid var(--ds-border-default);
  color: var(--ds-text-muted);
}
.opt-tag.nm { border-color: rgba(255, 183, 77, 0.6); color: #FFB74D; }
.opt-oi-bar { display: flex; height: 3px; margin-top: 3px; background: rgba(176, 190, 197, 0.08); }
.opt-oi-bar .c { background: rgba(0, 224, 122, 0.75); }
.opt-oi-bar .p { background: rgba(255, 82, 82, 0.75); }

.opt-footnotes {
  border-top: 1px solid var(--ds-border-subtle);
  padding: var(--ds-space-3) var(--ds-space-4) var(--ds-space-4);
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--ds-text-muted);
}
.opt-footnotes p + p { margin-top: 4px; }
.opt-method { color: var(--ds-text-secondary); max-width: 80ch; }
.opt-method strong { color: var(--ds-text-primary); }

@media (max-width: 900px) {
  .opt-grid { grid-template-columns: 1fr; }
  .opt-tiles { grid-template-columns: repeat(2, 1fr); }
  .opt-chart { height: 260px; }
}
@media (max-width: 480px) {
  .opt-tiles { grid-template-columns: 1fr 1fr; }
  .opt-tile-value { font-size: 1.1rem; }
  .opt-conv-btn { font-size: 0.62rem; padding: 0.35rem 0.5rem; }
}

/* Phones: the signal/range rail is the desktop left column. On a phone it only
   adds a long block below the content, so drop it entirely (the owner's call:
   "get rid of that left panel ... on the mobile screen view"). The element stays
   in the DOM - JS keeps updating it - it is only hidden. */
@media (max-width: 768px) {
  .gme-sidebar { display: none; }
}

/* Header: nine tabs no longer fit at laptop widths; tighten tabs and let the
   nav scroll instead of squeezing the logo onto four lines. */
.gme-header { gap: var(--ds-space-3); }
.gme-logo { flex-shrink: 0; }
.gme-logo-title, .gme-logo-subtitle { white-space: nowrap; }
.gme-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.gme-nav::-webkit-scrollbar { display: none; }
@media (max-width: 1600px) and (min-width: 769px) {
  .nav-btn { padding: var(--ds-space-2) var(--ds-space-2); font-size: 0.74rem; }
  .gme-header { padding-left: var(--ds-space-4); padding-right: var(--ds-space-4); }
}
.opt-tile-value.textval { font-size: 0.95rem; line-height: 1.3; }

/* Colour emoji (the HODL Bot gorilla): force an emoji font so the UI font
   stack can't fall back to a monochrome symbol glyph. */
.emoji, .hodl-text, .hodl-title {
  font-variant-emoji: emoji;
}
.emoji {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', sans-serif;
  font-style: normal;
}

/* Timeline: brief note while the daily series replaces the weekly one */
.tv-chart-wrapper.is-refining { position: relative; }
.tv-chart-wrapper.is-refining::before {
  content: 'Loading daily detail\2026';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  font-size: 0.65rem;
  color: var(--ds-text-secondary);
  background: rgba(10, 13, 20, 0.85);
  border: 1px solid var(--ds-border-default);
  border-radius: 999px;
  padding: 2px 10px;
  pointer-events: none;
}

/* Floor tile: net liquid assets breakdown */
.floor-secondary { font-size: 0.62rem; color: var(--ds-text-muted); margin-top: 2px; }
.floor-breakdown-details { margin-top: 0.35rem; font-size: 0.62rem; color: var(--ds-text-secondary); }
.floor-breakdown-details summary {
  cursor: pointer;
  color: var(--ds-text-muted);
  list-style-position: inside;
}
.floor-breakdown-details summary:hover,
.floor-breakdown-details summary:focus-visible { color: var(--ds-text-primary); outline: none; }
.floor-breakdown-details .fb-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1px 0;
}
.floor-breakdown-details .fb-value { font-family: var(--ds-font-mono); color: var(--ds-text-primary); }
.floor-breakdown-details .fb-debt .fb-value { color: var(--signal-bearish); }
.floor-breakdown-details .fb-total { border-top: 1px solid var(--ds-border-default); margin-top: 2px; padding-top: 3px; font-weight: 600; }
.floor-breakdown-details .fb-note { color: var(--ds-text-muted); font-size: 0.56rem; }
.floor-breakdown-details .fb-method { color: var(--ds-text-muted); font-size: 0.56rem; margin-top: 3px; }
.fb-partial { margin-top: 3px; font-size: 0.58rem; color: var(--ds-warning-base); }

/* 13F caveat under the institutional table */
.institutional-note {
  font-size: 0.65rem;
  line-height: 1.45;
  color: var(--ds-text-muted);
  padding: 0 var(--ds-space-4) var(--ds-space-3);
}
.institutional-note[hidden] { display: none; }

/* API-supplied caveats: DRS disclosure gap, per-source freshness notes */
.drs-note { font-size: 0.62rem; line-height: 1.4; color: var(--ds-text-muted); margin-top: var(--ds-space-1); }
.ds-note { font-size: 0.62rem; line-height: 1.4; color: var(--ds-warning-base); margin-top: 2px; }
