/* diamondmetrics: MLB predictions. Light theme only. Fonts are self-hosted (SIL Open Font License, see fonts/). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #F5F7FA;
  --ink: #0F172A;
  --body: #334155;
  --muted: #475569;
  --faint: #64748B;
  --line: #E2E8F0;
  --line-soft: #F1F5F9;
  --card: #FFFFFF;
  --soft: #F8FAFC;
  --accent: #1D4ED8;
  --dark: #0B1220;
  --dark-2: #111A2E;
  --strong-ink: #1E40AF;
  --strong-bg: #DBEAFE;
  --ok: #15803D;
  --display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
a { color: var(--accent); }
a:hover { color: #1E3A8A; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.top :focus-visible, .banner :focus-visible, footer :focus-visible { outline-color: #93C5FD; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: -9999px; top: 8px; background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* header */
.top { background: var(--dark); border-bottom: 1px solid #1E293B; }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 20px; color: #fff; text-decoration: none; letter-spacing: -0.01em; padding: 10px 0; }
.brand span { color: #93C5FD; }
.links { display: flex; flex-wrap: wrap; gap: 4px; font-size: 15px; }
.links a { color: #CBD5E1; text-decoration: none; padding: 12px; border-bottom: 2px solid transparent; }
.links a:hover { color: #fff; }
.links a[aria-current] { color: #fff; border-bottom-color: #93C5FD; }

/* countdown banner */
.banner { background: var(--dark-2); border-bottom: 1px solid #1E293B; color: #E2E8F0; }
.banner .wrap { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
.count-n { font-family: var(--display); font-size: 40px; font-weight: 700; color: #fff; line-height: 1; }
.count-t { font-size: 17px; }
.count-t b { font-weight: 600; color: #fff; }
.banner-note { margin: 0; font-size: 14px; line-height: 1.5; color: #94A3B8; max-width: 460px; }

/* page */
main { padding-top: 32px; padding-bottom: 72px; }
h1 { margin: 0; font-family: var(--display); font-size: 36px; font-weight: 700; letter-spacing: -0.015em; }
h2 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 600; }
h3 { margin: 22px 0 0; font-size: 15px; font-weight: 600; color: var(--body); }
.sub { margin: 8px 0 0; font-size: 16px; color: var(--muted); }
.msg { padding: 32px 0; font-size: 17px; color: var(--muted); }
.notice { margin: 16px 0 0; padding: 12px 16px; border: 1px solid #BFDBFE; background: #EFF6FF; border-radius: 10px; color: #1E3A8A; font-size: 15px; line-height: 1.5; max-width: 880px; }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.hint { font-size: 14px; color: var(--muted); }

/* probability chips: strong = highlighted, watch = normal, low = grey */
.p { font-weight: 500; padding: 2px 6px; border-radius: 6px; }
.p-strong { font-weight: 600; color: var(--strong-ink); background: var(--strong-bg); }
.p-watch { color: var(--ink); }
.p-low { color: var(--faint); }
.pc { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }

/* Beat the Streak */
#bts { margin-top: 28px; }
.bts { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.bts li { flex: 1 1 200px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bts .meta { font-size: 13px; color: var(--muted); }
.bts .name { margin-top: 4px; font-weight: 600; font-size: 16px; }
.bts .res { margin-top: 4px; font-size: 13.5px; font-weight: 600; }
.res.yes { color: var(--ok); }
.res.no { color: var(--faint); }
.bts .pv { font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--accent); }

/* two columns: slate list, then the selected game */
.cols { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.game-btn { font: inherit; text-align: left; width: 100%; cursor: pointer; padding: 14px 16px; border-radius: 10px; color: var(--ink); background: #fff; border: 1px solid var(--line); }
.game-btn[aria-pressed="true"] { background: #EFF6FF; border: 2px solid var(--accent); padding: 13px 15px; }
.game-btn .r1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 16px; }
.game-btn .st { font-weight: 500; font-size: 14px; color: var(--muted); }
.game-btn .r2 { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }

.how { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.how summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.how p { margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: var(--body); }
.how table { margin-top: 10px; width: 100%; border-collapse: collapse; font-size: 13.5px; }
.how th { text-align: left; padding: 6px 0; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.how td { padding: 5px 0; }
.how .r { text-align: right; }

.detail { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }

.gc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; }
.gc-title { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.gc-sub { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.score { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); }
.score.live { border-color: #BBF7D0; background: #F0FDF4; }
.score .sc { font-family: var(--display); font-size: 22px; font-weight: 700; }
.score .state { font-size: 14px; color: var(--muted); font-weight: 600; }
.score.live .state { color: #166534; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: #16A34A; margin-right: 6px; }
.note { margin: 14px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--body); }

.tiles { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 12px; }
.tile { flex: 1 1 150px; padding: 14px 16px; background: var(--soft); border-radius: 10px; }
.tile .lbl { font-size: 13.5px; color: var(--muted); }
.tile .val { margin-top: 6px; font-family: var(--display); font-size: 26px; }
.tile .val .p-watch, .tile .val .p-low { padding-left: 0; }
.tile .act { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--body); }

.over { margin-top: 16px; }
.over .lbl { font-size: 13.5px; color: var(--muted); }
.chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { flex: 1 1 72px; text-align: center; padding: 8px 4px; background: var(--soft); border-radius: 8px; }
.chip .l { font-size: 12.5px; color: var(--muted); }
.chip .v { margin-top: 4px; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 2px; }
.f5 { margin: 14px 0 0; font-size: 15px; color: var(--body); }
.f5 .p { padding: 2px 3px; }

.cond-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.cond-note { margin: 14px 0 0; font-size: 15px; color: var(--body); }
.wx { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.wx > div { flex: 1 1 120px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.wx .k { font-size: 13px; color: var(--muted); }
.wx .v { margin-top: 4px; font-weight: 600; font-size: 17px; }
.hrbox { margin-top: 16px; padding: 14px 16px; background: var(--soft); border-radius: 10px; }
.hrrow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 15px; }
.hrnum { font-family: var(--display); font-size: 20px; font-weight: 700; }
.track { margin-top: 10px; height: 10px; background: var(--line); border-radius: 999px; }
.fill { height: 10px; border-radius: 999px; background: var(--faint); }
.fill.hot { background: var(--accent); }

.pits { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 16px; }
.pit { flex: 1 1 300px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.pit .who { font-size: 13px; color: var(--muted); }
.pit .nm { margin-top: 2px; font-weight: 600; font-size: 17px; }
.pit .ks { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--body); }
.pit .ks b { font-weight: 700; font-size: 16px; }
.pit .chips { margin-top: 10px; gap: 8px; }
.pit .chip { flex: 1 1 52px; }
.pit .first { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 14px; line-height: 1.6; color: var(--body); }

.lus { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 20px; }
.lu { flex: 1 1 420px; min-width: 0; }
.lu h3 { margin: 0 0 8px; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.t { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14.5px; }
table.t.fin { min-width: 680px; }
.t thead tr { background: var(--soft); }
.t th { text-align: right; padding: 10px 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.t th.o { text-align: left; padding: 10px 12px; }
.t th.l { text-align: left; }
.t td { padding: 9px 8px; border-top: 1px solid var(--line-soft); text-align: right; white-space: nowrap; }
.t td.o { text-align: left; padding: 9px 12px; color: var(--muted); }
.t td.n { text-align: left; font-weight: 600; }
.t td.rs { text-align: left; padding: 9px 12px; color: var(--body); }

/* footer */
footer { background: var(--dark); color: #94A3B8; flex-shrink: 0; }
footer .wrap { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; line-height: 1.6; }

@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  main { padding-top: 24px; padding-bottom: 56px; }
  h1 { font-size: 30px; }
  .card { padding: 18px; }
  .gc-title { font-size: 22px; }
  .count-n { font-size: 34px; }
  .count-t { font-size: 16px; }
  .bts .pv { font-size: 22px; }
}
