:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #182230;
    --muted: #667085;
    --border: #e4e7ec;
    --brand: #162a22;
    --brand-soft: #edf4f0;
    --accent: #2f6f55;
    --danger: #a12622;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}
a { color: inherit; }
.site-header {
    background: var(--brand);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
}
.brand {
    display: inline-flex;
    align-items: baseline;
    gap: .45rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: .01em;
    text-decoration: none;
}
.brand-sub { color: rgba(255,255,255,.68); font-size: .78rem; font-weight: 600; }
.primary-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .8rem;
}
.primary-nav a {
    color: rgba(255,255,255,.82);
    text-decoration: none;
    padding: .45rem .65rem;
    border-radius: 7px;
    font-size: .94rem;
}
.primary-nav a:hover, .primary-nav a:focus-visible { background: rgba(255,255,255,.1); color: #fff; }
main { max-width: 1180px; margin: 0 auto; padding: 1.4rem 1.25rem 3rem; }
.page-heading { margin: .2rem 0 .25rem; font-size: clamp(1.65rem, 4vw, 2.2rem); }
.page-subtitle { color: var(--muted); margin: 0 0 1.25rem; }
.season-nav {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .35rem 0 1rem;
    margin-bottom: .5rem;
    scrollbar-width: thin;
}
.season-nav a {
    flex: 0 0 auto;
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .4rem .7rem;
    font-size: .88rem;
}
.season-nav a.current { background: var(--brand); color: #fff; border-color: var(--brand); }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 .8rem; font-size: 1.12rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.card-link { color: var(--accent); font-size: .9rem; font-weight: 700; text-decoration: none; padding-right: .2rem; }
.muted { color: var(--muted); }
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    margin-bottom: 1rem;
}
.card .table-wrap { margin-bottom: 0; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: .72rem .8rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th {
    background: var(--surface-soft);
    color: #475467;
    font-size: .76rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfd; }
td.numeric, th.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.player-link { font-weight: 700; text-decoration: none; }
.player-link:hover { text-decoration: underline; }
.position { width: 3.5rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.total { font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: .75rem;
    margin: 1rem 0;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .9rem;
    box-shadow: var(--shadow);
}
.stat strong { display: block; font-size: 1.45rem; margin-top: .18rem; font-variant-numeric: tabular-nums; }
.score-pill {
    display: inline-block;
    padding: .3rem .58rem;
    margin: .12rem .18rem .12rem 0;
    border-radius: 999px;
    background: var(--brand-soft);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.empty-state { padding: 1.5rem; text-align: center; color: var(--muted); }
.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: .2rem .5rem;
    font-size: .75rem;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    color: var(--muted);
}
.status-badge.active { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.score-cell { min-width: 78px; font-variant-numeric: tabular-nums; }
.score-cell small { display: block; color: var(--muted); margin-top: .18rem; }
.help-note { margin: -.2rem 0 1rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 720px) {
    .header-inner { padding: .8rem .8rem; }
    .brand-sub { display: none; }
    .primary-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .35rem;
        margin-left: 0;
        padding-bottom: 0;
        overflow: visible;
    }
    .primary-nav a {
        min-width: 0;
        text-align: center;
        white-space: nowrap;
        overflow: visible;
        padding: .45rem .35rem;
        font-size: .9rem;
    }
    main { padding: 1rem .75rem 2.5rem; }
    .section-grid { grid-template-columns: 1fr; }
    .card { padding: .85rem; }
    th, td { padding: .62rem .65rem; white-space: nowrap; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat strong { font-size: 1.25rem; }
}

@media (max-width: 430px) {
    .stat-grid { grid-template-columns: 1fr 1fr; gap: .55rem; }
    .stat { padding: .75rem; }
}

.skip-link{position:absolute;left:-9999px;top:auto}
.skip-link:focus{left:1rem;top:1rem;z-index:1000;background:#fff;color:var(--text);padding:.6rem .8rem;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.primary-nav a[aria-current="page"]{background:rgba(255,255,255,.16);color:#fff}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(47,111,85,.35);outline-offset:2px}
.scores-table thead th{position:sticky;top:0;z-index:3}
.scores-table th:first-child,.scores-table td:first-child{position:sticky;left:0;z-index:2;background:var(--surface)}
.scores-table thead th:first-child{z-index:4;background:var(--surface-soft)}
.scores-table tbody tr:hover td:first-child{background:#fcfcfd}
.score-cell.winner{background:#fffaeb}
.behind-zero{color:var(--muted)}
@media(max-width:720px){
  .scores-table th:first-child,.scores-table td:first-child{min-width:145px;box-shadow:2px 0 4px rgba(16,24,40,.05)}
}
