/* The Edge by Wegs Benedict. Brand palette: Edge Black #050509, Edge Red #C8102E, White #FFFFFF, Charcoal #161616.
   Red is the model and the active state. White is the market, the result and all text. Red is never used for small text.
   One type family, Archivo, set condensed for names and numbers and at normal width for reading. */
:root {
  --bg: #050509; --panel: #161616; --panel-2: #0d0d10; --hover: #1f1f21; --line: #27272b; --line-2: #3e3e44;
  --ink: #ffffff; --ink-2: #c6c6cb; --ink-3: #8f8f97; --red: #c8102e; --warn: #c8102e; --yolk: #ffffff; --yolk-ink: #ffffff;
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px; --r2: 9px; --hh: 56px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.skip { position: absolute; left: -999px; top: 0; background: var(--red); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
/* condensed cut: names, scores, headings */
h1, h2, .brand b, nav.sports a, .pcur b, .pstrip a b, .sum b, .day, .team, .sc, .tile .t, .kv b { font-family: var(--display); font-stretch: 70%; font-weight: 800; }

header.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.bar { display: flex; align-items: center; gap: 22px; min-height: 56px; }
.brand { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.mark { display: block; width: 34px; height: 17px; }
.mark line { stroke: var(--red); stroke-width: 4; }
.mark .o { fill: var(--bg); stroke: var(--ink); stroke-width: 3; }
.mark .d { fill: var(--red); }
.brand b { font-size: 25px; line-height: 1; letter-spacing: -.01em; }
.brand small { font-size: 12px; color: var(--ink-3); align-self: flex-end; padding-bottom: 1px; }
nav.sports { flex: 1 1 auto; min-width: 0; align-self: stretch; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
nav.sports::-webkit-scrollbar, .tabs::-webkit-scrollbar, .pstrip::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
nav.sports a { flex: 0 0 auto; display: grid; place-items: center; padding: 3px 12px 0; font-size: 20px; letter-spacing: .01em; text-decoration: none; color: var(--ink-3); border-bottom: 3px solid transparent; }
nav.sports a:hover { color: var(--ink-2); }
nav.sports a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
nav.sports a.off { opacity: .55; }
.fresh { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); margin-right: 7px; }
.dot.ok { background: var(--ink); } .dot.bad { background: var(--warn); }
.iconbtn { background: transparent; border: 1px solid var(--line-2); border-radius: 50%; width: 34px; height: 34px; font-size: 17px; line-height: 1; color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { border-color: var(--ink-3); color: var(--ink); }
.iconbtn.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

main.wrap { padding-top: 26px; padding-bottom: 80px; min-height: 60vh; }
main:focus { outline: none; }
h1 { font-size: clamp(36px, 6vw, 54px); line-height: .95; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h2 { font-size: 27px; line-height: 1.05; margin: 36px 0 12px; }
p { margin: 0 0 10px; max-width: 68ch; color: var(--ink-2); }
.muted { color: var(--ink-3); } .small { font-size: 12.5px; }
main a { overflow-wrap: anywhere; }
.mast { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 28px; }
.mast > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.mast p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.strip { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12.5px; color: var(--ink-3); padding-bottom: 3px; }
.strip b { color: var(--ink-2); font-weight: 500; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 16px 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: 0 0 auto; padding: 10px 0 9px; font-weight: 600; font-size: 14.5px; text-decoration: none; color: var(--ink-3); border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--ink-2); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
.banner { background: var(--panel); border-left: 3px solid var(--ink-3); color: var(--ink-2); border-radius: 0 var(--r2) var(--r2) 0; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; }
.banner.warn { border-left-color: var(--warn); }
.banner button { margin-left: 8px; background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 12px; cursor: pointer; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--panel); border-radius: 999px; padding: 3px; }
.seg button, .seg a { background: transparent; border: 0; border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.seg button[aria-pressed="true"], .seg a[aria-current="page"] { background: var(--ink); color: var(--bg); font-weight: 600; }
.seg button:disabled { opacity: .45; cursor: default; }
input.search, select.pick { flex: 1 1 170px; min-width: 0; background: var(--panel); border: 1px solid transparent; border-radius: 999px; color: var(--ink); padding: 9px 15px; font-size: 14px; }
input.search::placeholder { color: var(--ink-3); }
input.search:focus, select.pick:focus { border-color: var(--line-2); }
select.pick { flex: 0 1 230px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.chips button { flex: 0 0 auto; background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 13px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }

/* week / day navigator */
.pnav { position: sticky; top: var(--hh); z-index: 15; background: var(--bg); margin: 0 -16px 14px; padding: 8px 16px 10px; border-bottom: 1px solid var(--line); }
.prow { display: flex; align-items: center; gap: 8px; }
.pbtn { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--ink); text-decoration: none; font-size: 22px; line-height: 1; padding-bottom: 3px; }
.pbtn[aria-disabled="true"] { opacity: .3; pointer-events: none; }
.pcur { flex: 1 1 auto; min-width: 0; padding-left: 4px; }
.pcur b { display: block; font-size: 27px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcur span { font-size: 12.5px; color: var(--ink-3); }
.pjump { flex: 0 0 auto; border: 1px solid var(--red); color: var(--ink); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pjump[aria-disabled="true"] { border-color: var(--line); color: var(--ink-3); pointer-events: none; }
label.pdate { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--ink-2); font-size: 16px; cursor: pointer; }
label.pdate input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
label.pdate:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.pstrip { position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-top: 8px; scroll-behavior: auto; }
.pstrip a { flex: 0 0 auto; min-width: 46px; text-align: center; text-decoration: none; color: var(--ink-2); border-radius: var(--r2); padding: 5px 9px 4px; font-size: 12px; line-height: 1.2; }
.pstrip a:hover { background: var(--panel); }
.pstrip a b { display: block; font-size: 18px; color: inherit; }
.pstrip a.past { color: var(--ink-3); }
.pstrip a.now b::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-left: 4px; vertical-align: middle; }
.pstrip a[aria-current="true"] { background: var(--ink); color: var(--bg); }

/* ruled bands: one panel, hairlines between cells */
.sum, .kv, .kpis, .tiles { display: grid; background: var(--panel); border-radius: var(--r); overflow: hidden; }
.sum > *, .kv > *, .kpis > *, .tiles > * { box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.sum { grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); margin-bottom: 16px; }
.sum div { padding: 12px 15px; }
.sum span { display: block; font-size: 12px; color: var(--ink-3); }
.sum b { display: block; font-size: 29px; line-height: 1.05; margin: 1px 0; font-variant-numeric: tabular-nums; }
.sum i { font-style: normal; font-size: 12px; color: var(--ink-2); }

.day { display: flex; align-items: baseline; gap: 12px; font-size: 20px; line-height: 1.1; color: var(--ink); margin: 26px 0 10px; }
.day::after { content: ""; flex: 1 1 20px; align-self: center; height: 1px; background: var(--line); }
.day span { font-stretch: 100%; font-weight: 400; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.game { background: var(--panel); border-radius: var(--r); overflow: hidden; scroll-margin-top: calc(var(--hh) + 120px); }
.game > button { all: unset; display: block; width: 100%; cursor: pointer; padding: 14px 16px 6px; box-sizing: border-box; }
.game > button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: var(--r); }
.gtop { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 9px; }
.live { color: var(--ink); font-weight: 600; }
.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-right: 6px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.teams { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; align-items: baseline; }
.team { font-size: 25px; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team small { font-stretch: 100%; font-weight: 400; font-size: 12.5px; color: var(--ink-3); margin-left: 7px; }
.team .rk, .tbl .rk { display: inline-block; font-stretch: 100%; font-weight: 700; font-size: 10.5px; line-height: 1.35; color: #fff; background: var(--red); border-radius: 4px; padding: 0 4px; margin-right: 6px; vertical-align: 4px; }
.tbl .rk { vertical-align: 1px; margin-right: 2px; }
.team.lost, .sc.lost { color: var(--ink-3); }
.wp { font-size: 14px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sc { font-size: 27px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.gap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 9px 16px 13px; font-size: 12.5px; color: var(--ink-3); }
.lean { display: inline-block; background: var(--red); color: #fff; font-weight: 700; border-radius: 999px; padding: 1px 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lean.none { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 400; }
.tag { display: inline-block; box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.tag.hit { background: var(--ink); box-shadow: none; color: var(--bg); font-weight: 700; }
.tag.miss { color: var(--ink-3); }
.grade { box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.detail { background: var(--panel-2); padding: 12px 16px 14px; font-size: 13px; }
.detail .x { overflow-x: auto; }
.detail table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.detail th { text-align: right; font-weight: 500; font-size: 11.5px; color: var(--ink-3); padding: 3px 0 4px 10px; }
.detail th:first-child, .detail td:first-child { text-align: left; padding-left: 0; }
.detail td { text-align: right; padding: 5px 0 5px 10px; border-top: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.detail td.pos { color: var(--ink); font-weight: 700; }
.parts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 9px; color: var(--ink-3); font-size: 12.5px; }
.parts b { color: var(--ink-2); font-weight: 500; }
.links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; align-items: center; }
.links button { background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 12px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.pl { background: var(--panel); border-radius: var(--r); padding: 13px 16px 14px; }
.pl .nm { font-weight: 600; font-size: 15.5px; } .pl .nm small { font-weight: 400; color: var(--ink-3); margin-left: 7px; font-size: 12.5px; }

/* the board: on wide screens each game is one ruled row */
@media (min-width: 1240px) {
  .grid:has(> .game) { display: block; background: var(--panel); border-radius: var(--r); overflow: hidden; }
  .game { display: grid; grid-template-columns: minmax(0, 1fr) 176px; align-items: center; background: none; border-radius: 0; box-shadow: 0 1px 0 var(--line); }
  .game:hover { background: var(--hover); }
  .game > button { display: grid; grid-template-columns: 88px 232px minmax(0, 1fr); align-items: center; gap: 0 22px; padding: 13px 0 13px 18px; }
  .game > button:focus-visible { border-radius: 0; }
  .gtop { flex-direction: column; justify-content: center; gap: 5px; margin: 0; }
  .gtop span:last-child { align-self: flex-start; }
  .game .vz { border: 0; margin: 0; padding: 0; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.15fr) minmax(0, .8fr); gap: 0 26px; }
  .game .vz:not(:has(> div:nth-child(3))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game .vl { flex-wrap: nowrap; overflow: hidden; }
  .game .vk { flex-basis: auto; }
  .gap { flex-direction: column; align-items: flex-end; justify-content: center; gap: 5px; padding: 10px 18px 10px 8px; text-align: right; }
  .gap > span:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
  .detail { grid-column: 1 / -1; padding: 14px 18px 16px; }
}

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: right; font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 10px 7px 9px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl th button { all: unset; cursor: pointer; }
.tbl th button[aria-pressed="true"] { color: var(--ink); font-weight: 700; box-shadow: 0 3px 0 var(--red); }
.tbl th button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tbl td { text-align: right; padding: 9px 7px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--ink-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child, .tbl:has(td.name:nth-child(2)) th:nth-child(2) { text-align: left; }
.tbl th:first-child, .tbl td:first-child { padding-left: 16px; }
.tbl td:last-child, .tbl th:last-child { padding-right: 16px; }
.tbl td.name { color: var(--ink); font-weight: 600; white-space: normal; min-width: 130px; text-align: left; }
.tbl td.name small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12px; }
.tbl td.name a, .tbl td a.row { color: inherit; text-decoration: none; }
.tbl td.name a:hover, .tbl td a.row:hover { text-decoration: underline; text-decoration-color: var(--red); }
.tbl td.pos { color: var(--ink); font-weight: 700; }
.tbl tr.div td { background: var(--panel-2); color: var(--ink-3); font-size: 12px; padding: 5px 16px; text-align: left; }
.scroll { overflow-x: auto; background: var(--panel); border-radius: var(--r); }
.tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.tile { display: block; text-decoration: none; color: inherit; padding: 16px 16px 15px; }
.tile:hover { background: var(--hover); }
.tile .t { font-size: 34px; line-height: 1; }
.tile .s { font-size: 12.5px; color: var(--ink-3); margin: 3px 0 12px; }
.tile .n { font-size: 13.5px; color: var(--ink-2); }
.kv { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); margin: 10px 0 6px; }
.kv div { padding: 14px 16px; }
.kv b { display: block; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; margin-bottom: 3px; }
.kv span { font-size: 12.5px; color: var(--ink-3); }
.empty { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 28px 18px; text-align: center; color: var(--ink-3); }
.skel { height: 150px; border-radius: var(--r); margin-bottom: 12px; background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.back { display: inline-block; font-size: 13px; text-decoration: none; margin-bottom: 6px; }
footer { border-top: 1px solid var(--line); padding: 22px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--ink-3); font-size: 12.5px; }
footer p { color: var(--ink-3); max-width: 80ch; }
.more { display: block; width: 100%; margin-top: 14px; background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 11px; cursor: pointer; color: var(--ink-2); }
.more:hover { border-color: var(--ink-3); color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); border-radius: 999px; padding: 9px 16px; font-size: 13.5px; font-weight: 600; z-index: 40; }

/* home: the headline and a worked example from today's board */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 26px 48px; align-items: end; padding: 14px 0 6px; }
.hero h1 { font-size: clamp(66px, 17vw, 136px); line-height: .86; letter-spacing: -.025em; margin: 0 0 20px; }
.hero .lede { font-size: 17px; line-height: 1.5; max-width: 46ch; margin: 0; }
.hero .motto { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }
.worked { background: var(--panel); border-radius: var(--r); padding: 18px 20px 16px; min-width: 0; }
.worked h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.worked h3 span { color: var(--ink-3); font-weight: 400; white-space: nowrap; }
.worked dl { display: grid; gap: 8px; margin: 0 0 16px; }
.worked dl div { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.worked dt { display: flex; align-items: center; gap: 9px; color: var(--ink-2); }
.worked dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.worked dd.later { font-weight: 400; color: var(--ink-3); }
.worked p { font-size: 13.5px; margin: 14px 0 10px; }
.worked p b { color: var(--ink); }
.worked > a { font-size: 13.5px; font-weight: 600; }
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .wrap { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .pnav { margin: 0 -14px 14px; padding: 8px 14px 10px; }
  .bar { gap: 6px; }
  .brand { gap: 6px; } .brand small { display: none; } .brand b { font-size: 21px; } .mark { width: 26px; height: 13px; }
  nav.sports { margin-left: 2px; } nav.sports a { padding: 3px 6px 0; font-size: 17.5px; }
  #fresh { display: none; } .iconbtn { width: 32px; height: 32px; }
  .strip { font-size: 12px; gap: 2px 14px; }
  .detail { padding: 12px 14px 14px; font-size: 12.5px; } .detail th, .detail td { padding-left: 6px; } .detail td .muted { font-size: 11px; }
  .tabs { gap: 15px; } .tabs a { font-size: 14px; font-stretch: 88%; }
  h2 { font-size: 24px; margin-top: 30px; }
}
@media (max-width: 420px) { .team { font-size: 23px; } .pcur b { font-size: 23px; } }
@media (max-width: 392px) { .brand b { font-size: 19px; } nav.sports a { padding: 3px 4px 0; font-size: 16.5px; } .tabs { gap: 11px; } .tabs a { font-size: 13.5px; font-stretch: 80%; } }
@media (hover: none) { .keys { display: none; } }
@media (prefers-reduced-motion: reduce) { .skel, .live::before, .iconbtn.spin { animation: none; } }
