/* BBTN — tonight's baseball. Scoreboard-clean, not a network wordmark. */
:root {
  --bg: #0b0f14;
  --bg-elev: #141a22;
  --bg-card: #161d27;
  --line: #2a3442;
  --text: #e8edf3;
  --muted: #8b97a8;
  --dim: #5c6b7e;
  --live: #c8f04d;
  --live-ink: #12180a;
  --final: #7eb6ff;
  --warn: #f0c36a;
  --bad: #e07a6a;
  --focus: #c8f04d;
  --radius: 10px;
  --max: 72rem;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", "Cascadia Mono", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--live); text-underline-offset: 2px; }
a:hover { color: #e6ff8a; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--live);
  color: var(--live-ink);
  padding: 0.4rem 0.7rem;
  z-index: 20;
  font-weight: 700;
}
.skip:focus { top: 0.75rem; }

.wrap { width: min(100% - 1.5rem, var(--max)); margin-inline: auto; }

header.site {
  border-bottom: 1px solid var(--line);
  background: #0d1218;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  line-height: 1.1;
}
.brand-mark {
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 1.15rem;
}
.brand-sub {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}
nav.links { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-left: auto; }
nav.links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
nav.links a[aria-current="page"],
nav.links a:hover { color: var(--text); }

main { flex: 1; padding: 1.4rem 0 2.5rem; }

h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}
.lede { color: var(--muted); margin: 0 0 1.1rem; max-width: 42rem; }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--dim);
  display: inline-block;
}
.status-dot.ok { background: var(--live); }
.status-dot.live { background: var(--live); box-shadow: 0 0 0 0 rgba(200,240,77,0.7); animation: pulse 1.6s infinite; }
.status-dot.warn { background: var(--warn); }
.status-dot.err { background: var(--bad); }
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(200,240,77,0); }
}

.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.chip[aria-pressed="true"],
.chip:hover { color: var(--text); border-color: #445266; }
.chip[aria-pressed="true"] { background: #1d2836; color: var(--live); }

.board {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 720px) {
  .board { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1080px) {
  .board { grid-template-columns: 1fr 1fr 1fr; }
}

.game {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.game.live { border-color: #3d4d22; box-shadow: inset 3px 0 0 var(--live); }
.game.final { border-color: #2a3d55; }
.game-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
}
.badge {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
.badge.live { background: var(--live); color: var(--live-ink); }
.badge.final { background: #1a2c44; color: var(--final); }
.badge.prev { background: #222a35; color: var(--muted); }
.badge.warn { background: #3a2e16; color: var(--warn); }

.sides { display: grid; gap: 0.4rem; }
.side {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  gap: 0.55rem;
  align-items: center;
}
.abbr {
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}
.team-name { font-weight: 650; }
.team-name a { color: inherit; text-decoration: none; }
.team-name a:hover { color: var(--live); }
.rec { color: var(--dim); font-size: 0.78rem; font-family: var(--mono); }
.score {
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 750;
  min-width: 1.6rem;
  text-align: right;
}
.score.win { color: var(--text); }
.score.lose { color: var(--dim); }
.pitchers {
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.5rem;
}
.venue { color: var(--dim); font-size: 0.78rem; }

.empty, .note, .disclaimer {
  color: var(--muted);
  font-size: 0.92rem;
}
.disclaimer { margin-top: 1.5rem; font-size: 0.8rem; max-width: 46rem; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.5rem;
}
.team-link {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.team-link:hover { border-color: #4a5a70; }
.team-link .abbr { color: var(--live); }
.team-link small { color: var(--muted); }

article.prose { max-width: 42rem; }
article.prose h2 { margin-top: 1.6rem; font-size: 1.15rem; }
article.prose p, article.prose li { color: #c5ced8; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 1rem 0 1.4rem;
  color: var(--dim);
  font-size: 0.78rem;
}
footer.site a { color: var(--muted); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}
