:root {
    --midnight-navy: #0B1220;
    --ice-white: #F8FAFC;
    --electric-blue: #2563EB;
    --steel-blue: #334155;
    --cool-gray: #94A3B8;
    --silver: #CBD5E1;
    --victory-gold: #FACC15;
    --alert-red: #DC2626;
    --success-green: #16A34A;
    --panel: rgba(15, 23, 42, 0.7);
    --line: rgba(203, 213, 225, 0.18);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ice-white);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 72% 20%, rgba(37, 99, 235, 0.18), transparent 28rem),
        linear-gradient(135deg, #0B1220 0%, #111827 58%, #0B1220 100%);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    background-image:
        linear-gradient(rgba(203, 213, 225, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(203, 213, 225, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 86%);
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(248, 250, 252, 0.2);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.08);
    box-shadow: 0 12px 34px rgba(37, 99, 235, 0.24);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 0.96rem;
    letter-spacing: 0;
}

.brand-copy span {
    color: var(--cool-gray);
    font-size: 0.78rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(11, 18, 32, 0.52);
    backdrop-filter: blur(18px);
    overflow-x: auto;
}

.nav-links a {
    min-width: max-content;
    padding: 10px 14px;
    border-radius: 6px;
    color: var(--silver);
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

.nav-links a:hover {
    color: var(--ice-white);
    background: rgba(37, 99, 235, 0.34);
}

main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
    gap: 56px;
    align-items: center;
    min-height: calc(100vh - 214px);
    padding: 42px 0 38px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow,
.panel-label {
    margin: 0 0 14px;
    color: var(--victory-gold);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 820px;
    margin-bottom: 18px;
    font-size: clamp(3.3rem, 7vw, 6.7rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: 0;
}

.hero-text {
    max-width: 630px;
    margin-bottom: 28px;
    color: var(--silver);
    font-size: clamp(1.06rem, 2vw, 1.28rem);
    line-height: 1.65;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 900;
}

.button.primary {
    color: var(--ice-white);
    background: var(--electric-blue);
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.34);
}

.button.primary:hover {
    background: #1D4ED8;
}

.button.secondary {
    border-color: var(--line);
    color: var(--ice-white);
    background: rgba(248, 250, 252, 0.08);
}

.button.full {
    width: 100%;
}

.logo-showcase {
    position: relative;
    display: grid;
    min-height: 430px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(248, 250, 252, 0.1), rgba(248, 250, 252, 0.02)),
        radial-gradient(circle at 50% 44%, rgba(37, 99, 235, 0.2), transparent 18rem),
        rgba(11, 18, 32, 0.52);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.logo-showcase::before,
.logo-showcase::after {
    position: absolute;
    content: "";
}

.logo-showcase::before {
    inset: 22px;
    border: 1px solid rgba(203, 213, 225, 0.16);
    border-radius: 8px;
}

.logo-showcase::after {
    width: 72%;
    height: 72%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.12), transparent 62%);
    filter: blur(6px);
}

.logo-frame {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(76%, 340px);
    aspect-ratio: 1;
    place-items: center;
    padding: 18px;
    border: 1px solid rgba(248, 250, 252, 0.16);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.08);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.34));
}

.league-strip,
.content-grid {
    display: grid;
    gap: 16px;
}

.league-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 0 16px;
}

.league-strip article,
.panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.league-strip article {
    min-height: 128px;
    padding: 24px;
}

.league-strip strong {
    display: block;
    margin-bottom: 8px;
    color: var(--ice-white);
    font-size: 1.16rem;
}

.league-strip p,
.panel p {
    color: var(--silver);
    line-height: 1.6;
}

.league-strip p {
    margin-bottom: 0;
    font-size: 0.92rem;
}

.content-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr) minmax(280px, 0.72fr);
    padding: 20px 0 64px;
}

.panel {
    min-height: 260px;
    padding: 26px;
}

.feature-panel {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.78), rgba(11, 18, 32, 0.86));
}

.panel h2 {
    margin-bottom: 14px;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.compact-panel h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.72rem);
}

.page-hero {
    max-width: 850px;
    padding: 68px 0 34px;
}

.page-hero h1 {
    max-width: 850px;
    margin-bottom: 16px;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1;
}

.page-hero p:last-child {
    max-width: 680px;
    color: var(--silver);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.65;
    font-weight: 600;
}

.dashboard-grid,
.card-grid,
.profile-grid,
.rules-layout {
    display: grid;
    gap: 16px;
    padding: 18px 0 72px;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.wide-panel {
    grid-row: span 2;
}

.table-list,
.stat-stack,
.activity-list {
    display: grid;
    gap: 10px;
}

.table-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(203, 213, 225, 0.14);
    border-radius: 8px;
    color: var(--silver);
    font-size: 0.92rem;
    font-weight: 700;
    background: rgba(248, 250, 252, 0.05);
}

.table-head {
    color: var(--cool-gray);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.stat-stack span,
.activity-list span {
    display: block;
    padding: 13px 14px;
    border: 1px solid rgba(203, 213, 225, 0.14);
    border-radius: 8px;
    color: var(--silver);
    font-size: 0.92rem;
    font-weight: 700;
    background: rgba(248, 250, 252, 0.05);
}

.stat-stack strong {
    color: var(--ice-white);
}

.card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-card,
.player-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.team-card {
    min-height: 250px;
    padding: 24px;
}

.team-badge {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin-bottom: 28px;
    border-radius: 8px;
    color: var(--midnight-navy);
    font-weight: 900;
}

.team-badge.gold {
    background: var(--victory-gold);
}

.team-badge.blue {
    color: var(--ice-white);
    background: var(--electric-blue);
}

.team-badge.silver {
    background: var(--silver);
}

.team-badge.green {
    color: var(--ice-white);
    background: var(--success-green);
}

.team-badge:not(.gold):not(.blue):not(.silver):not(.green) {
    color: var(--ice-white);
    background: var(--steel-blue);
}

.table-row--standings {
    grid-template-columns: 2rem minmax(0, 1fr) repeat(5, auto);
}

.table-row--players {
    grid-template-columns: minmax(0, 1.2fr) 4rem repeat(4, 3rem);
}

.results-list {
    display: grid;
    gap: 10px;
}

.result-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid rgba(203, 213, 225, 0.14);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.05);
}

.result-matchup {
    color: var(--ice-white);
    font-size: 0.92rem;
    font-weight: 700;
}

.result-date {
    color: var(--cool-gray);
    font-size: 0.82rem;
    font-weight: 600;
}

.empty-note {
    margin: 0;
    color: var(--cool-gray);
    font-size: 0.95rem;
    font-weight: 600;
}

/* ---- Live league data UI ---- */

.page-hero--compact {
    padding: 48px 0 20px;
}

.page-hero--compact h1 {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
}

.page-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.season-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.season-pill {
    color: var(--ice-white);
    border: 1px solid rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.12);
}

.status-pill {
    color: var(--silver);
    border: 1px solid var(--line);
    background: rgba(248, 250, 252, 0.06);
}

.snapshot-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.snapshot-link,
.panel-link {
    color: var(--victory-gold);
    font-size: 0.88rem;
    font-weight: 800;
}

.snapshot-link:hover,
.panel-link:hover {
    color: var(--ice-white);
}

.stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-tile {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.14), rgba(15, 23, 42, 0.75));
    box-shadow: var(--shadow);
}

.stat-tile-label {
    display: block;
    margin-bottom: 8px;
    color: var(--cool-gray);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-tile-value {
    display: block;
    color: var(--ice-white);
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    line-height: 1.1;
}

.stat-tile-sub {
    display: block;
    margin-top: 6px;
    color: var(--victory-gold);
    font-size: 0.82rem;
    font-weight: 800;
}

.league-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
    gap: 16px;
    padding-bottom: 28px;
}

.league-sidebar {
    display: grid;
    gap: 14px;
    align-content: start;
}

.league-sidebar .panel {
    min-height: auto;
    padding: 20px;
}

.home-snapshot {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 16px;
    padding: 8px 0 72px;
}

.panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.panel-hint,
.section-head .panel-hint {
    margin: 4px 0 0;
    color: var(--cool-gray);
    font-size: 0.84rem;
    font-weight: 600;
}

.panel--table {
    min-height: auto;
}

.section-head {
    margin-bottom: 14px;
}

.results-section {
    padding-bottom: 72px;
}

.table-scroll {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 225, 0.12);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead {
    background: rgba(248, 250, 252, 0.06);
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(203, 213, 225, 0.1);
    white-space: nowrap;
}

.data-table th {
    color: var(--cool-gray);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.08);
}

.data-table tbody tr.is-leader {
    background: rgba(250, 204, 21, 0.08);
}

.data-table .col-num {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.data-table .col-pts strong {
    color: var(--victory-gold);
}

.data-table .col-diff.diff-pos {
    color: var(--success-green);
}

.data-table .col-diff.diff-neg {
    color: var(--alert-red);
}

.rank-pill {
    display: inline-grid;
    min-width: 1.75rem;
    place-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--ice-white);
    font-size: 0.82rem;
    font-weight: 900;
    background: rgba(248, 250, 252, 0.1);
}

.is-leader .rank-pill {
    color: var(--midnight-navy);
    background: var(--victory-gold);
}

.team-line {
    display: grid;
    gap: 2px;
}

.team-abbr {
    color: var(--ice-white);
    font-weight: 900;
    letter-spacing: 0.04em;
}

.team-full {
    color: var(--cool-gray);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: normal;
    max-width: 14rem;
}

.leaderboard {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(203, 213, 225, 0.12);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.04);
}

.leaderboard-rank {
    color: var(--cool-gray);
    font-size: 0.82rem;
    font-weight: 900;
    text-align: center;
}

.leaderboard-item:first-child .leaderboard-rank {
    color: var(--victory-gold);
}

.leaderboard-player {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.leaderboard-player strong {
    color: var(--ice-white);
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-team {
    color: var(--cool-gray);
    font-size: 0.76rem;
    font-weight: 700;
}

.leaderboard-value {
    color: var(--victory-gold);
    font-size: 0.88rem;
    font-weight: 900;
    text-align: right;
}

.leaderboard-detail {
    grid-column: 2 / -1;
    color: var(--cool-gray);
    font-size: 0.76rem;
    font-weight: 700;
}

.scoreboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.scoreboard-stack {
    display: grid;
    gap: 12px;
}

.scoreboard-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(51, 65, 85, 0.45), rgba(11, 18, 32, 0.9));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.scoreboard-team {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.scoreboard-team.is-winner .scoreboard-score {
    color: var(--victory-gold);
}

.scoreboard-team.is-winner .scoreboard-abbr {
    color: var(--ice-white);
}

.scoreboard-abbr {
    color: var(--cool-gray);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.scoreboard-name {
    color: var(--silver);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scoreboard-score {
    color: var(--ice-white);
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.scoreboard-center {
    display: grid;
    place-items: center;
}

.scoreboard-vs {
    color: var(--cool-gray);
    font-size: 0.9rem;
    font-weight: 900;
}

.scoreboard-meta {
    grid-column: 1 / -1;
    margin: 4px 0 0;
    padding-top: 10px;
    border-top: 1px solid rgba(203, 213, 225, 0.1);
    color: var(--cool-gray);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
}

.card-grid--teams {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.team-card--active {
    border-color: rgba(37, 99, 235, 0.35);
    background: linear-gradient(160deg, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.88));
}

.team-card--idle {
    opacity: 0.82;
}

.team-badge--muted {
    background: rgba(148, 163, 184, 0.35);
    color: var(--ice-white);
}

.team-record {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 18px 0 8px;
}

.record-big {
    color: var(--ice-white);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.record-label {
    color: var(--cool-gray);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.team-idle-note {
    margin-top: 16px;
    color: var(--cool-gray);
    font-size: 0.88rem;
    font-weight: 600;
}

.teams-section {
    padding-bottom: 36px;
}

.featured-scorer {
    padding-bottom: 20px;
}

.featured-meta {
    color: var(--silver);
    font-weight: 600;
}

.profile-stats--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.players-table-panel {
    margin-bottom: 72px;
}

.players-table .col-player strong {
    color: var(--ice-white);
}

/* ---- Detail pages (team / player / game) ---- */

.detail-hero {
    margin-bottom: 8px;
    padding: 36px 0 8px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--team-primary, #2563eb) 28%, transparent),
        rgba(11, 18, 32, 0.2) 55%
    );
}

.detail-hero--compact {
    padding-top: 28px;
}

.detail-hero-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.team-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.team-brand-mark {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--team-primary) 55%, white 10%);
    border-radius: 16px;
    background: linear-gradient(
        145deg,
        var(--team-primary),
        var(--team-secondary)
    );
    box-shadow: 0 16px 40px color-mix(in srgb, var(--team-primary) 35%, transparent);
}

.team-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-monogram {
    color: var(--ice-white);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.team-brand-copy h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.05;
}

.team-brand-meta {
    margin: 8px 0 0;
    color: var(--silver);
    font-weight: 600;
}

.detail-record-card {
    min-width: 180px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(11, 18, 32, 0.55);
    text-align: right;
}

.detail-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
    color: var(--cool-gray);
    font-size: 0.82rem;
    font-weight: 700;
}

.detail-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin-top: 18px;
    padding-bottom: 8px;
}

.detail-subnav a {
    color: var(--victory-gold);
    font-size: 0.9rem;
    font-weight: 800;
}

.detail-subnav a:hover {
    color: var(--ice-white);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 16px;
    padding: 22px 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.mini-stat {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(203, 213, 225, 0.12);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.04);
}

.mini-stat span {
    color: var(--cool-gray);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mini-stat strong {
    color: var(--ice-white);
    font-size: 1.2rem;
}

.schedule-list {
    display: grid;
    gap: 10px;
}

.schedule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.04);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.schedule-row:hover {
    border-color: rgba(37, 99, 235, 0.45);
    background: rgba(37, 99, 235, 0.1);
}

.schedule-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.schedule-badge {
    display: grid;
    min-width: 2.2rem;
    place-items: center;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 900;
}

.schedule-badge--win {
    color: var(--midnight-navy);
    background: var(--victory-gold);
}

.schedule-badge--loss {
    color: var(--ice-white);
    background: rgba(220, 38, 38, 0.75);
}

.schedule-badge--upcoming {
    color: var(--ice-white);
    background: rgba(37, 99, 235, 0.55);
}

.schedule-matchup {
    color: var(--ice-white);
    font-weight: 800;
}

.schedule-opponent-name {
    display: block;
    color: var(--cool-gray);
    font-size: 0.8rem;
    font-weight: 600;
}

.schedule-score {
    color: var(--ice-white);
    font-size: 1.2rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.schedule-time {
    color: var(--silver);
    font-size: 0.88rem;
    font-weight: 700;
}

.entity-link {
    color: inherit;
    text-decoration: none;
}

.entity-link:hover strong,
.entity-link:hover .team-abbr {
    color: var(--victory-gold);
}

.entity-link--on-dark:hover {
    color: var(--victory-gold);
}

.cell-sub {
    display: block;
    margin-top: 2px;
    color: var(--cool-gray);
    font-size: 0.76rem;
    font-weight: 600;
}

.team-line.entity-link {
    display: grid;
    gap: 2px;
}

.team-mark {
    margin-bottom: 20px;
}

.team-mark-badge {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--team-primary) 60%, white 12%);
    border-radius: 14px;
    background: linear-gradient(145deg, var(--team-primary), var(--team-secondary));
    box-shadow: 0 12px 32px color-mix(in srgb, var(--team-primary) 30%, transparent);
}

.team-mark--lg .team-mark-badge {
    width: 84px;
    height: 84px;
}

.team-mark-badge img {
    width: 78%;
    height: 78%;
    object-fit: contain;
}

.team-card--link {
    display: block;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.team-card--link:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--team-primary, #2563eb) 50%, white 15%);
}

.scoreboard-card {
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.scoreboard-card:hover {
    border-color: rgba(250, 204, 21, 0.35);
    transform: translateY(-1px);
}

.player-hero {
    display: flex;
    align-items: center;
    gap: 18px;
}

.player-avatar {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 16px;
    color: var(--midnight-navy);
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(145deg, var(--victory-gold), #f59e0b);
}

.player-hero-meta {
    margin-top: 8px;
    color: var(--silver);
    font-weight: 600;
}

.boxscore-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding-bottom: 72px;
}

.boxscore-side {
    min-height: auto;
    border-top: 4px solid var(--team-primary, #2563eb);
}

.boxscore-team-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.boxscore-team-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.boxscore-team-names {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.boxscore-team-names span {
    color: var(--cool-gray);
    font-size: 0.8rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.boxscore-team-score {
    color: var(--victory-gold);
    font-size: 2rem;
    font-weight: 900;
}

.boxscore-team-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 12px;
    color: var(--cool-gray);
    font-size: 0.8rem;
    font-weight: 700;
}

.boxscore-table th,
.boxscore-table td {
    padding: 8px 10px;
    font-size: 0.84rem;
}

@media (max-width: 980px) {
    .detail-grid,
    .boxscore-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-record-card {
        text-align: left;
    }

    .detail-record-meta {
        justify-content: flex-start;
    }
}

.team-card h2,
.player-card h2 {
    margin-bottom: 8px;
    font-size: 1.55rem;
}

.team-card p,
.player-card p {
    color: var(--silver);
    line-height: 1.55;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.card-meta span {
    padding: 8px 10px;
    border: 1px solid rgba(203, 213, 225, 0.14);
    border-radius: 8px;
    color: var(--silver);
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(248, 250, 252, 0.05);
}

.profile-grid {
    grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1fr);
}

.player-card {
    min-height: 360px;
    padding: 28px;
}

.featured-player {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.82));
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 34px;
}

.profile-stats span {
    display: grid;
    min-height: 92px;
    align-content: center;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(203, 213, 225, 0.14);
    border-radius: 8px;
    color: var(--cool-gray);
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(248, 250, 252, 0.06);
}

.profile-stats strong {
    color: var(--ice-white);
    font-size: 1.8rem;
}

.rules-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .hero,
    .content-grid,
    .dashboard-grid,
    .profile-grid,
    .rules-layout,
    .league-layout,
    .home-snapshot,
    .stat-strip {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding-top: 34px;
    }

    .logo-showcase {
        max-width: 620px;
    }

    .league-strip {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .site-header {
        width: min(100% - 28px, 1180px);
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    main {
        width: min(100% - 28px, 1180px);
    }

    .nav-links,
    .hero-actions {
        width: 100%;
    }

    .nav-links {
        justify-content: space-between;
    }

    .nav-links a {
        min-width: 0;
        flex: 1;
    }

    .hero-actions .button,
    .cookie-banner-actions .button {
        width: 100%;
    }

    .logo-showcase {
        min-height: 330px;
    }

    .panel,
    .league-strip article,
    .team-card,
    .player-card {
        padding: 20px;
    }

    .page-hero {
        padding-top: 44px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .table-row,
    .profile-stats,
    .profile-stats--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .scoreboard-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .scoreboard-team {
        justify-items: center;
    }

    .scoreboard-center {
        order: -1;
    }

    .leaderboard-item {
        grid-template-columns: 2rem 1fr;
    }

    .leaderboard-value {
        grid-column: 2;
        text-align: left;
    }

    .leaderboard-detail {
        grid-column: 2;
    }
}

/* Site footer */
.site-footer {
    width: min(100% - 40px, 1180px);
    margin: 0 auto 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-footer-brand {
    margin: 0;
    color: var(--cool-gray);
    font-size: 0.88rem;
    font-weight: 700;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
}

.site-footer-links a,
.footer-link-button {
    color: var(--silver);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.site-footer-links a:hover,
.footer-link-button:hover {
    color: var(--ice-white);
}

.footer-link-button {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Rules PDF page */
.rules-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 12px;
    color: var(--cool-gray);
    font-size: 0.88rem;
    font-weight: 800;
}

.rules-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.rules-pdf-section {
    padding: 0 0 48px;
}

.rules-pdf-viewer {
    display: block;
    width: 100%;
    min-height: 70vh;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
}

.rules-pdf-fallback {
    margin-top: 12px;
    color: var(--silver);
    font-size: 0.92rem;
    font-weight: 600;
}

.rules-pdf-fallback a {
    color: var(--electric-blue);
}

.related-rules {
    padding-bottom: 72px;
}

.related-rules h2 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.related-rules > p {
    color: var(--silver);
    margin-bottom: 16px;
}

.related-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.related-rules-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--silver);
    font-weight: 700;
}

.related-rules-list em {
    color: var(--cool-gray);
    font-style: normal;
    font-size: 0.85rem;
}

.page-hero-compact {
    padding-bottom: 24px;
}

.legal-updated {
    color: var(--cool-gray);
    font-size: 0.92rem;
    font-weight: 700;
}

/* Legal documents */
.legal-doc {
    max-width: 42rem;
    margin: 0 auto 72px;
    padding-bottom: 24px;
    color: var(--silver);
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 600;
}

.legal-doc h2 {
    margin: 2rem 0 0.75rem;
    color: var(--ice-white);
    font-size: 1.25rem;
}

.legal-doc h3 {
    margin: 1.25rem 0 0.5rem;
    color: var(--ice-white);
    font-size: 1.05rem;
}

.legal-doc p,
.legal-doc li {
    margin-bottom: 0.85rem;
}

.legal-doc ol,
.legal-doc ul {
    padding-left: 1.35rem;
    margin-bottom: 1rem;
}

.legal-doc a {
    color: var(--electric-blue);
}

.legal-toc {
    margin-bottom: 2rem;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.legal-toc h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.legal-toc ol {
    margin: 0;
    padding-left: 1.25rem;
}

.legal-definitions dt {
    margin-top: 12px;
    color: var(--ice-white);
    font-weight: 800;
}

.legal-definitions dd {
    margin: 4px 0 0;
}

.legal-regional {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.legal-notice {
    margin-top: 2rem;
    padding: 14px;
    border-left: 3px solid var(--electric-blue);
    background: rgba(37, 99, 235, 0.08);
    font-size: 0.88rem;
}

.legal-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.legal-table th,
.legal-table td {
    padding: 10px 12px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    color: var(--ice-white);
    background: rgba(248, 250, 252, 0.06);
}

.legal-table code {
    font-size: 0.9em;
}

.legal-inline-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--electric-blue);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

/* Cookie banner */
.cookie-banner.cookie-banner--hidden {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    padding: 16px;
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.cookie-banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    width: min(100% - 32px, 1180px);
    margin: 0 auto;
}

.cookie-banner-title {
    margin: 0 0 6px;
    color: var(--ice-white);
    font-size: 1rem;
    font-weight: 900;
}

.cookie-banner-copy p {
    margin: 0;
    max-width: 52rem;
    color: var(--silver);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.5;
}

.cookie-banner-copy a {
    color: var(--electric-blue);
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cookie-banner-actions .button {
    width: auto;
    min-width: 0;
    padding: 10px 16px;
    font-size: 0.82rem;
}

@media (max-width: 680px) {
    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner-actions .button {
        width: 100%;
    }

    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Header — account actions separate from main nav */
.site-header-end {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.nav-account {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
}

.nav-account-user {
    max-width: 120px;
    overflow: hidden;
    color: var(--victory-gold);
    font-size: 0.82rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-account-link {
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--silver);
    font-size: 0.88rem;
    font-weight: 700;
}

.nav-account-link:hover {
    color: var(--ice-white);
    background: rgba(37, 99, 235, 0.28);
}

.nav-account-cta {
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.88rem;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .site-header-end {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .nav-account {
        justify-content: flex-end;
    }
}

@media (max-width: 680px) {
    .site-header-end {
        gap: 10px;
    }

    .nav-account {
        width: 100%;
        justify-content: stretch;
    }

    .nav-account-link {
        flex: 1;
        text-align: center;
    }

    .nav-account-cta {
        flex: 1;
    }
}

/* Player ratings (0–100 OVR) */
.detail-record-card--rating .record-big {
    color: var(--victory-gold);
}

.ratings-overview {
    margin-bottom: 24px;
}

.ratings-panel .ratings-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 0 20px 20px;
}

.ratings-stat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(11, 18, 32, 0.45);
}

.ratings-stat-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cool-gray);
}

.ratings-stat-sub {
    font-size: 0.8rem;
    color: var(--silver);
    font-weight: 600;
}

.rating-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.2;
    border: 1px solid transparent;
}

.rating-pill--lg {
    min-width: 3.25rem;
    padding: 8px 14px;
    font-size: 1.35rem;
}

.rating-pill--elite {
    color: #0b1220;
    background: linear-gradient(135deg, #f5d565, #e8b923);
    border-color: rgba(245, 213, 101, 0.5);
}

.rating-pill--strong {
    color: #e8f4ff;
    background: rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.45);
}

.rating-pill--solid {
    color: #e8f4ff;
    background: rgba(99, 179, 237, 0.15);
    border-color: rgba(99, 179, 237, 0.35);
}

.rating-pill--avg {
    color: var(--ice-white);
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(148, 163, 184, 0.35);
}

.rating-pill--low {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.4);
}

.rating-pill--na {
    color: var(--cool-gray);
    background: transparent;
    border-color: var(--line);
}

.col-ovr {
    width: 4.5rem;
    text-align: center;
    white-space: nowrap;
}

.game-log-table .col-opp {
    font-weight: 700;
}

.game-log-table .col-perf .perf-line {
    display: inline-block;
    margin-right: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--silver);
}

.game-log-table .col-perf .perf-line:first-child {
    color: var(--ice-white);
}

@media (max-width: 720px) {
    .ratings-panel .ratings-overview-grid {
        grid-template-columns: 1fr;
    }
}
