@import url("/panels/tokens.css?v=12");

/* TV dark screener/watchlist change colors (override tokens if cached) */
:root {
  --pl-up: #22ab94;
  --pl-up-deep: #089981;
  --pl-down: #f7525f;
  --pl-down-deep: #f23645;
}

/* —— Dock host (flex sibling, left of right rail) —— */
#plDockHost {
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  height: 100%;
  z-index: 25;
  overflow: hidden;
  background: var(--pl-bg);
  border-inline-start: 0 solid var(--pl-border);
  transition: flex-basis 0.18s ease, width 0.18s ease, min-width 0.18s ease;
  font-family: var(--pl-font);
  color: var(--pl-text);
  order: 2;
}

#plRightRail {
  order: 3;
}

#chart {
  order: 1;
}

#plDockHost.is-open {
  flex: 0 0 var(--pl-dock-w);
  width: var(--pl-dock-w);
  min-width: var(--pl-dock-w);
  border-inline-start-width: 1px;
}

#plDockHost .pl-dock-panel {
  display: none;
  flex-direction: column;
  height: 100%;
  width: var(--pl-dock-w);
}

#plDockHost .pl-dock-panel.is-active {
  display: flex;
}

.pl-dock-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 12px;
  border-bottom: 1px solid var(--pl-border);
  background: var(--pl-bg);
}

.pl-dock-header h2 {
  margin: 0;
  flex: 1;
  font: 600 var(--pl-fs) / 1.2 var(--pl-font);
  color: var(--pl-text);
}

.pl-dock-icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--pl-text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.pl-dock-icon-btn:hover {
  color: var(--pl-text);
  background: var(--pl-bg-active);
}

.pl-dock-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--pl-border);
  overflow-x: auto;
}

.pl-dock-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--pl-text-muted);
  font: 500 var(--pl-fs-sm) / 1 var(--pl-font);
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.pl-dock-tab.is-active {
  color: var(--pl-text);
  background: var(--pl-bg-active);
}

.pl-dock-cols {
  display: grid;
  grid-template-columns: 1fr 64px 64px;
  gap: 4px;
  padding: 4px 12px;
  border-bottom: 1px solid var(--pl-border);
  color: var(--pl-text-muted);
  font: 500 var(--pl-fs-xs) / 1 var(--pl-font);
  text-transform: none;
}

.pl-dock-cols span:nth-child(2),
.pl-dock-cols span:nth-child(3) {
  text-align: end;
}

.pl-dock-list {
  flex: 1;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #363a45 transparent;
}

.pl-dock-list::-webkit-scrollbar {
  width: 8px;
}

.pl-dock-list::-webkit-scrollbar-thumb {
  background: #363a45;
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.pl-wl-row {
  display: grid;
  grid-template-columns: 1fr 64px 64px;
  gap: 4px;
  align-items: center;
  height: var(--pl-row-h);
  padding: 0 12px;
  border-bottom: 1px solid var(--pl-border-soft);
  cursor: pointer;
}

.pl-wl-row:hover {
  background: var(--pl-bg-row-hover);
}

.pl-wl-sym {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pl-logo-stack {
  position: relative;
  width: var(--pl-logo);
  height: var(--pl-logo);
  flex: 0 0 var(--pl-logo);
}

.pl-logo-stack img,
.pl-logo-stack .pl-logo-fallback {
  width: var(--pl-logo);
  height: var(--pl-logo);
  border-radius: 50%;
  display: block;
  background: #1a1a1a;
  object-fit: cover;
}

.pl-logo-stack img.pl-logo-sec {
  position: absolute;
  inset-inline-end: -4px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border: 1px solid #000;
}

.pl-logo-fallback {
  display: grid;
  place-items: center;
  font: 700 9px/1 var(--pl-font);
  color: #fff;
  background: #333;
}

.pl-wl-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pl-wl-ticker {
  font: 600 var(--pl-fs) / 1.15 var(--pl-font);
  color: var(--pl-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-wl-desc {
  font: 400 var(--pl-fs-xs) / 1.15 var(--pl-font);
  color: var(--pl-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-wl-last,
.pl-wl-chg {
  font: 400 var(--pl-fs) / 1 var(--pl-font);
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.pl-wl-chg.is-up { color: var(--pl-up, #22ab94); }
.pl-wl-chg.is-down { color: var(--pl-down, #f7525f); }

/* —— Screener overlay —— */
#plScreenerOverlay {
  position: absolute;
  inset: 0;
  inset-inline-end: var(--pl-rail-w);
  z-index: 30;
  display: none;
  flex-direction: column;
  background: var(--pl-bg);
  font-family: var(--pl-font);
  color: var(--pl-text);
  border-inline-end: 1px solid var(--pl-border);
}

#plScreenerOverlay.is-open {
  display: flex;
}

.pl-scr-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 8px;
}

.pl-scr-topbar .pl-scr-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pl-scr-topbar .pl-scr-eyebrow {
  font: 400 var(--pl-fs-xs) / 1 var(--pl-font);
  color: var(--pl-text-muted);
}

.pl-scr-topbar h1 {
  margin: 0;
  font: 700 22px/1.15 var(--pl-font);
  color: var(--pl-text);
}

.pl-scr-topbar .pl-scr-actions {
  margin-inline-start: auto;
  display: flex;
  gap: 4px;
}

.pl-scr-presets {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  padding: 4px 16px 10px;
  overflow-x: auto;
}

.pl-pill {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--pl-text);
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  font: 400 var(--pl-fs-sm) / 1 var(--pl-font);
  cursor: pointer;
  white-space: nowrap;
}

.pl-pill:hover {
  background: var(--pl-bg-active);
}

.pl-pill.is-active {
  background: var(--pl-pill-active-bg);
  color: var(--pl-pill-active-fg);
}

.pl-scr-filters {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px;
  position: relative;
}

.pl-filter-chip {
  appearance: none;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--pl-border);
  background: transparent;
  color: var(--pl-text-secondary);
  font: 400 var(--pl-fs-sm) / 1 var(--pl-font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pl-filter-chip:hover,
.pl-filter-chip.is-open {
  color: var(--pl-text);
  border-color: #3d3d3d;
}

.pl-filter-chip.is-active {
  color: var(--pl-text);
  border-color: #5b5b5b;
  background: #1a1a1a;
}

.pl-filter-chip svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.pl-filter-clear {
  appearance: none;
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--pl-text-muted);
  font: 400 var(--pl-fs-sm) / 1 var(--pl-font);
  cursor: pointer;
}

.pl-filter-clear:hover {
  color: var(--pl-text);
}

.pl-filter-pop {
  position: absolute;
  z-index: 40;
  min-width: 180px;
  max-width: 260px;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--pl-border);
  border-radius: 8px;
  background: #131313;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pl-filter-pop-title {
  font: 600 var(--pl-fs-sm) / 1.2 var(--pl-font);
  color: var(--pl-text);
  padding: 2px 4px 8px;
}

.pl-filter-opt {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--pl-text-secondary);
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font: 400 var(--pl-fs-sm) / 1 var(--pl-font);
  cursor: pointer;
}

.pl-filter-opt:hover,
.pl-filter-opt.is-selected {
  background: #222;
  color: var(--pl-text);
}

.pl-filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: var(--pl-text-secondary);
  font: 400 var(--pl-fs-sm) / 1 var(--pl-font);
  cursor: pointer;
}

.pl-filter-check:hover {
  color: var(--pl-text);
}

.pl-filter-ops {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.pl-filter-input {
  width: 100%;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--pl-border);
  background: #0d0d0d;
  color: var(--pl-text);
  padding: 0 10px;
  font: 400 var(--pl-fs-sm) / 1 var(--pl-font);
  box-sizing: border-box;
}

.pl-filter-input:focus {
  outline: none;
  border-color: #5b5b5b;
}

.pl-filter-pop-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.pl-filter-apply {
  appearance: none;
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: #2962ff;
  color: #fff;
  font: 600 var(--pl-fs-sm) / 1 var(--pl-font);
  cursor: pointer;
}

.pl-filter-apply:hover {
  filter: brightness(1.08);
}

.pl-scr-views {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 16px;
  border-bottom: 1px solid var(--pl-border);
  overflow-x: auto;
}

.pl-view-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--pl-text-muted);
  height: 36px;
  padding: 0 12px;
  font: 500 var(--pl-fs-sm) / 1 var(--pl-font);
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  white-space: nowrap;
}

.pl-view-tab.is-active {
  color: var(--pl-text);
  background: var(--pl-bg-active);
}

.pl-scr-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  /* TV-like thin scrollbars */
  scrollbar-width: thin;
  scrollbar-color: #363a45 transparent;
}

.pl-scr-table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.pl-scr-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.pl-scr-table-wrap::-webkit-scrollbar-thumb {
  background: #363a45;
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.pl-scr-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #50535e;
  background-clip: padding-box;
  border: 2px solid transparent;
}

.pl-scr-table-wrap::-webkit-scrollbar-corner {
  background: transparent;
}

.pl-scr-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.pl-scr-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 40px;
  padding: 0 12px;
  min-width: 88px;
  background: var(--pl-bg);
  border-bottom: 1px solid var(--pl-border);
  color: var(--pl-text-muted);
  font: 600 var(--pl-fs-xs) / 1 var(--pl-font);
  text-align: end;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}

/* Corner: sticky top + left (Symbol header) */
.pl-scr-table thead th.pl-col-sym {
  left: 0;
  z-index: 5;
  text-align: start;
  padding-inline-start: 20px;
  width: 260px;
  min-width: 220px;
  max-width: 280px;
  box-shadow: 4px 0 8px -4px rgba(0, 0, 0, 0.55);
}

.pl-scr-table tbody td {
  height: var(--pl-row-h);
  padding: 0 12px;
  min-width: 88px;
  border-bottom: 1px solid var(--pl-border-soft);
  font: 400 var(--pl-fs) / 1 var(--pl-font);
  text-align: end;
  font-variant-numeric: tabular-nums;
  color: var(--pl-text);
  white-space: nowrap;
  background: var(--pl-bg);
}

.pl-scr-table tbody tr:hover td {
  background: var(--pl-bg-row-hover);
}

/* Frozen Symbol column while scrolling horizontally */
.pl-scr-table tbody td.pl-col-sym {
  text-align: start;
  padding-inline-start: 20px;
  position: sticky;
  left: 0;
  z-index: 2;
  width: 260px;
  min-width: 220px;
  max-width: 280px;
  background: var(--pl-bg);
  box-shadow: 4px 0 8px -4px rgba(0, 0, 0, 0.55);
}

.pl-scr-table tbody tr:hover td.pl-col-sym {
  background: var(--pl-bg-row-hover);
}

.pl-scr-symcell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pl-is-up { color: var(--pl-up, #22ab94) !important; }
.pl-is-down { color: var(--pl-down, #f7525f) !important; }

.pl-scr-empty {
  padding: 40px;
  text-align: center;
  color: var(--pl-text-muted);
  font: 400 var(--pl-fs) / 1.4 var(--pl-font);
}

/* —— View type menu —— */
.pl-vt-btn {
  gap: 8px;
}

.pl-vt-btn svg {
  opacity: 0.85;
}

.pl-vt-pop {
  position: absolute;
  z-index: 45;
  min-width: 180px;
  padding: 10px;
  border: 1px solid var(--pl-border);
  border-radius: 8px;
  background: #131313;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pl-vt-pop .pl-filter-opt {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pl-vt-check,
.pl-vt-check-spacer {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

/* —— Chart / Heatmap host —— */
.pl-scr-alt-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pl-scr-chart-toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--pl-border);
}

/* TV heatmap top bar */
.pl-scr-heat-toolbar.pl-heat-bar,
.pl-heat-bar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 4px 10px 6px;
  border-bottom: 1px solid #2a2e39;
  background: #000;
}

.pl-heat-bar-left,
.pl-heat-bar-right {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.pl-heat-bar-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 0 6px 0 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #d1d4dc;
  font: 400 14px / 1 var(--pl-font);
  cursor: pointer;
  white-space: nowrap;
}

.pl-heat-bar-btn:hover {
  background: #1e222d;
  color: #fff;
}

.pl-heat-bar-ico {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  color: #d1d4dc;
}

.pl-heat-bar-ico svg {
  display: block;
}

.pl-heat-bar-lab {
  padding: 0 2px;
}

.pl-heat-bar-chev {
  display: inline-flex;
  color: #787b86;
  margin-inline-start: -2px;
}

.pl-heat-bar-total {
  font: 400 12px / 1 var(--pl-font);
  color: #787b86;
  margin-inline-end: 6px;
  font-variant-numeric: tabular-nums;
}

.pl-heat-bar-ico-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #d1d4dc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pl-heat-bar-ico-btn:hover {
  background: #1e222d;
  color: #fff;
}

.pl-heat-menu {
  position: fixed;
  z-index: 80;
  min-width: 180px;
  padding: 6px;
  border: 1px solid #2a2e39;
  border-radius: 6px;
  background: #1e222d;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pl-heat-menu-item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 10px 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #d1d4dc;
  font: 400 14px / 1 var(--pl-font);
  cursor: pointer;
  text-align: start;
}

.pl-heat-menu-item:hover {
  background: #2a2e39;
  color: #fff;
}

.pl-heat-menu-item.is-active {
  color: #fff;
}

.pl-heat-menu-check {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #2962ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pl-scr-tool-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.pl-scr-tool-label {
  font: 600 var(--pl-fs-xs) / 1 var(--pl-font);
  color: var(--pl-text-muted);
  margin-inline-end: 4px;
}

.pl-scr-tool-btn {
  appearance: none;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--pl-text-secondary);
  font: 400 var(--pl-fs-sm) / 1 var(--pl-font);
  cursor: pointer;
}

.pl-scr-tool-btn:hover {
  color: var(--pl-text);
  background: var(--pl-bg-active);
}

.pl-scr-tool-btn.is-active {
  color: var(--pl-text);
  border-color: #3d3d3d;
  background: #1a1a1a;
}

.pl-scr-ind-group .pl-scr-ind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pl-text-secondary);
  font: 400 var(--pl-fs-xs) / 1 var(--pl-font);
  margin-inline-start: 6px;
  cursor: pointer;
}

.pl-scr-chart-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(var(--pl-chart-cols, 3), minmax(0, 1fr));
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: #363a45 transparent;
}

.pl-scr-chart-grid.is-auto {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.pl-scr-chart-card {
  appearance: none;
  border: 1px solid var(--pl-border);
  border-radius: 8px;
  background: #0a0a0a;
  color: inherit;
  text-align: start;
  padding: 10px 10px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 160px;
}

.pl-scr-chart-card:hover {
  border-color: #3d3d3d;
  background: #101010;
}

.pl-scr-chart-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pl-scr-chart-quote {
  margin-inline-start: auto;
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.pl-scr-chart-last {
  font: 600 var(--pl-fs-sm) / 1.2 var(--pl-font);
  color: var(--pl-text);
}

.pl-scr-spark {
  width: 100%;
  height: 110px;
  display: block;
}

/* —— Heatmap (TV treemap) —— */
.pl-scr-heatmap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 0 4px;
}

.pl-heat-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 12px 0;
  gap: 6px;
}

.pl-heat-legend {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px 4px;
  z-index: 3;
  background: #000;
}

.pl-heat-leg-label {
  font: 600 11px / 1 var(--pl-font);
  color: var(--pl-text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 42px;
}

.pl-heat-leg-label:last-child {
  text-align: end;
}

.pl-heat-leg-bar {
  flex: 1;
  display: flex;
  height: 8px;
  border-radius: 1px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
}

.pl-heat-leg-seg {
  flex: 1;
  height: 100%;
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  min-width: 0;
}

.pl-heat-leg-seg.is-off {
  opacity: 0.22;
  filter: grayscale(0.4);
}

.pl-heat-leg-seg:hover {
  outline: 1px solid rgba(255, 255, 255, 0.45);
  z-index: 1;
  position: relative;
}

.pl-heat-main {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pl-heat-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--pl-border);
  border-radius: 4px;
  background: #000;
  scrollbar-width: thin;
  scrollbar-color: #363a45 transparent;
  -webkit-overflow-scrolling: touch;
}

.pl-heat-scroll.is-panning {
  cursor: grabbing;
  user-select: none;
}

/* TV zoom controls — right middle pill */
.pl-heat-zoom {
  position: absolute;
  z-index: 12;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0;
  border-radius: 20px;
  background: rgba(19, 23, 34, 0.92);
  border: 1px solid #2a2e39;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.pl-heat-zoom-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d1d4dc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pl-heat-zoom-btn:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.pl-heat-zoom-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.pl-heat-zoom-btn + .pl-heat-zoom-btn {
  border-top: 1px solid #2a2e39;
}

.pl-heat-stage {
  position: relative;
  width: 100%;
  min-height: 280px;
  background: #000;
}

.pl-heat-group-box {
  position: absolute;
  box-sizing: border-box;
  border: 1px solid #111;
  overflow: hidden;
  background: #0a0a0a;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.pl-heat-group-box.is-hi {
  border-color: #2962ff;
  box-shadow: inset 0 0 0 2px #2962ff;
  z-index: 4;
}

.pl-heat-group-head {
  height: 20px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  font: 600 10px / 1 var(--pl-font);
  color: #d1d4dc;
  background: rgba(0, 0, 0, 0.72);
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.pl-heat-group-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-heat-group-chev {
  color: #787b86;
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}

.pl-heat-group-count {
  margin-inline-start: auto;
  color: #787b86;
  font-variant-numeric: tabular-nums;
}

.pl-heat-cell {
  position: absolute;
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.45);
  margin: 0;
  padding: 0;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
}

.pl-heat-cell:hover,
.pl-heat-cell.is-hi {
  outline: 2px solid #2962ff;
  outline-offset: -1px;
  z-index: 5;
  filter: none;
}

/* TV floating hover tip (value on top, label under) */
.pl-heat-float {
  position: absolute;
  z-index: 20;
  left: 0;
  top: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateZ(0);
  background: #1e222d;
  border: 1px solid #2a2e39;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  padding: 10px 14px;
  min-width: 280px;
}

.pl-heat-float.is-on {
  opacity: 1;
  visibility: visible;
}

.pl-heat-float-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.pl-heat-float-sym {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pl-heat-float-sym .pl-logo {
  width: 22px;
  height: 22px;
}

.pl-heat-float-ticker {
  font: 700 14px / 1 var(--pl-font);
  color: #fff;
}

.pl-heat-float-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.pl-heat-float-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pl-heat-float-ico {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: #787b86;
  align-items: center;
  justify-content: center;
}

.pl-heat-float-ico svg {
  width: 18px;
  height: 18px;
}

.pl-heat-float-v {
  font: 600 14px / 1 var(--pl-font);
  color: #d1d4dc;
  font-variant-numeric: tabular-nums;
}

.pl-heat-float-v.is-up {
  color: #22ab94;
}

.pl-heat-float-v.is-down {
  color: #f7525f;
}

.pl-heat-float-k {
  font: 600 10px / 1 var(--pl-font);
  color: #787b86;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pl-heat-cell-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--pl-heat-gap, 2px);
  height: 100%;
  width: 100%;
  padding: 4px;
  box-sizing: border-box;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  /* TV-like: logo/text scale with tile (set per-cell inline) */
  --pl-logo: var(--pl-heat-logo, 28px);
}

.pl-heat-cell-inner .pl-logo-stack {
  width: var(--pl-heat-logo, 28px);
  height: var(--pl-heat-logo, 28px);
  flex-basis: var(--pl-heat-logo, 28px);
  margin: 0 0 2px;
}

.pl-heat-cell-inner .pl-logo-stack img,
.pl-heat-cell-inner .pl-logo-stack .pl-logo-fallback {
  width: var(--pl-heat-logo, 28px);
  height: var(--pl-heat-logo, 28px);
}

.pl-heat-cell-inner .pl-logo-stack img.pl-logo-sec {
  width: calc(var(--pl-heat-logo, 28px) * 0.52);
  height: calc(var(--pl-heat-logo, 28px) * 0.52);
  inset-inline-end: calc(var(--pl-heat-logo, 28px) * -0.12);
  bottom: calc(var(--pl-heat-logo, 28px) * -0.06);
  border-width: 1px;
}

.pl-heat-cell-inner .pl-logo-fallback {
  font-size: calc(var(--pl-heat-logo, 28px) * 0.42);
}

.pl-heat-cell-sym {
  font: 700 var(--pl-heat-sym, 12px) / 1.05 var(--pl-font);
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-heat-cell-val {
  font: 600 var(--pl-heat-val, 11px) / 1 var(--pl-font);
  font-variant-numeric: tabular-nums;
  opacity: 0.95;
}

/* When dock open, chart already flexes; overlay covers chart area only */
#wrap.has-dock-open #chart {
  /* chart is flex sibling; dock is absolute over trailing edge */
}

#wrap.has-screener-open #htfCountdown {
  display: none !important;
}
