/* ==========================================================================
   COMPONENTS · LEDGER — CATEGORY AVERAGES as a "ledger of findings": a
   contents-style table, names left, mono scores right-aligned, a thin printed
   band-bar between, a hairline rule between rows. Never a traffic-light
   dashboard. Each row carries data-band. Composes the bar component.
   ========================================================================== */

.op-ledger {
  list-style: none;
  margin: 0;
  padding: 0;
}

.op-ledger__row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(5rem, 9rem) auto auto;
  align-items: center;
  gap: var(--space-sm);
  padding-block: var(--space-xs);
  border-bottom: 1px solid var(--rule);
}
.op-ledger__row:last-child { border-bottom: 0; }

.op-ledger__name {
  font-family: var(--font-reading);
  font-size: var(--text-sm);
  color: var(--text);
}
.op-ledger__name a { text-decoration-color: var(--rule-strong); }

/* the bar primitive sits in column 2 */
.op-ledger__bar { min-inline-size: 4rem; }

.op-ledger__score {
  font-family: var(--font-data);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums lining-nums;
  text-align: right;
  color: var(--bk-ink, var(--text));
  min-inline-size: 2.4em;
}

.op-ledger__band {
  font-family: var(--font-furniture);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--bk-ink, var(--text-secondary));
  text-align: right;
  min-inline-size: 5em;
}

/* A header row, set as furniture */
.op-ledger__head {
  grid-template-columns: minmax(8rem, 1fr) minmax(5rem, 9rem) auto auto;
  border-bottom: 1.5px solid var(--rule-strong);
}
.op-ledger__head > * {
  font-family: var(--font-furniture);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-secondary);
}

@media (max-width: 40rem) {
  .op-ledger__row { grid-template-columns: 1fr auto; row-gap: var(--space-3xs); }
  .op-ledger__bar { grid-column: 1 / -1; order: 3; }
  .op-ledger__band { grid-column: 1 / -1; order: 4; text-align: left; }
}
