/* Anichess Streamers League S10 — round-robin scoreboard.
   Scoped to .sl-* so it cannot collide with style.css (leaderboard),
   circuit.css (.c-*) or sc-hero.css (.sc-*). Uses the brand tokens
   from style.css :root. */

.sl-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px 48px; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.sl-hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(120% 140% at 12% -10%, rgba(0, 174, 250, .16), transparent 55%),
    radial-gradient(120% 140% at 95% 0%, rgba(0, 255, 251, .12), transparent 50%),
    var(--bg-card);
  margin-bottom: 26px;
}
.sl-hero-in { max-width: 1080px; margin: 0 auto; padding: 32px 20px 28px; }
.sl-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cyan);
}
.sl-eyebrow::before {
  content: ""; width: 22px; height: 2px;
  background: var(--grad-brand); border-radius: 2px;
}
.sl-title {
  font-size: clamp(1.9rem, 5.4vw, 3.1rem); line-height: 1.04;
  font-weight: 800; margin: 10px 0 8px;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.sl-tagline { color: var(--text-2); font-size: clamp(.95rem, 2vw, 1.1rem); margin: 0 0 18px; max-width: 60ch; }
.sl-facts { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.sl-fact {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .84rem; font-weight: 700; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 14px;
}
.sl-fact b { color: var(--cyan); font-weight: 800; }
.sl-fact .sl-gold { color: var(--gold); }
.sl-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.sl-btn {
  font-weight: 800; font-size: .92rem; padding: 11px 20px;
  border-radius: 10px; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .12s ease;
}
.sl-btn:hover { transform: translateY(-1px); }
.sl-btn-primary { background: var(--grad-brand); color: #04233a; }
.sl-btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-light); }

/* Status pill: scheduled / live / complete */
.sl-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  border-radius: 999px; padding: 6px 13px; margin-bottom: 4px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
}
.sl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.sl-status--live { border-color: rgba(18, 224, 230, .45); color: var(--green); }
.sl-status--live .sl-dot { background: var(--green); animation: sl-pulse 2s infinite; }
.sl-status--complete { border-color: rgba(237, 199, 41, .45); color: var(--gold); }
.sl-status--complete .sl-dot { background: var(--gold); }
@keyframes sl-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(18, 224, 230, .6); }
  70%  { box-shadow: 0 0 0 7px rgba(18, 224, 230, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 224, 230, 0); }
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.sl-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin: 0 0 20px;
}
.sl-card-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: flex-start; justify-content: space-between; margin-bottom: 14px;
}
.sl-h2 { font-size: 1.28rem; font-weight: 800; margin: 0 0 5px; color: var(--text); }
.sl-h3 {
  font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-2); font-weight: 700; margin: 22px 0 11px;
}
.sl-sub { font-size: .88rem; color: var(--text-2); line-height: 1.5; }
.sl-note { font-size: .82rem; color: var(--text-2); margin-top: 13px; line-height: 1.55; }

/* ── Standings table ───────────────────────────────────────────────────── */
.sl-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sl-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sl-table th {
  text-align: left; font-size: .68rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: #9fc4e8;
  padding: 0 10px 9px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.sl-table td {
  padding: 11px 10px; border-bottom: 1px solid var(--border);
  color: var(--text); vertical-align: middle;
}
.sl-table tbody tr:hover { background: var(--row-hover); }
.sl-table tbody tr:last-child td { border-bottom: 0; }
.sl-num { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl-th-num { text-align: center; }

.sl-rank {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; border-radius: 7px; padding: 0 6px;
  font-size: .82rem; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.sl-rank--1 { background: var(--gold-dim); color: var(--gold); border-color: rgba(237, 199, 41, .45); }
.sl-rank--2 { color: #dce4f0; border-color: var(--border-light); }
.sl-rank--3 { color: #d4895a; border-color: rgba(212, 137, 90, .4); }

/* Rows 1–2 advance to the Bo3 final */
.sl-table tbody tr.sl-qualified td { background: rgba(237, 199, 41, .05); }
.sl-table tbody tr.sl-qualified td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

.sl-player { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sl-flag {
  width: 20px; height: auto; border-radius: 3px; flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}
.sl-pname { font-weight: 700; color: var(--text); white-space: nowrap; }
.sl-ptitle { font-size: .68rem; font-weight: 800; color: var(--gold); margin-right: 5px; }
.sl-preal { font-size: .76rem; color: var(--text-3); white-space: nowrap; }
.sl-pts { font-weight: 800; color: var(--cyan); font-size: 1rem; }
.sl-sb { color: var(--text-2); font-size: .84rem; }
.sl-sp { color: var(--gold); font-weight: 700; }
.sl-prize { color: var(--gold); font-weight: 700; white-space: nowrap; }
.sl-muted { color: var(--text-3); }

/* ── Crosstable ────────────────────────────────────────────────────────── */
.sl-cross { border-collapse: collapse; font-size: .84rem; margin: 0 auto; }
.sl-cross th, .sl-cross td {
  border: 1px solid var(--border); padding: 7px 9px; text-align: center; white-space: nowrap;
}
.sl-cross thead th {
  font-size: .66rem; font-weight: 800; letter-spacing: .06em;
  color: #9fc4e8; text-transform: uppercase; background: var(--surface-2);
}
.sl-cross th.sl-cross-name {
  text-align: left; font-weight: 700; color: var(--text);
  text-transform: none; letter-spacing: 0; font-size: .84rem; background: transparent;
}
.sl-cross td.sl-self { background: var(--surface-2); color: var(--text-3); }
.sl-cross .sl-w { color: var(--green); font-weight: 800; }
.sl-cross .sl-l { color: var(--red); font-weight: 800; }
.sl-cross .sl-d { color: var(--text-2); font-weight: 800; }
.sl-cross .sl-pending { color: var(--text-3); }
.sl-cross td.sl-cross-total { font-weight: 800; color: var(--cyan); background: rgba(0, 174, 250, .06); }

/* ── Rounds ────────────────────────────────────────────────────────────── */
/* Wider minimum than the old stacked layout: a side-by-side row has to hold two
   names plus the score before it starts truncating. */
.sl-rounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 13px; }
.sl-round { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 13px 14px; }
.sl-round-head {
  font-size: .68rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.sl-round-prog { color: var(--text-3); letter-spacing: .04em; font-weight: 700; }
.sl-round.sl-round--done .sl-round-prog { color: var(--green); }
/* One row per match: [left player] [score] [right player]. Flex rather than a
   1fr/auto/1fr grid on purpose — equal-width name columns truncate a long
   handle (im_manitodeplomo) while a short one (Imabdo1) wastes its half. Here
   each name takes its own content width and only shrinks when the row is
   genuinely too narrow. */
.sl-match {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-top: 1px solid var(--border);
}
/* .sl-round-head is the card's first div, so :first-of-type never matched here. */
.sl-round-head + .sl-match { border-top: 0; padding-top: 0; }

.sl-mp {
  display: flex; align-items: center; gap: 6px;
  flex: 1 1 auto; min-width: 0; font-size: .87rem; color: var(--text-2);
}
.sl-mp-r { flex-direction: row-reverse; }
.sl-mp .sl-flag { width: 16px; }
.sl-mn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-mp.sl-won { color: var(--text); font-weight: 700; }

.sl-msc {
  font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--text); background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px; white-space: nowrap; flex: 0 0 auto;
}
.sl-msc--draw { color: var(--text-2); }
.sl-msc--pending {
  color: var(--text-3); font-weight: 700; font-size: .72rem;
  background: transparent; border-color: transparent; letter-spacing: .06em;
}

/* ── Final (Bo3) ───────────────────────────────────────────────────────── */
.sl-final-card { border-color: rgba(237, 199, 41, .38); background: linear-gradient(180deg, var(--gold-dim), transparent 62%), var(--bg-card); }
.sl-final { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.sl-final-side { flex: 1 1 200px; min-width: 0; }
.sl-final-name { font-size: 1.12rem; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; }
.sl-final-name .sl-flag { width: 22px; }
.sl-final-seed { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin-bottom: 5px; }
.sl-final-score { flex: 0 0 auto; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--gold); }
.sl-final-games { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.sl-game {
  font-size: .74rem; font-weight: 800; letter-spacing: .04em;
  border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 8px; padding: 6px 11px; color: var(--text-2);
}
.sl-game em { font-style: normal; color: var(--text); }
.sl-champ {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 15px;
  border: 1px solid rgba(237, 199, 41, .45); background: var(--gold-dim);
  border-radius: 10px; padding: 9px 15px;
}
.sl-champ-l { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.sl-champ-n { font-size: 1.05rem; font-weight: 800; color: var(--gold); }

/* ── Reference blocks (points / prize / schedule) ──────────────────────── */
.sl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 9px; }
.sl-chip {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 13px;
}
.sl-chip-l { font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.sl-chip-v { font-size: 1.02rem; font-weight: 800; color: var(--gold); margin-top: 4px; white-space: nowrap; }
.sl-chip-v em { font-style: normal; font-size: .66rem; color: var(--text-3); font-weight: 700; }
.sl-chip--1 { border-color: rgba(237, 199, 41, .45); }

.sl-stages { display: flex; flex-wrap: wrap; gap: 9px; }
.sl-stage {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 14px; min-width: 128px;
}
.sl-stage-l { font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.sl-stage-d { font-size: .9rem; font-weight: 700; color: var(--text); margin-top: 4px; }
.sl-stage-t { font-size: .74rem; color: var(--text-3); margin-top: 2px; }
.sl-stage--current { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-dim), transparent 70%), var(--surface-2); }
.sl-stage--current .sl-stage-l { color: var(--cyan); }
.sl-stage--sgf { border-color: rgba(237, 199, 41, .38); }
.sl-stage--sgf .sl-stage-l { color: var(--gold); }

.sl-watch { display: inline-flex; gap: 8px; }
.sl-watch a { font-size: .74rem; font-weight: 700; color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--border-light); }
.sl-watch a:hover { color: var(--cyan); border-color: var(--cyan); }

.sl-you { font-size: .72rem; color: var(--text-3); font-weight: 700; }
.sl-empty { color: var(--text-2); font-size: .9rem; padding: 18px 0; text-align: center; }

/* ── Responsive ────────────────────────────────────────────────────────── */
/* Once the hamburger takes over, the header's "← Home" button is redundant
   (the drawer has The Circuit) and just crowds a 390px header. */
@media (max-width: 1040px) {
  .header-right { display: none !important; }
}
@media (max-width: 760px) {
  .sl-hide-sm { display: none; }
  .sl-table { font-size: .86rem; }
  .sl-table td, .sl-table th { padding-left: 7px; padding-right: 7px; }
  .sl-rounds { grid-template-columns: 1fr; }
  .sl-final-score { font-size: 1.6rem; }
}
@media (max-width: 480px) {
  .sl-preal { display: none; }
  /* Tighten the standings grid so the seven remaining columns fit a 390px
     phone outright, instead of the primary table needing a sideways scroll. */
  .sl-wrap { padding-left: 8px; padding-right: 8px; }
  .sl-card { padding: 14px 13px; }
  .sl-table { font-size: .82rem; }
  .sl-table td, .sl-table th { padding-left: 3px; padding-right: 3px; }
  .sl-table td:first-child, .sl-table th:first-child { padding-left: 2px; padding-right: 2px; }
  .sl-rank { min-width: 21px; height: 21px; padding: 0 4px; font-size: .74rem; }
  .sl-player { gap: 6px; }
  .sl-flag { width: 17px; }
  .sl-pts { font-size: .9rem; }
}
