/* ==========================================================================
   FINDING · LEADERBOARD — the ranked column (the /rankings spine). One country
   per row, ordered best-first (higher = better, rank 1 at the top), each row a
   fully-escorted score: rank numeral · country · a band bar (the continuous
   non-hue position) · mono score · band word. Composes the .op-bar primitive.

   The law it exists to honour (spine §7): a leaderboard SEGREGATES the
   unassessed — it never truncates them away and never lets a no-data or
   suppressed country masquerade as "rank last / score 0". Below a printed rule,
   the not-ranked are listed honestly with their coverage tag and a "—" rank.
   ========================================================================== */

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

.op-leaderboard__row {
  display: grid;
  grid-template-columns: 2.4rem minmax(7rem, 1fr) minmax(4rem, 10rem) auto auto;
  align-items: center;
  gap: var(--space-sm);
  padding-block: var(--space-xs);
  border-bottom: 1px solid var(--rule);
}
.op-leaderboard__row:last-child { border-bottom: 0; }
.op-leaderboard__row:hover .op-leaderboard__name a { color: var(--accent); }

/* the rank — mono, right-aligned into its own narrow column */
.op-leaderboard__rank {
  font-family: var(--font-data);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text-secondary);
  text-align: right;
}
/* the top three carry full ink — a quiet podium, no medals, no colour */
.op-leaderboard__row--top .op-leaderboard__rank { color: var(--text); }

/* the country name in the serif reading voice, a pivot link */
.op-leaderboard__name {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  min-width: 0;
}
.op-leaderboard__country {
  font-family: var(--font-reading);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}
.op-leaderboard__name a { text-decoration-color: var(--rule-strong); }
.op-leaderboard__iso {
  font-family: var(--font-data);
  font-size: var(--text-2xs);
  font-variant-numeric: tabular-nums lining-nums;
  text-transform: uppercase;
  color: var(--text-muted);
  flex: none;
}

/* the bar slot (the continuous non-hue cue) */
.op-leaderboard__bar { min-inline-size: 3.5rem; }

.op-leaderboard__score {
  font-family: var(--font-data);
  font-size: var(--text-md);
  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.6em;
}
.op-leaderboard__score-max { font-size: var(--text-xs); color: var(--text-muted); }

.op-leaderboard__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: 5.5em;
}

/* an optional movement delta — a glyph (non-colour) plus a mono count */
.op-leaderboard__delta {
  font-family: var(--font-data);
  font-size: var(--text-2xs);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text-muted);
}
.op-leaderboard__delta--up::before   { content: "\25B2 "; }
.op-leaderboard__delta--down::before { content: "\25BC "; }
.op-leaderboard__delta--flat::before { content: "\2013 "; }

/* ----------------------------------------------------------------------
   THE SEGREGATION RULE — the printed line below which sit the not-ranked.
   The candour move: the unassessed are PRESENT, labelled, never deleted.
   ---------------------------------------------------------------------- */
.op-leaderboard__divider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-block: var(--space-sm) 0;
  padding-top: var(--space-sm);
  border-top: 2px solid var(--rule-strong);
}
.op-leaderboard__divider-label {
  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);
}
.op-leaderboard__divider-note {
  font-family: var(--font-furniture);
  font-size: var(--text-2xs);
  font-style: italic;
  color: var(--text-muted);
}

/* a not-ranked row: rank is an em-dash, the score columns give way to the
   coverage tag, and the bar slot carries the hatch register */
.op-leaderboard__row--unranked .op-leaderboard__rank { color: var(--text-muted); }
.op-leaderboard__row--unranked .op-leaderboard__country { color: var(--text-secondary); }

@media (max-width: 40rem) {
  .op-leaderboard__row {
    grid-template-columns: 2rem 1fr auto;
    column-gap: var(--space-xs);
    row-gap: var(--space-3xs);
  }
  .op-leaderboard__bar  { grid-column: 2 / -1; order: 4; }
  .op-leaderboard__band { grid-column: 2 / -1; order: 5; text-align: left; }
  .op-leaderboard__delta { display: none; }
}
