.chart-bars {
  --chart-teal: #237b67;
  --chart-blue: #4779a6;
  --chart-ochre: #a26a2c;
  --chart-slate: #667182;
  --chart-rail: #e6eeea;
  display: grid;
  gap: .85rem;
  min-width: 0;
}

.chart-bars [data-tone="teal"] { background: var(--chart-teal); }
.chart-bars [data-tone="blue"] { background: var(--chart-blue); }
.chart-bars [data-tone="ochre"] { background: var(--chart-ochre); }
.chart-bars [data-tone="slate"] { background: var(--chart-slate); }

.chart-rows, .chart-legend {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chart-rows { display: grid; gap: .8rem; }
.chart-row { display: grid; gap: .3rem; min-width: 0; }
.chart-label { font-size: .9rem; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.chart-series { display: grid; gap: .3rem; }
.chart-series-row { display: grid; grid-template-columns: minmax(0, 1fr) var(--chart-number-width, 13ch); align-items: center; gap: .75rem; font-size: .875rem; }

.chart-track {
  height: .5rem;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--chart-rail);
}

.chart-track > span { display: block; height: 100%; border-radius: inherit; }
.chart-number { text-align: end; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.4; overflow-wrap: anywhere; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.chart-legend li { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .875rem; }
.chart-key { width: .7rem; height: .7rem; border-radius: .22rem; }

.chart-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.chart-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .875rem; }
.chart-panel { display: grid; align-content: start; gap: .75rem; min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #f6faf8; }
.chart-panel h3, .chart-panel p { margin: 0; }
.chart-panel > h3 { font-size: 1rem; }
.chart-section { display: grid; align-content: start; gap: 1rem; }
.chart-section > :is(p, h2, h3, h4), .card.chart-section > h2 + p, .card.chart-section > .section-heading { margin: 0; }
.chart-section > .section-heading { flex-wrap: wrap; }
.chart-breakdown { margin-top: .85rem; }
.chart-breakdown > summary { color: var(--accent); font-weight: 650; cursor: pointer; }
.chart-breakdown > div { margin-top: .75rem; }

.classroom-results-list { --chart-number-width: 6ch; }
.classroom-vote-detail { margin-top: .85rem; }
.classroom-result-period .chart-panel + .chart-panel { margin-top: .6rem; }
.classroom-stat > .chart-bars, .classroom-stat > .chart-panels, .case-reading > .chart-bars { margin-top: .75rem; }
.classroom-projector .chart-label, .classroom-projector .chart-series-row { font-size: .83em; }
.assessment-filter + .chart-section { margin-bottom: 1rem; }
.assessment-nav + .chart-section + .reading-card { margin-top: 1rem; }

.chart-meter { display: block; width: 100%; height: .55rem; margin-top: .75rem; appearance: none; border: 0; border-radius: 999px; background: #e6eeea; }
.chart-meter::-webkit-meter-bar { height: .55rem; border: 0; border-radius: 999px; background: #e6eeea; }
.chart-meter::-webkit-meter-optimum-value { border-radius: 999px; background: #237b67; }
.chart-meter::-moz-meter-bar { border-radius: 999px; background: #237b67; }

@media (forced-colors: active) {
  .chart-track, .chart-key { border: 1px solid CanvasText; }
  .chart-track > span, .chart-key { forced-color-adjust: none; background: Highlight !important; }
}
