:root {
    color-scheme: light;
    --bg: #f5f7f8;
    --surface: #ffffff;
    --ink: #17212b;
    --muted: #667481;
    --line: #dce3e8;
    --accent: #0b6b53;
    --accent-strong: #084b3b;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
}

a {
    color: inherit;
}

.table-link {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.table-link:hover {
    text-decoration: underline;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(18px, 4vw, 56px);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.brand {
    font-weight: 800;
    text-decoration: none;
}

.topbar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.topbar nav a {
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
}

.shell {
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: 28px clamp(16px, 4vw, 48px) 64px;
}

.hero,
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

h1,
h2 {
    margin: 0;
    line-height: 1.1;
}

h1 {
    max-width: 900px;
    font-size: clamp(30px, 5vw, 56px);
}

h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid.two {
    grid-template-columns: minmax(0, 1.25fr) minmax(420px, .75fr);
}

.league-sections {
    display: grid;
    gap: 20px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}

.panel.narrow {
    max-width: 820px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.compact-table {
    min-width: 520px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 11px 10px;
    text-align: left;
    vertical-align: middle;
    font-weight: 600;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--accent-strong);
}

.button.secondary {
    background: #e6ece9;
    color: var(--accent-strong);
}

.button.secondary:hover {
    background: #d6e1dc;
}

.actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stats-row strong {
    background: #eef3f1;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 11px;
}

.auth {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 20px;
}

.auth-panel {
    width: min(420px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
}

.auth-panel h1 {
    max-width: 100%;
    font-size: 30px;
    overflow-wrap: anywhere;
}

label {
    display: grid;
    gap: 7px;
    margin: 16px 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input:not([type="checkbox"]),
select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 12px;
    font: inherit;
    color: var(--ink);
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.notice,
.error {
    border-radius: 6px;
    padding: 10px 12px;
}

.notice {
    background: #e9f7f1;
    color: #0b513f;
}

.error {
    background: #fff0ee;
    color: var(--danger);
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 980px) {
    .grid.two,
    .hero,
    .section-head {
        grid-template-columns: 1fr;
        display: grid;
        align-items: start;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
