/* ==========================================================================
   IHUI PRO EXCHANGE TERMINAL — Institutional Dark Trading Design System
   Inspired by Binance Pro / OKX / TradingView Multi-Pane Terminal
   ========================================================================== */

:root {
  --bg-void: #0b0e11;
  --bg-pane: #12161c;
  --bg-elev: #181e27;
  --bg-hover: #1f2733;
  --bg-input: #0e1218;
  --line: #232a35;
  --line-strong: #323c4b;
  --text: #eaecef;
  --text-2: #9aa4b4;
  --text-3: #647084;
  --gold: #f0b90b;
  --gold-hi: #fcd535;
  --gold-soft: rgba(240, 185, 11, 0.14);
  --gold-line: rgba(240, 185, 11, 0.42);
  /* 中国交易终端标准色：红涨绿跌 */
  --up: #f6465d;
  --up-bg: rgba(246, 70, 93, 0.14);
  --down: #0ecb81;
  --down-bg: rgba(14, 203, 129, 0.14);
  --cyan: #22d3ee;
  --hdr-h: 52px;
  --side-w: 204px;
}

@media (min-width: 1460px) {
  :root { --side-w: 224px; }
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg-void);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }

.mono {
  font-family: "JetBrains Mono", "SF Mono", "DIN Alternate", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}
.up { color: var(--up); }
.down { color: var(--down); }
.gold { color: var(--gold-hi); }
.muted { color: var(--text-3); }
.sub { color: var(--text-2); }
.hidden { display: none !important; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Custom dark scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b3340; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ==================== TOP EXCHANGE HEADER ==================== */
.ex-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--hdr-h);
  background: #0e1218;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; gap: 8px;
}
.ex-hdr-left, .ex-hdr-right { display: flex; align-items: center; gap: 7px; min-width: 0; }

.ex-menu-btn {
  display: none; width: 32px; height: 32px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg-pane); color: var(--text);
  align-items: center; justify-content: center; font-size: 16px;
}
.ex-logo {
  display: flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding-right: 10px; border-right: 1px solid var(--line);
}
.ex-logo img {
  width: 28px; height: 28px; border-radius: 6px; object-fit: cover;
  border: 1px solid var(--gold-line);
}
.ex-logo-text { font-size: 15px; font-weight: 900; letter-spacing: 0.04em; color: #fff; }
.ex-logo-badge {
  font-size: 9.5px; font-weight: 800; padding: 1px 5px; border-radius: 3px;
  background: var(--gold-soft); color: var(--gold-hi); border: 1px solid var(--gold-line);
  letter-spacing: 0.06em;
}
@media (max-width: 1380px) {
  .ex-logo-badge { display: none; }
}

.ex-nav { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.ex-nav-btn {
  height: 32px; padding: 0 8px; border-radius: 6px; border: none;
  background: transparent; color: var(--text-2); font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px; transition: all 0.14s; white-space: nowrap;
}
.ex-nav-btn:hover { color: #fff; background: var(--bg-elev); }
.ex-nav-btn.active { color: var(--gold-hi); background: var(--gold-soft); }
.ex-dot {
  width: 6px; height: 6px; border-radius: 99px; background: var(--down);
  box-shadow: 0 0 8px var(--down); animation: exPulse 1.8s infinite;
}
@keyframes exPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Global Search */
.ex-search-wrap { position: relative; flex: 0 1 190px; min-width: 120px; }
.ex-search-input {
  width: 100%; height: 32px; padding: 0 32px 0 30px; border-radius: 6px;
  background: var(--bg-input); border: 1px solid var(--line); color: var(--text);
  font-size: 12px; outline: none; transition: border-color 0.14s;
}
.ex-search-input:focus { border-color: var(--gold); }
.ex-search-ico { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; pointer-events: none; }
.ex-search-kbd {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: var(--text-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; line-height: 16px;
}
.ex-search-drop {
  position: absolute; top: 38px; left: 0; right: -80px; max-height: 420px; overflow-y: auto;
  background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.85); z-index: 90; padding: 6px;
}
.ex-search-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 9px; border-radius: 6px; cursor: pointer; transition: background 0.12s;
}
.ex-search-row:hover { background: var(--bg-hover); }

/* Header Action Buttons */
.btn {
  height: 30px; padding: 0 11px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--text); font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  transition: all 0.13s; white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); border-color: var(--line-strong); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-gold {
  background: linear-gradient(135deg, #f5c438, #e5a905); color: #0b0e11; border-color: transparent; font-weight: 800;
}
.btn-gold:hover { filter: brightness(1.08); color: #0b0e11; }
.btn-gold-outline {
  background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-hi);
}
.btn-gold-outline:hover { background: var(--gold); color: #0b0e11; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 11.5px; }
.btn-xs { height: 22px; padding: 0 7px; font-size: 11px; border-radius: 4px; }

/* ==================== SHELL LAYOUT ==================== */
.ex-shell {
  padding-top: var(--hdr-h);
  min-height: 100vh;
  display: flex;
}

/* Left Markets Sidebar */
.ex-sidebar {
  position: fixed; top: var(--hdr-h); left: 0; bottom: 0; width: var(--side-w);
  background: var(--bg-pane); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; overflow-y: auto; z-index: 45;
  transition: transform 0.2s ease;
}
.ex-side-sec { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.ex-side-title {
  font-size: 10.5px; font-weight: 800; color: var(--text-3); letter-spacing: 0.08em;
  text-transform: uppercase; padding: 2px 8px 6px; display: flex; justify-content: space-between; align-items: center;
}
.ex-mkt-item {
  width: 100%; border: none; background: transparent; padding: 7px 8px; border-radius: 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  text-align: left; transition: background 0.12s;
}
.ex-mkt-item:hover { background: var(--bg-hover); }
.ex-mkt-item.active { background: var(--gold-soft); box-shadow: inset 2px 0 0 var(--gold); }
.ex-mkt-dot { width: 7px; height: 7px; border-radius: 99px; flex-shrink: 0; }
.ex-mkt-name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.ex-mkt-sub { font-size: 10.5px; color: var(--text-3); }
.ex-mkt-vol { font-size: 11.5px; font-weight: 700; color: var(--text); text-align: right; }

.ex-tool-btn {
  width: 100%; border: none; background: transparent; padding: 7px 10px; border-radius: 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: var(--text-2); font-size: 12.5px; font-weight: 700; text-align: left;
}
.ex-tool-btn:hover { background: var(--bg-hover); color: #fff; }
.ex-tool-btn.active { background: var(--gold-soft); color: var(--gold-hi); }

.ex-side-foot {
  margin-top: auto; padding: 10px 12px; font-size: 11px; color: var(--text-3);
  border-top: 1px solid var(--line); background: #0e1218;
}

/* Main Full-Bleed Trading Workspace */
.ex-main {
  margin-left: var(--side-w);
  flex: 1; min-width: 0;
  padding: 6px;
  display: flex; flex-direction: column; gap: 6px;
}

/* ==================== TERMINAL PANES & TICKER ==================== */
.pane {
  background: var(--bg-pane);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.pane-hd {
  min-height: 38px; padding: 6px 12px;
  background: #141921; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.pane-title { font-size: 13px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 7px; }
.pane-body { padding: 10px 12px; }

/* Ticker KPI Strip (Binance-style inline metrics) */
.ticker-strip {
  background: var(--bg-pane); border: 1px solid var(--line); border-radius: 4px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
.ticker-strip.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ticker-strip.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ticker-strip.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.site-notice-bar {
  background: linear-gradient(90deg, rgba(240,185,11,0.16), rgba(240,185,11,0.06) 75%, rgba(18,22,28,0.95));
  border: 1px solid var(--gold-line); border-radius: 4px; padding: 7px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--gold-hi);
}
.ticker-cell {
  padding: 10px 14px; border-right: 1px solid var(--line); min-width: 0;
}
.ticker-cell:last-child { border-right: none; }
.ticker-lbl { font-size: 11px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.ticker-val { font-size: 18px; font-weight: 900; margin-top: 3px; color: var(--text); }
.ticker-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; display: flex; align-items: center; gap: 6px; }

/* Multi-Pane Split Grids */
.desk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 326px; gap: 6px; align-items: start; }
.desk-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tape-grid { display: grid; grid-template-columns: minmax(0, 1fr) 324px; gap: 6px; align-items: start; }
@media (min-width: 1460px) {
  .desk-grid { grid-template-columns: minmax(0, 1fr) 370px; }
  .tape-grid { grid-template-columns: minmax(0, 1fr) 352px; }
}

/* Terminal Tabs */
.t-tabs { display: flex; align-items: center; gap: 2px; overflow-x: auto; }
.filter-bar .t-tabs, .pane-hd .t-tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 4px; }
.t-tab {
  height: 28px; padding: 0 9px; border: none; border-radius: 4px; background: transparent;
  color: var(--text-2); font-size: 12px; font-weight: 700; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px; transition: all 0.12s;
}
.t-tab:hover { color: #fff; background: var(--bg-hover); }
.t-tab.active { color: var(--gold-hi); background: var(--gold-soft); }
.t-tab-cnt { font-size: 10.5px; opacity: 0.75; }

/* Badges & Pills */
.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px;
  border-radius: 3px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.pill-up { background: var(--up-bg); color: var(--up); }
.pill-down { background: var(--down-bg); color: var(--down); }
.pill-gold { background: var(--gold-soft); color: var(--gold-hi); border: 1px solid var(--gold-line); }
.pill-muted { background: var(--bg-elev); color: var(--text-2); border: 1px solid var(--line); }

/* Dense Institutional Financial Tables */
.tbl-wrap { width: 100%; overflow-x: auto; }
table.ex-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
table.ex-tbl th {
  position: sticky; top: 0; z-index: 2;
  background: #141921; color: var(--text-3); font-size: 11px; font-weight: 700;
  padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap;
  user-select: none;
}
table.ex-tbl th.sortable { cursor: pointer; }
table.ex-tbl th.sortable:hover { color: var(--gold-hi); }
table.ex-tbl th.r, table.ex-tbl td.r { text-align: right; }
table.ex-tbl td {
  padding: 7px 10px; border-bottom: 1px solid rgba(35, 42, 53, 0.7); vertical-align: middle;
}
table.ex-tbl.compact th, table.ex-tbl.compact td {
  padding: 7px 8px;
}
table.ex-tbl tbody tr { transition: background 0.1s; }
table.ex-tbl tbody tr:hover { background: var(--bg-hover); }
table.ex-tbl tbody tr.clickable { cursor: pointer; }

.thumb-sm { width: 26px; height: 26px; border-radius: 4px; object-fit: cover; background: var(--bg-elev); flex-shrink: 0; border: 1px solid var(--line); }
.thumb-md { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; background: var(--bg-elev); flex-shrink: 0; border: 1px solid var(--line); }
.thumb-fb {
  width: 26px; height: 26px; border-radius: 4px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
}

/* Orderflow Feed Rows */
.of-list { max-height: 590px; overflow-y: auto; }
.of-row {
  padding: 8px 12px; border-bottom: 1px solid rgba(35, 42, 53, 0.65);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer; transition: background 0.1s;
}
.of-row:hover { background: var(--bg-hover); }
.of-row.big { border-left: 2px solid var(--gold); background: rgba(240, 185, 11, 0.04); }

/* Chart Box */
.chart-box { width: 100%; height: 280px; position: relative; background: #0f131a; }
.chart-legend {
  position: absolute; top: 8px; left: 12px; z-index: 5; pointer-events: none;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 11.5px;
  background: rgba(15, 19, 26, 0.78); padding: 3px 8px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.06);
}

/* Heatmap Matrix */
.hm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 6px; }
.hm-tile {
  padding: 10px; border-radius: 5px; border: 1px solid var(--line); cursor: pointer;
  transition: transform 0.12s, border-color 0.12s; display: flex; flex-direction: column; justify-content: space-between; min-height: 92px;
}
.hm-tile:hover { transform: translateY(-1px); border-color: var(--gold); }

/* Depth Orderbook Bars (Binance Ask/Bid visualizer) */
.depth-row {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px; font-size: 12px; border-bottom: 1px solid rgba(35,42,53,0.45); overflow: hidden;
}
.depth-bar {
  position: absolute; top: 0; bottom: 0; right: 0; background: rgba(246, 70, 93, 0.16); pointer-events: none;
}

/* Filters & Inputs */
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #10141b; }
.f-input {
  height: 28px; padding: 0 9px; border-radius: 5px; background: var(--bg-input);
  border: 1px solid var(--line); color: var(--text); font-size: 12px; outline: none;
}
.f-input:focus { border-color: var(--gold); }

/* Breadth Bar */
.breadth-bar { height: 5px; border-radius: 99px; background: var(--bg-elev); overflow: hidden; display: flex; margin-top: 6px; }
.breadth-up { background: var(--up); }
.breadth-flat { background: #475569; }
.breadth-down { background: var(--down); }

/* Slide-Over Pro Trading Drawer & Modals */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 13, 0.72);
  backdrop-filter: blur(4px); display: flex; justify-content: flex-end;
}
.overlay.center { justify-content: center; align-items: center; padding: 16px; }
.drawer {
  width: min(640px, 100vw); height: 100vh; background: var(--bg-pane);
  border-left: 1px solid var(--line-strong); display: flex; flex-direction: column; overflow: hidden;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8);
}
.modal-box {
  width: min(480px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--bg-pane); border: 1px solid var(--gold-line); border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.88);
}
.drawer-hd {
  padding: 12px 16px; background: #141921; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.drawer-body { padding: 14px 16px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.drawer-body > * { flex-shrink: 0; }

.alert { padding: 8px 11px; border-radius: 6px; font-size: 12px; font-weight: 700; margin-top: 8px; }
.alert.ok { background: var(--down-bg); border: 1px solid rgba(14,203,129,0.4); color: #34d399; }
.alert.err { background: var(--up-bg); border: 1px solid rgba(246,70,93,0.4); color: #fb7185; }

/* ==================== FORENSICS (可疑交易取证系统) ==================== */
.f-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
  border-radius: 4px; font-size: 10.5px; font-weight: 800; white-space: nowrap;
  border: 1px solid transparent;
}
.f-crit { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.55); color: #fca5a5; }
.f-rose { background: rgba(246,70,93,0.16); border-color: rgba(246,70,93,0.45); color: #fda4af; }
.f-orange { background: rgba(249,115,22,0.16); border-color: rgba(249,115,22,0.45); color: #fdba74; }
.f-fuchsia { background: rgba(217,70,239,0.16); border-color: rgba(217,70,239,0.45); color: #f0abfc; }
.f-amber { background: rgba(240,185,11,0.16); border-color: rgba(240,185,11,0.45); color: #fcd535; }
.f-indigo { background: rgba(99,102,241,0.18); border-color: rgba(99,102,241,0.48); color: #c7d2fe; }
.f-cyan { background: rgba(34,211,238,0.16); border-color: rgba(34,211,238,0.45); color: #67e8f9; }

.f-banner {
  margin-top: 5px; padding: 5px 9px; border-radius: 4px; font-size: 11px; line-height: 1.5;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  border-left: 3px solid currentColor;
}
.f-banner.f-crit { background: rgba(239,68,68,0.12); color: #fecaca; }
.f-banner.f-rose { background: rgba(246,70,93,0.10); color: #fecdd3; }
.f-banner.f-orange { background: rgba(249,115,22,0.10); color: #fed7aa; }
.f-banner.f-fuchsia { background: rgba(217,70,239,0.10); color: #f5d0fe; }
.f-banner.f-amber { background: rgba(240,185,11,0.10); color: #fde68a; }
.f-banner.f-indigo { background: rgba(99,102,241,0.12); color: #e0e7ff; }
.f-banner.f-cyan { background: rgba(34,211,238,0.10); color: #cffafe; }

.forensic-alert-strip {
  background: linear-gradient(90deg, rgba(246,70,93,0.14), rgba(240,185,11,0.08) 65%, rgba(18,22,28,0.95));
  border: 1px solid rgba(246,70,93,0.38); border-radius: 4px; padding: 7px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}

.dump-card {
  background: var(--bg-elev); border: 1px solid rgba(246,70,93,0.32); border-radius: 6px; padding: 11px 12px;
  transition: border-color 0.14s;
}
.dump-card:hover { border-color: var(--gold); }
.serial-hist {
  margin-top: 9px; padding: 8px 10px; border-radius: 5px; background: #0d1117; border: 1px solid var(--line);
}
.serial-bars {
  height: 48px; display: flex; align-items: flex-end; gap: 3px;
}
.serial-col {
  flex: 1; height: 100%; display: flex; align-items: flex-end;
}
.serial-bar { width: 100%; border-radius: 2px 2px 0 0; transition: opacity 0.15s; }
.serial-bar.hot { background: linear-gradient(180deg, #f6465d, #b91c1c); box-shadow: 0 0 8px rgba(246,70,93,0.4); }
.serial-bar.norm { background: var(--gold); }
.serial-bar.void { background: #1e2632; }

/* Lineage 3-column tree */
.lineage-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) 230px minmax(0, 1fr); gap: 10px; align-items: stretch;
}
.lineage-col {
  background: var(--bg-pane); border: 1px solid var(--line); border-radius: 6px; padding: 8px;
  display: flex; flex-direction: column; gap: 6px; max-height: 310px; overflow-y: auto;
}
.lineage-col-hd { font-size: 11px; font-weight: 800; color: var(--text-3); padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.lineage-center {
  background: linear-gradient(180deg, rgba(240,185,11,0.12), #141921); border: 1px solid var(--gold-line);
  border-radius: 8px; padding: 14px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.lineage-card {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px; border-radius: 5px; background: var(--bg-elev); border: 1px solid var(--line);
}
.lineage-card:hover { border-color: var(--gold); background: var(--bg-hover); }

/* 24H Anomaly Bar Chart */
.hour-bars { display: flex; align-items: flex-end; gap: 4px; height: 74px; padding: 6px 2px 0; }
.hour-col {
  flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 3px; cursor: pointer; border: none; background: transparent; padding: 0;
}
.hour-bar { width: 100%; border-radius: 2px 2px 0 0; background: rgba(240,185,11,0.45); transition: all 0.14s; }
.hour-col:hover .hour-bar, .hour-col.active .hour-bar { background: var(--up); box-shadow: 0 0 8px rgba(246,70,93,0.45); }
.hour-lbl { font-size: 9.5px; color: var(--text-3); }
.hour-col.active .hour-lbl { color: var(--gold-hi); font-weight: 800; }

tr.row-active { background: var(--gold-soft) !important; }

@media (max-width: 960px) {
  .lineage-stage { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 1180px) {
  .desk-grid, .tape-grid { grid-template-columns: 1fr; }
  .ticker-strip, .ticker-strip.cols-6, .ticker-strip.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ticker-strip.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .ex-menu-btn { display: inline-flex; }
  .ex-nav { display: none; }
  .ex-sidebar { transform: translateX(-100%); }
  .ex-sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,0.85); }
  .ex-main { margin-left: 0; }
  .ticker-strip, .ticker-strip.cols-6, .ticker-strip.cols-5, .ticker-strip.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-search-wrap { flex: 1; }
  .ex-search-drop { right: 0; }
}
@media (max-width: 560px) {
  .ex-logo-badge, .ex-search-kbd, .hide-xs { display: none !important; }
  .ex-logo { padding-right: 4px; border-right: none; }
  .ex-logo-text { font-size: 14px; }
  .ex-search-wrap { min-width: 0; flex: 1 1 auto; }
  .ex-header { padding: 0 8px; gap: 6px; }
  .ticker-val { font-size: 15px; }
}
