/* Book and trades. Agent 3. Selectors stay under these two slots. */
[data-tile="book"] .v2-body,
[data-tile="trades"] .v2-body {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--v2-tile);
}
[data-tile="book"] .v2-cols,
[data-tile="trades"] .v2-cols {
  display: grid;
  /* Price fits meme ticks (0.00000712); Size full szDecimals; Sum compact when long. */
  grid-template-columns: minmax(10.5ch, 1.3fr) minmax(9ch, 1.2fr) minmax(5.5ch, 0.9fr);
  column-gap: 2px;
  padding: 3px 2px;
  color: var(--v2-muted);
  font-family: var(--pix);
  font-size: var(--fs-pix-label, 12px);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: var(--v2-track-label);
  -webkit-font-smoothing: none;
  text-transform: uppercase;
  border-bottom: 1px solid var(--v2-line);
  flex: 0 0 auto;
}
[data-tile="book"] .v2-cols span:nth-child(n + 2) {
  text-align: right;
}
[data-tile="book"] .v2-rows {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
[data-tile="book"] .v2-brow {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(10.5ch, 1.3fr) minmax(9ch, 1.2fr) minmax(5.5ch, 0.9fr);
  column-gap: 2px;
  align-items: center;
  padding: 0 2px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--v2-text);
  font: inherit;
  letter-spacing: var(--v2-track);
  text-align: left;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
/* Glyph chips so solid heat slabs do not wash digits.
   Exclude .v2-heat — it is also a span but must stay absolute full-bleed.
   Fill the grid track; never overflow:hidden on numbers (wrong Size is a trading bug). */
[data-tile="book"] .v2-brow > span:not(.v2-heat) {
  position: relative;
  z-index: 1;
  background: var(--v2-tile);
  padding: 0;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  /* Never clip Size digits — tracks sized for full szDecimals / compact Sum. */
  overflow: visible;
  white-space: nowrap;
}
[data-tile="book"] .v2-brow .v2-sz,
[data-tile="book"] .v2-brow .v2-sum {
  text-align: right;
}
[data-tile="book"] .v2-brow .v2-sum {
  color: var(--v2-muted);
}
/* U9: long = --acc, short = --bone (kit tokens from #4). */
[data-tile="book"] .v2-brow .v2-up {
  color: var(--acc);
}
[data-tile="book"] .v2-brow .v2-dn {
  color: var(--bone);
}
[data-tile="book"] .v2-brow:hover {
  background: var(--v2-header);
  color: var(--acc);
}
[data-tile="book"] .v2-brow:hover > span {
  background: var(--v2-header);
}
[data-tile="book"] .v2-brow.on,
[data-tile="book"] .v2-brow.on:hover {
  background: var(--acc);
  color: var(--ink);
  font-weight: 700;
}
[data-tile="book"] .v2-brow.on > span,
[data-tile="book"] .v2-brow.on .v2-up,
[data-tile="book"] .v2-brow.on .v2-dn,
[data-tile="book"] .v2-brow.on .v2-sum {
  color: inherit;
  background: transparent;
}
[data-tile="book"] .v2-brow.on .v2-heat {
  visibility: hidden;
}
/* Legacy translucent bar — keep selector inert if an old node appears. */
[data-tile="book"] .v2-depth {
  display: none;
}
/* Ladder-8 solid heat. Cells on/off, no opacity wash. Grows from the right. */
[data-tile="book"] .v2-heat {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1px;
  direction: rtl;
  pointer-events: none;
}
[data-tile="book"] .v2-heat i {
  background: transparent;
  min-width: 0;
}
[data-tile="book"] [data-side="bid"] .v2-heat[data-heat="1"] i:nth-child(-n + 1),
[data-tile="book"] [data-side="bid"] .v2-heat[data-heat="2"] i:nth-child(-n + 2),
[data-tile="book"] [data-side="bid"] .v2-heat[data-heat="3"] i:nth-child(-n + 3),
[data-tile="book"] [data-side="bid"] .v2-heat[data-heat="4"] i:nth-child(-n + 4),
[data-tile="book"] [data-side="bid"] .v2-heat[data-heat="5"] i:nth-child(-n + 5),
[data-tile="book"] [data-side="bid"] .v2-heat[data-heat="6"] i:nth-child(-n + 6),
[data-tile="book"] [data-side="bid"] .v2-heat[data-heat="7"] i:nth-child(-n + 7),
[data-tile="book"] [data-side="bid"] .v2-heat[data-heat="8"] i:nth-child(-n + 8) {
  background: var(--acc);
}
[data-tile="book"] [data-side="ask"] .v2-heat[data-heat="1"] i:nth-child(-n + 1),
[data-tile="book"] [data-side="ask"] .v2-heat[data-heat="2"] i:nth-child(-n + 2),
[data-tile="book"] [data-side="ask"] .v2-heat[data-heat="3"] i:nth-child(-n + 3),
[data-tile="book"] [data-side="ask"] .v2-heat[data-heat="4"] i:nth-child(-n + 4),
[data-tile="book"] [data-side="ask"] .v2-heat[data-heat="5"] i:nth-child(-n + 5),
[data-tile="book"] [data-side="ask"] .v2-heat[data-heat="6"] i:nth-child(-n + 6),
[data-tile="book"] [data-side="ask"] .v2-heat[data-heat="7"] i:nth-child(-n + 7),
[data-tile="book"] [data-side="ask"] .v2-heat[data-heat="8"] i:nth-child(-n + 8) {
  background: var(--bone);
}
[data-tile="book"] [data-side="bid"] .v2-brow {
  --book-flick: var(--acc);
}
[data-tile="book"] [data-side="ask"] .v2-brow {
  --book-flick: var(--bone);
}
[data-tile="book"] .v2-brow.v2-flick .v2-heat {
  animation: v2-book-flick 160ms steps(2, end);
}
@keyframes v2-book-flick {
  0%,
  49.9% {
    clip-path: inset(0 0 100% 0);
  }
  50%,
  100% {
    clip-path: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-tile="book"] .v2-brow.v2-flick .v2-heat {
    animation: none;
    clip-path: none;
  }
}
[data-tile="book"] .v2-spread {
  background: var(--v2-header);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-top: 1px solid var(--v2-line);
  border-bottom: 1px solid var(--v2-line);
  flex: 0 0 30px;
  letter-spacing: 0.06em;
}
[data-tile="book"] .v2-spread .v2-px {
  color: var(--acc);
  font-size: var(--v2-fs-input);
}
[data-tile="book"] .v2-hd .v2-tick {
  margin-left: auto;
  height: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--pix);
  font-size: var(--fs-pix-label, 12px);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: var(--v2-track-label);
  -webkit-font-smoothing: none;
  cursor: pointer;
  padding: 0 2px 0 8px;
}
[data-tile="trades"] .v2-tape-cols,
[data-tile="trades"] .v2-print {
  grid-template-columns: 62px 14px minmax(0, 1fr) minmax(0, 1fr);
}
[data-tile="trades"] .v2-tape-cols span:nth-child(n + 3),
[data-tile="trades"] .v2-print span:nth-child(n + 3) {
  text-align: right;
}
[data-tile="trades"] .v2-tapelist {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
[data-tile="trades"] .v2-print {
  display: grid;
  align-items: center;
  padding: 3px 8px;
  font-variant-numeric: tabular-nums;
}
[data-tile="trades"] .v2-time {
  color: var(--v2-muted);
}
[data-tile="trades"] .v2-side {
  width: 8px;
  height: 8px;
  display: inline-block;
}
[data-tile="trades"] .v2-side.buy {
  background: var(--acc);
}
[data-tile="trades"] .v2-side.sell {
  background: var(--bone);
}
