/* Phase 1 polish: flat, matte status list + quiet leaderboard / rivalry.
   No cards, shadows, accent bars, or decorative arcs — README-style. */

/* Race control: a quiet key/value status list */
.status-list {
  font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace);
  font-size: 0.86rem;
}
.status-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 6px 16px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.status-row:last-child { border-bottom: none; }
.status-key { color: var(--muted); }
.status-val { color: var(--text); }
.status-meta { color: var(--muted); margin-left: 8px; }

/* Leaderboard: plain rows; current leader emphasized by weight only */
#leaderboard tr.lb-polished td { transition: background 0.12s ease; }
#leaderboard tr.lb-polished:hover td { background: rgba(255, 255, 255, 0.025); }
#leaderboard tr.rank-1 td { font-weight: 650; }
/* minimal top-3 treatment: a 2px left rule, tiered — no medals/fills/gradients */
#leaderboard tr.rank-1 td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
#leaderboard tr.rank-2 td:first-child { box-shadow: inset 2px 0 0 var(--muted); }
#leaderboard tr.rank-3 td:first-child { box-shadow: inset 2px 0 0 var(--muted-soft); }
.lb-player-name { display: block; color: var(--text); font-weight: 600; }
.lb-player-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 0.72rem; }
.peak-gap { display: block; margin-top: 2px; color: var(--muted); font-size: 0.72rem; font-family: inherit; }
.peak-gap.at-peak { color: var(--muted-soft); }
.spark-cell { position: relative; min-width: 92px; }

/* PMF captions */
.dist-method-caption,
.rivalry-chart-cap-scope {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}
.rivalry-chart-cap-scope { margin: 0 0 6px; }

/* quiet DOM legend under the rivalry chart: "Player · med X · avg Y" */
.rivalry-dist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 8px;
  font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace);
  font-size: 0.74rem;
  color: var(--muted);
}
.rivalry-dist-legend-row { display: inline-flex; align-items: center; gap: 7px; }
.rivalry-dist-legend-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }

.rivalry-dist-scope { margin-left: auto; }
.rivalry-dist-scope button { min-width: 46px; }

/* Rivalry hero: flat columns, no gold/green card chrome */
.rivalry-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin: 10px 0 12px;
}
.rivalry-hero[hidden] { display: none; }
.rivalry-side,
.rivalry-verdict {
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 12px 13px;
}
.rivalry-side.winner { border-color: var(--muted-soft); }
.rivalry-name { color: var(--text); font-weight: 600; margin-bottom: 5px; }
.rivalry-score {
  font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace);
  font-size: 1.2rem;
  color: var(--text);
}
.rivalry-verdict {
  min-width: 160px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rivalry-verdict-title { color: var(--text); font-weight: 600; }
.rivalry-verdict-meta { margin-top: 4px; color: var(--muted); font-size: 0.76rem; }
.win-bar {
  height: 6px;
  margin-top: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.win-bar > span { display: block; height: 100%; background: var(--muted); }
.rivalry-side.winner .win-bar > span { background: var(--text); }

@media (max-width: 960px) {
  .rivalry-dist-scope { margin-left: 0; }
}
@media (max-width: 640px) {
  .status-row { grid-template-columns: 1fr; gap: 1px; padding: 7px 0; }
  .status-key { font-size: 0.78rem; }
  .rivalry-hero { grid-template-columns: 1fr; }
  .rivalry-verdict { order: -1; }
}
