/* Palette, type and rhythm are shared by every league view. */
:root {
  color-scheme: light;
  --ground: #f2f6f9;
  --paper: #ffffff;
  --layer: #e7eef4;
  --ink: #102b3d;
  --quiet: #455c6d;
  --rule: #c7d5de;
  --accent: #27b2ec;
  --accent-ink: #082438;
  --link: #075e85;
  --focus: #126dce;
  --danger: #a02939;
  --danger-bg: #fff0ef;
  --success: #216349;
  --success-bg: #e8f6e9;
  --nav: #102e47;
  --nav-ink: #f7fbff;
  --nav-muted: #c2d7e4;
  --radius: 12px;
  --type: "Barlow", "Arial", sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", "Arial", sans-serif;
  --numeric: "IBM Plex Mono", "Consolas", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #101c28; --paper: #172a39; --layer: #223848; --ink: #f1f6fb;
    --quiet: #b5c9d9; --rule: #40586c; --link: #77cefa; --focus: #9ec7ff;
    --danger: #ffacaf; --danger-bg: #4a272c; --success: #9eddb4; --success-bg: #223b2d;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #101c28; --paper: #172a39; --layer: #223848; --ink: #f1f6fb;
  --quiet: #b5c9d9; --rule: #40586c; --link: #77cefa; --focus: #9ec7ff;
  --danger: #ffacaf; --danger-bg: #4a272c; --success: #9eddb4; --success-bg: #223b2d;
}
*, *::before, *::after { box-sizing: border-box }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1rem/1.5 var(--type); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
a { color: var(--link); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ol, ul, dl { margin-block: 0 .7em; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 750; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 4.3rem); line-height: .99; letter-spacing: -.054em; }
h2 { font-size: clamp(1.45rem, 2.7vw, 2.15rem); line-height: 1.12; letter-spacing: -.037em; }
h3 { font-size: 1.22rem; line-height: 1.2; letter-spacing: -.015em; }
small, .muted, .subtle { color: var(--quiet); }
.eyebrow, .kicker { font-weight: 750; letter-spacing: .1em; font-size: .79rem; text-transform: uppercase; color: var(--link); margin-bottom: .55rem; }
.app-shell { min-height: 100svh; display: grid; grid-template-columns: 15rem minmax(0, 1fr); }
.sidebar { background: var(--nav); color: var(--nav-ink); padding: 1.4rem 1rem; align-self: start; position: sticky; top: 0; max-height: 100svh; overflow: auto; min-height: 100svh; }
.brand { display: flex; align-items: center; gap: .68rem; color: inherit; font-family: var(--display); font-weight: 800; font-size: 1.42rem; line-height: 1.08; letter-spacing: -.035em; text-decoration: none; }
.brand .shield-logo { display: block; width: 10rem; height: auto; max-width: 100%; }
.auth-card .brand, .sidebar .brand { justify-content: center; }
.auth-card .shield-logo { width: 12rem; }
@media (max-width: 800px) { .sidebar .shield-logo { width: 5.5rem; } }
.sidebar .brand { margin: .2rem .2rem 1.7rem; }
.nav { display: grid; gap: .22rem; }
.nav-item, .nav > a, .nav > button { display: flex; align-items: center; gap: .68rem; border: 0; padding: .63rem .8rem; min-height: 2.65rem; border-radius: .45rem; background: transparent; color: var(--nav-muted); text-decoration: none; text-align: left; font-weight: 620; }
.nav .active, .nav [aria-current="page"], .nav-item.active, .nav-item[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 750; }
.nav-item:hover, .nav > a:hover, .nav > button:hover { box-shadow: inset 0 0 0 1px #84adc3; }
.sidebar .eyebrow, .sidebar small { color: var(--nav-muted); }
.sidebar :focus-visible { outline-color: white; }
.workspace, .main { min-width: 0; padding: 0 clamp(1rem, 3vw, 3rem) 3rem; }
.workspace > *, .main > * { max-width: 91rem; margin-inline: auto; }
.topbar, .toolbar, .actions, .page-header, .panel-head { display: flex; gap: .8rem 1.1rem; align-items: center; flex-wrap: wrap; }
.topbar { min-height: 4rem; justify-content: space-between; border-bottom: 1px solid var(--rule); font-weight: 650; }
.page-header { margin-block: clamp(1.4rem, 3.5vw, 2.8rem) 1.5rem; align-items: end; justify-content: space-between; }
.page-header h1, .panel-head h2, .panel-head h3 { margin-bottom: 0; }
.page-header p { max-width: 56ch; }
.toolbar { justify-content: space-between; margin-block: .8rem; }
.actions { gap: .55rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; align-items: start; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .card { min-width: 0; padding: clamp(1rem, 2vw, 1.45rem); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.panel-head { justify-content: space-between; padding-bottom: .85rem; margin-bottom: .85rem; border-bottom: 1px solid var(--rule); }
.panel > :last-child, .card > :last-child { margin-bottom: 0; }
.scoreboard { color: var(--nav-ink); background: linear-gradient(112deg,#104567 0%,#153952 55%,#0d2b41 100%); border-top: .32rem solid var(--accent); padding: clamp(1.2rem, 3vw, 2.7rem); border-radius: var(--radius); }
.scoreboard, .auth-shell { position: relative; isolation: isolate; }
.scoreboard::before, .auth-shell::before { content: ""; pointer-events: none; position: absolute; inset: 0; z-index: -1; border-radius: inherit; }
.auth-shell::before {
  background:
    radial-gradient(circle at 16% 52%, transparent calc(8rem - 1px), #b5e9ff29 8rem, #b5e9ff29 calc(8rem + 2px), transparent calc(8rem + 3px)),
    linear-gradient(90deg, transparent calc(16% - 1px), #b5e9ff25 16%, #b5e9ff25 calc(16% + 1px), transparent calc(16% + 2px)),
    radial-gradient(ellipse 21rem 26rem at 100% 52%, transparent 88%, #b5e9ff22 calc(88% + 1px), #b5e9ff22 calc(88% + 2px), transparent calc(88% + 3px));
}
.scoreboard::before {
  background:
    radial-gradient(circle at 92% 50%, transparent 4.9rem, #b5e9ff1f calc(4.9rem + 1px), #b5e9ff1f calc(4.9rem + 2px), transparent calc(4.9rem + 3px)),
    linear-gradient(90deg, transparent calc(92% - 1px), #b5e9ff1a 92%, transparent calc(92% + 2px));
}
[data-sport="NFL"] .scoreboard::before, [data-sport="football"] .scoreboard::before {
  background: repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 2px), #b5e9ff15 calc(12.5% - 1px) 12.5%);
}
.scoreboard :is(.eyebrow, .kicker) { color: var(--accent); }
.scoreboard :is(.muted, small) { color: var(--nav-muted); }
.scoreboard a { color: var(--accent); }
.matchup { min-width: 0; }
.team-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .66rem 0; }
.team-row + .team-row { border-top: 1px solid var(--rule); }
.scoreboard .team-row + .team-row { border-color: #476981; }
.team-mark { display: inline-grid; place-items: center; width: 2.5rem; aspect-ratio: 1; flex: none; border-radius: .48rem; background: var(--layer); color: var(--ink); font-weight: 800; font-family: var(--display); }
.score, .numeric, .stat { font-variant-numeric: tabular-nums; }
.score { font-family: var(--numeric); font-weight: 700; font-size: clamp(1.5rem, 3.7vw, 2.9rem); line-height: 1.1; letter-spacing: -.07em; }
.badge { display: inline-flex; align-items: center; padding: .18rem .55rem; background: var(--layer); color: var(--ink); border-radius: 1rem; font-size: .82rem; font-weight: 650; }
.table-wrap { overflow-x: auto; max-width: 100%; overscroll-behavior-inline: contain; border: 1px solid var(--rule); border-radius: .6rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .95rem; font-variant-numeric: tabular-nums; }
th, td { padding: .62rem .75rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
thead { background: var(--layer); }
th { font-size: .82rem; letter-spacing: .02em; line-height: 1.3; font-weight: 740; }
td.numeric, th.numeric { text-align: right; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--layer), transparent 35%); }
caption { padding: .65rem; text-align: left; font-weight: 650; color: var(--quiet); }
form { max-width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); align-items: end; gap: .85rem; }
.form-grid .wide, .form-grid .actions { grid-column: 1 / -1; }
label { display: grid; gap: .3rem; font-weight: 650; min-width: 0; }
fieldset { min-width: 0; border: 1px solid var(--rule); border-radius: .65rem; padding: 1rem; margin: 0 0 1rem; }
legend { font-weight: 700; padding-inline: .35rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea { min-width: 0; width: 100%; min-height: 2.75rem; border: 1px solid var(--rule); border-radius: .45rem; padding: .5rem .7rem; color: var(--ink); background-color: var(--paper); }
input[type="checkbox"], input[type="radio"] { width: 1.18rem; height: 1.18rem; accent-color: var(--link); }
textarea { min-height: 6rem; resize: vertical; }
select { appearance: none; padding-right: 2.1rem; background-image: linear-gradient(45deg, transparent 50%, var(--quiet) 50%),linear-gradient(135deg, var(--quiet) 50%,transparent 50%); background-position: calc(100% - 1rem) 54%, calc(100% - .72rem) 54%; background-size: .29rem .29rem; background-repeat: no-repeat; }
button, .btn { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.65rem; padding: .5rem .9rem; background: var(--accent); color: var(--accent-ink); font-weight: 730; line-height: 1.25; border: 1px solid transparent; border-radius: .45rem; text-decoration: none; }
button:hover, .btn:hover { box-shadow: inset 0 0 0 1px currentColor; }
button:disabled { cursor: not-allowed; opacity: .54; }
.secondary, button.secondary, .btn.secondary { color: var(--ink); border-color: var(--rule); background: var(--paper); }
.danger, button.danger { background: var(--danger-bg); color: var(--danger); border-color: currentColor; }
.notice, .error, .success, [role="alert"] { padding: .72rem .92rem; border-inline-start: .25rem solid var(--link); background: var(--layer); border-radius: .35rem; margin-block: .7rem; overflow-wrap: anywhere; }
.error, [role="alert"].error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.success { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.auth-shell { min-height: 100svh; display: grid; place-items: center; padding: 1.2rem; background: linear-gradient(125deg,#102e47 0%,#125578 73%,#1781ae 100%); }
.auth-card { width: min(100%, 30rem); padding: clamp(1.3rem, 4vw, 2.4rem); border-top: .4rem solid var(--accent); border-radius: var(--radius); background: var(--paper); box-shadow: 0 2rem 5rem #07223850; }
.auth-card .brand { margin-bottom: 1.7rem; }
.auth-card h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
.auth-card form { display: grid; gap: .85rem; }
.auth-card button[type="submit"] { width: 100%; }
.auth-card .brand small { display: block; text-transform: uppercase; font: 750 .73rem/1.4 var(--type); letter-spacing: .13em; }
.auth-links { display: flex; gap: .35rem .7rem; flex-wrap: wrap; margin-top: 1rem; }
.text-button { background: transparent; border: 0; color: var(--link); padding: .3rem 0; text-decoration: underline; text-underline-offset: .2em; }
.text-button:hover { box-shadow: none; text-decoration-thickness: 2px; }
.account-view form { display: grid; gap: .7rem; }
.check-row { display: flex; gap: .5rem; align-items: center; }
.check-row + .check-row { margin-top: .5rem; }
.draft-ownership del { color: var(--quiet); padding-inline-end: .32rem; }
.draft-ownership details > summary { font-size: .85rem; color: var(--link); min-height: auto; padding-block: .25rem; }
.draft-ownership time, .draft-recipient { display: block; color: var(--quiet); font-size: .82rem; }
.draft-room { display: grid; gap: 1rem; min-width: 0; }
.draft-room h2, .draft-room > .toolbar { margin: 0; }
.draft-room details > summary { cursor: pointer; min-height: 2.75rem; font-weight: 720; }
.draft-room details[open] > summary { margin-bottom: .65rem; border-bottom: 1px solid var(--rule); }
.draft-lead, .draft-player, .draft-list li { display: flex; justify-content: space-between; align-items: center; gap: .7rem; }
.draft-lead h2 { font-size: clamp(1.7rem, 4.5vw, 3.6rem); }
.draft-clock { font: 700 clamp(2.1rem, 6vw, 4.2rem)/1 var(--numeric); font-variant-numeric: tabular-nums; letter-spacing: -.08em; color: var(--accent); }
.draft-actions { margin-block: .75rem; }
.draft-pool { max-height: min(26rem, 65svh); overflow: auto; padding: .22rem; margin-block: .55rem; }
.draft-player { width: 100%; text-align: left; margin-bottom: .32rem; }
.draft-player.chosen { border-color: var(--accent-ink); }
.draft-list, .draft-chat { padding: 0; margin: .6rem 0; list-style: none; }
.draft-chat { max-height: 20rem; overflow: auto; overflow-wrap: anywhere; }
.draft-list li, .draft-chat li { border-bottom: 1px solid var(--rule); padding: .5rem 0; }
.draft-list li { flex-wrap: wrap; }
.draft-chat time { color: var(--quiet); font-size: .88rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: .5rem; top: .5rem; z-index: 10; transform: translateY(-160%); padding: .5rem 1rem; background: var(--paper); color: var(--ink); }
.skip-link:focus { transform: none; }
@media (max-width: 66rem) {
  .app-shell { grid-template-columns: 12rem minmax(0, 1fr); }
  .sidebar { padding-inline: .65rem; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 48rem) {
  .app-shell { display: block; }
  .sidebar { position: static; min-height: auto; max-height: none; padding: .75rem .85rem .5rem; }
  .sidebar .brand { margin: 0 0 .6rem; }
  .nav { display: flex; gap: .3rem; overflow-x: auto; overscroll-behavior-inline: contain; padding: .25rem .18rem .44rem; }
  .nav > * { flex-shrink: 0; }
  .nav-item, .nav > a, .nav > button { white-space: nowrap; min-height: 2.75rem; }
  .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); }
  .workspace, .main { padding-inline: .85rem; }
  .page-header { align-items: start; }
  .table-wrap table { width: max-content; min-width: 100%; }
  th, td { padding: .55rem .58rem; }
  .topbar { gap: .5rem; padding-block: .55rem; }
}
@media print {
  .sidebar, .nav, .toolbar, .actions, .topbar, .skip-link { display: none !important; }
  .app-shell, .table-wrap { display: block; overflow: visible; }
  body, .workspace, .panel, .card { background: white; color: black; }
  .panel, .card, tr { break-inside: avoid; }
}
.commissioner-view { display:grid; gap:1rem; min-width:0; }
.commissioner-view .tabs { display:flex; flex-wrap:wrap; gap:.4rem; padding-block:.25rem; }
.commissioner-view .tabs [aria-pressed=true] { color:var(--accent-ink); background:var(--accent); border-color:var(--accent); }
.commissioner-view form>fieldset { display:grid; gap:.9rem; border:0; padding:0; margin:0; }
.commissioner-view label:has(input[type=checkbox]) { display:flex; align-items:center; gap:.5rem; }
.commissioner-view form button { justify-self:start; }
.commissioner-view details { padding-block:.5rem; border-top:1px solid var(--rule); }
.commissioner-view summary { cursor:pointer; font-weight:650; }
.commissioner-view details[open] summary { margin-bottom:.6rem; }
.commissioner-view pre { max-width:100%; overflow:auto; max-height:26rem; padding:.7rem; background:var(--layer); border-radius:.4rem; white-space:pre-wrap; overflow-wrap:anywhere; }
