:root{
--bg:#0F1316; --panel:#141A1E; --ocean:#161D22; --land:#E7E9EA;
--coast:#7E878C; --bord:#B0B6B9; --grat:rgba(255,255,255,.07); --limb:#333D43;
--ink:#EFEDE7; --dim:#8C959C; --line:rgba(255,255,255,.09);
--signal:#E2452C; --gold:#EDAE34;
--chip:#111A20; --chipb:#5A666E;
--label:#0F1316; --halo:rgba(231,233,234,.92);
--hover:#1A2126;
}
:root[data-theme="light"]{
--bg:#F5F7F8; --panel:#FFFFFF; --ocean:#E4E8EA; --land:#FFFFFF;
--coast:#8B9297; --bord:#C5CACD; --grat:rgba(15,19,22,.08); --limb:#BFC5C9;
--ink:#0F1316; --dim:#697076; --line:rgba(15,19,22,.11);
--signal:#CE3A21; --gold:#9E7008;
--chip:#FFFFFF; --chipb:#98A0A5;
--label:#0F1316; --halo:rgba(255,255,255,.92);
--hover:#EDF0F1;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{
background:var(--bg);color:var(--ink);
font:400 14px/1.45 "Helvetica Neue",Helvetica,Arial,sans-serif;
-webkit-font-smoothing:antialiased;display:flex;flex-direction:column;overflow:hidden}
header{display:flex;align-items:center;gap:20px;padding:14px 20px;border-bottom:1px solid var(--line);flex:none}
.brand{display:flex;align-items:center;gap:9px}
.mark{display:block;flex:none;color:var(--ink)}
h1{font-size:15px;font-weight:500;margin:0;letter-spacing:.01em}
h1 button{font:inherit;letter-spacing:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
h1 button:hover{color:var(--signal)}
h1 button:focus-visible{outline:2px solid var(--signal);outline-offset:3px;border-radius:3px}
.sub{font-size:12px;color:var(--dim)}
.tools{margin-left:auto;display:flex;gap:6px;align-items:center}
button{font:inherit;color:var(--ink);background:none;border:0;cursor:pointer}
.filter,.ghost{font-size:12px;padding:5px 11px;border:1px solid var(--line);border-radius:100px;color:var(--dim);white-space:nowrap}
.filter[aria-pressed="true"]{color:var(--ink);border-color:var(--chipb)}
.filter:hover,.ghost:hover{color:var(--ink)}
.switch{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--dim);padding:4px 8px 4px 4px}
.switch:hover{color:var(--ink)}
.switch .track{width:32px;height:18px;border-radius:100px;background:var(--hover);border:1px solid var(--chipb);transition:background .18s,border-color .18s}
.switch .knob{display:block;width:12px;height:12px;margin:2px;border-radius:50%;background:var(--dim);transition:transform .18s,background .18s}
.switch[aria-checked="true"] .track{background:var(--ink);border-color:var(--ink)}
.switch[aria-checked="true"] .knob{transform:translateX(14px);background:var(--panel)}
.switch:focus-visible,.ghost:focus-visible,.filter:focus-visible,.row:focus-visible{outline:2px solid var(--signal);outline-offset:2px}
main{flex:1;display:flex;min-height:0}
.stage{flex:1;position:relative;min-width:0}
canvas{display:block;cursor:grab;touch-action:none}
#counter{position:absolute;left:20px;top:8px;margin:0;font-size:12px;color:var(--dim)}
#whereyouare{position:absolute;right:20px;top:8px;margin:0;font-size:11px;color:var(--dim);opacity:.8;text-align:right}
.version{position:absolute;left:20px;bottom:18px;margin:0;font-size:11px;line-height:1.5;color:var(--dim);opacity:.75}
.about-open{font:inherit;color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;padding:0}
.about-open:hover{color:var(--ink)}
.about-open:focus-visible{outline:2px solid var(--signal);outline-offset:2px;border-radius:2px}
.about{width:min(420px,calc(100vw - 40px));padding:22px 24px 20px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);font-size:13px;line-height:1.55}
.about::backdrop{background:rgba(0,0,0,.34)}
.about h2{margin:0 0 12px;font-size:15px;font-weight:500}
.about h3{margin:18px 0 7px;font-size:11px;font-weight:400;color:var(--dim);text-transform:uppercase;letter-spacing:.06em}
.about p{margin:0 0 9px}
.about dl{margin:0;display:grid;grid-template-columns:1fr;gap:8px}
.about dt{font-size:11px;color:var(--dim)}
.about dd{margin:2px 0 0}
.about .rule{border-left:2px solid var(--signal);padding-left:11px;margin-bottom:0}
.about-foot{margin:18px 0 14px;font-size:11px;color:var(--dim)}
.about-foot a{color:inherit}
.about-close{display:block;margin-left:auto}
.source{position:absolute;right:20px;bottom:18px;margin:0;font-size:11px;line-height:1.5;color:var(--dim);max-width:280px;text-align:right}
aside{width:344px;flex:none;border-left:1px solid var(--line);background:var(--panel);display:flex;flex-direction:column}
#rail{flex:1;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 0 32px}
.grip{display:none}
.day{font-size:11px;font-weight:400;color:var(--dim);margin:0;padding:18px 20px 8px;position:sticky;top:0;background:var(--panel)}
.row{display:flex;gap:12px;align-items:flex-start;width:100%;text-align:left;padding:11px 20px;border-bottom:1px solid var(--line);cursor:pointer}
.row:hover{background:var(--hover)}
.row.far{opacity:.42}
.time{font-size:12px;color:var(--dim);font-variant-numeric:tabular-nums;padding-top:1px;min-width:44px;flex:none;white-space:nowrap}
.fx{display:flex;flex-direction:column;gap:2px;min-width:0}
.clubs{font-size:13px;line-height:1.35}
/* The rail's swatch is the panel's, smaller and tighter. Same shape so the two
   read as one idea, sized so a two-club row does not grow a line. */
.clubs .swatch{width:8px;height:8px;border-radius:2px;margin-right:5px;vertical-align:0}
/* A club name filters the rail. Underlined only on hover, so a rail of fixtures
   does not read as a wall of links. */
.club{padding:0;text-align:left;border-radius:2px}
.club:hover,.club:focus-visible{text-decoration:underline;text-underline-offset:2px}
.row:focus-visible,.club:focus-visible{outline:2px solid var(--signal);outline-offset:1px}
.meta{font-size:11px;color:var(--dim)}
/* The flag sits with the league name and never carries meaning on its own, so
   it is hidden from assistive tech and the name is left to say it. */
.lflag{margin-right:4px;font-size:11px;line-height:1}
.dcomp .lflag{font-size:12px;margin-right:5px}
/* An empty rail explains itself rather than looking broken. */
.empty{font-size:13px;line-height:1.5;color:var(--dim);margin:0;padding:18px 16px}
.tag{margin-left:auto;font-size:10px;color:var(--gold);border:1px solid rgba(237,174,52,.4);border-radius:3px;padding:1px 5px;align-self:center;flex:none}
.flags{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}
.flag{font-size:10px;line-height:1.5;border-radius:3px;padding:0 5px;border:1px solid currentColor;opacity:.9}
.flag.warn{color:var(--dim)}
.flag.moved,.flag.off,.flag.live{color:var(--signal)}
/* A played match is finished business: dimmed, not signalled. Only the ones a
   reader can still act on carry the accent colour. */
.flag.played{color:var(--dim)}
.back{font-size:12px;color:var(--dim);padding:16px 20px 10px}
.back:hover{color:var(--ink)}
.detail{padding:0 20px}
.dtime{font-size:12px;color:var(--dim);margin:0 0 10px}
.dclubs{font-size:26px;font-weight:400;line-height:1.18;margin:0 0 8px;letter-spacing:-.01em}
/* A club's colours. The border matters: a club playing in white needs an edge or
   the swatch disappears into the panel. */
.swatch{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:10px;
  vertical-align:.1em;background:var(--chip);border:1px solid var(--chipb);box-sizing:border-box}
.dcomp{font-size:12px;color:var(--dim);margin:0 0 18px}
.dwhy{font-size:14px;line-height:1.6;margin:0 0 22px;padding-left:12px;border-left:2px solid var(--gold)}
.facts{margin:0;display:grid;grid-template-columns:88px 1fr;gap:7px 0;font-size:12px}
.facts dt{color:var(--dim)}
.facts dd{margin:0}
.facts .unres{color:var(--dim);font-style:italic}
.dnote{font-size:12px;line-height:1.5;margin:0 0 10px;padding:7px 10px;border-radius:4px;background:var(--hover)}
.dnote.moved,.dnote.off,.dnote.live{color:var(--signal);border-left:2px solid var(--signal)}
.dnote.played{color:var(--dim);border-left:2px solid var(--chipb)}
.dnote.warn{color:var(--dim);border-left:2px solid var(--chipb)}
.freshness{display:flex;align-items:center;gap:7px}
.fresh{font-size:12px;color:var(--dim);font-variant-numeric:tabular-nums}
/* Hardcoded, and the same in both themes. The dot is a state and not a
   decoration: a reader who learns that gold means "a few hours old" should not
   have to relearn it when they switch the theme. */
.dot{display:block;width:8px;height:8px;border-radius:50%;flex:none;background:var(--dim)}
.dot[data-age="fresh"]{background:#35A06A}
.dot[data-age="aging"]{background:#D6A21B}
.dot[data-age="stale"]{background:#D4523C}
.fresh.warn{color:var(--signal)}
@media (max-width:880px){
main{flex-direction:column}
/* 390px is the common phone width and the bar did not fit it: "Reset view"
   ran off the right edge. Less gap and less padding, and it does. */
header{gap:8px;padding:12px 12px}
.filter,.ghost{padding:5px 8px;font-size:11px}
/* The globe keeps the whole stage. The sheet sits over it rather than taking
   its height, so the map stays visible and draggable at every detent. */
.stage{height:100%;flex:1}
aside{position:fixed;left:0;right:0;bottom:0;width:auto;border-left:0;
  border-top:1px solid var(--line);border-radius:14px 14px 0 0;z-index:5;
  box-shadow:0 -2px 18px rgba(0,0,0,.10);transition:height .22s ease}
/* No transition while a finger is on it: the sheet must track the finger. */
aside.dragging{transition:none}
/* 44px is the Apple HIG minimum touch target. The bar inside it is 4px; the
   button around the bar is what a thumb actually hits. */
.grip{display:flex;align-items:center;justify-content:center;width:100%;height:44px;
  flex:none;padding:0;background:none;border:0;cursor:grab;touch-action:none}
.grip::before{content:"";display:block;width:40px;height:4px;border-radius:2px;
  background:var(--dim);opacity:.55}
.grip:active{cursor:grabbing}
.grip:focus-visible{outline:2px solid var(--signal);outline-offset:-4px;border-radius:14px 14px 0 0}
/* The corner the sheet now covers. Both lines move to the top instead. */
.version{top:28px;bottom:auto;left:20px}
.source{display:none}
.sub{display:none}
.fresh{display:none}
}
