/* DLH Squash League — brand tokens. Core six read from the reference site's computed styles; the rest extend it. */
:root {
  --ink: #474A4A; --ink-soft: rgba(71, 74, 74, .7); --teal: #23494B; --plum: #82285F;
  --cream: #FCFCF6; --stone: #EEEEE9; --sage: #C4C5B2; --line: rgba(71, 74, 74, .18);
  --clay: #A8553A; --moss: #55694B; --dusk: #3C5873; --ochre: #8A6A1E;
  --ball: #F2C230; --good: #2F6B4F; --warn: #A8553A; --white: #fff;
  --radius: 18px; --pill: 60px;
  --font: "Jost", "Neuzeit Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.5 var(--font); padding-bottom: 76px; }
h1, h2, h3 { font-weight: 400; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(32px, 7vw, 50px); } h2 { font-size: clamp(24px, 4.6vw, 34px); } h3 { font-size: 20px; }
p { margin: 0 0 1em; } a { color: var(--plum); }
.muted { color: var(--ink-soft); } .small { font-size: 14px; } .center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--cream); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 19px; white-space: nowrap; }
.brand img { display: block; flex: none; } .brand b { font-weight: 600; letter-spacing: .04em; }
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 22px; } .logos div { border-radius: 14px; padding: 26px; display: grid; place-items: center; border: 1px solid var(--line); min-height: 130px; }
#nav { display: flex; align-items: center; gap: 4px; }
#nav a.link { display: none; padding: 8px 12px; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
#nav a.link.on { border-color: var(--plum); }
.me-chip { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 15px; }

main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px; outline: none; }
.loading { padding: 60px 0; text-align: center; color: var(--ink-soft); }
.foot { max-width: 1040px; margin: 0 auto; padding: 24px 16px 32px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 2px 8px; font-size: 12px; color: var(--ink-soft); text-decoration: none; }
.tabs a.on { color: var(--plum); }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dot { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--plum); color: #fff; font-size: 11px; line-height: 17px; text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 26px; border-radius: var(--pill); border: 1px solid var(--plum); background: var(--plum); color: #fff; font: 500 16px var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--plum); }
.btn.teal { background: var(--teal); border-color: var(--teal); }
.btn.light { background: var(--cream); color: var(--teal); border-color: var(--cream); }
.btn.sm { min-height: 38px; padding: 6px 16px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .slot input:focus-visible + span { outline: 3px solid var(--dusk); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card.flat { background: var(--stone); border-color: transparent; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.notice { border-left: 4px solid var(--plum); background: var(--stone); padding: 12px 14px; border-radius: 0 12px 12px 0; margin-bottom: 16px; }
.notice.warn { border-color: var(--clay); }

.hero { background: var(--teal); color: var(--cream); border-radius: 26px; padding: 34px 24px; margin-bottom: 26px; position: relative; overflow: hidden; }
.hero h1 { color: var(--cream); max-width: 15ch; } .hero p { max-width: 46ch; color: rgba(252, 252, 246, .86); }
.hero::after { content: ""; position: absolute; right: -70px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%; border: 44px solid rgba(252, 252, 246, .07); }
.hero .btn.ghost { color: var(--cream); border-color: rgba(252, 252, 246, .6); }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.hero .eyebrow { color: rgba(252, 252, 246, .7); }

/* season visual */
.seasons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 12px; overflow-x: auto; padding: 8px 8px 14px; margin: 0 -8px; scroll-snap-type: x proximity; }
.season { scroll-snap-align: start; background: var(--c); color: #fff; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 216px; position: relative; }
.season.finished { opacity: .62; }
.season.current { box-shadow: 0 0 0 3px var(--cream), 0 0 0 6px var(--c); }
.season h3 { color: #fff; margin: 0; font-size: 24px; }
.season .dates { font-size: 15px; opacity: .92; }
.season .tag { align-self: flex-start; background: rgba(255, 255, 255, .2); border-radius: var(--pill); padding: 3px 12px; font-size: 13px; }
.season .tag.solid { background: #fff; color: var(--c); font-weight: 500; }
.pips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 2px; }
.pips i { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .28); }
.pips i.done { background: #fff; } .pips i.now { background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .45); }
.season .grow { flex: 1; } .season .small { opacity: .9; }
.season .btn { background: #fff; color: var(--c); border-color: #fff; }
.season .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: var(--pill); padding: 6px 14px; font-size: 14px; text-decoration: none; }
.chip.on { background: var(--c, var(--teal)); border-color: var(--c, var(--teal)); color: #fff; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { text-align: left; font-weight: 500; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.wide { min-width: 560px; }
tr.me td { background: rgba(130, 40, 95, .07); }
tr.out td { color: var(--ink-soft); text-decoration: line-through; }
.pos { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--stone); font-size: 14px; }
.pos.p1 { background: var(--plum); color: #fff; }
.who { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.pts { font-weight: 600; font-size: 18px; }
.badge { display: inline-block; border-radius: var(--pill); padding: 1px 10px; font-size: 12px; background: var(--stone); color: var(--ink); white-space: nowrap; }
.badge.plum { background: var(--plum); color: #fff; } .badge.warn { background: var(--clay); color: #fff; } .badge.good { background: var(--good); color: #fff; }

.av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--sage); flex: none; display: inline-grid; place-items: center; color: var(--teal); font-size: 14px; font-weight: 500; }
.av.lg { width: 132px; height: 132px; font-size: 40px; } .av.md { width: 64px; height: 64px; font-size: 22px; }

.fx { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fx:last-child { border-bottom: 0; }
.fx .names b { font-weight: 500; } .fx .win { color: var(--good); font-weight: 600; }

/* forms */
label.f { display: block; margin-bottom: 14px; font-size: 15px; }
label.f span { display: block; margin-bottom: 5px; color: var(--ink); }
label.f small { display: block; color: var(--ink-soft); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=date], input[type=number], textarea, select {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid rgba(71, 74, 74, .45); border-radius: 12px; background: #fff; color: var(--ink); font: 400 17px var(--font); }
textarea { min-height: 84px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--plum); flex: none; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--stone); } .steps i.on { background: var(--plum); }
.narrow { max-width: 560px; margin: 0 auto; }
.photo-pick { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.prefs { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 13px; }
.prefs th { border: 0; padding: 2px; text-align: center; letter-spacing: 0; text-transform: none; font-size: 12px; }
.prefs td { padding: 0; border: 0; } .prefs td.day { font-size: 14px; padding-right: 4px; white-space: nowrap; }
.slot { display: block; } .slot input { position: absolute; opacity: 0; }
.slot span { display: block; height: 36px; border-radius: 9px; background: var(--stone); border: 1px solid transparent; cursor: pointer; }
.slot input:checked + span { background: var(--teal); }
.prefs.ro .slot span { cursor: default; height: 24px; }

/* messages */
.thread { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--teal); color: var(--cream); border-color: var(--teal); }
.msg.sys { align-self: center; max-width: 94%; background: var(--stone); border: 0; font-size: 15px; text-align: center; }
.msg .meta { display: block; font-size: 12px; opacity: .7; margin-top: 4px; }
.invite { align-self: stretch; max-width: none; border: 2px solid var(--plum); background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 14px; }
.invite { white-space: normal; } .invite p { white-space: pre-wrap; margin: 0 0 10px; }
.invite .when { font-size: 21px; margin: 2px 0 6px; }
.composer { position: sticky; bottom: 78px; background: var(--cream); padding: 10px 0; display: grid; gap: 8px; }
.composer .line { display: flex; gap: 8px; } .composer textarea { min-height: 48px; height: 48px; }
.tl { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tl .body { flex: 1; min-width: 0; } .tl .body b { display: block; } .tl .last { display: block; color: var(--ink-soft); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

dialog { border: 0; border-radius: 22px; padding: 22px; width: min(480px, calc(100vw - 32px)); color: var(--ink); background: var(--cream); }
dialog::backdrop { background: rgba(35, 73, 75, .55); }
dialog video { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 1; object-fit: cover; transform: scaleX(-1); }
.opt { display: block; width: 100%; text-align: left; margin-bottom: 8px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font: 400 17px var(--font); color: var(--ink); cursor: pointer; }
.opt:hover { border-color: var(--plum); }
#toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--pill); font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sw { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; font-size: 14px; }
.sw i { display: block; height: 78px; } .sw div { padding: 8px 10px; }
pre.mail { white-space: pre-wrap; font: 14px/1.4 ui-monospace, Menlo, monospace; background: var(--stone); padding: 10px; border-radius: 10px; margin: 6px 0; overflow-wrap: anywhere; }

select { width: 100%; min-height: 48px; }
#demo { background: var(--ochre); color: #fff; text-align: center; font-size: 14px; padding: 6px 16px; }
.powered { display: inline-flex; align-items: center; gap: 12px; margin-top: 8px; padding: 8px 0; text-decoration: none; color: var(--ink-soft); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.powered .gmc { display: block; width: 104px; aspect-ratio: 2200 / 1227; background: #570A12; -webkit-mask: url(/gmc-lockup.png) center / contain no-repeat; mask: url(/gmc-lockup.png) center / contain no-repeat; }
.powered:hover .gmc { background: var(--plum); }
.score-btn { display: none; }
/* submit score */
.wl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big, .pick { display: block; position: relative; cursor: pointer; }
.big input, .pick input { position: absolute; opacity: 0; }
.big span { display: grid; place-items: center; min-height: 64px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font-size: 20px; }
.big input:checked + span { border-color: var(--teal); background: var(--teal); color: var(--cream); }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick span { display: grid; place-items: center; min-width: 64px; min-height: 48px; padding: 0 16px; border-radius: var(--pill); border: 1px solid rgba(71, 74, 74, .45); background: #fff; font-size: 18px; font-variant-numeric: tabular-nums; }
.pick input:checked + span { background: var(--plum); border-color: var(--plum); color: #fff; }
.big input:focus-visible + span, .pick input:focus-visible + span { outline: 3px solid var(--dusk); outline-offset: 2px; }
.sc { display: none; margin-top: 12px; } .sc details { margin-top: 10px; }
.scorecard:has(input[name=result][value=won]:checked) .sc-won, .scorecard:has(input[name=result][value=lost]:checked) .sc-lost { display: block; }
.scorecard:has(input[name=result][value=noshow]:checked) .sc-noshow { display: flex; }
.nsopt { margin-top: 12px; } .nsopt span { display: inline-grid; min-height: 40px; font-size: 15px; border-style: dashed; }
.scorecard .submit { margin-top: 16px; display: none; } .scorecard:has(input[name=result]:checked) .submit { display: inline-flex; }
.scorecard .notice { margin: 12px 0 0; }
/* schedule */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stats div { background: var(--stone); border-radius: 14px; padding: 12px; text-align: center; } .stats b { display: block; font-size: 28px; font-weight: 500; line-height: 1.1; } .stats span { font-size: 13px; color: var(--ink-soft); }
.wk.now { border-color: var(--plum); border-width: 2px; }
.days { display: grid; gap: 6px; margin-top: 12px; }
.dayc { display: grid; grid-template-columns: 64px 1fr; gap: 4px 8px; align-items: start; } .dayc.empty { display: none; }
.dayc .dn { font-size: 13px; color: var(--ink-soft); padding-top: 5px; grid-row: span 20; } .dayc.today .dn { color: var(--plum); font-weight: 600; }
.ev { grid-column: 2; background: var(--stone); border-left: 4px solid var(--teal); border-radius: 8px; padding: 5px 8px; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.ev.mine { border-left-color: var(--plum); background: rgba(130, 40, 95, .1); } .ev.done { opacity: .6; } .ev b { font-weight: 600; }
.wk .none { margin: 10px 0 0; }
.pp { border-bottom: 1px solid var(--line); } .pp:last-child { border: 0; }
.pp summary { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 0; cursor: pointer; list-style: none; } .pp summary::-webkit-details-marker { display: none; }
.bar { display: flex; height: 10px; border-radius: 5px; background: var(--stone); overflow: hidden; }
.b1 { background: var(--teal); } .b2 { background: var(--plum); }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--stone); vertical-align: -1px; margin-left: 6px; }
@media (min-width: 760px) {
  .days { grid-template-columns: repeat(7, 1fr); } .dayc, .dayc.empty { display: block; min-height: 78px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
  .dayc.off { background: repeating-linear-gradient(135deg, var(--stone) 0 6px, var(--cream) 6px 12px); } .dayc .dn { padding: 0 0 4px; } .ev { margin-bottom: 4px; } .wk .none { display: none; }
  .pp summary { grid-template-columns: 220px 1fr 250px; align-items: center; }
}
@media (max-width: 540px) {
  .tabs a { font-size: 11px; }
  td, th { padding: 9px 4px; } table .av { width: 30px; height: 30px; } table .who { gap: 7px; } .hide-sm { display: none; } .card { padding: 14px; }
}
@media (min-width: 1000px) {
  body { padding-bottom: 0; } .tabs { display: none; } #nav a.link { display: block; } .score-btn { display: inline-flex; margin-right: 8px; }
  .hero { padding: 56px 48px; } .composer { bottom: 0; } #toast { bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
