@font-face { font-family: "Archivo"; src: url(/fonts/archivo-var.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/ibm-plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ground: #0c0f10;
  --surface: #14191b;
  --raised: #1c2326;
  --line: #273034;
  --text: #f3f5f4;
  --muted: #a9b3b6;
  --accent: #ffd23f;
  --good: #57d796;
  --bad: #ff8a75;
  --ink: #0c0f10;
  --m: clamp(16px, 4vw, 64px);
  --r: 12px;
  --body: 18px;
  --lead: clamp(20px, 1.1rem + .5vw, 24px);
  --head: clamp(34px, 3.6vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-family: "Archivo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--ground); color: var(--text); font-size: var(--body); line-height: 1.5; overflow-x: hidden; }
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; padding: 0; }
ol { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h2 { font-size: var(--head); line-height: 1.04; font-weight: 700; letter-spacing: -.03em; }
.num, .board dd, .stats dd, .bar-v, .bar-n, .stepper output { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 500; font-variant-numeric: tabular-nums; }

.btn {
  display: inline-block; padding: 14px 22px; background: var(--accent); color: var(--ink); border-radius: 8px;
  text-decoration: none; font-size: var(--body); font-weight: 650; line-height: 1.2; transition: transform .16s var(--ease), background .16s;
}
.btn:hover { background: #ffe07a; transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 9px 16px; font-size: 16px; }
.btn.ink { display: block; margin-top: 24px; background: var(--ink); color: #fff; text-align: center; }
.btn.ink:hover { background: #2a3236; }
.text-link { font-weight: 600; text-underline-offset: 5px; text-decoration-color: var(--accent); }
.text-link:hover { color: var(--accent); }

/* Bar */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 32px; padding: 12px var(--m); background: var(--ground); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.bar nav { display: flex; gap: 26px; margin-right: auto; font-size: 16px; }
.bar nav a { color: var(--muted); text-decoration: none; transition: color .14s; }
.bar nav a:hover { color: var(--text); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; min-height: calc(100svh - 62px); padding: 24px var(--m) 56px; }
.hero h1 { font-size: clamp(44px, 5.8vw, 92px); line-height: 1; font-weight: 700; letter-spacing: -.035em; }
.hero-line { max-width: 46ch; margin: 24px 0 30px; font-size: var(--lead); line-height: 1.4; color: var(--muted); }
.hero-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.board { display: flex; gap: clamp(24px, 4vw, 56px); margin-top: 44px; }
.board[hidden] { display: none; }
.board dt { font-size: 16px; color: var(--muted); }
.board dd { font-size: 24px; }

.hero-slip { width: 100%; }
.hero-slip > img { border-radius: var(--r); }
.slip { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); animation: settle .6s var(--ease) both; }
.slip-head { display: grid; grid-template-columns: minmax(0, 1fr) 88px 88px; gap: 8px; font-size: 16px; color: var(--muted); }
.slip-head span:first-child { color: var(--text); font-weight: 650; }
.col-a, .col-b { text-align: right; }
.slip ol { margin: 14px 0; }
.slip li { display: grid; grid-template-columns: minmax(0, 1fr) 88px 88px; align-items: center; gap: 8px; padding: 12px 0 14px; border-top: 1px solid var(--line); }
.slip li > .num { text-align: right; color: var(--muted); }
.slip li > .alive { color: var(--accent); font-size: 20px; }
.drop { grid-column: 1 / -1; height: 6px; margin-top: 6px; background: var(--raised); border-radius: 3px; overflow: hidden; }
.drop i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 3px; animation: drain .9s var(--d) var(--ease) both; }
.who strong { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; }
.who small { display: block; font-size: 16px; color: var(--muted); line-height: 1.3; }
.slip dl { padding: 14px; background: var(--raised); border-radius: 8px; }
.slip dl div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 16px; }
.slip dt { color: var(--muted); }
.verdict { margin-top: 14px; padding-left: 12px; font-size: 16px; font-weight: 600; box-shadow: inset 3px 0 0 currentColor; }
.verdict.good { color: var(--good); }
.verdict.bad { color: var(--bad); }
.slip-foot { margin-top: 10px; font-size: 16px; color: var(--muted); }

/* Sections */
.sports, .how, .legs { padding: clamp(64px, 8vw, 120px) var(--m); }
.sec-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px clamp(32px, 5vw, 80px); align-items: end; margin-bottom: 40px; }
.sec-head p { font-size: var(--lead); line-height: 1.35; color: var(--muted); }

/* Sports */
.courts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.court { display: flex; flex-direction: column; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none; transition: border-color .18s, transform .18s var(--ease); }
.court svg { width: 100%; margin-bottom: 18px; color: #4b585d; transition: color .18s; }
.court svg * { fill: none; stroke: currentColor; stroke-width: 1.5; }
.court h3 { font-size: var(--lead); line-height: 1.2; font-weight: 650; letter-spacing: -.015em; }
.sub { margin-bottom: 14px; font-size: 16px; color: var(--muted); }
.tag { margin-top: auto; font-size: 16px; font-weight: 600; color: var(--muted); }
.tag.on { color: var(--accent); }
.court.live svg { color: var(--accent); }
.court:hover svg { color: #76858a; }
.court.live:hover svg { color: var(--accent); }
.court.live:hover { border-color: var(--accent); transform: translateY(-3px); }

/* How it works */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 20px; padding: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tile figcaption { max-width: 54ch; color: var(--muted); }
.tile strong { display: block; margin-bottom: 4px; font-size: var(--lead); line-height: 1.2; font-weight: 650; letter-spacing: -.015em; color: var(--text); }
.tile img { width: 100%; border-radius: 8px; }
.tile.wide { grid-column: span 8; }
.tile.tall { grid-column: 9 / span 4; grid-row: 1 / span 2; }
.tile.tall img { flex: 1 1 0; height: 0; min-height: 0; object-fit: cover; object-position: top; }
.tile.wide:nth-of-type(3) img { height: 230px; object-fit: cover; object-position: top left; }

/* Leg math */
.legs { background: var(--surface); }
.lab { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 72px); }
.lab-ctl { display: grid; gap: 28px; align-content: start; }
.ctl-label { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 16px; font-weight: 600; }
.ctl-label output { font-family: "IBM Plex Mono", monospace; font-weight: 500; }
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 4px; background: var(--raised); border-radius: 8px; }
.stepper output { font-size: 24px; }
.stepper button { width: 52px; height: 44px; background: var(--ground); border: 0; border-radius: 6px; font-size: 22px; line-height: 1; transition: background .14s; }
.stepper button:hover:not(:disabled) { background: var(--line); }
.stepper button:disabled { color: #6f7c80; cursor: not-allowed; }
input[type="range"] { width: 100%; height: 44px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.seg { display: flex; gap: 2px; padding: 4px; background: var(--raised); border-radius: 8px; }
.seg button { flex: 1; min-height: 40px; padding: 0 8px; background: none; border: 0; border-radius: 6px; font-size: 16px; font-weight: 600; white-space: nowrap; color: var(--muted); transition: background .14s, color .14s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--ink); }
.bars { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; height: 280px; }
.col { display: flex; flex-direction: column; min-width: 0; }
.track { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; }
.col i { display: block; height: var(--h); min-height: 2px; background: var(--line); border-radius: 4px 4px 0 0; transition: height .3s var(--ease), background .16s; }
.col.on i { background: var(--accent); }
.bar-v { padding-bottom: 6px; text-align: center; font-size: 16px; color: var(--muted); }
.col.on .bar-v { color: var(--accent); }
.bar-n { padding-top: 8px; text-align: center; font-size: 16px; color: var(--muted); }
.col.on .bar-n { color: var(--accent); }
.stats { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 16px; align-items: end; margin-top: 28px; }
.stats dt { font-size: 16px; color: var(--muted); }
.stats dd { font-size: 24px; }
.stats .lead dd { font-family: "Archivo", sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; font-size: clamp(44px, 5vw, 72px); line-height: 1.05; color: var(--accent); letter-spacing: -.03em; }
.note { margin-top: 18px; font-size: 16px; color: var(--muted); }

/* Close */
.close { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding: clamp(56px, 7vw, 100px) var(--m); background: var(--accent); color: var(--ink); }
.close-line h2 { font-size: clamp(52px, 7vw, 112px); line-height: .98; letter-spacing: -.04em; }
.close-line p { max-width: 42ch; margin-top: 16px; font-size: var(--lead); line-height: 1.35; }
.dialog { padding: 28px; background: #fff; border-radius: var(--r); }
.dialog h3 { font-size: var(--lead); line-height: 1.2; font-weight: 650; }
.dlabel { margin: 18px 0 8px; font-size: 16px; font-weight: 600; }
.dialog .seg { background: #eef0ec; }
.dialog .seg button { color: #3b4447; }
.dialog .seg button:hover { color: var(--ink); }
.dialog .seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* Footer */
.foot { padding: 48px var(--m) 40px; }
.foot-grid { display: grid; grid-template-columns: 4fr 2fr 6fr; gap: clamp(24px, 4vw, 64px); font-size: 16px; }
.foot-brand p { margin-top: 10px; color: var(--muted); }
.foot h2 { margin-bottom: 8px; font-size: 16px; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.foot nav a { display: block; padding: 3px 0; color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--text); }
.fine p { color: var(--muted); }
.fine p + p { margin-top: 8px; }

/* Motion */
.js .wait { transform: translateY(20px); }
.js .wait.in { transform: none; transition: transform .6s var(--ease); }
.court:nth-child(2).in, .tile:nth-child(2).in { transition-delay: .06s; }
.court:nth-child(3).in, .tile:nth-child(3).in { transition-delay: .12s; }
.court:nth-child(4).in { transition-delay: .18s; }
.js .court.live.in:hover { transform: translateY(-3px); transition: border-color .18s, transform .18s var(--ease); }
@keyframes drain { from { width: 100%; } to { width: var(--w); } }
@keyframes settle { from { transform: translateY(14px); } to { transform: none; } }

/* Tablet */
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 32px; }
  .hero-slip { max-width: 560px; }
  .sec-head { grid-template-columns: minmax(0, 1fr); }
  .courts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.wide, .tile.tall { grid-column: span 12; grid-row: auto; }
  .tile.tall img { flex: none; height: 300px; }
  .lab { grid-template-columns: minmax(0, 1fr); }
  .lab-ctl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .close { grid-template-columns: minmax(0, 1fr); }
  .dialog { max-width: 480px; }
}

/* Phone */
@media (max-width: 680px) {
  .bar { gap: 12px; justify-content: space-between; }
  .bar nav { display: none; }
  .hero h1 { font-size: clamp(38px, 10.6vw, 60px); }
  .hero-act .btn { display: block; width: 100%; text-align: center; }
  .board { justify-content: space-between; gap: 12px; }
  .courts { gap: 8px; }
  .court { padding: 14px; }
  .lab-ctl { grid-template-columns: minmax(0, 1fr); }
  .slip { padding: 18px; }
  .slip-head, .slip li { grid-template-columns: minmax(0, 1fr) 62px 62px; }
  .slip-head { font-size: 16px; line-height: 1.2; align-items: end; }
  .bars { height: 190px; gap: 4px; }
  .bar-v { visibility: hidden; }
  .col.on .bar-v { visibility: visible; white-space: nowrap; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats .lead { grid-column: 1 / -1; }
  .stats dd { font-size: 20px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .wait { transform: none; }
}

.foot-legal { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 8px; }
.foot .foot-legal a { display: inline; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
