:root {
    color-scheme: light;
    font: 1rem/1.55 system-ui, sans-serif;
    color: #16253b;
    background: #edf1f6;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: #8a263b; text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: .16rem solid #345c9c;
    outline-offset: .16rem;
}

.site-header { background: #17263d; color: #fff; }
.header-inner {
    max-width: 64rem;
    min-height: 4rem;
    padding: .75rem 1.25rem;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.site-header a, .text-button { color: inherit; }
.wordmark { font-weight: 750; text-decoration: none; font-size: 1.2rem; }
nav { display: flex; align-items: center; gap: 1rem; }
button { font: inherit; cursor: pointer; }
.text-button { padding: 0; border: 0; background: transparent; text-decoration: underline; }

main { max-width: 32rem; margin: clamp(2rem, 8vw, 5rem) auto; padding: 0 1rem; }
.panel { padding: clamp(1.2rem, 5vw, 2.25rem); border: 1px solid #ccd6e3; background: #fff; border-radius: .65rem; }
h1 { font-size: clamp(1.75rem, 5vw, 2.25rem); line-height: 1.15; margin: 0 0 1.4rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
label { display: block; font-size: .9rem; font-weight: 650; }
input:not([type="hidden"]) {
    width: 100%;
    min-height: 2.65rem;
    padding: .5rem .65rem;
    margin: .35rem 0 0;
    border: 1px solid #889aaf;
    border-radius: .3rem;
    font: inherit;
    color: inherit;
}

.primary { padding: .6rem 1rem; color: #fff; background: #8a263b; border: 0; border-radius: .3rem; font-weight: 650; }
.secondary { margin-top: 1.15rem; }
.errorlist, .helptext { font-size: .9rem; }
.errorlist { color: #8b1c29; padding-left: 1.2rem; }
.message { padding: .7rem 1rem; background: #deeee5; border-radius: .3rem; }
.message.error { display: flex; align-items: baseline; gap: .55rem; background: #fce7e9; color: #8b1c29; border: 1px solid #ce7883; }
.message-icon { color: #a82435; font-size: 1.35em; font-weight: 800; line-height: 1; }

.dashboard { max-width: 64rem; margin-top: clamp(1.5rem, 5vw, 3.25rem); }
.dashboard-heading { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; justify-content: space-between; margin-bottom: 1.25rem; }
.dashboard-heading h1, .dashboard-heading p { margin: 0; }
.dashboard-heading p, .transactions time { color: #4d6078; }
.league-section + .league-section { margin-top: 1rem; }
.league-section h2 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 .9rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: right; font-variant-numeric: tabular-nums; }
th, td { padding: .55rem .65rem; border-bottom: 1px solid #dfe6ef; }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
thead th { color: #4d6078; font-size: .875rem; white-space: nowrap; }
.matchup-grid, .transactions { list-style: none; padding: 0; margin: 0; }
.matchup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .75rem; }
.matchup { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1.2rem; padding: .75rem; border: 1px solid #dfe6ef; border-radius: .35rem; }
.transactions li { display: flex; flex-wrap: wrap; gap: .25rem .6rem; padding: .5rem 0; }
.transactions time { margin-left: auto; }

nav, .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; }
.row-actions form { margin: 0; }
.link-button { padding: 0; border: 0; background: transparent; color: #8a263b; text-decoration: underline; }
.plain { padding: .55rem .85rem; background: #edf1f6; border: 1px solid #889aaf; border-radius: .3rem; color: inherit; }
select, textarea, input[type="search"] {
    width: 100%; min-height: 2.65rem; padding: .45rem .65rem; margin-top: .35rem;
    border: 1px solid #889aaf; border-radius: .3rem; font: inherit; color: inherit; background: #fff;
}
input:is([type="checkbox"], [type="radio"]) { width: auto; min-height: unset; margin: 0; }
.check { display: flex; align-items: center; gap: .45rem; min-height: 2.2rem; }
textarea { min-height: 5rem; resize: vertical; }
fieldset { border: 1px solid #ccd6e3; border-radius: .3rem; margin: 1rem 0; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; }
.filters > label { flex: 1 1 9rem; }
.filters > .check { flex: 0 0 auto; min-height: 2.65rem; }
.filters .primary { min-height: 2.65rem; }
.form-action, .team-actions, .paging { margin-top: 1.15rem; }
.margin-link { margin-left: .75rem; }
.stat-table { white-space: nowrap; }
.stat-table th[scope="row"] { text-align: left; }
.stat-table small { display: block; color: #4d6078; font-size: .8rem; font-weight: normal; }
.stat-table td:last-child { padding-right: 0; }
.stat-table a { color: inherit; }
.paging { justify-content: center; }
.team-stats .lineup-position { width: auto; min-height: 2rem; padding: .25rem .4rem; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.simulation-bar { background: #ffe3a3; color: #30220a; border-bottom: 1px solid #af7d2b; }
.simulation-inner {
    max-width: 64rem; margin: 0 auto; padding: .7rem 1.25rem;
    display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.15rem;
}
.simulation-inner form { flex: 1 1 28rem; }
.simulation-inner .filters > label { flex-basis: 7rem; }
.simulation-inner a { color: #583800; }

.stat-table th.player-column { text-align: left; }
.team-stats :is(th, td):first-child { padding-left: 1rem; }
.team-stats :is(th, td):last-child { padding-right: 1rem; }
.team-stats .alternate-divider th {
    text-align: left;
    padding-block: .45rem;
    background: #d3d9e1;
    color: #283542;
    border-top: 2px solid #8b97a6;
}
.team-stats .reserve-row > * {
    background: #e8ebf0;
    color: #46515f;
    border-bottom-color: #c7ced8;
}
.team-stats .open-slot > * { background: #fff5dd; color: #694900; }
.team-stats tfoot { background: #e8eff7; font-weight: 650; }
