/* ═══════════════════════════════════════════════════════════════════════════
 *  hero.css — "Your Hands" leak-finder dashboard
 *  Layout + dashboard chrome for the HERO sub-tab. The 13×13 range-grid CELL
 *  styles still live in your-hands/hero-grid.js (scoped to #hero-main .re-*).
 *  Everything here leans on the global design tokens from main.css so the tab
 *  matches Study / Pool exactly.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* NOTE: #ranges-hero-pane visibility is owned by the inline style + app.js
   switchRangesSubTab() (it toggles inline display). Don't add a display rule
   here — a CSS `display:none` would win when JS clears the inline style and
   the pane would never show. */

/* The whole tab is a centered "diagnostic console". Capping the width and
   centering it is what stops the dashboard sprawling edge-to-edge on wide
   monitors (the cause of the thin, sparse, stretched look). The clamp lets it
   breathe on laptops and cap on ultrawides — i.e. it scales with the display. */
#hero-root {
  height: 100%;
  min-height: 0;
  display: flex;
  justify-content: center;
  background: radial-gradient(120% 80% at 50% -8%, rgba(var(--accent-blue-rgb), 0.05), transparent 58%);
}

/* Vertical console: a horizontal top bar (brand + section tabs + Go-Live) sits
   directly under the Tree/Study/Hero tabs, then the scrolling content, then a
   slim meta footer. Capped + centered so it scales without sprawling. */
#hero-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: clamp(960px, 94vw, 1440px);
  height: 100%;
  min-height: 0;
  border-left: 1px solid var(--bg-border);
  border-right: 1px solid var(--bg-border);
  background: rgba(0, 0, 0, 0.12);
}

/* ── Top bar (section tabs only) ─────────────────────────────────────────── */
#hero-sidebar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  padding: 7px 20px;
  min-height: 46px;
  border-bottom: 1px solid var(--bg-border);
}
/* The live-tracking feature still mounts its "Go Live" panel into this bar, but
   per design the bar is tabs-only — keep the panel out of view (JS untouched). */
#hero-sidebar #hero-live-panel { display: none; }
.hero-bar-left { display: flex; align-items: center; gap: 11px; padding: 9px 0; flex-shrink: 0; }
.hero-brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hero-brand-title {
  font-family: var(--font-ui); font-size: 14px; font-weight: 800;
  letter-spacing: -0.01em; color: var(--text-bright); line-height: 1.15;
}
.hero-brand-sub { font-size: 11px; color: var(--text-dim); letter-spacing: 0.01em; line-height: 1.2; }

/* Letter grade chip */
.hero-grade-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.hero-grade-chip::after {
  content: ""; position: absolute; inset: 0; opacity: 0.16; background: currentColor;
}
.hero-grade-chip span { position: relative; z-index: 1; }
.hero-grade-chip[data-grade^="A"] { color: var(--accent-green); border-color: rgba(var(--accent-green-rgb), 0.4); }
.hero-grade-chip[data-grade="B"]  { color: var(--accent-blue);  border-color: rgba(var(--accent-blue-rgb), 0.4); }
.hero-grade-chip[data-grade="C"]  { color: var(--accent-yellow); border-color: rgba(234,179,8,0.4); }
.hero-grade-chip[data-grade="D"]  { color: var(--accent-orange); border-color: rgba(249,115,22,0.4); }
.hero-grade-chip[data-grade="F"]  { color: var(--accent-red);   border-color: rgba(var(--accent-red-rgb), 0.4); }

/* Section tabs — glossy pills matching the Tree/Study/HERO main-tabs, centered. */
#hero-section-nav { display: flex; align-items: center; justify-content: center; gap: 4px; flex: 0 1 auto; min-width: 0; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
#hero-section-nav::-webkit-scrollbar { display: none; }
.hero-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: all 0.2s ease;
}
.hero-nav-btn .hero-nav-ic {
  width: 15px; height: 15px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0.55; transition: opacity 0.2s ease, color 0.2s ease;
}
.hero-nav-btn .hero-nav-ic svg { width: 14px; height: 14px; display: block; }
.hero-nav-btn:hover { color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.06); }
.hero-nav-btn:hover .hero-nav-ic { opacity: 1; }
.hero-nav-btn.active {
  color: var(--text-bright);
  background: rgba(var(--accent-blue-rgb), 0.1);
  border-color: rgba(var(--accent-blue-rgb), 0.2);
  box-shadow: 0 0 12px rgba(var(--accent-blue-rgb), 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.hero-nav-btn.active::after {
  content: ""; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 2px; border-radius: 1px; background: var(--accent-blue);
}
.hero-nav-btn.active .hero-nav-ic { opacity: 1; color: var(--accent-blue); }
.hero-nav-count {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(var(--accent-red-rgb), 0.16);
  color: #fca5a5;
}

.hero-rail-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.hero-rail-divider { height: 1px; background: var(--bg-border); margin: 2px 0; }

/* Contextual grid controls (Preflop only) — horizontal toolbar under the tabs */
#hero-grid-controls { display: none; align-items: center; gap: 20px; flex-wrap: wrap; padding: 10px 22px; border-bottom: 1px solid var(--bg-border); }
#hero-grid-controls.show { display: flex; }
/* Relocated into the preflop content, directly above the board: drop the header
   border + side padding so it aligns with the grid card it sits on top of. */
#hero-grid-controls.in-grid { padding: 0 2px 12px; border-bottom: none; margin-top: 2px; }
.hero-toolbar-group { display: flex; align-items: center; gap: 9px; }
#hero-pos-pills, #hero-view-pills { display: flex; gap: 4px; }
#hero-pos-pills .ranges-pill, #hero-view-pills .ranges-pill {
  justify-content: center; padding: 0 10px; height: 28px; font-size: 11px;
}

/* Sub-pill switcher at the top of the merged Breakdowns tab (Position/Stakes/Time) */
.hero-bd-pillbar {
  display: flex; gap: 6px; flex-wrap: wrap;
  max-width: 1240px; margin: 0 auto 20px;
}
.hero-bd-pillbar .ranges-pill {
  justify-content: center; padding: 0 16px; height: 32px; font-size: 12px;
}

/* Results-graph filter bar: All + site (brand chips) + stake */
.hero-gf-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 2px 0 14px; padding-bottom: 2px;
}
.hero-gf-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hero-gf-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 2px 0 6px;
}
.hero-gf-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--bg-border); background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary); font: inherit; font-size: 12px; font-weight: 600;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.hero-gf-chip:hover { color: var(--text-primary); border-color: var(--text-dim); }
.hero-gf-chip.active { color: var(--text-primary); }
.hero-gf-all.active {
  border-color: rgba(var(--accent-blue-rgb), 0.6);
  background: rgba(var(--accent-blue-rgb), 0.12);
}
/* Site chips carry their brand tint (--gf) when active */
.hero-gf-site .hero-gf-glyph { color: var(--gf); font-size: 13px; line-height: 1; }
.hero-gf-site.active {
  border-color: var(--gf);
  background: color-mix(in srgb, var(--gf) 16%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gf) 35%, transparent), 0 0 14px -4px var(--gf);
}
.hero-gf-stake.active {
  border-color: rgba(var(--accent-blue-rgb), 0.6);
  background: rgba(var(--accent-blue-rgb), 0.12);
}

/* Preflop scenario selector (vs GTO view): Open / vs Raise / vs 3-bet / vs 4-bet */
.hero-gto-scenarios {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 14px;
}
.hero-gto-scenarios[hidden] { display: none; }
.hero-gto-scenarios .ranges-pill {
  justify-content: center; padding: 0 13px; height: 30px; font-size: 12px;
}

/* Live tracking control (rail) */
.hero-live { display: flex; flex-direction: column; gap: 7px; }
.hero-live-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(var(--accent-green-rgb), 0.35);
  background: rgba(var(--accent-green-rgb), 0.08);
  color: var(--accent-green); font: inherit; font-size: 12px; font-weight: 700;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.hero-live-btn:hover:not(:disabled) { background: rgba(var(--accent-green-rgb), 0.16); }
.hero-live-btn:disabled { opacity: 0.5; cursor: not-allowed; color: var(--text-dim); border-color: var(--bg-border); background: transparent; }
.hero-live-btn.live { color: var(--accent-red); border-color: rgba(var(--accent-red-rgb), 0.4); background: rgba(var(--accent-red-rgb), 0.1); }
.hero-live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.hero-live-btn.live .hero-live-dot { animation: heroLivePulse 1.3s ease-in-out infinite; }
@keyframes heroLivePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero-live-status { font-size: 10px; color: var(--text-dim); line-height: 1.5; }
.hero-live-status.on { color: var(--text-muted); }
.hero-live-status b { color: var(--accent-green); font-weight: 700; }
/* In the top bar the live control collapses to just its button — the rail label
   and multi-line status would make the bar too tall. */
#hero-sidebar #hero-live-panel { flex-direction: row; align-items: center; gap: 8px; flex-shrink: 0; }
#hero-sidebar #hero-live-panel .hero-rail-label,
#hero-sidebar #hero-live-panel .hero-live-status { display: none; }

/* DB meta strip — slim provenance header above the dashboard / results graph */
#hero-meta-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px;
  font-size: 11px; color: var(--text-muted);
  padding: 9px 22px; border-bottom: 1px solid var(--bg-border);
  background: rgba(0, 0, 0, 0.12);
}
#hero-meta-footer .meta-item { display: inline-flex; gap: 6px; white-space: nowrap; }
#hero-meta-footer .meta-key { color: var(--text-dim); }
#hero-meta-footer .meta-val { color: var(--text-body); font-weight: 600; }

/* ── Main dashboard host ─────────────────────────────────────────────────── */
#hero-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 22px 32px;
  color: var(--text-primary);
}

/* Cap the reading column so cards, bars and the chart never stretch into thin
   ribbons on big screens — the dashboard stays a tidy centered block. */
.hd-section { animation: tabFadeIn 0.25s ease; max-width: 1240px; margin: 0 auto; }
.hd-head { margin-bottom: 18px; }
.hd-h1 {
  font-family: var(--font-ui);
  font-size: clamp(18px, 1.3vw, 22px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  position: relative;
  padding-left: 13px;
}
.hd-h1::before {
  content: ""; position: absolute; left: 0; top: 0.16em; bottom: 0.16em;
  width: 3px; border-radius: 2px; background: var(--accent-blue);
}
.hd-sub { font-size: 12px; color: var(--text-muted); margin-top: 5px; line-height: 1.55; max-width: 640px; }

.hd-block { margin-bottom: 22px; }
.hd-block-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.hd-block-title .hd-count { color: var(--text-dim); font-weight: 600; }

/* (Diagnosis verdict banner + KPI strip removed in the fintech redesign —
   replaced by the .fin-bal balance block and .fin-mets metric cards. See the
   "Fintech / crypto skin" section below.) */
.pos { color: var(--accent-green) !important; }
.neg { color: var(--accent-red) !important; }

/* ── Bankroll graph ──────────────────────────────────────────────────────── */
.hd-graph-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px 18px 10px;
}
.hd-graph-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hd-graph-title { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.hd-graph-val { font-family: var(--font); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hd-graph-svg { width: 100%; height: 168px; display: block; overflow: visible; }
.hd-graph-zero { stroke: var(--text-dim); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.5; }
.hd-graph-grid { stroke: var(--bg-border); stroke-width: 1; opacity: 0.45; }

/* ── Results graph (net / showdown / non-showdown) ───────────────────────── */
/* Stack: title row, then the chart, then the legend/stats below it. */
#hero-results-card { display: flex; flex-direction: column; }
#hero-results-card .hd-graph-head { order: 0; }
#hero-results-card .hero-graph-wrap { order: 1; }
#hero-results-card .hero-graph-controls { order: 2; }
.hero-graph-controls {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin: 14px 0 2px;
}
/* Keep all series chips on ONE line — the wider section gives them room; if a
   very narrow viewport can't fit them they scroll horizontally rather than wrap. */
.hero-graph-legend {
  display: flex; flex-wrap: nowrap; gap: 5px; flex: 1 1 0; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.hero-graph-legend::-webkit-scrollbar { display: none; }
.hero-graph-legend-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; white-space: nowrap;
  padding: 4px 8px; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-muted); font: inherit; font-size: 11px;
  transition: background 0.12s ease, opacity 0.12s ease, border-color 0.12s ease;
}
.hero-graph-legend-btn:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--text-dim); }
.hero-graph-legend-btn.off { opacity: 0.4; }
.hero-graph-swatch {
  width: 11px; height: 3px; border-radius: 2px; flex: none;
  background: var(--sc); box-shadow: 0 0 6px color-mix(in srgb, var(--sc) 60%, transparent);
}
.hero-graph-legend-btn.off .hero-graph-swatch { box-shadow: none; }
.hero-graph-leg-label { color: var(--text-bright); font-weight: 600; }
.hero-graph-leg-val { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Master show-all / hide-all toggle — pinned left of the scrolling legend. */
.hero-graph-allbtn {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; white-space: nowrap;
  padding: 4px 9px; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-bright); font: inherit; font-size: 11px; font-weight: 600;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.hero-graph-allbtn:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--text-dim); }
.hero-graph-allbox {
  width: 13px; height: 13px; border-radius: 3px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--text-dim);
  font-size: 9px; font-weight: 800; line-height: 1; color: var(--bg-deep);
}
.hero-graph-allbtn.on .hero-graph-allbox {
  background: var(--accent-blue); border-color: var(--accent-blue);
}

/* bb/$ toggle floats in the chart's top-left corner (over the empty low-left
   region of a cumulative curve), with a translucent backdrop so it stays legible. */
.hero-graph-units {
  position: absolute; top: 7px; left: 44px; z-index: 4;
  display: inline-flex; border: 1px solid var(--glass-border); border-radius: 8px; overflow: hidden;
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.hero-graph-unit-btn {
  padding: 3px 10px; cursor: pointer; background: transparent; border: 0;
  color: var(--text-muted); font: inherit; font-size: 11px; font-weight: 700;
}
.hero-graph-unit-btn:hover { color: var(--text-bright); }
.hero-graph-unit-btn.active { background: rgba(var(--accent-blue-rgb), 0.16); color: var(--accent-blue); }

.hero-graph-wrap { position: relative; width: 100%; height: 430px; }
.hero-graph-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hero-graph-line { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); }
.hero-graph-line-net { filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5)); }
/* Gridlines were previously unstyled (SVG default = no stroke); make them a faint
   readable grid and give zero a clear, bright baseline so deviation is obvious. */
.hero-graph-grid { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; }
.hero-graph-zero { stroke: rgba(255, 255, 255, 0.45); stroke-width: 1.5; }
/* Win / loss zones split at the zero line. */
.hero-graph-band-pos { fill: rgba(var(--accent-green-rgb), 0.045); }
.hero-graph-band-neg { fill: rgba(var(--accent-red-rgb), 0.05); }
.hero-graph-overlay { position: absolute; inset: 0; pointer-events: none; }
.hero-graph-ylab {
  position: absolute; left: 0; transform: translateY(-50%);
  font-size: 10.5px; font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap;
}
/* Secondary (right) axis labels for the rate line (bb/100). */
.hero-graph-ylab-r { left: auto; right: 0; text-align: right; color: #22d3ee; opacity: 0.85; }
.hero-graph-xlab {
  position: absolute; bottom: 0; transform: translateX(-50%);
  font-size: 10.5px; font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap;
}
.hero-graph-cross {
  position: absolute; top: 8px; bottom: 22px; width: 1px;
  background: var(--text-muted); opacity: 0.55; pointer-events: none;
}
.hero-graph-end, .hero-graph-dot {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--sc); transform: translate(-50%, -50%); pointer-events: none;
  box-shadow: 0 0 0 2px var(--bg-base, #0d0f14);
}
.hero-graph-end { opacity: 0.9; }
.hero-graph-dot { box-shadow: 0 0 0 2px var(--bg-base, #0d0f14), 0 0 8px color-mix(in srgb, var(--sc) 70%, transparent); }
.hero-graph-tip {
  position: absolute; top: 6px; z-index: 4; pointer-events: none;
  min-width: 132px; padding: 8px 10px; border-radius: 9px;
  background: rgba(12, 14, 20, 0.92);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.hero-graph-tiphead {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 5px;
}
.hero-graph-tiprow { display: flex; align-items: center; gap: 7px; font-size: 12px; line-height: 1.5; }
.hero-graph-tiplab { color: var(--text-bright); flex: 1; }
.hero-graph-tipval { font-variant-numeric: tabular-nums; font-weight: 700; }
.hero-graph-tip .hero-graph-swatch { width: 9px; height: 9px; border-radius: 50%; }

/* (Leak/strength cards + the comparison bar were removed in the fintech
   redesign — replaced by the .fin-tbl holdings-style leak table below.) */

/* ── Streets (fintech panels) ────────────────────────────────────────────── */
.fin-stcard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.fin-stcard { background: var(--bg-card); border: 1px solid var(--bg-border); border-radius: 12px; padding: 16px 17px; }
.fin-stcard-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fin-stcard-name { font-family: var(--font-ui); font-size: 15px; font-weight: 700; color: var(--text-bright); letter-spacing: -0.01em; }
.fin-stcard-net { font-family: var(--font); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fin-stcard-net .u { font-size: 11px; }
.fin-stcard-sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.fin-stcard-stats { margin-top: 16px; display: flex; flex-direction: column; gap: 13px; }
.fin-stat-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.fin-stat-label { font-size: 11.5px; color: var(--text-muted); }
.fin-stat-val { font-family: var(--font); font-size: 12.5px; font-weight: 700; color: var(--text-bright); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 7px; }
.fin-stat-delta { font-size: 10.5px; font-weight: 600; color: var(--text-dim); letter-spacing: 0; }
.fin-stat-bar { position: relative; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.05); overflow: visible; }
.fin-stat-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, rgba(var(--accent-blue-rgb), 0.45), var(--accent-blue)); }
.fin-stat-base { position: absolute; top: -2px; bottom: -2px; width: 1.5px; background: var(--text-bright); border-radius: 1px; }
.fin-stat-base::after { content: ""; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 3px solid var(--text-bright); }

/* ── Positions (holdings table + diverging break-even bars) ──────────────── */
.fin-postbl thead th.fin-num-h { text-align: right; }
.fin-postbl td.fin-num { text-align: right; font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.fin-postbl td.fin-num .u { font-size: 10px; font-weight: 600; }
.fin-postbl td.fin-num.fin-dim { color: var(--text-dim); font-weight: 600; }
.fin-seat { font-family: var(--font); font-weight: 700; font-size: 13px; color: var(--text-bright); white-space: nowrap; }
.fin-seat-tag { display: inline-block; margin-left: 8px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-blue); background: rgba(var(--accent-blue-rgb), 0.12); border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.fin-seat-tag.blind { color: var(--text-dim); background: rgba(255, 255, 255, 0.05); }
.fin-divcell { width: 32%; }
.fin-div { position: relative; height: 20px; min-width: 96px; }
.fin-div-axis { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--bg-border); }
.fin-div i { position: absolute; height: 11px; top: 50%; transform: translateY(-50%); border-radius: 3px; opacity: 0.9; }

/* ── Biggest pots (fintech rows) ─────────────────────────────────────────── */
.fin-pots { display: flex; flex-direction: column; gap: 8px; }
.fin-pot {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--bg-border);
  border-left: 3px solid var(--text-dim); border-radius: 10px; padding: 12px 16px;
}
.fin-pot[data-won="true"]  { border-left-color: var(--accent-green); }
.fin-pot[data-won="false"] { border-left-color: var(--accent-red); }
.fin-pot-cards { display: flex; align-items: center; gap: 12px; }
.fin-pot-hole, .fin-pot-board { display: flex; gap: 3px; align-items: center; }
.fin-pot-arrow { color: var(--text-dim); font-size: 11px; }
.fin-pot-info { min-width: 0; }
.fin-pot-summary { font-size: 12.5px; color: var(--text-body); line-height: 1.45; }
.fin-pot-meta { font-size: 10.5px; color: var(--text-dim); margin-top: 3px; font-family: var(--font); }
.fin-pot-meta b { color: var(--text-muted); }
.fin-pot-result { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; font-family: var(--font); font-variant-numeric: tabular-nums; }
.fin-pot-result > span:first-child { font-size: 14px; font-weight: 700; }
.fin-pot-usd { font-size: 10px; font-weight: 600; color: var(--text-dim); }

/* mini playing card */
.hd-card {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 21px; height: 27px; padding: 0 3px;
  border-radius: 4px; font-family: var(--font); font-size: 12px; font-weight: 700;
  background: #f8fafc; color: #0f172a; line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.hd-card[data-suit="h"], .hd-card[data-suit="d"] { color: #dc2626; }
.hd-card[data-suit="s"], .hd-card[data-suit="c"] { color: #0f172a; }
.hd-card .hd-suit { font-size: 11px; }

/* ── Preflop section ─────────────────────────────────────────────────────── */
#hero-preflop-host { display: flex; flex-direction: column; gap: 14px; }
#hero-grid-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  overflow: auto;
}
#hero-grid-wrap { min-width: min-content; }
#hero-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font);
}

/* ── Empty-state extras ──────────────────────────────────────────────────── */
.hero-demo-link {
  background: transparent !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
}
.hero-demo-link:hover { color: var(--text-primary) !important; border-color: rgba(255,255,255,0.18) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
 *  Fintech / crypto skin — flat hairline surfaces, blue-black, ticker deltas,
 *  holdings-style leak tables. Built on the app's design tokens so it stays
 *  theme-aware. The Overview + Leak Finder render with `.fin-*` markup; the
 *  scoped overrides below flatten the older glass surfaces (streets / positions
 *  / pots / preflop / results-graph card) without rewriting their base rules.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* Kill glassmorphism on the shared cards — fintech surfaces are flat + hairline. */
#hero-main .hd-graph-card,
#hero-main #hero-grid-card {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: var(--bg-card);
  border-color: var(--bg-border);
  box-shadow: none;
}

/* shared inline helpers used by fintech markup */
.fin .u { color: var(--text-dim); font-weight: 600; letter-spacing: 0; }
.fin .muted { color: var(--text-muted); }
.fin .faint { color: var(--text-dim); }
.fin .brandtext { color: var(--accent-blue); }
.fin .up { color: var(--accent-green); }
.fin .down { color: var(--accent-red); }

/* ── Balance block (portfolio-style header) ── */
.fin-bal { margin-bottom: 16px; }
.fin-bal-k { font-size: 10.5px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; margin-bottom: 6px; }
.fin-bal-v {
  font-family: var(--font); font-weight: 700; font-size: clamp(25px, 2.3vw, 33px);
  line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 8px; color: var(--text-bright);
}
.fin-bal-v .u { font-size: 13px; }
.fin-bal-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.fin-delta {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 3px 9px; border-radius: 7px;
}
.fin-delta.up { color: var(--accent-green); background: rgba(var(--accent-green-rgb), 0.14); }
.fin-delta.down { color: var(--accent-red); background: rgba(var(--accent-red-rgb), 0.14); }
.fin-bal-meta { font-family: var(--font); font-size: 12.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.fin-status {
  margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--bg-border);
  font-size: 12.5px; color: var(--text-muted); line-height: 1.5; max-width: 70ch;
}
.fin-status b { color: var(--accent-blue); font-weight: 700; }

/* ── Metric cards ── */
.fin-mets { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 30px; }
.fin-met { background: var(--bg-card); border: 1px solid var(--bg-border); border-radius: 12px; padding: 15px 16px; }
.fin-met.brand {
  border-color: rgba(var(--accent-blue-rgb), 0.3);
  background: linear-gradient(180deg, rgba(var(--accent-blue-rgb), 0.06), transparent 65%), var(--bg-card);
}
.fin-met-k { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-bottom: 11px; }
.fin-met-v {
  font-family: var(--font); font-weight: 700; font-size: clamp(19px, 1.5vw, 23px);
  line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 4px; color: var(--text-bright);
}
.fin-met-v .u { font-size: 12px; }
.fin-met-d { font-family: var(--font); font-size: 11.5px; font-weight: 500; margin-top: 9px; }

/* ── In-pane section header ── */
.fin-sec { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.fin-sec h3 { font-family: var(--font-ui); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; margin: 0; display: flex; align-items: center; gap: 9px; }
.fin-sec h3::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--accent-blue); }
.fin-sec-meta { font-family: var(--font); font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.fin-sec-meta b { color: var(--accent-red); font-weight: 700; }

/* ── Leak table (holdings-style) ── */
.fin-tbl-wrap { overflow-x: auto; }
.fin-tbl { width: 100%; min-width: 560px; border-collapse: collapse; }
.fin-tbl thead th {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-dim); font-weight: 700; text-align: left;
  padding: 0 14px 11px; border-bottom: 1px solid var(--bg-border);
}
.fin-tbl thead th.fin-rank-h { width: 34px; }
.fin-tbl thead th.fin-cost-h { text-align: right; }
.fin-tbl tbody td { padding: 13px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
.fin-tbl tbody tr { transition: background 0.12s ease; }
.fin-tbl tbody tr:hover { background: rgba(var(--accent-blue-rgb), 0.05); }
.fin-rank { font-family: var(--font); font-size: 13px; color: var(--accent-blue); opacity: 0.85; font-variant-numeric: tabular-nums; }
.fin-lk { min-width: 200px; }
.fin-lk-name { font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: var(--text-bright); }
.fin-lk-fix { color: var(--text-muted); font-size: 12px; margin-top: 3px; line-height: 1.5; }
.fin-drill-btn {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-ui); font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent-blue); background: rgba(var(--accent-blue-rgb), 0.08);
  border: 1px solid rgba(var(--accent-blue-rgb), 0.22); border-radius: 6px;
  padding: 4px 10px; cursor: pointer; transition: all 0.16s ease;
}
.fin-drill-btn:hover {
  background: rgba(var(--accent-blue-rgb), 0.16); border-color: rgba(var(--accent-blue-rgb), 0.42);
  color: var(--text-bright); box-shadow: 0 0 12px rgba(var(--accent-blue-rgb), 0.12);
}
.fin-drill-btn span { transition: transform 0.16s ease; }
.fin-drill-btn:hover span { transform: translateX(2px); }
.fin-drill-btn:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }
.fin-street { font-family: var(--font); font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.fin-cmp { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.fin-cmp-bar { position: relative; flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.05); overflow: hidden; min-width: 56px; }
.fin-cmp-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.fin-cmp-bar i.over { background: var(--accent-red); opacity: 0.7; }
.fin-cmp-bar i.under { background: var(--accent-blue); opacity: 0.6; }
.fin-cmp-base { position: absolute; top: -2px; bottom: -2px; width: 1.5px; background: var(--text-bright); }
.fin-cmp-num { font-family: var(--font); font-size: 11.5px; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin-cmp-num b { color: var(--text-bright); font-weight: 700; }
.fin-cost-cell { text-align: right; }
.fin-cost { font-family: var(--font); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-cost .u { font-size: 10px; font-weight: 600; }
.fin-cost.down { color: var(--accent-red); }
.fin-cost.up { color: var(--accent-green); }

.fin-viewall {
  margin-top: 14px; font-family: var(--font-ui); font-size: 12.5px; font-weight: 600;
  color: var(--text-body); background: rgba(255, 255, 255, 0.02); border: 1px solid var(--bg-border);
  border-radius: 8px; padding: 8px 14px; cursor: pointer; transition: all var(--transition-normal);
}
.fin-viewall:hover { color: var(--text-bright); border-color: rgba(var(--accent-blue-rgb), 0.35); background: rgba(var(--accent-blue-rgb), 0.06); }
/* Every interactive control in the tab gets the same visible keyboard focus. */
.fin-viewall:focus-visible,
.hero-graph-legend-btn:focus-visible,
.hero-graph-unit-btn:focus-visible,
.hero-graph-allbtn:focus-visible,
.hero-nav-btn:focus-visible,
.hero-gf-chip:focus-visible,
.hero-live-btn:focus-visible,
.hero-bd-pillbar .ranges-pill:focus-visible,
.hero-gto-scenarios .ranges-pill:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }
.fin-note { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-top: 14px; }
.fin-note b { color: var(--accent-blue); }
.fin-empty { background: var(--bg-card); border: 1px solid var(--bg-border); border-radius: 12px; padding: 18px 20px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ── Game-selection / seat money leaks (losing stake / table / seat) ───────── */
.fin-game-list { display: flex; flex-direction: column; gap: 10px; }
.fin-game-leak {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--bg-border);
  border-left: 3px solid var(--accent-red); border-radius: 12px;
  padding: 14px 18px;
}
.fin-game-leak[data-sev="moderate"] { border-left-color: var(--accent-yellow); }
.fin-game-leak[data-sev="minor"] { border-left-color: var(--text-dim); }
.fin-game-main { flex: 1 1 280px; min-width: 0; }
.fin-game-title { font-family: var(--font-ui); font-weight: 700; font-size: 14px; color: var(--text-bright); margin-bottom: 3px; }
.fin-game-fix { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }
.fin-game-side { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: 0 0 auto; }
.fin-game-wr { font-family: var(--font); font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.fin-game-wr .u { font-size: 10px; font-weight: 600; color: var(--text-dim); }
.fin-game-hands { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.fin-game-side .fin-viewall { margin-top: 7px; padding: 5px 11px; }
.fin-inline-jump {
  font: inherit; color: var(--accent-blue); background: none; border: none;
  padding: 0; cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 2px;
}
.fin-inline-jump:hover { color: var(--text-bright); }
.fin-inline-jump:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }

/* You-vs-the-field lean tags (in the Leak Finder comparison table). */
.fin-field-tag { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.fin-field-tag.field { color: var(--accent-red); background: color-mix(in srgb, var(--accent-red) 13%, transparent); }
.fin-field-tag.solver { color: var(--accent-green); background: color-mix(in srgb, var(--accent-green) 13%, transparent); }

/* ── Detailed Statistics — meter rows + matrix tables ────────────────────────
   Preflop/Postflop stats render as horizontal METERS: a track with your value
   as a colored fill, a white tick at the healthy target, a faint diamond at the
   field. Fill color = your lean (green closer to solver / red leans to the
   field). By-street & by-position stay as tight .hero-stat-tbl tables. */
.hero-meter-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 6px 2px; font-size: 11px; color: var(--text-muted); }
.hero-meter-legend .lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hero-meter-legend .lg::before { content: ""; width: 18px; height: 6px; border-radius: 3px; flex: none; }
.hero-meter-legend .lg.good::before { background: var(--accent-green); opacity: 0.6; }
.hero-meter-legend .lg.warn::before { background: var(--accent-red); opacity: 0.6; }
.hero-meter-legend .lg.tick::before { width: 2px; height: 13px; border-radius: 1px; background: var(--text-bright); }
.hero-meter-legend .lg.field::before { width: 9px; height: 9px; border-radius: 0; background: transparent; border: 1.5px solid var(--text-dim); transform: rotate(45deg); }

.hero-meters { margin-top: 8px; }
.hero-meter {
  display: grid; grid-template-columns: 178px 1fr 54px 78px; align-items: center;
  gap: 16px; padding: 9px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.hero-meter:last-child { border-bottom: none; }
.hero-meter-label { font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-meter-label .faint { font-weight: 500; font-size: 11px; color: var(--text-dim); }
.hero-meter-track { position: relative; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); }
.hero-meter-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; min-width: 3px; background: var(--accent-blue); opacity: 0.5; transition: width 0.4s ease; }
.hero-meter-fill.good { background: var(--accent-green); opacity: 0.62; }
.hero-meter-fill.warn { background: var(--accent-red); opacity: 0.62; }
.hero-meter-fill.neutral { background: var(--accent-blue); opacity: 0.5; }
.hero-meter-base { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--text-bright); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.hero-meter-field { position: absolute; top: 50%; width: 7px; height: 7px; transform: translate(-50%, -50%) rotate(45deg); background: var(--bg-card); border: 1.5px solid var(--text-dim); }
.hero-meter-num { text-align: right; font-family: var(--font); font-variant-numeric: tabular-nums; font-weight: 800; font-size: 13.5px; color: var(--text-bright); }
.hero-meter-d { text-align: right; font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 11.5px; font-weight: 700; color: var(--text-dim); white-space: nowrap; }
.hero-meter-d.good { color: var(--accent-green); }
.hero-meter-d.warn { color: var(--accent-red); }
.hero-meter-d.na { color: var(--text-dim); opacity: 0.55; font-weight: 500; font-style: italic; }

.hero-stat-tbl { min-width: 480px; }
.hero-stat-tbl thead th.fin-num-h { text-align: right; }
.hero-stat-tbl tbody td { padding: 10px 14px; }
.hero-stat-tbl td.fin-seat { font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--text-bright); white-space: nowrap; }
.hero-stat-tbl td.fin-seat .faint { font-weight: 500; font-size: 11px; }
.hero-stat-tbl td.fin-num { text-align: right; font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.hero-stat-tbl td.fin-num.fin-dim { color: var(--text-dim); font-weight: 600; }
.hero-stat-tbl td.fin-num b { font-weight: 800; color: var(--text-bright); }
.hero-stat-tbl td.fin-num.pos b, .hero-stat-tbl td.fin-num.pos { color: var(--accent-green); }
.hero-stat-tbl td.fin-num.neg b, .hero-stat-tbl td.fin-num.neg { color: var(--accent-red); }
.hero-stat-d { color: var(--text-dim); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  #hero-layout { max-width: 100%; border-left: none; border-right: none; }
  #hero-sidebar { padding: 0 14px; gap: 4px 12px; }
  #hero-section-nav { flex-wrap: nowrap; overflow-x: auto; }
  #hero-grid-controls, #hero-meta-footer { padding-left: 14px; padding-right: 14px; }
  #hero-main { padding: 16px; }
  .fin-mets { grid-template-columns: repeat(2, 1fr); }
}

/* True small-mobile: stack metrics, drop the table's lower-value columns (Street,
   the you-vs-healthy bar) so essential rank/leak/cost fit without a horizontal
   scroll island, and tighten the nav. */
@media (max-width: 520px) {
  .fin-mets { grid-template-columns: 1fr; }
  .fin-tbl { min-width: 0; }
  .fin-tbl thead th:nth-child(3), .fin-tbl tbody td:nth-child(3),
  .fin-tbl thead th:nth-child(4), .fin-tbl tbody td:nth-child(4) { display: none; }
  .hero-meter { grid-template-columns: 104px 1fr 42px 56px; gap: 9px; }
  .hero-meter-legend { gap: 10px 14px; }
  .fin-bal-v { font-size: clamp(23px, 7.5vw, 31px); }
  .hero-nav-btn { height: 34px; padding: 0 11px; font-size: 11px; }
}
