:root {
  --navy: #0c2340;
  --navy2: #163a66;
  --turf: #166534;
  --gold: #e8a317;
  --red: #b91c1c;
  --bg: #f3f5f8;
  --card: #ffffff;
  --ink: #111827;
  --muted: #526071;
  --line: #dce2eb;
  --r: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--navy2); }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 14px; }
.skip, .sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip:focus { left: 10px; top: 10px; width: auto; height: auto; background: #fff; padding: 8px 12px; z-index: 20; border-radius: 6px; }

header.site {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
}
.hbar { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.18rem;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.brand .mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--gold);
  color: var(--navy);
  display: inline-grid;
  place-items: center;
  font-size: .95rem;
}
.tag { color: #c9d6e8; font-size: .82rem; display: none; }
@media (min-width: 960px) { .tag { display: block; } }

nav.main { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
nav.main::-webkit-scrollbar { display: none; }
nav.main a {
  color: #e2eaf4;
  text-decoration: none;
  padding: 8px 11px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .92rem;
  white-space: nowrap;
}
nav.main a:hover, nav.main a.on { background: var(--navy2); color: #fff; }
nav.main a.cta { background: var(--gold); color: var(--navy); }
nav.main a.cta:hover { filter: brightness(1.05); }
@media (max-width: 680px) {
  .hbar { flex-wrap: wrap; padding: 8px 0; }
  nav.main { margin-left: 0; width: 100%; flex-wrap: wrap; }
  nav.main a { padding: 6px 9px; font-size: .86rem; }
}

main { padding: 18px 0 36px; }
h1 { font-size: 1.55rem; line-height: 1.2; margin: .15em 0 .25em; color: var(--navy); }
h2 { font-size: 1.15rem; margin: 1.1em 0 .45em; color: var(--navy); }
.sub { color: var(--muted); margin: 0 0 14px; }
.small { font-size: .86rem; }
.muted { color: var(--muted); }
.pre { white-space: pre-wrap; }

.hero { margin-bottom: 16px; }
.search-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  box-shadow: 0 2px 8px rgba(12, 35, 64, .05);
}
.search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 780px) {
  .search-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.search-panel label { margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; display: block; }
.search-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}
.q-wrap { flex: 1 1 260px; }
.search-actions { display: flex; gap: 8px; }

select, input, textarea {
  font: inherit;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #c6d0de;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 40px;
}
textarea { min-height: 104px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 10px 0 4px; }

.btn {
  display: inline-block;
  background: var(--navy2);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 9px 15px;
  font-weight: 700;
  font-size: .94rem;
  text-decoration: none;
  cursor: pointer;
  min-height: 40px;
}
.btn:hover { filter: brightness(1.06); }
.btn.alt { background: #fff; color: var(--navy2); border: 1px solid var(--line); }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.danger { background: var(--red); }
.btn.sm { padding: 6px 10px; font-size: .84rem; min-height: 32px; }

.layout { display: grid; gap: 18px; }
@media (min-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr) 310px; align-items: start; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 15px;
}
.side .card { margin-bottom: 14px; }

.res-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.t-list { display: grid; gap: 12px; }
.t-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
}
.t-card.is-featured { border-color: var(--gold); box-shadow: 0 2px 10px rgba(232, 163, 23, .14); }
.t-card.is-example { border-style: dashed; background: #fbfcfe; }
.t-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.t-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.t-date { font-weight: 700; color: var(--navy); font-size: .92rem; }
.t-title { margin: 2px 0 4px; font-size: 1.15rem; }
.t-title a { text-decoration: none; color: var(--navy); }
.t-title a:hover { text-decoration: underline; }
.t-loc { font-size: .93rem; margin-bottom: 8px; }
.dist { color: var(--turf); font-weight: 700; }
.t-ages { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.age-pill {
  font-size: .76rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #edf2f7;
  color: var(--navy);
}
.age-pill.more { background: #e2e8f0; color: var(--muted); }
.t-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.t-foot { display: flex; flex-wrap: wrap; gap: 8px; }

.pill, .badge {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
}
.pill.baseball { background: #e0edff; color: #0b4a9f; }
.pill.softball { background: #fef0d9; color: #9a4d00; }
.pill.both { background: #dcfce7; color: #166534; }
.pill.featured { background: #fef3c7; color: #92400e; }
.pill.example { background: #ede9fe; color: #5b21b6; }
.pill.sanction { background: #f1f5f9; color: #334155; }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.bad { background: #fee2e2; color: #991b1b; }

.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
}
@media (min-width: 640px) { .facts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fact .fl { display: block; font-size: .74rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  background: #f8fafc;
}
.chip:hover { background: #e8eef6; }

.state-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.state-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.sc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.sc-name { font-weight: 700; text-decoration: none; }
.sc-name:hover { text-decoration: underline; }
.sc-links { font-size: .84rem; color: var(--muted); }

.grid2 { display: grid; gap: 0 12px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.age-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 6px;
  margin: 6px 0 12px;
}
.chk, .chk-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: .88rem;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}
.chk input, .chk-line input { width: auto; min-height: auto; margin: 0; }
.chk-line { margin: 12px 0; background: #fffbeb; border-color: #fde68a; }

.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.bc { font-size: .86rem; color: var(--muted); margin-bottom: 10px; }
.bc a { text-decoration: none; }
.bc a:hover { text-decoration: underline; }

.flash { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; background: #dcfce7; color: #14532d; }
.flash.err { background: #fee2e2; color: #7f1d1d; }
.empty { background: var(--card); border: 1px dashed #c4cedc; border-radius: var(--r); padding: 24px; text-align: center; color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.ad {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  background: repeating-linear-gradient(45deg, #eef2f6, #eef2f6 10px, #e6ebf2 10px, #e6ebf2 20px);
  border: 1px dashed #c0cad8;
  border-radius: 8px;
  color: #6b788a;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ad-728 { width: 100%; max-width: 728px; height: 84px; }
.ad-300 { width: 300px; max-width: 100%; height: 250px; }

.tbl { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: top; font-size: .9rem; }
th { font-size: .76rem; text-transform: uppercase; color: var(--muted); border-top: 0; background: #f8fafc; }
.sub-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.sub-item table td:first-child { width: 180px; color: var(--muted); font-weight: 600; }

footer.site { background: var(--navy); color: #cbd5e1; padding: 20px 0; font-size: .86rem; }
.fbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
footer.site a { color: #fff; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
