/* Shared look for every page (plan 13, mockups). Self-hosted: no outside requests.
   Cascade layers (chunk 68): base (elements), components (shared pieces), pages (one page or area), overrides (high contrast, hover).
   A later layer always beats an earlier one, whatever the selector weight, so no selector needs raising to win. */
/* Shared look for every page (plan 13, mockups). Self-hosted: no outside requests. */
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); }
@layer base, components, pages, overrides;

@layer base {
:root {
  /* Colour: every colour in the app is one of these (the guard test in tests/cssTokens.test.ts fails on a hex colour anywhere else). */
  --blue: #0D4F92; --blue-dark: #093A6B; --sky: #DAECF8; --text: #1A1F26; --text2: #4A5360; --line: #D8DDE3; --page: #EEF2F6;
  --surface: #fff; --surface-muted: #EEF2F6; --surface-head: #E8EEF6; --border-strong: #B7BFC9; --on-dark: #fff;
  --action: #2F6B45; --action-dark: #1F5233; --yellow: #FDCC00; --green: #A3D237; --focus: var(--yellow);
  --success: #1E6B3A; --success-bg: #E3F1E8; --danger: #8A2B1D; --danger-bg: #FDECEA; --caution: #B45309;
  --warn-bg: #FFF3BF; --gold-text: #6B5000; --gold-line: #B38F00;
  /* Type scale (seven steps) */
  --fs-xs: .85rem; --fs-sm: .95rem; --fs-md: 1.1rem; --fs-lg: 1.3rem; --fs-xl: 1.7rem; --fs-2xl: 2.2rem; --fs-display: 2.6rem; --fs-board: 22px;
  /* Corners, control heights, border widths */
  --r-sm: 8px; --r-md: 12px; --r-pill: 999px;
  --h-control-sm: calc(36px * var(--ui)); --h-control: calc(48px * var(--ui)); --h-control-lg: calc(56px * var(--ui)); --h-control-xl: calc(64px * var(--ui));
  /* Overall size: 1 on phones (the plan's 20px text and 48/56px tap targets), .85 from tablet width up where the full size felt too big. */
  --ui: 1;
  --bw: 2px; --bw-thin: 1px;
  --col-rail: 6rem; --col-full: 14rem; --gutter: 2.5rem;
}
@media (min-width: 40rem) { :root { --ui: .85; } }
/* Size comes from --ui, not from zoom: rem text, control heights and the body size all follow it, and media queries keep their real viewport width. */
html { font-size: calc(100% * var(--ui)); }
* { box-sizing: border-box; }
body { font: calc(20px * var(--ui))/1.4 "Atkinson Hyperlegible", Arial, sans-serif; color: var(--text); background: var(--page); margin: 0; }
main { max-width: 36rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
h1 { color: var(--text); font-size: var(--fs-xl); line-height: 1.2; margin: .25rem 0 .75rem; }
h2 { font-size: var(--fs-lg); line-height: 1.25; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
label { display: block; margin: 1rem 0 .25rem; font-weight: 700; }
input:not([type=checkbox], [type=radio], [type=hidden], [type=file], [type=submit], [type=button]), textarea { width: 100%; min-height: var(--h-control-lg); font: inherit; font-size: var(--fs-md); padding: .5rem .75rem; border: var(--bw) solid var(--text2); border-radius: var(--r-md); background: var(--surface); color: var(--text); }
textarea { min-height: 10rem; }
button { font: inherit; min-height: var(--h-control-lg); width: 100%; margin-top: 1rem; font-size: var(--fs-md); font-weight: 700; color: var(--on-dark); background: var(--action); border: var(--bw) solid var(--action); border-radius: var(--r-md); cursor: pointer; }
label:has(input[type=checkbox]) { display: flex; align-items: center; gap: .5rem; min-height: var(--h-control); }
input[type=checkbox] { width: 28px; height: 28px; flex: none; }
table { border-collapse: collapse; background: var(--surface); }
th, td { border: var(--bw-thin) solid var(--line); padding: .5rem; text-align: left; vertical-align: top; }
th { background: var(--surface-head); }
caption { text-align: left; font-weight: 700; padding: .5rem 0; }
/* ---------------------------------------------------------------------------------------------------
   Chunk 38a: one spacing and type scale, tab rows that never wrap, the administrator shell, and the
   styles that used to sit in a <style> block on each page (rules, history, availability, draft board).
   Scale: 0.25 / 0.5 / 0.75 / 1 / 1.5 rem. Headings sit 1.5rem above and 0.5rem below their content,
   paragraphs and cards 0.75 to 1rem apart, table cells 0.6rem by 0.75rem.
   --------------------------------------------------------------------------------------------------- */
:root { --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem; }
p { margin: 0 0 var(--sp-3); }
h1 { margin: var(--sp-1) 0 var(--sp-3); }
h2 { margin: var(--sp-5) 0 var(--sp-2); }
h3 { margin: var(--sp-4) 0 var(--sp-1); font-size: var(--fs-md); }
ul, ol { margin: 0 0 var(--sp-3); padding-left: 1.5rem; }
li { margin-bottom: var(--sp-1); }
th, td { padding: .6rem .75rem; }
input[type=file] { width: 100%; font: inherit; font-size: var(--fs-md); padding: .6rem .75rem; border: var(--bw) dashed var(--text2); border-radius: var(--r-md); background: var(--surface); color: var(--text); }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; color: var(--blue); background: var(--surface); border: var(--bw) solid var(--blue); border-radius: var(--r-md); padding: .4rem .9rem; margin-right: .75rem; cursor: pointer; }
/* Draft board and pick list (was BOARD_STYLE in draftPages.ts): wider, larger type. */
body[data-board] { font-size: var(--fs-board); }
body[data-board] main { max-width: 62rem; }
body[data-board] h1 { font-size: var(--fs-2xl); }
body[data-board] caption { font-size: var(--fs-lg); }
/* Computers, step 1 (every page): one content width per page type, and the header lines up with it. The score screen stays phone-width. */
@media (min-width: 40rem) {
  body { --content: 44rem; }
  body:has(#score-app) { --content: 62rem; }
  body:has(main.cols), body:has(main.roomy) { --content: 62rem; }
  body:has(main.mid) { --content: 78rem; }
  body:has(main.wide) { --content: 78rem; }
  body[data-board] { --content: 62rem; }
}
/* Selectors: one look for every dropdown, date and time box. Same height and border as a text box, a clear arrow, big text. */
select { appearance: none; -webkit-appearance: none; font: inherit; max-width: 100%; min-height: var(--h-control-lg); padding: .5rem 2.6rem .5rem .75rem; font-size: var(--fs-md); color: var(--text); background: var(--surface) url(select-arrow.svg) no-repeat right .9rem center / 1.1rem; border: var(--bw) solid var(--text2); border-radius: var(--r-md); cursor: pointer; }
select:disabled, button:disabled { opacity: .7; cursor: default; }
tr[hidden] { display: none !important; }
.player-search .inline-row input { max-width: 24rem; }
select[multiple] { background-image: none; padding: .5rem .75rem; }
input[type=date], input[type=time], input[type=datetime-local] { max-width: 24rem; }
input[type=number] { max-width: 14rem; }
body[data-club-home] main { max-width: 44rem; }
body:has(.golfer-nav) main { padding-bottom: 7rem; }
html:has(.golfer-nav) { scroll-padding-bottom: 7rem; }
}

@layer components {
header.bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem .75rem; background: var(--blue); color: var(--on-dark); }
header.bar .title { font-size: var(--fs-md); font-weight: 700; text-align: center; flex: 1; }
header.bar a { color: var(--on-dark); min-height: var(--h-control); min-width: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 .5rem; }
button.secondary { color: var(--blue); background: var(--surface); border: var(--bw) solid var(--blue); }
.note { color: var(--text2); }
.box { background: var(--surface); border: var(--bw-thin) solid var(--line); border-radius: var(--r-md); padding: 1rem; margin: 1rem 0; }
.notice { background: var(--warn-bg); border: var(--bw) solid var(--gold-line); border-radius: var(--r-md); padding: .75rem 1rem; margin: 1rem 0; }
.btn { display: flex; align-items: center; justify-content: center; min-height: var(--h-control-lg); border-radius: var(--r-md); background: var(--action); color: var(--on-dark); font-weight: 700; font-size: var(--fs-md); text-decoration: none; border: var(--bw) solid var(--action); margin-top: 1rem; }
.btn.secondary { background: var(--surface); color: var(--blue); border: var(--bw) solid var(--blue); }
footer.foot { max-width: 36rem; margin: 0 auto; padding: 1rem; border-top: var(--bw-thin) solid var(--line); color: var(--text2); font-size: var(--fs-md); }
.btn-big { min-height: var(--h-control-xl); font-size: var(--fs-lg); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.two .btn, .two button { margin-top: 1rem; }
.bar-track { height: 14px; background: var(--surface-head); border-radius: var(--r-sm); overflow: hidden; }
.bar-fill { height: 14px; background: var(--action); }
.links { display: flex; flex-direction: column; gap: 0; }
.links a { display: flex; align-items: center; min-height: var(--h-control); }
ul.plain { list-style: none; padding: 0; margin: .25rem 0; }
ul.plain li { padding: .15rem 0; }
ol.rounds { list-style: none; padding: 0; margin: .25rem 0; }
ol.rounds li { display: grid; grid-template-columns: 10.5rem 1fr auto; align-items: center; gap: .25rem .75rem; min-height: 2.25rem; padding: .25rem 0; border-bottom: var(--bw-thin) solid var(--line); }
ol.rounds li strong { font-size: var(--fs-md); }
/* A link that stands on its own line inside a card is a tap target: 48 px (plan 13). */
.box > a:not(.btn), section.box > a:not(.btn) { display: flex; align-items: center; min-height: var(--h-control); }
button.small { width: auto; min-height: var(--h-control); margin: .25rem .25rem .25rem 0; padding: 0 .9rem; font-size: var(--fs-md); }
.sr { position: absolute; left: -9999px; }
pre.preview { white-space: pre-wrap; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); padding: 1rem; font: inherit; }
input.mono { font-family: Consolas, monospace; width: 100%; }
table th.n, table td.n { text-align: right; }
/* Tables that are wider than the screen scroll inside their own region, never the whole page. */
.wrap { overflow-x: auto; max-width: 100%; }
/* Shared components (chunk 36; see views/components.ts) */
ol.rowlist { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-direction: column; gap: .6rem; }
.rowcard { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; min-height: var(--h-control-xl); padding: .6rem 1rem; background: var(--surface); border: var(--bw-thin) solid var(--line); border-radius: var(--r-md); color: var(--text); text-decoration: none; }
a.rowcard:hover { color: var(--text); border-color: var(--blue); }
.rowcard-hl { border-color: var(--blue); }
.rr-lead { flex: none; min-width: 1.5rem; font-size: var(--fs-lg); font-weight: 700; }
.rr-main { flex: 1 1 8rem; min-width: 0; display: flex; flex-direction: column; }
.rr-title { font-weight: 700; overflow-wrap: anywhere; }
.rr-sub { display: block; font-size: var(--fs-sm); color: var(--text2); }
.rr-extra { flex: none; min-width: 2.5rem; text-align: right; }
.rr-value { flex: none; min-width: 2.5rem; text-align: right; font-size: var(--fs-lg); font-weight: 700; }
.statgrid { display: grid; gap: .6rem; margin: .75rem 0; }
.statgrid-3 { grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); }
.statgrid-2 { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.stat { display: flex; flex-direction: column; background: var(--surface); border: var(--bw-thin) solid var(--line); border-radius: var(--r-md); padding: .5rem .75rem; }
.stat-label { font-size: var(--fs-sm); color: var(--text2); }
.stat-value { font-size: var(--fs-xl); font-weight: 700; line-height: 1.2; }
.stat-note { font-size: var(--fs-xs); color: var(--text2); }
.sumband { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--blue); color: var(--on-dark); border-radius: var(--r-md); padding: .75rem 1rem; margin: .75rem 0; }
.sumband-main, .sumband-aside { display: flex; flex-direction: column; }
.sumband-aside { text-align: right; }
.sumband-label { font-size: var(--fs-sm); }
.sumband-value { font-size: var(--fs-xl); font-weight: 700; line-height: 1.15; }
.sumband-aside-value { font-size: var(--fs-xl); font-weight: 700; line-height: 1.15; }
.sumband-aside-note { font-size: var(--fs-sm); }
.fact { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .35rem 0; }
details.fold { background: var(--surface); border: var(--bw-thin) solid var(--line); border-radius: var(--r-md); margin: .6rem 0; }
details.fold[open] { border-color: var(--blue); }
details.fold summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: var(--h-control-lg); padding: .5rem 1rem; font-weight: 700; cursor: pointer; list-style: none; }
details.fold summary::-webkit-details-marker { display: none; }
.fold-hint { font-weight: 400; color: var(--text2); }
details.fold[open] > summary .fold-state > :first-child,
details.fold:not([open]) > summary .fold-state > :last-child { display: none; }
.slot-empty { border: var(--bw) dashed var(--border-strong); border-radius: var(--r-md); padding: .75rem 1rem; margin: .6rem 0; }
form details.fold { margin: .6rem 0; }
form details.fold summary { min-height: var(--h-control); }
.fact strong { text-align: right; }
h1 + h2, .box > h2:first-child, .box > h3:first-child { margin-top: 0; }
.fact + .fact { border-top: var(--bw-thin) solid var(--line); }
.box .fact:first-of-type { padding-top: 0; }
/* Tables: real padding, scroll inside their own box. */
.wrap { margin: var(--sp-3) 0 var(--sp-4); background: var(--surface); border: var(--bw-thin) solid var(--line); border-radius: var(--r-md); }
.wrap > table { width: 100%; min-width: 30rem; border: 0; }
.wrap th:first-child, .wrap td:first-child { border-left: 0; }
.wrap th:last-child, .wrap td:last-child { border-right: 0; }
.wrap tr:first-child > th, .wrap tr:first-child > td { border-top: 0; }
.wrap tr:last-child > th, .wrap tr:last-child > td { border-bottom: 0; }
td.n, th.n { white-space: nowrap; }
caption.sr, .sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Tab rows: one line, never wrapped. Four short underlined tabs fit a phone; a longer row of pills scrolls inside itself. */
a.button { display: inline-flex; align-items: center; min-height: var(--h-control); padding: 0 1rem; border: var(--bw) solid var(--blue); border-radius: var(--r-md); color: var(--blue); font-weight: 700; text-decoration: none; background: var(--surface); }
.side-head { margin: var(--sp-3) var(--sp-3) var(--sp-1); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text2); }
h1 .status, h2 .status { font-weight: 700; }
.in-on { background: var(--success); border: var(--bw) solid var(--success); }
.out-on { background: var(--danger); border: var(--bw) solid var(--danger); }
.in-on:disabled, .out-on:disabled { opacity: 1; } /* the chosen answer stays at full strength; it just cannot be pressed again */
.err { background: var(--danger-bg); border: var(--bw) solid var(--danger); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); }
.ok { background: var(--success-bg); border: var(--bw) solid var(--success); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); }
/* A name in the first column stays on one line; the table scrolls instead. */
.wrap td:first-child, .wrap th:first-child { white-space: nowrap; }
nav.ptabs + .note { margin-top: .5rem; }
a.inl { display: inline-flex; align-items: center; min-height: var(--h-control); }
button.gold { background: var(--yellow); color: var(--text); border-color: var(--yellow); }
details.more summary { min-height: var(--h-control); display: flex; align-items: center; color: var(--blue); cursor: pointer; text-decoration: underline; }
/* ---------------------------------------------------------------------------------------------------
   Chunk 46: nothing scrolls sideways on a phone.
   Tables become one card per row (labels come from labelTables in http/pages.ts); tab rows and the
   trophy shelf wrap onto more lines instead of scrolling.
   --------------------------------------------------------------------------------------------------- */
@media (max-width: 40rem) {
  .wrap { overflow: visible; background: transparent; border: 0; border-radius: 0; margin: var(--sp-2) 0 var(--sp-3); }
  .wrap > table { min-width: 0; width: 100%; }
  .wrap { background: var(--surface); border: var(--bw-thin) solid var(--line); border-radius: var(--r-md); }
  .wrap td:first-child, .wrap th:first-child, .wrap td.n, .wrap th.n { white-space: normal; }
}
/* Team dashboard: the gold deadline chip, and plain rows for "Coming up" (mockup TeamDashboard) */
/* Mockup match pass: header height and title, standings numbers, intro text under a tab bar. */
header.bar { padding: 12px 20px; }
header.bar .title { font-size: var(--fs-lg); }
header.bar a { min-height: var(--h-control); padding: 0 .25rem; }
@media (min-width: 40rem) {
  main, footer.foot { max-width: var(--content); }
  header.bar { padding-inline: max(.75rem, calc((100% - var(--content)) / 2)); }
}
button.linkbtn, button.quiet, .btn.quiet { background: none; border: 0; color: var(--blue); text-decoration: underline; font-weight: 600; font-size: var(--fs-md); min-height: var(--h-control); padding: 0 1rem; width: auto; cursor: pointer; }
/* The league name in the header: logo beside the words. The logo is a transparent PNG, so the bar's colour shows through. */
header.bar .title { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; }

/* ---------------------------------------------------------------------------------------------------
   One set of components (chunk 70): a segmented control, three kinds of button, one badge, one card.
   --------------------------------------------------------------------------------------------------- */

/* Segmented control: every "pick one view" row (Standings sections, My team, Player stats, season, the Golfers filter).
   A light track; the chosen segment is white, bold and outlined in blue, so it never looks like the green action button. */
nav.utabs, nav.ptabs { display: flex; flex-wrap: wrap; gap: var(--sp-1); padding: var(--sp-1); margin: 0 0 var(--sp-4); background: var(--surface-head); border-radius: var(--r-md); }
nav.utabs a, nav.ptabs a { flex: 1 1 0; min-width: 0; line-height: 1.2; /* equal widths: the bold current tab must not make its neighbours narrower */ display: flex; align-items: center; justify-content: center; min-height: var(--h-control); padding: 0 var(--sp-1); border: var(--bw) solid transparent; border-radius: var(--r-sm); color: var(--text); font-size: var(--fs-sm); text-decoration: none; text-align: center; }
nav.utabs { max-width: none; }
nav.utabs a[aria-current=page], nav.ptabs a[aria-current=page] { background: var(--surface); border-color: var(--blue); color: var(--blue-dark); font-weight: 700; }

/* Badge: one size, pill corners, five tones. The words carry the meaning; the tone only helps. */
.badge { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; padding: .1rem .7rem; border-radius: var(--r-pill); background: var(--surface-muted); color: var(--text2); font-size: var(--fs-md); font-weight: 700; line-height: 1.5; }
.badge-info { background: var(--sky); color: var(--blue-dark); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-success::before { content: "\2713"; }
.badge-warn { background: var(--warn-bg); color: var(--gold-text); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--surface-muted); color: var(--text2); }

/* Buttons: primary (green, filled), secondary (white, blue outline), quiet (reads as a link). On a computer a button is as wide as its
   words with a sensible minimum; on a phone it stays full width. Wide ones (.btn-big, .wide) and buttons that sit in a row or a pair keep their width. */
@media (min-width: 40rem) {
  :where(body:not(:has(#score-app)) :is(button, .btn):not(.wide, .btn-big, .small, .linkbtn, .quiet, .chip-x, .spot-move, .hc-circle, :is(.two, .pair, .tonight-notes, .pickrow, .poolpick-bar, .filters, .datelist-row, .inline-row, .menu, .week) *)) { width: auto; min-width: 12rem; padding-inline: var(--sp-5); }
  .btn:not(.wide, .btn-big, [id=score-app] *, :is(.two, .pair, .menu) *) { display: inline-flex; }
}
}

@layer pages {
h1 a, h2 a, h3 a, .shelf-head a { display: inline-flex; align-items: center; min-height: var(--h-control); }
.shelf-head a.arrow { min-width: 48px; justify-content: center; }
/* Home and cards (mockups Main, HomeNotPlaying) */
.home-week h1 { font-size: var(--fs-2xl); margin-bottom: 0; }
.home-date { font-size: var(--fs-md); margin-top: 0; }
.eyebrow { display: block; font-size: var(--fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text2); margin: 0 0 .25rem; }
.big { font-size: var(--fs-lg); font-weight: 700; margin: .25rem 0; }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0; }
.opp { display: flex; flex-direction: column; gap: .15rem; border-top: var(--bw-thin) solid var(--line); padding-top: .5rem; margin-top: .5rem; text-decoration: none; color: var(--text); }
.opp strong { color: var(--blue); }
/* Schedule */
.sect { font-size: var(--fs-md); text-transform: uppercase; letter-spacing: .04em; color: var(--text2); margin: 1.25rem 0 .25rem; }
.sched { padding: .5rem 1rem; margin: .5rem 0; }
.sched.now { border-top: 4px solid var(--blue); }
.sched.past { background: var(--surface-muted); }
.sched-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.sched-head h3 { margin: .25rem 0; font-size: var(--fs-md); }
/* Handicap profile */
.hc-top { display: flex; align-items: center; gap: 1rem; }
.hc-circle { flex: none; width: 96px; height: 96px; border-radius: 50%; background: var(--blue); color: var(--on-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hc-circle span { font-size: var(--fs-display); font-weight: 700; line-height: 1; }
.hc-circle small { font-size: var(--fs-xs); }
button.hc-circle { border: 0; padding: 0; font: inherit; cursor: pointer; min-height: 0; }
button.hc-circle:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.hc-circle .hc-exact-num { font-size: var(--fs-2xl); font-weight: 700; line-height: 1; }
.hc-hero { display: flex; align-items: center; gap: 1.25rem; }
.hc-side { min-width: 0; }
.hc-side .hc-team { font-size: var(--fs-lg); }
.hc-side .note { margin: .25rem 0 0; }
.hc-stats { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; margin-top: .5rem; }
.hc-stat { display: flex; flex-direction: column; }
.hc-stat-l { font-size: var(--fs-xs); color: var(--text2); }
.hc-stat-v { font-size: var(--fs-xl); font-weight: 800; line-height: 1.15; }
/* Administrator pages */
main.wide { max-width: 1400px; }
ol.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .5rem; }
li.step { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); padding: .5rem .75rem; display: flex; flex-direction: column; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.actions .btn, .actions button { width: auto; min-width: 12rem; margin-top: .5rem; padding: 0 1.25rem; }
.inline-form { display: inline-block; margin: .25rem 0; }
.inline-form input[type=text] { width: auto; min-width: 8rem; display: inline-block; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: end; }
.filters label { margin: 0; }
.filters input { width: auto; }
.filter-field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.filter-field label { font-weight: 700; }
.filter-field input, .filter-field select { margin: 0; min-height: var(--h-control-lg); width: 100%; min-width: 14rem; box-sizing: border-box; }
@media (max-width: 40rem) {
  .filters { display: grid; grid-template-columns: 1fr; gap: .75rem; }
  .filter-field input, .filter-field select { width: 100%; }
}
.filters button { width: auto; margin: 0; padding: 0 1.25rem; }
/* First-time screen */
ol.three { list-style: none; padding: 0; display: grid; gap: .75rem; }
ol.three li { display: flex; gap: 1rem; align-items: center; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); padding: .75rem 1rem; }
ol.three .num { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: var(--on-dark); font-size: var(--fs-xl); font-weight: 700; display: flex; align-items: center; justify-content: center; }
ol.three p { margin: .15rem 0 0; }
/* Sign in my phone */
.code { font-size: var(--fs-display); letter-spacing: .15em; font-weight: 700; text-align: center; background: var(--surface); border: 3px solid var(--blue); border-radius: var(--r-md); padding: .5rem; }
.qr { max-width: 18rem; margin: 1rem auto; background: var(--surface); padding: .5rem; border-radius: var(--r-md); border: var(--bw) solid var(--line); }
.qr svg { width: 100%; height: auto; display: block; }
.team-photo { margin: 1rem 0; }
.team-photo img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.rr-head { display: flex; justify-content: space-between; gap: .5rem; padding: 0 1rem; margin-top: .75rem; font-size: var(--fs-sm); font-weight: 700; color: var(--text2); }
.seccard h2.eyebrow { font-size: var(--fs-sm); margin: 0 0 .5rem; }
.seccard-hl { border-top: 4px solid var(--blue); }
.fold-body { padding: 0 1rem 1rem; }
.fold-body > :first-child { margin-top: 0; }
/* Captain pages (chunk 38; mockups HomeLineup, VisitPairings, RainoutLineup, ApproveChange) */
.pickhead { display: flex; justify-content: space-between; align-items: center; gap: .75rem; background: var(--sky); color: var(--blue-dark); border-radius: var(--r-md); padding: .6rem 1rem; margin: 1rem 0 .6rem; }
.pickhead span { font-size: var(--fs-sm); color: var(--text2); }
.pickwrap { margin: 0 0 .6rem; }
label.pick { display: flex; align-items: center; gap: .75rem; min-height: var(--h-control-lg); margin: 0; padding: .5rem 1rem; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); font-weight: 700; cursor: pointer; }
label.pick:has(input:checked) { border-color: var(--blue); }
label.pick .pick-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pick-hc { min-width: 1.5rem; text-align: right; font-weight: 400; }
.pick-warn { display: none; background: var(--warn-bg); border: var(--bw) solid var(--gold-line); border-radius: var(--r-md); padding: .5rem .9rem; margin: .4rem 0 0; color: var(--gold-text); }
.pickwrap:has(input:checked) .pick-warn { display: block; }
label.forfeit { display: flex; align-items: flex-start; gap: .75rem; padding: .75rem 1rem; margin: 0 0 .6rem; background: var(--warn-bg); border: var(--bw) solid var(--gold-line); border-radius: var(--r-md); font-weight: 400; cursor: pointer; }
label.forfeit input { margin-top: .15rem; }
.forfeit-note { display: block; font-size: var(--fs-sm); color: var(--text2); }
.pair { display: flex; gap: var(--sp-2); }
.pairing { background: var(--surface); border: var(--bw) dashed var(--border-strong); border-radius: var(--r-md); padding: .75rem 1rem; margin: 0 0 .6rem; }
.pairing:has(select:valid) { border: var(--bw) solid var(--line); }
.pairing-who { margin: 0 0 .25rem; }
label.pairing-label { margin: 0 0 .25rem; font-weight: 400; font-size: var(--fs-sm); color: var(--text2); }
.pairing select { width: 100%; min-height: var(--h-control); border: var(--bw) solid var(--text2); border-radius: var(--r-md); background: var(--surface); padding: 0 .5rem; }
.pairing:has(select:valid) select { border-color: var(--gold-line); }
.avail-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: var(--h-control); padding: .25rem 0; border-top: var(--bw-thin) solid var(--line); }
.avail-row:first-of-type { border-top: 0; }
.signed-as { text-align: center; margin-top: 1.5rem; }
.pick-warn-soft { background: none; border: 0; padding: 0 1rem; color: var(--text2); }
.swap-label { margin: .5rem 0 0; font-size: var(--fs-sm); color: var(--text2); }
.swap-was { margin: 0; font-size: var(--fs-md); color: var(--text2); }
.swap-now { margin: 0 0 .25rem; font-size: var(--fs-xl); font-weight: 700; }
.box > :last-child, .fold-body > :last-child { margin-bottom: 0; }
/* Administrator shell: sidebar on a wide screen, one compact menu bar on a phone. */
.admin-side a, .admin-menu nav a { display: flex; align-items: center; min-height: var(--h-control); padding: 0 var(--sp-3); border-radius: var(--r-md); color: var(--text); text-decoration: none; }
.admin-side a:hover, .admin-menu nav a:hover { background: var(--page); }
.admin-side a[aria-current=page], .admin-menu nav a[aria-current=page] { background: var(--sky); color: var(--blue-dark); font-weight: 700; }
.admin-menu { display: block; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); margin-bottom: var(--sp-4); }
.admin-menu > summary { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); min-height: var(--h-control); padding: 0 var(--sp-4); font-weight: 700; cursor: pointer; list-style: none; }
.admin-menu > summary::-webkit-details-marker { display: none; }
.admin-menu[open] { border-color: var(--blue); }
.admin-menu nav { display: flex; flex-direction: column; padding: 0 var(--sp-2) var(--sp-2); }
.admin-main { min-width: 0; }
.admin-main > h1:first-child, .admin-main > p:first-child { margin-top: 0; }
/* Rules pages (was a style block in rulesPages.ts) */
.rule-version { border: var(--bw-thin) solid var(--line); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin: var(--sp-3) 0; background: var(--surface); }
.rule-banner { border: var(--bw) solid var(--gold-line); background: var(--warn-bg); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin: var(--sp-3) 0; }
.rule-current { border: 3px solid var(--blue); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin: var(--sp-3) 0; background: var(--surface); }
.rule-text { white-space: pre-wrap; }
/* History pages (was a style block in historyPages.ts) */
.shelf-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.shelf-head h2 { margin: 0; }
.shelf-head a.arrow { min-width: 48px; min-height: var(--h-control); display: inline-flex; align-items: center; justify-content: center; border: var(--bw) solid var(--blue); border-radius: var(--r-sm); font-size: var(--fs-xl); text-decoration: none; font-weight: 700; }
ol.shelf { display: flex; gap: var(--sp-3); list-style: none; margin: var(--sp-2) 0; padding: var(--sp-2); overflow-x: auto; scroll-snap-type: x proximity; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); }
ol.shelf li { flex: 0 0 auto; width: 92px; margin: 0; text-align: center; scroll-snap-align: start; }
ol.shelf li a { color: var(--text); text-decoration: none; display: block; }
ol.shelf svg { width: 64px; height: 64px; }
ol.shelf .what { font-weight: 700; font-size: var(--fs-sm); }
ol.shelf .ribbon { font-size: var(--fs-xs); }
ol.shelf .ribbon-art { display: flex; align-items: center; justify-content: center; height: calc(64px * var(--ui)); font-size: var(--fs-display); line-height: 1; }
.hist-card { border: var(--bw-thin) solid var(--line); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin: var(--sp-3) 0; background: var(--surface); }
.hist-card img { max-width: 100%; height: auto; border-radius: var(--r-sm); }
/* Availability pages (was a style block in availabilityPages.ts) */
.pair form { flex: 1; }
.pair button { margin-top: var(--sp-2); }
.week { background: var(--surface); border: var(--bw-thin) solid var(--line); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); margin: var(--sp-3) 0; }
.week h3 { margin: 0 0 var(--sp-1); }
body[data-board] .big { font-size: var(--fs-xl); }
.clock { font-size: var(--fs-display); font-weight: 800; color: var(--blue); }
.rosters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: var(--sp-4); }
.live { display: inline-block; padding: .15rem .6rem; border-radius: var(--r-pill); font-weight: 700; color: var(--on-dark); background: var(--success); }
.live.off { background: var(--danger); }
.commentary { font-size: var(--fs-lg); border-left: 6px solid var(--blue); padding-left: var(--sp-4); margin: var(--sp-4) 0; }
/* Chunk 39: stacks of ranked cards inside a card, and the small links under them */
.rowlist-plain { display: flex; flex-direction: column; gap: .6rem; margin: .5rem 0; }
.rowlist-plain .rowcard { min-height: var(--h-control-lg); }
.rowlist-plain .rr-value { font-size: var(--fs-md); }
.seccard .rr-head { padding: 0 .25rem; margin-top: 0; }
.avail-links { margin: .5rem 0 0; }
.seccard .fold { margin: .6rem 0 0; }
.avail-row a { display: inline-flex; align-items: center; min-height: var(--h-control); }
/* Chunk 40: profile, player stats, how this was calculated */
.hc-team { margin: 0; font-weight: 700; }
.stepcard h2 { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-md); margin: 0 0 .4rem; }
.stepnum { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--blue); color: var(--on-dark); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-md); }
.holes-wrap > table.holes { min-width: 0; width: 100%; }
table.holes th, table.holes td { padding: .4rem .3rem; text-align: center; }
table.holes th[scope=row] { text-align: left; padding-left: .6rem; }
table.holes td.won { font-weight: 700; color: var(--blue-dark); }
.calc-who { font-size: var(--fs-lg); margin: .5rem 0 .1rem; }
/* Chunk 41: history, rules, dues, schedule, availability */
.duesrow { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: var(--bw-thin) solid var(--line); }
.duesrow:first-child { border-top: 0; }
.sched-sect { margin: 1.25rem 0 .25rem; }
.hist-title { display: flex; gap: .75rem; align-items: center; padding: .5rem 0; border-top: var(--bw-thin) solid var(--line); }
.hist-title:first-of-type { border-top: 0; }
.hist-title > div { display: flex; flex-direction: column; min-width: 0; }
.hist-title img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-md); flex: none; }
.sumband-link { color: var(--on-dark); display: inline-flex; align-items: center; min-height: var(--h-control); font-weight: 700; }
.week-sub { margin: 0 0 .25rem; }
details.fold .week:first-child { margin-top: 0; }
.rule-version h2, .hist-card h2 { margin-top: 0; }
.rule-version h2 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
/* Chunk 42: Cup golfer screens */
.pickrow { display: flex; align-items: center; gap: .75rem; }
.pickrow form { flex: none; margin: 0; }
.pickrow button { min-height: var(--h-control); min-width: 5rem; margin: 0; }
.pickclock { margin-top: 0; }
.pairslot-set { border-color: var(--blue); }
.pairslot .eyebrow { display: flex; align-items: center; gap: .6rem; }
/* Chunk 43: administrator week, recap and schedule pages */
li.step-done { background: var(--sky); border-color: var(--sky); color: var(--blue-dark); }
li.step-now { background: var(--warn-bg); border-color: var(--gold-line); color: var(--gold-text); }
ol.steps { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); margin: var(--sp-3) 0 var(--sp-4); }
.inline-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: flex-start; }
.inline-row input { flex: 1 1 14rem; }
.inline-row button { width: auto; margin-top: 0; padding: 0 1.25rem; }
.infobox { background: var(--page); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin: var(--sp-3) 0; }
.infobox p { margin: var(--sp-1) 0 0; }
.infobox-warn { background: var(--warn-bg); color: var(--gold-text); }
.sched-grid, .recap-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
@media (min-width: 64rem) {
  .sched-grid { grid-template-columns: minmax(0, 1fr) 24rem; }
  .recap-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* Close week: one column. Warnings first, then the whole email on a wide page, then the buttons pinned to the bottom of the screen. */
.recap-stack { max-width: 62rem; }
.recap-stack .email-pane { margin: 0 0 var(--sp-4); }
.rain-panel { border-color: var(--gold-line); margin-top: 0; }
.rain-panel h2 { margin-top: 0; }
.check { color: var(--blue-dark); font-weight: 700; margin: 0 0 var(--sp-2); }
.check-warn { color: var(--gold-text); }
/* The folded Checks row: a warning banner, so it is noticed before it is opened. */
.check-fold details.fold, .check-fold details.fold[open] { background: var(--warn-bg); border: 2px solid var(--gold-line); }
.check-fold details.fold summary { color: var(--gold-text); font-size: var(--fs-md); }
.check-fold details.fold summary > span:first-child { display: flex; align-items: center; gap: var(--sp-3); }
.check-fold details.fold summary > span:first-child::before { content: "!"; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--gold-text); color: var(--warn-bg); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.check-fold .fold-hint { color: var(--gold-text); font-weight: 700; text-decoration: underline; }
.check-fold .check-box { background: var(--surface); }
.check-box { background: var(--warn-bg); border: var(--bw-thin) solid var(--gold-line); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin: 0 0 var(--sp-3); }
.check-head { margin: 0 0 var(--sp-2); font-weight: 700; color: var(--gold-text); }
.check-mu { margin: 0 0 var(--sp-2); }
.check-mu-name { margin: 0; font-weight: 700; }
.check-list { margin: var(--sp-1) 0 0; padding-left: var(--sp-5); font-weight: 400; }
.check-list li { margin: 0 0 2px; }
.win { color: var(--blue-dark); }
.hc-down { color: var(--blue-dark); font-size: var(--fs-xs); }
.hc-up { color: var(--gold-text); font-size: var(--fs-xs); }
.action-bar { position: sticky; bottom: 0; z-index: 2; background: var(--page); border-top: var(--bw-thin) solid var(--line); padding: var(--sp-2) 0 var(--sp-3); margin-top: var(--sp-3); }
.action-bar .actions .btn, .action-bar .actions button { margin-top: 0; }
.side-group > summary { cursor: pointer; list-style: none; }
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary::after { content: "\25BE"; float: right; }
.side-group:not([open]) > summary::after { content: "\25B8"; }
.email-head { position: sticky; top: 0; }
.email-pane { background: var(--surface-head); border-radius: var(--r-md); padding: var(--sp-4); }
.email-pane .eyebrow { margin: 0 0 var(--sp-2); }
.email-card { background: var(--surface); border-radius: var(--r-md); overflow: hidden; }
.email-head { background: var(--blue); color: var(--on-dark); font-weight: 700; padding: var(--sp-3) var(--sp-4); }
.email-body { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.email-head { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); }
/* The real email is written large for phones; the preview shows it smaller so more fits on the screen. */
.email-real { zoom: .8; }
/* The page's table styles (cell borders, padding, white fill) must not reach the email's own tables, which style themselves inline. */
.email-real table { background: transparent; }
.email-real th, .email-real td { border: 0; padding: 0; vertical-align: middle; }
.email-real td[align=right] { width: 4rem; white-space: nowrap; }
.email-body h3 { margin: var(--sp-4) 0 var(--sp-1); }
.email-body p { margin: 0 0 var(--sp-1); }
.email-sub { padding-left: var(--sp-4); }
.seccard input[type=text], .seccard select, .rain-panel input[type=text], .rain-panel select { width: 100%; max-width: 100%; box-sizing: border-box; }
.inline-row input[type=text] { width: auto; }
.recap-main .wrap > table { min-width: 0; }
@media (min-width: 40rem) {
  .seccard .wrap > table { min-width: 0; }
}
.seccard .wrap td input[type=text] { width: 5rem; }
.sched-grid .wrap > table { min-width: 0; }
@media (min-width: 64rem) {
  .sched-grid { grid-template-columns: minmax(0, 1fr) 22rem; }
}
/* Chunk 44: admin setup pages */
details.rowmenu summary { min-height: var(--h-control); display: flex; align-items: center; color: var(--blue); cursor: pointer; text-decoration: underline; }
details.rowmenu { position: relative; display: inline-block; vertical-align: middle; }
details.rowmenu summary { padding: 0 .5rem; }
details.rowmenu > .menu { position: absolute; right: 0; z-index: 5; min-width: 15rem; display: flex; flex-direction: column; align-items: stretch; gap: .25rem; padding: .5rem; background: var(--surface); border: var(--bw-thin) solid var(--line); border-radius: var(--r-md); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); white-space: normal; }
details.rowmenu > .menu .inline-form { display: flex; flex-direction: column; margin: 0; }
details.rowmenu > .menu button.small { margin: .25rem 0 0; }
details.rowmenu > .menu .btn { margin: 0 0 .25rem; min-height: var(--h-control); font-size: var(--fs-md); }
.role-tag { margin-top: .25rem; font-weight: 400; }
table.golfers td.row-actions { width: 9.5rem; min-width: 9.5rem; white-space: nowrap; }
table.golfers th, table.golfers td { padding-left: .5rem; padding-right: .5rem; }
table.golfers td:nth-child(2) { overflow-wrap: anywhere; min-width: 11rem; }
table.golfers .sub { font-weight: 400; color: var(--text2); font-size: var(--fs-sm); }
details.rowmenu summary { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--h-control); padding: 0 .9rem; font-weight: 700; font-size: var(--fs-md); color: var(--blue); background: var(--surface); border: var(--bw) solid var(--blue); border-radius: var(--r-md); text-decoration: none; cursor: pointer; list-style: none; }
details.rowmenu summary::-webkit-details-marker { display: none; }
details.rowmenu summary::after { content: ""; width: .5rem; height: .5rem; border-right: var(--bw) solid currentColor; border-bottom: var(--bw) solid currentColor; transform: rotate(45deg) translateY(-2px); }
details.rowmenu[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
details.rowmenu summary:hover { background: var(--sky); }
@media (max-width: 40rem) {
  table.golfers td.row-actions { width: auto; min-width: 0; white-space: normal; }
  table.stack.golfers td.row-actions[data-label]::before { display: none; }
  table.golfers td:nth-child(2) { min-width: 0; }
  table.golfers td.row-actions details.rowmenu { display: block; }
  table.golfers td.row-actions details.rowmenu summary { display: flex; width: 100%; }
  details.rowmenu > .menu { position: static; box-shadow: none; min-width: 0; margin-top: .5rem; }
}
.seccard .wrap { margin-top: var(--sp-2); }
.seccard .fold { margin: var(--sp-3) 0 0; }
ol.shelf { flex-wrap: wrap; overflow: visible; justify-content: center; }
@media (max-width: 40rem) {
  .wrap > table:not(.stack) th, .wrap > table:not(.stack) td { padding: .5rem .4rem; overflow-wrap: break-word; }
  .wrap:has(> table.stack) { background: transparent; border: 0; border-radius: 0; }
  .wrap > table.stack { background: transparent; }
  table.stack, table.stack tbody, table.stack tr, table.stack caption { display: block; }
  table.stack thead { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  table.stack caption { padding: 0 0 var(--sp-2); }
  table.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-1) var(--sp-3); background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); padding: var(--sp-3); margin: 0 0 var(--sp-3); }
  table.stack td, table.stack th { display: block; border: 0 !important; padding: 0; min-width: 0; overflow-wrap: anywhere; background: transparent; white-space: normal !important; text-align: left; }
  table.stack td.n { text-align: left; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: var(--fs-xs); font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .03em; }
  table.stack tr > :first-child, table.stack td:not([data-label]), table.stack td:has(form), table.stack td:has(.btn), table.stack td:has(details) { grid-column: 1 / -1; }
  table.stack tr > :first-child { font-weight: 700; font-size: var(--fs-md); }
  table.stack tr > :first-child::before { display: none; }
  table.stack td:empty { display: none; }
  table.stack td input[type=text], table.stack td select { width: 100%; }
  .seccard .wrap td input[type=text] { width: 100%; }
}
/* Home: opponent figures and the list of other pages */
.opp { display: block; border-top: var(--bw-thin) solid var(--line); padding-top: var(--sp-3); margin-top: var(--sp-3); }
.opp h3.eyebrow { margin: 0 0 var(--sp-2); }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.stat-row > div { background: var(--page); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3); }
.stat-row span { display: block; font-size: var(--fs-xs); color: var(--text2); }
.stat-row strong { display: block; font-size: var(--fs-lg); }
.opp-record { margin: var(--sp-3) 0 0; color: var(--text2); }
.opp .btn { margin-top: var(--sp-3); }
.linklist { display: flex; flex-direction: column; margin: var(--sp-4) 0; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.linklist a { display: flex; align-items: center; justify-content: space-between; min-height: var(--h-control-lg); padding: 0 var(--sp-4); color: var(--text); text-decoration: none; font-weight: 700; border-top: var(--bw-thin) solid var(--line); }
.linklist a:first-child { border-top: 0; }
.linklist a::after { content: "\203A"; font-size: var(--fs-xl); color: var(--blue); }
/* Score summary: each golfer's gross total and holes won */
.sc-tally { margin: var(--sp-2) 0; }
.sc-tally-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding: var(--sp-2) 0; border-top: var(--bw-thin) solid var(--line); }
.sc-tally-row:first-child { border-top: 0; }
.sc-tally-row span { white-space: nowrap; font-weight: 700; }
/* Chicken Cup better ball: which score counts for the pair */
.sc-rightpair { display: inline-flex; align-items: center; gap: var(--sp-2); }
.sc-pairnet { margin: var(--sp-1) 0 var(--sp-3); color: var(--text2); font-weight: 700; }
/* The hole-by-hole grid has ten columns: tight cells so it fits a phone, and it scrolls inside its own box only at very large text */
.holes-wrap { overflow-x: auto; }
@media (max-width: 40rem) {
  .holes-wrap { overflow-x: auto; }
  table.holes th, table.holes td { padding: .4rem .15rem; font-size: var(--fs-sm); }
  table.holes th[scope=row] { padding-left: .4rem; }
}
/* Home lineup: order of play with Move up and Move down */
.spot-list { list-style: none; margin: var(--sp-2) 0 0; padding: 0; }
.spot-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3) 0; border-top: var(--bw-thin) solid var(--line); margin: 0; }
.spot-list li:first-child { border-top: 0; }
.spot-num { display: inline-block; min-width: 4.2rem; font-weight: 700; color: var(--text2); }
.spot-btns { display: inline-flex; gap: var(--sp-2); }
.spot-move { width: auto; margin: 0; min-height: var(--h-control); padding: 0 var(--sp-4); font-size: var(--fs-md); }
/* Individual standings: name and team, then Points, HCP and Low net in their own columns (mockup Individual) */
.statrow, .statrow-head { display: grid; grid-template-columns: minmax(0, 1fr) 3.6rem 2.6rem 3.6rem; align-items: center; gap: var(--sp-1) var(--sp-2); }
.statrow-head { padding: 0 1rem; margin-top: .75rem; font-size: var(--fs-sm); font-weight: 700; color: var(--text2); }
.statrow .stat-pts, .statrow-head .stat-pts { text-align: right; font-size: var(--fs-lg); font-weight: 700; }
.statrow-head .stat-pts { font-size: var(--fs-sm); }
.statrow .stat-col, .statrow-head .stat-col { text-align: right; }
.statrow { min-height: var(--h-control-lg); }
/* A screen with no Back link (Home, sign-in): the title sits at the left, as in the mockup */
header.bar.home .title { text-align: left; padding-left: var(--sp-2); }
.opp-facts { margin: 0; color: var(--text2); }
.opp-record { margin: var(--sp-1) 0 0; font-weight: 700; color: var(--blue); }
.opp-record a { display: inline; font-weight: 700; }
.plain-rows { margin: 0 0 var(--sp-2); }
.plain-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding: var(--sp-2) 0; border-top: var(--bw-thin) solid var(--line); }
.plain-row:first-child { border-top: 0; }
.plain-row strong { white-space: nowrap; }
.statrow .stat-pts, .rr-value { font-size: var(--fs-xl); }
/* Column headings: same side padding as a card (2px border + 1rem), so the labels sit over the figures. */
.rr-head, .statrow-head, .seccard .rr-head { padding: 0 calc(1rem + 2px); }
/* Team roster: golfer, HCP, points (as the team mockup draws it). */
.statrow-3, .statrow-head.statrow-3 { grid-template-columns: minmax(0, 1fr) 3.2rem 3.6rem; }
table.holes thead th:first-child { text-align: left; padding-left: .6rem; }
/* Individual standings columns: narrow enough that 200 percent text does not scroll sideways, wide enough for "Low net" at normal size. */
.statrow:not(.statrow-3), .statrow-head:not(.statrow-3) { grid-template-columns: minmax(0, 1fr) 2.8rem 2.2rem 3.5rem; }
/* History cards and the draft board's champions: a picture tile beside the title (mockup History); the newest year is outlined. */
.hist-card-now { border-top: 4px solid var(--blue); }
.hist-title img, .champs img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--r-md); flex: none; background: var(--sky); }
.champs { display: flex; gap: .75rem; align-items: center; background: var(--surface); border: var(--bw) solid var(--gold-line); border-radius: var(--r-md); padding: .75rem; margin: 1rem 0; }
.champs > div { display: flex; flex-direction: column; min-width: 0; }
/* The Approve card for a proposed rules version (mockup AdminRules): outlined in gold so it reads as the one decision on the page. */
.approve-card { border: var(--bw) solid var(--gold-line); border-radius: var(--r-md); background: var(--surface); padding: .25rem 1rem 1rem; margin: 1rem 0; }
.approve-card .box { border: 0; padding: .5rem 0; margin: 0; }
.approve-card h3 { font-size: var(--fs-lg); margin: .5rem 0; }
/* Green yardage points (administrator): one box per point, with a button to fill it from the phone's GPS. */
.green-row { margin: .5rem 0; display: grid; grid-template-columns: 1fr auto; gap: .25rem .5rem; align-items: center; }
.green-row label, .green-row .note { grid-column: 1 / -1; }
.green-row input { width: 100%; min-width: 0; max-width: 24rem; }
.green-row button { margin: 0; padding: .45rem .7rem; min-height: var(--h-control); white-space: nowrap; }
/* Computers: on pages that opt in (main.cols), cards sit in two columns and the page uses more of the screen. A phone is unchanged. */
@media (min-width: 64rem) {
  main.cols { max-width: 62rem; column-count: 2; column-gap: 1.5rem; }
  main.cols > * { break-inside: avoid; }
  main.cols > :not(.box):not(.cols-item):not(.hist-card):not(.week) { column-span: all; }
  main.cols > .box, main.cols > .hist-card, main.cols > .week { margin-top: 0; margin-bottom: 1rem; }
  main.cols > .cols-item > :first-child { margin-top: 0; }
  main.cols.grid { column-count: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; align-items: start; }
  main.cols.grid > * { grid-column: 1 / -1; }
  main.cols.grid > .box, main.cols.grid > .week { grid-column: auto; }
}
/* Computers, step 3 (admin): forms do not stretch across a wide page. A field is as wide as it needs to be, and a form's own button is button-sized. */
@media (min-width: 64rem) {
  .admin-main input[type=text], .admin-main input[type=email], .admin-main input[type=number], .admin-main input[type=password], .admin-main select, .admin-main textarea { max-width: 40rem; }
  .admin-main form > button[type=submit], .admin-main .formbox > button[type=submit] { width: auto; min-width: 14rem; padding: 0 1.5rem; }
}
/* Season setup on a big screen: the settings cards fill two columns instead of one very long one. */
@media (min-width: 90rem) {
  .setting-cols { column-count: 2; column-gap: 1.5rem; }
  .setting-cols > * { break-inside: avoid; }
  .setting-cols > .box { margin-top: 0; margin-bottom: 1rem; }
}
td select, .inline-form select { min-height: var(--h-control); }
.poolpick input[type=search] { max-width: 30rem; }
.fld > label:first-child { margin-top: .75rem; }
.fld > .note, .fld label .note { font-weight: 400; }
/* A list of dates, one per chip (the date list script). */
.datelist-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: .25rem; }
.datelist-row button { width: auto; margin: 0; min-height: var(--h-control); padding: 0 1.1rem; }
.chips { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { display: inline-flex; align-items: center; gap: .5rem; background: var(--sky); border-radius: var(--r-pill); padding: .2rem .35rem .2rem .9rem; font-weight: 700; }
.chips li.none { background: transparent; font-weight: 400; color: var(--text2); padding-left: 0; }
.chips .chip-x { width: auto; min-height: var(--h-control-sm); margin: 0; padding: 0 .8rem; font-size: var(--fs-sm); border-radius: var(--r-pill); background: var(--surface); color: var(--blue); border: var(--bw) solid var(--blue); }
/* Admin forms on a computer: short fields sit two across (a day and its time, a team and a golfer), wide ones and the button take the row. */
@media (min-width: 64rem) {
  .admin-main form.fbox { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; align-items: start; }
  .admin-main form.fbox > .fld-wide, .admin-main form.fbox > button, .admin-main form.fbox > input[type=hidden] { grid-column: 1 / -1; }
  .admin-main form.fbox > button[type=submit] { justify-self: start; }
}
td input[type=number], .inline-form input[type=number] { min-height: var(--h-control); max-width: 8rem; }
/* The Chicken Cup draft pool picker: a searchable checklist. */
.inline-form:has(.poolpick) { display: block; }
.poolpick-bar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .6rem 0; }
.poolpick-count { font-weight: 700; margin-right: auto; }
.poolpick-bar button { width: auto; margin: 0; min-height: var(--h-control); padding: 0 1rem; }
.poolpick-list { list-style: none; margin: 0; padding: 0; max-height: 26rem; overflow-y: auto; border: var(--bw) solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.poolpick-list li { border-top: var(--bw-thin) solid var(--line); }
.poolpick-list li:first-child { border-top: 0; }
.poolpick-list li[hidden] { display: none; }
.poolpick-list label { display: flex; align-items: center; gap: .75rem; margin: 0; padding: .45rem .9rem; min-height: var(--h-control); font-weight: 400; cursor: pointer; }
.poolpick-list label:hover { background: var(--sky); }
.poolpick-list .pp-name { font-weight: 700; }
.poolpick-list .pp-meta { color: var(--text2); font-size: var(--fs-sm); margin-right: auto; }
.poolpick-list .pp-badge { font-size: var(--fs-xs); font-weight: 700; padding: .1rem .6rem; border-radius: var(--r-pill); background: var(--surface-muted); color: var(--text2); }
.poolpick-list li.taken label { cursor: default; background: var(--surface-muted); }
.poolpick-list li.taken .pp-name { color: var(--text2); }
.pool-chips form.inline-form { margin: 0; display: inline-flex; }
.pool-chips li form.inline-form .chip-x { width: auto; min-width: 0; flex: none; margin: 0; padding: 0 .8rem; }
.pool-chips li { padding-right: .35rem; }
/* An administrator who is also a golfer: the view switch in the header (chunk 65). */
header.bar .barright { display: flex; align-items: center; gap: 1rem; }
header.bar .viewswitch { margin: 0; }
header.bar .viewswitch button { width: auto; min-height: var(--h-control); margin: 0; padding: 0 .25rem; font-size: var(--fs-md); font-weight: 400; color: var(--on-dark); background: transparent; border: 0; text-decoration: underline; cursor: pointer; }
/* Administrators list on Season setup: one block each, with the same Actions menu as the golfers table. */
.admin-list { display: flex; flex-direction: column; }
.admin-item { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .5rem 1rem; padding: .75rem 0; border-top: var(--bw-thin) solid var(--line); }
.admin-item:first-child { border-top: 0; }
.admin-who { display: flex; flex-direction: column; gap: .15rem; min-width: 0; overflow-wrap: anywhere; }
.admin-item details.rowmenu { flex: none; }
.admin-item details.rowmenu > .menu { position: static; box-shadow: none; margin-top: .5rem; min-width: 14rem; }
.admin-item .menu select { width: 100%; }
.admin-item .menu input[type=email] { width: 100%; }
/* The "Earlier seasons" dropdown beside the season pills once a league has several years of stats. */
.season-more { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .25rem 0 1rem; }
.season-more label { font-weight: 700; }
.season-more select { width: auto; min-width: 8rem; }
.season-more button { margin: 0; width: auto; }
/* Home screen (signed in): greeting, one status line, quick-link tiles, a quiet list, and a small sign-out. */
.home-hello { display: flex; align-items: center; gap: 1rem; margin: .25rem 0 .5rem; }
.home-hello h1 { margin: 0; font-size: var(--fs-xl); line-height: 1.15; }
.home-team { margin: .15rem 0 0; color: var(--muted, var(--text2)); font-weight: 600; }
.hc-mini { flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--blue); color: var(--on-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; }
.hc-mini span { font-size: var(--fs-xl); font-weight: 700; line-height: 1; }
.hc-mini small { font-size: var(--fs-xs); letter-spacing: .04em; }
.home-status { margin: 0 0 1rem; font-size: var(--fs-md); font-weight: 400; }
.announce { margin: 0 0 1rem; padding: .75rem 1rem; background: var(--surface); border: var(--bw) solid var(--line); border-left: 6px solid var(--blue); border-radius: var(--r-md); }
.announce p { margin: .25rem 0; font-weight: 600; }
.answer { margin: .5rem 0; }
.answer-links { margin: .25rem 0 0; }
.answer-links a { display: inline-flex; align-items: center; min-height: var(--h-control); }
/* Tiles are at least 9.5rem wide: two or three across at normal text, one across when the text is made large (no sideways scrolling). */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: .75rem; margin: 1rem 0; }
.tile { display: flex; flex-direction: column; justify-content: center; gap: .15rem; min-height: 84px; padding: .75rem 1rem; background: var(--surface); border: var(--bw-thin) solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--text); }
.tile strong { font-size: var(--fs-md); color: var(--blue); overflow-wrap: anywhere; }
.tile span { font-size: var(--fs-sm); color: var(--muted, var(--text2)); }
a.tile:hover { border-color: var(--blue); }
.signout { margin: 1.25rem 0 0; text-align: center; }
.signed-as { text-align: center; margin-top: 0; }
/* Administrator home: the announcements showing, each with a Take down button. */
.ann-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.ann-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .9rem; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); }
.ann-list .ann-text { margin: 0; font-weight: 600; }
.ann-list .note { margin: .15rem 0 0; }
/* Computers and wide tablets: the title sits in the exact middle of the bar whatever links are on either side (equal side zones). A phone is too narrow for that and keeps the flowing layout. */
@media (min-width: 40rem) {
  header.bar:not(.home) { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  header.bar:not(.home) > :first-child { justify-self: start; }
  header.bar:not(.home) > :last-child { justify-self: end; }
  header.bar:not(.home) .title { flex: none; }
}
/* Set up status icons (Golfers page). On a computer the icon stands alone (its words are still there for screen readers and the hover
 * tip); on a phone the words show beside it. */
.st { display: inline-flex; align-items: center; gap: .4rem; }
.st-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; font-weight: 700; font-size: var(--fs-sm); line-height: 1; border: var(--bw) solid var(--blue); color: var(--blue); background: var(--surface); }
.st-ok .st-icon { background: var(--action); color: var(--on-dark); }
.st-sent .st-icon { background: var(--sky); }
.st-bad .st-icon { border-color: var(--caution); color: var(--caution); background: var(--warn-bg); }
.st-no .st-icon { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.st-none .st-icon { border-color: var(--text2); color: var(--text2); }
.st-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st-legend { margin: .25rem 0 .75rem; color: var(--text2); display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; font-size: var(--fs-sm); }
.st-legend .st-icon { width: 1.35rem; height: 1.35rem; font-size: var(--fs-xs); }
@media (max-width: 40rem) {
  .st-word { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-weight: 600; }
  .st-legend { display: none; }
  table.stack.golfers tr { grid-template-columns: 1fr 1fr 1.4fr; gap: var(--sp-2) var(--sp-3); }
  table.stack.golfers tr > th { grid-column: 1 / -1; font-size: var(--fs-md); }
  table.stack.golfers td[data-label="Email"] { grid-column: 1 / -1; color: var(--text2); font-size: var(--fs-sm); }
  table.stack.golfers td[data-label="Email"]::before { display: none; }
  table.stack.golfers td[data-label="Handicap"], table.stack.golfers td[data-label="Dues"], table.stack.golfers td[data-label="Set up"] { grid-column: auto; }
  table.stack.golfers td.row-actions { grid-column: 1 / -1; margin-top: var(--sp-1); }
}
/* Golfer clubhouse and league workflow panels */
.golfer-nav { background: var(--blue); color: white; }
.home-practice { background: var(--warn-bg); border: var(--bw) solid var(--gold-line); border-radius: var(--r-md); padding: .6rem .8rem; color: var(--text); }
body[data-club-home] .home-match { border-top: 4px solid var(--action); }
body[data-club-home] .box, .club-metrics > div { border-radius: var(--r-sm); box-shadow: none; }
.club-section-title { margin: .9rem 0 .25rem; }
.club-action .btn { width: 100%; text-align: center; box-sizing: border-box; }
.golfer-nav { position: fixed; inset: auto 0 0; display: flex; justify-content: space-around; z-index: 6; padding: .2rem .2rem max(.3rem, env(safe-area-inset-bottom)); gap: .15rem; }
nav.golfer-nav > a { flex: 1; color: var(--on-dark); min-height: var(--h-control-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: .2rem; font-size: var(--fs-xs); text-decoration: none; border-radius: var(--r-md); }
.golfer-nav svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.golfer-nav [aria-current] { font-weight: 700; background: var(--yellow); color: var(--blue-dark); }
.hub { margin: .5rem 0 1rem; }
.hub-group { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .04em; color: var(--text2); margin: 1.2rem 0 .2rem; }
.hub-row { display: flex; align-items: center; justify-content: space-between; min-height: var(--h-control-lg); background: var(--surface); border: var(--bw-thin) solid var(--line); border-radius: var(--r-md); padding: .7rem 1rem; margin: .55rem 0; font-weight: 700; color: var(--text); text-decoration: none; }
.hub-row small { display: block; font-weight: 400; color: var(--text2); font-size: var(--fs-sm); }
.hub-row::after { content: "\203A"; font-size: var(--fs-xl); color: var(--blue); }
.club-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: .5rem; }
.club-metrics > div { padding: .6rem .8rem; border: var(--bw-thin) solid var(--line); background: var(--surface); }
.club-metrics dd { margin: 0; font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.backrow { display: flex; align-items: center; flex-wrap: wrap; gap: 0 1rem; margin: -.5rem 0 .25rem; min-height: var(--h-control); }
.pagectx { margin: 0; color: var(--text2); font-size: var(--fs-sm); font-weight: 700; }
.pagectx + h1 { margin-top: 0; }
.backrow a { display: inline-flex; align-items: center; min-height: var(--h-control); font-weight: 700; }
header.bar.home .title { justify-content: flex-start; }
.brand-logo { height: 34px; width: auto; flex: none; }

/* ---------------------------------------------------------------------------------------------------
   One desktop shell (chunk 69). A column down the left holds the golfer's tabs or the administrator's sections, then who is signed in, then
   Help. From 48rem it is a narrow rail (icon with its label under it); from 64rem it is the full column. The page starts one gutter from the
   column and keeps its own width, so nothing moves between pages. A phone is unchanged: top bar and bottom tabs, or the admin menu.
   --------------------------------------------------------------------------------------------------- */
.admin-shell { display: block; }
.admin-side { display: none; }
.side-brand { display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-2); font-size: var(--fs-md); font-weight: 700; color: var(--text); }
.side-brand .brand-logo { height: 36px; }
.side-role { margin: 0 0 var(--sp-2); padding: 0 var(--sp-2); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text2); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-1); padding-top: var(--sp-3); }
.side-foot .viewswitch { margin: 0; }
.side-foot .viewswitch button { width: 100%; margin: 0; min-height: var(--h-control); padding: 0 var(--sp-3); display: flex; align-items: center; justify-content: flex-start; font-size: var(--fs-md); font-weight: 400; color: var(--text); text-decoration: none; border-radius: var(--r-md); }
.side-foot a:hover, .side-foot .viewswitch button:hover { background: var(--surface-muted); }

@media (min-width: 48rem) {
  body:has(.golfer-bar) { padding-left: var(--col-rail); }
  body:has(.golfer-bar) main, body:has(.golfer-bar) footer.foot { margin: 0 auto; max-width: calc(var(--content) + 2 * var(--gutter)); padding-inline: var(--gutter); }
  body:has(.golfer-nav) main { padding-bottom: 2rem; }
  html:has(.golfer-nav) { scroll-padding-bottom: 0; }
  header.bar.golfer-bar { position: fixed; inset: 0 auto 0 0; width: var(--col-rail); z-index: 6; display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-3); padding: var(--sp-3) var(--sp-2); overflow-y: auto; background: var(--surface); color: var(--text); border-right: var(--bw-thin) solid var(--line); }
  header.bar.golfer-bar .title { flex: none; justify-content: center; padding: 0; }
  header.bar.golfer-bar .brand-text { display: none; }
  header.bar.golfer-bar .brand-logo { height: 36px; }
  .golfer-nav { position: static; inset: auto; flex-direction: column; justify-content: flex-start; gap: var(--sp-1); padding: 0; background: transparent; }
  nav.golfer-nav > a { flex: none; color: var(--text); min-height: var(--h-control-lg); padding: var(--sp-1); font-size: var(--fs-xs); }
  nav.golfer-nav > a:hover { background: var(--surface-muted); }
  .golfer-nav [aria-current] { background: var(--sky); color: var(--blue-dark); box-shadow: inset 4px 0 0 var(--blue); }
  header.bar.golfer-bar .barright { margin: auto 0 0; flex-direction: column; align-items: stretch; gap: var(--sp-1); }
  header.bar.golfer-bar .barright a, header.bar.golfer-bar .viewswitch button { width: 100%; min-height: var(--h-control); margin: 0; padding: var(--sp-1); justify-content: center; text-align: center; font-size: var(--fs-xs); font-weight: 400; color: var(--text); text-decoration: none; border-radius: var(--r-md); overflow-wrap: anywhere; }
  header.bar.golfer-bar .barright a:hover, header.bar.golfer-bar .viewswitch button:hover { background: var(--surface-muted); }
}
@media (min-width: 64rem) {
  body:has(.golfer-bar) { padding-left: var(--col-full); }
  header.bar.golfer-bar { width: var(--col-full); padding: var(--sp-4) var(--sp-3); }
  header.bar.golfer-bar .title { justify-content: flex-start; padding: 0 var(--sp-2); gap: var(--sp-2); font-size: var(--fs-md); color: var(--text); }
  header.bar.golfer-bar .brand-text { display: inline; }
  nav.golfer-nav > a { flex-direction: row; justify-content: flex-start; gap: var(--sp-3); padding: 0 var(--sp-3); min-height: var(--h-control); font-size: var(--fs-md); }
  header.bar.golfer-bar .barright a, header.bar.golfer-bar .viewswitch button { justify-content: flex-start; text-align: left; padding: 0 var(--sp-3); font-size: var(--fs-md); }
  /* the administrator side: the same column, with the sections in it, and the separate top bar and floating list gone */
  body:has(.admin-side) { padding-left: var(--col-full); }
  body:has(.admin-side) > header.bar { display: none; }
  body:has(.admin-side) main, body:has(.admin-side) footer.foot { margin: 0 auto; max-width: calc(var(--content) + 2 * var(--gutter)); padding-inline: var(--gutter); }
  .admin-side { position: fixed; inset: 0 auto 0 0; width: var(--col-full); z-index: 6; display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-4) var(--sp-3); overflow-y: auto; background: var(--surface); border: 0; border-right: var(--bw-thin) solid var(--line); border-radius: 0; }
  .admin-side a[aria-current=page] { box-shadow: inset 4px 0 0 var(--blue); }
  .admin-side a { min-height: var(--h-control-sm); white-space: nowrap; }
  .recap-grid .email-pane { position: sticky; top: var(--sp-4); max-height: calc(100vh - 2 * var(--sp-4)); display: flex; flex-direction: column; }
  .recap-grid .email-card { overflow-y: auto; }
  .admin-menu { display: none; }
}

/* ---------------------------------------------------------------------------------------------------
   Page layouts (chunk 71): Home in two columns on a computer, one captain card, a compact availability list.
   Widths are the three from the shell: 44rem (one column), 62rem (two columns), 78rem (tables).
   --------------------------------------------------------------------------------------------------- */
.home-grid, .avail-layout { display: block; }
.captain-card .btn { margin-top: var(--sp-2); }
.captain-card .btn.quiet { margin-top: 0; }
@media (min-width: 40rem) {
  .avail-list .week { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-4); align-items: center; padding: var(--sp-2) var(--sp-4); margin: var(--sp-2) 0; }
  .avail-list .week h3 { grid-column: 1; margin: 0; font-size: var(--fs-md); }
  .avail-list .week .week-sub { grid-column: 1; margin: 0; }
  .avail-list .week .pair { grid-column: 2; grid-row: 1 / span 2; }
  .avail-list .pair form { flex: none; }
  .avail-list .pair button { width: 8.5rem; min-width: 0; margin: 0; padding: 0 var(--sp-3); }
}
@media (min-width: 64rem) {
  body[data-club-home] { --content: 62rem; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 0 var(--sp-5); align-items: start; }
  .home-grid > * > :first-child { margin-top: 0; }
  .avail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--sp-5); align-items: start; }
  .avail-plan { grid-column: 2; grid-row: 1; margin-top: 0; }
  .avail-list { grid-column: 1; grid-row: 1; }
}
}

@layer overrides {
/* A mouse shows what it is over (a finger cannot hover). */
@media (hover: hover) {
  body:not(:has(#score-app)) .btn:not(.secondary, .quiet):hover, body:not(:has(#score-app)) button:not(.secondary, .linkbtn, .quiet):hover { background: var(--action-dark); border-color: var(--action-dark); color: var(--on-dark); }
  body:not(:has(#score-app)) .btn.secondary:hover, body:not(:has(#score-app)) button.secondary:hover, body:not(:has(#score-app)) .btn.quiet:hover, body:not(:has(#score-app)) button.quiet:hover { background: var(--sky); }
}
/* High contrast (plan 13): black on white with bold borders, for glare outdoors. The tokens do almost all of it; only what a token cannot say is below. */
html.hc {
  --page: #fff; --surface: #fff; --surface-muted: #fff; --surface-head: #fff; --text: #000; --text2: #000; --line: #000; --border-strong: #000;
  --bw: 3px; --bw-thin: 3px; --blue: #000; --blue-dark: #000; --sky: #fff; --action: #000; --action-dark: #000; --focus: #000;
  --success: #000; --success-bg: #fff; --danger: #000; --danger-bg: #fff; --caution: #000; --warn-bg: #fff; --gold-text: #000; --gold-line: #000;
}
html.hc a { text-decoration: underline; font-weight: 700; }
html.hc nav.golfer-nav > a { text-decoration: none; }
html.hc :focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
html.hc .badge { border: 2px solid #000; }
html.hc :is(.admin-side, .admin-menu nav) a[aria-current=page] { background: #000; color: #fff; }
html.hc .golfer-nav [aria-current] { background: #333; color: #fff; outline: 2px solid #fff; outline-offset: -2px; }
html.hc .sc-val { border: 3px solid #000; }
html.hc .sc-amber { color: #000; text-decoration: underline; }
html.hc .sc-green { color: #000; }
}

/* My Team overview: the Who is playing fold inside the Next match card, and the season strip. */
.playing { margin: var(--sp-4) -1rem -1rem; border-top: var(--bw-thin) solid var(--line); background: var(--surface-muted); border-radius: 0 0 var(--r-md) var(--r-md); }
.playing summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: var(--h-control); padding: var(--sp-2) 1rem; cursor: pointer; font-weight: 700; list-style: none; }
.playing summary::-webkit-details-marker { display: none; }
.playing-count { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; flex-wrap: wrap; }
.playing-dots { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.playing-dots i { width: .75rem; height: .75rem; border-radius: 50%; background: var(--border-strong); }
.playing-dots i.dot-in, .playing-dots i.dot-won { background: var(--success); }
.playing-dots i.dot-lost { background: var(--danger); }
.playing-go { color: var(--blue); white-space: nowrap; }
.playing-go::after { content: " \203A"; }
.playing[open] .playing-go::after { content: " \2C4"; }
.playing-body { padding: 0 1rem 1rem; }
.seasonstrip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.seasonstrip > div { display: flex; flex-direction: column; min-width: 0; }
.seasonstrip small { color: var(--text2); font-size: var(--fs-xs); }
.seasonstrip strong { font-size: var(--fs-lg); line-height: 1.2; }
.seasonstrip span { color: var(--text2); font-size: var(--fs-xs); }
.sub-eyebrow { margin: var(--sp-4) 0 var(--sp-1); padding-top: var(--sp-3); border-top: var(--bw-thin) solid var(--line); font-size: var(--fs-sm); }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--sp-3); text-align: center; }
.sb-side { display: flex; flex-direction: column; min-width: 0; }
.sb-side span { font-size: var(--fs-sm); color: var(--text2); overflow-wrap: anywhere; }
.sb-side strong { font-size: var(--fs-display); line-height: 1.1; }
.sb-to { color: var(--text2); font-size: var(--fs-sm); }
.sb-sub { text-align: center; margin: var(--sp-1) 0 var(--sp-3); color: var(--text2); font-size: var(--fs-sm); }
.tm-rows { list-style: none; margin: 0; padding: 0; }
.tm-row { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-2) 0 var(--sp-2) var(--sp-3); border-top: var(--bw-thin) solid var(--line); border-left: 4px solid var(--border-strong); }
.tm-row:first-child { border-top: 0; }
.tm-rows.playing-body { padding-top: 0; }
.tm-won { border-left-color: var(--success); }
.tm-lost { border-left-color: var(--danger); }
.tm-line { color: var(--text2); font-size: var(--fs-sm); }
.tonight-groups { margin: var(--sp-3) 0 0; }
.captain-link { margin: var(--sp-2) 0; }
.tile-links { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin: var(--sp-2) 0 0; }
label.forfeit:has(input:disabled), label.pick:has(input:disabled) { opacity: .5; }

/* Team availability grid: a row per golfer, a column per week, answers as marks (the words are there for screen readers and in the key). */
.avail-grid { min-width: 0; width: auto; }
.wrap > table.avail-grid { width: auto; min-width: 100%; }
.avail-grid th, .avail-grid td { text-align: center; vertical-align: middle; padding: .5rem .35rem; min-width: 3.6rem; }
.avail-grid thead th { font-size: var(--fs-xs); line-height: 1.3; background: var(--sky); white-space: nowrap; }
.avail-grid thead th small { display: block; font-weight: 400; color: var(--text2); }
.avail-grid th:first-child, .avail-grid td:first-child { position: sticky; left: 0; z-index: 1; text-align: left; min-width: 7.5rem; padding-left: var(--sp-3); background: var(--surface); box-shadow: 1px 0 0 var(--line); white-space: nowrap; }
.avail-grid thead th:first-child { background: var(--sky); }
.avail-grid tbody th { font-weight: 700; }
.avail-grid .av-totals th, .avail-grid .av-totals td { background: var(--surface-muted); }
.av-n { display: block; font-size: var(--fs-xs); line-height: 1.35; color: var(--text); }
.av-n-open { color: var(--text2); }
.av-in, .av-out, .av-none { display: inline-block; font-size: var(--fs-lg); line-height: 1; font-weight: 700; }
.av-in { color: var(--success); }
.av-out { color: var(--danger); }
.av-none { color: var(--text2); font-weight: 400; opacity: .7; }
.av-legend { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; }
.av-legend .av-in, .av-legend .av-out, .av-legend .av-none { font-size: var(--fs-md); }

/* Week page matchups: the team name is the link to its lineup, with its status chip beside it. */
.teamcell a { display: inline-block; margin-right: .6rem; font-weight: 700; }
.movecell form { margin: 0; }
.move-row { flex-wrap: nowrap; align-items: center; gap: var(--sp-2); }
.move-row select { flex: 1 1 7rem; min-width: 6rem; margin: 0; }
.move-row button { flex: none; margin: 0; }
.holelink { font-weight: 800; }
.nowrap { white-space: nowrap; }
tr.grouprow th { background: var(--surface-muted); text-align: left; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .04em; color: var(--text2); }
.rain-panel { max-width: 40rem; }
.opp-record a { display: block; margin-top: .25rem; }
.hub-row > span { flex: 1; min-width: 0; }
.hub-row::after { flex: none; margin-left: .75rem; }
/* Plain fold: no second card; the extra rows just continue the list */
details.fold.fold-plain, details.fold.fold-plain[open] { background: none; border: 0; border-radius: 0; margin: 0; }
details.fold.fold-plain summary { min-height: 0; padding: .6rem .25rem; color: var(--blue); }
details.fold.fold-plain[open] > summary { display: none; }
details.fold.fold-plain > .fold-body { padding: 0; }
/* Score screens on a phone: the bottom tabs stay, and the sticky Next bar rides just above them. */
body:has(#score-app) .sc-nav { bottom: calc(2.3rem + env(safe-area-inset-bottom)); }
@media (min-width: 48rem) { body:has(#score-app) .sc-nav { bottom: 0; } }
/* Score screens: the hole bar hugs the blue header on a phone. Where the header is gone (the side rail), it needs room above it, as a card. */
@media (min-width: 48rem) { body:has(#score-app .sc-band):has(.golfer-bar) main { padding-top: var(--sp-5); } body:has(.golfer-bar) .sc-band { margin-top: 0; border-radius: var(--r-md) var(--r-md) 0 0; } }
@media (min-width: 64rem) { body:has(.admin-side) main { padding-top: var(--sp-5); } body:has(.admin-side) .sc-band { margin-top: 0; border-radius: var(--r-md) var(--r-md) 0 0; } }
.hello-link { display: flex; align-items: center; gap: 1rem; color: inherit; text-decoration: none; }
.hello-link:hover h1 { text-decoration: underline; }
/* Team page: readable season labels, quiet link buttons, chevrons on the folds. */
.seasonstrip small { font-size: var(--fs-sm); }
.seasonstrip span { font-size: var(--fs-sm); }
.vs-compare { margin: var(--sp-3) 0; }
.tile-links .button.small { min-height: var(--h-control); margin: 0; }
details.fold > summary:not(:has(.fold-hint))::after { content: ""; flex: none; width: .55rem; height: .55rem; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); margin-right: .25rem; }
details.fold[open] > summary:not(:has(.fold-hint))::after { transform: rotate(45deg); }
.tile-links .button.small { font-size: var(--fs-md); padding: 0 .9rem; width: auto; min-width: 0; }

/* Trophy shelf as a section card: label on the left, "See all trophies" on the right, trophies wrap beneath. */
.shelf-card .shelf-head { justify-content: space-between; flex-wrap: nowrap; margin-bottom: var(--sp-2); }
.shelf-card .shelf-head h2.eyebrow { margin: 0; }
.shelf-card .shelf-head a { font-size: var(--fs-sm); white-space: nowrap; }
.shelf-card ol.shelf { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; justify-content: flex-start; }
.shelf-card ol.shelf li { width: 104px; }
.shelf-card ol.shelf li a { padding: var(--sp-1); border-radius: var(--r-md); }
.shelf-card ol.shelf li a:hover { background: var(--surface-muted); }
.shelf-card ol.shelf .what { font-size: var(--fs-xs); }
.shelf-card ol.shelf li .what:first-of-type { color: var(--text2); font-weight: 400; }

/* Score entry at the wider content width: the cards grow, the tap targets keep their phone size and stay centred. */
@media (min-width: 40rem) {
  body:has(#score-app) .sc-pad { grid-template-columns: repeat(5, minmax(0, 7.5rem)); justify-content: center; gap: var(--sp-2); }
  body:has(#score-app) .sc-nav { grid-template-columns: repeat(2, minmax(0, 18rem)); justify-content: center; gap: var(--sp-3); background: transparent; border-top: 0; }
  body:has(#score-app) .sc-sides { grid-template-columns: repeat(auto-fit, minmax(10rem, 18rem)); justify-content: center; }
}

/* Admin Chicken Cup weeks: format, home team and Save sit on one row; the week column stays narrow. */
table.cupweeks th[scope=row] { width: 9rem; white-space: nowrap; }
table.cupweeks td { vertical-align: middle; }
table.cupweeks td:nth-child(3) { text-transform: capitalize; }
table.cupweeks .inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0; }
table.cupweeks .inline-form select { width: auto; min-width: 12rem; margin: 0; }
table.cupweeks .inline-form button.small { width: auto; min-width: 5rem; margin: 0; padding: 0 var(--sp-3); }
table.cupweeks .inline-form .note { flex-basis: 100%; }
table.cupweeks td:last-child .inline-form { margin-top: var(--sp-1); }

/* Week page "Needs attention": the item on the left, what is wrong with it in a column beside it. */
ul.attention { list-style: none; padding: 0; margin: var(--sp-2) 0; }
ul.attention li { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; align-items: center; gap: .25rem .75rem; min-height: 2.25rem; padding: .25rem 0; border-bottom: var(--bw-thin) solid var(--line); }
ul.attention li:last-child { border-bottom: 0; }
ul.attention li span { color: var(--text2); }

/* Draft pool on the Cup setup page: folded away by default, and when opened an even list in columns with a small x on each name. */
ul.pool-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 var(--sp-5); }
ul.pool-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 2.25rem; padding: .1rem 0; border-bottom: var(--bw-thin) solid var(--line); }
ul.pool-list li form.inline-form { margin: 0; display: inline-flex; }
ul.pool-list .chip-x { width: var(--h-control); min-width: 0; height: var(--h-control); min-height: 0; padding: 0; margin: 0; flex: none; font-size: var(--fs-lg); line-height: 1; border-radius: 50%; }

/* Draft board tables: each in its own card, no vertical lines, a heading row with room, equal-width number columns, and the golfer list
   scrolls inside its card with the column headings kept in view. */
.board-wrap { margin: var(--sp-4) 0; }
.board-wrap > table { min-width: 0; }
.board-wrap caption { padding: var(--sp-3) var(--sp-4); background: var(--surface); }
.board-wrap th, .board-wrap td { border-left: 0; border-right: 0; padding: .55rem var(--sp-4); }
.board-wrap tbody tr:nth-child(even) td { background: var(--surface-muted); }
.board-wrap th { white-space: nowrap; }
.board-wrap abbr { text-decoration: none; cursor: help; }
.board-pool { max-height: 34rem; overflow: auto; }
.board-pool thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-head); }
.board-pool th.n, .board-pool td.n { width: 6rem; font-variant-numeric: tabular-nums; }

/* Draft board: the newest pick is tagged in its team's list. */
.latest-pick { display: inline-block; margin-left: .4rem; padding: .05rem .5rem; border-radius: var(--r-pill); background: var(--sky); color: var(--blue-dark); font-size: var(--fs-xs); font-weight: 700; vertical-align: middle; }

/* Captain dashboard */
.cap-head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.cap-week { margin: 0; font-weight: 700; font-size: var(--fs-lg); }
.cap-status { margin: var(--sp-2) 0 .25rem; font-weight: 600; }
.cap-list, .cap-roster { list-style: none; margin: 0; padding: 0; }
.cap-list li, .cap-roster li { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); padding: .6rem 0; border-top: var(--bw-thin) solid var(--line); }
.cap-list li:first-child, .cap-roster li:first-child { border-top: 0; }
.cap-roster li > span:first-child { display: flex; flex-direction: column; }
.fold-badge { display: inline-block; margin-left: .4rem; white-space: nowrap; vertical-align: middle; }
.cap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-2); }
.cap-actions .btn, .cap-actions .btn.quiet { margin-top: 0; }
@media (max-width: 40rem) { .cap-actions { flex-direction: column; align-items: stretch; gap: var(--sp-2); } }

/* Team page: "Won 3 to 2" is a sentence, not a score, so it sits at normal size beside the week name. */
.sub-eyebrow + .rowcard .rr-value { font-size: inherit; }
/* Trophies inside a folded section (My Team): the same left-aligned layout as the trophy card on the player page. */
.fold-body ol.shelf { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; justify-content: flex-start; }
.fold-body ol.shelf li { width: 104px; }
.fold-body ol.shelf li a { padding: var(--sp-1); border-radius: var(--r-md); }
.fold-body ol.shelf li a:hover { background: var(--surface-muted); }
.fold-body ol.shelf .what { font-size: var(--fs-xs); }
.fold-body ol.shelf li .what:first-of-type { color: var(--text2); font-weight: 400; }
.fold-body ol.shelf + p { margin-top: var(--sp-3); }

/* Needs your attention: the text takes the room it needs and the Open link stays on the first line, at the right. */
.todo-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.todo-row > a { flex: none; white-space: nowrap; }

/* A note from a team's captain: the same banner as a league announcement, with a green edge so it reads as "from your captain". */
.announce.team-notice { border-left-color: var(--action); }
.announce.team-notice p.note { margin: 0 0 .5rem; font-weight: 400; }
.notice-form textarea { width: 100%; min-height: var(--h-control); max-height: 12rem; resize: vertical; field-sizing: content; box-sizing: border-box; font: inherit; padding: var(--sp-2) var(--sp-3); border: var(--bw) solid var(--text2); border-radius: var(--r-md); }

/* Captain dashboard layout: the week, what is due and the one button, with the counts as one line; folds together underneath. */
.cap-top { display: flex; flex-direction: column; gap: var(--sp-3); }
.cap-top .cap-head { margin-bottom: 0; }
.cap-top .cap-status { margin: var(--sp-2) 0 .15rem; }
.cap-top p { margin-top: 0; }
.cap-top-side { display: flex; flex-direction: column; gap: var(--sp-3); }
.cap-counts { display: flex; flex-wrap: wrap; gap: .25rem var(--sp-4); margin: 0; font-size: var(--fs-sm); color: var(--text2); }
.cap-counts strong { color: var(--text); font-size: var(--fs-md); }
.cap-top .btn { margin-top: 0; }
@media (min-width: 40rem) {
  .cap-top { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: var(--sp-5); }
  .cap-top-main { flex: 1 1 auto; min-width: 0; }
  .cap-top-side { flex: none; align-items: flex-end; text-align: right; }
}
.cap-folds { margin-top: var(--sp-4); }
.cap-folds details.fold:first-child { margin-top: 0; }
/* A note the team can see right now: a small card with when it ends and a Remove link. */
.cap-notice { margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--surface-muted); border-left: 6px solid var(--action); border-radius: var(--r-md); }
.cap-notice p { margin: 0; font-weight: 600; }
.cap-notice-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); }
.cap-notice-foot form { margin: 0; }
.notice-form label { display: block; margin: 0 0 var(--sp-2); font-weight: 400; color: var(--text2); font-size: var(--fs-sm); }
.notice-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-top: var(--sp-2); }
.notice-foot button { margin-top: 0; }
.cap-head .badge { flex: none; white-space: nowrap; }
