/* Data visualization chrome — single-hue figures, paper surface */
.chart-tooltip {
  position: absolute;
  transform: translate(-50%, -135%);
  background: var(--ink);
  color: var(--paper-card);
  border-radius: 3px;
  padding: 5px 9px;
  font-size: 10.5px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  white-space: nowrap;
  z-index: 5;
  box-shadow: var(--shadow-sm);
}
.chart-tooltip.is-on { opacity: 1; }
.chart-tooltip span { color: rgba(251, 248, 241, 0.65); font-size: 9.5px; }
.chart-tooltip strong { font-weight: 600; font-variant-numeric: tabular-nums; }

.bar-rows { display: flex; flex-direction: column; gap: 10px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(88px, 148px) 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
}
.bar-row-label { display: flex; align-items: center; gap: 7px; color: var(--ink-2); min-width: 0; }
.bar-row-label span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row-track { height: 7px; background: var(--paper-2); border-radius: 999px; overflow: hidden; }
.bar-row-fill { height: 100%; border-radius: 999px; transition: width 0.7s cubic-bezier(.2,.8,.2,1); }
.bar-row-value { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.bar-row:hover .bar-row-label { color: var(--ink); }
.bar-row:hover .bar-row-fill { filter: brightness(1.08); }

.chart-table { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.chart-table summary {
  font-size: 11.5px;
  color: var(--ink-3);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chart-table summary::-webkit-details-marker { display: none; }
.chart-table summary::before { content: '+'; font-family: var(--mono); font-size: 12px; }
.chart-table[open] summary::before { content: '−'; }
.chart-table .table-wrap { margin-top: 10px; }
.chart-table table.data { min-width: 260px; }

.viz {
  position: relative;
  width: 100%;
}
.viz svg { display: block; width: 100%; height: auto; }
.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend i { width: 14px; height: 2px; background: var(--teal); display: inline-block; }

.chart-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.chart-head-row h3 { font-size: 18px; }
.chart-head-row p { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }
.chart-head-row .seg { flex: none; }
