/* RATS — Rankings page. Logs-fed public leaderboards + hall of fame.
   theme.css gives the body reset, .wrap.wide, gold h2/.sub/scrollbar; ui.css gives button/.card/.pill/select.
   Only page-specific structure lives here — all colours through tokens. */

/* "how it works" collapsible — same look as the attendance page's explainer */
.explain {
  margin: 12px 0 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
}
.explain summary {
  cursor: pointer;
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  padding: 6px 0;
  list-style: none;
}
.explain summary::-webkit-details-marker {
  display: none;
}
.explain .exbody {
  color: #c4c7cc;
  font-size: 13px;
  line-height: 1.5;
  padding: 4px 0 10px;
}
.explain .exbody p {
  margin: 8px 0;
}
.explain .exbody ul {
  margin: 6px 0;
  padding-left: 18px;
}
.explain .exbody li {
  margin: 4px 0;
}
/* de-emphasized aside (the small print) */
.explain .exnote {
  font-size: 12px;
  color: var(--text-dim-2);
  margin: 8px 0 0;
}
.explain .exnote b {
  color: var(--text);
  font-weight: 600;
}

.explain .rules-src {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 11.5px;
}
.explain .rules-src a {
  color: var(--accent);
  text-decoration: none;
}
.explain .rules-src a:hover {
  text-decoration: underline;
}

/* visually-hidden label for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* section heading inside cards (theme.css h2 is the gold uppercase label) */
.ch {
  margin: 0 0 10px;
}

/* officer fetch error banner — persistent (unlike the 2.5s button label) so a failed Fetch is unmissable */
.msg.err:not(:empty) {
  color: #ff9b9b;
  background: #241a1a;
  border: 1px solid #5a2e2e;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  margin: 8px 0 0;
}

.msg.ok:not(:empty) {
  color: #b7e4b0;
  background: #19221a;
  border: 1px solid #2e4f30;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  margin: 8px 0 0;
}

/* fetch progress — slim gold bar + step/ETA line while the officer Fetch runs */
.fetchprog { margin: 8px 0 0; }
.fetchprog .fp-bar {
  height: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.fetchprog .fp-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.fetchprog .fp-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 3px;
}

/* sticky filter+tab bar — stays at the top so you can switch raid/size/period/tab while scrolled */
.sticky-controls {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding-top: 10px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  box-shadow: 0 6px 10px -6px rgba(0, 0, 0, 0.6);
}

/* top controls row + tab strip */
.ctrls {
  margin-top: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
}


.tabs { margin: 12px 0 0 }
.panel {
  margin-top: 14px;
}
.panel[hidden] {
  display: none;
}

/* board header: title on the left + DPS/HPS toggle, so the toggle isn't floating on its own line */
.board-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 6px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.board-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
}
/* metric + difficulty toggles: the site's segmented toggle (ui.css .segs), under their own
   class names because the page's script builds and flips them by .metricbar/.mbtn */
.metricbar {
  display: inline-flex; align-items: center; margin-left: auto; /* push to the far right of the board header */
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 2px;
}
/* [hidden] must win over display:inline-flex (e.g. #boardDiff is hidden on non-split raids like Ulduar) */
.metricbar[hidden] {
  display: none;
}
.mbtn {
  height: auto; padding: 5px 11px; border: 0; border-radius: 5px; background: transparent;
  color: var(--text-dim-2); font: 600 13px/1.3 var(--body, var(--font)); cursor: pointer; filter: none;
}
.mbtn:hover {
  color: var(--white);
  filter: none;
}
.mbtn.active {
  background: var(--surface); color: var(--accent-hi); box-shadow: inset 0 0 0 1px var(--line-warm, #3a3530);
}
.mbtn:focus { outline: none }
.mbtn:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px }
/* Guild-progress card: same framed board-head as the Leaderboards. The verdict + stat grid live inside
   it (in .proghead-body, below a divider); the per-boss table is a separate card below. */
.proghead {
  margin-bottom: 14px;
}
.proghead .board-head {
  margin-bottom: 0; /* the header's own border-bottom is the divider */
}
.proghead-body {
  padding: 14px 6px 6px;
}
/* inside the card the verdict banner is a plain inset panel, not a floating card */
.proghead-body .verdict {
  margin: 0 0 14px;
}
.proghead-body .gsum {
  margin: 0;
}
.proghead-body .compnote {
  margin: 12px 0 0;
}
/* Leaderboard board-head NM/HC toggle — sits right next to the DPS/HPS toggle (both grouped far right),
   separated by a thin divider. Only the DPS/HPS bar keeps margin-left:auto to push the whole group right. */
.board-head .boarddiff {
  margin-left: auto;
  margin-right: 10px;
}
/* when the diff bar is VISIBLE it pushes the group right, so the DPS/HPS bar drops its own auto-margin.
   (:not([hidden]) — on Ulduar the diff bar is hidden, so DPS/HPS keeps margin-left:auto and stays right) */
.board-head .boarddiff:not([hidden]) + .metricbar {
  margin-left: 0;
}
.card.board {
  padding: 8px 10px;
}

/* empty state — centred rats joke with a comfortable min-height so the page never collapses */
.emptyrat {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  text-align: center;
}
/* the [hidden] attribute must win over display:flex, or the 260px min-height leaves a blank gap */
.emptyrat[hidden] {
  display: none;
}
.emptyrat-in {
  max-width: 420px;
  padding: 20px;
}
.emptyrat-emoji {
  font-size: 46px;
  line-height: 1;
  margin-bottom: 12px;
  filter: grayscale(0.2);
  opacity: 0.9;
}
.emptyrat-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.emptyrat-joke {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---- Fun & Shame: compact award cards ---- */
/* intro line + Normal/Heroic toggle share one row (text left, toggle right) */
.funhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}
.funhead .sub {
  flex: 1;
}
.funhead #funDiff {
  flex: none;
}
.funcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  align-items: stretch; /* every card in a row is the same height */
}
.funcard {
  --fc-hue: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 13px 14px 13px 16px;
  overflow: hidden;
}
/* subtle: just a thin coloured spine on the left edge — no glow, no wash */
.funcard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--fc-hue);
  opacity: 0.7;
}
.funcard.shame {
  background: var(--surface-2);
  border-color: var(--border);
}
.fc-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.fc-emoji {
  font-size: 19px;
  line-height: 1;
}
.fc-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-dim);
}
.fc-name,
.fc-sub {
  position: relative;
}
.fc-name {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 3px;
}
.fc-sub {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
  min-height: 2.8em; /* reserve ~2 lines so 1-line and 2-line cards match height */
}
.fc-sub b {
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.lb {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lb li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px; /* same horizontal padding as podium rows so rank numbers line up */
  border-bottom: 1px solid #232529;
}
/* podium rows sit in a medal-tinted framed box */
.lb li.r1,
.lb li.r2,
.lb li.r3 {
  border: 1px solid;
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  margin-bottom: 6px;
}
.lb li.r1 {
  padding: 13px 12px;
  border-color: rgba(246, 196, 82, 0.55);
  background: linear-gradient(90deg, rgba(246, 196, 82, 0.09), transparent 70%);
}
.lb li.r2 {
  padding: 11px 12px;
  border-color: rgba(207, 214, 222, 0.4);
  background: linear-gradient(90deg, rgba(207, 214, 222, 0.06), transparent 70%);
}
.lb li.r3 {
  border-color: rgba(214, 138, 82, 0.42);
  background: linear-gradient(90deg, rgba(214, 138, 82, 0.06), transparent 70%);
}
.lb li:last-child {
  border-bottom: 0;
}
.rank {
  width: 22px;
  text-align: center;
  font-weight: 800;
  color: #6e7178;
  flex: 0 0 auto;
}
.cic {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex: 0 0 auto;
}
.lb li.r1 .cic {
  width: 32px;
  height: 32px;
}
.lb li.r2 .cic {
  width: 28px;
  height: 28px;
}
.lb li.r3 .cic {
  width: 26px;
  height: 26px;
}
.mv {
  font-size: 13px;
  font-weight: 800;
  /* Fixed column so ▲/▼/NEW/👑 all line up vertically AND every bar starts at the same x.
     It is ALWAYS rendered — empty on All time (no previous period) — because dropping the
     element there shifted the whole row left. Wide enough for the 👑2x streak pill. */
  width: 52px;
  text-align: center;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mv.up {
  color: var(--ok);
}
.mv.down {
  color: #ff9b9b;
}
.mv.same {
  color: #8a8d93;
  font-size: 14px;
}
/* 👑 streak pill — consecutive weeks at #1. The rarest badge on the board, so it reads big.
   Lives in the .mv column (never the name column, where it used to clip the name). */
.crownmv {
  color: var(--accent-hi);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  letter-spacing: -0.5px; /* pull the "2x" tight against the crown glyph */
}
/* the crown glyph itself: emoji sit on a lower baseline than text, so lift it to
   optically center against the "2x" beside it */
.crownmv .cr {
  font-style: normal;
  display: inline-block;
  position: relative;
  top: -2px;
  margin-right: 1px;
}
.mv.new {
  color: #1b1d21;
  background: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.4;
}
/* WIDE board: name gets real room (no truncation), bar fills, big legible value column */
/* Name column. Fixed width so every bar starts at the same x on EVERY period.
   Holds the name only — the 👑 streak pill sits in the .mv column instead, so it can never eat
   into the name's width (that clipped "Pamevoid" -> "Pamev..."). Sized for the longest roster
   name (12 chars, e.g. "Mortisritual") at the podium's 15px bold, with a little headroom. */
.pnamecol {
  flex: 0 0 125px;
  width: 125px;
  display: flex;
  align-items: center;
  min-width: 0;
}
/* the name link may shrink/ellipsise only as a last resort */
.pnamecol > a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.streak {
  font-size: 13px;
  color: var(--accent-hi);
  font-weight: 800;
  margin-left: 6px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.pname {
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* value column: fixed width, right-aligned, big numbers */
/* Value column. Fixed width so every row's numbers line up. Sized to the widest realistic subtitle
   ("100.0 pts · 47.9M total · ×29 · --.-% srv" ≈ 211px) plus the 16px padding — no more, because
   every pixel here is taken straight off the bar in the middle. */
.pval {
  flex: 0 0 215px;
  width: 215px;
  text-align: right;
  line-height: 1.15;
  padding-left: 8px;
}
.pval .prate {
  display: block;
  font-weight: 800;
  font-size: 22px; /* big and legible on any screen */
  color: var(--accent); /* gold for DPS */
  font-variant-numeric: tabular-nums;
}
.pval .prate .unit {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.6;
  letter-spacing: 0.3px;
}
/* subtitle: keep all 3 facts but small + dim so they don't fight the DPS */
.pval .psub {
  display: block;
  font-weight: 500;
  font-size: 10.5px;
  color: var(--text-faint);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* belt-and-braces: never let the subtitle push out of the card */
}
/* the SCORE — the number the board is sorted by, so it gets the accent (the big dps/hps number is
   only one ingredient of it; without this the ordering looks arbitrary) */
.pval .pscore {
  color: var(--accent);
  font-weight: 700;
}
.pval .ptot {
  color: var(--text-dim);
  font-weight: 600;
}
.pval .psrv {
  color: #9a7fe0; /* server percentile — muted purple, subtle */
  font-weight: 600;
}
.pval .psrv.none {
  color: var(--text-faint); /* placeholder (no server parse yet) — dimmed so it reads as absent */
  font-weight: 500;
}
/* HEALING: the rate is green (it's healing, not damage) */
.lb li.hps .prate {
  color: #6bd18a;
}

/* ---- podium sizing: #1 biggest → rest readable (base rate is 22px) ---- */
.lb li.r1 .prate {
  font-size: 30px;
}
.lb li.r1 .pname {
  font-size: 19px;
}
.lb li.r1 .rank {
  font-size: 22px;
}
.lb li.r2 .prate {
  font-size: 26px;
}
.lb li.r2 .pname {
  font-size: 17px;
}
.lb li.r3 .prate {
  font-size: 24px;
}
.lb li.r3 .pname {
  font-size: 16px;
}
/* rows 4+ use the base sizes (22px rate, 15px name) — no shrink needed on a wide board */
/* medal-tinted rank numbers */
.rank.g {
  color: #f6c452;
  text-shadow: 0 0 8px rgba(246, 196, 82, 0.35);
}
.rank.s {
  color: #cfd6de;
}
.rank.b {
  color: #d68a52;
}
.pbar {
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
  flex: 1 1 auto; /* fill the middle between name and value columns */
  min-width: 60px;
}
/* podium bars only a hair taller */
.lb li.r1 .pbar {
  height: 7px;
}
.lb li.r2 .pbar {
  height: 6px;
}
.lb li.r3 .pbar {
  height: 6px;
}
.pbar > i {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease-out; /* smooth slide when switching filters */
}
/* section subtitle under a card heading (explains what the % compares) */
.secsub {
  margin: -4px 0 10px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.secmetric {
  color: var(--accent);
  font-weight: 700;
}
.secsub b {
  color: var(--text);
}
/* ---- secondary stats zone: lighter, smaller cards below the hero leaderboard ---- */
.secondary {
  margin-top: 26px;
}
.sec-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.sec-divider::before,
.sec-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}
.sec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  .sec-grid {
    grid-template-columns: 1fr;
  }
}
/* secondary cards read as supporting detail: darker, tighter, smaller type */
.sec-card {
  background: var(--surface);
  min-width: 0;
}
.sec-card .ch {
  font-size: 12px;
}
.sec-card .mvrow {
  padding: 7px 4px;
  gap: 8px;
}
.sec-card .mvrow .cic {
  width: 24px;
  height: 24px;
}
.sec-card .mvname {
  font-size: 13.5px;
}
.sec-card .prate {
  font-size: 15px;
}
.sec-card .mvpct {
  font-size: 13px;
  flex-basis: 46px;
}
/* records podium flare is toned down inside the smaller card */
.sec-card .mvrow.rec.r1 .prate {
  font-size: 19px;
}
.sec-card .mvrow.rec.r2 .prate,
.sec-card .mvrow.rec.r3 .prate {
  font-size: 16px;
}

/* Most improved / Needs work rows — arrow · spec icon · name+sub · % */
.mvrow {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 8px;
  border-bottom: 1px solid #232529;
}
.mvrow:last-child {
  border-bottom: 0;
}
.mvrow .mv {
  width: 22px;
  font-size: 14px;
}
.mvrow .cic {
  width: 30px;
  height: 30px;
}
/* leaderboard-style row: ▲ · icon · name (fills) · rich value column · % chip */
.mvname {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mvrow .pval {
  flex: 0 0 auto;
  width: auto;
  padding-left: 10px;
}
.mvpct {
  flex: 0 0 54px;
  text-align: right;
  font-weight: 800;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.mvpct.up {
  color: var(--ok);
}
.mvpct.down {
  color: #ff9b9b;
}
.mvpct.dim {
  color: var(--text-faint);
  font-weight: 600;
  font-size: 11px;
}
.mvempty {
  border: 0;
  color: #6e7178;
  padding: 10px 4px;
  font-size: 12px;
}
/* Records: medal + name + boss context */
.recmedal {
  width: 26px;
  text-align: center;
  font-size: 17px;
  flex: 0 0 auto;
}
/* record row: medal · icon · name · boss (right after the name) · value pinned right */
.recname {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recboss {
  flex: 1 1 auto; /* takes the slack so the value stays pinned right */
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recboss::before {
  content: "· ";
}
.mvrow.rec .pval {
  flex: 0 0 auto;
  padding-left: 12px;
  text-align: right;
}
/* podium flare on the top-3 records — medal-framed boxes like the leaderboard */
.mvrow.rec.r1,
.mvrow.rec.r2,
.mvrow.rec.r3 {
  border: 1px solid;
  border-radius: var(--radius-lg);
  margin-bottom: 6px;
}
.mvrow.rec.r1 {
  border-color: rgba(246, 196, 82, 0.55);
  background: linear-gradient(90deg, rgba(246, 196, 82, 0.1), transparent 70%);
}
.mvrow.rec.r1 .prate {
  font-size: 26px;
}
.mvrow.rec.r1 .recmedal {
  font-size: 22px;
}
.mvrow.rec.r2 {
  border-color: rgba(207, 214, 222, 0.4);
  background: linear-gradient(90deg, rgba(207, 214, 222, 0.07), transparent 70%);
}
.mvrow.rec.r2 .prate {
  font-size: 23px;
}
.mvrow.rec.r3 {
  border-color: rgba(214, 138, 82, 0.42);
  background: linear-gradient(90deg, rgba(214, 138, 82, 0.07), transparent 70%);
}
.mvrow.rec.r3 .prate {
  font-size: 21px;
}
.mv.flat {
  color: #5e6166;
}

/* ---- guild progress: per-boss table ---- */
.progtbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.progtbl th {
  text-align: left;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-2);
}
.progtbl td {
  padding: 10px 12px;
  border-bottom: 1px solid #232529;
}
.progtbl tr:last-child td {
  border-bottom: 0;
}
.progtbl tr:hover td {
  background: var(--surface);
}
.progtbl .bn {
  font-weight: 700;
  color: #cfd2d6;
}
.progtbl .num {
  font-variant-numeric: tabular-nums;
  color: #cfd2d6;
  font-weight: 700;
  white-space: nowrap;
}
.progtbl .better {
  color: var(--ok);
  font-weight: 600;
}
.progtbl .rec {
  color: var(--accent-hi);
  font-weight: 700;
  white-space: nowrap;
}
.progtbl .d {
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.progtbl tr.nokill .bn {
  color: #c98b8b;
}
.nokilltag {
  color: #ff9b9b;
  font-weight: 700;
}
.hctag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--accent-hi);
  background: linear-gradient(120deg, #2a2110, var(--surface));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: 1px;
  white-space: nowrap;
}
.nmtag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: 1px;
}
.leg {
  color: var(--text-faint);
  font-size: 11.5px;
  margin: 10px 2px 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.leg b {
  color: #cfd2d6;
  font-weight: 700;
}

.progtbl .best {
  color: var(--accent-hi);
}
.firstkill {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
}
.gs .of {
  font-size: 14px;
  color: #6e7178;
  font-weight: 700;
}

/* week-vs-week verdict + summary cards */
.verdict {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-xl);
  padding: 13px 16px;
  margin: 0 0 14px;
  font-weight: 700;
  font-size: 14.5px;
  border: 1px solid;
}
.verdict .em {
  font-size: 24px;
  flex: 0 0 auto;
}
.verdict .sub2 {
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 1px;
}
.verdict.good {
  background: linear-gradient(120deg, #16291c, var(--surface-2));
  border-color: #3a5b42;
  color: #a9e8ba;
}
.verdict.bad {
  background: linear-gradient(120deg, #2a1818, var(--surface-2));
  border-color: #5b3a3a;
  color: #f0b6b6;
}
.verdict.flat {
  background: var(--surface-2);
  border-color: var(--border);
  color: #cfd2d6;
}
.gsum {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.gs {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 12px 14px;
}
.gs .lbl {
  color: var(--text-dim);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 800;
}
.gs .v {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.gs .d {
  font-size: 12px;
  font-weight: 700;
  margin-top: 3px;
}
.d.good {
  color: var(--ok);
}
.d.bad {
  color: #ff9b9b;
}
.d.flat {
  color: #6e7178;
}
.compnote {
  color: var(--text-faint);
  font-size: 11.5px;
  margin: 0 0 14px;
}

/* logs list */
/* Logs tab — compact accordion grouped by WoW lockout (merges multi-log runs) */
#logs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lockgrp {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}
.lockhd {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 7px 12px;
  color: #cfd2d6;
  font: inherit;
}
.lockhd:hover {
  background: var(--surface);
}
.lcaret {
  color: var(--accent);
  font-size: 9px;
  transition: transform 0.15s;
  flex: 0 0 auto;
}
.lockgrp.open .lcaret {
  transform: rotate(90deg);
}
.lockhd .lraid {
  font-weight: 700;
  color: var(--text);
  min-width: 58px;
  font-size: 13px;
}
.lockhd .llock {
  color: var(--text-dim);
  font-size: 12px;
}
.lockhd .lmeta {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 11.5px;
  flex: 0 0 auto;
}
.lmerge {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent);
  border: 1px solid #5a4a1f;
  background: #2a2616;
  border-radius: var(--radius);
  padding: 1px 7px;
  flex: 0 0 auto;
}
.ldup {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface-3);
  border-radius: var(--radius);
  padding: 1px 7px;
  flex: 0 0 auto;
}
.lockbody {
  display: none;
  border-top: 1px solid var(--border);
  padding: 2px 10px 4px;
}
.lockgrp.open .lockbody {
  display: block;
}
.logsum {
  color: var(--accent);
  font-size: 11.5px;
  line-height: 1.4;
  padding: 6px 4px;
  border-bottom: 1px dashed #5a4a1f;
  margin-bottom: 2px;
}
a.logrow {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
  color: #cfd2d6;
  flex-wrap: wrap;
  row-gap: 2px;
}
a.logrow:last-child {
  border-bottom: 0;
}
a.logrow:hover {
  color: var(--text);
}
a.logrow .lid {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  min-width: 56px;
}
a.logrow .ldate {
  color: var(--text-dim);
  font-size: 12px;
  min-width: 84px;
}
a.logrow .lkw {
  color: var(--text-dim);
  font-size: 11.5px;
}
a.logrow .lkw b {
  color: var(--ok);
}
a.logrow .lbosses {
  color: var(--text-dim-2);
  font-size: 11.5px;
  flex: 1 1 100%;
  padding-left: 56px;
  line-height: 1.35;
}
a.logrow .lgo {
  color: var(--accent);
  font-weight: 800;
  margin-left: auto;
  flex: 0 0 auto;
}
.logrowwrap {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.logrowwrap:last-child {
  border-bottom: 0;
}
.logrowwrap a.logrow {
  flex: 1 1 auto;
  border-bottom: 0;
}

/* ---------- site makeover (assets/css/site.css) ---------- */
/* the controls stick just under the shared bar, not under the top of the window */
.sticky-controls { top: var(--bar-h) }

/* ---------- boards: podium for the top three + a grid of compact cards ---------- */
.boardlist { padding: 4px 2px 2px }

/* podium: 2nd · 1st · 3rd, the winner taller in the middle. Each card is the raider's banner art,
   tinted to their class colour (--cc) at the bottom where the numbers sit. */
.podium {
  display: grid; grid-template-columns: 1fr 1.18fr 1fr; gap: 14px;
  align-items: end; margin-bottom: 16px;
}
.podium.n1 { grid-template-columns: minmax(0, 420px); justify-content: center }
.podium.n2 { grid-template-columns: 1fr 1.18fr }
.pod {
  position: relative; overflow: hidden; display: flex; align-items: flex-end;
  min-height: 210px; border-radius: var(--radius-lg);
  border: 1px solid var(--line-warm); text-decoration: none; color: inherit;
  background: radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--cc) 35%, #16171a), #121316 75%);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.pod.first { min-height: 260px; border-color: var(--accent); box-shadow: 0 0 0 1px rgba(192, 148, 58, .35), 0 20px 50px -24px rgba(192, 148, 58, .45) }
.pod:hover { transform: translateY(-3px); border-color: var(--cc) }
.pd-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 70% 20%;
  transition: transform .4s;
}
.pod:hover .pd-art { transform: scale(1.03) }
.pod::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(12, 12, 14, .96) 12%, rgba(12, 12, 14, .55) 45%, rgba(12, 12, 14, 0) 80%);
}
.pd-rank {
  position: absolute; z-index: 1; top: 12px; left: 12px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--body); font-weight: 800; font-size: 17px; color: #16120a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
}
.pod.first .pd-rank { width: 46px; height: 46px; font-size: 21px; background: linear-gradient(135deg, #f5d98a, #c0943a) }
.pod.second .pd-rank { background: linear-gradient(135deg, #eef1f4, #9aa3ad) }
.pod.third .pd-rank { background: linear-gradient(135deg, #e7b98a, #9a5f34) }
.pd-move { position: absolute; z-index: 1; top: 16px; right: 12px }
.pd-body { position: relative; z-index: 1; width: 100%; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px }
.pd-id { display: flex; align-items: center; gap: 9px }
.pd-id .cic { width: 28px; height: 28px; border-radius: 6px; margin: 0 }
.pd-name { font-weight: 800; font-size: 20px; color: var(--cc); text-shadow: 0 1px 8px rgba(0, 0, 0, .8) }
.pod.first .pd-name { font-size: 24px }
.pd-rate { font-weight: 800; font-size: 30px; line-height: 1.05; color: var(--accent-hi); font-variant-numeric: tabular-nums }
.pod.first .pd-rate { font-size: 38px }
.pd-rate small, .gc-val small { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--text-dim-2); margin-left: 2px }
.pd-sub { font-size: 12px; color: var(--text-dim) }

/* everyone after the podium */
.lbgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px }
.gc {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 26px 30px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 11px 12px 13px; border-radius: var(--radius-lg);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color .15s;
}
.gc:hover { border-color: var(--cc) }
.gc-rank { font-weight: 800; font-size: 15px; color: var(--text-dim-2); text-align: center; font-variant-numeric: tabular-nums }
.gc .cic { width: 30px; height: 30px; border-radius: 6px; margin: 0 }
.gc-id { display: flex; flex-direction: column; min-width: 0 }
.gc-name { font-weight: 700; font-size: 15px; color: var(--cc); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.gc-name:hover { text-decoration: underline }
.gc-sub { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.gc-val { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; justify-content: flex-end; text-align: right }
.gc-val b { font-weight: 800; font-size: 18px; color: var(--accent-hi); font-variant-numeric: tabular-nums }
.gc-val .mv { margin-left: 4px }
/* how close to the top: a thin class-colour line along the bottom edge */
.gc-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--cc); opacity: .75; border-radius: 0 3px 0 0 }

.pts { color: var(--accent); font-weight: 700 }
.srv { color: #b18cff }
.srv.none { color: var(--text-faint) }

@media (max-width: 1000px) { .lbgrid { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 680px) {
  .podium, .podium.n2 { grid-template-columns: minmax(0, 1fr) }
  .pod.first { order: -1 }
  .pod, .pod.first { min-height: 170px }
  .lbgrid { grid-template-columns: minmax(0, 1fr) }
}
@media (max-width: 680px) { .board-head { flex-wrap: wrap; row-gap: 8px } }

/* ---------- trends & records: compact lists, same feel as the board cards ---------- */
.sec-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) }
.sec-card[hidden] { display: none }
.sec-card .ch {
  font-family: var(--display); font-weight: 400; font-size: 21px;
  text-transform: none; letter-spacing: 0; color: var(--heading);
}
/* every row the same size: the podium above already does the "top three" moment */
.sec-card .lb li,
.sec-card .lb li.r1,
.sec-card .lb li.r2,
.sec-card .lb li.r3 {
  padding: 8px 6px; margin: 0; min-height: 0;
  border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
  background: none; box-shadow: none;
}
.sec-card .lb li:last-child { border-bottom: 0 }
.sec-card .lb li .cic { width: 26px; height: 26px }
.sec-card .lb li .pname { font-size: 14.5px }
.sec-card .lb li .prate { font-size: 16px }
.sec-card .lb li.r1 .pname, .sec-card .lb li.r1 .prate { font-size: 16px }
.recmedal { width: 24px; text-align: center; font-weight: 800; color: var(--text-dim-2); font-variant-numeric: tabular-nums }

/* the parse must never be the part that gets cut: the sub line may wrap */
.gc-sub { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35 }

/* ---------- card titles: the display face, like the trends & records cards ---------- */
.board-title {
  font-family: var(--display); font-weight: 400; font-size: 21px;
  text-transform: none; letter-spacing: 0; color: var(--heading);
}

/* ---------- guild progress ---------- */
.progtbl th:nth-child(1) { width: 38% }
.progtbl th:nth-child(2), .progtbl th:nth-child(3) { width: 22% }
.progtbl .num, .progtbl .d { font-variant-numeric: tabular-nums }
.newkill {
  display: inline-block; margin-left: 8px; vertical-align: 1px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .3px; white-space: nowrap;
  color: var(--ok); background: rgba(87, 217, 119, .1);
  border: 1px solid rgba(87, 217, 119, .35); border-radius: 999px; padding: 1px 8px;
}

/* ---------- fun & shame: a hall of fame, then a hall of shame ---------- */
.funsec {
  margin: 4px 0 12px; font-family: var(--display); font-weight: 400; font-size: 24px;
  color: var(--heading); display: flex; align-items: center; gap: 12px;
  text-transform: none; letter-spacing: 0;
}
.funsec::after { content: ""; flex: 1; height: 1px; background: var(--line-warm) }
.funsec.shame { margin-top: 28px; color: #e0a0a0 }
.funsec.shame::after { background: rgba(192, 86, 86, .35) }
.funsec[hidden], .funcards[hidden] { display: none }
.funcard { min-height: 112px }
.funcard.shame { border-color: rgba(192, 86, 86, .28) }
.funcard:hover { border-color: var(--fc-hue) }
/* the winner's banner sits on the right and fades out under the text */
.fc-art {
  position: absolute; top: 0; right: 0; bottom: 0; width: 62%; height: 100%;
  object-fit: cover; object-position: 70% 20%; opacity: .55;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 70%);
  mask-image: linear-gradient(90deg, transparent 0, #000 70%);
  transition: opacity .2s;
}
.funcard:hover .fc-art { opacity: .8 }
.funcard.shame .fc-art { filter: saturate(.6) }
.fc-top, .fc-name, .fc-sub { z-index: 1 }
.fc-title {
  font-family: var(--display); font-weight: 400; font-size: 15px;
  text-transform: none; letter-spacing: .2px; color: var(--heading);
}
.funcard.shame .fc-title { color: #e0a0a0 }
.fc-name { text-shadow: 0 1px 8px rgba(0, 0, 0, .85) }
.funcard.has-art .fc-sub { max-width: 78%; text-shadow: 0 1px 6px rgba(0, 0, 0, .9) }

/* ---------- logs: one card per lockout, one row per upload ---------- */
#logs { gap: 12px }
.lockgrp { border-radius: var(--radius-lg); border-color: var(--line-warm) }
.lockhd { padding: 12px 16px; gap: 12px; height: auto }
.lockhd .lraid { font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--heading) }
.lockhd .llock { font-size: 13px }
.lockhd .lmeta { font-size: 12.5px }
.lockbody { padding: 4px 16px 8px }
a.logrow {
  display: grid; grid-template-columns: 130px 170px minmax(0, 1fr) auto;
  align-items: center; gap: 16px; padding: 12px 0;
}
.lwhen { display: flex; flex-direction: column; gap: 2px }
a.logrow .ldate { font-size: 14px; font-weight: 700; color: var(--text); min-width: 0 }
a.logrow .lid { font-size: 11.5px; color: var(--text-faint); min-width: 0 }
a.logrow .lkw { display: flex; gap: 14px; font-size: 12px; color: var(--text-dim) }
a.logrow .lkw b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; margin-right: 3px }
a.logrow .lk b { color: var(--ok) }
a.logrow .lw b { color: #ff9b9b }
a.logrow .lbosses { display: flex; flex-wrap: wrap; gap: 5px; padding: 0; flex: none }
.lchip {
  font-size: 11.5px; font-weight: 600; color: #cfd2d6; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px;
}
a.logrow .lgo {
  font-size: 12px; font-weight: 700; white-space: nowrap; margin: 0;
  border: 1px solid var(--line-warm); border-radius: var(--radius); padding: 6px 11px;
  transition: background .15s, color .15s;
}
a.logrow:hover .lgo { background: var(--accent); color: #16120a }

@media (max-width: 900px) {
  a.logrow { grid-template-columns: 1fr auto; row-gap: 10px }
  a.logrow .lbosses { grid-column: 1 / -1; grid-row: 3 }
  a.logrow .lgo { grid-column: 2; grid-row: 1 }
}
@media (max-width: 680px) {
  .funsec { font-size: 21px }
  .progtbl th, .progtbl td { padding-left: 8px; padding-right: 8px }
  .lockhd { flex-wrap: wrap; row-gap: 4px }
  .lockhd .lmeta { margin-left: 0; flex-basis: 100%; padding-left: 21px }
  .funcard { min-height: 96px }
}

/* a group award: the winners' class icons in an overlapping row */
.fc-crew { position: relative; z-index: 1; display: flex; align-items: center; margin-top: 6px; padding-left: 4px }
.fc-crew img {
  width: 24px; height: 24px; border-radius: 50%; margin-left: -4px;
  border: 2px solid var(--surface-2); box-shadow: 0 0 0 1px var(--cc);
}
.fc-more { margin-left: 6px; font-size: 11.5px; font-weight: 700; color: var(--text-dim) }

/* award grid, fluid: up to four per row, a card never narrower than 240px (fewer columns instead),
   and the card text scales with the screen between a phone and a very wide monitor */
.funcards { grid-template-columns: repeat(auto-fill, minmax(max(240px, calc((100% - 36px) / 4)), 1fr)) }
.funcard { min-height: clamp(104px, 5vw + 40px, 150px); padding: clamp(13px, .6vw, 18px) clamp(14px, .7vw, 20px) clamp(13px, .6vw, 18px) clamp(16px, .8vw, 22px) }
.fc-emoji { font-size: clamp(19px, .5vw + 12px, 24px) }
.fc-title { font-size: clamp(15px, .3vw + 11px, 18px) }
.fc-name { font-size: clamp(17px, .4vw + 11px, 22px) }
.fc-sub { font-size: clamp(12px, .15vw + 10px, 14px) }
.fc-crew img { width: clamp(24px, .5vw + 17px, 30px); height: clamp(24px, .5vw + 17px, 30px) }

/* the banner is framed on the dragon: its head and the fire sit in the top quarter of the art,
   which the shared centre-35% framing cut off */
.band img { object-position: center 8% }
