/**
 * Results Hub — results-specific blocks: standings, tables, battle report, bracket.
 * Loaded after hub.css, which owns the design tokens used here.
 */

/* ---------- standings ---------- */

.hub-podium { margin: 0; padding: 0; list-style: none; }
.hub-podium-row {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: baseline;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius);
    background: var(--hub-panel);
}
.hub-podium-row + .hub-podium-row { margin-top: 8px; }
.hub-place { font-size: 30px; font-weight: 800; color: var(--hub-muted); }
.hub-podium-row.place-1 { border-color: var(--hub-gold); background: linear-gradient(90deg, #1d1a10, var(--hub-panel)); }
.hub-podium-row.place-1 .hub-place { color: var(--hub-gold); }
.hub-podium-row.place-1 .hub-podium-name { font-size: 26px; }
.hub-podium-name { font-size: 19px; font-weight: 700; }
.hub-podium-meta { font-size: 13px; color: var(--hub-muted); }

.hub-bands { margin: 16px 0 0; padding: 0; list-style: none; }
.hub-band {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 14px;
    padding: 12px 16px;
    border-top: 1px solid var(--hub-line);
}
.hub-band-label { font-weight: 700; color: var(--hub-muted); }
.hub-band-names { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- tables ---------- */

.hub-tablewrap {
    overflow-x: auto;
    border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius);
    background: var(--hub-panel);
}
.hub-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hub-table th, .hub-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--hub-line);
    white-space: nowrap;
}
.hub-table thead th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hub-muted);
}
.hub-table tbody tr:last-child td { border-bottom: 0; }
.hub-table .col-rank { width: 64px; font-size: 18px; font-weight: 700; }
.hub-table .col-num { text-align: right; }
.hub-table tr.is-advanced { background: #10181a; }
.hub-table tr.is-advanced .col-rank { color: var(--hub-win); }
.hub-row-name { font-weight: 600; }
.hub-row-meta { margin-left: 10px; font-size: 12px; color: var(--hub-muted); }
.hub-pill {
    margin-left: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(87, 217, 163, 0.14);
    color: var(--hub-win);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---------- battles ---------- */

.hub-battles { margin: 0; padding: 0; list-style: none; }
.hub-battle + .hub-battle { margin-top: 8px; }
.hub-battle-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    padding: 14px 18px;
    border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius);
    background: var(--hub-panel);
    text-decoration: none;
}
a.hub-battle-link:hover { border-color: #3a4152; }
.hub-battle-stage {
    min-width: 120px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hub-muted);
}
.hub-battle-pair { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.hub-side { font-size: 17px; font-weight: 600; color: var(--hub-muted); }
.hub-side.is-win { color: var(--hub-text); font-weight: 800; }
.hub-side.red.is-win { box-shadow: inset 0 -3px 0 var(--hub-red); }
.hub-side.blue.is-win { box-shadow: inset 0 -3px 0 var(--hub-blue); }
.hub-vs { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--hub-line); }

/* ---------- battle report ---------- */

.hub-versus {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    margin-top: 8px;
}
.hub-vs-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius);
    background: var(--hub-panel);
}
.hub-vs-side.red { border-top: 3px solid var(--hub-red); }
.hub-vs-side.blue { border-top: 3px solid var(--hub-blue); }
.hub-vs-side.is-win { background: linear-gradient(180deg, #17201b, var(--hub-panel)); }
.hub-vs-name { font-size: clamp(20px, 4vw, 30px); font-weight: 800; line-height: 1.1; }
.hub-vs-meta { font-size: 13px; color: var(--hub-muted); }
.hub-vs-score { font-size: 40px; font-weight: 800; }
.hub-vs-side.is-win .hub-vs-score { color: var(--hub-win); }
.hub-vs-sep { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--hub-muted); }
.hub-winner { margin: 20px 0 0; font-size: 20px; font-weight: 700; }
.hub-winner-label {
    margin-right: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--hub-gold);
}

.hub-round {
    padding: 16px 18px;
    border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius);
    background: var(--hub-panel);
}
.hub-round + .hub-round { margin-top: 10px; }
.hub-round-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 18px;
}
.hub-round-no {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hub-muted);
}
.hub-round-tally { font-size: 24px; font-weight: 800; }
.hub-round-winner { font-size: 17px; font-weight: 700; }
.hub-round-winner.red { color: var(--hub-red); }
.hub-round-winner.blue { color: var(--hub-blue); }
.hub-round .hub-tablewrap { margin-top: 14px; border-radius: 10px; }
.hub-vote.red { color: var(--hub-red); font-weight: 700; }
.hub-vote.blue { color: var(--hub-blue); font-weight: 700; }

/* ---------- bracket ---------- */

.hub-bracket-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
}
.hub-bracket:empty { display: none; }
.hub-bracket { min-width: 900px; }
.hub-bracket-fallback { min-width: 0; }
.hub-bracket-scroll:has(.hub-bracket:not(:empty)) .hub-bracket-fallback { display: none; }

@media (max-width: 720px) {
    .hub-main { padding: 0 16px 56px; }
    .hub-versus { grid-template-columns: 1fr; }
    .hub-vs-sep { justify-self: center; }
    .hub-podium-row { grid-template-columns: 40px 1fr; }
    .hub-podium-meta { grid-column: 2; }
    .hub-battle-stage { min-width: 0; }
    .hub-bracket { min-width: 760px; }
}
