/* ============================================================
   Neural Frontier — main.css
   Design tokens, reset, layout, panel, skeleton, transitions
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&display=swap');

/* ---------- Design Tokens & Color Palette ---------- */
:root {
  --font-family: 'Syne', system-ui, -apple-system, sans-serif;

  /* Fondo mesh gradient morado/azul */
  --bg-mesh: radial-gradient(ellipse at 20% 50%, #2d0a4e 0%, transparent 60%),
             radial-gradient(ellipse at 80% 20%, #4a1060 0%, transparent 50%),
             radial-gradient(ellipse at 70% 85%, #0a1628 0%, transparent 55%),
             radial-gradient(ellipse at 60% 80%, #1a0533 0%, transparent 60%),
             #080010;

  --bg-primary:    #080010;
  --bg-secondary:  rgba(20, 5, 40, 0.5);
  --bg-surface:    rgba(30, 10, 50, 0.6);
  --bg-card:       rgba(40, 15, 60, 0.55);
  --bg-card-hover: rgba(55, 20, 80, 0.65);
  --bg-sidebar:    rgba(15, 5, 28, 0.85);

  --border:       rgba(140, 60, 200, 0.2);
  --border-hover: rgba(180, 100, 240, 0.4);
  --border-subtle: rgba(140, 60, 200, 0.12);

  --accent:       #c084fc;
  --accent-hover: #a855f7;
  --accent-subtle: rgba(192, 132, 252, 0.12);
  --accent-blue:       #3b82f6;
  --accent-blue-hover: #60a5fa;

  --glow-purple: rgba(192, 132, 252, 0.15);
  --glow-blue:   rgba(59, 130, 246, 0.1);

  --text-primary:   #f5f0ff;
  --text-secondary: #9d8ab5;
  --text-muted:     #5a4d6e;

  --positive: #22c55e;
  --negative: #ef4444;
  --warning:  #f59e0b;

  /* Glass effect */
  --glass-bg:            rgba(14, 6, 32, 0.70);
  --glass-bg-subtle:     rgba(14, 6, 32, 0.45);
  --glass-border:        rgba(157, 125, 217, 0.18);
  --glass-border-subtle: rgba(157, 125, 217, 0.08);
  --glass-blur:          blur(24px);
  --glass-blur-light:    blur(16px);

  /* Backward-compat aliases */
  --bg:           var(--bg-primary);
  --surface:      var(--bg-surface);
  --surface-hover:var(--bg-card-hover);
  --sidebar-bg:   var(--bg-sidebar);
  --scrollbar-thumb: rgba(140, 60, 200, 0.3);
  --scrollbar-track: rgba(8, 0, 16, 0.5);
  --status-empty: rgba(140, 60, 200, 0.2);

  /* Layout */
  --ticker-height: 32px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --transition: 200ms ease;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);

  --sidebar-width:     220px;
  --sidebar-collapsed: 64px;
  --header-height:     72px;

  /* ── Typography scale ─────────────────────────────────────── */
  --text-3xs:  7.5px;
  --text-2xs:  8px;
  --text-xs:   10px;
  --text-sm:   11px;
  --text-base: 12px;
  --text-md:   13px;
  --text-lg:   14px;
  --text-xl:   18px;
  --text-2xl:  20px;
  --text-3xl:  36px;

  /* ── Font weights ─────────────────────────────────────────── */
  --fw-normal:    400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-extrabold: 800;
  --fw-black:     900;

  /* ── Spacing scale ────────────────────────────────────────── */
  --space-1:  4px;
  --space-2:  6px;
  --space-3:  8px;
  --space-4:  10px;
  --space-5:  12px;
  --space-6:  14px;
  --space-7:  16px;
  --space-8:  20px;
  --space-9:  24px;
  --space-10: 32px;

  /* ── Border radii ─────────────────────────────────────────── */
  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-full: 9999px;

  /* ── Semantic signal colors ───────────────────────────────── */
  --c-pos:       #22c55e;
  --c-pos-muted: #86efac;
  --c-neg:       #ef4444;
  --c-neg-muted: #f97316;
  --c-warn:      #eab308;
  --c-neutral:   #6b7280;
  --c-indigo:    #6366f1;
  --c-blue:      #3b82f6;
  --c-purple:    #8b5cf6;

  /* ── Extended shadows ─────────────────────────────────────── */
  --shadow-card:        0 4px 20px rgba(0,0,0,0.40), inset 0 1px 0 rgba(255,255,255,0.07);
  --shadow-lg:          0 8px 40px rgba(0,0,0,0.55);
  --shadow-glow-accent: 0 0 24px rgba(192,132,252,0.18);
  --shadow-glow-pos:    0 0 24px rgba(34,197,94,0.18);
  --shadow-glow-neg:    0 0 24px rgba(239,68,68,0.18);

  /* ── Elevation levels (1 = flat · 4 = floating modal) ────── */
  --elevation-1: 0 2px 8px rgba(0,0,0,0.28);
  --elevation-2: 0 4px 20px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.07);
  --elevation-3: 0 8px 40px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.09);
  --elevation-4: 0 20px 60px rgba(0,0,0,0.65), 0 0 0 1px rgba(157,125,217,0.15);

  /* ── Animation durations ──────────────────────────────────── */
  --dur-fast:   150ms;
  --dur-base:   200ms;
  --dur-medium: 300ms;
  --dur-slow:   400ms;
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Light Mode ---------- */
[data-theme="light"] {
  /* Mesh gradient: azul · turquesa · verde sobre blanco */
  --bg-mesh: radial-gradient(ellipse at 15% 40%,  rgba(14, 165, 233, 0.30) 0%, transparent 55%),
             radial-gradient(ellipse at 85% 15%,  rgba(20, 184, 166, 0.28) 0%, transparent 50%),
             radial-gradient(ellipse at 75% 88%,  rgba(34, 197, 94,  0.22) 0%, transparent 50%),
             radial-gradient(ellipse at 40% 70%,  rgba(56, 189, 248, 0.18) 0%, transparent 55%),
             radial-gradient(ellipse at 60% 30%,  rgba(6,  182, 212, 0.15) 0%, transparent 45%),
             #f0f9ff;

  --bg-primary:    #f0f9ff;
  --bg-secondary:  rgba(224, 242, 254, 0.6);
  --bg-surface:    rgba(255, 255, 255, 0.72);
  --bg-card:       rgba(255, 255, 255, 0.80);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-sidebar:    rgba(240, 249, 255, 0.94);

  --border:        rgba(14, 165, 233, 0.20);
  --border-hover:  rgba(20, 184, 166, 0.45);
  --border-subtle: rgba(14, 165, 233, 0.10);

  --accent:        #0ea5e9;
  --accent-hover:  #0284c7;
  --accent-subtle: rgba(14, 165, 233, 0.10);
  --accent-blue:       #0ea5e9;
  --accent-blue-hover: #0284c7;

  --glow-purple: rgba(14, 165, 233, 0.12);
  --glow-blue:   rgba(20, 184, 166, 0.10);

  --text-primary:   #0f172a;
  --text-secondary: #334155;
  --text-muted:     #94a3b8;

  --positive: #16a34a;
  --negative: #dc2626;
  --warning:  #d97706;

  /* Glass efecto sobre blanco */
  --glass-bg:            rgba(255, 255, 255, 0.65);
  --glass-bg-subtle:     rgba(255, 255, 255, 0.42);
  --glass-border:        rgba(14, 165, 233, 0.18);
  --glass-border-subtle: rgba(14, 165, 233, 0.08);
  --glass-blur:          blur(20px);
  --glass-blur-light:    blur(12px);

  --elevation-1: 0 2px 8px rgba(14,165,233,0.08);
  --elevation-2: 0 4px 20px rgba(14,165,233,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
  --elevation-3: 0 8px 40px rgba(14,165,233,0.16), inset 0 1px 0 rgba(255,255,255,0.8);
  --elevation-4: 0 20px 60px rgba(14,165,233,0.20), 0 0 0 1px rgba(14,165,233,0.15);

  /* Aliases */
  --bg:            var(--bg-primary);
  --surface:       var(--bg-surface);
  --surface-hover: var(--bg-card-hover);
  --sidebar-bg:    var(--bg-sidebar);

  --scrollbar-thumb: rgba(14, 165, 233, 0.30);
  --scrollbar-track: rgba(224, 242, 254, 0.60);
  --status-empty:    rgba(14, 165, 233, 0.15);

  --shadow-sm: 0 1px 3px rgba(14, 165, 233, 0.10);
  --shadow-md: 0 4px 16px rgba(14, 165, 233, 0.15);
}

/* Light mode — override body to remove the dark overlay gradients */
[data-theme="light"] body {
  background: var(--bg-mesh);
}

/* Ajustes específicos light — elementos con colores hardcodeados */
[data-theme="light"] .app-header {
  background: rgba(240, 249, 255, 0.88);
  border-bottom-color: rgba(14, 165, 233, 0.18);
}

[data-theme="light"] .sidebar {
  background: rgba(236, 254, 255, 0.92);
  border-right-color: rgba(14, 165, 233, 0.15);
}

[data-theme="light"] .nav-item:hover,
[data-theme="light"] .nav-item.active {
  background: rgba(14, 165, 233, 0.10);
  color: #0ea5e9;
}

[data-theme="light"] .nav-item.active {
  border-left-color: #0ea5e9;
}

[data-theme="light"] .layer-compact-card {
  background: rgba(255, 255, 255, 0.80);
  border-color: rgba(14, 165, 233, 0.18);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
}

[data-theme="light"] .layer-compact-card.active {
  border-color: rgba(14, 165, 233, 0.50);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15), 0 4px 16px rgba(14, 165, 233, 0.12);
}

[data-theme="light"] .lcc-val {
  color: #0f172a;
}

[data-theme="light"] .geo-isg-panel,
[data-theme="light"] .ai-panel-drawer,
[data-theme="light"] .settings-panel {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(14, 165, 233, 0.18);
}

[data-theme="light"] .news-card {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(14, 165, 233, 0.10);
}

[data-theme="light"] .news-card:hover {
  background: rgba(224, 242, 254, 0.70);
}

[data-theme="light"] .dash-card {
  background: rgba(255, 255, 255, 0.80);
  border-color: rgba(14, 165, 233, 0.15);
}

[data-theme="light"] .geo-section-header h2 {
  color: #0f172a;
}

[data-theme="light"] .cfr-iframe,
[data-theme="light"] .warwatch-iframe {
  background: #f0f9ff;
}

[data-theme="light"] .warwatch-fallback {
  background: rgba(240, 249, 255, 0.95);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] .geo-refresh-btn {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(14, 165, 233, 0.25);
  color: #0f172a;
}

[data-theme="light"] .search-input {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(14, 165, 233, 0.25);
  color: #0f172a;
}

[data-theme="light"] .search-input::placeholder {
  color: #94a3b8;
}

[data-theme="light"] .autocomplete-dropdown {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(14, 165, 233, 0.20);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.12);
}

[data-theme="light"] .theme-toggle {
  background: rgba(14, 165, 233, 0.10);
  border-color: rgba(14, 165, 233, 0.25);
  color: #0ea5e9;
}

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

[hidden] { display: none !important; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-family);
  background:
    radial-gradient(ellipse 80% 60% at 15% 40%, rgba(99,66,179,0.09) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(56,189,248,0.05) 0%, transparent 50%),
    var(--bg-mesh);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100dvh;
  overflow: hidden;
}

a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { font-family: var(--font-family); cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--r-xs); }

/* ---------- App Layout ---------- */
.app-layout {
  display: flex;
  height: calc(100dvh - var(--ticker-height));
  width: 100vw;
  overflow: hidden;
  background: transparent;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ---------- Section Views ---------- */
.section-view {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.section-view.fade-in {
  animation: sectionFadeIn 200ms ease forwards;
}

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

/* ---------- Analysis Grid ---------- */
.analysis-grid {
  display: grid;
  grid-template-columns: 57fr 43fr;
  gap: 12px;
  padding: 12px 8px 14px 14px;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.chart-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding-bottom: 8px;
}

/* Gráfico principal Yahoo Finance */
.chart-col .chart-container {
  flex: 1;
  min-height: 400px;
  max-height: 620px;
  overflow: hidden;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
}

.buy-score-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
  min-height: 80px;
}
.bsc-left { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bsc-title { font-size: 10px; font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.bsc-subtitle { font-size: 9px; color: var(--text-muted); }
.bsc-center { display: flex; align-items: baseline; gap: 3px; flex-shrink: 0; }
.bsc-score { font-size: 36px; font-weight: var(--fw-bold); line-height: 1; transition: color 0.4s ease, text-shadow 0.4s ease; color: var(--text-primary); text-shadow: 0 0 48px color-mix(in srgb, currentColor 30%, transparent); }
.bsc-scale { font-size: 14px; color: var(--text-muted); }
.bsc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.bsc-label { font-size: 11px; font-weight: var(--fw-semibold); transition: color 0.4s ease; color: var(--text-muted); }
.bsc-dots { display: flex; gap: 4px; }
.bsc-dot { width: 7px; height: 7px; border-radius: 50%; background: #4b5563; transition: background 0.4s ease; }

/* Cards col: 2-column grid to fill the extra width */
.cards-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: min-content;
  gap: 8px;
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding-bottom: 8px;
}

/* Favorites card spans both columns */
.cards-col .fav-card {
  grid-column: 1 / -1;
}

/* ---------- Layer Panel (fullscreen modal) ---------- */
.layer-panel {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}
.layer-panel:not([hidden]) {
  pointer-events: auto;
}

.lp-overlay {
  display: none;
}

/* Drawer: fondo SÓLIDO para tapar toda la app */
.lp-drawer {
  position: fixed;
  inset: 0;
  z-index: 2001;
  background: var(--bg-primary);
  border-top: 2px solid var(--accent);
  opacity: 0;
  transform: translateY(22px) scale(0.997);
  transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.layer-panel.open .lp-drawer {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.lp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 36px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}
.lp-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lp-icon {
  display: flex;
  align-items: center;
  color: var(--accent);
  font-size: 1.25rem;
}
.lp-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lp-title {
  font-size: 1.1rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.lp-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.lp-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
  letter-spacing: 0.02em;
}
.lp-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lp-close, .lp-refresh {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
  flex-shrink: 0;
  cursor: pointer;
}
.lp-close svg, .lp-refresh svg {
  width: 18px;
  height: 18px;
}
.lp-close:hover, .lp-refresh:hover {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--border-hover);
}
.lp-refresh:disabled {
  opacity: 0.5;
  cursor: default;
}
.lp-refresh.is-spinning svg {
  animation: lp-refresh-spin 0.8s linear infinite;
}
@keyframes lp-refresh-spin {
  to { transform: rotate(360deg); }
}

.lp-body {
  flex: 1;
  overflow-y: auto;
  padding: 36px 52px;
  min-height: 0;
  box-sizing: border-box;
}
.lp-body > div {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
}

/* ---------- Layer Content Store (hidden) ---------- */
#lcs {
  display: none;
  position: absolute;
}

/* ---------- Skeleton Loader ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--border-subtle) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sk-line  { height: 13px; border-radius: var(--r-xs); }
.sk-block { border-radius: 10px; }
.layer-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

/* ---------- Settings Section ---------- */
.settings-section {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  min-height: 0;
}
.settings-header {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.settings-header h2 {
  font-size: 1.2rem;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.02em;
}
.settings-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 14px;
}
.settings-group h3 {
  font-size: 0.72rem;
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.settings-row:last-child { border-bottom: none; padding-bottom: 0; }
.settings-row label { font-size: 0.87rem; color: var(--text-primary); font-weight: var(--fw-medium); }
.settings-row p { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.settings-label-group { display: flex; flex-direction: column; gap: 2px; }
.settings-theme-btns  { display: flex; gap: 6px; }
.settings-theme-btn {
  padding: 5px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-family);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--transition);
}
.settings-theme-btn:hover, .settings-theme-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}
.settings-input {
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 0.83rem;
  font-family: var(--font-family);
  width: 110px;
  outline: none;
  transition: border-color var(--transition);
}
.settings-input:focus { border-color: var(--accent); }
.settings-danger-btn {
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--negative);
  background: transparent;
  color: var(--negative);
  font-size: 0.8rem;
  font-family: var(--font-family);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--transition);
}
.settings-danger-btn:hover { background: rgba(239,68,68,0.1); }
.settings-save-note { font-size: 0.76rem; color: var(--text-muted); text-align: center; margin-top: 18px; }

/* ---------- Placeholder Section ---------- */
.placeholder-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.placeholder-content { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.placeholder-content h2 { font-size: 1.4rem; font-weight: var(--fw-semibold); color: var(--text-primary); opacity: 0.5; }
.placeholder-content p  { font-size: 0.93rem; color: var(--text-secondary); }

/* ---------- Version footer ---------- */
.app-version {
  flex-shrink: 0;
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 4px 0 6px;
  letter-spacing: 0.05em;
  opacity: 0.5;
  user-select: none;
}

/* ---------- Section Header Bar ---------- */
.section-header-bar {
  padding: 14px 16px 10px;
  flex-shrink: 0;
}
.section-title {
  display: block;
  font-size: 1rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.section-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Forex / Macro Grid ---------- */
.forex-grid, .macro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  padding: 0 14px 14px;
  flex: 1;
  min-height: 0;
}

.forex-card, .macro-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.forex-card-header, .macro-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--glass-border);
  gap: 6px;
}
.chart-data-src {
  font-size: 7.5px;
  font-weight: var(--fw-normal);
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.03em;
  opacity: 0.65;
  text-align: right;
  padding: 2px 10px 4px;
}

/* ---------- Focus Visible ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .analysis-grid { grid-template-columns: 1fr 260px; }
}
@media (max-width: 960px) {
  .analysis-grid { grid-template-columns: 1fr; }
  .cards-col { display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  body { overflow: auto; }
  .app-layout { flex-direction: column; height: auto; overflow: auto; }
  .analysis-grid { padding: 10px; gap: 8px; height: auto; }
  .chart-col { min-height: 400px; }
  .buy-score-card { flex-wrap: wrap; min-height: auto; }
}

/* ==========================================================
   VIX Card (Macro section)
   ========================================================== */

.macro-card--vix .macro-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vix-header-right {
  display: flex;
  align-items: baseline;
  gap: 0;
}
.vix-body {
  flex: 1;
  min-height: 0;
  padding: 4px 8px 8px;
  display: flex;
  flex-direction: column;
}
.vix-body canvas {
  flex: 1;
  min-height: 0;
}

/* ==========================================================
   Conflict map layout
   ========================================================== */

.conflict-section { padding: 0 !important; }

.conflict-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.conflict-map-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.conflict-map-header {
  flex-shrink: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.geo-cfr-link {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  padding: 3px 8px;
  border: 1px solid rgba(192,132,252,0.3);
  border-radius: var(--r-sm);
  white-space: nowrap;
}

.geo-map-main-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.warwatch-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #0a0a1a;
}

.warwatch-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
}

.warwatch-fallback-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px;
}

.warwatch-fallback-content p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

.warwatch-open-btn {
  background: var(--accent-subtle);
  border: 1px solid rgba(192,132,252,0.3);
  color: var(--accent);
  border-radius: var(--r-md);
  padding: 9px 20px;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}

.warwatch-open-btn:hover { background: rgba(192,132,252,0.2); }

.conflict-side-col {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 14px;
  gap: 12px;
}

/* ISG impact panel */
.geo-isg-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.geo-isg-panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.geo-impact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.geo-impact-title {
  font-size: 11px;
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
}

.geo-impact-badge {
  font-size: 10px;
  font-weight: var(--fw-bold);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.geo-impact-bar-wrap {
  background: var(--border);
  border-radius: var(--r-xs);
  height: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.geo-impact-bar {
  height: 100%;
  border-radius: var(--r-xs);
  transition: width 0.6s ease;
}

.geo-impact-score-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.geo-impact-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  flex: 1;
  min-width: 100%;
  margin-top: 2px;
}

.geo-impact-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.geo-impact-stat {
  text-align: center;
  background: rgba(255,255,255,0.03);
  border-radius: var(--r-sm);
  padding: 6px 4px;
}

.geo-impact-stat-val {
  display: block;
  font-size: 18px;
  font-weight: var(--fw-extrabold);
  line-height: 1;
}

.geo-impact-stat-lbl {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================
   News sentiment gauge
   ========================================================== */

.sentiment-gauge-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 0 0 14px;
  flex-shrink: 0;
}

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

.sentiment-gauge-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.sentiment-bar-track {
  position: relative;
  height: 18px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--border);
  margin-bottom: 8px;
}

.sentiment-bar-zones {
  position: absolute;
  inset: 0;
  display: flex;
}

.sentiment-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 9px;
  transition: width 0.8s ease;
  z-index: 1;
}

.sentiment-bar-labels {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.sentiment-bar-labels span {
  font-size: 8px;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.55);
  flex: 1;
  text-align: center;
}

.sentiment-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sentiment-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sentiment-kw {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-xs);
  padding: 2px 7px;
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}

.news-count-chip {
  font-size: 11px;
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 3px 10px;
}

.news-source-name {
  font-size: 10px;
  color: var(--accent);
  font-weight: var(--fw-semibold);
  margin-left: auto;
}

/* ==========================================================
   Dashboard section
   ========================================================== */

.dashboard-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.dashboard-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
  padding: 60px 40px;
  width: 100%;
  max-width: 900px;
}

.dash-greeting-block {
  text-align: center;
}

.dash-greeting-line {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: var(--fw-extrabold);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, #f5f0ff 0%, #c084fc 60%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dash-greeting-name {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  opacity: 0.7;
  margin-top: 4px;
}

.dash-greeting-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.dash-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
}

.dash-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), border-color var(--transition), transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(192,132,252,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}

.dash-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(192,132,252,0.08);
}

.dash-card:hover::before { opacity: 1; }

.dash-card-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(192,132,252,0.1);
  color: var(--accent);
  border: 1px solid rgba(192,132,252,0.2);
}

.dash-card--news .dash-card-icon        { background:rgba(99,102,241,0.12); color:var(--c-indigo); border-color:rgba(99,102,241,0.25); }
.dash-card--conflict .dash-card-icon    { background:rgba(239,68,68,0.1);   color:var(--c-neg);    border-color:rgba(239,68,68,0.2); }
.dash-card--forex .dash-card-icon       { background:rgba(34,197,94,0.1);   color:var(--c-pos);    border-color:rgba(34,197,94,0.2); }
.dash-card--macro .dash-card-icon       { background:rgba(234,179,8,0.1);   color:var(--c-warn);   border-color:rgba(234,179,8,0.2); }
.dash-card--marine .dash-card-icon      { background:rgba(59,130,246,0.1);  color:var(--c-blue);   border-color:rgba(59,130,246,0.2); }

.dash-card-text {
  flex: 1;
  min-width: 0;
}

.dash-card-title {
  display: block;
  font-size: 13px;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.dash-card-desc {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-card-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--transition), transform var(--transition);
}

.dash-card:hover .dash-card-arrow { opacity: 1; transform: translateX(0); }

/* ==========================================================
   Main Chart — Yahoo Finance (reemplaza TradingView)
   ========================================================== */

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

.mc-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.mc-symbol {
  font-size: 13px;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.mc-price {
  font-size: 18px;
  font-weight: var(--fw-extrabold);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.mc-change {
  font-size: 11px;
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.mc-ranges {
  display: flex;
  gap: 3px;
}

.mc-range-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.mc-range-btn:hover {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
}

.mc-range-btn.active {
  background: rgba(99,102,241,0.18);
  border-color: rgba(99,102,241,0.6);
  color: #a5b4fc;
}

.mc-body {
  flex: 1;
  min-height: 0;
  padding: 6px 6px 6px;
  display: flex;
  flex-direction: column;
}

.mc-body canvas {
  flex: 1;
  min-height: 0;
}

.mc-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-muted);
  font-size: 12px;
}

.mc-error {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--negative);
  font-size: 12px;
  text-align: center;
  padding: 12px;
}

/* ==========================================================
   Mini Charts — Forex + Macro
   ========================================================== */

.mini-chart-body {
  flex: 1;
  min-height: 0;
  padding: 4px 6px 6px;
  display: flex;
  flex-direction: column;
}

.mini-chart-body canvas {
  flex: 1;
  min-height: 0;
}

.mini-chart-load {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-muted);
  font-size: 11px;
}

.mini-chart-err {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--negative);
  font-size: 11px;
  text-align: center;
}

.mini-chart-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  text-transform: none;
  letter-spacing: 0;
}

.mini-price {
  font-size: 12px;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================
   Help Panel — Manual EMA 2.0
   ========================================================== */

.help-panel {
  position: fixed;
  inset: 0;
  z-index: 2001;
  pointer-events: none;
}
.help-panel:not([hidden]) {
  pointer-events: auto;
}

.help-drawer {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  border-top: 2px solid var(--accent);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
}
.help-panel:not([hidden]) .help-drawer {
  transform: translateY(0);
  opacity: 1;
}

/* Header */
.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 36px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 16px;
}
.help-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.help-title {
  display: block;
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.help-subtitle {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-top: 1px;
}
.help-close {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 150ms, border-color 150ms, background 150ms;
  flex-shrink: 0;
}
.help-close:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* Tabs */
.help-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 36px 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
}
.help-tab {
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: var(--fw-semibold);
  font-family: var(--font-family);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 150ms, border-color 150ms;
}
.help-tab:hover { color: var(--text-primary); }
.help-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Body */
.help-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 40px 40px;
}
.help-layer[hidden] { display: none; }

.help-layer-desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 900px;
}
.help-layer-desc strong { color: var(--text-primary); }

/* Content grid */
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.help-grid--single { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .help-grid, .help-grid--single { grid-template-columns: 1fr; }
}

.help-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.help-block--full { grid-column: 1 / -1; }

.help-block-title {
  font-size: 0.8rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.help-formula {
  font-size: 0.72rem;
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  font-family: monospace;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 1px 6px;
}
.help-subtext {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Threshold table */
.ema-table {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ema-row {
  display: grid;
  grid-template-columns: 110px 140px 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border-left: 3px solid transparent;
  font-size: 0.78rem;
  line-height: 1.3;
}
.ema-row--vpos { background: rgba(34,197,94,0.08);  border-left-color: var(--c-pos); }
.ema-row--pos  { background: rgba(134,239,172,0.08); border-left-color: var(--c-pos-muted); }
.ema-row--neu  { background: rgba(234,179,8,0.07);   border-left-color: var(--c-warn); }
.ema-row--neg  { background: rgba(249,115,22,0.08);  border-left-color: var(--c-neg-muted); }
.ema-row--vneg { background: rgba(239,68,68,0.09);   border-left-color: var(--c-neg); }

.ema-range {
  font-family: monospace;
  font-size: 0.74rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  white-space: nowrap;
}
.ema-signal {
  font-weight: var(--fw-bold);
  font-size: 0.76rem;
  color: var(--text-primary);
}
.ema-row--vpos .ema-signal { color: var(--c-pos); }
.ema-row--pos  .ema-signal { color: var(--c-pos-muted); }
.ema-row--neu  .ema-signal { color: var(--c-warn); }
.ema-row--neg  .ema-signal { color: var(--c-neg-muted); }
.ema-row--vneg .ema-signal { color: var(--c-neg); }

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

/* 5-column variant (for full-width blocks) */
.ema-table--5col .ema-row {
  grid-template-columns: 110px 160px 1fr;
}

/* Note/tip under a table */
.help-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  margin: 4px 0 0;
  line-height: 1.5;
}

/* Tips list */
.help-tips { display: flex; flex-direction: column; gap: 10px; }
.help-tip {
  display: flex;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.help-tip strong { color: var(--text-primary); }
.help-tip-icon { font-size: 1rem; flex-shrink: 0; line-height: 1.4; }

/* ISG components */
.isg-components-help { display: flex; flex-direction: column; gap: 8px; }
.isg-comp-help {
  display: grid;
  grid-template-columns: 42px 80px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  border-left: 3px solid;
  font-size: 0.78rem;
}
.isg-comp-help--vix   { background: rgba(99,102,241,0.08); border-left-color: var(--c-indigo); }
.isg-comp-help--brent { background: rgba(234,179,8,0.08);  border-left-color: var(--c-warn); }
.isg-comp-help--ted   { background: rgba(239,68,68,0.08);  border-left-color: var(--c-neg); }
.isg-comp-weight {
  font-size: 0.9rem;
  font-weight: var(--fw-extrabold);
  color: var(--text-primary);
}
.isg-comp-name { font-weight: var(--fw-bold); color: var(--text-primary); }
.isg-comp-detail { color: var(--text-secondary); font-size: 0.74rem; line-height: 1.4; }

/* Geopolitics chain */
.help-chain { display: flex; flex-direction: column; gap: 0; }
.help-chain-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.help-chain-step strong { color: var(--text-primary); }
.help-chain-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.help-chain-arrow {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 4px 0;
}

/* ── Sidebar ? button styling ── */
#helpBtn { cursor: pointer; border: none; }

.mini-chg {
  font-size: 10px;
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}
