/* ═══════════════════════════════════════════════════════════════════
   NOIRVAULTS — Terminal Design System v9.0
   Bloomberg × Bookmap × Quant Desk aesthetic
   ═══════════════════════════════════════════════════════════════════ */

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

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; font-size: 14px; }
/* Default to a normal scrolling document. The app-shell pages (terminal, macro,
   country, dashboard, account, …) each re-assert `html,body{height:100%;overflow:hidden}`
   inline and run their own internal scroll areas, so dropping the global
   scroll-lock here cannot affect them — it only frees the long content pages
   (rankings / snapshot / methodology / pro / access / data-lab) that were being
   clipped to one viewport with no way to scroll. `min-height:100%` (not
   `height:100%`) lets the body grow with its content; `html` keeps `height:100%`
   so this percentage still resolves. */
body { min-height: 100%; background: #030406; color: #F5F7FA; font-family: 'Inter', -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }

/* ── Design tokens ─────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base:     #030406;
  --bg-deep:     #030406;
  --bg-panel:    #06080D;
  --bg-raised:   #0B0E14;
  --bg-lift:     #111620;
  --bg-hover:    rgba(255,255,255,.04);

  /* Brand */
  --amber:       #D89A3A;
  --amber-dim:   rgba(216,154,58,.12);
  --amber-glow:  rgba(216,154,58,.20);
  --gold:        #C28A3E;
  --purple:      #8B5CF6;
  --purple-dim:  rgba(139,92,246,.12);

  /* Market colors */
  --green:       #2EE6A6;
  --green-dim:   rgba(46,230,166,.12);
  --red:         #FF4D5E;
  --red-dim:     rgba(255,77,94,.12);
  --blue:        #3B82F6;
  --blue-dim:    rgba(59,130,246,.12);

  /* Text */
  --text:        #F5F7FA;
  --text-2:      #B0B8CC;
  --text-3:      #7B8293;
  --text-4:      #4A5168;

  /* Borders */
  --border:      rgba(216,154,58,.10);
  --border-2:    rgba(255,255,255,.045);
  --border-3:    rgba(255,255,255,.025);

  /* Grid */
  --grid:        rgba(255,255,255,.045);

  /* Typography */
  --font-sans:   'Inter', -apple-system, sans-serif;
  --font-mono:   'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Sidebar */
  --sidebar-w:   52px;
  --sidebar-expanded: 216px;

  /* Header height (0 — sidebar nav replaces top bar) */
  --header-h:    0px;

  /* Legacy aliases for old components */
  --nr-deep:     #030406;
  --nr-surface:  #06080D;
  --nr-surface2: #0B0E14;
  --nr-surface3: #111620;
  --nr-amber:    #D89A3A;
  --nr-amber2:   #C28A3E;
  --nr-pos:      #2EE6A6;
  --nr-neg:      #FF4D5E;
  --nr-text:     #F5F7FA;
  --nr-text2:    #7B8293;
  --nr-metal:    #7B8293;
  --nr-border:   rgba(216,154,58,.10);
  --nr-border2:  rgba(255,255,255,.025);
  --nr-mono:     'JetBrains Mono', monospace;
  --nr-h:        0px;
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(216,154,58,.20); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(216,154,58,.35); }
* { scrollbar-width: thin; scrollbar-color: rgba(216,154,58,.20) transparent; }

/* ── Page Shell ────────────────────────────────────────────────── */
.nv-shell {
  display: flex;
  height: 100vh;      /* fallback for browsers without dvh */
  height: 100dvh;     /* mobile: tracks the dynamic viewport so the footer / bottom row isn't hidden behind the browser chrome */
  overflow: hidden;
  background: var(--bg-base);
}

/* ── Left Sidebar ──────────────────────────────────────────────── */
.nv-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 200ms ease;
  z-index: 200;
  position: relative;
}
.nv-sidebar:hover { width: var(--sidebar-expanded); }

/* Amber top edge */
.nv-sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: .5;
}

.nv-sidebar-logo {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-3);
  flex-shrink: 0;
  overflow: hidden;
}
.nv-logo-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  background: var(--amber);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .65rem;
  color: #000;
  letter-spacing: -.03em;
}
.nv-logo-text {
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  transition: opacity 180ms;
}
.nv-sidebar:hover .nv-logo-text { opacity: 1; }
.nv-logo-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .04em;
  color: var(--text);
  display: block;
}
.nv-logo-sub {
  font-family: var(--font-mono);
  font-size: .52rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: .1em;
  display: block;
}

.nv-sidebar-nav {
  flex: 1;
  padding: 8px 0;
  overflow: hidden;
}
.nv-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.nv-nav-link:hover { background: var(--bg-hover); }
.nv-nav-link.active {
  background: var(--amber-dim);
}
.nv-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px; width: 2px;
  background: var(--amber);
  border-radius: 0 2px 2px 0;
}
.nv-nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: var(--text-3);
}
.nv-nav-link.active .nv-nav-icon { color: var(--amber); }
.nv-nav-link:hover .nv-nav-icon { color: var(--text-2); }
.nv-nav-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  opacity: 0;
  transition: opacity 180ms;
  white-space: nowrap;
}
.nv-sidebar:hover .nv-nav-label { opacity: 1; }
.nv-nav-link.active .nv-nav-label { color: var(--amber); }

/* Watchlist in sidebar (bottom of nav) */
.nv-sidebar-wl {
  border-top: 1px solid var(--border-3);
  padding: 8px 0;
  overflow-y: auto;
  max-height: 40vh;
}
.nv-sidebar-wl-hdr {
  padding: 4px 14px 6px;
  font-family: var(--font-mono);
  font-size: .52rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--amber);
  opacity: 0;
  transition: opacity 180ms;
  white-space: nowrap;
}
.nv-sidebar:hover .nv-sidebar-wl-hdr { opacity: 1; }
.nv-wl-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 80ms;
  overflow: hidden;
}
.nv-wl-item:hover { background: var(--bg-hover); }
.nv-wl-item.active { background: var(--amber-dim); }
.nv-wl-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-4);
}
.nv-wl-item.active .nv-wl-dot { background: var(--amber); }
.nv-wl-sym {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  min-width: 28px;
}
.nv-wl-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
  opacity: 0;
  transition: opacity 180ms;
  min-width: 0;
}
.nv-sidebar:hover .nv-wl-right { opacity: 1; }
.nv-wl-price {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--text-2);
  white-space: nowrap;
}
.nv-wl-chg {
  font-family: var(--font-mono);
  font-size: .56rem;
  font-weight: 700;
  white-space: nowrap;
}
.nv-wl-chg.pos { color: var(--green); }
.nv-wl-chg.neg { color: var(--red); }

/* Sidebar version */
.nv-sidebar-footer {
  padding: 8px 14px;
  border-top: 1px solid var(--border-3);
  flex-shrink: 0;
  overflow: hidden;
}
.nv-sidebar-ver {
  font-family: var(--font-mono);
  font-size: .5rem;
  color: var(--text-4);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 180ms;
}
.nv-sidebar:hover .nv-sidebar-ver { opacity: 1; }

/* ── Main content area ─────────────────────────────────────────── */
.nv-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
}

/* ── Terminal Top Bar ──────────────────────────────────────────── */
.nv-topbar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

/* Symbol picker trigger */
.nv-sym {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  min-width: 180px;
  transition: border-color 140ms;
  user-select: none;
}
.nv-sym:hover { border-color: rgba(216,154,58,.40); }
.nv-sym-icon { color: var(--amber); font-size: .82rem; flex-shrink: 0; }
.nv-sym-body { flex: 1; min-width: 0; }
.nv-sym-name { font-family: var(--font-mono); font-size: .82rem; font-weight: 700; color: var(--text); line-height: 1.1; white-space: nowrap; }
.nv-sym-sub { font-size: .58rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-sym-caret { color: var(--text-3); font-size: .62rem; flex-shrink: 0; }

/* Timeframe bar */
.nv-tf { display: flex; align-items: center; gap: 1px; }
.nv-tf-btn {
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .04em;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--text-3);
  cursor: pointer;
  transition: all 120ms;
  text-transform: uppercase;
}
.nv-tf-btn:hover { color: var(--text-2); background: var(--bg-hover); }
.nv-tf-btn.active { color: var(--amber); background: var(--amber-dim); border-color: rgba(216,154,58,.22); }

/* Topbar separator */
.nv-sep { width: 1px; height: 20px; background: var(--border-2); flex-shrink: 0; margin: 0 4px; }

/* Status indicator */
.nv-status { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.nv-status-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; background: var(--text-4); }
.nv-status-dot.live { background: var(--green); animation: pulse 2.5s ease-in-out infinite; }
.nv-status-dot.delayed { background: var(--amber); }
.nv-status-dot.offline { background: var(--red); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }
.nv-status-text { font-family: var(--font-mono); font-size: .6rem; color: var(--text-3); white-space: nowrap; }

/* Command search */
.nv-cmd {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 140ms;
  min-width: 140px;
}
.nv-cmd:hover { border-color: rgba(216,154,58,.30); }
.nv-cmd-icon { color: var(--text-3); font-size: .75rem; }
.nv-cmd-text { font-family: var(--font-mono); font-size: .6rem; color: var(--text-3); flex: 1; }
.nv-cmd-kbd { font-family: var(--font-mono); font-size: .52rem; color: var(--text-4); background: var(--bg-lift); padding: 1px 5px; border-radius: 2px; border: 1px solid var(--border-2); }

/* ── Terminal Body ──────────────────────────────────────────────── */
.nv-terminal {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* Chart area */
.nv-chart-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border-2);
}

/* Score area */
.nv-score-area {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-panel);
  position: relative;
}
/* Amber left edge */
.nv-score-area::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(216,154,58,.35) 30%, rgba(216,154,58,.35) 70%, transparent);
  z-index: 1;
}

/* ── Panel component ────────────────────────────────────────────── */
.nv-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-2);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nv-panel-hdr {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border-3);
  flex-shrink: 0;
}
.nv-panel-title {
  font-family: var(--font-mono);
  font-size: .56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--amber);
}
.nv-panel-badge {
  font-family: var(--font-mono);
  font-size: .54rem;
  padding: 1px 5px;
  border-radius: 2px;
  background: var(--bg-lift);
  color: var(--text-3);
}
.nv-panel-badge.live { background: var(--green-dim); color: var(--green); }
.nv-panel-badge.delayed { background: var(--amber-dim); color: var(--amber); }
.nv-panel-badge.unavail { color: var(--text-4); }
.nv-panel-spacer { flex: 1; }
.nv-panel-body { flex: 1; overflow: hidden; position: relative; min-height: 0; }
.nv-panel-scroll { flex: 1; overflow-y: auto; }

/* ── Score column internals ─────────────────────────────────────── */
.nv-score-top {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-3);
  flex-shrink: 0;
}
.nv-score-sym-label {
  font-family: var(--font-mono);
  font-size: .52rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-3);
  margin-bottom: 6px;
}
.nv-score-num {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--text-3);
  transition: color .4s;
}
.nv-score-num.bull { color: var(--green); }
.nv-score-num.bear { color: var(--red); }
.nv-score-num.neut { color: var(--amber); }
.nv-score-sub {
  font-family: var(--font-mono);
  font-size: .5rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-3);
  margin-top: 4px;
}
.nv-bias-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 8px;
}
.nv-bias-tag.bull { background: var(--green-dim); color: var(--green); }
.nv-bias-tag.bear { background: var(--red-dim); color: var(--red); }
.nv-bias-tag.neut { background: var(--amber-dim); color: var(--amber); }

/* Category score bars */
.nv-cat-row { margin-bottom: 8px; }
.nv-cat-labels { display: flex; justify-content: space-between; margin-bottom: 3px; }
.nv-cat-name { font-family: var(--font-mono); font-size: .58rem; color: var(--text-3); text-transform: capitalize; }
.nv-cat-val { font-family: var(--font-mono); font-size: .6rem; font-weight: 700; color: var(--amber); }
.nv-cat-track { height: 2px; background: var(--border-2); border-radius: 1px; overflow: hidden; }
.nv-cat-fill { height: 100%; border-radius: 1px; transition: width .6s ease; }

/* ── Bottom tabs ────────────────────────────────────────────────── */
.nv-bottom {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.nv-bottom-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--border-3);
  padding: 0 12px;
  height: 32px;
  flex-shrink: 0;
}
.nv-tab {
  font-family: var(--font-mono);
  font-size: .58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  transition: all 120ms;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  margin-bottom: -1px;
  white-space: nowrap;
}
.nv-tab:hover { color: var(--text-2); }
.nv-tab.active { color: var(--amber); border-bottom-color: var(--amber); }
.nv-tab-content { display: none; flex: 1; overflow: hidden; min-height: 0; }
.nv-tab-content.active { display: flex; }

/* ── Indicator Matrix Table ─────────────────────────────────────── */
.nv-matrix-wrap { overflow: auto; flex: 1; }
.nv-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: .66rem;
  table-layout: fixed;
}
.nv-matrix thead { position: sticky; top: 0; z-index: 2; }
.nv-matrix th {
  padding: 6px 10px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: .54rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  background: var(--bg-lift);
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
}
.nv-matrix td {
  padding: 0 10px;
  height: 34px;
  border-bottom: 1px solid var(--border-3);
  font-family: var(--font-mono);
  font-size: .64rem;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nv-matrix tr:last-child td { border-bottom: none; }
.nv-matrix tbody tr:hover td { background: var(--bg-hover); }

/* Indicator name cell */
.nv-ind-cell { display: flex; align-items: center; gap: 7px; overflow: hidden; }
.nv-ind-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.nv-ind-name { overflow: hidden; text-overflow: ellipsis; color: var(--text-2); font-weight: 500; }
.nv-cat-badge {
  font-family: var(--font-mono);
  font-size: .5rem;
  padding: 1px 4px;
  border-radius: 2px;
  background: var(--bg-lift);
  color: var(--text-3);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Signal pills */
.nv-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 2px 6px; border-radius: 2px;
  font-family: var(--font-mono); font-size: .56rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.nv-pill.bull, .nv-pill.buy { background: var(--green-dim); color: var(--green); }
.nv-pill.bear, .nv-pill.sell { background: var(--red-dim); color: var(--red); }
.nv-pill.neut, .nv-pill.hold { background: var(--bg-lift); color: var(--text-3); }

/* ── Matrix filter bar ──────────────────────────────────────────── */
.nv-filter-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border-3);
  flex-shrink: 0;
}
.nv-filter-btn {
  font-family: var(--font-mono);
  font-size: .56rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 8px;
  border: 1px solid var(--border-2);
  border-radius: 2px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: all 100ms;
}
.nv-filter-btn:hover { color: var(--text-2); border-color: var(--border); }
.nv-filter-btn.active { background: var(--amber-dim); color: var(--amber); border-color: rgba(216,154,58,.28); }

/* ── Asset Picker Modal ─────────────────────────────────────────── */
.nv-picker {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3,4,6,.88);
  backdrop-filter: blur(16px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 60px;
}
.nv-picker.open { display: flex; }
.nv-picker-box {
  background: var(--bg-raised);
  border: 1px solid rgba(216,154,58,.22);
  border-radius: 8px;
  width: 100%;
  max-width: 560px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,.9);
}
.nv-picker-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-2);
  background: var(--bg-lift);
}
.nv-picker-search-icon { color: var(--amber); font-size: .9rem; }
.nv-picker-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .82rem;
}
.nv-picker-input::placeholder { color: var(--text-3); }
.nv-picker-close {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: .9rem;
  padding: 2px 6px;
  transition: color 120ms;
}
.nv-picker-close:hover { color: var(--text); }
.nv-picker-list { overflow-y: auto; flex: 1; }
.nv-picker-cat {
  padding: 6px 16px 2px;
  font-family: var(--font-mono);
  font-size: .52rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--amber);
  border-top: 1px solid var(--border-3);
}
.nv-picker-cat:first-child { border-top: none; }
.nv-picker-asset {
  display: grid;
  grid-template-columns: 68px 1fr 90px 64px;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-3);
  transition: background 80ms;
}
.nv-picker-asset:hover { background: var(--amber-dim); }
.nv-picker-asset-sym { font-family: var(--font-mono); font-weight: 700; font-size: .76rem; color: var(--text); }
.nv-picker-asset-name { font-size: .64rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-picker-asset-price { font-family: var(--font-mono); font-size: .68rem; text-align: right; color: var(--text-2); }
.nv-picker-asset-chg { font-family: var(--font-mono); font-size: .62rem; font-weight: 700; text-align: right; padding: 2px 4px; border-radius: 2px; }

/* ── Flow / Smart Flow Panel ────────────────────────────────────── */
.nv-flow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
}
.nv-flow-card {
  background: var(--bg-raised);
  border: 1px solid var(--border-3);
  border-radius: 3px;
  padding: 8px 10px;
}
.nv-flow-label {
  font-family: var(--font-mono);
  font-size: .52rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  margin-bottom: 4px;
}
.nv-flow-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.nv-flow-val.pos { color: var(--green); }
.nv-flow-val.neg { color: var(--red); }
.nv-flow-sub { font-family: var(--font-mono); font-size: .56rem; color: var(--text-3); margin-top: 2px; }

/* Pressure bar */
.nv-pressure-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: .62rem;
}
.nv-pressure-label { color: var(--text-3); width: 80px; flex-shrink: 0; }
.nv-pressure-track { flex: 1; height: 5px; background: var(--border-2); border-radius: 3px; overflow: hidden; }
.nv-pressure-fill { height: 100%; border-radius: 3px; transition: width .4s ease; }
.nv-pressure-val { color: var(--text-2); min-width: 36px; text-align: right; }

/* ── Heatmap tile ───────────────────────────────────────────────── */
.nv-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 2px;
  padding: 6px;
}
.nv-hm-tile {
  aspect-ratio: 1.4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  cursor: pointer;
  transition: filter 120ms, transform 120ms;
  padding: 4px;
  position: relative;
  overflow: hidden;
}
.nv-hm-tile:hover { filter: brightness(1.15); transform: scale(1.02); z-index: 2; }
.nv-hm-sym { font-family: var(--font-mono); font-size: .6rem; font-weight: 700; color: rgba(255,255,255,.9); }
.nv-hm-chg { font-family: var(--font-mono); font-size: .72rem; font-weight: 700; color: #fff; }

/* ── Data table ─────────────────────────────────────────────────── */
.nv-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .64rem;
}
.nv-data-table th {
  padding: 5px 10px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: .52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  background: var(--bg-lift);
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.nv-data-table td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--border-3);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-2);
}
.nv-data-table tr:hover td { background: var(--bg-hover); }
.nv-data-table .mono { font-family: var(--font-mono); color: var(--text); }
.nv-data-table .pos { color: var(--green); }
.nv-data-table .neg { color: var(--red); }
.nv-data-table .amber { color: var(--amber); }
.nv-data-table .muted { color: var(--text-3); font-size: .58rem; }

/* ── Calendar event ─────────────────────────────────────────────── */
.nv-event {
  display: grid;
  grid-template-columns: 80px 1fr 60px 70px;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border-3);
  transition: background 80ms;
}
.nv-event:hover { background: var(--bg-hover); }
.nv-event-time { font-family: var(--font-mono); font-size: .6rem; color: var(--text-3); }
.nv-event-name { font-size: .66rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-event-impact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: .52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.nv-event-impact.high { background: var(--red-dim); color: var(--red); }
.nv-event-impact.med { background: var(--amber-dim); color: var(--amber); }
.nv-event-impact.low { background: var(--bg-lift); color: var(--text-3); }
.nv-event-actual { font-family: var(--font-mono); font-size: .62rem; text-align: right; color: var(--text); }

/* ── Unavailable state ──────────────────────────────────────────── */
.nv-unavail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 100px;
  padding: 24px;
  text-align: center;
  color: var(--text-3);
}
.nv-unavail-icon { font-size: 1.4rem; opacity: .3; }
.nv-unavail-title { font-family: var(--font-mono); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.nv-unavail-sub { font-size: .62rem; color: var(--text-4); max-width: 240px; line-height: 1.5; }
.nv-unavail-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--bg-lift);
  border: 1px solid var(--border-2);
  color: var(--text-3);
}

/* ── Landing Page Specific ──────────────────────────────────────── */
.nv-landing {
  display: flex;
  height: 100vh;      /* fallback for browsers without dvh */
  height: 100dvh;     /* mobile-safe full-height shell */
  overflow: hidden;
  background: var(--bg-base);
}
.nv-landing-left {
  width: 340px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}
.nv-landing-left::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
}
.nv-landing-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
}
.nv-landing-mark {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: .04em;
  display: block;
  margin-bottom: 4px;
}
.nv-landing-name {
  font-family: var(--font-mono);
  font-size: .56rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--text-3);
  display: block;
  margin-bottom: 32px;
}
.nv-landing-tagline {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 16px;
}
.nv-landing-desc {
  font-size: .72rem;
  color: var(--text-3);
  line-height: 1.65;
  margin-bottom: 32px;
}
.nv-landing-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--amber);
  color: #000;
  border: none;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
  text-decoration: none;
  transition: all 160ms;
  margin-bottom: 12px;
}
.nv-landing-cta:hover { background: var(--gold); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(216,154,58,.3); }
.nv-landing-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  text-decoration: none;
  transition: all 160ms;
}
.nv-landing-ghost:hover { border-color: rgba(216,154,58,.30); color: var(--text-2); }
.nv-landing-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
}
.nv-landing-stat {
  background: var(--bg-raised);
  border: 1px solid var(--border-3);
  border-radius: 3px;
  padding: 10px 12px;
}
.nv-landing-stat-n {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  line-height: 1;
  margin-bottom: 3px;
}
.nv-landing-stat-l {
  font-family: var(--font-mono);
  font-size: .52rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  display: block;
}
.nv-landing-panels {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr 200px;
  gap: 0;
  overflow: hidden;
}
.nv-landing-chart {
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border-2);
}
.nv-landing-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  overflow: hidden;
}
.nv-landing-mini {
  border-right: 1px solid var(--border-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.nv-landing-mini:last-child { border-right: none; }

/* ── Account / Login Page ───────────────────────────────────────── */
.nv-account-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: 100%;
  overflow: hidden;
}
.nv-account-form-area {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 32px 28px;
}
.nv-account-right {
  overflow-y: auto;
  padding: 24px 28px;
}
.nv-form-group { margin-bottom: 16px; }
.nv-form-label { font-family: var(--font-mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); display: block; margin-bottom: 6px; }
.nv-form-input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--text);
  outline: none;
  transition: border-color 140ms;
}
.nv-form-input:focus { border-color: rgba(216,154,58,.40); }
.nv-form-input::placeholder { color: var(--text-4); }
.nv-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 10px 20px;
  background: var(--amber); color: #000;
  border: none; border-radius: 4px;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  cursor: pointer; transition: all 140ms;
}
.nv-btn-primary:hover { background: var(--gold); }
.nv-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 9px 20px;
  background: transparent; color: var(--text-3);
  border: 1px solid var(--border-2); border-radius: 4px;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  cursor: pointer; transition: all 140ms; margin-top: 8px;
}
.nv-btn-ghost:hover { border-color: var(--border); color: var(--text-2); }

/* Provider status table */
.nv-provider-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border-3);
}
.nv-provider-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.nv-provider-dot.ok { background: var(--green); }
.nv-provider-dot.partial { background: var(--amber); }
.nv-provider-dot.none { background: var(--text-4); }
.nv-provider-name { font-family: var(--font-mono); font-size: .66rem; color: var(--text-2); flex: 1; }
.nv-provider-status { font-family: var(--font-mono); font-size: .58rem; color: var(--text-3); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .nv-score-area { width: 220px; }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .nv-sidebar { display: none; }
  .nv-account-layout { grid-template-columns: 1fr; }
  .nv-landing { flex-direction: column; }
  .nv-landing-left { width: 100%; padding: 24px 20px; }
}

/* ── Utility classes ─────────────────────────────────────────────── */
.mono { font-family: var(--font-mono); }
.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-3); }
.text-dim { color: var(--text-4); }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.overflow-hidden { overflow: hidden; }
.border-b { border-bottom: 1px solid var(--border-3); }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.mb-2 { margin-bottom: 8px; }

/* ── Skeleton loader ─────────────────────────────────────────────── */
.nv-skeleton {
  background: linear-gradient(90deg, var(--bg-raised) 25%, var(--bg-lift) 50%, var(--bg-raised) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 2px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.nv-skeleton-chart { height: 100%; min-height: 200px; }

/* ══════════════════════════════════════════════════════════════════════
   NOIRVAULTS — Intelligence Hierarchy System
   Priority tiers, opportunity cards, research workstation, regime badges
   ══════════════════════════════════════════════════════════════════════ */

/* ── Priority Tiers ─────────────────────────────────────────────────── */
.nv-pri-high {
  color: #F5F7FA !important;
  font-weight: 700;
  position: relative;
}
.nv-pri-high::before {
  content: '';
  position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 70%; background: #D89A3A;
  border-radius: 1px;
}
.nv-pri-med { color: #7B8293 !important; }
.nv-pri-low { color: #3A3F52 !important; font-size: .88em; }

/* ── Regime Badges ──────────────────────────────────────────────────── */
.nv-regime-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .5rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; white-space: nowrap;
}
.nv-regime-trending   { background: rgba(46,230,166,.12); color: #2EE6A6; border: 1px solid rgba(46,230,166,.2); }
.nv-regime-ranging    { background: rgba(216,154,58,.10); color: #D89A3A; border: 1px solid rgba(216,154,58,.18); }
.nv-regime-volatile   { background: rgba(255,77,94,.10);  color: #FF4D5E; border: 1px solid rgba(255,77,94,.18); }
.nv-regime-compress   { background: rgba(59,130,246,.10); color: #3B82F6; border: 1px solid rgba(59,130,246,.18); }
.nv-regime-expansion  { background: rgba(124,92,191,.10); color: #9c75f5; border: 1px solid rgba(124,92,191,.2); }
.nv-regime-riskoff    { background: rgba(255,77,94,.08);  color: #ef7d8a; border: 1px solid rgba(255,77,94,.12); }
.nv-regime-meanrev    { background: rgba(255,255,255,.04); color: #7B8293; border: 1px solid rgba(255,255,255,.06); }

/* ── Score Ring (SVG-based, CSS-driven) ─────────────────────────────── */
.nv-score-ring-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nv-score-ring-wrap svg { transform: rotate(-90deg); }
.nv-score-ring-track { fill: none; stroke: rgba(255,255,255,.06); }
.nv-score-ring-fill  { fill: none; stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(0.4,0,0.2,1); }
.nv-score-ring-num {
  position: absolute; font-family: 'JetBrains Mono', monospace;
  font-weight: 800; letter-spacing: -.04em; color: #F5F7FA;
  text-align: center; line-height: 1;
}

/* ── Opportunity Card ───────────────────────────────────────────────── */
.nv-opp-card {
  background: #06080D;
  border: 1px solid rgba(255,255,255,.04);
  border-radius: 4px;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  transition: background 80ms, border-color 120ms;
  cursor: default;
  position: relative; overflow: hidden;
}
.nv-opp-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
}
.nv-opp-card.long::before   { background: #2EE6A6; }
.nv-opp-card.short::before  { background: #FF4D5E; }
.nv-opp-card.neutral::before{ background: #D89A3A; }
.nv-opp-card:hover { background: rgba(255,255,255,.02); border-color: rgba(255,255,255,.07); }

.nv-opp-sym {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; font-weight: 800; color: #F5F7FA; min-width: 38px;
}
.nv-opp-type {
  flex: 1; font-family: 'JetBrains Mono', monospace;
  font-size: .58rem; color: #9BA3B8; line-height: 1.3;
}
.nv-opp-type strong { color: #E0E4EF; font-weight: 700; }
.nv-opp-prob {
  font-family: 'JetBrains Mono', monospace;
  font-size: .9rem; font-weight: 800; min-width: 36px; text-align: right;
}
.nv-opp-prob.pos { color: #2EE6A6; }
.nv-opp-prob.neg { color: #FF4D5E; }
.nv-opp-prob.amb { color: #D89A3A; }
.nv-opp-regime { margin-top: 3px; }

/* ── Correlation Bar ────────────────────────────────────────────────── */
.nv-corr-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0;
}
.nv-corr-pair {
  font-family: 'JetBrains Mono', monospace; font-size: .54rem;
  color: #4A5168; min-width: 70px; flex-shrink: 0;
}
.nv-corr-track {
  flex: 1; height: 5px; background: rgba(255,255,255,.05);
  border-radius: 3px; position: relative; overflow: visible;
}
.nv-corr-center {
  position: absolute; left: 50%; top: -2px; width: 1px; height: 9px;
  background: rgba(255,255,255,.12); transform: translateX(-50%);
}
.nv-corr-fill {
  position: absolute; top: 0; height: 100%; border-radius: 3px;
  transition: all .5s ease;
}
.nv-corr-val {
  font-family: 'JetBrains Mono', monospace; font-size: .58rem;
  font-weight: 700; min-width: 36px; text-align: right;
}
.nv-corr-state {
  font-family: 'JetBrains Mono', monospace; font-size: .46rem;
  min-width: 60px; text-align: right;
}

/* ── Market Pressure Bar ────────────────────────────────────────────── */
.nv-pressure-row {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 0;
}
.nv-pressure-lbl {
  font-family: 'JetBrains Mono', monospace; font-size: .5rem;
  text-transform: uppercase; letter-spacing: .06em; color: #4A5168;
  min-width: 100px; flex-shrink: 0;
}
.nv-pressure-track {
  flex: 1; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,.05); overflow: hidden;
}
.nv-pressure-fill {
  height: 100%; border-radius: 3px;
  transition: width .5s cubic-bezier(0.4,0,0.2,1);
}
.nv-pressure-num {
  font-family: 'JetBrains Mono', monospace; font-size: .58rem;
  font-weight: 700; min-width: 32px; text-align: right;
}

/* ── Research Workstation Layout ────────────────────────────────────── */
.res-workstation {
  display: flex; flex: 1; min-height: 0; overflow: hidden;
}
.res-nav {
  width: 200px; flex-shrink: 0; display: flex; flex-direction: column;
  background: #04060A; border-right: 1px solid rgba(255,255,255,.035);
  overflow: hidden;
}
.res-nav-hdr {
  padding: 6px 10px 4px; border-bottom: 1px solid rgba(255,255,255,.03);
  font-family: 'JetBrains Mono', monospace; font-size: .44rem;
  text-transform: uppercase; letter-spacing: .16em; color: #D89A3A;
  flex-shrink: 0; display: flex; align-items: center; gap: 6px;
}
.res-nav-scroll { flex: 1; overflow-y: auto; }
.res-nav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,.02);
  cursor: pointer; transition: background 60ms; position: relative;
}
.res-nav-item:hover { background: rgba(255,255,255,.02); }
.res-nav-item.active { background: rgba(216,154,58,.07); }
.res-nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: #D89A3A;
}
.res-nav-sym {
  font-family: 'JetBrains Mono', monospace; font-size: .68rem;
  font-weight: 700; color: #F5F7FA; min-width: 34px;
}
.res-nav-info { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.res-nav-score {
  font-family: 'JetBrains Mono', monospace; font-size: .62rem;
  font-weight: 800; min-width: 24px; text-align: right;
}
.res-nav-dots { display: flex; gap: 2px; }
.res-nav-dot { width: 4px; height: 4px; border-radius: 50%; }

.res-center {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  overflow: hidden;
}
.res-tabs {
  display: flex; gap: 0; border-bottom: 1px solid rgba(255,255,255,.035);
  flex-shrink: 0; background: #04060A; overflow-x: auto;
}
.res-tab {
  font-family: 'JetBrains Mono', monospace; font-size: .5rem;
  text-transform: uppercase; letter-spacing: .1em; color: #4A5168;
  padding: 7px 14px; border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all 80ms;
  white-space: nowrap; flex-shrink: 0;
}
.res-tab:hover { color: #7B8293; }
.res-tab.active { color: #D89A3A; border-bottom-color: #D89A3A; }
.res-panel { flex: 1; overflow-y: auto; padding: 14px; display: none; }
.res-panel.active { display: block; }

.res-right {
  width: 260px; flex-shrink: 0; display: flex; flex-direction: column;
  background: #04060A; border-left: 1px solid rgba(255,255,255,.035);
  overflow: hidden;
}
.res-right-section { flex-shrink: 0; border-bottom: 1px solid rgba(255,255,255,.028); }
.res-right-hdr {
  padding: 5px 10px 3px;
  font-family: 'JetBrains Mono', monospace; font-size: .44rem;
  text-transform: uppercase; letter-spacing: .16em; color: #D89A3A;
  display: flex; align-items: center; gap: 5px;
}
.res-right-live { width: 5px; height: 5px; border-radius: 50%; background: #2EE6A6; animation: pulse 2.5s ease-in-out infinite; }
.res-opp-scroll { flex: 1; overflow-y: auto; }
.res-insight-scroll { flex: 1; overflow-y: auto; }
.res-insight-item {
  display: flex; gap: 6px; align-items: flex-start;
  padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,.018);
  animation: fadeSlideIn .3s ease-out;
}
.res-insight-dot { width: 4px; height: 4px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.res-insight-body { font-family: 'JetBrains Mono', monospace; font-size: .56rem; color: #7B8293; line-height: 1.5; flex: 1; }
.res-insight-body strong { color: #E0E4EF; }
.res-insight-tag { font-family: 'JetBrains Mono', monospace; font-size: .44rem; color: #3A3F52; white-space: nowrap; margin-top: 1px; }

/* ── Research Panel Inner Components ────────────────────────────────── */
.res-rank-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.025);
}
.res-rank-num {
  font-family: 'JetBrains Mono', monospace; font-size: .5rem;
  color: #3A3F52; width: 16px; flex-shrink: 0;
}
.res-rank-sym {
  font-family: 'JetBrains Mono', monospace; font-size: .66rem;
  font-weight: 700; color: #F5F7FA; min-width: 40px;
}
.res-rank-bar-wrap {
  flex: 1; height: 4px; background: rgba(255,255,255,.05);
  border-radius: 2px; overflow: hidden;
}
.res-rank-bar { height: 100%; border-radius: 2px; transition: width .5s ease; }
.res-rank-score {
  font-family: 'JetBrains Mono', monospace; font-size: .64rem;
  font-weight: 700; min-width: 28px; text-align: right;
}

.res-dist-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 0;
}
.res-dist-lbl {
  font-family: 'JetBrains Mono', monospace; font-size: .52rem;
  text-transform: uppercase; letter-spacing: .06em; min-width: 80px;
}
.res-dist-track {
  flex: 1; height: 8px; background: rgba(255,255,255,.05); border-radius: 4px; overflow: hidden;
}
.res-dist-fill { height: 100%; border-radius: 4px; transition: width .7s cubic-bezier(0.4,0,0.2,1); }
.res-dist-pct {
  font-family: 'JetBrains Mono', monospace; font-size: .62rem;
  font-weight: 700; min-width: 30px; text-align: right;
}

.res-regime-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.02);
}
.res-regime-sym {
  font-family: 'JetBrains Mono', monospace; font-size: .62rem;
  font-weight: 700; color: #F5F7FA; min-width: 44px;
}
.res-regime-desc {
  flex: 1; font-family: 'JetBrains Mono', monospace;
  font-size: .52rem; color: #7B8293;
}

/* ── Heatmap Grid (terminal bottom) ─────────────────────────────────── */
.nv-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 4px; padding: 8px;
}
.nv-heatmap-cell {
  padding: 6px 8px; border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  display: flex; flex-direction: column; gap: 2px;
  transition: opacity .3s ease; cursor: default;
}
.nv-heatmap-sym { font-size: .52rem; font-weight: 700; color: rgba(255,255,255,.85); }
.nv-heatmap-score { font-size: .8rem; font-weight: 800; color: #fff; }
.nv-heatmap-bias { font-size: .44rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .06em; }

/* ── Animated glow for high-priority signals ─────────────────────────── */
@keyframes highPriGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216,154,58,0); }
  50% { box-shadow: 0 0 8px 2px rgba(216,154,58,.15); }
}
.nv-signal-alert { animation: highPriGlow 3s ease-in-out infinite; }

.res-section-hdr span.count {
  font-size: .46rem; color: #4A5168; margin-left: auto;
}

/* ══════════════════════════════════════════════════════════════════
   PRIORITY ENGINE — Attention Hierarchy
   ══════════════════════════════════════════════════════════════════ */

/* EXTREME: amber pulse ring — eye-catching for highest-priority signals */
@keyframes extremePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216,154,58,0), 0 0 0 0 rgba(216,154,58,0); }
  40%       { box-shadow: 0 0 0 3px rgba(216,154,58,.18), 0 0 12px 4px rgba(216,154,58,.08); }
  70%       { box-shadow: 0 0 0 6px rgba(216,154,58,.06), 0 0 20px 8px rgba(216,154,58,.04); }
}
@keyframes extremePulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,77,94,0); }
  40%       { box-shadow: 0 0 0 3px rgba(255,77,94,.18), 0 0 12px 4px rgba(255,77,94,.08); }
  70%       { box-shadow: 0 0 0 6px rgba(255,77,94,.06), 0 0 20px 8px rgba(255,77,94,.04); }
}
@keyframes highGlow {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.15); }
}
@keyframes scanLinePulse {
  from { top: -1px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  to   { top: 100%; opacity: 0; }
}

/* Priority tier container classes */
.priority-extreme {
  position: relative;
  animation: extremePulse 2.8s ease-in-out infinite;
  border-left: 2px solid #D89A3A !important;
}
.priority-extreme.bear-dir {
  animation: extremePulseRed 2.8s ease-in-out infinite;
  border-left-color: #FF4D5E !important;
}
.priority-high {
  animation: highGlow 4s ease-in-out infinite;
  border-left: 2px solid rgba(216,154,58,.5) !important;
}
.priority-medium {
  opacity: 1;
}
.priority-low {
  opacity: 0.48;
  filter: saturate(0.4);
}
.chop-dim {
  opacity: 0.38;
  color: #4A5168 !important;
  filter: saturate(0.2);
}

/* Priority badge pill */
.nv-priority-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px; border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .46rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  white-space: nowrap;
}
.nv-priority-badge.extreme {
  background: rgba(216,154,58,.18);
  color: #D89A3A;
  border: 1px solid rgba(216,154,58,.3);
  animation: extremePulse 2.8s ease-in-out infinite;
}
.nv-priority-badge.extreme::before {
  content: ''; display: inline-block;
  width: 4px; height: 4px; border-radius: 50%;
  background: #D89A3A;
  animation: pulse 1.4s ease-in-out infinite;
}
.nv-priority-badge.high {
  background: rgba(46,230,166,.10);
  color: #2EE6A6;
  border: 1px solid rgba(46,230,166,.2);
}
.nv-priority-badge.medium {
  background: rgba(255,255,255,.04);
  color: #7B8293;
  border: 1px solid rgba(255,255,255,.05);
}
.nv-priority-badge.low {
  background: transparent;
  color: #3A3F52;
  border: 1px solid rgba(255,255,255,.03);
}

/* ══════════════════════════════════════════════════════════════════
   SETUP QUALITY BADGE (0–100)
   ══════════════════════════════════════════════════════════════════ */
.nv-quality-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .48rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap;
}
.nv-quality-badge.exceptional { background: rgba(46,230,166,.12); color: #2EE6A6; border: 1px solid rgba(46,230,166,.2); }
.nv-quality-badge.high-conv   { background: rgba(46,230,166,.08); color: #1ab87e; border: 1px solid rgba(46,230,166,.15); }
.nv-quality-badge.tradable    { background: rgba(216,154,58,.10); color: #D89A3A; border: 1px solid rgba(216,154,58,.2); }
.nv-quality-badge.mediocre    { background: rgba(216,154,58,.06); color: #9B7434; border: 1px solid rgba(216,154,58,.1); }
.nv-quality-badge.avoid       { background: rgba(255,77,94,.08);  color: #CC3D4C; border: 1px solid rgba(255,77,94,.15); }
.nv-quality-badge.trap        { background: rgba(255,77,94,.14);  color: #FF4D5E; border: 1px solid rgba(255,77,94,.3); animation: extremePulseRed 3s ease-in-out infinite; }

/* ══════════════════════════════════════════════════════════════════
   CONFLICT ENGINE — Named Conflict Indicators
   ══════════════════════════════════════════════════════════════════ */
.nv-conflict-card {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,.018);
}
.nv-conflict-card.danger {
  border-left: 2px solid #FF4D5E;
  background: rgba(255,77,94,.025);
}
.nv-conflict-card.warn {
  border-left: 2px solid rgba(216,154,58,.6);
  background: rgba(216,154,58,.015);
}
.nv-conflict-icon { font-size: .7rem; flex-shrink: 0; margin-top: 1px; line-height: 1; }
.nv-conflict-icon.danger { color: #FF4D5E; }
.nv-conflict-icon.warn   { color: #D89A3A; }
.nv-conflict-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem; font-weight: 800;
  display: block; letter-spacing: .02em;
}
.nv-conflict-name.danger { color: #FF4D5E; }
.nv-conflict-name.warn   { color: #D89A3A; }
.nv-conflict-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: .5rem; color: #4A5168;
  display: block; margin-top: 2px; line-height: 1.5;
}

/* No conflicts state */
.nv-no-conflicts {
  padding: 8px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .54rem; color: #2EE6A6;
  display: flex; align-items: center; gap: 6px;
}
.nv-no-conflicts::before {
  content: '✓'; color: #2EE6A6; font-weight: 800;
}

/* ══════════════════════════════════════════════════════════════════
   MARKET MEMORY ENGINE — Historical Context
   ══════════════════════════════════════════════════════════════════ */
.nv-memory-card {
  padding: 6px 10px;
  background: rgba(139,92,246,.04);
  border-left: 2px solid rgba(139,92,246,.35);
  font-family: 'JetBrains Mono', monospace;
}
.nv-memory-hdr {
  font-size: .44rem; text-transform: uppercase;
  letter-spacing: .12em; color: #8B5CF6; margin-bottom: 4px;
}
.nv-memory-stat {
  font-size: .58rem; font-weight: 700; color: #B0B8CC;
  line-height: 1.5;
}
.nv-memory-stat span.hi { color: #2EE6A6; }
.nv-memory-stat span.lo { color: #FF4D5E; }
.nv-memory-stat span.pct { color: #D89A3A; font-weight: 800; }

/* ══════════════════════════════════════════════════════════════════
   SITUATIONAL SUMMARY — Terminal Philosophy
   ══════════════════════════════════════════════════════════════════ */
.nv-situation-card {
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(216,154,58,.04) 0%, rgba(3,4,6,0) 100%);
  border-bottom: 1px solid rgba(216,154,58,.1);
  border-top: 1px solid rgba(216,154,58,.06);
}
.nv-situation-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: .44rem; text-transform: uppercase;
  letter-spacing: .16em; color: #D89A3A; margin-bottom: 4px;
}
.nv-situation-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem; color: #B0B8CC;
  line-height: 1.55; font-weight: 500;
}
.nv-situation-text.pos { color: #c8f5e8; }
.nv-situation-text.neg { color: #ffd0d4; }
.nv-situation-text.amb { color: #f5e4c0; }

/* ══════════════════════════════════════════════════════════════════
   PSYCHOLOGICAL NARRATIVE — Intelligence Stream Enhancement
   ══════════════════════════════════════════════════════════════════ */
.nv-narrative-item {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,.02);
  animation: fadeSlideIn .35s ease-out;
  transition: background 80ms;
}
.nv-narrative-item:hover { background: rgba(255,255,255,.015); }
.nv-narrative-dot {
  width: 4px; height: 4px; border-radius: 50%;
  margin-top: 6px; flex-shrink: 0;
}
.nv-narrative-dot.pos { background: #2EE6A6; box-shadow: 0 0 4px rgba(46,230,166,.5); }
.nv-narrative-dot.neg { background: #FF4D5E; box-shadow: 0 0 4px rgba(255,77,94,.4); }
.nv-narrative-dot.amb { background: #D89A3A; box-shadow: 0 0 3px rgba(216,154,58,.4); }
.nv-narrative-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem; color: #9BA3B8;
  line-height: 1.5; flex: 1;
}
.nv-narrative-text.pos { color: #B8EDD8; }
.nv-narrative-text.neg { color: #FFCDD0; }
.nv-narrative-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: .44rem; padding: 1px 5px; border-radius: 2px;
  background: rgba(255,255,255,.04); color: #3A3F52;
  flex-shrink: 0; margin-top: 2px; white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════
   OPPORTUNITY BOARD — Enhanced Cards
   ══════════════════════════════════════════════════════════════════ */
.nv-opp-board-card {
  padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.025);
  border-left: 2px solid transparent; cursor: pointer;
  transition: background 80ms;
}
.nv-opp-board-card:hover { background: rgba(255,255,255,.018); }
.nv-opp-board-card.long  { border-left-color: #2EE6A6; }
.nv-opp-board-card.short { border-left-color: #FF4D5E; }
.nv-opp-board-card.neutral { border-left-color: #D89A3A; }
.nv-opp-board-top {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.nv-opp-board-sym {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; font-weight: 800; color: #F5F7FA;
  min-width: 38px;
}
.nv-opp-board-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: .54rem; color: #7B8293; flex: 1;
}
.nv-opp-board-qual {
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem; font-weight: 800;
}
.nv-opp-board-qual.long  { color: #2EE6A6; }
.nv-opp-board-qual.short { color: #FF4D5E; }
.nv-opp-board-qual.neutral { color: #D89A3A; }
.nv-opp-board-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: .5rem; color: #4A5168; line-height: 1.5;
}
.nv-opp-board-memory {
  font-family: 'JetBrains Mono', monospace;
  font-size: .48rem; color: #8B5CF6;
  margin-top: 3px; display: block;
}
.nv-opp-board-invalid {
  font-family: 'JetBrains Mono', monospace;
  font-size: .48rem; color: #FF4D5E;
  margin-top: 2px; display: block;
}

/* ══════════════════════════════════════════════════════════════════
   UI HIERARCHY — Typography contrast system
   ══════════════════════════════════════════════════════════════════ */
.nv-h1 { font-family: 'JetBrains Mono', monospace; font-size: .78rem; font-weight: 800; color: #F5F7FA; }
.nv-h2 { font-family: 'JetBrains Mono', monospace; font-size: .68rem; font-weight: 700; color: #E0E4EF; }
.nv-h3 { font-family: 'JetBrains Mono', monospace; font-size: .6rem;  font-weight: 600; color: #B0B8CC; }
.nv-body { font-family: 'JetBrains Mono', monospace; font-size: .58rem; color: #7B8293; line-height: 1.5; }
.nv-muted { font-family: 'JetBrains Mono', monospace; font-size: .52rem; color: #4A5168; }

/* Relative Strength Matrix */
.nv-rs-matrix {
  display: grid;
  gap: 2px; padding: 6px;
}
.nv-rs-row {
  display: grid; align-items: center;
  padding: 4px 6px; border-radius: 2px;
  border-left: 2px solid transparent;
  background: rgba(255,255,255,.018);
  transition: background 80ms;
}
.nv-rs-row.leader { border-left-color: #2EE6A6; background: rgba(46,230,166,.04); }
.nv-rs-row.laggard { border-left-color: #FF4D5E; background: rgba(255,77,94,.04); }
.nv-rs-sym { font-family: 'JetBrains Mono', monospace; font-size: .64rem; font-weight: 800; color: #F5F7FA; }
.nv-rs-val { font-family: 'JetBrains Mono', monospace; font-size: .6rem; font-weight: 700; text-align: right; }
.nv-rs-val.pos { color: #2EE6A6; }
.nv-rs-val.neg { color: #FF4D5E; }
.nv-rs-val.flat { color: #4A5168; }
.nv-rs-bar-track { flex: 1; height: 3px; background: rgba(255,255,255,.05); border-radius: 2px; overflow: hidden; margin: 0 8px; }
.nv-rs-bar-fill { height: 100%; border-radius: 2px; transition: width .5s ease; }

/* Rotation Detection */
.nv-rotation-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.02);
}
.nv-rotation-sym { font-family: 'JetBrains Mono', monospace; font-size: .62rem; font-weight: 700; color: #F5F7FA; min-width: 44px; }
.nv-rotation-delta { font-family: 'JetBrains Mono', monospace; font-size: .62rem; font-weight: 800; min-width: 44px; text-align: right; }
.nv-rotation-delta.gaining { color: #2EE6A6; }
.nv-rotation-delta.losing  { color: #FF4D5E; }
.nv-rotation-label { font-family: 'JetBrains Mono', monospace; font-size: .5rem; color: #4A5168; flex: 1; }


/* ══════════════════════════════════════════════════════════════════
   SITUATIONAL SUMMARY CARD
   ══════════════════════════════════════════════════════════════════ */
.nv-situation-card {
  background: rgba(255,255,255,.018);
  border: 1px solid rgba(255,255,255,.04);
  border-left: 3px solid #D89A3A;
  border-radius: 3px;
  padding: 8px 10px;
  margin: 0 0 10px;
  flex-shrink: 0;
}
.nv-situation-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: .44rem; text-transform: uppercase;
  letter-spacing: .12em; color: #D89A3A;
  margin-bottom: 5px;
}
.nv-situation-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6rem; line-height: 1.55; color: #B0B8CC;
}
.nv-situation-text.pos { color: #2EE6A6; }
.nv-situation-text.neg { color: #FF4D5E; }
.nv-situation-text.amb { color: #D89A3A; }

/* ══════════════════════════════════════════════════════════════════
   NAMED CONFLICT CARDS (new engine)
   ══════════════════════════════════════════════════════════════════ */
.nv-conflict-card {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 10px; border-left: 2px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.018); border-radius: 2px;
  margin-bottom: 4px; transition: background 80ms;
}
.nv-conflict-card.danger { border-left-color: #FF4D5E; background: rgba(255,77,94,.06); }
.nv-conflict-card.warn   { border-left-color: #D89A3A; background: rgba(216,154,58,.05); }
.nv-conflict-card.ok     { border-left-color: #2EE6A6; background: rgba(46,230,166,.04); }
.nv-conflict-icon { font-family: 'JetBrains Mono', monospace; font-size: .7rem; font-weight: 800; flex-shrink: 0; margin-top: 1px; }
.nv-conflict-icon.danger { color: #FF4D5E; }
.nv-conflict-icon.warn   { color: #D89A3A; }
.nv-conflict-icon.ok     { color: #2EE6A6; }
.nv-conflict-name { display: block; font-family: 'JetBrains Mono', monospace; font-size: .56rem; font-weight: 700; margin-bottom: 2px; }
.nv-conflict-name.danger { color: #FF4D5E; }
.nv-conflict-name.warn   { color: #D89A3A; }
.nv-conflict-name.ok     { color: #2EE6A6; }
.nv-conflict-desc { display: block; font-family: 'JetBrains Mono', monospace; font-size: .52rem; color: #7B8293; line-height: 1.5; }
.nv-no-conflicts {
  font-family: 'JetBrains Mono', monospace; font-size: .58rem; color: #2EE6A6;
  padding: 12px 10px; border-left: 2px solid #2EE6A6;
  background: rgba(46,230,166,.04); border-radius: 2px; line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════
   MARKET MEMORY CARDS
   ══════════════════════════════════════════════════════════════════ */
.nv-memory-card {
  background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.04);
  border-left: 3px solid #8B5CF6; border-radius: 3px; padding: 8px 10px;
}
.nv-memory-hdr { font-family: 'JetBrains Mono', monospace; font-size: .44rem; text-transform: uppercase; letter-spacing: .12em; color: #8B5CF6; margin-bottom: 4px; }
.nv-memory-stat { font-family: 'JetBrains Mono', monospace; font-size: .6rem; color: #B0B8CC; line-height: 1.5; }
.nv-memory-stat .pct { color: #8B5CF6; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════
   RESEARCH PAGE LAYOUT
   ══════════════════════════════════════════════════════════════════ */
.res-nav {
  width: 170px; flex-shrink: 0; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.025); background: #030406; overflow: hidden;
}
.res-nav-hdr {
  font-family: 'JetBrains Mono', monospace; font-size: .46rem;
  text-transform: uppercase; letter-spacing: .14em; color: #4A5168;
  padding: 8px 10px 6px; border-bottom: 1px solid rgba(255,255,255,.025);
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.res-nav-scroll { flex: 1; overflow-y: auto; }
.res-nav-item {
  display: flex; align-items: center; gap: 6px; padding: 7px 10px;
  border-bottom: 1px solid rgba(255,255,255,.018);
  border-left: 2px solid transparent; cursor: pointer; transition: background 80ms;
}
.res-nav-item:hover { background: rgba(255,255,255,.03); }
.res-nav-sym { font-family: 'JetBrains Mono', monospace; font-size: .68rem; font-weight: 800; color: #F5F7FA; }
.res-nav-score { font-family: 'JetBrains Mono', monospace; font-size: .64rem; font-weight: 700; }
.res-tabs {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,.025); flex-shrink: 0; background: #030406;
}
.res-tab {
  font-family: 'JetBrains Mono', monospace; font-size: .48rem;
  text-transform: uppercase; letter-spacing: .1em; padding: 4px 8px;
  background: none; border: 1px solid rgba(255,255,255,.04);
  color: #4A5168; border-radius: 2px; cursor: pointer; transition: all 100ms;
}
.res-tab:hover { color: #7B8293; border-color: rgba(255,255,255,.08); }
.res-tab.active { color: #D89A3A; border-color: rgba(216,154,58,.3); background: rgba(216,154,58,.06); }
.res-center { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.res-panel { display: none; flex: 1; overflow-y: auto; padding: 10px 12px; }
.res-panel.active { display: block; }
.res-section-hdr {
  font-family: 'JetBrains Mono', monospace; font-size: .5rem;
  text-transform: uppercase; letter-spacing: .14em; color: #D89A3A;
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid rgba(216,154,58,.12);
  display: flex; align-items: center; gap: 8px;
}
.res-section-hdr .count { font-size: .46rem; color: #4A5168; margin-left: auto; }
.res-rank-row {
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.02);
  border-left: 2px solid transparent; padding: 6px 4px; transition: background 80ms;
}
.res-rank-row:hover { background: rgba(255,255,255,.02); }
.res-rank-num { font-family: 'JetBrains Mono', monospace; font-size: .5rem; color: #3A3F52; min-width: 16px; text-align: right; }
.res-rank-sym { font-family: 'JetBrains Mono', monospace; font-size: .7rem; font-weight: 800; color: #F5F7FA; margin-right: 2px; }
.res-rank-score { font-family: 'JetBrains Mono', monospace; font-size: .78rem; font-weight: 800; }
.res-rank-bar-wrap { height: 2px; background: rgba(255,255,255,.05); border-radius: 1px; overflow: hidden; }
.res-rank-bar { height: 100%; border-radius: 1px; transition: width .4s ease; }
.res-regime-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.02); }
.res-regime-sym { font-family: 'JetBrains Mono', monospace; font-size: .66rem; font-weight: 800; color: #F5F7FA; min-width: 44px; }
.res-regime-desc { font-family: 'JetBrains Mono', monospace; font-size: .5rem; color: #4A5168; }
.nv-regime-badge { font-family: 'JetBrains Mono', monospace; font-size: .44rem; font-weight: 700; padding: 2px 5px; border-radius: 2px; text-transform: uppercase; letter-spacing: .08em; }
.nv-regime-trending  { color: #2EE6A6; background: rgba(46,230,166,.10); border: 1px solid rgba(46,230,166,.2); }
.nv-regime-ranging   { color: #D89A3A; background: rgba(216,154,58,.10); border: 1px solid rgba(216,154,58,.2); }
.nv-regime-volatile  { color: #FF4D5E; background: rgba(255,77,94,.10);  border: 1px solid rgba(255,77,94,.2); }
.nv-regime-compress  { color: #8B5CF6; background: rgba(139,92,246,.10); border: 1px solid rgba(139,92,246,.2); }
.nv-regime-expansion { color: #3B82F6; background: rgba(59,130,246,.10); border: 1px solid rgba(59,130,246,.2); }
.nv-regime-riskoff   { color: #FF4D5E; background: rgba(255,77,94,.14);  border: 1px solid rgba(255,77,94,.28); }
.nv-regime-meanrev   { color: #D89A3A; background: rgba(216,154,58,.08); border: 1px solid rgba(216,154,58,.16); }
.res-dist-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.res-dist-lbl { font-family: 'JetBrains Mono', monospace; font-size: .52rem; font-weight: 700; min-width: 72px; }
.res-dist-track { flex: 1; height: 4px; background: rgba(255,255,255,.05); border-radius: 2px; overflow: hidden; }
.res-dist-fill { height: 100%; border-radius: 2px; transition: width .5s ease; }
.res-dist-pct { font-family: 'JetBrains Mono', monospace; font-size: .6rem; font-weight: 700; min-width: 32px; text-align: right; }
.nv-corr-wrap { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.02); }
.nv-corr-pair { font-family: 'JetBrains Mono', monospace; font-size: .54rem; color: #B0B8CC; min-width: 90px; }
.nv-corr-track { flex: 1; height: 5px; background: rgba(255,255,255,.04); border-radius: 2px; position: relative; overflow: hidden; }
.nv-corr-center { position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: rgba(255,255,255,.12); }
.nv-corr-fill { position: absolute; top: 0; height: 100%; border-radius: 2px; transition: width .5s ease; }
.nv-corr-val { font-family: 'JetBrains Mono', monospace; font-size: .6rem; font-weight: 700; min-width: 44px; text-align: right; }
.nv-corr-state { font-family: 'JetBrains Mono', monospace; font-size: .46rem; min-width: 82px; text-align: right; }
.res-right {
  width: 210px; flex-shrink: 0; display: flex; flex-direction: column;
  border-left: 1px solid rgba(255,255,255,.025); background: #030406; overflow: hidden;
}
.res-right-section { border-bottom: 1px solid rgba(255,255,255,.025); }
.res-right-hdr {
  font-family: 'JetBrains Mono', monospace; font-size: .46rem;
  text-transform: uppercase; letter-spacing: .14em; color: #4A5168;
  padding: 7px 10px; display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,.025); flex-shrink: 0;
}
.res-right-live { width: 5px; height: 5px; border-radius: 50%; background: #2EE6A6; flex-shrink: 0; animation: pulse 2.5s ease-in-out infinite; }
.res-insight-scroll { flex: 1; overflow-y: auto; padding: 4px 0; }
.nv-narrative-item { display: flex; align-items: flex-start; gap: 7px; padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,.018); }
.nv-narrative-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.nv-narrative-text { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: .52rem; line-height: 1.45; color: #7B8293; }
.nv-narrative-text.pos { color: #2EE6A6; }
.nv-narrative-text.neg { color: #FF4D5E; }
.nv-narrative-text.amb { color: #D89A3A; }
.nv-narrative-cat { font-family: 'JetBrains Mono', monospace; font-size: .42rem; text-transform: uppercase; letter-spacing: .08em; color: #3A3F52; flex-shrink: 0; margin-top: 2px; }

/* ── Mobile Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .nv-shell { flex-direction: column; }
  .nv-sidebar {
    width: 100%; height: auto; flex-direction: row;
    border-right: none; border-bottom: 1px solid var(--border);
    overflow-x: auto; overflow-y: hidden;
  }
  .nv-sidebar:hover { width: 100%; }
  .nv-sidebar-logo { height: 44px; padding: 0 10px; }
  .nv-sidebar-nav { flex-direction: row; padding: 0; overflow-x: auto; }
  .nv-nav-link { padding: 8px 12px; }
  .nv-nav-label { opacity: 1; font-size: .52rem; }
  .nv-sidebar-wl, .nv-sidebar-footer { display: none; }
  .nv-logo-text { opacity: 1; }
  .nv-content { height: calc(100vh - 44px); height: calc(100dvh - 44px); }
  .nv-score-area { width: 100%; max-height: 40vh; }
  .nv-terminal { flex-direction: column; }
  .nv-topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .nv-picker-box { max-width: 95vw; }
  .nv-flow-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .nv-sidebar-nav { gap: 0; }
  .nv-nav-link { padding: 6px 8px; }
  .nv-nav-label { font-size: .46rem; letter-spacing: .06em; }
  .nv-sym { min-width: 120px; }
  .nv-cmd { display: none; }
}

/* ── Loading States ─────────────────────────────────────── */
.nv-skeleton {
  background: linear-gradient(90deg, var(--bg-raised) 25%, var(--bg-lift) 50%, var(--bg-raised) 75%);
  background-size: 200% 100%;
  animation: nv-shimmer 1.8s ease-in-out infinite;
  border-radius: 4px;
}
@keyframes nv-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.nv-loading-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); animation: nv-pulse-load 1.2s ease-in-out infinite; }
.nv-loading-dot:nth-child(2) { animation-delay: .2s; }
.nv-loading-dot:nth-child(3) { animation-delay: .4s; }
@keyframes nv-pulse-load { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.nv-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px 20px; color: var(--text-3); text-align: center; }
.nv-empty-state-icon { font-size: 2rem; opacity: .3; }
.nv-empty-state-text { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; }
