.timer {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.timer p {
  margin: 0;
}

.label,
.identity {
  color: var(--muted);
}

.clock {
  font: 600 clamp(3rem, 14vw, 5rem)/1 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* dims the clock while paused, with a text label so it isn't colour alone */
.timer:has(.paused:not([hidden])) .clock {
  opacity: 0.4;
}

.paused {
  padding: 2px 10px;
  border: 2px solid currentColor;
  border-radius: 6px;
  font: 700 0.75rem/1.4 var(--mono);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.board {
  width: 100%;
  margin-top: 32px;
  text-align: left;
}

.board h2 {
  font-size: 1rem;
  margin: 0 0 12px;
}

.board-empty {
  color: var(--muted);
  margin: 0;
}

.leaderboard {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
  padding: 2px;
}

.leaderboard li {
  counter-increment: rank;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}

.leaderboard li::before {
  content: counter(rank) ".";
  min-width: 2ch;
  color: var(--muted);
  font-family: var(--mono);
}

.entry-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.entry-time {
  margin-left: auto;
  font-family: var(--mono);
  white-space: nowrap;
}

/* your own row. bold plus the "(you)" note, not just a colour */
.leaderboard li.is-you {
  font-weight: 700;
  background: var(--selection);
  color: var(--selection-text);
}

.leaderboard li.is-you .entry-note,
.leaderboard li.is-you::before {
  color: inherit;
}

/* no inset box at all until the first session arrives */
.leaderboard:not(:has(li:not([hidden]))) {
  display: none;
}

/* medal colours for the podium */
.leaderboard li:nth-child(1)::before { color: #fbbf24; font-weight: 700; }
.leaderboard li:nth-child(2)::before { color: #cbd5e1; font-weight: 700; }
.leaderboard li:nth-child(3)::before { color: #d97706; font-weight: 700; }
