/* FirstInningRuns.com: rich blue theme. Logo: /logo.svg (white baseball, red stitches, blue 1). */
:root {
  --navy: #0A1A3F;
  --royal: #1D4ED8;
  --bright: #3B82F6;
  --sky: #BFD6FF;
  --ice: #EEF4FF;
  --stitch: #D62839;
  --gold: #F2B705;

  --bg: var(--ice);
  --card: #ffffff;
  --ink: #0F1B33;
  --muted: #5B6B8C;
  --line: #D6E2F7;
  --accent: var(--royal);
  --accent-soft: #DCE8FF;
  --head-bg: var(--navy);
  --head-ink: #ffffff;
  --warn: #9a5b00;
  --warn-soft: #FDF0D9;
  --yes: #C2261F;
  --no: #1D4ED8;
  --chip: #E8EEF9;
  --row-hover: #F4F8FF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071330;
    --card: #0E1F47;
    --ink: #E6EDFB;
    --muted: #9CB0D6;
    --line: #213564;
    --accent: #7FAEFF;
    --accent-soft: #1A3270;
    --head-bg: #050E25;
    --warn: #F0B45A;
    --warn-soft: #3A2C15;
    --yes: #FF8A80;
    --no: #7FAEFF;
    --chip: #1A2D5A;
    --row-hover: #12275A;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { color: var(--accent); text-decoration: underline; }
a.strong { font-weight: 650; }
.muted { color: var(--muted); }
.small-text { font-size: 12px; }

/* ---- header ---- */
header.site { background: var(--head-bg); color: var(--head-ink); border-bottom: 3px solid var(--royal); position: sticky; top: 0; z-index: 5; }
.site-in { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 20px; letter-spacing: -0.02em; font-weight: 800; }
.brand img { display: block; }
.brand b { color: #6EA2FF; font-weight: 900; }
.brand i { font-style: normal; font-weight: 500; color: #9CB0D6; font-size: 0.72em; }
.menu { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.menu a { color: #D7E3FF; text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.menu a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.menu a.on { background: var(--royal); color: #fff; }
@media (max-width: 720px) {
  header.site { position: static; }
  .menu { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .menu a { padding: 6px 10px; }
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
.sample { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 12px; font-size: 14px; margin-bottom: 12px; }

/* ---- page headings ---- */
.page-head { margin: 8px 0 14px; }
.page-head h1 { font-size: 28px; margin: 0 0 4px; text-align: left; letter-spacing: -0.02em; }
.lede { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 760px; }
.crumb { margin: 0 0 2px; font-size: 13px; }
h2 { letter-spacing: -0.01em; }

/* ---- today's games ---- */
.dates { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 4px; }
.dates a, .dates > span { font-size: 14px; white-space: nowrap; font-weight: 600; }
.dates h1 { font-size: 22px; margin: 0; text-align: center; letter-spacing: -0.01em; }
.today { font-size: 12px; background: var(--royal); color: #fff; border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.count { text-align: center; font-size: 13px; margin: 0 0 16px; }

.game { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(10, 26, 63, 0.05); }
.game header { padding: 12px 16px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--royal); }
.game h2 { font-size: 17.5px; margin: 0 0 4px; }
.at { color: var(--muted); font-weight: 400; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); align-items: center; }
.flag { background: var(--chip); color: var(--ink); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.flag.warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; }

.body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 760px) { .body { grid-template-columns: 1fr; } }
.halves { padding: 8px 16px 12px; }
.half { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.half-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 4px; }
.inning { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--royal); font-weight: 800; width: 56px; }
@media (prefers-color-scheme: dark) { .inning { color: var(--accent); } }
.hand { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 4px; background: var(--chip); vertical-align: 1px; }
.hand-L { background: #DCE8FF; color: #1D3F99; }
.hand-R { background: #FBE3E1; color: #9A231C; }
@media (prefers-color-scheme: dark) {
  .hand-L { background: #1D3570; color: #AFC8FF; }
  .hand-R { background: #4A2020; color: #FFB4AC; }
}
.tbd { color: var(--warn); }
.result { font-size: 12px; border-radius: 999px; padding: 1px 8px; white-space: nowrap; font-weight: 600; }
.half-head .result { margin-left: auto; }
.result.yes { color: var(--yes); border: 1px solid currentColor; }
.result.no { color: var(--no); border: 1px solid currentColor; }
.stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13.5px; padding: 1px 0 1px 64px; }
@media (max-width: 520px) { .stat { padding-left: 0; } .stat .lbl { flex-basis: 100%; } }
.lbl { color: var(--muted); min-width: 140px; }
.n { font-size: 11.5px; background: var(--chip); border-radius: 999px; padding: 0 7px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.n.small { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.wind { font-size: 13.5px; padding-top: 8px; }
.wind .lbl { min-width: 0; margin-right: 6px; }
.ump { font-size: 13.5px; padding-top: 8px; }
.ump > .lbl { min-width: 0; margin-right: 6px; }
.ump-head { margin-bottom: 2px; }
.ump .note { margin: 4px 0 0 64px; }
@media (max-width: 520px) { .ump .note { margin-left: 0; } }
.out { color: var(--yes); }
.in { color: var(--no); }

.odds-wrap { padding: 12px 16px; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--card) 85%, var(--accent-soft)); }
@media (max-width: 760px) { .odds-wrap { border-left: 0; border-top: 1px solid var(--line); } }
table.odds { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.odds th { text-align: right; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; padding: 0 0 4px; }
.odds th:first-child { text-align: left; }
.odds td { text-align: right; padding: 3px 0; border-top: 1px solid var(--line); }
.odds td:first-child { text-align: left; }
.odds td.best { font-weight: 800; color: var(--accent); }
.fair { font-size: 13px; margin: 8px 0 0; }
.full { font-size: 13px; margin: 10px 0 0; }

/* ---- filters (Explore, Pitchers) ---- */
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; align-items: end; }
.filters.slim { grid-template-columns: minmax(200px, 2fr) minmax(130px, 1fr) auto; }
@media (max-width: 520px) { .filters, .filters.slim { grid-template-columns: 1fr 1fr; } .filters .grow { grid-column: 1 / -1; } }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; min-width: 0; }
.fld em { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); opacity: 0.85; }
.fld select, .fld input { font: inherit; font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; width: 100%; min-width: 0; }
.fld select:focus, .fld input:focus { outline: 2px solid var(--bright); outline-offset: 1px; }
.fld-actions { display: flex; align-items: center; gap: 12px; font-size: 14px; }
button { font: inherit; font-weight: 700; font-size: 14px; background: var(--royal); color: #fff; border: 0; border-radius: 8px; padding: 8px 16px; cursor: pointer; }
button:hover { background: #1A43BD; }
.desc { margin: 4px 0 10px; font-weight: 600; }

.pills { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.pill { text-decoration: none; font-size: 13.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.pill.on { background: var(--royal); border-color: var(--royal); color: #fff; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--royal); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.tile .k { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.tile b { font-size: 28px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 12.5px; color: var(--muted); }
.note-box { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin: 0 0 14px; }

/* ---- data tables ---- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.grid th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; background: color-mix(in srgb, var(--card) 80%, var(--accent-soft)); }
.grid td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.grid tbody tr:first-child td { border-top: 0; }
.grid tbody tr:hover { background: var(--row-hover); }
.grid .num { text-align: right; }
.grid td.d { white-space: nowrap; }
.grid .sp { font-size: 12px; color: var(--muted); margin-top: 1px; }
.grid a.me { font-weight: 800; color: var(--accent); }
a.sort { color: inherit; text-decoration: none; }
a.sort:hover, a.sort.on { color: var(--accent); }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 12px 0; font-size: 14px; font-weight: 600; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }
.panel { margin-bottom: 16px; }
.cols .panel { margin-bottom: 0; }
.panel h2 { font-size: 16px; margin: 0 0 8px; }

/* ---- about ---- */
.prose { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 22px 16px; max-width: 820px; }
.prose h2 { font-size: 18px; margin: 18px 0 6px; color: var(--royal); }
@media (prefers-color-scheme: dark) { .prose h2 { color: var(--accent); } }
.prose li { margin: 4px 0; }

.empty { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; text-align: center; }
.empty h1, .empty h2 { margin-top: 0; font-size: 18px; }

/* ---- footer ---- */
.site-foot { background: var(--head-bg); color: #B7C6E6; font-size: 12.5px; margin-top: 32px; border-top: 3px solid var(--royal); }
.site-foot p { margin: 6px 0; }
.site-foot a { color: #9CC0FF; }
.site-foot b { color: #fff; }

/* Top-of-order strength: the fold-out list of hitters under the rank */
.top-order .hitters { flex-basis: 100%; font-size: 13px; margin: 2px 0 4px; }
.top-order summary { cursor: pointer; color: var(--accent); }
.top-order ul { list-style: none; margin: 4px 0 0; padding: 0; }
.top-order li { padding: 1px 0; }
.top-order .spot { display: inline-block; min-width: 30px; color: var(--muted); }
