/* Projectly, refined direction: shared tokens and components for both versions.
   Identity: cream sand ground, black ink, one electric blue for the model; the sportsbook is drawn in ink.
   Surfaces are a family, each with a job: sand (editorial), paper (research panels, lighter), sand-2 / sand-3 (quiet bands, strips),
   night (the market board: black with cream type), cobalt (the model's own verdicts). All text pairs are WCAG AA. */
:root {
  --sand: #e6dbc7; --paper: #efe7d8; --sand-2: #ddd0b9; --sand-3: #d2c3a6; --rest: #c4b597; --rest-edge: #6f6250;
  --ink: #16140f; --ink-2: #2f2b24; --muted: #57503f;
  --blue: #1f45c9; --blue-ink: #efe8da; --blue-soft: #b9c6f4;
  --night: #16140f; --night-ink: #e6dbc7; --night-muted: #a89f8b; --night-blue: #6f8dff; --night-rule: #2e2a22;
  --heat-good: #1f45c9; --heat-bad: #8a6d45;
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif; --text: 'Libre Franklin', 'Franklin Gothic Medium', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--sand); color: var(--ink); font-family: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; } a { color: inherit; } :focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.num, td { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; padding: 10px 16px; background: var(--ink); color: var(--sand); z-index: 50; } .skip:focus { top: 8px; }

/* ---------- navigation: sections, a sport switcher and a menu sheet per section ---------- */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 var(--gut, 40px); background: var(--sand); }
.bar.scrolled { box-shadow: 0 1px 0 var(--rest); }
.word { display: flex; align-items: center; gap: 10px; font: 800 34px/1 var(--display); text-decoration: none; white-space: nowrap; } .word svg { width: 28px; height: 28px; flex: none; }
.sections { display: flex; align-items: stretch; height: 100%; gap: 2px; }
.sections > button { display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--ink-2); border-bottom: 3px solid transparent; }
.sections > button[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); } .sections > button:hover, .sections > button[aria-expanded="true"] { color: var(--ink); background: var(--sand-2); }
.sections > button svg { width: 10px; height: 10px; opacity: .7; }
.sport { display: inline-flex; padding: 3px; background: var(--sand-2); margin-left: auto; }
.sport button { border: 0; background: none; padding: 6px 12px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.sport button small { font-size: 13px; font-weight: 500; margin-left: 5px; color: var(--muted); } .sport button[aria-pressed="true"] { background: var(--ink); color: var(--sand); } .sport button[aria-pressed="true"] small { color: var(--night-muted); }
.find { display: flex; align-items: center; gap: 8px; height: 38px; min-width: 230px; padding: 0 12px; background: var(--paper); border: 0; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.find svg { width: 15px; height: 15px; } .find kbd { margin-left: auto; font: 600 12px var(--text); color: var(--muted); }
.sheet { position: absolute; left: 0; right: 0; top: 64px; z-index: 29; background: var(--paper); padding: 26px var(--gut, 40px) 30px; display: grid; grid-template-columns: 220px repeat(4, minmax(0, 1fr)); gap: 0 36px; box-shadow: 0 1px 0 var(--rest), 0 24px 40px -28px rgba(22, 20, 15, .45); }
.sheet[hidden] { display: none; }
.sheet .lead h3 { margin: 0; font: 800 40px/1 var(--display); } .sheet .lead p { margin: 10px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.sheet h4 { margin: 4px 0 10px; font-size: 14px; font-weight: 700; color: var(--muted); }
.sheet a { display: block; padding: 6px 0; text-decoration: none; font-weight: 600; font-size: 15px; } .sheet a small { display: block; font-weight: 400; font-size: 13.5px; color: var(--muted); }
.sheet a:hover { color: var(--blue); }

/* ---------- the scoreboard strip, all sports ---------- */
.strip { display: flex; align-items: stretch; gap: 3px; padding: 0 var(--gut, 40px); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gut, 40px); }
.strip .lg { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; padding: 0 14px 0 0; font-size: 13px; color: var(--muted); }
.strip .lg b { font: 800 20px/1 var(--display); color: var(--ink); }
.cell { flex: 0 0 auto; scroll-snap-align: start; display: grid; grid-template-columns: auto auto; gap: 0 14px; align-items: baseline; min-height: 58px; padding: 8px 14px 7px; background: var(--sand-2); border: 0; cursor: pointer; text-align: left; }
.cell b, .cell span { font: 800 20px/1.1 var(--display); } .cell span { font-weight: 600; text-align: right; } .cell small { grid-column: 1 / -1; font-size: 13px; margin-top: 2px; color: var(--ink-2); }
.cell:hover { background: var(--sand-3); } .cell[aria-pressed="true"] { background: var(--ink); color: var(--sand); } .cell[aria-pressed="true"] small { color: var(--night-muted); }
.cell .flag { display: inline-block; width: 8px; height: 8px; background: var(--blue); margin-left: 6px; vertical-align: 2px; } .cell[aria-pressed="true"] .flag { background: var(--night-blue); }
.off { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; min-height: 58px; padding: 0 14px; background: none; font-size: 13px; color: var(--muted); white-space: nowrap; } .off b { font: 800 20px/1 var(--display); color: var(--ink-2); }

.night { background: var(--night); color: var(--night-ink); }
/* ---------- shared marks ---------- */
.gr { display: inline-block; min-width: 28px; padding: 2px 6px; text-align: center; font-size: 13px; font-weight: 700; background: var(--sand-2); color: var(--ink-2); }
.gr.on { background: var(--blue); color: var(--blue-ink); } .night .gr { background: var(--night-rule); color: var(--night-ink); } .night .gr.on { background: var(--night-blue); color: var(--night); }
.up { color: var(--blue); } .night .up { color: var(--night-blue); }
.key { display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; } .key.m { background: var(--blue); border-radius: 50%; } .key.b { background: var(--ink); } .key.o { border: 2px solid var(--blue); border-radius: 50%; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; background: var(--ink); color: var(--sand); font-weight: 600; text-decoration: none; border: 0; cursor: pointer; }
.btn.ghost { background: var(--sand-2); color: var(--ink); }
.tip { position: fixed; z-index: 60; pointer-events: none; max-width: 260px; padding: 8px 11px; background: var(--ink); color: var(--sand); font-size: 13.5px; line-height: 1.35; }
.tip b { display: block; font: 800 22px/1.05 var(--display); color: #fff; } .tip[hidden] { display: none; }

/* ---------- charts ---------- */
.sh { display: block; width: 100%; height: auto; overflow: visible; touch-action: none; }
.sh .lo { fill: var(--rest); stroke: var(--rest-edge); stroke-width: 1.2; } .sh .hi { fill: var(--blue); } .sh .base { stroke: var(--ink); stroke-width: 2; }
.sh .book { stroke: var(--ink); stroke-width: 3; } .sh .user { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 5; } .sh .med { fill: var(--ink); }
.sh .band50 { fill: var(--ink); } .sh .band90 { stroke: var(--ink); stroke-width: 2; } .sh .tick { font: 500 13px var(--text); fill: var(--muted); }
.sh .lab { font: 700 14px var(--text); fill: var(--ink); paint-order: stroke; stroke: var(--sand); stroke-width: 5px; stroke-linejoin: round; } .sh .lab2 { font: 500 13px var(--text); fill: var(--ink-2); } .sh .side { font: 800 15px var(--display); fill: var(--muted); letter-spacing: .02em; }
.sh .hit { fill: transparent; }
.night .sh .lo { fill: #3a352b; stroke: #5a5243; } .night .sh .hi { fill: var(--night-blue); } .night .sh .base, .night .sh .book { stroke: var(--night-ink); }
@media (prefers-reduced-motion: no-preference) { .rise .lo, .rise .hi { transform-box: fill-box; transform-origin: 50% 100%; animation: rise .65s cubic-bezier(.2, .8, .2, 1) both; } @keyframes rise { from { transform: scaleY(0); } } }
.pr { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(160px, 2.4fr) 64px 46px; gap: 4px 14px; align-items: center; padding: 7px 0; }
.pr .lb { font-weight: 600; } .pr .lb small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.pr svg { width: 100%; height: 26px; overflow: visible; } .pr .tr { stroke: var(--sand-3); stroke-width: 6; stroke-linecap: round; } .pr .fifty { stroke: var(--rest-edge); stroke-width: 1.5; }
.pr .gp { stroke: var(--blue); stroke-width: 6; opacity: .35; } .pr .ed { text-align: right; font-weight: 700; } .night .pr .tr { stroke: var(--night-rule); }
.spark { display: block; } .spark polyline { fill: none; stroke: var(--ink); stroke-width: 2; } .spark circle { fill: var(--blue); }
td.hc { padding: 1px !important; } td.hc > span { display: block; padding: 5px 8px; text-align: right; color: var(--ink); background: color-mix(in oklab, var(--heat-good) calc(var(--h, 0) * 42%), var(--paper)); }
td.hc.neg > span { background: color-mix(in oklab, var(--heat-bad) calc(var(--h, 0) * 55%), var(--paper)); }
@media (max-width: 720px) { .pr { grid-template-columns: minmax(0, 1fr) 54px 40px; } .pr svg { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- mobile tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 720px) {
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--ink); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 58px; padding: 8px 0 7px; border: 0; background: none; color: var(--night-muted); font-size: 13px; font-weight: 600; cursor: pointer; }
  .tabbar button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar button[aria-current="page"] { color: var(--sand); } .tabbar button[aria-current="page"] svg { stroke: var(--night-blue); }
  body { padding-bottom: 72px; }
}
