:root {
    --bg: #eef0f3;
    --group: #f8f9fb;
    --surface: #ffffff;
    --surface-2: #f3f4f7;
    --border: #dfe3e8;
    --group-border: #c9ced6;
    --text: #1b1f27;
    --muted: #6b7280;
    --accent: #7048e8;
    --hl-bg: #ece6ff;
    --hl-text: #2b1a5e;
    --hl-edge: #9775fa;
    --win: #2f9e44;
    --loss: #e03131;
    --tie: #8b94a3;
    --live: #e03131;
    --up: #2f9e44;
    --down: #e03131;
    --cut: #b9c0cb;
    --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 8%);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0d10;
        --group: #12161b;
        --surface: #181d23;
        --surface-2: #1e242c;
        --border: #2a313b;
        --group-border: #39424e;
        --text: #e7eaef;
        --muted: #8d96a5;
        /* Violet accent to go with the black and purple (user didn't like orange). */
        --accent: #9775fa;
        /* Faded purple wash with light text. */
        --hl-bg: rgb(151 117 250 / 24%);
        --hl-text: #e5dbff;
        --hl-edge: #9775fa;
        --win: #40c057;
        --loss: #ff6b6b;
        --tie: #6b7380;
        --up: #51cf66;
        --down: #ff6b6b;
        --cut: #4b5563;
        --shadow: none;
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-variant-numeric: tabular-nums;
}

a { color: inherit; }

/* Logos are <picture> (dark-mode version, see Services/Logo.cs); let the <img> lay out as if unwrapped. */
picture { display: contents; }

/* ---- Top bar & section tabs ---- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
    height: 52px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.brand { font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.tabs { display: flex; gap: 4px; height: 100%; }
.tab {
    display: flex;
    align-items: center;
    padding: 0 12px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 3px solid transparent;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.updated { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Sub-bar: the current section's pages (Sports: Standings, Stats). Sticks under the top bar. */
.subtabs {
    position: sticky;
    top: 52px;
    z-index: 9;
    display: flex;
    gap: 6px;
    padding: 7px 24px;
    background: var(--group);
    border-bottom: 1px solid var(--border);
}
.subtab {
    padding: 4px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}
.subtab:hover { color: var(--text); background: var(--surface-2); }
.subtab.active { color: #fff; background: var(--accent); }
/* Unread-story bubbles on the News tabs (user, 2026-12-06); filled in by site.js from /news/counts. */
.nbadge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.nbadge[hidden] { display: none; }
.subtab.active .nbadge { background: #fff; color: var(--accent); }

/* Full width: this is meant for a big screen. */
.page { padding: 18px 24px 28px; }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---- Board: one bordered group per league ---- */
.board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    align-items: start;
}
.league {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 0 10px 10px;
    background: var(--group);
    border: 1px solid var(--group-border);
    border-radius: 12px;
}
.league-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 -10px;
    padding: 10px 12px;
    border-bottom: 3px solid var(--accent);
    border-radius: 12px 12px 0 0;
    background: var(--surface-2);
}
.league-head h2 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.season { color: var(--muted); font-size: 12px; }

.mine-part, .stand-part { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stand-part { gap: 12px; }
.mine-part.is-empty { display: none; }

/* Big screens: one column per league, and every league shares the board's three rows (header, cards,
   standings) via subgrid, so the card row is as tall as the tallest league and all standings start level.
   Must stay after the base .league rule above, or that rule's display:flex wins. */
@media (min-width: 1900px) {
    .board {
        grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
        grid-template-rows: auto auto auto;
        row-gap: 0;
    }
    .league {
        display: grid;
        grid-row: span 3;
        grid-template-rows: subgrid;
        grid-template-columns: minmax(0, 1fr);
        row-gap: 12px;
    }
    .mine-part, .stand-part { align-self: start; }
    .mine-part.is-empty { display: flex; } /* keeps the card row in leagues with no followed teams */

    /* Stats page: each league is just a header and its tables (no shared rows). A column can span several
       board columns (NFL, NHL: tables flow across them) or stack several leagues (EPL + UCL). */
    .board.simple { grid-template-rows: none; row-gap: 16px; }
    .board.simple .league { display: flex; grid-row: auto; }
    .board.simple .stand-part { align-self: stretch; }
    .stat-col { grid-column: span var(--span, 1); }
    .league.wide .stand-part {
        display: grid;
        grid-template-columns: repeat(var(--span, 1), minmax(0, 1fr));
        align-items: start;
    }
}

/* ---- Stats leaders ---- */
.stat-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.leaders td.team .sub { color: var(--muted); font-size: 11.5px; font-weight: 400; margin-left: 2px; }
.leaders tr.hl td.team .sub { color: var(--hl-text); opacity: 0.8; }

/* ---- News cards ---- */
.news-head { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.news-tools { display: flex; align-items: center; gap: 16px; font-size: 13px; }
/* "✓ Read all" (user, 2026-12-05): marks every unread story on the tab read, as skips. */
.read-all {
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--group-border);
    background: var(--surface-2);
    color: var(--muted);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.read-all:hover, .read-all:focus-visible { color: var(--text); border-color: var(--accent); }
.read-all:disabled { opacity: 0.5; cursor: default; }
/* On/off switch ("Hide read"). */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; color: var(--muted); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--group-border);
    transition: background 0.15s, border-color 0.15s;
}
.switch-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--muted);
    transition: transform 0.15s, background 0.15s;
}
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(14px); background: #fff; }
.switch input:checked ~ span:last-child { color: var(--text); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Read (opened) articles: dimmed until hovered. A stack is read once any version was opened. */
.news-grid > .is-read { opacity: 0.55; transition: opacity 0.15s; }
/* No fade back in on hover: while opacity is below 1 the card is its own layer, which would trap a stack's
   backdrop and fan underneath the cards after it. */
.news-grid > .is-read:hover, .news-grid > .is-read:focus-within { opacity: 1; transition: none; }
.news-grid > .is-read .ncard-img img, .ntile.is-read .ncard-img img { filter: grayscale(0.7); }
.news-grid > .is-read .ncard-title, .ntile.is-read .ncard-title, .ncard-also a.is-read { color: var(--muted); }
.ntile.is-read { opacity: 0.6; }
.ntile.is-read:hover { opacity: 1; }
.news-grid.hide-read > .is-read:not(.just-read) { display: none; }
/* ✓ Mark as read: top-left of the image, shown on hover (always on touch screens); filled in once read. */
.ncard { position: relative; }
.nread {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgb(255 255 255 / 50%);
    background: rgb(0 0 0 / 60%);
    color: #fff;
    font: 700 15px/1 system-ui, sans-serif;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s, background 0.12s;
}
.ncard:hover .nread, .nread:focus-visible { opacity: 1; }
.nread:hover { background: var(--accent); border-color: var(--accent); }
.is-read .nread, .is-read.nread { opacity: 1; background: var(--accent); border-color: var(--accent); }
@media (hover: none) {
    .nread { opacity: 1; }
}
/* Fan header: the open panel covers the top card's ✓, so the story's mark-read button lives here too. */
.nfan-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}
.nread.nread-bar {
    position: static;
    width: auto;
    height: auto;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    opacity: 1;
}
.is-read .nread.nread-bar::after { content: " (undo)"; font-weight: 400; }
.chip {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--hl-bg);
    color: var(--hl-text);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ncard {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: border-color 0.15s, transform 0.15s;
}
.ncard:hover { border-color: var(--accent); transform: translateY(-2px); }
.ncard-main { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.ncard-main:visited .ncard-title { color: var(--muted); }
/* Live refresh (news.js): new stories and stories another outlet just picked up get a brief glow. */
.ncard.is-new, .ncard.is-updated, .is-new > .ncard, .is-updated > .ncard { animation: ncard-glow 6s ease-out; }

/* A story several outlets covered: the lead card on a little stack of pages. */
.nstack { position: relative; display: flex; flex-direction: column; min-width: 0; }
.nstack > .ncard { position: relative; z-index: 1; flex: 1; }
.nstack-page {
    position: absolute;
    inset: 0;
    background: var(--surface);
    border: 1px solid var(--group-border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}
.nstack-page.p1 { transform: translate(6px, 6px) rotate(1.5deg); }
.nstack-page.p2 { transform: translate(11px, 10px) rotate(3deg); filter: brightness(0.8); }
.nstack:hover .nstack-page.p1 { transform: translate(7px, 5px) rotate(2.5deg); }
.nstack:hover .nstack-page.p2 { transform: translate(14px, 9px) rotate(5deg); }
.nstack-count {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgb(0 0 0 / 70%);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    pointer-events: none;
}
/* Hover: every version fanned out as tiles in a panel over the grid. news.js sets --cols and --shift so it fits
   the window; it appears after a short pause so passing the mouse over a stack doesn't flash it. */
.nstack-fan {
    --cols: 1; /* news.js widens it on hover; a full-width hidden fan would still stretch the page sideways */
    position: absolute;
    top: -10px;
    left: -10px;
    z-index: 8; /* under the sticky bars */
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    gap: 10px;
    width: calc(var(--cols) * (100% + 10px) + 10px);
    min-height: calc(100% + 20px); /* always covers the lead card */
    padding: 10px;
    background: var(--group);
    border: 1px solid var(--accent);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgb(0 0 0 / 35%);
    transform: translateX(var(--shift, 0px)) scale(0.97);
    transform-origin: top left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s, transform 0.12s, visibility 0s linear 0.12s;
}
.nstack:hover .nstack-fan, .nstack:focus-within .nstack-fan {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(var(--shift, 0px)) scale(1);
    transition: opacity 0.15s 0.2s, transform 0.15s 0.2s, visibility 0s 0.2s;
}
/* While a fan is open, dim everything else (user, 2026-12-05: "maybe dim the background when showing"). The backdrop
   sits just under the fan and lets the mouse through, so moving off the fan still closes it. */
.nstack::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 7;
    background: rgb(0 0 0 / 60%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s, visibility 0s linear 0.12s;
}
.nstack:hover::before, .nstack:focus-within::before {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.15s 0.2s, visibility 0s 0.2s;
}
@media (hover: none) {
    .nstack::before { display: none; }
}
.ntile { color: inherit; text-decoration: none; }
.ntile:hover { transform: translateY(-2px); }
.ntile:visited .ncard-title { color: var(--muted); }
/* Hover devices use the fan, so the lead doesn't need the "Also" list; touch screens keep the list and get no fan. */
@media (hover: hover) {
    .nstack .ncard-also { display: none; }
}
@media (hover: none) {
    .nstack-fan { display: none; }
}
@keyframes ncard-glow {
    from { border-color: var(--accent); box-shadow: 0 0 0 3px var(--hl-bg), var(--shadow); }
    to { border-color: var(--border); box-shadow: var(--shadow); }
}
/* Other outlets' versions of the same story. */
.ncard-also {
    list-style: none;
    margin: 0;
    padding: 8px 12px 10px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12.5px;
}
.ncard-also a {
    display: block;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ncard-also a:hover { color: var(--accent); }
.ncard-also a:visited { color: var(--muted); }
.ncard-also .src { color: var(--accent); font-weight: 700; margin-right: 4px; }
.ncard-also .more { font-size: 12px; }
.news-toast {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow);
    cursor: pointer;
}
.news-toast[hidden] { display: none; }
.news-toast button {
    margin-left: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}
/* Image area: the source name sits underneath, so a missing/broken image still shows something. */
.ncard-img { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.ncard-img .ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 12px;
    text-align: center;
    color: var(--muted);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.01em;
}
.ncard-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ncard-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.ncard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: 12px; }
.ncard-meta .src { color: var(--accent); font-weight: 700; }
.ncard-meta .chip { margin-left: auto; }
.ncard-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ncard-sum {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Today: game cards (Sports > Today) ---- */
/* Games flow in a grid: a wide league column (few leagues today) holds 2+ cards per row. */
.board.simple .stand-part.tgames {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    align-content: start;
    gap: 8px;
}
.tgames > .notice { grid-column: 1 / -1; }
.tgame {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.tgame.hl { border-left-color: var(--hl-edge); background: linear-gradient(90deg, var(--hl-bg), var(--surface) 70%); }
.tgame.is-live { border-left-color: var(--live); }
.tgame-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.tstatus { font-weight: 700; white-space: nowrap; }
.tgame.is-live .tstatus { color: var(--live); }
.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--live);
    vertical-align: 1px;
    animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse { 50% { opacity: 0.3; } }
.ttv { margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tside { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.tside .tlogo { width: 28px; height: 28px; object-fit: contain; flex: none; }
.tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.trank { color: var(--muted); font-size: 11.5px; font-weight: 700; margin-right: 3px; }
.trec { color: var(--muted); font-size: 12px; white-space: nowrap; }
.tscore { min-width: 28px; text-align: right; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tside.mine .tname { color: var(--hl-text); }
.tside.won .tscore { color: var(--text); }
.tside.lost .tname, .tside.lost .tscore { color: var(--muted); font-weight: 500; }
.tnote { font-size: 11.5px; color: var(--muted); }
.tlive-count { color: var(--live); font-weight: 700; }

/* ---- My teams cards ---- */
.card {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--hl-edge);
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-decoration: none;
    min-width: 0;
}
.card:hover { border-color: var(--hl-edge); }
.card.is-live { border-left-color: var(--live); }
.card-logo { flex: none; width: 40px; height: 40px; object-fit: contain; }
.card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.card-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.card-name { font-size: 16px; flex: none; white-space: nowrap; }
/* One line only: when the place ("· 5th Metropolitan") doesn't fit, it wraps onto a second line that's clipped away,
   leaving record and points (user, 2026-12-05). */
.card-sum {
    display: flex;
    flex-wrap: wrap;
    column-gap: 4px;
    flex: 1;
    min-width: 0;
    height: 18px;
    line-height: 18px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12.5px;
}
.card-sum > span { white-space: nowrap; }
.card-line { display: flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; overflow: hidden; }
.card-line .label {
    flex: none;
    width: 52px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---- Standings blocks ---- */
.block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.block-head {
    margin: 0;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}
.notice { margin: 0; padding: 10px; font-size: 13px; color: var(--muted); }
.notice.error { color: var(--loss); }

.standings { width: 100%; border-collapse: collapse; white-space: nowrap; }
.standings th {
    padding: 5px 8px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-align: left;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.standings td { padding: 3px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.standings tbody tr:last-child td { border-bottom: 0; }
.standings tbody tr:hover td { background: var(--surface-2); }
.standings tr.cut td { border-bottom: 2px dashed var(--cut); }
/* Wild-card tables (NHL): solid line between division top-3 groups; ranks like "CE1" / "WC2". */
.standings tr.group-end td { border-bottom: 2px solid var(--cut); }
.standings .rank { white-space: nowrap; }
.standings .rank { width: 26px; text-align: right; color: var(--muted); }
.standings .num, .standings th.num { text-align: right; padding-left: 6px; padding-right: 6px; } /* tighter so soccer's 4 number columns fit 7 leagues across */
.standings .strong { font-weight: 700; }
/* Soccer tables too wide for their column: site.js drops W-D-L, then GD, so GP and PTS always show (user, 2026-12-05). */
.standings.drop-wdl .c-wdl, .standings.drop-gd .c-gd { display: none; }
.standings td.team { display: flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; }
.standings td.team img { width: 20px; height: 20px; object-fit: contain; flex: none; }
.standings .trend { font-size: 11.5px; font-weight: 700; width: 36px; }
.standings .trend.up { color: var(--up); }
.standings .trend.down { color: var(--down); }

/* Highlighted teams: hard to miss. */
.standings tr.hl td {
    background: var(--hl-bg);
    color: var(--hl-text);
    font-weight: 800;
    border-bottom-color: var(--hl-edge);
}
.standings tr.hl td:first-child { box-shadow: inset 5px 0 0 var(--hl-edge); }
.standings tr.hl .trend.up, .standings tr.hl .trend.down { color: var(--hl-text); }
.standings tr.hl:hover td { background: var(--hl-bg); }
.standings tr:target td { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---- Results ---- */
.res {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 800;
    color: #fff;
    flex: none;
}
.res.w { background: var(--win); }
.res.l { background: var(--loss); }
.res.t { background: var(--tie); }
.score { font-weight: 700; margin: 0 2px; }
.opp { display: inline-flex; align-items: center; gap: 4px; }
.opp img { width: 16px; height: 16px; object-fit: contain; }
.when { color: var(--muted); font-size: 12px; margin-left: 4px; overflow: hidden; text-overflow: ellipsis; }
.live {
    display: inline-block;
    padding: 0 5px;
    border-radius: 4px;
    background: var(--live);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---- Mobile: tabs (hidden on desktop, where everything shows at once) ---- */
.mtabs { display: none; }

@media (max-width: 900px) {
    .topbar { padding: 0 16px; gap: 14px; }
    .subtabs { padding: 7px 16px; }
    .page { padding: 12px 16px 24px; }
    .updated { display: none; }
    .board { grid-template-columns: minmax(0, 1fr); } /* plain 1fr won't shrink below the cards' one-line width */

    .mtabs {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        margin: 0 -16px 14px;
        padding: 0 16px 4px;
        scrollbar-width: none;
    }
    .mtab {
        flex: none;
        font: inherit;
        font-weight: 700;
        font-size: 13px;
        color: var(--muted);
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 999px;
        padding: 6px 14px;
        cursor: pointer;
    }
    .mtab[aria-selected="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }

    /* Set by site.js; without it everything stays visible. */
    .use-tabs .league.tab-hidden { display: none; }
    .use-tabs .league.only-mine .stand-part { display: none; }
    .use-tabs .league.only-standings .mine-part { display: none; }
}
