/* ==========================================================================
   Drop Bears — leaderboard
   Matched to stats.dropbears.gg, which is the brand being carried across the
   site. Restraint is the point: no card chrome, no gradients, no tints. Type
   on a dark field with hairline separators, and orange in exactly three
   places: the rule above the header, the active sort, the top three ranks.
   ========================================================================== */

.tablewrap {
  overflow-x: auto;
  border: 0;
  border-top: 2px solid var(--ember);
}

table.data {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

table.data th {
  background: none;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  text-align: right;
  padding: var(--s2);
  white-space: nowrap;
}
table.data th:first-child,
table.data th.l,
table.data td:first-child,
table.data td.l { text-align: left; }

table.data td {
  padding: var(--s2);
  text-align: right;
  border-bottom: 1px solid var(--line);
  font-family: var(--body);
  font-size: .9375rem;
  font-weight: 400;
  color: var(--bone);
  background: none;
}

table.data tbody tr:hover td { background: rgba(255, 255, 255, .03); }

/* rank: orange for the top three, muted for everyone else */
table.data .rank {
  width: 48px;
  font-family: var(--body);
  font-size: .9375rem;
  font-weight: 700;
  color: var(--mute);
}
table.data tr.top .rank { color: var(--ember); }

/* the name and the headline stat carry the weight, nothing else does */
table.data td.name { font-weight: 600; color: var(--bone); font-size: .9375rem; }
table.data td[data-l="Kills"] { font-weight: 700; }
table.data tr.top td { background: none; }

table.data th button[data-sort] {
  background: none; border: 0; padding: 0;
  font: inherit; color: inherit; cursor: pointer;
}
table.data th button[data-sort]:hover { color: var(--bone); }

/* ---------------------------------------------------------- find a player -- */

.finder {
  display: flex; align-items: center; gap: var(--s3);
  margin-bottom: var(--s4); flex-wrap: wrap;
}
.finder input {
  flex: 1 1 260px;
  min-height: 46px;
  padding: 0 var(--s3);
  background: var(--char);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--bone);
  font-family: var(--body);
  font-size: .9375rem;
}
.finder input::placeholder { color: var(--faint); }
.finder input:focus { outline: none; border-color: var(--ember); }
.finder__meta { color: var(--mute); font-size: .875rem; margin-left: auto; }

.finder__none { padding: var(--s5) 0; color: var(--mute); border-bottom: 1px solid var(--line); }

/* ------------------------------------------------------------------ lede -- */

.board__lede { color: var(--mute); font-size: 1.0625rem; line-height: 1.5; max-width: 62ch; }
.board__lede b { color: var(--bone); font-weight: 700; }

/* ----------------------------------------------------------------- phone -- */
/* His page keeps a real table on a phone and it reads fine, so the card
   treatment is gone. Two columns just drop out. */

@media (max-width: 719px) {
  table.data .hide-s { display: none; }
  table.data th, table.data td { padding: 14px 6px; font-size: .875rem; }
  table.data .rank { width: 26px; }
  table.data td.name { max-width: 148px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .finder__meta { margin-left: 0; width: 100%; }
}

/* ---------------------------------------------------- rules, left to right -- */
/* Joel: the vertical 01-06 column read as AI filler. These are six separate
   rules, not a sequence, so they sit as a grid. */

.rulegrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
@media (min-width: 640px)  { .rulegrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .rulegrid { grid-template-columns: repeat(3, 1fr); } }

.rulecard { background: var(--char); padding: var(--s4); }
@media (min-width: 900px) { .rulecard { padding: var(--s5) var(--s4); } }
.rulecard h3 { font-size: 1.0625rem; line-height: 1.25; }
.rulecard p { margin: var(--s2) 0 0; color: var(--mute); font-size: .9375rem; line-height: 1.55; }

/* enforcement tiers read better as a row than as four big numerals */
.facts { border-radius: 6px; overflow: hidden; }
.fact__n { font-size: clamp(1.75rem, 4vw, 2.5rem); font-stretch: 100%; }

/* --------------------------------------------------- kills bar (his device) -- */
/* A translucent orange bar behind the kills figure, scaled against the top
   player. Lifted from stats.dropbears.gg: left 10px, 22px tall, 2px radius,
   rgba(240,98,26,.38), and the number sits above it. */

table.data td.kills { position: relative; text-align: right; width: 210px; --gap: 110px; }
table.data td.kills .bar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
  border-radius: 2px;
  background: rgba(240, 98, 26, .38);
  pointer-events: none;
  /* same maths as his page, but the track adapts to the column width */
  width: calc((100% - var(--gap)) * var(--pct, 0) / 100);
}
table.data tr.top td.kills .bar { background: rgba(240, 98, 26, .55); }
table.data td.kills span { position: relative; font-weight: 700; }

@media (max-width: 719px) {
  table.data td.kills { width: 104px; --gap: 56px; }
  table.data td.kills .bar { left: 0; height: 20px; }
}

/* ------------------------------------------------------- community cards -- */

.rulecard--link { display: flex; flex-direction: column; }
.rulecard__cta { margin-top: auto; padding-top: var(--s3); }

/* ------------------------------------------------------- server tabs ----- */
/* One board per server plus a combined one. Matches his page: plain text
   tabs on a rule, the active one underlined in orange. */

.tabs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin: 0 0 var(--s2);
  border-bottom: 1px solid var(--line);
}
.tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px var(--s3);
  min-height: 44px;
  font-family: var(--body);
  font-size: .875rem;
  font-weight: 600;
  color: var(--mute);
  cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.tab:hover { color: var(--bone); }
.tab[aria-selected="true"] { color: var(--bone); border-bottom-color: var(--ember); }

.board__name {
  margin: 0 0 var(--s4);
  color: var(--mute);
  font-size: .875rem;
  min-height: 1.4em;
}
