/* A comparison row includes its labels and every segment. Keep axes, legends
   and confidence encodings intact. Pointer inspection takes priority over focus. */
[data-bar-row] { transition: filter 120ms; }
@media (hover: hover) {
  :has(> [data-bar-row]:hover) > [data-bar-row]:not(:hover) { filter: opacity(.35); }
}
:not(:has(> [data-bar-row]:hover)):has(> [data-bar-row]:focus-within) > [data-bar-row]:not(:focus-within) { filter: opacity(.35); }
[data-bar-segment]:hover, [data-heat-cell]:hover { outline: 1.5px solid var(--text, currentColor); outline-offset: -1.5px; }
@media (prefers-reduced-motion: reduce) {
  [data-bar-row] { transition: none; }
}

.chart-tooltip {
  position: fixed; pointer-events: none; z-index: 10; background: var(--bg); color: var(--text);
  border: 1px solid var(--text); border-radius: 4px; padding: 0.4rem 0.65rem;
  font-size: 12px; line-height: 1.45; max-width: min(34rem, calc(100vw - 12px)); opacity: 0; transition: opacity 0.08s;
}
.chart-tooltip .scope-note { margin-top: .3rem; line-height: 1.45; }
.chart-tooltip .t { font-weight: 600; margin-bottom: 2px; }
.chart-tooltip .m { color: var(--muted); }
.chart-tooltip table { border-collapse: collapse; margin-top: 4px; width: auto; }
.chart-tooltip td { padding: 1px 8px 1px 0; font-variant-numeric: tabular-nums; border: 0; }
.chart-tooltip td.n { text-align: right; padding-right: 0; }
.chart-tooltip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }
