:root {
  --bg: #0a1424;
  --surface: #0f1d33;
  --surface-2: #16273f;
  --border: #243b57;
  --text: #eaf0f7;
  --text-dim: #93a3b8;
  --accent: #e0b950;
  --accent-2: #4f9cf9;
  --on-accent: #0a1424;
  --good: #3fb950;
  --warn: #e0a73a;
  --bad: #f0795b;
  --radius: 12px;
  --maxw: 960px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.25rem 1.5rem;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.updated {
  margin: 0.75rem 0 0;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* ---- Landing page widgets ---- */
.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.widget {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.widget:hover { border-color: var(--accent); transform: translateY(-2px); }

.widget__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.widget__title { margin: 0; font-size: 1.4rem; letter-spacing: -0.01em; }
.widget__go { color: var(--accent); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.widget__desc { color: var(--text-dim); margin: 0.6rem 0 0; }
.widget__stat {
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text);
}

.section-heading {
  font-size: 1.25rem;
  margin: 2.5rem 0 0.5rem;
  letter-spacing: -0.01em;
}

.section-note {
  margin: 0 0 1.25rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 60ch;
}

/* ---- Cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.card__name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
}

.rank {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

.rank--best { color: var(--good); border-color: var(--good); }

.jackpot {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.jackpot__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.15rem;
}

.ev-box {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.ev-box__value {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ev-box__label {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.ev-split {
  margin: -0.35rem 0 0;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.ev-split b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
}

.meta li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.meta .k { color: var(--text-dim); }
.meta .v { font-variant-numeric: tabular-nums; }

.numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.ball {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  background: #fff;
  color: #0d1117;
  font-variant-numeric: tabular-nums;
}

.ball--special {
  background: var(--accent);
  color: var(--on-accent);
}

/* ---- "More details" link on cards ---- */
.card__link {
  margin-top: 0.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.card__link:hover { text-decoration: underline; }

/* ---- Detail page ---- */
.detail-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.25rem 1rem;
}

.back-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
}

.back-link:hover { color: var(--text); }

.detail-header h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.detail {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.stat { background: var(--surface); padding: 1rem 1.1rem; }

.stat__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.stat__value {
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  margin-top: 0.2rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.numbers--lg .ball { width: 36px; height: 36px; font-size: 0.92rem; }

.mini-chart { position: relative; width: 100%; }
.mini-chart--doughnut { height: 260px; }
.mini-chart--bar-lg { height: 320px; }

.tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.tier-table th,
.tier-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}

.tier-table th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tier-table td.num,
.tier-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tier-table tr:last-child td { border-bottom: none; }
.tier-table tr.is-jackpot td { font-weight: 650; }

.table-note {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.05rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { filter: brightness(1.08); }
.prose .btn { color: var(--on-accent); } /* beat .prose a (gold) inside prose pages */

.viz-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.viz-cta h2 { margin-bottom: 0.35rem; }
.viz-cta p { margin: 0; color: var(--text-dim); font-size: 0.9rem; max-width: 52ch; }

/* ---- "View historical data" CTA (anchor styled as a panel) ---- */
.hist-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.hist-cta:hover { border-color: var(--accent); }
.hist-cta h2 { margin: 0 0 0.35rem; }
.hist-cta p { margin: 0; color: var(--text-dim); font-size: 0.9rem; max-width: 56ch; }

/* ---- Historical data page ---- */
.hist-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.range-fields { display: flex; gap: 1rem; flex-wrap: wrap; }

.range-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.range-fields input[type="date"] {
  padding: 0.45rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  color-scheme: dark;
}

.range-presets { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover { color: var(--text); }
.chip--on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.hist-chart { position: relative; width: 100%; height: 360px; }

.hist-table-wrap { overflow-x: auto; }

/* Results-only table (state games with no jackpot/cash/winners columns) */
.hist-table--simple th:nth-child(n + 3),
.hist-table--simple td:nth-child(n + 3) { display: none; }

/* No jackpot/cash, but keep the winners column (NY Take 5 / Pick 10). */
.hist-table--no-jackpot th:nth-child(3),
.hist-table--no-jackpot td:nth-child(3),
.hist-table--no-jackpot th:nth-child(4),
.hist-table--no-jackpot td:nth-child(4) { display: none; }

.hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.hist-table th,
.hist-table td {
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.hist-table th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hist-table td.num,
.hist-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

.numbers--row { gap: 0.25rem; flex-wrap: nowrap; }
.ball--sm { width: 24px; height: 24px; font-size: 0.72rem; }

.muted { color: var(--text-dim); }

.winners-toggle {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  padding: 0;
}

.rows-sentinel {
  padding: 1rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ---- Number frequency (hot & cold) ---- */
.freq-chart { position: relative; width: 100%; height: 300px; }
.freq-chart--sm { height: 200px; }

.freq-list { display: flex; flex-direction: column; gap: 0.55rem; }

.freq-row { display: flex; align-items: center; gap: 0.6rem; }

.freq-bar {
  flex: 1;
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.freq-bar__fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

.freq-val {
  min-width: 66px;
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ---- Annuity vs. cash calculator ---- */
.calc-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.calc-inputs label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.calc-inputs input {
  padding: 0.5rem 0.6rem;
  font-size: 1.05rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.verdict {
  font-size: 1.05rem;
  line-height: 1.55;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.result__top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.result__top h2 { margin: 0; }

.result__value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 0.5rem 0 0.85rem;
}

/* ---- Global top nav ---- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 1.25rem;
  background: rgba(10, 20, 36, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topnav__brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.topnav__brand span { color: var(--accent); }

.topnav__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topnav__links > a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.topnav__links > a:hover { color: var(--text); }
.topnav__links > a.is-active { color: var(--accent); }

/* ---- "National Drawings" dropdown ---- */
.topnav__group { position: relative; }

.topnav__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text-dim);
  white-space: nowrap;
  cursor: pointer;
}
.topnav__group:hover .topnav__trigger,
.topnav__group:focus-within .topnav__trigger { color: var(--text); }
.topnav__trigger.is-active { color: var(--accent); }

.topnav__caret { font-size: 0.7em; transition: transform 0.15s ease; }
.topnav__group:hover .topnav__caret,
.topnav__group:focus-within .topnav__caret,
.topnav__group.is-open .topnav__caret { transform: rotate(180deg); }

.topnav__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  display: none;
  flex-direction: column;
  min-width: 12rem;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  z-index: 60;
}
/* Invisible bridge so the menu stays open while the cursor crosses the gap. */
.topnav__menu::before {
  content: "";
  position: absolute;
  top: -0.4rem;
  left: 0;
  right: 0;
  height: 0.4rem;
}
.topnav__group:hover .topnav__menu,
.topnav__group:focus-within .topnav__menu,
.topnav__group.is-open .topnav__menu { display: flex; }

.topnav__menu a {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}
.topnav__menu a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.topnav__menu a.is-active { color: var(--accent); }

/* ---- States hub ---- */
.us-map-wrap {
  max-width: 760px;
  margin: 0 auto 1.75rem;
}

.us-map {
  display: block;
  width: 100%;
  height: auto;
}

.us-state {
  stroke: var(--bg);
  stroke-width: 1;
  transition: fill-opacity 0.15s ease, filter 0.15s ease;
}
.us-state--off { fill: var(--surface-2); fill-opacity: 0.5; }
.us-state--on { fill: var(--accent-2); fill-opacity: 0.32; cursor: pointer; }
.us-state--on:hover,
.us-state--on:focus-visible { fill-opacity: 0.85; }
.us-state--covered { fill: var(--accent); fill-opacity: 0.9; cursor: pointer; }
.us-state--covered:hover,
.us-state--covered:focus-visible { fill-opacity: 1; filter: brightness(1.12); }
.us-state:focus { outline: none; }
.us-state:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }

.us-map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.8rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}
.us-map-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.us-dot { width: 0.8rem; height: 0.8rem; border-radius: 3px; }
.us-dot--covered { background: var(--accent); }
.us-dot--on { background: var(--accent-2); opacity: 0.5; }
.us-dot--off { background: var(--surface-2); }

/* Section subheaders on the per-state page (draw games vs national games). */
.state-section {
  margin: 1.75rem 0 0.4rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
}
.state-section:first-of-type { margin-top: 1rem; }

/* Retired game (Cash4Life) — stand out with a red accent. */
.hist-cta--retired {
  border-left: 3px solid var(--bad);
  background: linear-gradient(90deg, rgba(240, 121, 91, 0.08), transparent 40%);
}
.badge-retired {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.5rem;
  padding: 0.12rem 0.45rem;
  background: var(--bad);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
}

/* Ticket price chip on game cards. */
.ticket-chip {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.06rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}

.state-cell {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
}

a.state-cell:hover { border-color: var(--accent); }

.state-cell__abbr {
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--accent);
  min-width: 2.6em;
}

.state-cell--off { opacity: 0.5; }
.state-cell--off .state-cell__abbr { color: var(--text-dim); }
.state-cell__note { margin-left: auto; font-size: 0.68rem; color: var(--text-dim); }

.game-links { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

.detail-row > td { background: var(--surface-2); }
.prize-breakdown { padding: 0.5rem 0.25rem; }
.prize-breakdown .tier-table { max-width: 420px; }
.prize-breakdown .muted { margin: 0 0 0.5rem; font-size: 0.8rem; }

/* ---- Odds visualizer page ---- */
.viz {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.viz-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.viz-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.viz-controls input[type="number"] {
  width: 150px;
  padding: 0.5rem 0.6rem;
  font-size: 1.15rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.viz-controls select {
  padding: 0.5rem 0.6rem;
  font-size: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  min-width: 240px;
  max-width: 320px;
}

.viz-stats { flex: 1; min-width: 240px; }

.viz-headline {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.viz-sub2 { margin: 0.15rem 0 0; color: var(--text-dim); font-size: 0.85rem; }
.viz-detail { margin: 0.45rem 0 0; font-size: 0.85rem; }
.viz-prize { margin: 0.55rem 0 0; font-size: 0.9rem; }
.viz-note { margin: 0.2rem 0 0; font-size: 0.78rem; color: var(--text-dim); }

.dot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.25rem 0 0.75rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.dot-legend .key { display: inline-flex; align-items: center; gap: 0.45rem; }

.dot-legend .swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.swatch--red { background: #ff3b30; }
.swatch--white { background: #ffffff; }

.dot-area {
  position: relative;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.tile { width: 100%; }
.tile canvas { display: block; }

.red-marker {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid #ff3b30;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  display: none;
  animation: marker-pulse 1.3s ease-out infinite;
}

@keyframes marker-pulse {
  0%   { box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.55); }
  70%  { box-shadow: 0 0 0 16px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 2px rgba(255, 59, 48, 0); }
}

.disclaimer {
  margin-top: 2.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  max-width: 70ch;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
  text-align: center;
  padding: 1.5rem 1.25rem 2.5rem;
}

.footer-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.footer-nav a { color: var(--text-dim); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }

/* ---- Prose / legal pages ---- */
.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.prose h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.6rem;
  letter-spacing: -0.01em;
}

.prose p,
.prose li { font-size: 0.95rem; line-height: 1.65; }
.prose p { margin: 0 0 1rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--accent); }

.prose .lead { font-size: 1.05rem; color: var(--text-dim); }
.prose .note {
  border-left: 2px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 1.5rem 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.error {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid var(--bad);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--text);
}

/* Daily Derby — placed-horse race panel */
.derby-race { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0.5rem 0 0.25rem; }
.derby-horse { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; min-width: 4.5rem; }
.derby-pos { font-size: 0.72rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.derby-name { font-size: 0.85rem; color: var(--text); text-align: center; }

/* "Best value in <state>" module (top of each state page) */
.best-game { border-color: var(--accent); }
.best-game__eyebrow { display: inline-block; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem; }
.best-game__title { margin: 0.25rem 0 0.5rem; font-size: 1.5rem; }
.best-game__title a { color: var(--text); text-decoration: none; }
.best-game__title a:hover { text-decoration: underline; }
.best-game__lead { color: var(--text-dim); margin: 0 0 0.5rem; }
.best-game__rank { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.8rem 0 0.6rem; }
.best-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.8rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.best-row:hover { border-color: var(--accent-2); }
.best-row--top { border-color: var(--accent); background: rgba(224, 185, 80, 0.08); }
.best-row__rank { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--border); color: var(--text); font-size: 0.78rem; font-weight: 700; }
.best-row--top .best-row__rank { background: var(--accent); color: var(--on-accent); }
.best-row__name { flex: 1; font-weight: 600; }
.best-row__tag { font-weight: 500; font-size: 0.7rem; color: var(--text-dim); border: 1px solid var(--border); border-radius: 6px; padding: 0.05rem 0.3rem; margin-left: 0.35rem; }
.best-row__cents { font-weight: 700; color: var(--accent); }
.best-row__per { color: var(--text-dim); font-weight: 400; font-size: 0.8em; }
.best-game__note { color: var(--text-dim); font-size: 0.8rem; margin: 0.2rem 0 0; }
