/* FlowDesk — dark trading dashboard. Chart tokens from the validated
   reference palette (dark mode); green/red flow convention per industry. */
:root {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #222220;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --pos: #3987e5;    /* diverging cool pole: +GEX, dealer support */
  --neg: #e66767;    /* diverging warm pole: -GEX, dealer resistance */
  --bull: #0ca30c;
  --bear: #d03b3b;
  --gold: #c98500;
  --accent: #3987e5;
  --violet: #9085e9;
  --orange: #d95926;
  --green: #008300;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.shell { display: flex; min-height: 100vh; }

/* ---- sidebar ---- */
.sidebar {
  width: 208px;
  flex: 0 0 208px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 10px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.logo {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 10px 16px;
}
.bolt { color: var(--gold); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 13.5px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.nav .ico { width: 18px; text-align: center; color: var(--muted); }
.nav:hover { background: rgba(255, 255, 255, 0.06); }
.nav.active {
  background: rgba(57, 135, 229, 0.14);
  color: var(--ink);
}
.nav.active .ico { color: var(--accent); }
.sidefoot {
  margin-top: auto;
  padding: 10px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidefoot a { color: var(--accent); text-decoration: none; }
.sidefoot a:hover { text-decoration: underline; }

/* ---- content ---- */
.content { flex: 1; min-width: 0; padding: 20px 24px 60px; max-width: 1500px; }
.view { display: none; }
.view.active { display: block; }
.pagetitle { font-size: 19px; margin: 0 0 14px; font-weight: 650; }
.dim { color: var(--muted); font-weight: 400; font-size: 0.8em; }
.lede { color: var(--ink-2); font-size: 13px; max-width: 72em; margin: -6px 0 16px; }
.secttitle { font-size: 14px; color: var(--ink-2); margin: 22px 0 10px; font-weight: 600; }
.res { color: var(--neg); } .sup { color: var(--pos); }

/* ---- tiles ---- */
.tiles { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 128px;
}
.tile .v { font-size: 21px; font-weight: 600; }
.tile .v.bull { color: var(--bull); }
.tile .v.bear { color: var(--neg); }
.tile .l {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
/* sentiment meter inside a tile */
.meter { height: 6px; border-radius: 3px; background: var(--baseline);
  margin-top: 8px; overflow: hidden; display: flex; }
.meter .fill { background: var(--bull); height: 100%; }
.meter .rest { background: var(--bear); height: 100%; flex: 1; }

/* ---- cards & grids ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.card h2 { font-size: 13px; margin: 0 0 10px; font-weight: 600; color: var(--ink-2); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .grid3 { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; } }

/* radar cards */
.rcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 10px;
  padding: 12px 14px;
}
.rcard.bull { border-left-color: var(--bull); }
.rcard.bear { border-left-color: var(--bear); }
.rcard .head { display: flex; justify-content: space-between; align-items: baseline; }
.rcard .tkr { font-size: 16px; font-weight: 700; }
.rcard .prem { font-size: 15px; font-weight: 600; }
.rcard .sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.rcard .sharebar { height: 5px; border-radius: 3px; background: var(--baseline);
  margin-top: 8px; overflow: hidden; }
.rcard .sharebar div { height: 100%; }
.rcard.bull .sharebar div { background: var(--bull); }
.rcard.bear .sharebar div { background: var(--bear); }

/* ---- pills / filters ---- */
.pillbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.pill:hover { background: var(--surface-2); }
.pill.on {
  background: rgba(57, 135, 229, 0.16);
  border-color: rgba(57, 135, 229, 0.5);
  color: var(--ink);
}
.pillbar input, .pillbar select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  width: 130px;
}
.pillbar select { width: auto; }
.pillbar input:focus, .pillbar select:focus { outline: 1px solid var(--accent); }
.count { color: var(--muted); font-size: 12px; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; font-size: 12px; color: var(--ink-2); }
.key { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.key input { accent-color: var(--accent); }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch.pos { background: var(--pos); }
.swatch.neg { background: var(--neg); }

/* ---- tables ---- */
.tablewrap { overflow: auto; max-height: 72vh; overscroll-behavior: contain; }
.tablewrap.tall { max-height: 64vh; }
table {
  border-collapse: collapse;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
th, td {
  padding: 6px 10px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--grid);
  font-size: 13px;
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  border-bottom: none;
  box-shadow: 0 1px 0 var(--grid);
  z-index: 1;
}
th.l, td.l { text-align: left; }
th.sorted { color: var(--ink); }
tbody tr:hover { background: rgba(255, 255, 255, 0.04); }
td b { font-weight: 600; }
#gexRankBody tr { cursor: pointer; }

/* mini tables inside cards */
table.mini { border: none; background: none; }
table.mini th { position: static; box-shadow: none; cursor: default; }
table.mini td, table.mini th { padding: 5px 8px; font-size: 12.5px; }
table.mini tr:last-child td { border-bottom: none; }
.minibar { display: inline-block; height: 5px; border-radius: 3px; background: var(--baseline);
  width: 60px; vertical-align: middle; overflow: hidden; }
.minibar div { height: 100%; background: var(--bull); }

/* badges / tags */
.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.badge.bull { color: var(--bull); background: rgba(12, 163, 12, 0.12); }
.badge.bear { color: var(--neg); background: rgba(230, 103, 103, 0.12); }
.badge.neut { color: var(--muted); background: rgba(255, 255, 255, 0.05); }
.tag {
  display: inline-block;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink-2);
  margin-right: 3px;
}
.tag.whale { background: rgba(201, 133, 0, 0.18); color: #eda100; }
.tag.aggressive { background: rgba(230, 103, 103, 0.15); color: var(--neg); }
.tag.opening { background: rgba(57, 135, 229, 0.15); color: var(--pos); }
.scorebar { display: inline-flex; align-items: center; gap: 6px; }
.scorebar .sb { width: 44px; height: 5px; border-radius: 3px; background: var(--baseline); overflow: hidden; }
.scorebar .sb div { height: 100%; background: var(--accent); }
.ok { color: var(--bull); font-weight: 600; }
.no { color: var(--muted); }
.suspipill { font-weight: 700; color: var(--gold); }

.confirmbox { margin-top: 20px; }
.confirmbox summary { cursor: pointer; color: var(--ink-2); font-size: 13px; padding: 6px 0; }

/* ---- charts ---- */
.chartwrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 8px 8px;
}
.chartwrap.bare { border: none; background: none; padding: 4px 0; }
.chartcard { padding: 14px 16px 10px; }
.chartlabel { font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.05em; margin: 4px 0 2px; }
#gexChart, #lvChart, #hiroPrice, #hiroFlow { display: block; width: 100%; }
.tooltip {
  position: absolute;
  pointer-events: none;
  background: #242422;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  z-index: 10;
  min-width: 150px;
}
.tooltip .t { font-weight: 600; margin-bottom: 3px; }
.tooltip .r { display: flex; justify-content: space-between; gap: 14px; color: var(--ink-2); }
.tooltip .r b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* lotto */
.hitchip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(201, 133, 0, 0.2);
  color: #eda100;
}
.statuschip { font-size: 11px; font-weight: 600; }
.statuschip.tracking { color: var(--accent); }
.statuschip.done { color: var(--muted); }
td.best { color: var(--bull); font-weight: 700; }

/* trade ideas */
.cardgrid.wide { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.idea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 12px;
  padding: 14px 16px;
}
.idea.bull { border-left-color: var(--bull); }
.idea.bear { border-left-color: var(--bear); }
.idea .head { display: flex; justify-content: space-between; align-items: baseline; }
.idea .tkr { font-size: 18px; font-weight: 700; }
.idea .score { font-size: 13px; color: var(--gold); font-weight: 700; }
.idea .contract { font-size: 14px; margin: 6px 0 2px; color: var(--ink); font-weight: 600; }
.idea .meta { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.idea ul { margin: 6px 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
.idea li { margin: 3px 0; }
.idea .warn { color: #eda100; }
.idea .playbook {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--grid);
  margin-top: 8px;
  padding-top: 8px;
}

/* calendar */
.calwrap { display: flex; flex-direction: column; gap: 10px; }
.calday {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  gap: 16px;
}
.calday.today { border-color: rgba(57, 135, 229, 0.5); }
.calday .d {
  flex: 0 0 92px;
  font-weight: 600;
  color: var(--ink-2);
  font-size: 13px;
}
.calday .d .dow { color: var(--muted); font-size: 11px; display: block; }
.calday .evs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 7px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-2);
}
.ev.high { background: rgba(230, 103, 103, 0.14); color: var(--neg); }
.ev.medium { background: rgba(201, 133, 0, 0.14); color: #eda100; }
.ev.earn { background: rgba(57, 135, 229, 0.14); color: var(--pos); }
.ev.earn.risk { outline: 1px dashed #eda100; }
.ev.custom { background: rgba(144, 133, 233, 0.16); color: var(--violet); }
.ev .t { color: var(--muted); font-size: 10.5px; }
.prewatch {
  background: rgba(201, 133, 0, 0.10);
  border: 1px solid rgba(201, 133, 0, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink-2);
}
.prewatch b { color: #eda100; }

.emptycard { max-width: 640px; }
.emptycard pre {
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  overflow-x: auto;
}
.note { color: var(--muted); font-size: 12px; margin-top: 14px; max-width: 75em; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static;
    flex-direction: row; align-items: center; overflow-x: auto; }
  .sidebar nav { flex-direction: row; }
  .nav { padding: 7px 10px; }
  .nav .ico { display: none; }
  .sidefoot { display: none; }
}

/* lotto sub-tabs */
.subtab {
  background: none; border: 1px solid var(--line); color: var(--ink-2);
  font: inherit; font-size: 12.5px; padding: 6px 16px; border-radius: 999px;
  cursor: pointer;
}
.subtab:hover { background: rgba(255, 255, 255, 0.06); }
.subtab.active { color: var(--ink); border-color: var(--accent); }

/* ==== mobile nav overhaul ==== */
.hamb { position: fixed; top: 10px; left: 10px; z-index: 60; width: 40px; height: 40px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.15); background: rgba(20,26,36,.92);
  color: #e8ecf4; font-size: 18px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; }
.toolswitch { display: flex; margin: 12px 0 14px; border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px; overflow: hidden; }
.toolswitch a { flex: 1; text-align: center; padding: 7px 0; font-size: 12px; font-weight: 700;
  text-decoration: none; color: #8a93a5; letter-spacing: .04em; }
.toolswitch a.on { background: #e8ecf4; color: #10151d; }
.backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
@media (min-width: 901px) {
  body.navhide .sidebar { display: none; }
}
.sidebar .logo { margin-left: 44px; }
@media (max-width: 900px) {
  .shell { flex-direction: row; }
  .sidebar { display: block !important; position: fixed; top: 0; left: 0; bottom: 0;
    width: 250px; z-index: 50; transform: translateX(-105%); transition: transform .18s ease;
    overflow-y: auto; height: 100vh; }
  body.navopen .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.65); }
  .sidebar nav { flex-direction: column !important; flex-wrap: nowrap !important; }
  body.navopen .backdrop { display: block; }
  .content { padding: 58px 12px 60px !important; }
  .pagetitle { font-size: 19px; }
  .tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { font-size: 12px; }
}
.toolswitch { height: 34px; }
.toolswitch a { display: flex; align-items: center; justify-content: center; height: 100%; }

.toolswitch.topfix { position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 55; width: 220px; margin: 0; background: rgba(16,21,29,.94); }
@media (min-width: 901px) { .content { padding-top: 58px !important; } }
@media (max-width: 480px) { .toolswitch.topfix { left: auto; right: 10px; transform: none; width: 180px; } }

#view-pm thead th { cursor: pointer; user-select: none; }
#view-pm thead th:hover { color: var(--ink); }

/* ===== UX upgrade: freshness, errors, drawer, watchlist, density ===== */
.freshchip { position: fixed; top: 12px; right: 12px; z-index: 60;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 20px; border: 1px solid transparent;
  background: #121a24; cursor: default; }
.freshchip.ok { color: #35c46a; border-color: rgba(53,196,106,.35); }
.freshchip.warn { color: #e0a53f; border-color: rgba(224,165,63,.45); }
.freshchip.red { color: #e66767; border-color: rgba(230,103,103,.5); }
.errbanner { position: sticky; top: 0; z-index: 70; background: #3a1418;
  color: #ffb3b3; border-bottom: 1px solid #7c2730; padding: 8px 14px;
  font-size: 12px; font-weight: 600; }
.tkdback { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 80; }
.tkdrawer { position: fixed; top: 0; right: 0; bottom: 0; width: 400px;
  max-width: 92vw; z-index: 81; background: #10161f;
  border-left: 1px solid #243043; box-shadow: -12px 0 40px rgba(0,0,0,.5);
  display: flex; flex-direction: column; }
.tkdhead { display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid #1d2836; }
.tkdhead b { font-size: 18px; letter-spacing: .03em; margin-right: auto; }
.tkdbtn { background: #16202e; color: #c3cbd8; border: 1px solid #26344a;
  border-radius: 6px; padding: 5px 10px; font: inherit; font-size: 12px;
  cursor: pointer; }
.tkdbtn:hover { color: #fff; border-color: #3a4c68; }
.tkdbtn.on { color: #ffd76a; border-color: rgba(255,215,106,.45); }
.tkdbody { overflow: auto; padding: 8px 16px 24px; }
.tkdsect { margin-top: 14px; }
.tkdt { font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted, #8794a6); margin-bottom: 6px; }
.tkdrow { font-size: 12.5px; padding: 4px 0; line-height: 1.5; }
.tkbtn { cursor: pointer; border-bottom: 1px dotted rgba(255,255,255,.25); }
.tkbtn:hover { color: #fff; border-bottom-color: #fff; }
.wstar { color: #ffd76a; font-size: 11px; }
body.compact td, body.compact th { padding-top: 3px !important;
  padding-bottom: 3px !important; font-size: 11.5px; }
body.compact .tile { padding: 6px 8px; }
body.compact .tile .v { font-size: 14px; }
.densbtn { margin-top: 8px; background: none; border: 1px solid #26344a;
  color: var(--muted, #8794a6); border-radius: 6px; padding: 4px 8px;
  font: inherit; font-size: 10.5px; cursor: pointer; width: 100%; }
.densbtn:hover { color: #fff; }
@media (max-width: 640px) {
  .tkdrawer { width: 100vw; max-width: 100vw; }
  .freshchip { top: auto; bottom: 10px; right: 10px; }
}

/* hidden must beat component display rules (drawer used display:flex) */
[hidden] { display: none !important; }

.whalerow td { background: rgba(201,133,0,.08); }

/* ==================== MOTION LAYER ====================
   Every animation here encodes state: what's live, what's new,
   what changed. Nothing moves purely for decoration.
   Fully disabled under prefers-reduced-motion.            */

:root {
  --ease-out: cubic-bezier(.22,.61,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --glow-bull: 0 0 0 1px rgba(53,196,106,.35), 0 0 18px -4px rgba(53,196,106,.5);
  --glow-bear: 0 0 0 1px rgba(230,103,103,.35), 0 0 18px -4px rgba(230,103,103,.5);
}

/* ---- view transitions: content settles in, no jarring swap ---- */
.view.active { animation: viewIn .26s var(--ease-out) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---- tiles: lift on hover, stagger on entry ---- */
.tile {
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out),
              border-color .18s var(--ease-out);
  animation: tileIn .32s var(--ease-out) both;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px -8px rgba(0,0,0,.6);
  border-color: rgba(255,255,255,.18);
}
.tiles .tile:nth-child(1){animation-delay:.02s}
.tiles .tile:nth-child(2){animation-delay:.06s}
.tiles .tile:nth-child(3){animation-delay:.10s}
.tiles .tile:nth-child(4){animation-delay:.14s}
.tiles .tile:nth-child(5){animation-delay:.18s}
@keyframes tileIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* ---- live pulse: the chip breathes only while data is fresh ---- */
/* keep position:fixed from the base rule - it also anchors the ::before dot */
.freshchip { padding-left: 20px !important; }
.freshchip::before {
  content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px;
  margin-top: -3px; border-radius: 50%; background: currentColor;
}
.freshchip.ok::before { animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(53,196,106,.55); opacity: 1; }
  70%     { box-shadow: 0 0 0 7px rgba(53,196,106,0); opacity: .75; }
}

/* ---- new print flash: green/red wash the instant a row arrives ---- */
@keyframes flashBull {
  from { background: rgba(53,196,106,.20); }
  to   { background: transparent; }
}
@keyframes flashBear {
  from { background: rgba(230,103,103,.20); }
  to   { background: transparent; }
}
tr.newBull td { animation: flashBull 1.6s var(--ease-out) both; }
tr.newBear td { animation: flashBear 1.6s var(--ease-out) both; }

/* ---- whale rows get a persistent left marker, not just a tint ---- */
.whalerow td:first-child { box-shadow: inset 3px 0 0 var(--gold,#c98500); }

/* ---- nav: active item slides its indicator ---- */
.sidebar .nav { position: relative; transition: color .15s var(--ease-out),
                background .15s var(--ease-out); }
.sidebar .nav::after {
  content: ""; position: absolute; left: 0; top: 50%; height: 0;
  width: 2px; background: var(--accent,#9dff3d); border-radius: 2px;
  transform: translateY(-50%); transition: height .22s var(--ease-spring);
}
.sidebar .nav.active::after { height: 62%; }
.sidebar .nav:hover { background: rgba(255,255,255,.04); }

/* ---- tables: rows fade in, hover raises ---- */
tbody tr { transition: background .12s var(--ease-out); }
tbody tr:hover { background: rgba(255,255,255,.045); }
.tablewrap table { animation: fadeIn .3s var(--ease-out) both; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* ---- clickable tickers: underline grows from left ---- */
.tkbtn { position: relative; border-bottom: none !important; }
.tkbtn::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: currentColor; transition: width .2s var(--ease-out);
}
.tkbtn:hover::after { width: 100%; }

/* ---- drawer: slide + backdrop fade ---- */
.tkdrawer { animation: drawerIn .24s var(--ease-out) both; }
@keyframes drawerIn { from{transform:translateX(24px);opacity:0} to{transform:none;opacity:1} }
.tkdback { animation: fadeIn .2s var(--ease-out) both; }
.tkdsect { animation: tileIn .28s var(--ease-out) both; }
.tkdsect:nth-child(2){animation-delay:.04s}
.tkdsect:nth-child(3){animation-delay:.08s}
.tkdsect:nth-child(4){animation-delay:.12s}

/* ---- buttons / pills: press feedback ---- */
.pill, .subtab, .tkdbtn, .densbtn {
  transition: transform .12s var(--ease-out), background .15s var(--ease-out),
              border-color .15s var(--ease-out), color .15s var(--ease-out);
}
.pill:active, .subtab:active, .tkdbtn:active { transform: scale(.96); }
.pill.on, .subtab.active { box-shadow: 0 0 12px -4px var(--accent,#9dff3d); }

/* ---- directional glow on badges ---- */
.badge.bull { box-shadow: var(--glow-bull); }
.badge.bear { box-shadow: var(--glow-bear); }

/* ---- skeleton shimmer while a feed is loading ---- */
.skel {
  background: linear-gradient(90deg, rgba(255,255,255,.04) 25%,
    rgba(255,255,255,.09) 37%, rgba(255,255,255,.04) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite;
  border-radius: 6px; height: 14px;
}
@keyframes shimmer { from{background-position:100% 0} to{background-position:0 0} }

/* ---- sortable headers ---- */
thead th[onclick] { transition: color .15s var(--ease-out); }
thead th[onclick]:hover { color: var(--accent,#9dff3d); }

/* ---- respect the user's motion setting ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}


/* ==================== VISUAL SYSTEM v2 ====================
   A cooler, deeper palette with real depth: glass on chrome,
   solid on data. Semantic green/red is untouched so numbers
   never become ambiguous. Density is identical to before.  */

:root {
  /* --- surfaces: cool near-black, subtle blue cast --- */
  --page:      #080b11;
  --page-2:    #0b0f16;
  --surface:   rgba(19, 25, 35, .72);
  --surface-2: rgba(26, 34, 47, .78);
  --surface-solid: #131923;
  --border:    rgba(255,255,255,.08);
  --border-2:  rgba(255,255,255,.14);

  /* --- type --- */
  --ink:   #eef2f8;
  --ink-2: #aab6c8;
  --muted: #6d7c92;

  /* --- accents --- */
  --accent:    #4d9fff;
  --accent-2:  #7c5cff;
  --cyan:      #22d3ee;
  --gold:      #f0b429;

  /* --- semantic (kept vivid + distinguishable) --- */
  --bull: #2ee08a;
  --bear: #ff5f6d;
  --pos:  #4d9fff;
  --neg:  #ff5f6d;
  --violet: #9085e9;

  /* --- gradients --- */
  --grad-accent: linear-gradient(135deg, #4d9fff 0%, #7c5cff 100%);
  --grad-bull:   linear-gradient(135deg, #2ee08a 0%, #12b981 100%);
  --grad-bear:   linear-gradient(135deg, #ff5f6d 0%, #e0344a 100%);
  --grad-sheen:  linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0));

  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 8px 28px -10px rgba(0,0,0,.75);
  --shadow-glow: 0 0 40px -12px rgba(77,159,255,.45);
  --line: rgba(255,255,255,.12);   /* legacy alias used by older rules */
  --card: #131923;
  --grid: rgba(255,255,255,.07);
  --baseline: rgba(255,255,255,.14);
  --surface-2: rgba(26,34,47,.78);
}

/* ---- page: layered radial wash instead of flat black ---- */
body {
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(77,159,255,.10), transparent 62%),
    radial-gradient(900px 560px at 8% 105%, rgba(124,92,255,.09), transparent 60%),
    var(--page);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---- sidebar: frosted glass rail ---- */
.sidebar {
  background: linear-gradient(180deg, rgba(19,25,35,.92), rgba(11,15,22,.92));
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-right: 1px solid var(--border);
}
.logo {
  background: var(--grad-accent);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -.02em; font-weight: 750;
}
.logo .bolt { -webkit-text-fill-color: initial; }

/* ---- nav: pill highlight + gradient indicator ---- */
.sidebar .nav {
  border-radius: 9px; margin: 1px 8px; padding-left: 12px;
  color: var(--ink-2); font-weight: 500;
}
.sidebar .nav.active {
  background: linear-gradient(90deg, rgba(77,159,255,.16), rgba(124,92,255,.05));
  color: #fff; font-weight: 650;
}
.sidebar .nav::after { background: var(--grad-accent) !important; left: 2px; }

/* ---- tiles: glass card, gradient top sheen, numeric emphasis ---- */
.tile {
  position: relative; overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.tile::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
}
.tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--grad-sheen);
}
.tile:hover { border-color: var(--border-2); box-shadow: var(--shadow-2); }
.tile .v {
  font-size: 22px; font-weight: 680; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.tile .v.bull {
  background: var(--grad-bull); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tile .v.bear, .tile .v.neg {
  background: var(--grad-bear); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tile .l {
  font-size: 9.5px; letter-spacing: .1em; color: var(--muted);
  text-transform: uppercase; font-weight: 600;
}

/* ---- cards ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-1);
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.card:hover { border-color: var(--border-2); box-shadow: var(--shadow-2); }

/* ---- headings: gradient rule under the title ---- */
.pagetitle {
  font-size: 21px; font-weight: 700; letter-spacing: -.02em;
  position: relative; padding-bottom: 10px;
}
.pagetitle::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 2px;
  background: var(--grad-accent); border-radius: 2px;
}
.lede { color: var(--ink-2); }

/* ---- tables: solid (never glass) so numbers stay crisp ---- */
.tablewrap {
  background: rgba(11,15,22,.55); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: auto;
}
table { border-collapse: separate; border-spacing: 0; }
thead th {
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(180deg, #141b26, #111823);
  border-bottom: 1px solid var(--border-2) !important;
  font-size: 9.5px; letter-spacing: .09em; color: var(--muted);
  text-transform: uppercase; font-weight: 650;
}
td { font-variant-numeric: tabular-nums; border-bottom: 1px solid rgba(255,255,255,.045); }
tbody tr:hover { background: rgba(77,159,255,.055) !important; }
tbody tr:last-child td { border-bottom: none; }

/* ---- badges: gradient fills ---- */
.badge {
  border-radius: 999px; font-size: 9.5px; font-weight: 700;
  letter-spacing: .05em; padding: 3px 9px; border: none;
}
.badge.bull { background: rgba(46,224,138,.15); color: var(--bull);
  box-shadow: inset 0 0 0 1px rgba(46,224,138,.32); }
.badge.bear { background: rgba(255,95,109,.15); color: var(--bear);
  box-shadow: inset 0 0 0 1px rgba(255,95,109,.32); }
.badge.neut { background: rgba(255,255,255,.06); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }

/* ---- pills / subtabs: glass, gradient when active ---- */
.pill, .subtab {
  background: rgba(255,255,255,.045); border: 1px solid var(--border);
  border-radius: 999px; color: var(--ink-2); font-weight: 600;
}
.pill:hover, .subtab:hover { background: rgba(255,255,255,.09); color: var(--ink); }
.pill.on, .subtab.active {
  background: var(--grad-accent); border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px -4px rgba(77,159,255,.6);
}

/* ---- inputs ---- */
input, select {
  background: rgba(255,255,255,.045) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important; color: var(--ink) !important;
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
input:focus, select:focus {
  outline: none; border-color: rgba(77,159,255,.55) !important;
  box-shadow: 0 0 0 3px rgba(77,159,255,.14);
}

/* ---- top chrome: glass ---- */
.toolswitch.topfix, .hamb {
  background: rgba(13,18,26,.72) !important;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-1);
}
.toolswitch a.on {
  background: var(--grad-accent); color: #fff;
  box-shadow: 0 3px 12px -3px rgba(77,159,255,.65);
}
.hamb:hover { border-color: var(--border-2) !important; }

.freshchip {
  background: rgba(13,18,26,.78) !important;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-1);
}

/* ---- drawer ---- */
.tkdrawer {
  background: linear-gradient(180deg, rgba(16,22,31,.97), rgba(11,15,22,.97));
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-left: 1px solid var(--border-2);
}
.tkdhead { background: var(--grad-sheen); }
.tkdhead b {
  background: var(--grad-accent); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---- tags ---- */
.tag { border-radius: 5px; font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.tag.whale { background: rgba(240,180,41,.16); color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(240,180,41,.35); }
.tag.aggressive { background: rgba(255,95,109,.14); color: var(--bear);
  box-shadow: inset 0 0 0 1px rgba(255,95,109,.3); }

/* ---- scrollbars ---- */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.14); border-radius: 6px;
  border: 2px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); background-clip: content-box; }

/* ---- selection ---- */
::selection { background: rgba(77,159,255,.32); color: #fff; }

/* ---- colour helpers kept in sync ---- */
.bull { color: var(--bull) !important; }
.neg, .bear { color: var(--bear) !important; }
.dim { color: var(--muted); }
.whalerow td { background: rgba(240,180,41,.055); }
.whalerow td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

/* glass is expensive on low-end phones — drop blur, keep colour */
@media (max-width: 640px) {
  .sidebar, .tile, .card, .tkdrawer, .toolswitch.topfix, .hamb, .freshchip {
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .tile, .card { background: var(--surface-solid); }
}


/* ==================== OVERVIEW MODULES ==================== */
.ovhero { display: grid; grid-template-columns: 340px 1fr; gap: 14px; margin-bottom: 16px; }
.ovsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
@media (max-width: 900px) {
  .ovhero, .ovsplit { grid-template-columns: 1fr; }
}

/* --- fear & greed --- */
.fgcard { display: flex; flex-direction: column; }
#fgGauge { position: relative; text-align: center; }
.fgsvg { width: 100%; max-width: 260px; height: auto; display: block; margin: 0 auto; }
.fgneedle { transform-origin: 50% 88%; animation: needleIn .9s var(--ease-spring) both; }
@keyframes needleIn { from { transform: rotate(-72deg); } to { transform: none; } }
.fgread { margin-top: -14px; }
.fgscore { font-size: 40px; font-weight: 750; letter-spacing: -.03em;
  line-height: 1; font-variant-numeric: tabular-nums; }
.fglabel { font-size: 12px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; margin-top: 3px; }
.fgscore.fear2, .fglabel.fear2 { color: #ff4d5e; }
.fgscore.fear,  .fglabel.fear  { color: #ff9f45; }
.fgscore.neutral, .fglabel.neutral { color: #e8c547; }
.fgscore.greed, .fglabel.greed { color: #7ed957; }
.fgscore.greed2, .fglabel.greed2 { color: #2ee08a; }
.fgparts { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.fgpart { display: grid; grid-template-columns: 96px 1fr 26px; align-items: center;
  gap: 8px; font-size: 11px; }
.fgpn { color: var(--ink-2); }
.fgbar { height: 5px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.fgbar i { display: block; height: 100%; background: var(--grad-accent);
  border-radius: 3px; animation: growX .7s var(--ease-out) both; }
.fgpv { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.fgpd { grid-column: 1 / -1; font-size: 10px; margin-top: -4px; }
@keyframes growX { from { width: 0 !important; } }

/* --- news --- */
.newslist { display: flex; flex-direction: column; gap: 10px; max-height: 292px; overflow: auto; }
.newsitem { padding-left: 10px; border-left: 2px solid rgba(255,255,255,.10);
  transition: border-color .15s var(--ease-out); }
.newsitem:hover { border-left-color: var(--accent); }
.newsitem.mover { border-left-color: rgba(240,180,41,.5); }
.newst { font-size: 12.5px; line-height: 1.4; }
.newst a { color: var(--ink); text-decoration: none; }
.newst a:hover { color: var(--accent); }
.newsm { font-size: 10.5px; margin-top: 2px; }

/* --- directional bars --- */
.barsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .barsplit { grid-template-columns: 1fr; gap: 16px; } }
.barhead { font-size: 9.5px; letter-spacing: .1em; font-weight: 700;
  text-transform: uppercase; margin-bottom: 8px; }
.barhead.bull { color: var(--bull); }
.barhead.bear { color: var(--bear); }
.barrow { display: grid; grid-template-columns: 52px 1fr 68px; align-items: center;
  gap: 9px; padding: 3px 0; cursor: pointer; }
.barrow:hover .bt { color: #fff; }
.bt { font-weight: 700; font-size: 11.5px; color: var(--ink-2); }
.btrack { height: 15px; background: rgba(255,255,255,.05); border-radius: 4px;
  overflow: hidden; }
.btrack i { display: block; height: 100%; border-radius: 4px;
  animation: growX .8s var(--ease-out) both; }
.btrack i.bull { background: var(--grad-bull); }
.btrack i.neg  { background: var(--grad-bear); }
.bv { text-align: right; font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums; }

/* --- top trades / movers rows --- */
.ttrow { display: grid; grid-template-columns: 58px 118px 92px 1fr 26px auto;
  align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.05); font-size: 11.5px; }
.ttrow:last-child { border-bottom: none; }
.ttp { text-align: right; } .tts { text-align: right; }
.mvrow { display: grid; grid-template-columns: 58px 58px 62px auto 1fr;
  align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.05); font-size: 11.5px; }
.mvrow:last-child { border-bottom: none; }
.mvc { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
@media (max-width: 640px) {
  .ttrow { grid-template-columns: 52px 1fr 78px; row-gap: 2px; }
  .ttrow > :nth-child(5), .ttrow > :nth-child(6) { display: none; }
  .mvrow { grid-template-columns: 52px 56px 1fr; }
  .mvrow > :nth-child(4) { display: none; }
  .mvc { grid-column: 1 / -1; }
}


/* ==================== VISUAL v3: remaining components ==================== */

/* --- refresh control (top-right, beside the freshness chip) --- */
.refreshbar {
  position: fixed; top: 12px; right: 122px; z-index: 61;
  display: flex; align-items: center; gap: 7px;
}
.rbtn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(13,18,26,.78); border: 1px solid var(--border);
  color: var(--ink-2); border-radius: 20px; padding: 5px 12px;
  font: inherit; font-size: 11px; font-weight: 650; cursor: pointer;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: color .15s var(--ease-out), border-color .15s var(--ease-out),
              transform .12s var(--ease-out), background .15s var(--ease-out);
}
.rbtn:hover { color: #fff; border-color: var(--border-2);
  background: rgba(77,159,255,.16); }
.rbtn:active { transform: scale(.95); }
.rbtn.run { color: var(--bull); border-color: rgba(46,224,138,.3); }
.ricon { font-size: 13px; line-height: 1; display: inline-block; }
.rbtn.spin .ricon { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rmsg { font-size: 10.5px; color: var(--muted); }
.rmsg.good { color: var(--bull); }
.rmsg.bad  { color: var(--bear); }
@media (max-width: 900px) {
  .refreshbar { top: auto; bottom: 10px; right: 108px; }
  .rlabel { display: none; }
  .rbtn { padding: 6px 10px; }
}

/* --- score bars (Flow Feed conviction) --- */
.scorebar { display: inline-flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums; }
.sb { display: inline-block; width: 46px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.09); overflow: hidden; }
.sb div { height: 100%; border-radius: 3px; background: var(--grad-accent); }

/* --- mini tables inside cards --- */
table.mini { width: 100%; background: none; border: none; }
table.mini th { background: none; border-bottom: 1px solid var(--border) !important;
  font-size: 9px; letter-spacing: .09em; padding: 4px 6px; }
table.mini td { border-bottom: 1px solid rgba(255,255,255,.04);
  padding: 5px 6px; font-size: 11.5px; }
table.mini tr:last-child td { border-bottom: none; }

/* --- chips --- */
.hitchip, .statuschip {
  display: inline-block; border-radius: 5px; padding: 1px 6px;
  font-size: 9px; font-weight: 700; letter-spacing: .05em;
}
.hitchip { background: rgba(46,224,138,.16); color: var(--bull);
  box-shadow: inset 0 0 0 1px rgba(46,224,138,.32); }
.statuschip { background: rgba(255,255,255,.07); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.statuschip.tracking { background: rgba(240,180,41,.14); color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(240,180,41,.3); }
.statuschip.done { background: rgba(255,95,109,.13); color: var(--bear);
  box-shadow: inset 0 0 0 1px rgba(255,95,109,.28); }

/* --- calendar --- */
.calday { background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; transition: border-color .15s var(--ease-out),
  transform .15s var(--ease-out); }
.calday:hover { border-color: var(--border-2); transform: translateY(-2px); }
.calday.today { border-color: rgba(77,159,255,.5);
  box-shadow: 0 0 0 1px rgba(77,159,255,.25), 0 6px 20px -10px rgba(77,159,255,.5); }
.calday .d { font-weight: 700; font-size: 11.5px; }
.calday .dow { color: var(--muted); font-weight: 500; }

/* --- pill bar wrapper --- */
.pillbar { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }

/* --- empty / note states --- */
td.no, .no { color: var(--muted); font-style: normal; padding: 18px 10px; }
.note { color: var(--muted); font-size: 11.5px; line-height: 1.6;
  border-left: 2px solid var(--border); padding-left: 12px; margin-top: 16px; }
.note code { background: rgba(255,255,255,.07); padding: 1px 6px;
  border-radius: 4px; font-size: 11px; color: var(--ink-2); }

/* --- grids --- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1000px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* --- sidebar footer --- */
.sidefoot { border-top: 1px solid var(--border); padding-top: 10px; }
.scaninfo, .sidefoot { font-size: 10.5px; color: var(--muted); }
.sidefoot a { color: var(--accent); font-weight: 600; }

/* --- canvases (GEX / HIRO charts) sit on solid ground --- */
canvas { border-radius: 8px; }
.chartwrap, .chartbox { background: rgba(11,15,22,.6);
  border: 1px solid var(--border); border-radius: var(--radius); }

/* --- keep the top chrome from colliding on wide screens --- */
@media (min-width: 901px) { .content { padding-top: 62px !important; } }

/* sidebar section header + anchor-style nav items */
.navsect { margin: 12px 12px 4px; padding-top: 10px;
  border-top: 1px solid var(--border); font-size: 9.5px; letter-spacing: .1em;
  color: var(--muted); text-transform: uppercase; font-weight: 650; }
a.nav { text-decoration: none; display: flex; align-items: center; }

/* ---- Vol Lab + GEX regime toggle ---- */
.regimebar { display: inline-flex; gap: 0; border-radius: 999px; overflow: hidden;
  border: 1px solid var(--border); }
.regimebar .pill { border: none; border-radius: 0; border-right: 1px solid var(--border); }
.regimebar .pill:last-child { border-right: none; }
.dispgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px; }
.dispcard { background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; }
.dispcard h3 { margin: 0 0 2px; font-size: 14px; font-weight: 650; }
.dispcard .sub { color: var(--muted); font-size: 11.5px; margin-bottom: 10px; }
.dispbar { height: 8px; border-radius: 999px; background: var(--surface-2);
  overflow: hidden; margin: 10px 0 4px; }
.dispbar > i { display: block; height: 100%; background: var(--accent); }
.disprow { display: flex; justify-content: space-between; font-size: 12px;
  padding: 2px 0; border-bottom: 1px solid var(--grid); }
.disprow:last-child { border-bottom: none; }
.tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.tag.lo { background: rgba(12,163,12,.16); color: var(--bull); }
.tag.hi { background: rgba(230,103,103,.16); color: var(--neg); }
.tag.rich { background: rgba(201,133,0,.18); color: var(--gold); }
.intg { font-variant-numeric: tabular-nums; font-weight: 650; }
.intg.ok { color: var(--bull); }
.intg.warn { color: var(--gold); }
.intg.bad { color: var(--neg); }
.thin { font-size: 10px; color: var(--gold); margin-left: 4px; }
