/* Top Performers leaderboards — page-unique layout (tokens from core.css). */
/* `minmax(0, 1fr)`, not `1fr`. A grid track's automatic minimum is min-content,
   so a wide child (these boards hold tables) pushes the track past the viewport
   instead of shrinking: measured document.scrollWidth 980px at a 390px viewport,
   2.5x over. Pre-existing; found by an A/B sweep against the previous CSS. */
.tp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
@media (min-width: 1000px) { .tp-grid { grid-template-columns: repeat(2, 1fr); } }
.tp-board { border: 1px solid var(--colour-border); border-radius: var(--radius-lg); padding: var(--space-5); background: var(--colour-bg); }
.tp-board__title { font-size: var(--text-lg); font-weight: var(--fw-bold); color: var(--colour-primary); margin: 0 0 var(--space-1); }
.tp-board__blurb { font-size: var(--text-sm); color: var(--colour-text-muted); margin: 0 0 var(--space-4); }
/* The basis line under a published board: which official source the numbers
   were counted from, and what it does not cover. Set below the rows and quieter
   than the blurb, so it reads as a footnote rather than as a warning. */
.tp-board__basis { font-size: 0.72rem; line-height: 1.5; color: var(--colour-text-muted);
  margin: var(--space-4) 0 0; padding-top: var(--space-3); border-top: 1px solid var(--colour-border); }
.tp-row { display: grid; grid-template-columns: 1.6rem 1fr auto; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; text-decoration: none; color: inherit; }
.tp-row:hover .tp-row__name { color: var(--colour-primary); }
.tp-row__rank { font-weight: var(--fw-extrabold); color: var(--colour-primary); text-align: center; }
.tp-row__name { display: block; font-weight: var(--fw-semibold); font-size: var(--text-sm); color: var(--colour-link); text-decoration: none; }
.tp-row__name:hover { color: var(--colour-primary); text-decoration: underline; }
.tp-row__area { display: block; font-size: 0.72rem; color: var(--colour-text-muted); margin-bottom: 4px; }
.tp-row__bar { display: block; width: 100%; height: 8px; border-radius: var(--radius-pill); background: var(--colour-lighter); overflow: hidden; }
.tp-row__bar > span { display: block; height: 100%; background: var(--colour-secondary); border-radius: var(--radius-pill); }
.tp-row__val { font-weight: var(--fw-extrabold); color: var(--colour-text); font-size: var(--text-sm); }
/* The count opens a contextual drill-down (the member's items, not their profile). */
.tp-row__val--drill { background: none; border: 0; font-family: inherit; cursor: pointer;
  color: var(--colour-primary); border-bottom: 1px dotted currentColor; padding: 0 0 1px; }
.tp-row__val--drill:hover { border-bottom-style: solid; }

/* --- Shared with the Analysis dashboard's member-activity section --- */
/* "Show all N" disclosure. A native <details>, not a JS toggle: it works with
   JS off, is keyboard-operable and announces its own expanded state. */
.tp-more > summary { cursor: pointer; font-size: var(--text-sm); font-weight: var(--fw-semibold);
  color: var(--colour-link); padding: var(--space-2) 0; list-style: revert; }
.tp-more > summary:hover { color: var(--colour-primary); }
/* The link to the full ranking of every member on one metric. */
.tp-board__more { margin: var(--space-3) 0 0; font-size: var(--text-sm); }
.tp-board__more a { color: var(--colour-link); font-weight: var(--fw-semibold); }
.tp-board__more a:hover { color: var(--colour-primary); }
/* A board that publishes its figures without an order, because too few events
   were recorded to place one member above another. */
.tp-board__notice { font-size: var(--text-sm); color: var(--colour-text-muted);
  margin: 0 0 var(--space-3); }
/* Full-ranking page: one board, full width. */
.tp-grid--single { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .tp-grid--single { grid-template-columns: minmax(0, 1fr); } }
.tp-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  margin: var(--space-4) 0; font-size: var(--text-sm); }
.tp-filter input[type="search"] { padding: var(--space-2) var(--space-3);
  border: 1px solid var(--colour-border); border-radius: var(--radius-md); min-width: 14rem; }
