/* Statistik-Seite und Vergleichsbaustein: einfache Balken ohne Chart-Bibliothek */

.stats-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stats-figure {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.stats-figure strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stats-figure span {
  color: var(--muted);
  font-size: 0.9rem;
}

.bar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem;
  gap: 4px 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.bar-row:last-child {
  border-bottom: 0;
}

.bar-label {
  font-size: 0.95rem;
}

.bar-value {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 5px;
  background: var(--bg);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 5px;
  background: var(--accent);
  transition: width 0.6s ease-out;
}

.bar-fill.fail {
  background: var(--fail);
}

.bar-fill.warn {
  background: var(--warn);
}

.bar-fill.ok {
  background: var(--ok);
}

.bar-note {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Notenverteilung als senkrechte Säulen */
.grade-chart {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: end;
  height: 180px;
  margin-top: 12px;
}

.grade-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.grade-col .col {
  width: 100%;
  max-width: 56px;
  min-height: 2px;
  border-radius: 6px 6px 0 0;
  background: var(--accent);
  transition: height 0.6s ease-out;
}

.grade-col .col.g-good {
  background: var(--ok);
}

.grade-col .col.g-mid {
  background: var(--warn);
}

.grade-col .col.g-bad {
  background: var(--fail);
}

.grade-col b {
  color: var(--text);
  font-size: 0.95rem;
}

.stats-empty {
  color: var(--muted);
}

/* Vergleichsbaustein (Free-Check-Ergebnis, Dashboard) */
.compare h2 {
  margin-bottom: 4px;
}

.compare-lead {
  margin: 0 0 12px;
}

.compare-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.compare-row:last-child {
  border-bottom: 0;
}

.compare-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
}

.compare-head b {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.compare-scale {
  position: relative;
  height: 12px;
  margin: 10px 0 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--fail-soft), var(--warn-soft), var(--ok-soft));
  border: 1px solid var(--line);
}

.compare-marker {
  position: absolute;
  top: 50%;
  left: 0;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--panel);
  box-shadow: 0 0 0 1px var(--accent);
  transition: left 0.6s ease-out;
}

.compare-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

.compare-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}
