/* The /leaderboard/ page.

   This file used to style an iframe of stats.dropbears.gg. That is gone: the
   board is now our own table, rendered by the server and driven by
   js/board.js, so it scrolls with the page instead of trapping a second
   scrollbar inside it. The table itself is styled by board.css, shared with
   the home page; this file adds only what the full page needs. */

.board { padding-block: var(--s6) var(--s7); }

.board__top { margin-bottom: var(--s4); }

/* Restrained on purpose. The countdown and the numbers do the shouting. */
.board__h {
  font-size: clamp(2rem, 5vw, 3rem);
  font-stretch: 125%;
  text-transform: uppercase;
  line-height: .95;
  margin: 0 0 var(--s2);
}

.board__lede { color: var(--mute); max-width: 58ch; margin: 0; line-height: 1.6; }

/* ------------------------------------------------------ tabs + search -- */

.board__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s2) var(--s3);
  margin: var(--s4) 0 0;
  border-bottom: 1px solid var(--line);
}

.tabs { display: flex; flex-wrap: wrap; gap: 0; }

.tab {
  all: unset;
  cursor: pointer;
  padding: 14px 16px 12px;
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mute);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  min-height: 24px;
}
.tab:hover { color: var(--bone); }
.tab[aria-selected="true"] { color: var(--bone); border-bottom-color: var(--ember); }
.tab:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }

/* Past seasons read as history, not as another live server. */
.tab--past { color: var(--faint, #6f6a62); }
.tab--past[aria-selected="true"] { color: var(--bone); }

/* Cash (2026-10-20) is a link to its own page, in ember like Quests so the
   members-only boards stand out. On the cash page the same row is links,
   with aria-current marking where you are. */
.tabs .tab.tab--cash { color: var(--ember); }
.tabs .tab.tab--cash:hover { color: var(--bone); }
.tab[aria-current="page"] { color: var(--bone); border-bottom-color: var(--ember); }
.tabs .tab.tab--cash[aria-current="page"] { color: var(--ember); }

/* Six tabs do not fit a phone on one row. A neat three by two grid keeps
   every board in sight, Cash included, where a sideways scroll would hide
   it off the edge (20 Oct). */
@media (max-width: 767px) {
  .board__bar .tabs, .board-nav.tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .board__bar .tab, .board-nav .tab {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 48px;
    padding: 10px 2px 8px;
    font-size: .75rem;
    letter-spacing: .04em;
    text-align: center;
  }
}

.board__find {
  flex: 0 1 280px;
  min-width: 200px;
  margin-bottom: var(--s2);
  background: var(--char);
  color: var(--bone);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
}
.board__find::placeholder { color: var(--mute); }
.board__find:focus { outline: none; border-color: var(--ember); }

/* ------------------------------------------------------- full table ---- */

.data--full th { padding: 0; }
.data--full th button {
  all: unset;
  cursor: pointer;
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-width: 44px;
  padding: 14px 10px;
  text-align: inherit;
}
.data--full th button:hover { color: var(--bone); }
.data--full th[aria-sort="descending"] button::after { content: " \2193"; color: var(--ember); }
.data--full th[aria-sort="ascending"] button::after { content: " \2191"; color: var(--ember); }

.data--full .masked { color: var(--mute); font-weight: 400; font-style: italic; }

.board__empty {
  padding: var(--s6) var(--s2) !important;
  text-align: left !important;
  color: var(--mute);
}

.board__foot { margin: var(--s3) 0 0; font-size: .875rem; color: var(--mute); }

/* Columns drop out as the screen narrows, the same order as Jaydon's page so
   anyone used to his board finds the same thing. */
@media (max-width: 899px) {
  .data--full .c-hs, .data--full .c-range, .data--full .c-hours, .data--full .c-matches { display: none; }
}
@media (max-width: 479px) {
  .data--full .c-deaths { display: none; }
  .tab { padding: 12px 12px 10px; }
  .board__find { flex-basis: 100%; }
}

/* ----------------------------------------------- partly members only -- */
/* Boards past their open rows (kills top 10, cash top 3). The locked rows are
   grey bars drawn from nothing (_lib/locked.js, js/board.js): no names or
   numbers reach a signed-out browser, the bars are decoration only. */

.lock-ph td { color: var(--faint); }
.lock-bar { display: inline-block; height: 12px; border-radius: 3px; background: var(--line); vertical-align: middle; filter: blur(2px); }
.lock-bar--v { width: 56px; max-width: 100%; }
.lock-ph .name .lock-bar { min-width: 80px; }

.lock-card {
  position: relative;
  margin-top: var(--s3);
  padding: var(--s5) var(--s4);
  background: var(--char);
  border: 1px solid var(--line);
  border-top-color: var(--ember); /* the canopy hairline, not a thick bar */
  text-align: center;
}
.lock-card__h { margin: 0; font-size: clamp(1.75rem, 3.6vw, 2.75rem); line-height: 1; }
.lock-card__p { margin: var(--s2) auto 0; max-width: 48ch; color: var(--mute); }
.lock-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s2) var(--s3);
  margin-top: var(--s4);
}
.lock-card__go { min-height: 48px; display: inline-flex; align-items: center; }
.lock-card__join { display: inline-block; padding: 12px 0; color: var(--ember); font-weight: 700; }
.lock-card__join:hover { color: var(--bone); }

/* The kills board: the card rides up over the fading placeholder rows. */
.board--locked .tablewrap { position: relative; }
.board--locked .tablewrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 240px;
  background: linear-gradient(rgba(19, 20, 19, 0), var(--ink));
  pointer-events: none;
}
.board--locked .lock-card { margin-top: calc(var(--s7) * -1); }
.board__hint { margin: 0 0 var(--s2); font-size: .875rem; color: var(--mute); }
.board__hint a { color: var(--ember); font-weight: 700; display: inline-block; padding: 13px 0; }

@media (max-width: 479px) {
  .lock-card { padding: var(--s4) var(--s2); }
  .lock-card__go { width: 100%; justify-content: center; }
  .board--locked .lock-card { margin-top: calc(var(--s6) * -1); }
}
