/* ════════════════════════════════════════════════════════════════
   HYPERLIQUID INTELLIGENCE — Phase 1B (Market Analytics rebuild)
   demo2026/css/hl.css

   Sibling of On-Chain / DeFi & NFT / Market Overview. Prefix .hl-.
   Clones the .oc-panel chrome (gradient surface, hairline border,
   inset highlight + bottom shadow), the currentColor accent rail,
   the universal pills, and the 3 responsive breakpoints verbatim
   from onchain.css. All colors come from base.css tokens via var();
   nothing is hardcoded except neutral white-alpha surface washes
   (identical to onchain.css). Red uses var(--red-bright) (#FF5A78).

   STAGE 1: structure + styling only. Every live region is a
   skeleton / shell — no data, no invented numbers, no SSE.
   ════════════════════════════════════════════════════════════════ */

/* ── PAGE WRAPPER ─────────────────────────────────────────────── */
.hl-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ── HEADER (title block) ─────────────────────────────────────── */
.hl-header {
  max-width: 860px;
  margin-bottom: 18px;
}
.hl-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}
.hl-title {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--text);
  margin: 0 0 14px;
}
.hl-title-accent {
  background: linear-gradient(135deg, var(--green-bright) 0%, #1FE084 40%, #4AE5A4 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 32px rgba(31, 224, 132, 0.25);
}
.hl-sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  max-width: 72ch;
}
.hl-disclaimer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 196, 112, 0.08);
  border: 1px solid rgba(255, 196, 112, 0.18);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #FFC470;
}
.hl-disclaimer::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: #FFC470;
  box-shadow: 0 0 8px #FFC470;
  flex-shrink: 0;
}

/* ── HEADER STRIP — full-width 4 metric cards ─────────────────── */
.hl-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.hl-metric-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.018));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 8px 18px -14px rgba(0,0,0,0.55);
  overflow: hidden;
}
.hl-metric-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hl-metric-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hl-metric-delta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
}
.hl-metric-delta.up   { color: var(--green-bright); }
.hl-metric-delta.down { color: var(--red-bright); }

/* ── 3-COL GRID (clone of .oc-grid) ───────────────────────────── */
.hl-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}
.hl-col { display: flex; flex-direction: column; gap: 18px; }
.hl-col-left, .hl-col-right { position: sticky; top: 88px; }

/* ── Full-width heatmap band ──
   The heatmap is the LAST .hl-grid child: the 3-column content (left selector,
   center terminal+whale, right liq-feed) fills the top row(s) by normal
   auto-flow, then the heatmap spans every column on the final row — a dominant
   full-width band at the bottom of the page. */
.hl-grid > .hl-heat-card { grid-column: 1 / -1; }

/* ════════════════════════════════════════════════════════════════
   PANEL CHROME — shared across all cards (clone of .oc-panel)
   ════════════════════════════════════════════════════════════════ */
.hl-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.018));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 8px 18px -14px rgba(0,0,0,0.55);
  overflow: hidden;
}
.hl-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.hl-panel-head > div { display: grid; gap: 2px; }
.hl-panel-head-right { display: flex; align-items: center; gap: 12px; }
.hl-panel-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.hl-panel-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.4;
}
.hl-panel-meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.hl-credit-chip {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-tertiary);
}

/* Accent rails — same currentColor + glow pattern as onchain */
.hl-panel.hl-accent-green,
.hl-panel.hl-accent-red,
.hl-panel.hl-accent-orange,
.hl-panel.hl-accent-purple { position: relative; }
.hl-panel.hl-accent-green::before,
.hl-panel.hl-accent-red::before,
.hl-panel.hl-accent-orange::before,
.hl-panel.hl-accent-purple::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  opacity: 0.85;
}
.hl-panel.hl-accent-green  { color: var(--green-bright); }
.hl-panel.hl-accent-red    { color: var(--red-bright); }
.hl-panel.hl-accent-orange { color: #FFC470; }
.hl-panel.hl-accent-purple { color: #C9AEFF; }
.hl-accent-green  .hl-panel-title { color: var(--green-bright); }
.hl-accent-red    .hl-panel-title { color: var(--red-bright); }
.hl-accent-orange .hl-panel-title { color: #FFC470; }
.hl-accent-purple .hl-panel-title { color: #C9AEFF; }

/* ── Universal pills (clone of oc pills) ──────────────────────── */
.hl-pill-soon {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(255,255,255,0.05);
  color: var(--text-tertiary);
  border: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}
.hl-pill-premium {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(201, 174, 255, 0.12);
  color: #C9AEFF;
  border: 1px solid rgba(201, 174, 255, 0.25);
  white-space: nowrap;
}
.hl-pill-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px;
  background: rgba(31, 224, 132, 0.10);
  color: var(--green-bright);
  border: 1px solid rgba(31, 224, 132, 0.22);
  white-space: nowrap;
}
.hl-pill-live::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--green-bright); box-shadow: 0 0 8px var(--green-bright);
  animation: pulse-dot 2s infinite;
}
/* Non-live (connecting / reconnecting) — dim, no green glow */
.hl-pill-live.is-down {
  background: rgba(255,255,255,0.05);
  color: var(--text-tertiary);
  border-color: rgba(255,255,255,0.08);
}
.hl-pill-live.is-down::before {
  background: var(--text-tertiary);
  box-shadow: none;
  animation: none;
}

/* ════════════════════════════════════════════════════════════════
   LEFT — Coin selector + sub-stats
   ════════════════════════════════════════════════════════════════ */
.hl-coin-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.hl-coin-chip {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
}
.hl-coin-chip:hover { color: var(--text); border-color: rgba(255,255,255,0.12); }
.hl-coin-chip.is-active {
  background: rgba(31, 224, 132, 0.10);
  color: var(--green-bright);
  border-color: rgba(31, 224, 132, 0.28);
}
.hl-coin-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 4px;
  max-height: 280px; overflow-y: auto;
}
.hl-coin-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
}
.hl-coin-list li:hover { background: rgba(255,255,255,0.04); color: var(--text); }

.hl-stat-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hl-stat-rows li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
}
.hl-stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--text-secondary);
}
.hl-stat-value {
  font-family: var(--font-mono);
  font-size: 12.5px; font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════════════════════════════
   CENTER — Terminal (mark price · depth · trades · candle)
   ════════════════════════════════════════════════════════════════ */
.hl-mark-row {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.hl-mark-price {
  font-family: var(--font-mono);
  font-size: 40px; font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hl-mark-change {
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
}
.hl-mark-change.up   { color: var(--green-bright); }
.hl-mark-change.down { color: var(--red-bright); }

/* Terminal split: depth viz + trades tape side by side, candle below */
.hl-terminal-split {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
}

/* L2 depth viz shell — cumulative, top 10 / side */
.hl-depth {
  display: grid;
  grid-template-rows: repeat(10, 1fr) auto repeat(10, 1fr);
  gap: 2px;
  min-height: 320px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.hl-depth-row {
  position: relative;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 10px;
  border-radius: 4px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.hl-depth-row .hl-depth-bar {
  position: absolute; top: 0; bottom: 0; right: 0;
  opacity: 0.14;
  pointer-events: none;
}
.hl-depth-row.bid .hl-depth-bar { background: var(--green-bright); left: 0; right: auto; }
.hl-depth-row.ask .hl-depth-bar { background: var(--red-bright); }
.hl-depth-row.bid .hl-depth-px { color: var(--green-bright); }
.hl-depth-row.ask .hl-depth-px { color: var(--red-bright); }
.hl-depth-px, .hl-depth-sz { position: relative; z-index: 1; }
.hl-depth-sz { color: var(--text-secondary); }
.hl-depth-spread {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-tertiary);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Recent-trades tape shell (~15 rows) */
.hl-tape {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px;
  font-family: var(--font-mono);
  font-size: 11px;
  align-content: start;
}
.hl-tape li {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
.hl-tape li .hl-tape-px.buy  { color: var(--green-bright); }
.hl-tape li .hl-tape-px.sell { color: var(--red-bright); }
.hl-tape-time { color: var(--text-muted); text-align: right; }

/* 1h candle chart shell — empty canvas sized like onchain charts */
.hl-canvas-wrap {
  width: 100%;
  height: 320px;
  position: relative;
  border-radius: 10px;
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 12px;
  margin-top: 16px;
}
.hl-canvas-wrap canvas { width: 100% !important; height: 100% !important; }

/* ── Liquidation heatmap panel (fills the center candle slot) ── */
.hl-canvas-wrap.hl-heat-wrap { display: flex; flex-direction: column; gap: 8px; }
.hl-heat-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.hl-heat-title {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-tertiary);
}
.hl-heat-sub { color: var(--text-secondary); }
.hl-heat-legend { display: flex; gap: 12px; align-items: center; }

/* ── Palette picker (Coinglass-style swatches) — matches terminal controls ── */
.hl-heat-palette { display: inline-flex; gap: 4px; align-items: center; }
.hl-heat-swatch {
  width: 14px; height: 18px; padding: 0; border-radius: 3px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: transform 120ms var(--ease, ease), box-shadow 120ms var(--ease, ease), border-color 120ms var(--ease, ease);
}
.hl-heat-swatch:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.4); }
.hl-heat-swatch.is-active {
  border-color: var(--green-bright, #1FE084);
  box-shadow: 0 0 0 1px var(--green-bright, #1FE084), 0 0 6px rgba(31, 224, 132, 0.5);
}

/* ── Liquidity-threshold slider — matches terminal controls ── */
.hl-heat-thresh {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
}
.hl-heat-thresh-range {
  -webkit-appearance: none; appearance: none;
  width: 76px; height: 3px; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.16); border-radius: 2px;
}
.hl-heat-thresh-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--green-bright, #1FE084);
  border: 1px solid rgba(0, 0, 0, 0.5); cursor: pointer;
  box-shadow: 0 0 4px rgba(31, 224, 132, 0.5);
}
.hl-heat-thresh-range::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--green-bright, #1FE084);
  border: 1px solid rgba(0, 0, 0, 0.5); cursor: pointer;
}
.hl-heat-thresh-val {
  color: var(--text-secondary); min-width: 24px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.hl-heat-key {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 5px;
}
.hl-heat-key::before { content: ''; width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.hl-heat-key-modeled::before { background: linear-gradient(90deg, #440154, #21908d, #fde725); }
.hl-heat-key-field::before { background: linear-gradient(90deg, #000004, #3b0f70, #8c2981, #de4968, #fe9f6d, #fcfdbf); }
.hl-heat-key-real::before { background: rgba(255,255,255,0.85); }

/* ── Venue toggle: Hyperliquid (real live canvas) · Binance (same canvas blurred
      + "Coming soon", pure view state — NO Binance data). Segmented control,
      matches the terminal control vocabulary; active = brand green. ── */
.hl-venue-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.hl-venue-seg {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 3px 8px; border: 0; border-radius: 4px; cursor: pointer;
  background: transparent;
  transition: color 120ms var(--ease, ease), background 120ms var(--ease, ease);
}
.hl-venue-seg:hover { color: var(--text); }
.hl-venue-seg.is-active {
  color: #08130C;
  background: var(--green-bright, #1FE084);
  box-shadow: 0 0 6px rgba(31, 224, 132, 0.4);
}

/* Binance state → blur the EXISTING Hyperliquid canvas (intentional: our own
   map, obscured) + reveal the overlay. No Binance data is involved. */
.hl-heat-canvas-box.hl-venue-binance canvas.hl-heat-canvas,
.hl-heat-canvas-box.hl-venue-binance canvas.hl-heat-overlay {
  filter: blur(8px) saturate(0.7) brightness(0.8);
  transition: filter 220ms var(--ease, ease);
}
.hl-heat-canvas-box canvas.hl-heat-canvas { transition: filter 220ms var(--ease, ease); }

/* "Coming soon" overlay — centered scrim over the blurred map. Hidden unless
   the Binance venue is active. Doesn't intercept clicks (toggle lives above). */
.hl-coming-soon {
  position: absolute; inset: 0; z-index: 3;
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.hl-heat-canvas-box.hl-venue-binance .hl-coming-soon { display: flex; }
.hl-cs-venue {
  font-family: var(--font-display, var(--font-mono)); font-weight: 800;
  font-size: 22px; letter-spacing: -0.01em; color: var(--text, #E8ECF1);
}
.hl-cs-sub {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-secondary, #AAB3C0);
  padding: 3px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}
@media (prefers-reduced-motion: reduce) {
  .hl-heat-canvas-box.hl-venue-binance canvas.hl-heat-canvas,
  .hl-heat-canvas-box.hl-venue-binance canvas.hl-heat-overlay,
  .hl-heat-canvas-box canvas.hl-heat-canvas { transition: none; }
}
/* Higher specificity than the generic .hl-canvas-wrap canvas height:100% above
   so the canvas takes the remaining flex space (head + note sit around it). */
.hl-canvas-wrap canvas.hl-heat-canvas {
  flex: 1 1 auto; min-height: 0;
  width: 100% !important; height: auto !important; display: block;
}
.hl-heat-note { flex: 0 0 auto; margin-top: 0; }

/* v2 ONLY: definite-size canvas. The box is flex:1 (gets the remaining height)
   and the canvas is absolute-filled so it can never aspect-grow past the card.
   Backstops: overflow:hidden on the box AND the rounded wrap clip any stray px.
   Scoped to .hl-heat-canvas-box so v1's canvas rule above is unaffected. */
.hl-canvas-wrap[data-heatv2="1"] { overflow: hidden; }  /* v2-only backstop (clears on v1 fallback) */
.hl-heat-canvas-box { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; }
.hl-heat-canvas-box canvas.hl-heat-canvas {
  position: absolute; inset: 0; z-index: 1;
  width: 100% !important; height: 100% !important; display: block;
}
/* Transparent hover-highlight layer stacked just above the heat canvas. JS
   draws a white cell frame here on hover; pointer-events:none so it never
   intercepts the wheel/drag/hover handlers on the heat canvas below. The fixed
   tooltip (z-index:9999 on body) still sits above this. */
.hl-heat-canvas-box canvas.hl-heat-overlay {
  position: absolute; inset: 0; z-index: 2;
  width: 100% !important; height: 100% !important; display: block;
  pointer-events: none;
}

/* ── v2 plot row: left intensity-scale legend + the canvas box ── */
.hl-heat-plot { flex: 1 1 auto; min-height: 0; display: flex; gap: 8px; }
.hl-heat-plot .hl-heat-canvas-box { min-width: 0; }   /* let the box shrink in the row */
.hl-heat-scale {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 1px 0;
}
.hl-heat-scale-bar {
  flex: 1 1 auto; min-height: 0; width: 10px; border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.hl-heat-scale-cap {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: 8px;
  letter-spacing: 0.04em; color: var(--text-muted);
}

/* ── Top series legend — color-chip toggles (match terminal controls) ── */
.hl-heat-series { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; }
.hl-heat-series-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted); cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 999px;
  transition: color 120ms var(--ease, ease), border-color 120ms var(--ease, ease), background 120ms var(--ease, ease), opacity 120ms var(--ease, ease);
}
.hl-heat-series-chip:hover { color: var(--text-secondary); border-color: rgba(255, 255, 255, 0.22); }
.hl-heat-series-chip.is-on { color: var(--text); border-color: rgba(255, 255, 255, 0.22); }
.hl-heat-series-chip[aria-pressed="false"] { opacity: 0.5; }   /* layer off → dimmed */
.hl-heat-series-dot {
  width: 14px; height: 4px; border-radius: 2px; flex-shrink: 0;
  display: inline-block;
}
.hl-heat-series-dot.dot-field  { background: linear-gradient(90deg, #3b0f70, #de4968, #fcfdbf); }
.hl-heat-series-dot.dot-curves { background: linear-gradient(90deg, #1FE084 0 50%, #FF5A78 50% 100%); }

/* ── In-card coin picker — compact pills matching the terminal controls ── */
.hl-heat-coins { display: inline-flex; gap: 3px; align-items: center; }
.hl-heat-coin {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  cursor: pointer;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  transition: color 120ms var(--ease, ease), border-color 120ms var(--ease, ease), background 120ms var(--ease, ease);
}
.hl-heat-coin:hover { color: var(--text-secondary); border-color: rgba(255, 255, 255, 0.22); }
.hl-heat-coin.is-active {
  color: var(--green-bright, #1FE084);
  border-color: rgba(31, 224, 132, 0.45);
  background: rgba(31, 224, 132, 0.10);
}

/* ── Heatmap coin dropdown (top-30 ∩ Hyperliquid). Matches the chip vocabulary;
      active = brand green. Menu is absolutely positioned below the button. ── */
.hl-heat-coindd { position: relative; display: inline-flex; }
.hl-heat-coindd-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.04em;
  padding: 3px 7px; cursor: pointer;
  color: var(--text); background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 6px;
  transition: border-color 120ms var(--ease, ease), background 120ms var(--ease, ease);
}
.hl-heat-coindd-btn:hover { border-color: rgba(255, 255, 255, 0.22); }
.hl-heat-coindd.is-open .hl-heat-coindd-btn {
  border-color: rgba(31, 224, 132, 0.45); background: rgba(31, 224, 132, 0.10);
}
.hl-heat-coindd-label { color: var(--green-bright, #1FE084); }
.hl-heat-coindd-caret { font-size: 8px; color: var(--text-muted); line-height: 1; }
.hl-heat-coindd.is-open .hl-heat-coindd-caret { color: var(--green-bright, #1FE084); }

.hl-heat-coindd-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 60;
  margin: 0; padding: 4px; list-style: none;
  min-width: 168px; max-height: 264px; overflow-y: auto;
  background: rgba(15, 21, 32, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px;
  box-shadow: 0 14px 36px -10px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hl-heat-coindd-menu[hidden] { display: none; }
.hl-heat-coindd-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 6px; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; color: var(--text-secondary);
}
.hl-heat-coindd-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.hl-heat-coindd-item.is-active { color: var(--green-bright, #1FE084); background: rgba(31, 224, 132, 0.10); }
.hl-heat-coindd-logo { width: 15px; height: 15px; border-radius: 50%; flex: 0 0 auto; object-fit: contain; }
.hl-heat-coindd-logo--blank { background: rgba(255, 255, 255, 0.08); }
.hl-heat-coindd-sym { font-weight: 700; min-width: 38px; }
.hl-heat-coindd-name {
  color: var(--text-muted); font-size: 9px; letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px;
}

/* ── Bottom range scrubber — full-window sparkline + draggable window band ── */
.hl-heat-card .hl-canvas-wrap { height: 600px; }   /* dominant full-width band (definite size → absolute-fill canvas; ~1.6× prior) */
.hl-heat-scrub {
  flex: 0 0 auto; position: relative; height: 30px; margin-top: 2px;
  border-radius: 6px; overflow: hidden; touch-action: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.hl-heat-scrub-spark { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hl-heat-scrub-mask {
  position: absolute; top: 0; bottom: 0;
  background: rgba(8, 12, 20, 0.55); pointer-events: none;
}
.hl-heat-scrub-mask-l { left: 0; }
.hl-heat-scrub-window {
  position: absolute; top: 0; bottom: 0;
  border-left: 2px solid #60A5FA; border-right: 2px solid #60A5FA;
  background: rgba(96, 165, 250, 0.08);
  cursor: grab; touch-action: none; box-sizing: border-box;
}
.hl-heat-scrub-window:active { cursor: grabbing; }
.hl-heat-scrub-handle {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 10px; height: 64%; border-radius: 3px; cursor: ew-resize;
  /* two dark grip lines over a blue handle */
  background:
    linear-gradient(rgba(8,12,20,0.6), rgba(8,12,20,0.6)) 3px 50% / 1px 56% no-repeat,
    linear-gradient(rgba(8,12,20,0.6), rgba(8,12,20,0.6)) 6px 50% / 1px 56% no-repeat,
    #60A5FA;
  box-shadow: 0 0 4px rgba(96, 165, 250, 0.5);
}
.hl-heat-scrub-handle-l { left: -6px; }
.hl-heat-scrub-handle-r { right: -6px; }

/* ════════════════════════════════════════════════════════════════
   CENTER — Whale Watch table
   ════════════════════════════════════════════════════════════════ */
.hl-whale-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.hl-sort-group { display: inline-flex; gap: 4px; padding: 4px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; }
.hl-sort-btn {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase;
  padding: 5px 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-tertiary); cursor: pointer;
  transition: background 150ms, color 150ms;
}
.hl-sort-btn:hover { color: var(--text); }
.hl-sort-btn.is-active { background: rgba(31, 224, 132, 0.10); color: var(--green-bright); }

.hl-whale-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.hl-whale-table thead th {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-tertiary);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.hl-whale-table th.num, .hl-whale-table td.num { text-align: right; }
.hl-whale-table tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.hl-whale-table tbody tr.hl-whale-row { cursor: pointer; transition: background 120ms; }
.hl-whale-table tbody tr.hl-whale-row:hover { background: rgba(255,255,255,0.02); }

.hl-addr { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); }
.hl-addr-mono { color: var(--text); letter-spacing: 0.02em; }
.hl-copy-btn, .hl-scan-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 150ms, border-color 150ms;
}
.hl-copy-btn:hover, .hl-scan-link:hover { color: var(--green-bright); border-color: rgba(31,224,132,0.28); }
.hl-copy-btn svg, .hl-scan-link svg { width: 12px; height: 12px; }

.hl-pos-compact { display: grid; gap: 2px; }
.hl-pos-compact .hl-pos-line {
  display: flex; gap: 6px; align-items: baseline;
  font-family: var(--font-mono); font-size: 11px;
}
.hl-pos-side.long  { color: var(--green-bright); }
.hl-pos-side.short { color: var(--red-bright); }

.hl-pnl.up   { color: var(--green-bright); }
.hl-pnl.down { color: var(--red-bright); }
.hl-pnl-pending { color: var(--text-muted); cursor: help; border-bottom: 1px dotted var(--text-muted); }

/* Expandable whale detail row (shell) */
.hl-whale-detail td { padding: 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.hl-whale-detail-inner {
  display: none;
  padding: 14px 12px;
  background: rgba(255,255,255,0.015);
}
.hl-whale-row.is-open + .hl-whale-detail .hl-whale-detail-inner { display: grid; gap: 12px; }
.hl-detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hl-detail-spark {
  height: 48px; border-radius: 6px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}

.hl-show-all {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-secondary); cursor: pointer;
  transition: color 150ms, border-color 150ms;
}
.hl-show-all:hover { color: var(--text); border-color: rgba(255,255,255,0.12); }

/* ════════════════════════════════════════════════════════════════
   RIGHT — Liquidation Feed
   ════════════════════════════════════════════════════════════════ */
.hl-liq-filters {
  display: grid; gap: 8px;
  margin-bottom: 12px;
}
.hl-filter-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hl-filter-label {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
  width: 100%;
}
.hl-filter-chip {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  padding: 4px 9px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: var(--text-tertiary); cursor: pointer;
  transition: background 150ms, color 150ms;
}
.hl-filter-chip:hover { color: var(--text); }
.hl-filter-chip.is-active { background: rgba(31, 224, 132, 0.10); color: var(--green-bright); border-color: rgba(31,224,132,0.28); }

.hl-liq-feed {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 3px;
  max-height: 560px; overflow-y: auto;
}
.hl-liq-feed::-webkit-scrollbar { width: 4px; }
.hl-liq-feed::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.hl-liq-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.hl-liq-time { color: var(--text-muted); font-size: 10px; }
.hl-liq-side {
  font-weight: 700; font-size: 9.5px; letter-spacing: 0.08em;
  padding: 2px 6px; border-radius: 4px;
}
/* Liquidation convention: LONG liquidated = forced sell = red; SHORT = green */
.hl-liq-side.long  { color: var(--red-bright);   background: rgba(255, 90, 120, 0.12); }
.hl-liq-side.short { color: var(--green-bright); background: rgba(31, 224, 132, 0.12); }
.hl-liq-coin { color: var(--text); font-weight: 700; }
.hl-liq-notional { color: var(--text); font-weight: 700; text-align: right; }
.hl-liq-meta { color: var(--text-tertiary); font-size: 10px; }
.hl-liq-meta a { color: var(--text-tertiary); }
.hl-liq-meta a:hover { color: var(--green-bright); }

/* Whale expand detail lists (Stage 3b) */
.hl-detail-list {
  margin-top: 8px;
  display: grid; gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.hl-pos-row, .hl-fill-row {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  padding: 5px 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 6px;
}

/* ════════════════════════════════════════════════════════════════
   EMPTY / AWAKENING STATES
   ════════════════════════════════════════════════════════════════ */
.hl-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  padding: 32px 18px;
  text-align: center;
  color: var(--text-tertiary);
}
.hl-empty-pulse {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.hl-empty-pulse::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green-bright); box-shadow: 0 0 10px var(--green-bright);
  animation: pulse-dot 1.6s infinite;
}
.hl-empty-sub { font-size: 11px; color: var(--text-muted); max-width: 32ch; }

/* Skeleton helper (reuses base .skeleton animation) */
.hl-sk { display: inline-block; border-radius: 5px; }
.hl-sk-line { height: 12px; width: 100%; }
.hl-sk-pill { height: 18px; width: 64px; border-radius: 999px; }

/* Mobile "Show details" toggle — hidden on desktop */
.hl-mobile-toggle { display: none; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — breakpoints cloned verbatim from onchain.css
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1399px) {
  .hl-grid {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .hl-col-right { position: static; grid-column: 1 / -1; }
  .hl-strip { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
}

@media (max-width: 1023px) {
  .hl-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .hl-col-left, .hl-col-right {
    position: static;
    grid-column: 1 / -1;
  }
  .hl-terminal-split { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hl-page { padding: 20px 14px 56px; }
  .hl-title { font-size: 40px; }
  .hl-strip { grid-template-columns: repeat(2, 1fr); }
  .hl-canvas-wrap { height: 240px; }
  .hl-heat-card .hl-canvas-wrap { height: 380px; }   /* heatmap stays taller (full-width) on phones */
  .hl-mark-price { font-size: 32px; }

  /* Mobile: collapse depth + trades behind a toggle */
  .hl-mobile-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 11px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase;
    padding: 10px; border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary); cursor: pointer;
  }
  .hl-terminal-split { display: none; }
  .hl-terminal-split.is-open { display: grid; }

  /* Whale table: hide secondary columns; pagination shell takes over */
  .hl-whale-table th.hl-col-secondary,
  .hl-whale-table td.hl-col-secondary { display: none; }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hl-empty-pulse::before,
  .hl-pill-live::before { animation: none; }
}
