:root {
  color-scheme: light;
  --bg: #f2f5f1;
  --panel: #fff;
  --fg: #172b23;
  --muted: #52665c;
  --accent: #205b42;
  --action: #205b42;
  --action-text: #fff;
  --soft: #e7f1e9;
  --line: #d5e0d8;
  --error: #942e3a;
  --error-bg: #fff1f1;
  --rail: #102c24;
  --rail-text: #d2e1d9;
  --rail-active: #aef4c5;
  --radius: 1rem;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111d18;
    --panel: #192922;
    --fg: #edf6ef;
    --muted: #b4c8bd;
    --accent: #aef4c5;
    --action: #aef4c5;
    --action-text: #102c24;
    --soft: #263c31;
    --line: #3a5145;
    --error: #ffb8bc;
    --error-bg: #3c2429;
    --rail: #0c211a;
  }
}
body.access-app { background: var(--bg); color: var(--fg); margin: 0; font-size: .98rem; line-height: 1.55; }
.access-app *, .access-app *::before, .access-app *::after { box-sizing: border-box; }
.access-shell { min-height: 100vh; }
.access-shell--member { display: grid; grid-template-columns: 15rem minmax(0, 1fr); }
.site-header { background: var(--rail); color: var(--rail-text); padding: 1.15rem clamp(1rem, 3vw, 2rem); }
.access-shell--member .site-header { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: auto; display: flex; flex-direction: column; align-items: stretch; padding: 1.65rem 1rem 1.1rem; }
.site-brand { display: inline-flex; align-items: center; gap: .7rem; color: #f0faf3; font-size: 1.03rem; line-height: 1.15; font-weight: 800; text-decoration: none; }
.site-brand img { width: 2.5rem; height: 2.5rem; flex: 0 0 auto; border-radius: .65rem; }
.site-header nav { display: grid; gap: .25rem; margin-block: 2.1rem 1rem; }
.site-header nav a { color: var(--rail-text); text-decoration: none; padding: .55rem .75rem; border-radius: .55rem; font-weight: 600; font-size: .9rem; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { background: #224035; color: var(--rail-active); }
.site-header .sign-out { margin-top: auto; }
.site-header .sign-out button { color: var(--rail-text); border-color: #50685e; background: transparent; }
.access-shell--guest .site-header { padding-inline: max(1rem, calc((100% - 74rem) / 2)); }
.access-main { max-width: 79rem; margin-inline: auto; padding: clamp(1.55rem, 4vw, 3.6rem) clamp(1rem, 4vw, 3.5rem) 3.5rem; min-width: 0; }
.access-shell--guest .access-main { width: min(100%, 35rem); }
.access-main h1 { margin: 0 0 .5rem; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 780; letter-spacing: -.05em; line-height: 1.07; overflow-wrap: break-word; }
.access-main h2 { margin: 1.45rem 0 .6rem; font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 760; letter-spacing: -.025em; line-height: 1.25; }
.access-main h3 { font-size: 1.02rem; font-weight: 750; }
.access-main p { margin-block: .6rem 1rem; }
.access-main a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.access-main a:hover { text-decoration-thickness: .12em; }
.access-main .breadcrumb { font-size: .86rem; margin: 0 0 .9rem; }
.page-heading { margin-bottom: 1.7rem; }
.page-heading > p:last-child { color: var(--muted); margin-bottom: 0; max-width: 62ch; }
.access-card, .access-shell--guest .access-main { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.access-card { padding: clamp(1rem, 2.5vw, 1.65rem); min-width: 0; }
.access-card > :first-child { margin-top: 0; }
.access-card > :last-child { margin-bottom: 0; }
.access-shell--guest .access-main { margin-top: clamp(1.1rem, 7vw, 4.75rem); padding: clamp(1.15rem, 5vw, 2.3rem); width: min(calc(100% - 2rem), 31rem); }
.access-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.access-stack { display: grid; gap: 1.1rem; }
.consent-card { max-width: 44rem; }
.consent-card .consent-summary { background: var(--soft); border-radius: .7rem; padding: .85rem 1rem; margin-block: 1.15rem; }
.consent-summary p { margin: 0; }
.consent-summary p + p { margin-top: .65rem; }
.access-app label { display: block; margin-block: .85rem .3rem; font-weight: 700; font-size: .89rem; }
.access-app input:not([type="hidden"]), .access-app select, .access-app button { font: inherit; color: var(--fg); border: 1px solid var(--line); border-radius: .55rem; background: var(--panel); }
.access-app input:not([type="hidden"]), .access-app select { min-height: 2.7rem; padding: .55rem .72rem; }
.access-app input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), .access-app select { width: min(100%, 32rem); }
.access-app input[type="checkbox"], .access-app input[type="radio"] { min-height: auto; accent-color: var(--accent); margin-inline-end: .4rem; }
.access-app button, .access-main a.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.65rem; padding: .48rem .84rem; font-weight: 700; font-size: .89rem; cursor: pointer; text-decoration: none; }
.access-app button:hover { border-color: var(--accent); }
.access-app .actions { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .55rem; }
.access-app .actions button, .access-main a.button { background: var(--action); border: 1px solid var(--action); color: var(--action-text); border-radius: .55rem; }
.access-app .actions button:hover, .access-main a.button:hover { filter: brightness(.92); }
.access-app :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-header :focus-visible { outline-color: var(--rail-active); }
.access-main .notice, .access-main .error { border-radius: .6rem; padding: .67rem .85rem; margin-block: 0 .95rem; }
.access-main .notice { background: var(--soft); color: var(--accent); }
.access-main .error { background: var(--error-bg); color: var(--error); }
.access-list { padding: 0; list-style: none; }
.access-list li { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.access-list li:last-child { border-bottom: 0; }
.access-list--account li { justify-content: space-between; }
.state, .muted, .field-hint { color: var(--muted); }
.field-hint, .state { font-size: .875rem; }
.status-pill { display: inline-flex; align-items: center; border-radius: 30rem; padding: .22rem .65rem; font-size: .78rem; font-weight: 750; color: var(--accent); background: var(--soft); }
.access-app code { overflow-wrap: anywhere; font-size: .91em; background: var(--soft); border-radius: .25rem; padding: .1rem .22rem; }
.access-app details { border: 1px solid var(--line); background: var(--bg); border-radius: .7rem; margin-block: .9rem; padding: .66rem .85rem; }
.access-app summary { cursor: pointer; font-weight: 720; color: var(--fg); }
.access-app details ol { padding-inline-start: 1.22rem; margin-block: .8rem; list-style: decimal; }
.access-app details li + li { margin-top: .55rem; }
.access-app details p { font-size: .9rem; }
.access-app details > :last-child { margin-bottom: .3rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: .35rem; }
.dashboard-filters { display: flex; flex-wrap: wrap; gap: .7rem 1rem; margin-bottom: 1.15rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.dashboard-card { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 1.15rem; min-width: 0; }
.dashboard-card h2 { margin: 0 0 .4rem; }
.dashboard-score { display: flex; justify-content: space-between; gap: .75rem; padding: .35rem 0; }
.dashboard-matchup { border-block: 1px solid var(--line); padding: .4rem 0; }
.league-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-block: 1.15rem; padding: .38rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--panel); }
.league-nav a { font-size: .875rem; text-decoration: none; padding: .48rem .72rem; border-radius: .43rem; }
.league-nav a:hover, .league-nav [aria-current="page"] { background: var(--soft); }
.league-nav [aria-current="page"] { font-weight: 800; }
.league-table { overflow-x: auto; margin-block: 1rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--panel); }
.league-table table { width: 100%; border-collapse: collapse; }
.league-table th, .league-table td { text-align: left; padding: .68rem .75rem; border-bottom: 1px solid var(--line); }
.league-table thead { background: var(--soft); }
.league-table tbody tr:last-child > * { border-bottom: none; }
.league-table caption { text-align: left; font-weight: 750; padding: .75rem; }
.dashboard h2 { font-size: 1.2rem; }
.dashboard h3 { font-size: .95rem; }
.dashboard p, .dashboard ul { margin-block: .55rem; }
.dashboard ul { list-style: disc; padding-inline-start: 1.2rem; }
.site-announcement { margin: .65rem auto; max-width: 73rem; padding: .65rem 1rem; background: var(--soft); border: 1px solid var(--line); border-radius: .6rem; }
.access-body > .site-announcement { margin-inline: clamp(1rem, 4vw, 3.5rem); }
@media (max-width: 62rem) { .access-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 51rem) {
  .access-shell--member { display: block; }
  .access-shell--member .site-header { position: static; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; padding: .85rem 1rem; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; margin: 0; gap: .2rem; }
  .site-header nav a { padding: .42rem .55rem; }
  .site-header .sign-out { grid-column: 2; grid-row: 1; margin: 0; }
}
@media (max-width: 31rem) {
  .access-main h1 { font-size: 2rem; }
  .field-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
