/* ==========================================================================
   RISKOS — Institutional Financial Intelligence & Research Platform Stylesheet
   Universal UX: Simple by Default • Deep on Demand • Mathematical when Requested
   ========================================================================== */

/* ── Typography & Webfonts ────────────────────────────────────────────────── */
@import url("https://db.onlinewebfonts.com/c/8cb707a9b8a73f8a7403336b861c3074?family=BubbledotICG-FinePos");

@font-face {
  font-family: "Geist Pixel Circle";
  src: url("fonts/GeistPixel-Circle.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ── CSS Custom Properties ────────────────────────────────────────────────── */
:root {
  --bg: #000000;
  --panel-bg: #0d0d10;
  --panel-bg-alt: #131318;
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-subtle: rgba(255, 255, 255, 0.04);
  
  --text: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --nav-bg: #18181b;
  --nav-pill-border: rgba(255, 255, 255, 0.1);
  --nav-link-color: #d4d4d8;
  
  --accent-emerald: #51CF66;
  --accent-blue: #4F8FFF;
  --accent-amber: #FAB005;
  --accent-purple: #CC5DE8;
  --accent-red: #FF6B6B;
  --accent-cyan: #22d3ee;
  
  /* Precision Spacing Scale (4, 8, 12, 16, 20, 24, 32, 40, 48, 64) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Standard Border Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Animation Discipline */
  --motion-fast: 140ms;
  --motion-normal: 240ms;
  --motion-slow: 360ms;
  --easing-smooth: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "BubbledotICG-FinePos", "Geist Pixel Circle", monospace;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

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

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  position: relative;
}

body.menu-open,
body.obs-open,
body.modal-open,
body.menu-locked {
  overflow: hidden !important;
  touch-action: none !important;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button, select, input {
  font-family: inherit;
}

.pos { color: var(--accent-emerald) !important; }
.neg { color: var(--accent-red) !important; }

/* ── Full-Viewport Background Video ───────────────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  z-index: 0;
  pointer-events: none;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ── Ambient Floating Quantitative Mathematics Layer ──────────────────────── */
.quant-ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.quant-math-tag {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: rgba(18, 18, 22, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px 12px;
  border-radius: 8px;
  opacity: 0.22;
  transition: opacity 0.4s ease;
  user-select: none;
}

.quant-math-tag:hover { opacity: 0.65; }

.math-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.math-eq {
  font-size: 0.8rem;
  color: #d1d5db;
}

.math-eq svg { vertical-align: middle !important; }

.math-tag--1 { top: 14%; left: 4%; }
.math-tag--2 { top: 22%; right: 5%; }
.math-tag--3 { bottom: 20%; left: 5%; }
.math-tag--4 { bottom: 22%; right: 4%; }
.math-tag--5 { top: 48%; left: 2%; }
.math-tag--6 { top: 52%; right: 2%; }

@media (max-width: 900px) {
  .quant-math-tag { display: none; }
}

/* ── Strict 3-Row Grid Viewport (.page) ───────────────────────────────────── */
.page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding:
    max(10px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
  z-index: 2;
}

/* ── 1. Top Header Architecture ───────────────────────────────────────────── */
.header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 30;
}

.header-inner {
  width: min(1380px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(6px, 1.2vw, 14px);
  padding: 0 var(--space-3);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  max-width: 36px;
  max-height: 36px;
  background: #09090c;
  border: 1px solid rgba(81, 207, 102, 0.25);
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(81, 207, 102, 0.12);
  transition: transform 0.25s var(--easing-smooth), border-color 0.25s, box-shadow 0.25s;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-btn:hover {
  transform: scale(1.06);
  border-color: rgba(81, 207, 102, 0.5);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8), 0 0 20px rgba(81, 207, 102, 0.25);
}

.logo-img {
  width: 34px !important;
  height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  border-radius: 7px;
  object-fit: cover;
  display: block;
}

/* Market Clock Badge */
.market-clock-badge {
  display: flex;
  transition: all 0.25s var(--easing-smooth);
  align-items: center;
  gap: 5px;
  background: rgba(24, 24, 28, 0.85);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  user-select: none;
  flex-shrink: 0;
}

.market-clock-badge:hover {
  background: rgba(35, 35, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
}

.market-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot--open { background: var(--accent-emerald); box-shadow: 0 0 6px var(--accent-emerald); }
.dot--closed { background: var(--text-muted); }
.dot--pre { background: var(--accent-amber); box-shadow: 0 0 6px var(--accent-amber); }

.market-name { color: #ffffff; font-weight: 700; }
.market-state { color: var(--accent-emerald); font-size: 0.625rem; }
.market-time { color: var(--text-muted); font-family: monospace; font-size: 0.625rem; }

/* Center Navigation Pill */
.nav-pill {
  display: flex;
  align-items: center;
  background: rgba(18, 18, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 3px 6px;
  border-radius: 100px;
  gap: 2px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.nav-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-search-trigger:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.kbd-pill {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: monospace;
}

.nav-link {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 9px;
  border-radius: 100px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link--btn {
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: #000000 !important;
  background: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* ── Topbar "Other ▾" Dropdown Navigation ── */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 9px;
  border-radius: 100px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-dropdown-trigger:hover,
.nav-dropdown.open .nav-dropdown-trigger {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-dropdown-trigger.active {
  color: #000000 !important;
  background: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.nav-dropdown-caret {
  font-size: 0.55rem;
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

.nav-dropdown:hover .nav-dropdown-caret,
.nav-dropdown.open .nav-dropdown-caret {
  transform: rotate(180deg);
  color: #ffffff;
}

.nav-dropdown-trigger.active .nav-dropdown-caret {
  color: #000000;
}

/* Glassmorphism Dropdown Panel */
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  max-width: 90vw;
  background: rgba(9, 13, 22, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(56, 189, 248, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  z-index: 28000;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Open states */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-header {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #64748b;
  padding: 6px 10px 4px;
  text-transform: uppercase;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #cbd5e1;
  font-size: 0.72rem;
  transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}

.nav-dropdown-item.active {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-left: 2px solid #38bdf8;
  font-weight: 700;
}

.nav-dropdown-item i {
  font-size: 0.85rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.nav-dropdown-title {
  font-weight: 600;
  line-height: 1.2;
}

.nav-dropdown-sub {
  font-size: 0.63rem;
  color: #64748b;
  line-height: 1.2;
  margin-top: 2px;
}

.nav-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 6px;
}

/* Header Quick Buttons & Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-quick-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1200px) {
  .header-quick-btn {
    display: none;
  }
}

/* Universal "Explain Like Me" Mode Selector */
.mode-selector-pill {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 2px;
  user-select: none;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.mode-btn.active {
  background: #ffffff;
  color: #000000;
  font-weight: 700;
}

.currency-toggle-pill {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 2px;
  cursor: pointer;
  user-select: none;
}

.curr-opt {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 100px;
  transition: background-color 0.2s, color 0.2s;
}

.live-sync-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 9999px;
  padding: 5px 12px;
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.live-sync-trigger-btn:hover {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.25);
  transform: translateY(-1px);
}

.live-sync-trigger-btn:active {
  transform: scale(0.97);
}

.live-sync-trigger-btn.syncing {
  opacity: 0.75;
  pointer-events: none;
}

.live-sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-live-dot 1.8s infinite;
}

@keyframes pulse-live-dot {
  0% { transform: scale(0.95); opacity: 0.7; box-shadow: 0 0 4px #10b981; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px #10b981; }
  100% { transform: scale(0.95); opacity: 0.7; box-shadow: 0 0 4px #10b981; }
}

.curr-opt.active {
  background: #ffffff;
  color: #000000;
}

.icon-nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}

.icon-nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.nav-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 0.55rem;
  font-weight: 700;
  background: var(--accent-emerald);
  color: #000000;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-badge--pulse { background: var(--accent-amber); }

.terminal-btn-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: #000000;
  background: #ffffff;
  padding: 6px 13px;
  border-radius: 100px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.terminal-btn-link:hover {
  transform: scale(1.03);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background: rgba(24, 24, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  gap: 4px;
}

.menu-toggle .bar {
  width: 15px;
  height: 1.5px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.28s var(--easing-smooth), opacity 0.2s;
}

.menu-toggle.is-open .bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-toggle.is-open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.is-open .bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-pill { display: none; }
  .market-clock-badge { display: none; }
  .mode-selector-pill { display: none; }
  .terminal-btn-link { display: none; }
  .menu-toggle { display: flex; }
}

/* ── 2. Hero Section ──────────────────────────────────────────────────────── */
.hero {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.hero-inner {
  width: min(940px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(4px, 1.2vh, 14px) 0;
  gap: clamp(6px, 1.1vh, 12px);
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 18, 22, 0.7);
  border: 1px solid rgba(81, 207, 102, 0.25);
  backdrop-filter: blur(10px);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.675rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1), transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease;
}

.status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.status-provenance-tag {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(81, 207, 102, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
}

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.trust-avatars { display: flex; align-items: center; }

.trust-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #ffffff;
  transition: transform 0.35s var(--easing-smooth);
}

.trust-avatar:first-child { margin-left: 0; }
.avatar-1 { background: linear-gradient(135deg, #4F8FFF, #1D4ED8); }
.avatar-2 { background: linear-gradient(135deg, #51CF66, #059669); }
.avatar-3 { background: linear-gradient(135deg, #CC5DE8, #7C3AED); }

.avatar-1:hover { transform: translateY(-2px); }
.avatar-2:hover { transform: translateY(-4px); }
.avatar-3:hover { transform: translateY(-2px); }

.trust-text {
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.headline {
  width: 100%;
  max-width: 100%;
  font-family: var(--font-display);
  color: #ffffff;
  font-size: clamp(28px, 5.2vw, 70px);
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-weight: 400;
  margin: 0;
  padding: 0;
}

.headline span {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
}

@media (max-width: 720px) {
  .headline {
    font-size: clamp(24px, 6.8vw, 40px);
    letter-spacing: -0.07em;
  }
}

.subhead {
  max-width: 660px;
  font-size: clamp(0.825rem, 1.25vw, 0.95rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 auto;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #000000;
  font-size: clamp(0.825rem, 1vw, 0.925rem);
  font-weight: 700;
  padding: clamp(9px, 1.4vh, 12px) clamp(20px, 2.5vw, 28px);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.2s var(--easing-smooth), box-shadow 0.2s;
}

.cta-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.4);
}

.cta-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: clamp(0.825rem, 1vw, 0.925rem);
  font-weight: 600;
  padding: clamp(9px, 1.4vh, 12px) clamp(16px, 2vw, 24px);
  border-radius: 100px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cta-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Quick Prompts Row */
.quick-prompts-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 800px;
  transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.prompt-tag-label {
  font-size: 0.675rem;
  color: var(--text-muted);
  font-weight: 600;
}

.prompt-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.675rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 100px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.prompt-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── 3. Financial Metrics Footer Grid ────────────────────────────────────── */
.financial-metrics {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  z-index: 10;
  padding-top: 4px;
}

.metrics-grid {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2.5vw, 24px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: clamp(6px, 1.2vh, 12px);
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: default;
}

.metric-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.metric-icon { color: var(--accent-emerald); font-size: clamp(0.8rem, 1.1vw, 0.95rem); }
.metric-value {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.metric-suffix { font-size: clamp(0.8rem, 1.2vw, 0.95rem); color: var(--text-secondary); }
.metric-label {
  font-size: clamp(0.6rem, 0.8vw, 0.675rem);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-provenance {
  font-size: 0.525rem;
  color: var(--accent-emerald);
  font-family: monospace;
  margin-top: 2px;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
  }
}

/* ── 4. COMMAND PALETTE MODAL (CMD+K) ────────────────────────────────────── */
.palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(40px, 12vh, 110px);
  padding-inline: 16px;
}

.palette-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
}

.palette-modal {
  position: relative;
  z-index: 301;
  width: min(660px, 100%);
  background: #0f0f14;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: paletteScale 0.2s var(--easing-smooth) both;
}

@keyframes paletteScale {
  from { transform: scale(0.97); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.palette-search-box {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-border);
  gap: 12px;
}

.palette-icon { color: var(--accent-emerald); font-size: 1rem; }
.palette-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
}

.palette-kbd {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 6px;
  border-radius: 4px;
}

.palette-intent-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(81, 207, 102, 0.08);
  border-bottom: 1px solid rgba(81, 207, 102, 0.2);
  padding: 8px 14px;
}

.intent-tag {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(81, 207, 102, 0.15);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
}

.intent-desc { font-size: 0.725rem; color: var(--text-secondary); }

.palette-sections {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.palette-group-title {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding: 6px 10px 2px;
}

.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.palette-item:hover,
.palette-item.is-selected {
  background: rgba(255, 255, 255, 0.08);
}

.palette-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid var(--panel-border);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.palette-shortcuts { display: flex; gap: 10px; }

/* ── 5. GENERATIVE FINANCIAL INTELLIGENCE CANVAS ─────────────────────────── */
.canvas-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vh, 20px) clamp(10px, 2vw, 24px);
  box-sizing: border-box;
}

.canvas-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(14px);
}

.canvas-modal-window {
  position: relative;
  z-index: 261;
  width: min(1360px, 100%);
  height: min(94vh, 94dvh);
  max-height: 94dvh;
  background: #09090c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.28s var(--easing-smooth) both;
}

.canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--panel-border);
  background: #0e0e13;
  flex-shrink: 0;
  gap: 12px;
}

.canvas-header-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.canvas-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(81, 207, 102, 0.1);
  border: 1px solid rgba(81, 207, 102, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
}

.canvas-query-title { font-size: 1rem; font-weight: 700; color: #ffffff; }

.canvas-header-right { display: flex; align-items: center; gap: 10px; }
.canvas-mode-indicator {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
}

.canvas-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.canvas-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── 6. UNIVERSAL "WHY?" [?] EXPLAINER POPOVER ───────────────────────────── */
.why-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.why-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

.why-modal-card {
  position: relative;
  z-index: 351;
  width: min(580px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #111116;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: modalIn 0.22s var(--easing-smooth) both;
}

.why-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 10px;
}

.why-tag { font-size: 0.6rem; font-weight: 700; color: var(--accent-emerald); letter-spacing: 0.06em; }
.why-title { font-size: 1.05rem; font-weight: 700; color: #ffffff; }

.why-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.why-close-btn:hover { color: #ffffff; }

.why-body { display: flex; flex-direction: column; gap: 12px; }
.why-section { display: flex; flex-direction: column; gap: 4px; }
.ws-label { font-size: 0.6rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.06em; }
.ws-text { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }

.why-formula-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  font-size: 1.1rem;
  color: #ffffff;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.why-math-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(81, 207, 102, 0.08);
  border: 1px solid rgba(81, 207, 102, 0.25);
  color: var(--accent-emerald);
  font-size: 0.725rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
  justify-content: center;
}
.why-math-toggle-btn:hover { background: rgba(81, 207, 102, 0.18); }

.why-math-expanded {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.why-sliders-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 600px) {
  .why-sliders-grid { grid-template-columns: 1fr; }
}

.why-provenance-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.675rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wpb-row { display: flex; justify-content: space-between; }
.status-tag { font-size: 0.55rem; font-weight: 700; padding: 1px 4px; border-radius: 3px; font-family: monospace; }
.tag--verified { color: var(--accent-emerald); background: rgba(81, 207, 102, 0.1); }

/* Universal "Why?" button on any metric */
.why-trigger-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.why-trigger-btn:hover {
  background: var(--accent-emerald);
  color: #000000;
  border-color: var(--accent-emerald);
}

/* ── 7. CAUSAL EVENT TREE DIAGRAM ────────────────────────────────────────── */
.causal-tab-layout { display: flex; flex-direction: column; gap: 14px; }
.causal-summary-banner {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.csb-tag { font-size: 0.6rem; font-weight: 700; color: var(--accent-emerald); }
.csb-headline { font-size: 1rem; font-weight: 700; color: #ffffff; }
.csb-desc { font-size: 0.775rem; color: var(--text-secondary); }

.causal-tree-diagram {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.causal-node {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cn-left { display: flex; align-items: center; gap: 10px; }
.cn-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.cn-text { font-size: 0.8rem; font-weight: 600; color: #ffffff; }
.cn-sub { font-size: 0.7rem; color: var(--text-muted); }
.cn-impact { font-size: 0.8rem; font-weight: 700; font-family: monospace; }

/* ── 8. MARKET PULSE DRAWER ──────────────────────────────────────────────── */
.market-pulse-drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(420px, 92vw);
  background: #0e0e13;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.85);
  z-index: 280;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideDrawer 0.28s var(--easing-smooth) both;
}

.pulse-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pulse-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pulse-breadth-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 107, 107, 0.4);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}
.pbb-advances { height: 100%; background: var(--accent-emerald); }

/* ── 9. COMPANY RESEARCH INTELLIGENCE MODAL ──────────────────────────────── */
.company-modal-overlay,
.compare-modal-overlay,
.glossary-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vh, 20px) clamp(10px, 2vw, 24px);
  box-sizing: border-box;
}

.company-modal-backdrop,
.compare-modal-backdrop,
.glossary-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
}

.company-modal-window,
.compare-modal-window,
.glossary-modal-window {
  position: relative;
  z-index: 251;
  width: min(1320px, 100%);
  height: min(94vh, 94dvh);
  max-height: 94dvh;
  background: #0a0a0e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.28s var(--easing-smooth) both;
}

@keyframes modalIn {
  from { transform: scale(0.98); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Company Header */
.comp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--panel-border);
  background: #0e0e13;
  flex-shrink: 0;
  gap: 14px;
}

.comp-header-left { display: flex; align-items: center; gap: 12px; }
.comp-identity { display: flex; align-items: center; gap: 12px; }

.comp-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4F8FFF, #1D4ED8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.comp-name-wrap { display: flex; flex-direction: column; gap: 2px; }

.comp-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.comp-name { font-size: 1.05rem; font-weight: 700; color: #ffffff; }

.comp-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

.comp-badge--exchange { background: rgba(81, 207, 102, 0.1); color: var(--accent-emerald); border: 1px solid rgba(81, 207, 102, 0.25); font-family: monospace; }
.comp-badge--sector { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }
.comp-badge--isin { background: rgba(255, 255, 255, 0.04); color: var(--text-muted); font-family: monospace; font-size: 0.6rem; }
.comp-aliases { font-size: 0.675rem; color: var(--text-muted); }

.comp-header-right { display: flex; align-items: center; gap: 14px; }
.comp-price-box { display: flex; flex-direction: column; align-items: flex-end; }
.comp-price-primary { display: flex; align-items: center; gap: 8px; }
.comp-price { font-size: 1.25rem; font-weight: 800; font-family: monospace; color: #ffffff; }
.comp-change { font-size: 0.8rem; font-weight: 700; font-family: monospace; }

.comp-price-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.625rem;
  color: var(--text-muted);
}

.data-status-tag { font-size: 0.55rem; font-weight: 700; padding: 1px 4px; border-radius: 3px; }
.status--delayed { color: var(--accent-amber); background: rgba(250, 176, 5, 0.1); border: 1px solid rgba(250, 176, 5, 0.2); }
.status--live { color: var(--accent-emerald); background: rgba(81, 207, 102, 0.1); border: 1px solid rgba(81, 207, 102, 0.2); }

.comp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.775rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.comp-action-btn:hover { background: rgba(255, 255, 255, 0.14); }

.comp-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.comp-close-btn:hover { background: rgba(255, 255, 255, 0.16); }

/* 5 Tabs Navigation Bar */
.comp-nav-tabs {
  display: flex;
  background: #0e0e13;
  border-bottom: 1px solid var(--panel-border);
  padding: 0 16px;
  gap: 6px;
  overflow-x: auto;
  flex-shrink: 0;
}

.comp-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.775rem;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.comp-tab:hover { color: #ffffff; }
.comp-tab.active {
  color: #ffffff;
  border-bottom-color: var(--accent-emerald);
}

/* Modal Body Content */
.comp-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  background: #09090c;
}

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

/* Tab 1: Overview & Price Chart */
.pane-overview-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}

@media (max-width: 1024px) {
  .pane-overview-grid { grid-template-columns: 1fr; }
}

.overview-chart-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chart-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.chart-stats-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.chart-stats-summary strong { color: #ffffff; }

.chart-tf-picker {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.ctf-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.675rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.ctf-btn.active { background: #ffffff; color: #000000; }

.comp-canvas-container {
  position: relative;
  width: 100%;
  height: 240px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border-subtle);
  border-radius: 8px;
  overflow: hidden;
}

#compPriceCanvas { width: 100%; height: 100%; display: block; }

.comp-tooltip {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 15, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  pointer-events: none;
}

.overview-side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-title {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sc-regime-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald);
}
.regime-dot { width: 6px; height: 6px; border-radius: 50%; }

.sc-desc { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.4; }

.sc-summary-body { display: flex; flex-direction: column; gap: 6px; font-size: 0.75rem; }
.sum-row { display: flex; justify-content: space-between; align-items: center; color: var(--text-secondary); }
.sum-row strong { color: #ffffff; }

.sc-disclaimer {
  font-size: 0.55rem;
  color: var(--text-muted);
  border-top: 1px solid var(--panel-border-subtle);
  padding-top: 6px;
  letter-spacing: 0.04em;
}

/* Tab 3: News & Filings */
.news-intelligence-layout { display: flex; flex-direction: column; gap: 12px; }
.news-filter-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.news-filter-group { display: flex; gap: 6px; }

.nfg-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.725rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.nfg-btn.active { background: var(--accent-emerald); color: #000000; font-weight: 700; }
.news-live-status { font-size: 0.675rem; color: var(--accent-emerald); display: flex; align-items: center; gap: 6px; }

.news-feed-stream { display: flex; flex-direction: column; gap: 10px; }
.news-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s;
}
.news-card:hover { border-color: rgba(255, 255, 255, 0.2); }

.news-card-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.news-source-tags { display: flex; align-items: center; gap: 6px; }

.source-quality-tag {
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.sq--filing { background: rgba(81, 207, 102, 0.1); color: var(--accent-emerald); border: 1px solid rgba(81, 207, 102, 0.25); }
.sq--primary { background: rgba(79, 143, 255, 0.1); color: var(--accent-blue); border: 1px solid rgba(79, 143, 255, 0.25); }
.sq--media { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }

.news-time { font-size: 0.65rem; color: var(--text-muted); }
.news-title { font-size: 0.9rem; font-weight: 700; color: #ffffff; line-height: 1.35; }
.news-snippet { font-size: 0.775rem; color: var(--text-secondary); line-height: 1.45; }

.news-impact-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.nib-left { display: flex; align-items: center; gap: 8px; }
.nib-tag { font-size: 0.55rem; font-weight: 700; color: var(--text-muted); }
.nib-sentiment { font-size: 0.725rem; font-weight: 700; }
.nib-signals { font-size: 0.675rem; color: var(--text-secondary); }
.nib-disclaimer { font-size: 0.55rem; color: var(--text-muted); font-family: monospace; }

/* Tab 4: Fundamentals Grid */
.fundamentals-layout { display: flex; flex-direction: column; gap: 16px; }

.fund-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

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

.fund-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fc-header { display: flex; justify-content: space-between; align-items: center; }
.fc-label { font-size: 0.55rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.06em; }
.fc-value { font-size: 1.1rem; font-weight: 800; color: #ffffff; font-family: monospace; }
.fc-sub { font-size: 0.675rem; color: var(--text-secondary); }

.corp-actions-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-subtitle { font-size: 0.85rem; font-weight: 700; color: #ffffff; display: flex; align-items: center; gap: 8px; }
.corp-actions-timeline { display: flex; flex-direction: column; gap: 8px; }

.corp-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--panel-border-subtle);
  padding-bottom: 6px;
  font-size: 0.775rem;
}

.cer-date { color: var(--text-muted); font-family: monospace; font-size: 0.7rem; width: 100px; }
.cer-type { font-weight: 700; color: var(--accent-emerald); width: 140px; }
.cer-desc { color: var(--text-secondary); flex: 1; }

/* Tab 5: Quantitative Risk Grid */
.quant-signals-layout { display: flex; flex-direction: column; gap: 14px; }

.quant-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

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

.quant-stat-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qsc-header { display: flex; justify-content: space-between; align-items: center; }
.qsc-title { font-size: 0.625rem; font-weight: 700; color: var(--text-muted); }

.qsc-val { font-size: 1.25rem; font-weight: 800; color: #ffffff; font-family: monospace; }
.qsc-desc { font-size: 0.725rem; color: var(--text-secondary); line-height: 1.4; }

/* ── 10. COMPARISON MODE MODAL ────────────────────────────────────────────── */
.compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--panel-border);
  background: #0e0e13;
}

.compare-title { font-size: 1.05rem; font-weight: 700; color: #ffffff; margin-top: 2px; }

.compare-body {
  padding: 18px;
  overflow-y: auto;
}

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

.compare-table th, .compare-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-border);
  text-align: left;
}

.compare-table th {
  color: var(--text-muted);
  font-size: 0.675rem;
  text-transform: uppercase;
}

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

/* ── 11. WATCHLIST & ALERTS DRAWERS ───────────────────────────────────────── */
.watchlist-drawer,
.alerts-drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(380px, 92vw);
  background: #0e0e13;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.85);
  z-index: 280;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideDrawer 0.28s var(--easing-smooth) both;
}

@keyframes slideDrawer {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--panel-border);
}

.drawer-tag { font-size: 0.6rem; font-weight: 700; color: var(--accent-emerald); }
.drawer-title { font-size: 0.9rem; font-weight: 700; color: #ffffff; }

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}
.drawer-close-btn:hover { color: #ffffff; }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.watchlist-item-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.2s;
}

.watchlist-item-card:hover { border-color: rgba(255, 255, 255, 0.2); }
.wic-left { display: flex; flex-direction: column; }
.wic-sym { font-weight: 700; color: #ffffff; font-size: 0.85rem; }
.wic-name { font-size: 0.7rem; color: var(--text-muted); }
.wic-right { display: flex; flex-direction: column; align-items: flex-end; }
.wic-price { font-weight: 700; font-family: monospace; font-size: 0.85rem; }
.wic-chg { font-size: 0.7rem; font-family: monospace; }

.clear-watchlist-btn {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 8px;
}

.alert-item-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aic-title { font-size: 0.8rem; font-weight: 700; color: #ffffff; }
.aic-time { font-size: 0.65rem; color: var(--text-muted); }

/* ── 12. QUANTITATIVE EXPLAINER LIBRARY MODAL ─────────────────────────────── */
.glossary-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  flex: 1;
  overflow: hidden;
}

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

.glossary-tabs {
  background: #0e0e13;
  border-right: 1px solid var(--panel-border);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.g-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.g-tab:hover { color: #ffffff; background: rgba(255, 255, 255, 0.04); }
.g-tab.active { background: #ffffff; color: #000000; font-weight: 700; }

.glossary-content-panel {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── 13. OBSERVATORY OVERLAY ──────────────────────────────────────────────── */
.observatory-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vh, 20px) clamp(10px, 2vw, 24px);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--easing-smooth), visibility 0.3s;
}

.observatory-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.observatory-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(14px);
}

.observatory-workspace {
  position: relative;
  z-index: 201;
  width: min(1360px, 100%);
  height: min(94vh, 94dvh);
  max-height: 94dvh;
  overflow-y: auto;
  background: #09090c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: clamp(12px, 1.8vh, 18px) clamp(14px, 1.8vw, 22px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.95);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.obs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 10px;
  flex-shrink: 0;
  gap: 12px;
}

.obs-header-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.obs-brand { display: flex; align-items: center; gap: 8px; }
.obs-title { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; color: #ffffff; }

.obs-status-chips { display: flex; align-items: center; gap: 6px; }
.obs-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
}
.obs-chip--sim { color: var(--accent-amber); border-color: rgba(250, 176, 5, 0.25); background: rgba(250, 176, 5, 0.05); }

.chip-dot { width: 5px; height: 5px; border-radius: 50%; }
.chip-dot--green { background: var(--accent-emerald); }
.chip-dot--amber { background: var(--accent-amber); }

.obs-header-right { display: flex; align-items: center; gap: 8px; }

.obs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.775rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.obs-btn--explain { border-color: rgba(81, 207, 102, 0.3); color: var(--accent-emerald); }
.obs-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
}
.obs-esc-badge { font-size: 0.65rem; color: var(--text-muted); font-family: monospace; }

/* Observatory Grid Rows */
.obs-body { display: flex; flex-direction: column; gap: 12px; }
.obs-grid-row { display: grid; gap: 12px; }
.obs-row-1 { grid-template-columns: 1.45fr 1fr; }
.obs-row-2 { grid-template-columns: 1fr 1fr; }

@media (max-width: 1024px) {
  .obs-row-1, .obs-row-2 { grid-template-columns: 1fr; }
}

.obs-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-tag { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-emerald); text-transform: uppercase; }
.panel-title { font-size: 0.875rem; font-weight: 600; color: #ffffff; }
.panel-subbadge {
  font-size: 0.675rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(81, 207, 102, 0.08);
  border: 1px solid rgba(81, 207, 102, 0.2);
  padding: 2px 8px;
  border-radius: 100px;
}

.timeframe-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.tf-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.tf-btn.active { background: #ffffff; color: #000000; }

.chart-metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 6px 10px;
}

.ribbon-item { display: flex; flex-direction: column; gap: 1px; }
.ribbon-label { font-size: 0.55rem; font-weight: 700; color: var(--text-muted); }
.ribbon-value { font-size: 0.85rem; font-weight: 700; color: #ffffff; font-family: monospace; }
.ribbon-value--neg { color: var(--accent-red); }

.chart-canvas-container {
  position: relative;
  width: 100%;
  height: 200px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

#timeSeriesCanvas { width: 100%; height: 100%; display: block; }

.chart-tooltip {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(14, 14, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.725rem;
  color: var(--text-secondary);
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tt-date { font-weight: 700; color: #ffffff; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 3px; }
.tt-row { display: flex; justify-content: space-between; gap: 12px; }
.tt-row strong { color: #ffffff; font-family: monospace; }

/* Donut & Sliders */
.alloc-content { display: flex; align-items: center; gap: 16px; }
.donut-wrap { position: relative; width: 130px; height: 130px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
#donutSvg { transform: rotate(-90deg); }
.donut-bg-ring { fill: none; stroke: rgba(255, 255, 255, 0.05); stroke-width: 16; }
.donut-slice { fill: none; stroke-width: 16; stroke-linecap: round; }
.slice--eq { stroke: var(--accent-emerald); }
.slice--bnd { stroke: var(--accent-blue); }
.slice--csh { stroke: var(--accent-purple); }
.slice--cmd { stroke: var(--accent-amber); }

.donut-center-info { position: absolute; display: flex; flex-direction: column; align-items: center; }
.donut-center-val { font-size: 0.95rem; font-weight: 700; color: #ffffff; font-family: monospace; }
.donut-center-lbl { font-size: 0.55rem; font-weight: 700; color: var(--text-muted); }

.alloc-sliders { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.slider-row { display: flex; flex-direction: column; gap: 2px; }
.slider-label-line { display: flex; justify-content: space-between; font-size: 0.75rem; }
.asset-name { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.color-dot { width: 6px; height: 6px; border-radius: 50%; }
.dot--eq { background: var(--accent-emerald); }
.dot--bnd { background: var(--accent-blue); }
.dot--csh { background: var(--accent-purple); }
.dot--cmd { background: var(--accent-amber); }
.asset-weight { font-weight: 700; color: #ffffff; font-family: monospace; }

.weight-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.weight-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

.alloc-meta-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px solid var(--panel-border);
  padding-top: 8px;
}

.meta-field { display: flex; flex-direction: column; gap: 2px; }
.meta-field label { font-size: 0.55rem; font-weight: 700; color: var(--text-muted); }
.meta-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.725rem;
  padding: 4px 8px;
  border-radius: 6px;
  outline: none;
}
.meta-select option { background: #111115; color: #ffffff; }

/* Scenario Engine */
.scenario-active-tag { font-size: 0.675rem; font-weight: 600; color: var(--accent-amber); }
.scenario-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.scenario-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.scenario-pill.active { border-color: var(--accent-emerald); background: rgba(81, 207, 102, 0.08); }
.pill-name { font-size: 0.725rem; font-weight: 700; color: #ffffff; }
.pill-desc { font-size: 0.625rem; color: var(--text-muted); }

/* Live Math Display */
.live-math-equations { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.equation-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.eq-tag { font-size: 0.55rem; font-weight: 700; color: var(--text-muted); }

/* Risk Heatmap Matrix */
.risk-matrix-wrap { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--panel-border); padding-top: 8px; }
.matrix-title { font-size: 0.55rem; font-weight: 700; color: var(--text-muted); }
.risk-heatmap-grid { display: grid; grid-template-columns: 100px repeat(3, 1fr); gap: 4px; }
.hm-header { font-size: 0.6rem; font-weight: 700; color: var(--text-muted); text-align: center; }
.hm-row-label { font-size: 0.675rem; color: var(--text-secondary); display: flex; align-items: center; }
.hm-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
}
.hm--low { color: var(--accent-emerald); background: rgba(81, 207, 102, 0.06); }
.hm--med { color: var(--accent-amber); background: rgba(250, 176, 5, 0.06); }
.hm--high { color: var(--accent-red); background: rgba(255, 107, 107, 0.08); }
.hm--zero { color: var(--text-muted); }

/* Quantitative Pipeline */
.pipeline-flow { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.pipeline-node {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.pipeline-node.active { border-color: var(--accent-emerald); background: rgba(81, 207, 102, 0.08); }
.node-step { font-size: 0.55rem; font-weight: 700; color: var(--accent-emerald); font-family: monospace; }
.node-title { font-size: 0.725rem; font-weight: 700; color: #ffffff; }
.node-sub { font-size: 0.6rem; color: var(--text-muted); }
.pipeline-arrow { color: var(--text-muted); font-size: 0.7rem; }

.node-detail-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.node-badge { font-size: 0.55rem; font-weight: 700; color: var(--accent-emerald); }
.node-headline { font-size: 0.85rem; font-weight: 700; color: #ffffff; }
.node-text { font-size: 0.775rem; color: var(--text-secondary); line-height: 1.5; }

/* ── 14. Explain Decision Drawer ─────────────────────────────────────────── */
.explain-drawer {
  position: absolute;
  top: 14px;
  right: 14px;
  bottom: 14px;
  width: min(380px, 90vw);
  background: #111116;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.8);
  z-index: 250;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.attr-item { display: flex; flex-direction: column; gap: 4px; }
.attr-label-line { display: flex; justify-content: space-between; font-size: 0.725rem; color: var(--text-secondary); }
.attr-label-line strong { color: #ffffff; font-family: monospace; }
.attr-bar-track { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; }
.attr-bar-fill { height: 100%; border-radius: 3px; }
.fill--green { background: var(--accent-emerald); }
.fill--amber { background: var(--accent-amber); }
.fill--blue { background: var(--accent-blue); }
.fill--purple { background: var(--accent-purple); }
.attr-desc { font-size: 0.675rem; color: var(--text-muted); }
.attr-formula-note { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 10px; font-size: 0.7rem; color: var(--text-secondary); }

/* ── 15. Mobile Menu ─────────────────────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 76px) 16px calc(env(safe-area-inset-bottom) + 16px);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s, visibility 0.28s;
}

.mobile-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.mobile-menu__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(10px); }

.mobile-menu__sheet {
  position: relative;
  z-index: 351;
  width: min(420px, 100%);
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 96px);
  overflow-y: auto;
  background: #111115;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-menu__header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 12px; }
.mobile-menu__brand { display: flex; align-items: center; gap: 10px; }
.mobile-logo-img { width: 28px; height: 28px; border-radius: 50%; }
.mobile-brand-name { font-size: 0.95rem; font-weight: 700; color: #ffffff; }

.mobile-menu__close { background: transparent; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.mobile-menu__nav { display: flex; flex-direction: column; gap: 6px; }

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 10px;
  transition: background-color 0.2s, color 0.2s;
}

.mobile-nav-link:hover, .mobile-nav-link.active { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.mobile-nav-link i { font-size: 0.9rem; color: var(--accent-emerald); width: 16px; }

.mobile-menu__footer { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 14px; }
.mobile-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: #000000;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 12px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
}

/* ── Tabular Numerals on all Financial Numbers ────────────────────────────── */
.metric-value, .stat-value, .wic-price, .comp-price, .palette-item strong, .data-table td, #liveTickerText {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ── 17. Universal Detail Drawer (Single Unified Modal Architecture) ─────── */
.universal-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.universal-drawer-overlay:not([hidden]) {
  pointer-events: auto;
}

.universal-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity var(--motion-slow) var(--easing-smooth);
}

.universal-drawer-overlay.is-open .universal-drawer-backdrop {
  opacity: 1;
}

.universal-drawer-panel {
  position: relative;
  width: min(520px, 100vw);
  height: 100%;
  background: #09090c;
  border-left: 1px solid var(--panel-border);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--motion-slow) var(--easing-smooth);
  z-index: 2;
  overflow: hidden;
}

.universal-drawer-overlay.is-open .universal-drawer-panel {
  transform: translateX(0);
}

.ud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--panel-border);
  background: rgba(13, 13, 16, 0.9);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.ud-header-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.ud-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.ud-breadcrumb:hover {
  color: var(--accent-emerald);
}

.ud-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.ud-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--motion-fast);
}

.ud-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ud-tabs-row {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: rgba(18, 18, 22, 0.6);
  border-bottom: 1px solid var(--panel-border-subtle);
  flex-shrink: 0;
}

.ud-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--motion-fast);
}

.ud-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.ud-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  -webkit-overflow-scrolling: touch;
}

.ud-audit-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ud-audit-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  border-left: 2px solid var(--accent-emerald);
  padding-left: var(--space-3);
}

.ud-audit-step-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-emerald);
  letter-spacing: 0.04em;
}

.ud-provenance-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Math Variable Tooltip Highlight ──────────────────────────────────────── */
.math-var-clickable {
  color: var(--accent-cyan);
  cursor: pointer;
  border-bottom: 1px dashed rgba(34, 211, 238, 0.5);
  transition: color var(--motion-fast);
}

.math-var-clickable:hover {
  color: #ffffff;
}

/* ── Intent Preview Card in Command Palette ──────────────────────────────── */
.intent-preview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(81, 207, 102, 0.08);
  border: 1px solid rgba(81, 207, 102, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.intent-preview-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
}

.intent-preview-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

/* ── Disambiguation Grid ─────────────────────────────────────────────────── */
.disambiguate-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.disambiguate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background-color var(--motion-fast), border-color var(--motion-fast);
}

.disambiguate-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-blue);
}

/* ── 19. Professional Candlestick / OHLC Canvas Chart ─────────────────────── */
.candle-chart-container {
  position: relative;
  width: 100%;
  height: 380px;
  background: #08080b;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.candle-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  background: rgba(18, 18, 22, 0.7);
  border-bottom: 1px solid var(--panel-border-subtle);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.candle-tf-group, .candle-ind-group {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.candle-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--motion-fast);
}

.candle-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.candle-btn.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.candle-btn.ind--active {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
  background: rgba(250, 176, 5, 0.1);
}

.candle-btn.ema--active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.1);
}

.candle-hud {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 4px var(--space-3);
  background: rgba(13, 13, 16, 0.85);
  font-size: 0.675rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--panel-border-subtle);
  flex-wrap: wrap;
}

.candle-hud-val {
  color: #ffffff;
  font-weight: 700;
}

.candle-canvas-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  cursor: crosshair;
}

#candlestickCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.candle-chart-container.chart-fullscreen {
  position: fixed !important;
  inset: 16px !important;
  z-index: 99999 !important;
  background: rgba(12, 16, 23, 0.98) !important;
  backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(34, 211, 238, 0.4) !important;
  border-radius: 12px !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(34, 211, 238, 0.15) !important;
  height: calc(100vh - 32px) !important;
  display: flex !important;
  flex-direction: column !important;
}

.candle-chart-container.chart-fullscreen .candle-canvas-wrap {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.candle-canvas-wrap.is-dragging {
  cursor: grabbing !important;
}

.candle-zoom-group {
  display: flex;
  align-items: center;
  gap: 4px;
}


/* ── 20. Portfolio Manager Drawer & Accounting Interface ──────────────────── */
.pm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.pm-overlay:not([hidden]) {
  pointer-events: auto;
}

.pm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity var(--motion-slow) var(--easing-smooth);
}

.pm-overlay.is-open .pm-backdrop {
  opacity: 1;
}

.pm-panel {
  position: relative;
  width: min(880px, 100vw);
  height: 100%;
  background: #09090c;
  border-left: 1px solid var(--panel-border);
  box-shadow: -16px 0 64px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--motion-slow) var(--easing-smooth);
  z-index: 2;
  overflow: hidden;
}

.pm-overlay.is-open .pm-panel {
  transform: translateX(0);
}

.pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: rgba(13, 13, 16, 0.9);
  border-bottom: 1px solid var(--panel-border);
  flex-shrink: 0;
}

.pm-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: rgba(18, 18, 22, 0.5);
  border-bottom: 1px solid var(--panel-border);
  flex-shrink: 0;
}

.pm-stat-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pm-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.pm-stat-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
}

.pm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--panel-border-subtle);
  flex-wrap: wrap;
  gap: var(--space-3);
}

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

.pm-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--motion-fast);
}

.pm-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.pm-action-btn.primary {
  background: var(--accent-emerald);
  color: #000000;
  border: none;
}

.pm-action-btn.primary:hover {
  background: #45b356;
}

.pm-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.pm-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.775rem;
}

.pm-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--panel-border);
  font-size: 0.675rem;
  letter-spacing: 0.04em;
}

.pm-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-border-subtle);
  color: #e4e4e7;
}

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

.pm-timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: var(--space-2);
}

.pm-timeline-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.pm-timeline-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.pm-timeline-badge.buy {
  background: rgba(81, 207, 102, 0.15);
  color: var(--accent-emerald);
}

.pm-timeline-badge.sell {
  background: rgba(255, 107, 107, 0.15);
  color: var(--accent-red);
}

/* ── 21. Add / Edit Transaction Popover Modal ────────────────────────────── */
.tx-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.tx-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.tx-modal-panel {
  position: relative;
  width: min(480px, 100%);
  background: #0d0d12;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  z-index: 2;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95);
}

.tx-form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.tx-form-label {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.tx-form-input, .tx-form-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 8px 12px;
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
}

.tx-form-input:focus, .tx-form-select:focus {
  border-color: var(--accent-emerald);
}

.tx-type-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.tx-type-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 6px 0;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--motion-fast);
}

.tx-type-btn.active.buy {
  background: var(--accent-emerald);
  color: #000;
}

.tx-type-btn.active.sell {
  background: var(--accent-red);
  color: #fff;
}

/* ── 22. Quant Speculations & Monte Carlo Price Prediction Desk ───────────── */
.spec-overlay {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.spec-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
}

.spec-panel {
  position: relative;
  width: min(1080px, 96vw);
  max-height: 92vh;
  background: #09090c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  z-index: 2;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}

.spec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: rgba(18, 18, 24, 0.6);
  border-bottom: 1px solid var(--panel-border-subtle);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.spec-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.spec-ticker-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  outline: none;
}

.spec-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
}

/* Spec Presets Bar */
.spec-presets-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.spec-chips-track {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.spec-preset-chip {
  font-size: 0.72rem;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--motion-fast);
}

.spec-preset-chip:hover {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-1px);
}

.spec-stance-btn.active[data-stance="long"] {
  background: rgba(81, 207, 102, 0.2);
  border-color: var(--accent-emerald);
  color: #ffffff;
}

.spec-stance-btn.active[data-stance="short"] {
  background: rgba(255, 107, 107, 0.2);
  border-color: var(--accent-red);
  color: #ffffff;
}

.spec-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
}

.spec-metric-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-metric-label {
  font-size: 0.675rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.spec-metric-val {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

.spec-prob-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
}

.spec-prob-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spec-prob-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.725rem;
  font-weight: 600;
}

.spec-prob-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.spec-prob-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--motion-base);
}

.spec-chart-panel {
  display: flex;
  flex-direction: column;
  background: #050508;
  border: 1px solid var(--panel-border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 380px;
}

.spec-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  background: rgba(18, 18, 22, 0.7);
  border-bottom: 1px solid var(--panel-border-subtle);
  font-size: 0.75rem;
}

.spec-hud {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 4px var(--space-4);
  background: rgba(10, 10, 14, 0.9);
  font-size: 0.675rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border-bottom: 1px solid var(--panel-border-subtle);
}

.spec-canvas-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  cursor: crosshair;
}

#specCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.spec-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.spec-slider-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.spec-slider-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.spec-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.spec-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

/* ── 23. Modal Hidden Visibility Guarantees ───────────────────────────────── */
.spec-overlay[hidden],
.canvas-modal-overlay[hidden],
.why-modal-overlay[hidden],
.company-modal-overlay[hidden],
.palette-overlay[hidden],
.pm-overlay[hidden],
.tx-modal-overlay[hidden],
.universal-drawer-overlay[hidden],
.market-pulse-drawer[hidden],
.watchlist-drawer[hidden] {
  display: none !important;
}

/* ── 24. Quantitative Methodology & Institutional Architecture Section ───── */
.methodology-wrapper {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(40px, 6vh, 80px) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  position: relative;
  z-index: 10;
}

.methodology-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.methodology-badge {
  font-size: 0.675rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-emerald);
  background: rgba(81, 207, 102, 0.1);
  border: 1px solid rgba(81, 207, 102, 0.25);
  padding: 4px 12px;
  border-radius: 100px;
}

.methodology-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0;
}

.methodology-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.6;
}

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

.methodology-card {
  background: rgba(14, 14, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s, border-color 0.25s;
}

.methodology-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
}

.meth-card-top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.meth-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.meth-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.meth-card-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.meth-card-math {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  text-align: center;
  font-size: 0.95rem;
  color: #ffffff;
  overflow-x: auto;
}

.meth-card-footer {
  font-size: 0.725rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--panel-border-subtle);
  padding-top: var(--space-2);
}

/* Asset Universe Grid Section */
.universe-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.universe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}

.universe-card {
  background: rgba(18, 18, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  cursor: pointer;
  transition: all 0.2s;
}

.universe-card:hover {
  background: rgba(28, 28, 34, 0.95);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.uc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.uc-sym {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.05rem;
  color: #ffffff;
}

.uc-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uc-metrics {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--space-1);
}

.uc-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
}

.uc-chg {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.775rem;
}

.uc-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.675rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: var(--space-2);
}

/* ══════════════════════════════════════════════════════════════════════════
   SEARCHABLE COMMAND-STYLE SECURITY SELECTOR
   ══════════════════════════════════════════════════════════════════════════ */
.sec-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.sec-picker-overlay[hidden] {
  display: none !important;
}

.sec-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.sec-picker-panel {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  background: #09090c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.9), 0 0 40px rgba(34, 211, 238, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sec-picker-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sec-picker-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  gap: 10px;
}

.sec-picker-search-wrap:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.25);
}

.sec-picker-icon {
  color: var(--accent-cyan);
  font-size: 0.9rem;
}

.sec-picker-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
}

.sec-picker-input::placeholder {
  color: var(--text-muted);
}

.sec-picker-tabs {
  display: flex;
  gap: 6px;
  padding: 8px var(--space-5);
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  overflow-x: auto;
  scrollbar-width: none;
}

.sec-picker-tabs::-webkit-scrollbar {
  display: none;
}

.sec-picker-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.725rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--motion-fast);
}

.sec-picker-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.sec-picker-tab.active {
  background: #ffffff;
  color: #000000;
  font-weight: 700;
}

.sec-picker-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 400px;
}

.sec-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--motion-fast);
}

.sec-picker-item:hover,
.sec-picker-item.active {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateX(3px);
}

.sp-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-item-sym {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
}

.sp-item-name {
  font-size: 0.775rem;
  color: var(--text-secondary);
}

.sp-item-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.sp-item-tag.tag--nse { background: rgba(34, 211, 238, 0.15); color: #22d3ee; }
.sp-item-tag.tag--bse { background: rgba(250, 176, 5, 0.15); color: #fab005; }
.sp-item-tag.tag--us { background: rgba(81, 207, 102, 0.15); color: #51CF66; }
.sp-item-tag.tag--index { background: rgba(204, 93, 232, 0.15); color: #CC5DE8; }

.sp-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.sp-item-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  color: #ffffff;
}

.sp-item-chg {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  font-weight: 600;
}

.sec-picker-footer {
  padding: 8px var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-4);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sec-picker-footer kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 5px;
  border-radius: 3px;
  color: #fff;
  font-family: monospace;
}

/* Ticker Selector Button Trigger */
.security-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 18, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: #ffffff;
  cursor: pointer;
  transition: all var(--motion-fast);
}

.security-picker-btn:hover {
  border-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.08);
}

.sp-btn-ticker {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  color: #ffffff;
}

.sp-btn-name {
  font-size: 0.725rem;
  color: var(--text-secondary);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════════════════
   OBSERVATORY 6-PART DYNAMIC DISCOVERY CARDS
   ══════════════════════════════════════════════════════════════════════════ */
.obs-discovery-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.obs-6part-card {
  background: #09090c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: border-color var(--motion-fast);
}

.obs-6part-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
}

.obs-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.provenance-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.provenance-tag.tag--fact { background: rgba(81, 207, 102, 0.15); color: #51CF66; border: 1px solid rgba(81, 207, 102, 0.3); }
.provenance-tag.tag--obs { background: rgba(34, 211, 238, 0.15); color: #22d3ee; border: 1px solid rgba(34, 211, 238, 0.3); }
.provenance-tag.tag--model { background: rgba(204, 93, 232, 0.15); color: #CC5DE8; border: 1px solid rgba(204, 93, 232, 0.3); }
.provenance-tag.tag--scenario { background: rgba(250, 176, 5, 0.15); color: #fab005; border: 1px solid rgba(250, 176, 5, 0.3); }
.provenance-tag.tag--spec { background: rgba(255, 107, 107, 0.15); color: #FF6B6B; border: 1px solid rgba(255, 107, 107, 0.3); }

.obs-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.obs-6part-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.obs-grid-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.obs-block-title {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.obs-block-text {
  font-size: 0.85rem;
  color: #e4e4e7;
  line-height: 1.5;
}

.obs-portfolio-impact-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(81, 207, 102, 0.12);
  border: 1px solid rgba(81, 207, 102, 0.3);
  color: var(--accent-emerald);
}

.obs-related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.obs-ticker-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--motion-fast);
}

.obs-ticker-btn:hover {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
}

.obs-sources-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.725rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: var(--space-2);
}

.obs-source-link {
  color: var(--text-secondary);
  text-decoration: none;
}

.obs-source-link:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════════════════
   SCENARIO / WHAT-IF ANALYSIS CONTROLS
   ══════════════════════════════════════════════════════════════════════════ */
.scenario-vars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.scenario-driver-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scenario-driver-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.scenario-driver-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
}

.scenario-result-banner {
  background: radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.12), transparent 70%), #0d0d12;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* ══════════════════════════════════════════════════════════════════════════
   FINANCIAL INTELLIGENCE CANVAS & DUAL-MODE CHART SUITE
   ══════════════════════════════════════════════════════════════════════════ */
.canvas-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vh, 20px) clamp(10px, 2vw, 24px);
  box-sizing: border-box;
}

.canvas-modal-overlay[hidden] {
  display: none !important;
}

.canvas-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.canvas-modal-window {
  position: relative;
  z-index: 261;
  width: min(1340px, 98vw);
  height: min(94vh, 94dvh);
  max-height: 94dvh;
  background: #09090c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.98), 0 0 40px rgba(34, 211, 238, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d0d12;
  flex-shrink: 0;
  gap: 16px;
}

.canvas-header-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.canvas-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.canvas-query-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.canvas-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.canvas-mode-indicator {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 100px;
}

.canvas-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.canvas-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.canvas-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #09090c;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Financial Canvas Interactive Dual-Mode Chart Component ──────────────── */
.canvas-chart-suite {
  background: #0d0d12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.canvas-chart-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.chart-mode-pill {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 2px;
  gap: 2px;
}

.chart-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.chart-mode-btn:hover {
  color: #ffffff;
}

.chart-mode-btn.active {
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.canvas-chart-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
  background: #050508;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
}

.canvas-chart-wrapper canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Deep Understandable Explanation Banner */
.understandable-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .understandable-insights-grid {
    grid-template-columns: 1fr;
  }
}

.insight-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.insight-card-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.insight-card-text strong {
  color: #ffffff;
}

/* ══════════════════════════════════════════════════════════════════════════
   UNIVERSAL REAL-TIME MARKET RIBBON & INFINITE MARQUEE SCROLLER
   ══════════════════════════════════════════════════════════════════════════ */
.market-ribbon-card {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  background: rgba(13, 13, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full, 9999px);
  padding: 6px 14px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
}

.market-ribbon-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  animation: marketMarqueeScroll 42s linear infinite;
  will-change: transform;
}

.market-ribbon-track:hover,
.market-ribbon-card:hover .market-ribbon-track,
.market-ribbon-track.is-paused {
  animation-play-state: paused;
}

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

.ribbon-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-full, 9999px);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ribbon-item:hover {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-1px);
}

.ribbon-symbol {
  font-size: 0.725rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono, monospace);
}

.ribbon-price {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono, monospace);
}

.ribbon-chg {
  font-size: 0.675rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}

.text-emerald { color: #51CF66 !important; }
.text-red { color: #FF6B6B !important; }
.text-cyan { color: #22D3EE !important; }
.text-amber { color: #FAB005 !important; }

/* Micro-Tick Price Pulse Animations */
@keyframes flashGreen {
  0% { background-color: rgba(81, 207, 102, 0.45); color: #fff; }
  100% { background-color: transparent; }
}

@keyframes flashRed {
  0% { background-color: rgba(255, 107, 107, 0.45); color: #fff; }
  100% { background-color: transparent; }
}

.price-flash-up {
  animation: flashGreen 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  border-radius: 4px;
}

.price-flash-down {
  animation: flashRed 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  border-radius: 4px;
}

/* Real-Time Live Order Flow Tape Strip */
.live-tape-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(18, 18, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.tape-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald, #51CF66);
  box-shadow: 0 0 8px var(--accent-emerald, #51CF66);
  animation: pulseGreen 1.6s infinite;
  flex-shrink: 0;
}

.tape-ticker-badge {
  font-weight: 800;
  color: #fff;
}

.tape-side-buy {
  color: #51CF66;
  font-weight: 700;
}

.tape-side-sell {
  color: #FF6B6B;
  font-weight: 700;
}

.tape-block-deal {
  background: rgba(250, 176, 5, 0.15);
  color: #fab005;
  border: 1px solid rgba(250, 176, 5, 0.3);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 800;
}

/* Cross-Platform Action Jump Buttons */
.cross-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cross-action-btn:hover {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.35);
  color: #22d3ee;
  transform: translateY(-1px);
}

/* ── Institutional Topbar Hub Dropdowns (Quant Core, Desks & Ops) ────────── */
.topbar-hub-dropdown {
  position: relative;
  display: inline-block;
}

.topbar-hub-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  color: #e4e4e7;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.topbar-hub-trigger:hover,
.topbar-hub-dropdown.open .topbar-hub-trigger {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.05);
}

.topbar-hub-trigger .caret-icon {
  font-size: 0.6rem;
  color: #71717a;
  transition: transform 0.2s;
  margin-left: 2px;
}

.topbar-hub-dropdown.open .topbar-hub-trigger .caret-icon {
  transform: rotate(180deg);
  color: #fff;
}

.topbar-hub-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  background: #090b10;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  padding: 6px;
  display: none;
  z-index: 1200;
  backdrop-filter: blur(24px);
}

.topbar-hub-dropdown.open .topbar-hub-menu {
  display: block;
  animation: fadeInHubMenu 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInHubMenu {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hub-menu-header {
  font-size: 0.62rem;
  font-weight: 800;
  color: #71717a;
  letter-spacing: 0.08em;
  padding: 6px 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 4px;
}

.hub-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #e4e4e7;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
  box-sizing: border-box;
}

.hub-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hub-menu-item i {
  width: 20px;
  font-size: 0.85rem;
  text-align: center;
  flex-shrink: 0;
}

.hub-item-text {
  flex: 1;
  min-width: 0;
}

.hub-item-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: #f4f4f5;
  line-height: 1.25;
}

.hub-item-sub {
  font-size: 0.65rem;
  color: #71717a;
  line-height: 1.2;
  margin-top: 1px;
}

.hub-menu-item:hover .hub-item-sub {
  color: #a1a1aa;
}

.hub-badge {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* KaTeX selection bug fix: prevent hidden MathML from duplicating into clipboard */
.katex-mathml {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 1px !important;
  overflow: hidden !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}








