.statistics-heading {
  padding: 32px 0 24px;
}
.statistics-heading h1 {
  font-size: clamp(28px, 3vw, 38px);
  margin-bottom: 12px;
}
.statistics-heading p {
  max-width: 760px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 0;
}
.stats-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-block: 20px;
}
.stats-chart-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  background: var(--panel);
}
.stats-chart-panel h2 {
  font-size: 17px;
  margin-bottom: 6px;
}
.stats-chart-panel p {
  font-size: 12px;
  color: var(--muted);
}
.stats-coverage {
  grid-column: 1/-1;
}
.stats-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 18px;
}
.chart-control {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  min-width: 170px;
}
.chart-control select {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 5px;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  width: 100%;
}
.stat-bar {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(60px, 3fr) 40px;
  gap: 16px;
  align-items: center;
  min-height: 32px;
  padding-block: 5px;
  font-size: 12px;
}
.stat-bar-name {
  overflow-wrap: anywhere;
}
.stat-bar svg {
  width: 100%;
  height: 12px;
}
.chart-track {
  fill: #1e293b;
}
.chart-fill {
  fill: #b6a3e7;
}
.chart-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.distribution-chart {
  display: block;
  width: 210px;
  max-width: 100%;
  margin: 12px auto;
}
.donut-segment {
  fill: none;
  stroke-width: 22px;
}
.donut-segment.distribution-single {
  stroke: #b6a3e7;
}
.donut-segment.distribution-double {
  stroke: #64748b;
}
.donut-segment.distribution-other {
  stroke: #c6995b;
}
.donut-total {
  fill: #f1f5f9;
  font-size: 27px;
  font-weight: 650;
}
.donut-caption {
  fill: #94a3b8;
  font-size: 10px;
}
.distribution-legend {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.distribution-legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto 58px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  padding-block: 7px;
}
.distribution-legend li > span:last-child {
  color: var(--muted);
  text-align: right;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.legend-dot.distribution-single {
  background: #b6a3e7;
}
.legend-dot.distribution-double {
  background: #64748b;
}
.legend-dot.distribution-other {
  background: #c6995b;
}
#category-chart {
  margin-top: 28px;
}
#statistics .spell-coverage-heading h2 {
  font-size: 15px;
  margin: 0;
}
#statistics .state-panel {
  margin-block: 20px;
}
@media (max-width: 767px) {
  .stats-charts {
    grid-template-columns: 1fr;
  }
  .stats-chart-panel {
    padding: 18px;
  }
  .stats-panel-heading {
    flex-direction: column;
    gap: 8px;
  }
  .chart-control {
    width: 100%;
  }
  .stat-bar {
    grid-template-columns: minmax(85px, 1.3fr) minmax(55px, 1.8fr) 30px;
    gap: 10px;
  }
  .statistics-heading {
    padding-top: 24px;
  }
}
