/* TVCC Availability. Club colours: blue and red. Status colours (In green, Unsure amber, Out red) stay
   separate from the brand so the board always reads the same. */
:root{
  --turf:#12305f; --turf-2:#1f4b8f; --straw:#9cc3ff; --club-red:#c8102e; --ball:#b3261e; --amber:#c3811a;
  --screen:#fbfbf8; --ink:#1b221e; --muted:#5b6474; --line:#dde2ea; --field:#ffffff;
  --in:#2f8a55; --display:"Barlow Condensed","Arial Narrow",Arial,sans-serif;
  --body:Barlow,"Segoe UI",Roboto,Arial,sans-serif; --r:6px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--screen);color:var(--ink);font:16px/1.5 var(--body);
  padding-bottom:env(safe-area-inset-bottom,0)}
a{color:var(--turf-2)}
h1,h2,h3{font-family:var(--display);font-weight:700;line-height:1.1;margin:.2em 0 .4em}
h1{font-size:2.3rem} h2{font-size:1.5rem} h3{font-size:1.2rem;font-weight:600}
.muted{color:var(--muted)} .small{font-size:.86rem} .lede{font-size:1.1rem;margin-top:-.2rem}
code{background:#eef0ec;padding:0 .3em;border-radius:3px}
:focus-visible{outline:3px solid #3d8bfd;outline-offset:2px}

/* header */
.bar{background:var(--turf);color:#fff;border-bottom:4px solid var(--club-red);display:flex;flex-wrap:wrap;align-items:center;gap:.4rem 1rem;
  padding:calc(.6rem + env(safe-area-inset-top,0)) 1rem .6rem;position:sticky;top:0;z-index:10}
.brand{color:#fff;text-decoration:none;font:700 1.6rem/1 var(--display);letter-spacing:.02em;display:flex;align-items:center;gap:.5rem}
.brand img{height:40px;width:auto}
.brand span{font-weight:500;color:var(--straw);margin-left:.35rem}
.bar nav{display:flex;flex-wrap:wrap;gap:.2rem;margin-left:auto}
.bar nav a{color:#e7efe9;text-decoration:none;padding:.35rem .6rem;border-radius:var(--r);font-weight:500}
.bar nav a[aria-current]{background:var(--turf-2);color:#fff}
.bell b{background:var(--ball);color:#fff;border-radius:9px;font-size:.75rem;padding:0 .4em;margin-left:.3em}
.subnav{display:flex;gap:.2rem;overflow-x:auto;padding:.4rem 1rem;background:#e8edf5;border-bottom:1px solid var(--line)}
.subnav a{white-space:nowrap;padding:.3rem .6rem;text-decoration:none;color:var(--ink);font-weight:500}

main{padding:1.2rem 1rem 3rem;margin:0 auto;max-width:1200px}
main.narrow{max-width:720px}
main.login{max-width:420px;padding-top:6vh}
.crest{display:block;width:min(240px,70%);height:auto;margin:0 auto 1rem}
main.login h1,main.login>p.muted{text-align:center}

/* forms */
label{display:block;font-weight:600;font-size:.92rem}
input,select,textarea{display:block;width:100%;margin-top:.25rem;font:inherit;padding:.6rem .7rem;
  border:1px solid #c8cfc8;border-radius:var(--r);background:var(--field);color:var(--ink);min-height:44px}
input[type=checkbox]{display:inline-block;width:auto;min-height:0;margin:0 .4rem 0 0;accent-color:var(--turf)}
label.check{font-weight:500;display:flex;align-items:center;margin:.3rem 0}
fieldset{border:1px solid var(--line);border-radius:var(--r)} legend{font-weight:600}
button,.button{font:600 1rem var(--body);border:1px solid var(--turf);background:#fff;color:var(--turf);
  padding:.6rem 1rem;border-radius:var(--r);cursor:pointer;min-height:44px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
button.primary,.button.primary{background:var(--turf);color:#fff}
button.ghost,.button.ghost{border-color:var(--line);color:var(--ink)}
button.danger{border-color:var(--ball);color:var(--ball);margin-top:1rem}
button.small{min-height:36px;padding:.3rem .7rem;font-size:.9rem}
button:disabled{opacity:.45;cursor:not-allowed}
.stack>*+*{margin-top:.8rem}
.grid2,.grid3{display:grid;gap:.8rem;grid-template-columns:1fr}
@media(min-width:620px){.grid2{grid-template-columns:1fr 1fr}.grid3{grid-template-columns:repeat(3,1fr)}.grid3>button{grid-column:1/-1;justify-self:start}}
.row{display:flex;gap:.6rem;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:.6rem 0;border-bottom:1px solid var(--line)}
.row.tight{border:0;padding:.2rem 0;justify-content:flex-start}.row.tight select{width:auto}
.row.link{text-decoration:none;color:inherit}
.panel{border:1px solid var(--line);border-radius:var(--r);padding:1rem;margin:1.2rem 0;background:#fff}
details>summary{cursor:pointer;font-weight:600}
.hidden{display:none!important}
.copy{font-size:.85rem}

.flash{padding:.6rem .8rem;border-radius:var(--r);border-left:4px solid var(--in);background:#eaf4ee}
.flash.warn{border-color:var(--ball);background:#f8e9ea}
.empty{padding:1.5rem;border:1px dashed #c8cfc8;border-radius:var(--r);color:var(--muted)}

/* tags / pills */
.tag{display:inline-block;font-size:.78rem;font-weight:600;padding:.05rem .45rem;border-radius:3px;background:#e3eaf5;color:var(--turf)}
.tag.training{background:#f3ecd9;color:#6d5717}
.pill{display:inline-block;font-size:.8rem;font-weight:600;padding:.1rem .5rem;border-radius:99px;background:#e7ece6}
.p-available{background:#dcefe3;color:#1e6b3e}.p-unavailable{background:#f5dcde;color:var(--ball)}
.p-maybe{background:#f7ead2;color:#80520b}.p-none,.p-no-response{background:#eceeec;color:var(--muted)}

/* player event cards */
.event{display:grid;grid-template-columns:3.6rem 1fr;gap:.9rem;padding:1rem 0;border-bottom:1px solid var(--line);
  border-left:5px solid #cfd5cf;padding-left:.8rem;scroll-margin-top:5rem}
.event.s-available{border-left-color:var(--in)}.event.s-unavailable{border-left-color:var(--ball)}.event.s-maybe{border-left-color:var(--amber)}
.event.cancelled{opacity:.6}
.when{text-align:center;font-family:var(--display);line-height:1}
.when .dow{display:block;font-size:.95rem;color:var(--muted)}.when .day{display:block;font-size:2.1rem;font-weight:700}
.when .mon{display:block;font-size:.95rem}
.event h3{margin:0}.meta{margin:.1rem 0 .6rem;color:var(--muted);font-size:.93rem}
.picked{font-weight:700;color:var(--turf);margin:.2rem 0 .5rem}
.choices{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem}
.choices button{background:#fff;border-color:#c8cfc8;color:var(--ink)}
.choices .c-available[aria-pressed=true]{background:var(--in);border-color:var(--in);color:#fff}
.choices .c-maybe[aria-pressed=true]{background:var(--amber);border-color:var(--amber);color:#fff}
.choices .c-unavailable[aria-pressed=true]{background:var(--ball);border-color:var(--ball);color:#fff}
.reason{margin-top:.5rem}

/* notifications */
.note{display:flex;justify-content:space-between;gap:1rem;padding:.7rem 0;border-bottom:1px solid var(--line);text-decoration:none;color:inherit}
.note.unread span{font-weight:600}.note time{color:var(--muted);font-size:.85rem;white-space:nowrap}

/* dashboard: the scoreboard is the one loud element */
.dash-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.6rem}
.filters{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}.filters select,.filters input{width:auto}
.board{overflow-x:auto;border-radius:var(--r);background:var(--turf);padding:.4rem;margin-top:.6rem}
.scoreboard{border-collapse:separate;border-spacing:3px;color:#fff;font-family:var(--display);min-width:100%}
.scoreboard th,.scoreboard td{padding:.35rem .5rem;text-align:center;vertical-align:middle}
.scoreboard thead th{font-weight:600;min-width:6.5rem;background:var(--turf-2);border-radius:3px;line-height:1.1}
.scoreboard thead th.training{background:#2d3f5c}
.scoreboard thead th.cancelled{text-decoration:line-through;opacity:.6}
.scoreboard thead .d{display:block;color:var(--straw);font-size:.95rem}
.scoreboard thead .t{display:block;font-size:1rem;font-weight:500;max-width:9rem;margin:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scoreboard .pick{display:inline-block;margin-top:.3rem;color:var(--turf);background:#fff;border-radius:3px;padding:.05rem .4rem;font-size:.85rem;text-decoration:none;font-family:var(--body);font-weight:600}
.scoreboard .name{position:sticky;left:0;background:var(--turf);text-align:left;white-space:nowrap;z-index:1;font-size:1.05rem}
.scoreboard .name a{color:#fff;text-decoration:none}
.scoreboard .junior{font-size:.7rem;background:var(--straw);color:var(--turf);border-radius:3px;padding:0 .3rem;margin-left:.35rem}
.tally td{background:#0b1f40;border-radius:3px}.tally strong{font-size:1.7rem;color:var(--straw);display:block;line-height:1}
.tally .split{font-family:var(--body);font-size:.72rem;color:#b8c7e0}
.cell{border-radius:3px;min-width:3rem}.cell .mark{font-weight:700;font-size:1.1rem}
.cell .why{display:block;font-family:var(--body);font-size:.7rem;max-width:7.5rem;margin:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.9}
.cell.s-available{background:var(--in)}.cell.s-unavailable{background:var(--ball)}
.cell.s-maybe{background:var(--amber)}.cell.s-none{background:#28406b;color:#a9b8d4}
.legend{font-size:.88rem;color:var(--muted);display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.legend .cell{display:inline-block;color:#fff;padding:.05rem .4rem;font-family:var(--display)}

/* selection */
.count{font-family:var(--display);font-size:1.4rem;position:sticky;top:3.6rem;background:var(--screen);padding:.3rem 0;z-index:2}
.count strong{font-size:2rem;color:var(--turf)}
.picklist{list-style:none;padding:0;margin:0}
.picklist li{display:flex;gap:.6rem;align-items:center;padding:.55rem .6rem;border-bottom:1px solid var(--line);border-left:5px solid #cfd5cf}
.picklist li.s-available{border-left-color:var(--in)}.picklist li.s-unavailable{border-left-color:var(--ball);opacity:.75}
.picklist li.s-maybe{border-left-color:var(--amber)}
.picklist .who{flex:1;display:flex;gap:.5rem;align-items:flex-start;font-weight:400}
.picklist .who input{margin-top:.3rem;width:1.2rem;height:1.2rem}
.picklist .who .small{display:block;color:var(--muted)}
.picklist select{width:auto;min-width:8rem}
.actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1rem;position:sticky;bottom:0;background:var(--screen);padding:.6rem 0}

/* tables */
.list{width:100%;border-collapse:collapse;font-size:.95rem}
.list th{text-align:left;font-family:var(--display);font-size:1.05rem;border-bottom:2px solid var(--club-red);padding:.4rem}
.list td{border-bottom:1px solid var(--line);padding:.5rem .4rem;vertical-align:top}
.list tr.inactive,.panel.inactive{opacity:.55}.warnrow td{background:#fbf0f1}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.6rem}
.facts dt{font-size:.85rem;color:var(--muted)}.facts dd{margin:0;font-weight:600}

/* calendar */
.month{width:100%;table-layout:fixed;border-collapse:collapse;margin-top:.6rem}
.month th{font-family:var(--display);text-align:left;padding:.3rem;color:var(--muted)}
.month td{border:1px solid var(--line);vertical-align:top;height:6.5rem;padding:.25rem;background:#fff}
.month td.pad{background:transparent;border-color:transparent}
.month td.today{box-shadow:inset 0 0 0 2px var(--club-red)}
.month .n{font-family:var(--display);font-weight:600}
.chip{display:block;font-size:.75rem;line-height:1.25;margin-top:.15rem;padding:.1rem .3rem;border-radius:3px;text-decoration:none;
  color:#fff;background:var(--turf-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chip.c-junior{background:var(--club-red)}.chip.training{background:#e9dfbf;color:#5b4a14}.chip.cancelled{text-decoration:line-through;opacity:.6}
.agenda{display:none}
@media(max-width:700px){.month{display:none}.agenda{display:block}h1{font-size:1.9rem}
  .bar nav{margin-left:0;width:100%;overflow-x:auto;flex-wrap:nowrap}.bar nav a{white-space:nowrap}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* ---- selection board ---- */
main.full{max-width:none;padding-left:1rem;padding-right:1rem}
.wk{font-size:1.1rem;font-weight:500;font-family:var(--body)}
.board-layout{display:grid;grid-template-columns:minmax(340px,auto) 1fr;gap:1.2rem;align-items:start;margin-top:.8rem}
.roster{position:sticky;top:5.2rem;max-height:calc(100vh - 6.5rem);display:flex;flex-direction:column;
  background:#fff;border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.roster-head{display:flex;gap:.5rem;align-items:center;padding:.6rem;border-bottom:1px solid var(--line)}
.roster-head input{margin:0;min-height:36px;padding:.35rem .5rem}
.roster-cols,.roster-list li{display:grid;grid-template-columns:1fr repeat(2,5.6rem);gap:.3rem;align-items:center}
.roster-cols[data-n="1"],.roster-list li[data-n="1"]{grid-template-columns:1fr 5.6rem}
.roster-cols[data-n="3"],.roster-list li[data-n="3"]{grid-template-columns:1fr repeat(3,5.6rem)}
.roster-cols[data-n="4"],.roster-list li[data-n="4"]{grid-template-columns:1fr repeat(4,5.6rem)}
.roster-cols{padding:.35rem .6rem;background:var(--turf);color:#fff;font:600 .85rem var(--display);letter-spacing:.02em}
.roster-list{list-style:none;margin:0;padding:0;overflow-y:auto}
.roster-list li{padding:.3rem .6rem;border-bottom:1px solid #eef1f5;font-size:.88rem}
.roster-list li.is-placed{background:#f3f7fd}
.rn{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.placed{display:block;font-style:normal;font-size:.72rem;color:var(--turf-2);font-weight:600}
.av{text-align:center;font-size:.75rem;font-weight:600;border-radius:3px;padding:.1rem 0}
.av-available{background:#dcefe3;color:#1e6b3e}.av-unavailable{background:#f5dcde;color:var(--ball)}
.av-na{background:#eceef2;color:var(--muted)}
.blocks{min-width:0}
.sel-card{background:#fff;border:1px solid var(--line);border-radius:var(--r);margin-bottom:1rem;overflow:hidden}
.sel-card.readonly{opacity:.7}
.sel-head{display:grid;grid-template-columns:9rem 1fr auto;gap:1rem;align-items:center;padding:.7rem;border-bottom:3px solid var(--club-red)}
.grade-badge{background:var(--turf);color:#fff;font:700 1.15rem/1.15 var(--display);padding:.7rem .6rem;border-radius:var(--r);text-align:center}
.sel-info{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.3rem .9rem;margin:0}
.sel-info dt{font-size:.75rem;color:var(--muted)}.sel-info dd{margin:0;font-weight:600;font-size:.92rem}
.sel-state{text-align:right;font-family:var(--display);font-size:1.1rem}
.sel-state strong{font-size:1.6rem;color:var(--turf);display:block}
.sel-table-wrap{overflow-x:auto}
.sel-table{width:100%;border-collapse:collapse;font-size:.9rem;min-width:900px;table-layout:fixed}
.sel-table th{text-align:left;font:600 .9rem var(--display);background:#eef2f8;padding:.35rem .4rem}
.sel-table td{border-top:1px solid #eef1f5;padding:.2rem .3rem}
.sel-table select,.sel-table input{margin:0;min-height:34px;padding:.25rem .4rem;font-size:.88rem}
.sel-table .no{width:2.5rem;text-align:center;font-weight:700;color:var(--turf)}
.sel-table .lr{width:11rem;color:var(--muted);font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:11rem}
.sel-table .wk{width:6.2rem}
.sel-table option:disabled{color:#b7bec9}
.board-actions{border-top:1px solid var(--line);align-items:center;z-index:3}
@media(max-width:1000px){.board-layout{grid-template-columns:1fr}.roster{position:static;max-height:320px}
  .sel-head{grid-template-columns:1fr}.sel-state{text-align:left}}
.choices.two{grid-template-columns:repeat(2,1fr)}
main h2{margin-top:1.4rem}
.scoreboard thead .f{display:block;font-size:.8rem;font-weight:500;color:var(--straw)}
.center{text-align:center}
main.login .stack button{width:100%}
.navform{margin:0}.navform button{background:transparent;border:1px solid #ffffff55;color:#fff;min-height:0;padding:.3rem .7rem}

.published{margin-bottom:2rem}
.pub-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1rem;margin-top:.6rem}
.pub-card{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:.8rem;border-top:4px solid var(--club-red)}
.pub-card header{display:flex;gap:.7rem;align-items:center;margin-bottom:.5rem}
.pub-card header .grade-badge{font-size:1rem;padding:.5rem;min-width:6.5rem}
.pub-card header span.muted{display:block}
.pub-list{margin:.2rem 0 .6rem;padding-left:1.6rem}
.pub-list li{padding:.15rem 0;border-bottom:1px solid #eef1f5}
.pub-list .pn{font-weight:600}.pub-list .tag{margin-left:.3rem}
.pub-list .pc{display:block;font-size:.82rem;color:var(--muted)}
.avail-head{margin-top:1rem;border-top:1px solid var(--line);padding-top:1rem}
.sel-table .c-lr{width:9rem}.sel-table .c-no{width:2.6rem}.sel-table .c-name{width:10.5rem}
.sel-table .c-wk{width:5.8rem}.sel-table .c-cm{width:auto}
.sel-table td.cm{vertical-align:top}
.sel-table textarea{display:block;width:100%;margin:0;min-height:34px;padding:.35rem .45rem;font:inherit;font-size:.88rem;
  line-height:1.3;resize:vertical;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;field-sizing:content}
.sel-table td{vertical-align:top}
.family{display:flex;gap:.4rem;flex-wrap:wrap;margin:.2rem 0 .8rem}
.family a{padding:.4rem .9rem;border:1px solid var(--line);border-radius:99px;text-decoration:none;color:var(--ink);background:#fff;font-weight:600}
.family a[aria-current]{background:var(--turf);color:#fff;border-color:var(--turf)}

/* ---- shared availability form ---- */
.public-head{display:flex;gap:.7rem;align-items:center;padding-bottom:.8rem;margin-bottom:1rem;border-bottom:4px solid var(--club-red)}
.public-head strong{display:block;font:700 1.25rem/1.1 var(--display);color:var(--turf)}
.public-head span{color:var(--muted);font-size:.9rem}
.name-search{font-size:1.1rem}
.name-list{list-style:none;padding:0;margin:.6rem 0;border:1px solid var(--line);border-radius:var(--r);background:#fff;max-height:60vh;overflow-y:auto}
.name-list li a{display:block;padding:.75rem .9rem;border-bottom:1px solid #eef1f5;text-decoration:none;color:var(--ink);font-weight:500}
.name-list li a:hover,.name-list li a:focus{background:#eef3fb}
.day-form fieldset{border:0;border-left:5px solid #cfd5cf;background:#fff;margin:0 0 .6rem;padding:.7rem .8rem;border-radius:0 var(--r) var(--r) 0}
.day-row.s-available{border-left-color:var(--in)}.day-row.s-unavailable{border-left-color:var(--ball)}
.day-row.needs{background:#fbf0f1}
.day-form legend{padding:0;display:contents}
.day-form .dd{display:block;font:700 1.25rem var(--display)}
.day-form .dm{display:block;color:var(--muted);font-size:.88rem;margin-bottom:.5rem}
.seg{display:grid;grid-template-columns:1fr 1fr;gap:.4rem}
.seg label{position:relative;display:block;margin:0}
.seg input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}
.seg span{display:flex;align-items:center;justify-content:center;min-height:46px;border:1px solid #c8cfc8;border-radius:var(--r);font-weight:600;background:#fff}
.seg input:focus-visible+span{outline:3px solid #3d8bfd;outline-offset:2px}
.seg-in input:checked+span{background:var(--in);border-color:var(--in);color:#fff}
.seg-out input:checked+span{background:var(--ball);border-color:var(--ball);color:#fff}
.day-form .why{margin-top:.5rem}
.day-row:not(.s-unavailable):not(.needs) .why{display:none}
.submit-bar{position:sticky;bottom:0;background:var(--screen);padding:.7rem 0 calc(.7rem + env(safe-area-inset-bottom,0))}
.submit-bar button{width:100%;min-height:52px;font-size:1.1rem}
.done-list{list-style:none;padding:0}.done-list li{display:flex;gap:.6rem;align-items:center;padding:.4rem 0;border-bottom:1px solid var(--line)}
.done-list li span:first-child{min-width:7rem;font-weight:600}.done-list em{color:var(--muted);font-size:.88rem}
.kind{display:inline-block;font:600 .72rem var(--body);background:#f3ecd9;color:#6d5717;border-radius:3px;padding:.05rem .4rem;vertical-align:middle;margin-left:.3rem}
.day-row.is-training{background:#fffdf6}
.done-list li span:first-child .kind{margin-left:.2rem}

.ov-filters{margin:.4rem 0 .2rem}
.ov-filters input[type=search]{width:12rem;margin:0}
.scoreboard .cell.s-na{background:transparent}
.scoreboard .name .sq{display:block;font:500 .72rem var(--body);color:var(--straw);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:14rem}
.scoreboard.ov thead th{min-width:5.6rem}
.linkish{background:none;border:0;color:var(--turf-2);text-decoration:underline;font-weight:500;min-height:0;padding:.3rem}
.how{margin:.4rem 0 .8rem;padding-left:1.4rem}.how li{margin:.25rem 0}
.howto{background:#eef3fb;border-left:4px solid var(--turf-2);padding:.6rem .8rem;border-radius:0 var(--r) var(--r) 0;font-size:.95rem}

.att-list{list-style:none;padding:0;margin:.6rem 0}
.att-list li{display:grid;grid-template-columns:1fr 13rem;gap:.4rem .8rem;align-items:center;padding:.6rem 0;border-bottom:1px solid var(--line)}
.att-who .small{display:block}
.att-note{grid-column:1/-1;margin:0;min-height:36px;padding:.3rem .5rem}
.att-seg span{min-height:40px}
.att-tools{display:flex;justify-content:flex-end}
@media(max-width:520px){.att-list li{grid-template-columns:1fr}}
.chip.c-meteors{background:#0b7a75}.chip.other{border-left:3px solid var(--club-red)}
