/* Super mode (chart/super.js). Desktop only: JS sets body[data-v2-super] at ≥1280px alone.
   The filter bar takes the stats row; the panel page takes the chart + book area; the ticket,
   portfolio and account stay. Panels are 1px bento seams; the focused (ticket) coin gets an
   accent border. */
.v2-super-bar[hidden],
.v2-super[hidden] {
  display: none;
}
body[data-v2-super] .v2-grid {
  --v2-stat-h: 33px;
}
body[data-v2-super] .v2-statrow,
body[data-v2-super] .v2-chart,
body[data-v2-super] .v2-book {
  display: none !important;
}
/* VIEW does nothing in super mode: its ticket chip goes with the chart's own VIEW. */
body[data-v2-super] .v2-view-chip {
  display: none;
}
/* VIEW wide hides the ticket; super mode needs it for orders. */
body[data-v2-super] .v2-ticket {
  display: flex !important;
}
.v2-super-bar {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
}
.v2-super {
  grid-column: 1 / 10;
  grid-row: 3 / 8;
}
.v2-grid[data-v2-lay] > .v2-super {
  grid-area: var(--v2-lay-super);
}
.v2-super:hover {
  outline: 0;
}
.v2-super-bar .v2-super-name {
  color: var(--acc-hi);
}
.v2-super-grp {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
}
.v2-super-bar .v2-super-n,
.v2-super-bar .v2-super-pg {
  width: 44px;
  min-width: 44px;
  padding: 0;
}
.v2-super-bar .v2-super-pg:disabled {
  color: var(--line);
  cursor: default;
}
.v2-super-bar .v2-super-page {
  min-width: 66px;
  font-family: var(--mono);
  font-size: var(--fs-12);
  font-variant-numeric: tabular-nums slashed-zero;
  color: var(--tx);
}
.v2-super-bar .v2-super-exit {
  border-right: 0;
  color: var(--tx);
}
.v2-super-bar .v2-super-exit:hover {
  background: var(--acc-hi);
  color: var(--ink);
}

.v2-sgrid {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}
.v2-sgrid[data-n="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.v2-sgrid[data-n="9"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.v2-sgrid[data-empty]::before {
  content: attr(data-empty-text);
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  background: var(--v2-tile);
  font-family: var(--mono);
  font-size: var(--fs-13);
  color: var(--mute);
  text-align: center;
  text-transform: uppercase;
}
.v2-spanel {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--v2-tile);
  cursor: var(--cur-pointer);
}
.v2-spanel[hidden] {
  display: none;
}
/* Focused panel = the ticket coin: accent frame drawn inside the seams, plus the coin underline. */
.v2-spanel[data-v2-sfocus]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  border: 2px solid var(--acc);
  pointer-events: none;
}
.v2-spanel:not([data-v2-sfocus]):hover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  border: 1px solid var(--mute);
  pointer-events: none;
}
.v2-spanel[data-v2-sfocus] .v2-spanel-coin {
  position: relative;
  background: var(--acc-hi);
  color: var(--ink);
}
.v2-spanel-hd {
  cursor: var(--cur-pointer);
}
.v2-spanel-stat {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--fs-12);
  font-variant-numeric: tabular-nums slashed-zero;
  color: var(--mute);
  white-space: nowrap;
}
.v2-spanel-chg[data-dir="up"] {
  color: var(--acc-hi);
}
.v2-spanel-chg[data-dir="down"] {
  color: var(--bone);
}
.v2-spanel-atr {
  color: var(--tx);
}
.v2-spanel-atr[hidden] {
  display: none;
}
.v2-spanel-pos {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-left: 1px solid var(--line);
  font-size: var(--fs-11);
  font-weight: 400;
  font-synthesis: none;
  text-transform: uppercase;
  color: var(--acc-hi);
}
.v2-spanel-pos[hidden] {
  display: none;
}
.v2-spanel-pane {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  touch-action: none;
}
.v2-spanel-pane:focus {
  outline: 0;
}
/* Narrow panels (9 per page) drop the volume cell first. */
/* SORT ATR: the ATR cell takes the volume cell's place. */
.v2-sgrid[data-sort="atr"] .v2-spanel-vol,
.v2-sgrid[data-n="9"] .v2-spanel-vol {
  display: none;
}
/* Same split as the chart grid: the drawing rail on the page's left acts on the focused panel
   (chart/super.js moves it in). The focused panel shows the full chart's plot in place of its own. */
.v2-super-lower {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: row;
}
body[data-v2-rail-off] .v2-super-lower > .v2-chart-tools {
  display: none;
}
/* The chart chip bar inside the filter bar: rail arrow + indicators only. Every panel runs on the page
   timeframe, so the chart's own timeframes step aside; no layout split or VIEW in super mode. */
.v2-super-bar > .v2-chart-chips {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  border-bottom: 0;
  background: transparent;
}
.v2-super-bar > .v2-chart-chips .v2-chart-tfs,
.v2-super-bar > .v2-chart-chips .v2-chart-tfsep,
.v2-super-bar > .v2-chart-chips .v2-chart-grid,
.v2-super-bar > .v2-chart-chips .v2-chart-view {
  display: none;
}
.v2-super > .v2-chart-pick {
  z-index: 8;
}
.v2-spanel[data-v2-sfull] {
  cursor: auto;
}
.v2-spanel[data-v2-sfull] > .v2-spanel-pane {
  display: none;
}
.v2-spanel > .v2-chart-main {
  min-height: 0;
  background: var(--v2-tile);
}
.v2-spanel .v2-chart-pane > .tvmark {
  width: 20px;
  height: 20px;
}
.v2-spanel .v2-chart-pane > .tvcredit {
  left: 38px !important;
  font-size: var(--fs-11);
}
