/* ScoresWizard — Design v2 (light theme)
 * Scoped styles for the /d2/ design experiment.
 * Does not affect v1 pages. */

:root {
    --brand: #1E3DB5;
    --brand-dark: #15308F;
    --brand-soft: #f0f3fd;
    --ink: #142144;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #ffffff;
    --bg-soft: #f7f8fb;
    --live: #DC2626;
    --final: #6b7280;
    --win: #065F46;
    --loss: #991B1B;
    --radius: 4px;
    --radius-lg: 8px;
    --container: 1100px;
    --container-pad: 16px;
}

html, body {
    margin: 0;
    padding: 0;
}
body.d2 {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 22px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.d2 * { box-sizing: border-box; }
body.d2 a { color: inherit; text-decoration: none; }
body.d2 img { max-width: 100%; height: auto; }

/* ---------- NAV ---------- */
.d2-nav { border-bottom: 1px solid var(--line); padding: 12px 0; background: #fff; position: sticky; top: 0; z-index: 50; }
.d2-nav-inner {
    max-width: var(--container); margin: 0 auto; padding: 0 var(--container-pad);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.d2-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand); font-size: 16px; line-height: 24px; }
.d2-logo-mark { background: var(--brand); color: #fff; padding: 4px 8px; border-radius: var(--radius); font-size: 12px; line-height: 16px; letter-spacing: 0.5px; }
.d2-nav-links { display: flex; gap: 24px; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.5px; color: var(--brand); text-transform: uppercase; }
.d2-nav-links a { cursor: pointer; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.d2-nav-links a.active,
.d2-nav-links a:hover { color: var(--brand-dark); border-bottom-color: var(--brand); }

/* ---------- BREADCRUMB ---------- */
.d2-breadcrumb {
    max-width: var(--container); margin: 16px auto 0; padding: 0 var(--container-pad);
    font-size: 13px; color: var(--muted);
}
.d2-breadcrumb a:hover { color: var(--brand); }
.d2-breadcrumb .sep { margin: 0 6px; color: #cbd5e1; }

/* ---------- HERO (scores page) ---------- */
.d2-hero {
    max-width: 900px;
    margin: 32px auto 8px;
    padding: 0 var(--container-pad);
    text-align: center;
}
.d2-hero h1 { color: var(--brand); font-size: 32px; line-height: 40px; margin: 0 0 8px; font-weight: 700; letter-spacing: -0.3px; }
.d2-hero p { margin: 0; color: var(--ink); font-weight: 500; font-size: 16px; line-height: 24px; }
.d2-hero .date { color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 4px; }

/* ---------- PAGE LAYOUT ---------- */
.d2-page {
    max-width: var(--container);
    margin: 20px auto 0;
    padding: 0 var(--container-pad);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
}
.d2-main { min-width: 0; }
.d2-sidebar { min-width: 0; }
.d2-sidebar h3 { font-size: 16px; line-height: 24px; font-weight: 700; margin: 0 0 12px; }

/* ---------- AD SLOTS ---------- */
.d2-ad-wrap { margin: 16px 0; }
.d2-ad-wrap .ad-container {
    background: transparent;
    border: none;
    border-radius: 0;
    width: 100%;
    /* Override the partial's inline min-height on v2 pages.
       The ad network fills the container with its own dimensions. */
    min-height: 0 !important;
}
/* Collapse wrapper margin when the slot stays empty */
.d2-ad-wrap:has(.ad-container:empty) { margin: 0; }

/* ---------- DATE STRIP ---------- */
.d2-date-strip {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.d2-date-strip::-webkit-scrollbar { display: none; }
.d2-date-pill {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    color: var(--muted);
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}
.d2-date-pill.current { background: var(--brand); color: #fff; }
.d2-date-pill:hover:not(.current) { border-color: var(--line); color: var(--ink); }

/* ---------- SECTION HEADS ---------- */
.d2-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 24px 0 12px;
}
.d2-section-head:first-child { margin-top: 0; }
.d2-section-head h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; }
.d2-section-head h3 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; }
.d2-section-head a { color: var(--brand); font-size: 13px; font-weight: 500; }

/* ---------- LEAGUE GROUP ---------- */
.d2-league-block { margin-bottom: 16px; }
.d2-league-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
}
.d2-league-head .country {
    font-size: 11px;
    line-height: 16px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}
.d2-league-head h3 {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--ink);
}
.d2-league-head .spacer { flex: 1; }
.d2-league-head .live-pill {
    color: var(--live);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- GAME CARD ---------- */
.d2-game-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    margin-bottom: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    background: #fff;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.d2-game-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 2px 8px rgba(30,61,181,0.06);
}
.d2-teams { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.d2-team-row { display: flex; align-items: center; gap: 12px; }
.d2-team-logo {
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: var(--bg-soft);
    overflow: hidden;
}
.d2-team-logo img { width: 22px; height: 22px; object-fit: contain; }
.d2-team-name {
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.d2-team-score {
    font-size: 18px;
    line-height: 24px;
    font-weight: 700;
    min-width: 24px;
    text-align: right;
    color: var(--ink);
}
.d2-team-row.losing .d2-team-score,
.d2-team-row.losing .d2-team-name { color: var(--muted); font-weight: 400; }
.d2-team-row.losing .d2-team-score { font-weight: 600; }

.d2-status {
    text-align: center;
    min-width: 88px;
    border-left: 1px solid var(--line);
    padding-left: 16px;
}
.d2-status .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.d2-status.live .badge { color: var(--live); }
.d2-status.final .badge { color: var(--final); }
.d2-status.upcoming .badge { color: var(--brand); }
.d2-status .detail { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 16px; }
.d2-status .detail strong { color: var(--ink); font-weight: 500; }

.d2-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--live);
    display: inline-block;
    animation: d2-pulse 1.4s ease-in-out infinite;
}
@keyframes d2-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .4; transform: scale(0.85); }
}

/* ---------- CTA ---------- */
.d2-cta {
    background: var(--brand); color: #fff !important;
    padding: 8px 16px; border-radius: var(--radius-lg);
    font-weight: 500; font-size: 13px; line-height: 20px;
    border: none; cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease;
    display: inline-flex; align-items: center; gap: 8px;
}
.d2-cta:hover { background: var(--brand-dark); }
.d2-cta.outline { background: #fff; color: var(--brand) !important; border: 1px solid var(--brand); }
.d2-cta.outline:hover { background: var(--brand-soft); }

/* ---------- EMPTY STATE ---------- */
.d2-empty {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    color: var(--muted);
}
.d2-empty .icon { font-size: 36px; margin-bottom: 8px; }
.d2-empty h2 { color: var(--ink); font-size: 16px; line-height: 24px; margin: 0 0 4px; font-weight: 700; }
.d2-empty p { margin: 0; font-size: 14px; line-height: 20px; }

/* ---------- SIDEBAR WIDGETS ---------- */
.d2-sidebar .widget {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    background: #fff;
}
.d2-sidebar .widget-head {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.d2-sidebar .widget-body { padding: 4px 0; }
.d2-sidebar .nav-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 20px;
    color: var(--ink);
    font-weight: 400;
}
.d2-sidebar .nav-row:hover { background: var(--bg-soft); color: var(--brand); }
.d2-sidebar .nav-row.active { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.d2-sidebar .nav-row .flag { font-size: 16px; line-height: 1; }
.d2-sidebar .nav-row .sub { color: var(--muted); font-size: 12px; margin-left: auto; }
.d2-sidebar .countries-scroll { max-height: 380px; overflow-y: auto; }

/* ---------- GAME HERO (detail page) ---------- */
.d2-game-hero {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
}
.d2-game-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    line-height: 16px;
    color: var(--muted);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    flex-wrap: wrap;
    gap: 12px;
}
.d2-live-badge { color: var(--live); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.d2-game-matchup {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}
.d2-team-block { display: flex; flex-direction: column; align-items: center; text-align: center; }
.d2-team-block.away { align-items: flex-start; text-align: left; }
.d2-team-block.home { align-items: flex-end; text-align: right; }
.d2-team-mark-lg {
    width: 64px; height: 64px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
    background: var(--bg-soft);
    overflow: hidden;
}
.d2-team-mark-lg img { width: 48px; height: 48px; object-fit: contain; }
.d2-team-name-big { font-size: 18px; line-height: 24px; font-weight: 700; }
.d2-team-score-big { font-size: 44px; line-height: 48px; font-weight: 700; margin-top: 8px; color: var(--ink); letter-spacing: -1px; }
.d2-team-block.losing .d2-team-score-big,
.d2-team-block.losing .d2-team-name-big { color: var(--muted); }
.d2-team-block.losing .d2-team-name-big { font-weight: 500; }

.d2-vs-center { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 8px; }
.d2-inning-pill {
    background: var(--live); color: #fff;
    font-weight: 700; font-size: 12px; line-height: 16px;
    padding: 6px 12px; border-radius: 999px;
    letter-spacing: 0.5px; white-space: nowrap;
}
.d2-inning-pill.final { background: var(--final); }
.d2-inning-pill.upcoming { background: var(--brand); }
.d2-kickoff { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--ink); }
.d2-kickoff-date { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }

/* ---------- LINE SCORE ---------- */
.d2-linescore-wrap { margin-bottom: 24px; overflow-x: auto; }
.d2-linescore {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 20px;
    min-width: 420px;
}
.d2-linescore th, .d2-linescore td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid var(--line);
}
.d2-linescore th { font-weight: 500; color: var(--muted); font-size: 11px; line-height: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.d2-linescore th.team-col,
.d2-linescore td.team-col { text-align: left; font-weight: 600; white-space: nowrap; }
.d2-linescore td.team-col { display: flex; align-items: center; gap: 10px; }
.d2-linescore td.team-col .d2-team-logo { width: 22px; height: 22px; }
.d2-linescore td.team-col .d2-team-logo img { width: 18px; height: 18px; }
.d2-linescore td.tot { font-weight: 700; background: var(--bg-soft); }

/* ---------- TEAM HUB HERO ---------- */
.d2-team-hero {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: #fff;
}
.d2-team-hero::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--brand);
}
.d2-team-hero .mark {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--bg-soft);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.d2-team-hero .mark img { width: 60px; height: 60px; object-fit: contain; }
.d2-team-hero .eyebrow {
    font-size: 11px; line-height: 16px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 1px; font-weight: 500;
    margin-bottom: 4px;
}
.d2-team-hero h1 { margin: 0 0 12px; font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.3px; }
.d2-team-meta { display: flex; gap: 20px; font-size: 13px; line-height: 20px; color: var(--muted); flex-wrap: wrap; }

/* ---------- NEXT GAME STRIP ---------- */
.d2-nextgame-strip {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
}
.d2-nextgame-strip.live { background: #fef2f2; border-color: #fecaca; }
.d2-nextgame-strip .label {
    font-weight: 700; font-size: 11px; line-height: 16px;
    letter-spacing: 1px; text-transform: uppercase;
    color: var(--brand);
    display: inline-flex; align-items: center; gap: 8px;
}
.d2-nextgame-strip.live .label { color: var(--live); }
.d2-nextgame-strip .matchup { font-size: 14px; line-height: 20px; font-weight: 500; }
.d2-nextgame-strip .score.lead { color: var(--ink); font-weight: 700; }
.d2-nextgame-strip .score.trail { color: var(--muted); font-weight: 500; }
.d2-nextgame-strip .subdetail { color: var(--muted); font-size: 12px; line-height: 16px; margin-top: 2px; }

/* ---------- RESULTS STRIP (team hub) ---------- */
.d2-results-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}
.d2-result-pill {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 12px 8px;
    text-align: center;
    transition: border-color .15s ease;
    display: block;
    color: var(--ink);
}
.d2-result-pill:hover { border-color: #c7d2fe; }
.d2-result-pill .date { font-size: 11px; line-height: 16px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.d2-result-pill .opp { font-size: 12px; line-height: 16px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d2-result-pill .score-line { margin-top: 8px; font-size: 14px; line-height: 20px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.d2-result-pill .outcome {
    display: inline-block;
    width: 18px; height: 18px; border-radius: var(--radius);
    color: #fff; font-size: 11px; font-weight: 700;
    line-height: 18px;
}
.d2-outcome-w { background: var(--win); }
.d2-outcome-l { background: var(--loss); }

/* ---------- SCHEDULE LIST ---------- */
.d2-schedule {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}
.d2-sched-row {
    display: grid;
    grid-template-columns: 130px 1fr 110px auto;
    padding: 12px 16px;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    line-height: 20px;
    color: var(--ink);
}
.d2-sched-row:last-child { border-bottom: none; }
.d2-sched-row:hover { background: var(--bg-soft); }
.d2-sched-date { color: var(--muted); font-size: 12px; font-weight: 500; }
.d2-sched-opp { display: flex; align-items: center; gap: 10px; font-weight: 500; min-width: 0; }
.d2-sched-opp .opp-logo { width: 26px; height: 26px; flex-shrink: 0; }
.d2-sched-opp .opp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d2-sched-time { font-size: 12px; color: var(--muted); }
.d2-sched-btn { color: var(--brand); font-weight: 500; font-size: 13px; text-align: right; }

/* ---------- HUB HEADER (league / team-matches / team-stats) ---------- */
.d2-hub-header {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
}
.d2-hub-header .flag { width: 24px; height: 18px; object-fit: contain; border-radius: 2px; flex-shrink: 0; }
.d2-hub-header .mark {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-soft);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.d2-hub-header .mark img { width: 30px; height: 30px; object-fit: contain; }
.d2-hub-header .eyebrow {
    font-size: 11px; line-height: 16px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 1px; font-weight: 500;
    margin-bottom: 2px;
}
.d2-hub-header h1 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.2px; }
.d2-hub-header h1 .suffix { color: var(--muted); font-weight: 500; }

/* ---------- TABS ---------- */
.d2-tabs {
    display: flex;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 4px;
    margin-bottom: 16px;
    background: #fff;
}
.d2-tab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 20px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
}
.d2-tab.active { background: var(--brand); color: #fff; }
.d2-tab:hover:not(.active) { color: var(--ink); background: var(--bg-soft); }

/* ---------- COMPACT LIST (game-list-row) ---------- */
.d2-list {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    margin-bottom: 16px;
}
.d2-list-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.d2-list-row:last-child { border-bottom: none; }
.d2-list-row:hover { background: var(--bg-soft); }
.d2-list-row .time-col {
    width: 64px;
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    color: var(--muted);
    flex-shrink: 0;
    font-weight: 500;
}
.d2-list-row .time-col.live {
    color: var(--live);
    font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.d2-list-row .time-col.live .d2-dot { width: 6px; height: 6px; }
.d2-list-row .teams-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.d2-list-row .team-line { display: flex; align-items: center; gap: 10px; }
.d2-list-row .team-line .mini-logo {
    width: 20px; height: 20px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-soft);
    flex-shrink: 0;
    overflow: hidden;
}
.d2-list-row .team-line .mini-logo img { width: 16px; height: 16px; object-fit: contain; }
.d2-list-row .team-line .name {
    flex: 1; min-width: 0;
    font-size: 13px; line-height: 20px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.d2-list-row .team-line .score {
    font-size: 13px; line-height: 20px; font-weight: 700;
    min-width: 24px; text-align: right;
}
.d2-list-row .team-line.winner .name { font-weight: 700; }
.d2-list-row .team-line.loser .name,
.d2-list-row .team-line.loser .score { color: var(--muted); font-weight: 400; }
.d2-list-row .team-line.loser .score { font-weight: 500; }

/* Section separator inside lists (date / league grouping) */
.d2-list-section {
    padding: 6px 16px;
    font-size: 11px;
    line-height: 16px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 8px;
}
.d2-list-section img { width: 14px; height: 14px; object-fit: contain; }

/* ---------- STANDINGS TABLE ---------- */
.d2-standings-wrap {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    background: #fff;
}
.d2-standings-wrap .division-title {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    line-height: 20px;
    font-weight: 700;
}
.d2-standings-scroll { overflow-x: auto; }
.d2-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 20px;
}
.d2-standings-table thead th {
    text-align: right;
    font-size: 11px;
    line-height: 16px;
    color: var(--muted);
    font-weight: 500;
    padding: 10px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.d2-standings-table thead th:first-child,
.d2-standings-table thead th:nth-child(2) { text-align: left; }
.d2-standings-table tbody td {
    padding: 10px 8px;
    text-align: right;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.d2-standings-table tbody td:first-child,
.d2-standings-table tbody td:nth-child(2) { text-align: left; }
.d2-standings-table tbody tr:last-child td { border-bottom: none; }
.d2-standings-table tbody tr:hover { background: var(--bg-soft); }
.d2-standings-table .pos { color: var(--muted); font-weight: 500; padding-left: 16px; }
.d2-standings-table .team-cell {
    display: flex; align-items: center; gap: 8px;
    font-weight: 500;
    max-width: 200px;
}
.d2-standings-table .team-cell .logo {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--bg-soft);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.d2-standings-table .team-cell .logo img { width: 18px; height: 18px; object-fit: contain; }
.d2-standings-table .team-cell a {
    color: inherit;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: inline-flex; align-items: center; gap: 8px;
    min-width: 0;
}
.d2-standings-table .team-cell a:hover { color: var(--brand); }
.d2-standings-table .diff.pos-val { color: var(--win); font-weight: 500; }
.d2-standings-table .diff.neg-val { color: var(--loss); font-weight: 500; }
.d2-standings-table .form-pills { display: inline-flex; gap: 2px; justify-content: flex-end; }
.d2-standings-table .form-pill {
    display: inline-block;
    width: 16px; height: 16px; border-radius: 3px;
    font-size: 9px; font-weight: 700; color: #fff;
    line-height: 16px; text-align: center;
}
.d2-standings-table .form-pill.w { background: var(--win); }
.d2-standings-table .form-pill.l { background: var(--loss); }
.d2-standings-table .form-pill.d { background: #CA8A04; }
.d2-standings-table tr td:last-child { padding-right: 16px; }
.d2-standings-table tr th:last-child { padding-right: 16px; }
@media (max-width: 720px) {
    .d2-standings-table .hide-sm { display: none; }
}
@media (max-width: 540px) {
    .d2-standings-table .hide-xs { display: none; }
}

/* ---------- STAT GRID (team stats) ---------- */
.d2-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    background: #fff;
}
.d2-card .card-head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    display: flex; align-items: baseline; gap: 8px; justify-content: space-between;
}
.d2-card .card-head .sub { color: var(--muted); font-weight: 500; font-size: 12px; }
.d2-card .card-body { padding: 16px; }

.d2-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}
.d2-stat-cell {
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
}
.d2-stat-cell .value { font-size: 22px; line-height: 28px; font-weight: 700; color: var(--ink); }
.d2-stat-cell .value.pos-val { color: var(--win); }
.d2-stat-cell .value.neg-val { color: var(--loss); }
.d2-stat-cell .value.accent { color: var(--brand); }
.d2-stat-cell .label {
    font-size: 11px; line-height: 16px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-top: 4px; font-weight: 500;
}

/* ---------- COUNTRY — LEAGUE LIST ---------- */
.d2-league-list {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
}
.d2-league-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.d2-league-item:last-child { border-bottom: none; }
.d2-league-item:hover { background: var(--bg-soft); }
.d2-league-item .logo {
    width: 32px; height: 32px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-soft); border-radius: var(--radius);
    overflow: hidden;
}
.d2-league-item .logo img { width: 26px; height: 26px; object-fit: contain; }
.d2-league-item .name { flex: 1; font-size: 14px; line-height: 20px; font-weight: 500; }
.d2-league-item .arrow { color: var(--muted); font-size: 14px; }

/* ---------- STANDINGS SIDEBAR WIDGET (league page) ---------- */
.d2-sidebar .standings-widget-body { padding: 0; }
.d2-sidebar .standings-widget-body table { width: 100%; font-size: 12px; line-height: 16px; border-collapse: collapse; }
.d2-sidebar .standings-widget-body thead th {
    text-align: right;
    font-size: 10px; color: var(--muted); font-weight: 500;
    padding: 6px 8px;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--line);
}
.d2-sidebar .standings-widget-body thead th:first-child { text-align: left; }
.d2-sidebar .standings-widget-body tbody td {
    padding: 6px 8px;
    text-align: right;
    border-bottom: 1px solid var(--line);
}
.d2-sidebar .standings-widget-body tbody tr:last-child td { border-bottom: none; }
.d2-sidebar .standings-widget-body tbody td:first-child { text-align: left; }
.d2-sidebar .standings-widget-body .team-cell { display: flex; align-items: center; gap: 6px; }
.d2-sidebar .standings-widget-body .team-cell .logo {
    width: 16px; height: 16px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    overflow: hidden; background: var(--bg-soft);
}
.d2-sidebar .standings-widget-body .team-cell .logo img { width: 14px; height: 14px; object-fit: contain; }
.d2-sidebar .standings-widget-body .team-cell a {
    color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; display: inline-block;
}
.d2-sidebar .standings-widget-body .team-cell a:hover { color: var(--brand); }
.d2-sidebar .standings-widget-footer {
    border-top: 1px solid var(--line);
    text-align: center;
    padding: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--brand);
}
.d2-sidebar .standings-widget-footer:hover { background: var(--bg-soft); }

/* ---------- MATCH EVENTS (football match page) ---------- */
.d2-event-row {
    display: grid;
    grid-template-columns: 48px 28px 1fr;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid var(--line);
    gap: 12px;
    font-size: 13px;
    line-height: 20px;
}
.d2-event-row:last-child { border-bottom: none; }
.d2-event-row.away { grid-template-columns: 1fr 28px 48px; text-align: right; }
.d2-event-row.away .minute { order: 3; }
.d2-event-row.away .icon   { order: 2; }
.d2-event-row.away .detail { order: 1; }
.d2-event-row .minute { color: var(--muted); font-weight: 500; font-size: 12px; }
.d2-event-row .icon { font-size: 16px; text-align: center; }
.d2-event-row .detail .player { color: var(--ink); font-weight: 500; }
.d2-event-row .detail .sub { color: var(--muted); font-size: 12px; margin-left: 4px; }

/* ---------- STAT BARS (football match stats) ---------- */
.d2-stat-row { margin-bottom: 14px; }
.d2-stat-row:last-child { margin-bottom: 0; }
.d2-stat-row-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    font-size: 13px; line-height: 20px;
    margin-bottom: 6px;
    gap: 12px;
}
.d2-stat-row-head .v { font-weight: 700; }
.d2-stat-row-head .v:first-child { text-align: left; }
.d2-stat-row-head .v:last-child { text-align: right; }
.d2-stat-row-head .label {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    white-space: nowrap;
}
.d2-stat-bar {
    display: flex;
    gap: 2px;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    background: var(--bg-soft);
}
.d2-stat-bar .left { background: var(--brand); border-radius: 2px 0 0 2px; transition: width .2s ease; }
.d2-stat-bar .right { background: #CBD5E1; border-radius: 0 2px 2px 0; transition: width .2s ease; }

/* ---------- LINEUPS (football match page) ---------- */
.d2-lineups {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.d2-lineup {
    padding: 16px;
    border-right: 1px solid var(--line);
}
.d2-lineup:last-child { border-right: none; }
.d2-lineup-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px;
    font-size: 14px; line-height: 20px; font-weight: 700;
}
.d2-lineup-head img { width: 22px; height: 22px; object-fit: contain; }
.d2-lineup-head .formation {
    margin-left: auto;
    font-size: 11px; color: var(--muted);
    font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.d2-lineup-group { display: flex; flex-direction: column; gap: 4px; }
.d2-lineup-row {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 8px;
    font-size: 13px;
    line-height: 20px;
    padding: 2px 0;
}
.d2-lineup-row .num { color: var(--muted); text-align: right; font-size: 12px; font-weight: 500; }
.d2-lineup-row .name { color: var(--ink); font-weight: 500; }
.d2-lineup-row.muted .name { color: var(--muted); font-weight: 400; }
.d2-lineup-subs {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.d2-lineup-subs-head {
    font-size: 11px; line-height: 16px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-bottom: 6px;
}
@media (max-width: 640px) {
    .d2-lineups { grid-template-columns: 1fr; }
    .d2-lineup { border-right: none; border-bottom: 1px solid var(--line); }
    .d2-lineup:last-child { border-bottom: none; }
}

/* ---------- SQUAD GRID (football team squad) ---------- */
.d2-squad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}
.d2-squad-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}
.d2-squad-card .headshot {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--bg-soft);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.d2-squad-card .headshot img { width: 100%; height: 100%; object-fit: cover; }
.d2-squad-card .headshot .initials {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.d2-squad-card .info { min-width: 0; flex: 1; }
.d2-squad-card .info .num {
    font-size: 11px; line-height: 16px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.3px;
}
.d2-squad-card .info .name {
    font-size: 14px; line-height: 20px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.d2-squad-card .info .meta {
    font-size: 12px; line-height: 16px;
    color: var(--muted);
}

/* ---------- FOOTER ---------- */
.d2-footer {
    margin-top: 40px;
    padding: 24px var(--container-pad);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    line-height: 16px;
    text-align: center;
}
.d2-footer a { color: var(--muted); margin: 0 8px; }
.d2-footer a:hover { color: var(--brand); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .d2-page { grid-template-columns: 1fr; gap: 24px; }
    .d2-sidebar { order: 2; }
    .d2-hero h1 { font-size: 28px; }
    .d2-game-card { grid-template-columns: 1fr; gap: 12px; }
    .d2-status { border-left: none; border-top: 1px solid var(--line); padding: 12px 0 0; text-align: left; }
    .d2-cta { width: 100%; justify-content: center; }
    .d2-game-matchup { grid-template-columns: 1fr; gap: 20px; }
    .d2-team-block, .d2-team-block.away, .d2-team-block.home { align-items: center; text-align: center; }
    .d2-team-hero { grid-template-columns: 1fr; text-align: center; padding: 24px; }
    .d2-team-hero::before { display: none; }
    .d2-team-hero .mark { margin: 0 auto; }
    .d2-team-meta { justify-content: center; }
    .d2-nextgame-strip { grid-template-columns: 1fr; text-align: center; gap: 10px; }
    .d2-results-strip { grid-template-columns: repeat(3, 1fr); }
    .d2-sched-row { grid-template-columns: 1fr 1fr; gap: 6px 16px; }
    .d2-sched-date { grid-column: 1 / -1; }
    .d2-nav-links { gap: 16px; font-size: 12px; }
}
@media (max-width: 540px) {
    .d2-results-strip { grid-template-columns: repeat(2, 1fr); }
}
