/*
 * c-meter — the labelled progress-bar UI. A vertical list (c-meter-list) of
 * stacked rows (c-meter-row): a header (colour badge + label + value) above a
 * full-width horizontal bar. Single source for the dashboard pipeline and the
 * admissions paid/awaiting breakdown — the former c-funnel + c-chart, unified
 * to one layout 2026-06-10.
 *
 *   • length → the one sanctioned inline custom property: --w: NN% on the fill.
 *   • colour → a --c token set per row (e.g. .c-meter-row--teal { --c: … }).
 *     The badge and the nested bar fill both inherit it.
 */

/* ── List + stacked row layout ─────────────────────────────────────────── */
.c-meter-list { display: grid; gap: var(--space-md); }
.c-meter-row  { display: grid; gap: 6px; }

.c-meter-row__top {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.c-meter-row__badge {
  inline-size: 9px;
  block-size: 9px;
  border-radius: var(--r-pill);
  background: var(--c, var(--ink-3));
  flex-shrink: 0;
}

/* Header typography */
.c-meter__label {
  font-size: var(--fs-cap);
  font-weight: var(--fw-label);
  color: var(--ink-2);
}
.c-meter__val {
  margin-inline-start: auto;
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-bold);
  color: var(--ink);
}

/* Row colours — set the --c token (badge + nested fill inherit it). The jewel
 * set serves the pipeline stages; the semantic set serves status breakdowns. */
.c-meter-row--teal   { --c: var(--teal); }
.c-meter-row--indigo { --c: var(--indigo); }
.c-meter-row--plum   { --c: var(--plum); }
.c-meter-row--saph   { --c: var(--saph); }
.c-meter-row--gold   { --c: var(--gold); }
.c-meter-row--ok     { --c: var(--ok); }
.c-meter-row--wait   { --c: var(--warn); }
.c-meter-row--no     { --c: var(--danger); }

/* Bare-bar colours. The row modifiers above set --c on a c-meter-row, which the
 * nested bar inherits; a bar used on its own — a progress cell in a table —
 * has no such parent, so it carries its own. */
.c-meter--teal   { --c: var(--teal); }
.c-meter--indigo { --c: var(--indigo); }

/* ── The bar primitive (track + fill) ──────────────────────────────────── */
.c-meter {
  display: block;
  block-size: 10px;
  border-radius: var(--r-sm);
  background: var(--surf-2);
  overflow: hidden;
}
.c-meter__fill {
  display: block;
  block-size: 100%;
  inline-size: var(--w, 0%);
  border-radius: var(--r-sm);
  background: var(--c, var(--ink-3));
  transition: inline-size var(--dur) var(--ease);
}
