/* Aleu portal styles. Colours are tokens so light and dark share one set of rules. */
:root {
  color-scheme: light;
  --ink: #16263d;
  --muted: #4f5f76;
  --subtle: #66768d;
  --paper: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #e9eef5;
  --line: #d3dae5;
  --primary: #142b4d;
  --on-primary: #ffffff;
  --accent: #d8e7ff;
  --focus: #2b5fb4;
  --field: #ffffff;
  --field-line: #b9c3d2;
  --hero: #142b4d;
  --on-hero: #eff3fa;
  --hero-muted: #c3cde0;
  --ok-bg: #e2f3ea;  --ok-line: #2d7a54;  --ok-ink: #1c5138;
  --maybe-bg: #fdf1d6; --maybe-line: #a06d12; --maybe-ink: #6a4708;
  --no-bg: #fbe6e9;  --no-line: #b03f52;  --no-ink: #7d2635;
  --info-bg: #e5ebf4; --info-line: #c3cfe2;
  --danger: #a3313f;
  --beta-bg: #fff3cd; --beta-ink: #624600; --beta-line: #e6c86a;
  --brand: #17734f; --brand-soft: #e3f1ea; --brand-ink: #0f5a3d;
  --glow-1: rgb(23 115 79 / .10); --glow-2: rgb(43 95 180 / .08);
  --shadow: 0 1px 2px rgb(20 43 77 / .06), 0 4px 14px rgb(20 43 77 / .05);
  --radius: 11px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e9f0fb;
  --muted: #b3c2d8;
  --subtle: #9dafc8;
  --paper: #0f1826;
  --surface: #1a2739;
  --surface-2: #26374e;
  --line: #34455d;
  --primary: #2c5083;
  --on-primary: #ffffff;
  --accent: #dceaff;
  --focus: #8db5ee;
  --field: #122033;
  --field-line: #4a5d78;
  --hero: #19304e;
  --on-hero: #f2f6fd;
  --hero-muted: #b9c6dc;
  --ok-bg: #1c3a34;  --ok-line: #56b588;  --ok-ink: #a9e4c6;
  --maybe-bg: #453b25; --maybe-line: #d4a958; --maybe-ink: #f2d998;
  --no-bg: #472c38;  --no-line: #d77c8c;  --no-ink: #f5c0c8;
  --info-bg: #263b58; --info-line: #4b6483;
  --danger: #e0788a;
  --beta-bg: #493916; --beta-ink: #ffe8ad; --beta-line: #7c6426;
  --brand: #5fd09a; --brand-soft: #1f3a36; --brand-ink: #9be3c0;
  --glow-1: rgb(95 208 154 / .08); --glow-2: rgb(141 181 238 / .08);
  --shadow: 0 1px 2px rgb(0 0 0 / .25), 0 6px 18px rgb(0 0 0 / .18);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(900px 420px at 12% -120px, var(--glow-1), transparent 70%), radial-gradient(700px 380px at 92% -140px, var(--glow-2), transparent 70%), var(--paper); background-repeat: no-repeat; background-color: var(--paper); color: var(--ink); font: 15px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
a { color: inherit; text-decoration: none; }
p a, .hint a, .section-heading a, .subtle-link { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2.3rem; line-height: 1.15; letter-spacing: -.04em; font-weight: 650; }
h2 { font-size: 1.35rem; letter-spacing: -.02em; margin-bottom: 14px; }
h3 { font-size: 1rem; margin-bottom: 4px; }
p { color: var(--muted); }
small { display: block; font-size: .8rem; color: var(--muted); }
.muted { color: var(--muted); }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 20; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Layout */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 268px; background: var(--surface); border-right: 1px solid var(--line); padding: 26px 18px; display: flex; flex-direction: column; overflow: auto; }
.main { margin-left: 268px; }
.content { padding: 40px; max-width: 1550px; margin: auto; }
.content:focus { outline: none; }
.topbar { min-height: 68px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 40px; background: var(--surface); }
.topbar-title { font-size: 1rem; font-weight: 650; }
.topbar-actions, .public-actions { display: flex; align-items: center; gap: 12px; }
.topbar .menu-toggle { display: none; gap: 8px; }
footer { padding: 24px 40px; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.footer-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; text-align: right; }
.beta-tag { border: 1px solid var(--beta-line); background: var(--beta-bg); color: var(--beta-ink); border-radius: 20px; padding: 1px 9px; font-weight: 700; }

/* Brand and navigation */
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; font-size: 1.25rem; line-height: 1.2; font-weight: 750; letter-spacing: -.02em; }
.brand-icon { display: inline-grid; place-items: center; width: 38px; height: 40px; flex-shrink: 0; background: linear-gradient(140deg, var(--primary), var(--brand)); color: #fff; font-size: 1.5rem; border-radius: 10px; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; border-radius: 10px; background: #fff; }
.brand-copy { min-width: 0; }
.brand-copy strong { display: block; overflow-wrap: anywhere; }
.brand-copy small { margin-top: 4px; font-weight: 500; }
nav { display: grid; gap: 3px; }
nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--muted); border-radius: 8px; font-size: .93rem; min-height: 44px; }
nav a:hover { background: var(--surface-2); color: var(--ink); }
nav a.selected, nav a[aria-current] { background: var(--surface-2); color: var(--ink); font-weight: 650; }
nav a.selected { position: relative; }
nav a.selected::before { content: ''; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 3px; background: var(--brand); }
nav a.selected .icon { color: var(--brand); }
.nav-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); margin: 22px 12px 8px; font-weight: 700; }
.sidebar-bottom { margin-top: auto; padding-top: 26px; display: flex; align-items: center; gap: 10px; }
.sidebar-bottom .who { min-width: 0; flex: 1; }
.sidebar-bottom strong { font-size: .9rem; }
.sidebar-bottom small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout { background: none; border: 0; color: var(--muted); padding: 10px; border-radius: 8px; display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.logout:hover { background: var(--surface-2); color: var(--ink); }
.avatar { display: grid; place-items: center; background: var(--surface-2); color: var(--ink); font-size: 1rem; font-weight: 750; border-radius: 12px; width: 44px; height: 44px; flex-shrink: 0; }
/* Team and club tones: one hue each, picked by id in the template (tone-0 to tone-5). */
.avatar[class*="tone-"] { background: hsl(var(--h) 55% 91%); color: hsl(var(--h) 60% 26%); }
html[data-theme="dark"] .avatar[class*="tone-"] { background: hsl(var(--h) 32% 24%); color: hsl(var(--h) 70% 82%); }
.tone-0 { --h: 155; } .tone-1 { --h: 212; } .tone-2 { --h: 262; } .tone-3 { --h: 24; } .tone-4 { --h: 330; } .tone-5 { --h: 186; }
.avatar.small { width: 36px; height: 36px; font-size: .85rem; }

/* Components */
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.page-heading .eyebrow { margin-bottom: 10px; }
.page-heading p { margin-top: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--primary); background: var(--primary); color: var(--on-primary); border-radius: 8px; padding: 10px 16px; min-height: 42px; font-size: .9rem; font-weight: 600; }
.button:hover { filter: brightness(1.12); }
.button.secondary { background: var(--surface); border-color: var(--field-line); color: var(--ink); }
.button.secondary:hover { background: var(--surface-2); filter: none; }
.button.danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.button:disabled, .choice:disabled { opacity: .55; cursor: progress; }
.full { width: 100%; }
.theme-toggle { min-height: 38px; padding: 6px 12px; font-size: .85rem; }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .icon-sun, html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.text-button { border: 0; background: none; color: var(--muted); font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
.text-button:hover { color: var(--ink); }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 22px; }
.grid > .card + .card { margin-top: 0; }
a.card { transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--brand); transform: translateY(-1px); }
.section-gap { margin-top: 30px; }
.narrow { max-width: 720px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-heading h2 { margin: 0; }
.pill { border: 1px solid var(--line); border-radius: 20px; padding: 5px 11px; font-size: .75rem; letter-spacing: .08em; font-weight: 700; color: var(--muted); white-space: nowrap; }
.pill.dark { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.badge { display: inline-block; white-space: nowrap; border-radius: 5px; padding: 3px 8px; font-size: .75rem; font-weight: 650; background: var(--surface-2); color: var(--muted); }
.badge.green, .badge.status-Available { background: var(--ok-bg); color: var(--ok-ink); }
.badge.amber, .badge.status-Maybe { background: var(--maybe-bg); color: var(--maybe-ink); }
.badge.status-Unavailable { background: var(--no-bg); color: var(--no-ink); }
.empty { padding: 36px 24px; text-align: center; }
.empty p { margin-top: 8px; }
.notice { border: 1px solid var(--info-line); background: var(--info-bg); padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; }
.notice.error { background: var(--no-bg); border-color: var(--no-line); color: var(--no-ink); }
.notice.success { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.attention { border-color: var(--maybe-line); margin-bottom: 24px; }
.hint { font-size: .85rem; line-height: 1.6; margin: 12px 0; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.grow { flex: 1; min-width: 120px; }
.beta-banner { background: var(--beta-bg); color: var(--beta-ink); border-bottom: 1px solid var(--beta-line); padding: 12px 20px; text-align: center; line-height: 1.5; }
.beta-banner strong { font-weight: 700; }

/* What's new (portal/whats_new.py) */
.whats-new { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 48px); border: 1px solid var(--line); border-radius: 14px; padding: 28px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgb(10 20 40 / .28); }
.whats-new::backdrop { background: rgb(10 20 40 / .45); }
.whats-new h2 { margin: 8px 0 18px; }
.whats-new ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 14px; }
.whats-new li { padding-left: 16px; border-left: 3px solid var(--focus); }
.whats-new li strong { display: block; }
.whats-new li span { color: var(--muted); font-size: .93rem; }
.whats-new .release-label { margin-bottom: 12px; }
.whats-new .actions { justify-content: flex-end; }

/* Forms */
label, .field-label { display: block; font-size: .85rem; font-weight: 600; margin: 16px 0; color: var(--ink); }
input, select, textarea { display: block; width: 100%; border: 1px solid var(--field-line); border-radius: 8px; padding: 10px 12px; min-height: 42px; background: var(--field); color: var(--ink); margin-top: 6px; }
input::placeholder, textarea::placeholder { color: var(--subtle); }
textarea { resize: vertical; }
.checkbox { display: flex; gap: 10px; align-items: center; }
.checkbox input { width: 20px; min-height: 20px; height: 20px; margin: 0; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input, .inline select { margin: 0; width: auto; min-width: 0; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; margin-bottom: 22px; padding: 8px 20px 20px; }
.filter-bar label { margin: 12px 0 0; }
.filter-bar .checkbox { padding-bottom: 10px; }
.add-fixture summary { list-style: none; text-align: center; }
.add-fixture summary::-webkit-details-marker { display: none; }
.add-fixture[open] summary { margin-bottom: 8px; }
.member-edit { margin-top: 8px; }
.member-edit summary { cursor: pointer; font-size: .85rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.photo-preview { width: 160px; height: 140px; object-fit: cover; border-radius: 8px; }

/* Tables */
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px; background: var(--surface-2); }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td small { margin-top: 4px; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.row-actions form { display: inline-block; margin-right: 12px; }
.ladder-table td:first-child { min-width: 160px; }
.ladder-table tbody tr.highlight { background: var(--info-bg); font-weight: 700; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); font-size: .85rem; }
.counter { font-size: 1rem; margin: 12px 0; color: var(--ink); }
.counter.over { color: var(--danger); font-weight: 700; }

/* Grids */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0 30px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); border-top: 3px solid var(--brand); }
.stat > span { color: var(--muted); }
.stat strong { display: block; font-size: 2.3rem; line-height: 1.4; font-weight: 600; letter-spacing: -.04em; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 25px; align-items: start; }
.two-col.wide { grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); }
.two-col, .two-col > *, .card { min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.team-card { display: block; }
.team-card h2 { margin: 20px 0 6px; }
.team-card > span:last-child { display: block; margin-top: 24px; }
.club-card { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.mini-team { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; padding: 18px; }
.team-overview { margin-bottom: 24px; }
.team-mail { margin-top: 24px; }

/* Fixture team picker: group toggles work only with JavaScript */
.team-picker { border: 0; padding: 0; margin: 16px 0; min-width: 0; }
.team-picker legend { padding: 0; margin: 0 0 8px; }
.team-picker .checkbox { margin: 0; font-weight: 500; }
html:not(.js) .pick-toggle { display: none; }
.pick-all { padding: 8px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px !important; font-weight: 650 !important; }
.pick-group { padding: 8px 0; }
.pick-division { font-weight: 650 !important; margin-bottom: 6px !important; }
.pick-teams { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-team { border: 1px solid var(--field-line); border-radius: 20px; padding: 6px 12px 6px 10px; background: var(--field); cursor: pointer; }
.pick-team:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.pick-team input { width: 16px; height: 16px; min-height: 16px; }
.pick-team small { display: inline; margin-left: 4px; }

/* Team page */
.team-title { display: flex; align-items: center; gap: 18px; min-width: 0; }
.avatar.large { width: 64px; height: 64px; font-size: 1.6rem; border-radius: 16px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 12px 0 0; }
.facts li { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 3px 11px; font-size: .8rem; color: var(--muted); }
.facts .fact-ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-ink); }
.stack { display: grid; gap: 22px; align-content: start; }
.stack > .card + .card { margin-top: 0; }
.roster { list-style: none; padding: 0; margin: 0; }
.roster li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.roster li:first-child { border-top: 0; }
.roster form { margin: 0; }
.roster .grow { min-width: 0; overflow-wrap: anywhere; }
details.more { margin-top: 14px; }
details.more > summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--muted); }
details.more > summary:hover { color: var(--ink); }
details.more[open] > summary { margin-bottom: 8px; }
.add-player { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.add-player label { margin: 8px 0 0; }
.ladder-table.compact th, .ladder-table.compact td { padding: 8px 6px; }
.ladder-table.compact td:first-child { min-width: 0; }
.ladder-table.compact td:nth-child(2) { min-width: 0; width: 100%; }
.ladder-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ladder-table tbody tr.highlight td { color: var(--brand-ink); }
.ladder-table tbody tr.highlight { background: var(--brand-soft); }
.team-settings { margin-top: 34px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.settings-grid > .card + .card { margin-top: 0; }
.setting { padding: 0; scroll-margin-top: 90px; }
.setting > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; }
.setting > summary::-webkit-details-marker { display: none; }
.setting > summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--muted); }
.setting[open] > summary::after { content: '\2212'; }
.setting > summary small { margin-top: 3px; }
.setting[open] > summary { border-bottom: 1px solid var(--line); }
.setting > :not(summary) { margin-left: 22px; margin-right: 22px; }
.setting > :last-child { margin-bottom: 22px; }
.setting > p:first-of-type { margin-top: 16px; }
.setting-actions { margin: 14px 22px 4px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 12px; }

/* Hero */
.hero { border-radius: 13px; padding: 30px 34px; background: radial-gradient(500px 260px at 100% 100%, rgb(95 208 154 / .28), transparent 70%), var(--hero); min-height: 190px; color: var(--on-hero); display: flex; justify-content: space-between; align-items: center; overflow: hidden; gap: 28px; }
.hero .eyebrow { color: var(--hero-muted); }
.hero h2 { font-size: 1.9rem; color: #fff; margin: 14px 0 10px; }
.hero p { color: var(--hero-muted); max-width: 500px; }
.hero-photo { width: 190px; height: 150px; object-fit: cover; border-radius: 8px; }
.hero-pitch { width: 260px; height: 160px; border: 1px solid #7d8da6; border-radius: 3px; position: relative; opacity: .6; flex-shrink: 0; }
.hero-pitch::before { content: ''; position: absolute; left: 50%; height: 100%; border-left: 1px solid #7d8da6; }
.hero-pitch::after { content: ''; position: absolute; left: 33%; top: 23%; width: 33%; height: 54%; border: 1px solid #7d8da6; border-radius: 50%; }

/* Fixtures and availability */
.fixture-row { display: flex; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding: 20px 14px; margin-inline: -14px; border-radius: 9px; border-left: 4px solid transparent; }
.fixture-row:first-of-type { border-top: 0; }
.fixture-row .eyebrow { letter-spacing: .07em; }
.fixture-row h3 { margin-top: 6px; }
.fixture-row p { font-size: .88rem; }
.row-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.subtle-link { font-size: .85rem; color: var(--muted); }
.date-block { background: var(--brand-soft); padding: 10px 12px; border-radius: 9px; text-align: center; min-width: 56px; }
.date-block strong { font-size: 1.4rem; font-weight: 650; display: block; line-height: 1.2; color: var(--brand-ink); }
.date-block span { font-size: .72rem; text-transform: uppercase; color: var(--brand-ink); opacity: .8; }
.fixture-row.availability-Available { background: var(--ok-bg); border-left-color: var(--ok-line); }
.fixture-row.availability-Maybe { background: var(--maybe-bg); border-left-color: var(--maybe-line); }
.fixture-row.availability-Unavailable { background: var(--no-bg); border-left-color: var(--no-line); }
.availability-form { width: 210px; flex-shrink: 0; }
.availability-form .field-label { margin: 0 0 6px; }
.choice-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.choice { border: 1px solid var(--field-line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 9px 4px; min-height: 42px; font-weight: 600; font-size: .9rem; }
.choice:hover { background: var(--surface-2); }
.choice.active { color: #fff; border-color: transparent; }
html[data-theme="dark"] .choice.active { color: #0f1826; }
.choice-Available.active { background: var(--ok-line); }
.choice-Maybe.active { background: var(--maybe-line); }
.choice-Unavailable.active { background: var(--no-line); }
.response { margin-top: 2px; }
.past-response { color: var(--muted); font-size: .85rem; }
.fixture-history { margin-top: 24px; }
.fixture-history > summary { cursor: pointer; font-weight: 650; list-style-position: inside; }
.fixture-history[open] > summary { margin-bottom: 14px; }
.add-fixture { margin: 0 0 24px; max-width: 760px; }
.add-fixture > summary { width: fit-content; }

/* Calendar subscriptions */
.calendar-link-row { display: flex; gap: 10px; align-items: center; }
.calendar-link-row input { min-width: 0; flex: 1; }
.calendar-link-row .button { margin-top: 6px; }
.calendar-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Sign-in and public pages */
.public .content { min-height: calc(100vh - 70px); display: grid; place-items: center; }
.public-actions { position: absolute; right: 24px; top: 24px; z-index: 1; }
.beta-banner + .public-actions, .beta-banner ~ .public-actions { top: 84px; }
.login-layout { display: grid; grid-template-columns: 1.2fr 1fr; max-width: 1050px; width: 100%; gap: 100px; align-items: center; }
.login-intro h1 { margin-top: 40px; }
.login-intro h1 { font-size: 4rem; letter-spacing: -.05em; line-height: 1.05; }
.login-intro > p:not(.eyebrow) { max-width: 360px; margin-top: 24px; }
.login-card { padding: 40px; }
.login-card h2 { font-size: 1.8rem; margin-top: 10px; }
.pitch { width: 260px; height: 110px; border: 2px solid rgb(255 255 255 / .85); outline: 6px solid var(--brand); border-radius: 3px; margin: 40px 6px; position: relative; background: repeating-linear-gradient(90deg, var(--brand) 0 26px, color-mix(in srgb, var(--brand) 88%, #000) 26px 52px); box-shadow: var(--shadow); }
.pitch::before { content: ''; height: 100%; border-left: 2px solid rgb(255 255 255 / .85); position: absolute; left: 50%; }
.pitch-circle { border: 2px solid rgb(255 255 255 / .85); border-radius: 50%; width: 64px; height: 64px; position: absolute; top: 22px; left: 97px; }

@media (min-width: 1600px) { .content { padding: 50px; } }
@media (max-width: 1200px) {
  .sidebar { width: 232px; padding: 22px 14px; }
  .main { margin-left: 232px; }
  .content { padding: 30px; }
  .topbar { padding: 0 30px; }
  .two-col, .two-col.wide { grid-template-columns: minmax(0, 1fr); }
  .login-layout { gap: 45px; }
}
@media (max-width: 760px) {
  h1 { font-size: 1.85rem; }
  .sidebar { display: none; position: fixed; inset: 0; width: 100%; height: 100dvh; padding: 76px 18px calc(20px + env(safe-area-inset-bottom)); z-index: 15; overscroll-behavior: contain; }
  .main { margin: 0; }
  .topbar .menu-toggle { display: inline-flex; }
  .topbar { padding: 8px 16px; }
  .topbar-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
  .theme-toggle [data-theme-label] { display: none; }
  .theme-toggle { width: 42px; padding: 0; }
  .nav-open .sidebar { display: flex; }
  .nav-open body { overflow: hidden; }
  .topbar { position: sticky; top: 0; z-index: 16; }
  .nav-open .topbar { position: fixed; left: 0; right: 0; top: 0; }
  .sidebar .brand { margin-bottom: 12px; }
  .content { padding: 22px 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .stats { gap: 8px; }
  .stat { padding: 14px 12px; }
  .stat > span { font-size: .8rem; }
  .stat strong { font-size: 1.8rem; }
  .hero { padding: 24px; }
  .hero h2 { font-size: 1.5rem; }
  .hero-pitch, .hero-photo { display: none; }
  .card { padding: 18px; }
  .fixture-row { flex-wrap: wrap; gap: 12px; }
  .availability-form { width: 100%; }
  .filter-bar { padding: 4px 16px 16px; }
  .public-actions { right: 16px; top: 16px; }
  .beta-banner ~ .public-actions { top: 70px; }
  .login-layout { grid-template-columns: 1fr; gap: 28px; }
  .login-intro h1 { font-size: 2.8rem; }
  .login-intro h1 { margin-top: 24px; }
  .login-intro .pitch, .login-intro .pill { display: none; }
  .login-card { padding: 24px; }
  .public .content { padding: 64px 16px 30px; }
  .calendar-link-row { flex-wrap: wrap; }
  .calendar-link-row .button { width: 100%; }
  footer { padding: 20px 16px; }
  .two-col, .two-col.wide { display: block; }
  .two-col > section, .two-col > details, .two-col > div { margin-bottom: 20px; }
  .team-title { gap: 14px; }
  .avatar.large { width: 52px; height: 52px; font-size: 1.3rem; }
  .add-player { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .setting > summary { padding: 16px 18px; }
  .setting > :not(summary) { margin-left: 18px; margin-right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, footer, .theme-toggle, .skip-link { display: none !important; }
  .main { margin: 0; }
}
