:root {
  color-scheme: light;
  --background: #f4f5f0;
  --foreground: #18201c;
  --muted: #667269;
  --surface: #ffffff;
  --border: #d9ded5;
  --accent: #0f766e;
  --accent-soft: #d9f4ef;
  --danger: #b42318;
  --danger-soft: #fee2e2;
  --info: #2563eb;
  --info-soft: #dbeafe;
  --positive: #157347;
  --warning: #b45309;
  --warning-soft: #fff4d6;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.shell {
  /* Widened for the model table: three arms plus market needs more than a
     reading-width column, and the viewport had ~450px going spare. */
  width: min(1600px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p,
td {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
}

h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.lede {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.page-actions a {
  border: 1px solid var(--accent);
  border-radius: 7px;
  color: var(--accent);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.page-actions a:hover {
  background: var(--accent-soft);
}

.page-actions a[aria-current="page"] {
  background: var(--accent);
  color: #ffffff;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  margin: 0 0 18px;
  padding: 4px;
}

.section-nav a {
  border-radius: 6px;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.section-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.section-nav a[aria-current="page"] {
  background: var(--accent);
  color: #ffffff;
}

.page-actions a.telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: #168acd;
  background: #229ed9;
  color: #ffffff;
}

.page-actions a.telegram-link:hover {
  background: #168acd;
}

.page-actions a.telegram-link:focus-visible {
  outline: 3px solid rgb(34 158 217 / 28%);
  outline-offset: 2px;
}

.telegram-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
}

.pipeline-status {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px 24px;
  align-items: center;
  border: 1px solid var(--border);
  border-left-width: 6px;
  border-radius: 8px;
  background: var(--surface);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.pipeline-status.healthy {
  border-left-color: var(--positive);
}

.pipeline-status.degraded {
  border-left-color: var(--danger);
}

.pipeline-status.standby {
  border-left-color: var(--warning);
}

.pipeline-status-main {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 12px;
}

.pipeline-status-main p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pipeline-badge {
  display: inline-block;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

.pipeline-badge.healthy {
  background: var(--accent-soft);
  color: var(--accent);
}

.pipeline-badge.degraded {
  background: var(--danger-soft);
  color: var(--danger);
}

.pipeline-badge.standby {
  background: var(--warning-soft);
  color: var(--warning);
}

.pipeline-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}

.pipeline-detail-list div {
  min-width: 0;
}

.pipeline-links {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
}

.pipeline-links a {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f8fafc;
  color: #1f2a37;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.pipeline-links a:hover {
  border-color: var(--info);
  background: var(--info-soft);
  color: #1d4ed8;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.metric span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.projection-board {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 16px;
  padding: 18px;
}

.projection-board-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.58fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.projection-board-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.model-trust-provenance,
.model-evidence-list dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.model-heads-header {
  grid-template-columns: minmax(0, 1fr);
}

.model-artifact-identity {
  overflow-wrap: anywhere;
}

.model-head-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.model-head-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  padding: 16px;
}

.model-head-card.totals {
  border-color: var(--info);
}

.model-head-card > p {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.model-head-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.model-head-title h3 {
  margin-top: 3px;
}

.model-head-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.model-head-status.active {
  background: var(--accent-soft);
  color: var(--positive);
}

.model-head-status.shadow {
  background: var(--info-soft);
  color: var(--info);
}

.model-head-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.model-head-details div {
  min-width: 0;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.model-head-details dt {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.model-head-details dd {
  margin-top: 4px;
  font-size: 12px;
  overflow-wrap: anywhere;
  text-align: left;
}

.tabular-explanation-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.tabular-explanation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.tabular-explanation-summary div {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.tabular-explanation-summary dt,
.tabular-explanation-summary dd {
  font-size: 12px;
}

.tabular-explanation-summary dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.tabular-importance-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tabular-importance-label,
.tabular-game-explanation header,
.tabular-game-explanation li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.tabular-importance-label {
  align-items: baseline;
  margin-bottom: 5px;
  font-size: 12px;
}

.tabular-importance-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--background);
}

.tabular-importance-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--info);
}

.tabular-game-explanations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tabular-game-explanation {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  padding: 14px;
}

.tabular-game-explanation header {
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.tabular-game-explanation h3,
.tabular-game-explanation p {
  margin: 0;
}

.tabular-game-explanation header p,
.tabular-game-explanation time,
.tabular-score-reconstruction {
  color: var(--muted);
  font-size: 12px;
}

.tabular-game-explanation ul {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.tabular-game-explanation li {
  align-items: baseline;
  font-size: 12px;
}

.tabular-game-explanation li span {
  min-width: 0;
}

.tabular-game-explanation li strong {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.tabular-game-explanation li strong.positive {
  color: var(--positive);
}

.tabular-game-explanation li strong.negative {
  color: var(--negative);
}

.model-evidence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.model-evidence-list div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  padding: 12px;
}

.model-evidence-list dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.model-evidence-list dd {
  margin: 0;
  font-size: 14px;
}

.feature-importance-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.85fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 20px;
}

.feature-importance-header p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.feature-run-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.feature-run-summary div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

.feature-run-summary .feature-run-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.feature-importance-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-importance-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 90px;
  gap: 10px;
  align-items: center;
}

.feature-rank {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.feature-importance-detail {
  min-width: 0;
}

.feature-importance-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.feature-importance-label strong {
  font-size: 13px;
}

.feature-importance-label span {
  color: var(--muted);
  white-space: nowrap;
}

.feature-description {
  max-width: 900px;
  margin: 3px 0 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.feature-importance-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ece6;
}

.feature-importance-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.feature-source {
  border-radius: 999px;
  background: #edf0eb;
  color: var(--muted);
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.feature-source.fangraphs {
  background: var(--info-soft);
  color: var(--info);
}

.feature-importance-footnote {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.projection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric-glossary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: -4px 0 16px;
}

.metric-glossary div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

.metric-glossary dt {
  font-size: 12px;
  font-weight: 800;
}

.metric-glossary dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.model-version-detail {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.projection-summary div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.projection-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.projection-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1;
}

.kelly-comparison-header {
  grid-template-columns: minmax(0, 720px);
}

.full-kelly-breakdown-header {
  grid-template-columns: minmax(0, 860px);
}

.full-kelly-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.full-kelly-model-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
}

.full-kelly-model-card h3 {
  margin: 6px 0 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.full-kelly-model-card > strong {
  display: block;
  margin-top: 14px;
  font-size: 28px;
  line-height: 1;
}

.full-kelly-model-card > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.full-kelly-model-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.full-kelly-model-card dl div {
  min-width: 0;
  border-top: 1px solid var(--border);
  padding-top: 9px;
}

.full-kelly-model-card dt {
  font-size: 10px;
  text-transform: uppercase;
}

.full-kelly-model-card dd {
  margin-top: 5px;
  font-size: 13px;
}

.bankroll-performance-header {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.72fr);
}

.bankroll-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.bankroll-summary div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

:where(.bankroll-summary) dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

:where(.bankroll-summary) dd {
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 800;
}

.bankroll-chart-stack {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
}

.bankroll-chart-stack > div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.bankroll-chart-stack h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.bankroll-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.bankroll-grid line {
  stroke: #dfe5dc;
  stroke-width: 1;
}

.bankroll-grid text,
.bankroll-date-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.bankroll-zero-line {
  stroke: #94a099;
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.bankroll-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.bankroll-line.positive,
.bankroll-endpoint.positive {
  stroke: var(--positive);
}

.bankroll-line.negative,
.bankroll-endpoint.negative {
  stroke: var(--danger);
}

.bankroll-endpoint.positive {
  fill: var(--positive);
}

.bankroll-endpoint.negative {
  fill: var(--danger);
}

.bankroll-bar.positive {
  fill: var(--positive);
}

.bankroll-bar.negative {
  fill: var(--danger);
}

.kelly-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.kelly-strategy {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
}

.kelly-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.kelly-strategy > strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.kelly-strategy > p {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 800;
}

.kelly-strategy dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.kelly-strategy dl div {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.kelly-value {
  margin: 5px 0 0;
  font-size: 15px;
  font-weight: 800;
}

.quality-strip {
  display: grid;
  grid-template-columns: minmax(250px, 0.55fr) minmax(0, 1.45fr);
  gap: 16px;
  align-items: start;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 14px;
}

.quality-strip.pass {
  color: var(--foreground);
}

.quality-strip.warn {
  color: #614100;
}

.quality-strip.fail {
  color: var(--danger);
}

.quality-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

.quality-strip p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.quality-strip dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.quality-strip dl div {
  min-width: 0;
}

.quality-strip dt {
  font-size: 11px;
  text-transform: uppercase;
}

.quality-strip dd {
  margin-top: 4px;
  text-align: left;
}

.quality-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

.quality-badge.pass {
  background: var(--accent-soft);
  color: var(--accent);
}

.quality-badge.warn {
  background: var(--warning-soft);
  color: var(--warning);
}

.quality-badge.fail {
  background: var(--danger-soft);
  color: var(--danger);
}

.inference-board-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.inference-board-header .section-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.inference-board-header h2 {
  font-size: 22px;
}

.inference-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
  margin: 14px 0 0;
}

.inference-summary div {
  min-width: 0;
  background: #f8fafc;
  padding: 8px 11px;
}

.inference-summary dt,
.decision-metrics dt,
.decision-outcome dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.inference-summary dd {
  margin-top: 4px;
  font-size: 17px;
  line-height: 1;
  text-align: left;
}

.inference-quality {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f8fafc;
  margin-top: 10px;
  padding: 7px 9px;
  font-size: 12px;
}

.inference-quality.warn {
  border-color: #f2d49b;
  background: #fffbeb;
  color: #614100;
}

.inference-quality.fail {
  border-color: #f4b4ae;
  background: #fff7f6;
  color: var(--danger);
}

.inference-quality strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inference-quality a {
  margin-left: auto;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.inference-freshness-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #f2d49b;
  border-radius: 8px;
  background: #fffbeb;
  color: #614100;
  margin-top: 12px;
  padding: 11px 12px;
}

.freshness-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--warning);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.inference-freshness-note strong {
  display: block;
  font-size: 13px;
}

.inference-freshness-note p {
  margin: 3px 0 0;
  color: #7a5210;
  font-size: 11px;
  line-height: 1.4;
}

.inference-freshness-note a {
  display: inline-block;
  margin-top: 7px;
  color: currentColor;
  font-size: 11px;
  font-weight: 800;
}

.inference-freshness-note.unavailable {
  border-color: #f4b4ae;
  background: #fff7f6;
  color: var(--danger);
}

.inference-freshness-note.unavailable .freshness-icon {
  background: var(--danger);
}

.inference-freshness-note.unavailable p {
  color: #7a2e28;
}

.inference-list {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.inference-game {
  overflow: hidden;
  border: 1px solid #cdd5ca;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgb(24 32 28 / 7%);
}

.inference-game.actionable {
  border-left: 4px solid var(--positive);
}

.inference-game.no-action {
  border-left: 4px solid #9aa59c;
}

.inference-game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: #f1f5f2;
  padding: 12px 14px;
}

.inference-game-header div {
  min-width: 0;
}

.inference-game-header h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.inference-matchup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.inference-team {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.inference-team > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inference-matchup-at {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.mlb-team-logo {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.inference-game-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.inference-game-header time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.inference-game-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.game-decision-summary {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.game-decision-summary.bet {
  background: var(--accent-soft);
  color: var(--positive);
}

.game-decision-summary.pass {
  background: #e7ece8;
  color: #47564c;
}

.pitch-mix-panel {
  border: 1px solid #e0e5df;
  border-radius: 8px;
  background: #f8fafc;
  margin: 0 14px 14px;
  padding: 10px 11px 11px;
}

.pitch-mix-panel > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.pitch-mix-panel > header strong {
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pitch-mix-panel > header span,
.pitch-mix-card-header span,
.pitch-mix-card p {
  color: var(--muted);
  font-size: 10px;
}

.pitch-mix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pitch-mix-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  padding: 8px 9px;
}

.pitch-mix-card.unavailable {
  border-style: dashed;
  background: transparent;
}

.pitch-mix-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pitch-mix-card-header strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pitch-mix-card-header span {
  flex: 0 0 auto;
}

.pitch-mix-bar {
  display: flex;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
  margin-top: 7px;
}

.pitch-mix-segment {
  display: block;
  height: 100%;
}

.pitch-mix-segment.fastball,
.pitch-mix-swatch.fastball {
  background: #2563eb;
}

.pitch-mix-segment.breaking,
.pitch-mix-swatch.breaking {
  background: #7c3aed;
}

.pitch-mix-segment.offspeed,
.pitch-mix-swatch.offspeed {
  background: #d97706;
}

.pitch-mix-segment.other,
.pitch-mix-swatch.other {
  background: #64748b;
}

.pitch-mix-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 7px 0 0;
}

.pitch-mix-legend div {
  min-width: 0;
}

.pitch-mix-legend dt {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pitch-mix-legend dd {
  margin: 2px 0 0 9px;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.pitch-mix-swatch {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.pitch-mix-card p {
  margin: 6px 0 0;
}

.decision-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: #f8faf7;
  padding: 14px;
}

.shadow-lane {
  background: #f7f5ff;
}

.shadow-unavailable {
  margin-top: 12px;
}

.decision-status.shadow {
  border-color: #c4b5fd;
  background: #ede9fe;
  color: #5b21b6;
}

.decision-lane {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.decision-lane.actionable {
  border-color: #9bd8bd;
  background: #f5fdf9;
  box-shadow: inset 0 3px 0 var(--positive);
}

.winner-lane {
  box-shadow: 0 2px 7px rgb(24 32 28 / 5%);
}

.winner-lane.actionable {
  box-shadow:
    inset 0 3px 0 var(--positive),
    0 2px 7px rgb(24 32 28 / 5%);
}

.decision-lane-header,
.decision-selection {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.decision-lane-header > span:first-child {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.decision-selection {
  margin-top: 7px;
}

.decision-selection strong {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-selection > span {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
}

.decision-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #cfd7cf;
  border-radius: 6px;
  background: var(--border);
  margin: 9px 0 0;
}

.decision-metrics div {
  min-width: 0;
  background: #f7f9f7;
  padding: 6px 8px;
}

.decision-metrics dd,
.decision-outcome dd {
  margin-top: 3px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.decision-outcome {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 0;
}

.decision-outcome div {
  min-width: 0;
}

.decision-context {
  overflow: hidden;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-lane.unavailable {
  border-style: dashed;
  background: #fbfcfa;
}

.decision-lane.unavailable .decision-selection > span {
  color: var(--muted);
  font-size: 11px;
}

.decision-unavailable {
  border: 1px dashed #c7cec6;
  border-radius: 6px;
  margin-top: 9px;
  padding: 9px;
}

.inference-empty-state {
  display: grid;
  gap: 4px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8faf7;
  margin-top: 12px;
  padding: 22px;
  text-align: center;
}

.inference-empty-state strong {
  color: var(--foreground);
  font-size: 14px;
}

.inference-empty-state span {
  color: var(--muted);
  font-size: 12px;
}

.decision-unavailable strong,
.decision-unavailable span {
  display: block;
}

.decision-unavailable strong {
  font-size: 12px;
}

.decision-unavailable span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.panel.wide {
  grid-row: span 3;
}

.panel-header {
  margin-bottom: 14px;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.schedule-meta-strip {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(76px, 0.48fr)) minmax(190px, 1.25fr)
    minmax(190px, 1.2fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 14px;
}

.schedule-meta-item {
  min-width: 0;
  border-right: 1px solid var(--border);
  padding: 10px 12px;
}

.schedule-meta-item:last-child {
  border-right: 0;
}

.schedule-meta-item > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-transform: uppercase;
}

.schedule-meta-item > strong {
  display: block;
  margin-top: 5px;
  line-height: 1.15;
}

.schedule-meta-item.count > strong {
  font-size: 21px;
}

.schedule-meta-item.context > strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-meta-item > small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-meta-item.source a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

.leaderboard-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.65fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 18px;
}

.leaderboard-page-header p:not(.eyebrow) {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.leaderboard-qualifiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.leaderboard-qualifiers div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.leaderboard-qualifiers dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.leaderboard-qualifiers dd {
  margin: 5px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.leaderboard-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border: 0;
  margin: 0;
  padding: 0;
}

.leaderboard-tabs legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.leaderboard-tabs button {
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 8px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.leaderboard-tabs button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.leaderboard-search {
  display: grid;
  gap: 4px;
  width: min(280px, 100%);
}

.leaderboard-search span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.leaderboard-search input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--foreground);
  padding: 9px 10px;
  font: inherit;
  font-size: 14px;
}

.leaderboard-search input:focus-visible,
.leaderboard-tabs button:focus-visible,
.leaderboard-table th button:focus-visible,
.leaderboard-show-all:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

.leaderboard-signal {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-left-width: 5px;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.leaderboard-signal.direct {
  border-left-color: var(--positive);
}

.leaderboard-signal.context {
  border-left-color: var(--info);
}

.leaderboard-signal > span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--info-soft);
  color: var(--info);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.leaderboard-signal.direct > span {
  background: var(--accent-soft);
  color: var(--positive);
}

.leaderboard-signal strong {
  font-size: 14px;
}

.leaderboard-signal p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.leaderboard-table {
  min-width: 720px;
}

.leaderboard-table th button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-transform: inherit;
}

.leaderboard-table th[aria-sort] button {
  color: var(--accent);
}

.leaderboard-table td:first-child {
  width: 58px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.leaderboard-player-name {
  display: block;
  min-width: 180px;
}

.leaderboard-player-name span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.leaderboard-show-all {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  margin-top: 10px;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.leaderboard-empty-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.schedule-table {
  min-width: 1000px;
}

.full-kelly-daily-table table {
  min-width: 1040px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 11px 7px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  font-size: 14px;
}

.table-wrap td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.schedule-team-cell,
.schedule-score-cell,
.schedule-pitcher-cell,
.schedule-lineup-cell {
  vertical-align: middle;
}

.schedule-score-cell {
  font-variant-numeric: tabular-nums;
}

.schedule-team-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.schedule-team-link .mlb-team-logo {
  width: 24px;
  height: 24px;
}

.schedule-pitcher-cell {
  color: var(--muted);
  font-size: 12px;
}

.schedule-lineup-cell {
  width: 178px;
  min-width: 178px;
}

.schedule-away-row > .schedule-team-cell,
.schedule-away-row > .schedule-score-cell,
.schedule-away-row > .schedule-pitcher-cell,
.schedule-away-row > .schedule-lineup-cell {
  border-bottom: 0;
  padding-bottom: 4px;
}

.schedule-home-row > .schedule-team-cell,
.schedule-home-row > .schedule-score-cell,
.schedule-home-row > .schedule-pitcher-cell,
.schedule-home-row > .schedule-lineup-cell {
  padding-top: 4px;
}

.lineup-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  padding: 4px;
  user-select: none;
}

.lineup-toggle:hover {
  border-color: var(--border);
  background: #f8fafc;
}

.lineup-toggle:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

.table-wrap td .lineup-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  margin: 0;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.lineup-status.confirmed {
  background: var(--accent-soft);
  color: var(--positive);
}

.lineup-status.projected {
  background: var(--warning-soft);
  color: var(--warning);
}

.lineup-status.unknown {
  background: #eef2f7;
  color: #324154;
}

.lineup-status.mixed {
  background: var(--info-soft);
  color: #1d4ed8;
}

.table-wrap td .lineup-toggle-count {
  display: inline-block;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.table-wrap td .lineup-chevron {
  display: inline-block;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  transition: transform 120ms ease;
}

.lineup-detail-row > td {
  border-bottom: 1px solid var(--border);
  padding: 0 7px 12px;
}

.expanded-lineups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.expanded-lineup-team {
  min-width: 0;
}

.expanded-lineup-team + .expanded-lineup-team {
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

.expanded-lineup-team header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.expanded-lineup-team header > strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-list {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.lineup-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 90px 12px 30px;
  gap: 5px;
  align-items: baseline;
  font-size: 12px;
  line-height: 1.3;
}

.lineup-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap td .lineup-order,
.table-wrap td .lineup-handedness,
.table-wrap td .lineup-position,
.table-wrap td .lineup-slash,
.table-wrap td .lineup-unavailable {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.table-wrap td .lineup-order {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.table-wrap td .lineup-handedness,
.table-wrap td .lineup-position,
.table-wrap td .lineup-slash {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table-wrap td .lineup-handedness {
  text-align: center;
}

.table-wrap td .lineup-position {
  text-align: left;
}

.table-wrap td .lineup-position::before {
  margin-right: 4px;
  content: "·";
}

.table-wrap td .lineup-slash {
  color: var(--foreground);
  font-size: 12px;
  text-align: right;
}

.empty-state {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0;
  padding: 14px 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.positive {
  color: var(--positive);
  font-weight: 800;
}

.negative {
  color: var(--danger);
  font-weight: 800;
}

.status-pill {
  display: inline-block;
  width: fit-content;
  border-radius: 999px;
  background: #eef2f7;
  color: #324154;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: normal;
  white-space: nowrap;
}

.status-pill.live {
  background: #fee2e2;
  color: #b42318;
}

.status-pill.final {
  background: #e9ecef;
  color: #495057;
}

.status-pill.scheduled {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill.postponed {
  background: #fff4d6;
  color: #8a5a00;
}

.status-pill.bet,
.status-pill.won {
  background: var(--accent-soft);
  color: var(--positive);
}

.status-pill.lost {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.push,
.status-pill.pending {
  background: #eef2f7;
  color: #324154;
}

.status-pill.projection-stage {
  padding: 2px 7px;
  font-size: 10px;
}

.status-pill.projection-stage.early {
  background: #fff4d6;
  color: #8a5a00;
}

.status-pill.projection-stage.projected {
  background: #e8f0ff;
  color: #315c9b;
}

.status-pill.projection-stage.confirmed {
  background: var(--accent-soft);
  color: var(--positive);
}

.status-pill.decision-status {
  padding: 2px 7px;
  font-size: 10px;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  min-width: 0;
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: right;
}

.feature-run-summary dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.feature-run-summary dd {
  margin: 5px 0 0;
  font-size: 17px;
  font-weight: 800;
}

.pipeline-detail-list dt {
  font-size: 12px;
}

.pipeline-detail-list dd {
  margin-top: 3px;
  text-align: left;
}

.feature-panel {
  grid-column: 2;
}

.feature-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.feature-row {
  border-radius: 8px;
  background: var(--accent-soft);
  padding: 12px;
}

.feature-row strong,
.feature-row span {
  display: block;
}

.feature-row span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 920px) {
  .page-header,
  .pipeline-status,
  .quality-strip,
  .projection-board-header,
  .bankroll-performance-header,
  .full-kelly-breakdown-header,
  .feature-importance-header,
  .leaderboard-page-header,
  .content-grid {
    display: block;
  }

  .full-kelly-model-grid {
    grid-template-columns: 1fr;
  }

  .page-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 16px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-glossary {
    grid-template-columns: 1fr;
  }

  .schedule-meta-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .schedule-meta-item:nth-child(4) {
    border-right: 0;
  }

  .schedule-meta-item.context {
    grid-column: span 2;
    border-top: 1px solid var(--border);
  }

  .pipeline-detail-list,
  .pipeline-links {
    margin-top: 14px;
  }

  .panel {
    margin-top: 16px;
  }

  .projection-summary {
    margin-top: 14px;
  }

  .bankroll-summary {
    margin-top: 14px;
  }

  .bankroll-chart-stack {
    grid-template-columns: 1fr;
  }

  .feature-run-summary {
    margin-top: 14px;
  }

  .model-head-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-qualifiers {
    margin-top: 14px;
  }

  .quality-strip dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
  }

  .feature-importance-list li {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
  }

  .feature-importance-label {
    display: grid;
    gap: 3px;
  }

  .feature-importance-label span {
    white-space: normal;
  }

  .feature-source {
    display: none;
  }
}

@media (max-width: 720px) {
  .tabular-explanation-summary,
  .tabular-game-explanations {
    grid-template-columns: 1fr;
  }

  .pitch-mix-grid {
    grid-template-columns: 1fr;
  }

  .decision-grid {
    grid-template-columns: 1fr;
  }

  .inference-quality {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .inference-quality strong {
    flex: 1 1 260px;
    overflow: visible;
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .kelly-comparison {
    grid-template-columns: 1fr;
  }

  .bankroll-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid,
  .projection-summary,
  .model-evidence-list,
  .leaderboard-qualifiers {
    grid-template-columns: 1fr;
  }

  .inference-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inference-summary div:last-child {
    grid-column: span 2;
  }

  .inference-game-header {
    display: block;
  }

  .inference-game-header time {
    display: block;
    margin-top: 5px;
  }

  .inference-game-meta {
    align-items: flex-start;
    margin-top: 8px;
  }

  .decision-grid {
    padding: 10px;
  }

  .pitch-mix-panel {
    margin: 0 10px 10px;
  }

  .schedule-meta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-meta-item:nth-child(2) {
    border-right: 0;
  }

  .schedule-meta-item:nth-child(3),
  .schedule-meta-item:nth-child(4) {
    border-top: 1px solid var(--border);
  }

  .schedule-meta-item.context {
    grid-column: span 2;
    border-right: 0;
  }

  .leaderboard-toolbar,
  .leaderboard-signal {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .leaderboard-search,
  .leaderboard-tabs {
    width: 100%;
  }

  h1 {
    font-size: 28px;
  }
}

.projection-lineups,
.market-prices-disclosure {
  margin: 10px 14px 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.projection-lineups > summary,
.market-prices-disclosure > summary {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.72rem;
  user-select: none;
}

.projection-lineups > summary::-webkit-details-marker,
.market-prices-disclosure > summary::-webkit-details-marker {
  display: none;
}

.projection-lineups > summary::after,
.market-prices-disclosure > summary::after {
  content: "▾";
  margin-left: auto;
  font-size: 0.7rem;
}

.projection-lineups[open] > summary::after,
.market-prices-disclosure[open] > summary::after {
  content: "▴";
}

.projection-lineups > summary strong,
.market-prices-disclosure > summary strong,
.projection-lineups.unavailable > strong {
  color: var(--foreground);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.projection-lineups.unavailable {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.72rem;
}

.projection-lineups .expanded-lineups {
  border-width: 1px 0 0;
  border-radius: 0 0 7px 7px;
}

.projection-lineups .lineup-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.projection-lineups .lineup-order,
.projection-lineups .lineup-handedness,
.projection-lineups .lineup-position,
.projection-lineups .lineup-slash,
.projection-lineups .lineup-unavailable {
  color: var(--muted);
  font-size: 11px;
}

.projection-lineups .lineup-order {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.projection-lineups .lineup-handedness,
.projection-lineups .lineup-position,
.projection-lineups .lineup-slash {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.projection-lineups .lineup-handedness {
  text-align: center;
}

.market-prices-strip {
  margin-top: 0;
  border-top: 1px solid var(--border);
  overflow-x: auto;
}

.market-prices-strip.unavailable {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.market-prices-strip.refresh-warning {
  margin: 10px 14px 0;
  border: 1px solid var(--warning-soft);
  border-radius: 7px;
  background: var(--warning-soft);
  color: var(--warning);
  overflow-x: visible;
}

.market-prices-strip table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.market-prices-strip th {
  text-align: left;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.market-prices-strip td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.market-prices-strip tr:last-child td {
  border-bottom: none;
}

.market-prices-strip .venue-row.stale td {
  color: var(--muted);
}

.market-prices-strip .venue-name {
  font-weight: 600;
  white-space: nowrap;
}

.market-prices-strip .venue-moneyline > span {
  display: inline-block;
  margin-right: 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.moneyline-history-summary {
  display: grid;
  grid-template-columns: minmax(22px, auto) 112px;
  align-items: center;
  column-gap: 6px;
  cursor: pointer;
  list-style: none;
}

.moneyline-history-list span {
  display: inline;
  margin-top: 0;
}

.moneyline-history-expanded {
  display: grid;
  gap: 9px;
  width: min(640px, calc(100vw - 72px));
  margin-top: 9px;
}

.moneyline-history-chart {
  min-width: 0;
  margin: 0;
  padding: 9px 10px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.moneyline-history-chart figcaption,
.moneyline-chart-window {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.moneyline-history-chart figcaption strong {
  color: var(--foreground);
  font-size: 12px;
}

.moneyline-history-chart figcaption span,
.moneyline-chart-window {
  font-size: 10px;
}

.moneyline-history-chart svg {
  display: block;
  width: 100%;
  height: clamp(180px, 24vw, 300px);
  overflow: visible;
}

.moneyline-chart-grid line {
  stroke: var(--border);
  stroke-width: 1;
}

.moneyline-chart-grid text,
.moneyline-chart-end-label {
  fill: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.moneyline-chart-end-label {
  font-weight: 750;
}

.moneyline-chart-series .price-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.moneyline-chart-series .spread-band {
  stroke: none;
  opacity: 0.12;
}

.moneyline-chart-series circle {
  stroke: var(--surface);
  stroke-width: 1.5;
}

.moneyline-chart-series.away .price-line {
  stroke: var(--info);
}

.moneyline-chart-series.away .spread-band,
.moneyline-chart-series.away circle {
  fill: var(--info);
}

.moneyline-chart-series.home .price-line {
  stroke: var(--danger);
}

.moneyline-chart-series.home .spread-band,
.moneyline-chart-series.home circle {
  fill: var(--danger);
}

.moneyline-chart-end-label.away {
  fill: var(--info);
}

.moneyline-chart-end-label.home {
  fill: var(--danger);
}

.moneyline-history-audit {
  min-width: 0;
}

.moneyline-history-audit > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.moneyline-history-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
  line-height: 1.55;
  white-space: nowrap;
}

.moneyline-history-list li {
  display: grid;
  grid-template-columns: minmax(145px, auto) auto auto;
  gap: 8px;
}

.moneyline-history-list time {
  color: var(--muted);
}

.moneyline-history-list .away-price strong {
  color: var(--info);
}

.moneyline-history-list .home-price strong {
  color: var(--danger);
}

.schedule-moneyline-toggle {
  display: grid;
  grid-template-columns: auto minmax(92px, 1fr);
  align-items: center;
  gap: 2px 8px;
  width: 100%;
  min-width: 190px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  padding: 5px 6px;
  text-align: left;
}

.schedule-moneyline-toggle:hover {
  border-color: var(--border);
  background: #f8fafc;
}

.schedule-moneyline-toggle:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

.table-wrap td .schedule-moneyline-team {
  display: inline-flex;
  grid-row: span 2;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--foreground);
}

.schedule-moneyline-team .mlb-team-logo {
  width: 22px;
  height: 22px;
}

.schedule-moneyline-range {
  color: var(--foreground);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table-wrap td .schedule-moneyline-count {
  margin: 0;
  font-size: 11px;
}

.table-wrap td .schedule-moneyline-count span {
  display: inline;
  margin: 0 0 0 2px;
}

.moneyline-detail-row > td {
  padding: 0 7px 10px;
  background: #f8fafc;
}

.schedule-moneyline-history {
  padding: 12px 14px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.schedule-moneyline-history > header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 9px;
}

.schedule-moneyline-history > header strong {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schedule-moneyline-history > header span {
  margin: 0;
  font-size: 11px;
}

.schedule-moneyline-history > .moneyline-history-chart {
  margin-bottom: 9px;
}

.schedule-moneyline-history > .moneyline-history-audit[open] > summary {
  margin-bottom: 9px;
}

.schedule-moneyline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule-moneyline-grid li {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fbfcfd;
}

.schedule-moneyline-grid li.latest {
  border-color: #93c5fd;
  background: #eff6ff;
}

.schedule-moneyline-grid time {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.table-wrap td .schedule-moneyline-grid .away-price,
.table-wrap td .schedule-moneyline-grid .home-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.table-wrap td .schedule-moneyline-grid .away-price span,
.table-wrap td .schedule-moneyline-grid .home-price span {
  display: inline;
  margin: 0;
  font-size: 10px;
  font-weight: 750;
}

.schedule-moneyline-grid .away-price strong {
  color: #2563eb;
}

.schedule-moneyline-grid .home-price strong {
  color: #dc2626;
}

.moneyline-history-team {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--foreground);
  font-size: 10px;
  font-weight: 700;
}

.moneyline-history-team .mlb-team-logo {
  width: 18px;
  height: 18px;
}

.moneyline-history-count {
  grid-column: 2;
  font-size: 11px;
}

.moneyline-history-price-label {
  fill: currentColor;
  font-size: 8px;
  font-weight: 650;
}

.market-prices-strip .venue-total {
  font-variant-numeric: tabular-nums;
}

.market-prices-strip .venue-total-list {
  display: grid;
  gap: 4px;
}

.market-prices-strip .venue-total-list > span {
  white-space: nowrap;
}

.market-prices-strip .venue-total-rung {
  display: grid;
  gap: 1px;
}

.market-prices-strip .venue-total-rung > strong {
  color: var(--foreground);
  font-size: 11px;
  font-weight: 650;
}

.market-prices-strip .venue-total-rung > small {
  color: var(--muted);
  font-size: 9px;
}

.market-prices-strip .ladder-evaluation {
  color: var(--foreground);
  font-weight: 650;
}

.market-prices-strip .ladder-ranks {
  white-space: normal;
}

.market-prices-strip .portfolio-allocation.selected {
  color: var(--positive);
  font-weight: 750;
}

.market-prices-strip .venue-freshness {
  white-space: nowrap;
  color: var(--muted);
}

.market-prices-strip .venue-flag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.68rem;
}

.market-prices-strip .venue-flag.stale {
  background: var(--danger-soft);
  color: var(--danger);
}

.market-prices-strip .venue-empty {
  color: var(--muted);
}

@media (max-width: 720px) {
  .projection-lineups .expanded-lineups {
    grid-template-columns: 1fr;
  }

  .projection-lineups .expanded-lineup-team + .expanded-lineup-team {
    border-top: 1px solid var(--border);
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  .inference-matchup {
    flex-wrap: wrap;
  }

  .projection-lineups,
  .market-prices-disclosure {
    margin-right: 10px;
    margin-left: 10px;
  }

  .moneyline-history-expanded {
    width: min(100%, calc(100vw - 48px));
  }

  .moneyline-history-chart {
    padding-right: 6px;
    padding-left: 6px;
  }

  .moneyline-history-chart svg {
    height: 170px;
  }

  .moneyline-chart-window {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .moneyline-history-list li {
    grid-template-columns: 1fr 1fr;
  }

  .moneyline-history-list time {
    grid-column: 1 / -1;
  }
}

/* Decision-first Today page */
.yesterday-board,
.projection-board {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgb(24 32 28 / 5%);
  margin-bottom: 18px;
  padding: 18px 20px 20px;
}

.today-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.today-section-header h2,
.today-section-header p {
  margin: 0;
}

.today-section-header h2 {
  font-size: 21px;
  line-height: 1.2;
}

.today-section-header p:not(.section-kicker) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.today-section-header > a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
}

.upcoming-headline {
  display: grid;
  gap: 3px;
  min-width: 260px;
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}

.upcoming-headline strong {
  font-size: 14px;
}

.upcoming-headline span {
  color: var(--muted);
  font-size: 11px;
}

.today-inline-warning,
.today-empty-state {
  display: grid;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  margin-top: 14px;
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
}

.today-inline-warning {
  border-color: #f2d49b;
  background: var(--warning-soft);
  color: #614100;
}

.today-empty-state strong,
.today-inline-warning strong {
  color: var(--foreground);
  font-size: 13px;
}

.today-empty-state.unavailable {
  border-color: #f4b4ae;
  background: #fff7f6;
}

.yesterday-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
  gap: 1px;
  margin: 14px 0 0;
}

.yesterday-summary > div {
  background: #f8fafc;
  padding: 9px 12px;
}

.yesterday-summary dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.yesterday-summary dd {
  margin: 3px 0 0;
  font-size: 17px;
  font-weight: 800;
  text-align: left;
}

.yesterday-summary-note {
  color: var(--muted);
  font-size: 10px !important;
  font-weight: 700 !important;
}

.yesterday-bet-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.daily-games-live-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.daily-game-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.daily-game-row {
  display: grid;
  grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.daily-game-row.has-projection {
  grid-template-columns: minmax(520px, 0.95fr) minmax(280px, 1.05fr);
}

.daily-game-matchup {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 35%, var(--surface));
  padding: 12px 14px;
}

.daily-game-team-list {
  display: grid;
  gap: 7px;
}

.daily-game-scoreboard-wrap {
  min-width: 0;
  overflow-x: auto;
}

.daily-game-scoreboard {
  width: 100%;
  min-width: 490px;
  border-collapse: collapse;
  table-layout: fixed;
}

.daily-game-scoreboard-team {
  width: auto;
}

.daily-game-scoreboard-model {
  width: 58px;
}

.daily-game-scoreboard-market {
  width: 64px;
}

.daily-game-scoreboard-score {
  width: 50px;
}

.daily-game-scoreboard th,
.daily-game-scoreboard td {
  padding: 4px 5px;
  text-align: right;
}

.daily-game-scoreboard thead th {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: normal;
}

.daily-game-scoreboard .daily-game-scoreboard-group th {
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  padding-top: 0;
  padding-bottom: 3px;
  text-align: center;
}

.daily-game-scoreboard .daily-game-scoreboard-group > :first-child {
  border-bottom-color: transparent;
}

.daily-game-scoreboard thead th:first-child {
  padding-left: 0;
  text-align: left;
}

.daily-game-scoreboard tbody th {
  padding-left: 0;
  text-align: left;
}

.daily-game-scoreboard-team-cell {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.daily-game-scoreboard tbody td:not(.daily-game-team-score) {
  color: var(--muted-strong);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.daily-game-market-price {
  display: inline-grid;
  justify-items: end;
  line-height: 1.05;
}

.daily-game-market-price strong {
  font: inherit;
}

.daily-game-market-price small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 550;
}

.daily-game-scoreboard tbody tr + tr th,
.daily-game-scoreboard tbody tr + tr td {
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.daily-game-scoreboard .team-identity-name {
  font-size: 13px;
  font-weight: 750;
}

.daily-game-scoreboard .mlb-team-logo {
  width: 28px;
  height: 28px;
}

.daily-game-team-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 2.25ch;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.daily-game-team-row .mlb-team-logo {
  width: 28px;
  height: 28px;
}

.team-identity-copy {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.team-identity-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-game-team-row .team-identity-name {
  font-size: 13px;
  font-weight: 750;
}

.team-identity-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-game-team-score {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: right;
}

.daily-game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-left: 37px;
  border-top: 1px solid color-mix(in srgb, var(--border) 65%, var(--surface));
  padding-top: 8px;
}

.daily-game-projected-total {
  color: var(--muted-strong);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.daily-game-time,
.daily-game-pass span,
.daily-game-bet span,
.daily-game-bet small {
  color: var(--muted);
  font-size: 10px;
}

.daily-game-bets {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  background: var(--surface);
  padding: 10px 12px;
}

.daily-game-pass {
  display: grid;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: color-mix(in srgb, var(--background) 55%, var(--surface));
  padding: 9px 11px;
}

.daily-game-bet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
  padding: 7px 9px;
}

.daily-game-bet.won {
  border-left-color: var(--positive);
}

.daily-game-bet.lost {
  border-left-color: var(--danger);
}

.daily-game-bet > div:first-child,
.daily-game-bet-result {
  display: grid;
  gap: 2px;
}

.daily-game-bet-result {
  justify-items: end;
}

.yesterday-bet {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  border: 1px solid var(--border);
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  padding: 8px 11px;
}

.yesterday-bet.won {
  border-left-color: var(--positive);
}

.yesterday-bet.lost {
  border-left-color: var(--danger);
}

.yesterday-game,
.yesterday-pick,
.yesterday-outcome {
  min-width: 0;
}

.yesterday-game,
.yesterday-pick {
  display: grid;
  gap: 3px;
}

.yesterday-game > span,
.yesterday-pick > span,
.yesterday-pick small,
.yesterday-outcome small {
  color: var(--muted);
  font-size: 10px;
}

.yesterday-pick strong {
  font-size: 13px;
}

.yesterday-outcome {
  display: grid;
  min-width: 85px;
  justify-items: end;
  gap: 4px;
}

.result-status.won {
  background: var(--accent-soft);
  color: var(--positive);
}

.result-status.lost {
  background: var(--danger-soft);
  color: var(--danger);
}

.result-status.pending,
.result-status.push {
  background: #e8edf2;
  color: #475569;
}

.positive {
  color: var(--positive) !important;
}

.negative {
  color: var(--danger) !important;
}

.inference-board .inference-summary {
  margin-top: 14px;
}

.inference-quality {
  display: block;
  padding: 0;
}

.inference-quality > summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
}

.inference-quality > summary::-webkit-details-marker {
  display: none;
}

.inference-quality > summary > span:last-child {
  margin-left: auto;
  font-size: 10px;
  font-weight: 750;
}

.inference-quality > summary::after {
  content: "▾";
  font-size: 10px;
}

.inference-quality[open] > summary::after {
  content: "▴";
}

.inference-quality > div {
  border-top: 1px solid currentColor;
  padding: 10px 12px;
}

.inference-quality ul,
.inference-quality p {
  margin: 0 0 8px;
  padding-left: 18px;
}

.inference-quality a {
  margin-left: 0;
}

.projection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

.projection-filters,
.projection-sort {
  display: flex;
  align-items: center;
  gap: 4px;
}

.projection-filters a,
.projection-sort a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.projection-filters a:hover,
.projection-sort a:hover,
.projection-filters a:focus-visible,
.projection-sort a:focus-visible {
  border-color: var(--border);
  background: #f8fafc;
}

.projection-filters a.active,
.projection-sort a.active {
  border-color: #b7d8ca;
  background: var(--accent-soft);
  color: var(--accent);
}

.projection-filters a span {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: rgb(15 23 42 / 7%);
  font-size: 9px;
}

.history-date-navigation {
  display: grid;
  grid-template-columns: auto minmax(340px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.history-date-panel {
  padding-block: 16px;
}

.history-date-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.history-date-range {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.history-date-overview,
.history-date-latest,
.history-date-step {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  padding: 7px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.history-date-overview:hover,
.history-date-latest:hover,
.history-date-step:not(.disabled):hover,
.history-date-overview:focus-visible,
.history-date-latest:focus-visible,
.history-date-step:not(.disabled):focus-visible {
  border-color: #b7d8ca;
  background: #f8fafc;
  color: var(--accent);
}

.history-date-overview.active,
.history-date-latest.active {
  border-color: #b7d8ca;
  background: var(--accent-soft);
  color: var(--accent);
}

.history-date-stepper {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.history-date-stepper strong,
.history-date-selection {
  overflow: hidden;
  color: var(--foreground);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-date-selection {
  align-self: center;
}

.history-date-step.disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.history-date-picker {
  display: grid;
  gap: 4px;
}

.history-date-picker label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.history-date-picker > div {
  display: flex;
  align-items: stretch;
}

.history-date-picker input,
.history-date-picker button {
  min-height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.history-date-picker input {
  width: 132px;
  border-radius: 7px 0 0 7px;
  padding: 6px 8px;
  font-variant-numeric: tabular-nums;
}

.history-date-picker button {
  border-left: 0;
  border-radius: 0 7px 7px 0;
  cursor: pointer;
  padding: 6px 9px;
}

.history-date-picker button:hover,
.history-date-picker button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

.history-date-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 920px) {
  .history-date-navigation {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .history-date-picker {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .history-date-picker input {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .history-date-header {
    display: block;
  }

  .history-date-range {
    margin-top: 7px;
  }

  .history-date-navigation {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .history-date-overview,
  .history-date-latest {
    min-height: 40px;
  }

  .history-date-overview {
    grid-column: 1;
    grid-row: 1;
  }

  .history-date-latest {
    grid-column: 2;
    grid-row: 1;
  }

  .history-date-selection {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-block: 4px;
  }

  .history-date-stepper {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: 1fr 1fr;
  }

  .history-date-stepper strong {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-block: 4px;
  }

  .history-date-stepper .history-date-step {
    min-height: 40px;
  }

  .history-date-picker {
    grid-row: 3;
  }
}

.model-history-chart__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 14px;
}

.model-history-chart__controls fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.model-history-chart__controls legend {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-history-chart .projection-filters button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  padding: 6px 9px;
}

.model-history-chart .projection-filters button.active {
  border-color: #b7d8ca;
  background: var(--accent-soft);
  color: var(--accent);
}

.model-history-chart__frame {
  display: grid;
  min-height: 360px;
  margin-top: 16px;
  place-items: center;
}

.model-history-chart__visual {
  width: 100%;
  min-width: 0;
}

.model-history-chart__plot {
  width: 100%;
  height: 360px;
  min-width: 0;
}

.model-history-chart__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.model-history-chart__legend li {
  display: grid;
  grid-template-columns: 8px auto;
  align-items: center;
  gap: 1px 6px;
  max-width: 220px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 5px 9px;
}

.model-history-chart__legend li > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  grid-row: 1 / 3;
}

.model-history-chart__legend strong,
.model-history-chart__legend small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-history-chart__legend strong {
  font-size: 11px;
}

.model-history-chart__legend small {
  color: var(--muted);
  font-size: 9px;
}

.model-history-chart__legend small.producing,
.model-series-status.producing {
  color: var(--positive);
}

.model-series-status {
  margin-left: 0.5ch;
  color: var(--muted);
  font-size: inherit;
}

.model-history-chart__tooltip {
  max-width: min(420px, calc(100vw - 48px));
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgb(23 32 42 / 14%);
  padding: 10px 12px;
}

.model-history-chart__tooltip > div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.model-history-chart__tooltip > div > span:first-child {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.projection-sort > span {
  margin-right: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.projection-game-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.projection-game-disclosure {
  overflow: hidden;
  border: 1px solid var(--border);
  border-left: 4px solid #94a3b8;
  border-radius: 9px;
  background: var(--surface);
}

.projection-game-disclosure.bet {
  border-left-color: var(--positive);
}

.projection-game-disclosure.watch {
  border-left-color: var(--warning);
}

.projection-game-disclosure.information {
  border-left-color: #3b82f6;
}

.projection-game-disclosure > summary {
  display: grid;
  /* status · model table · best edge · marker. The table column is the one
     that grows: it carries the comparison the row exists for. */
  grid-template-columns: 150px minmax(0, 1fr) 150px 12px;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
}

.projection-game-disclosure > summary::-webkit-details-marker {
  display: none;
}

.projection-game-disclosure > summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 11px;
}

.projection-game-disclosure[open] > summary::after {
  content: "▴";
}

.projection-game-disclosure > summary:hover {
  background: #f8fafc;
}

.projection-game-disclosure > summary:focus-visible {
  outline: 3px solid rgb(37 99 235 / 25%);
  outline-offset: -3px;
}

.projection-game-matchup,
.projection-game-lean,
.projection-game-edge,
.projection-game-status {
  min-width: 0;
}

.projection-game-matchup h3,
.projection-game-matchup p {
  margin: 0;
}

.projection-game-matchup h3 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}

.projection-game-matchup h3 > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.projection-game-matchup h3 small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.projection-game-matchup .mlb-team-logo {
  width: 25px;
  height: 25px;
}

.projection-game-matchup p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.projection-game-lean,
.projection-game-edge,
.projection-game-status {
  display: grid;
  gap: 3px;
}

.projection-game-lean > span,
.projection-game-edge > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.projection-game-lean strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projection-game-lean small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projection-game-edge strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.projection-game-status {
  grid-template-columns: repeat(2, max-content);
  justify-content: end;
  align-items: center;
}

.projection-game-status time {
  grid-column: 1 / -1;
  justify-self: end;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.game-decision-summary.no-bet {
  background: #e7ece8;
  color: #47564c;
}

.game-decision-summary.watch {
  background: var(--warning-soft);
  color: var(--warning);
}

.game-decision-summary.information {
  background: #e8f1ff;
  color: #245b9c;
}

.projection-game-body {
  border-top: 1px solid var(--border);
  background: #f8faf8;
  padding: 12px;
}

.projection-decision-callout {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-left: 3px solid #94a3b8;
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
  font-size: 11px;
}

.projection-decision-callout.bet {
  border-left-color: var(--positive);
}

.projection-decision-callout.watch {
  border-left-color: var(--warning);
}

.projection-decision-callout.information {
  border-left-color: #3b82f6;
}

.projection-decision-callout > strong {
  font-size: 12px;
}

.projection-decision-callout > span,
.projection-decision-callout > small {
  color: var(--muted);
}

.projection-market-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.projection-market-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(460px, 2fr) minmax(
      210px,
      1fr
    );
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.projection-market-row.actionable {
  border-color: #a9d5c2;
  background: #fbfffd;
}

.projection-market-pick {
  display: grid;
  gap: 3px;
}

.projection-market-pick > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.projection-market-pick strong {
  font-size: 14px;
}

.projection-market-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.projection-market-metrics dt {
  color: var(--muted);
  font-size: 9px;
}

.projection-market-metrics dd {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.projection-market-verdict {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 3px 7px;
}

.projection-market-verdict strong {
  font-size: 10px;
}

.projection-market-verdict > span:last-child {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.projection-market-math {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.projection-market-math summary {
  width: max-content;
  cursor: pointer;
  font-weight: 700;
}

.projection-market-math p {
  margin: 5px 0 0;
}

.projection-support-grid {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.projection-support-grid > .projection-lineups,
.projection-support-grid > .market-prices-disclosure,
.projection-support-grid > .pitch-mix-panel,
.projection-support-grid > .research-model {
  margin: 0;
}

.projection-support-disclosure,
.market-movement-disclosure {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
}

.projection-support-disclosure > summary,
.market-movement-disclosure > summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
}

.projection-support-disclosure > summary::-webkit-details-marker,
.market-movement-disclosure > summary::-webkit-details-marker {
  display: none;
}

.projection-support-disclosure > summary > strong,
.market-movement-disclosure > summary > strong {
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.projection-support-disclosure > summary > span,
.market-movement-disclosure > summary > span {
  color: var(--muted);
  font-size: 10px;
}

.projection-support-disclosure > summary::after,
.market-movement-disclosure > summary::after {
  content: "▾";
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}

.projection-support-disclosure[open] > summary::after,
.market-movement-disclosure[open] > summary::after {
  content: "▴";
}

.pitch-mix-panel {
  padding: 0;
}

.pitch-mix-panel > summary {
  margin-bottom: 0;
}

.pitch-mix-panel .pitch-mix-grid {
  border-top: 1px solid var(--border);
  padding: 9px;
}

.research-model-body {
  border-top: 1px solid var(--border);
  padding: 10px;
}

.research-model-body > p {
  max-width: 105ch;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.research-model-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.research-model-metrics div {
  border-left: 2px solid var(--border);
  padding-left: 8px;
}

.research-model-metrics dt {
  color: var(--muted);
  font-size: 9px;
}

.research-model-metrics dd {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 750;
  text-align: left;
}

.moneyline-arms-body > p {
  max-width: 105ch;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.moneyline-arms-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.moneyline-arms-metrics div {
  border-left: 2px solid var(--border);
  padding-left: 8px;
}

.moneyline-arms-metrics dt {
  color: var(--muted);
  font-size: 9px;
}

.moneyline-arms-metrics dd {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

/* An unavailable arm keeps its column and its width, so the panel reads as
   "this one did not run" rather than as a two-arm panel. */
.moneyline-arms-unavailable {
  color: var(--muted);
  cursor: help;
}

.moneyline-arms-reason {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.research-model-unavailable {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.projection-price-reference {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 10px;
}

.projection-price-reference strong {
  color: var(--foreground);
}

/* The ladder is line-major: one row per line, sources as columns, so the same
   line at two books sits side by side instead of in two separate blocks. */
.market-prices-strip .totals-ladder,
.market-prices-strip .moneyline-quotes {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.75rem;
}

.market-prices-strip .totals-ladder th,
.market-prices-strip .totals-ladder td,
.market-prices-strip .moneyline-quotes th,
.market-prices-strip .moneyline-quotes td {
  text-align: right;
  padding: 0.2rem 0.6rem 0.2rem 0;
  white-space: nowrap;
}

.market-prices-strip .totals-ladder thead th,
.market-prices-strip .moneyline-quotes thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.1));
}

.market-prices-strip .totals-ladder thead th small {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  opacity: 0.75;
}

.market-prices-strip .totals-ladder th[scope="row"],
.market-prices-strip .moneyline-quotes th[scope="row"],
.market-prices-strip .totals-ladder thead th:first-child,
.market-prices-strip .moneyline-quotes thead th:first-child {
  text-align: left;
  font-weight: 700;
}

/* The under price is the same fact as the over on a two-way market, so it
   trails its own line quietly rather than claiming a second column. */
.market-prices-strip .totals-ladder .ladder-quote small {
  margin-left: 0.35rem;
  opacity: 0.55;
}

/* Outside validated probability support: still shown for price context, but
   it takes no stake and ranks nothing. */
.market-prices-strip .totals-ladder tr.unsupported {
  opacity: 0.45;
}

.market-prices-strip .totals-ladder tr.staked {
  background: var(--positive-surface, rgba(26, 127, 55, 0.08));
}

/* Rank sits in the column it ranks. Three marks replace a rank sentence under
   every rung. */
.market-prices-strip .totals-ladder mark {
  background: none;
  color: var(--positive, #1a7f37);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: 0.3rem;
}

/* Freshness belongs to the source, so it is stated once per source above the
   tables rather than on every rung. */
.market-prices-strip .source-freshness {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
  font-size: 0.8rem;
}

.market-prices-strip .source-freshness li {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.market-prices-strip .source-freshness span {
  color: var(--muted);
}

.totals-ladder-explainer {
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--positive) 5%, transparent);
  padding: 7px 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.market-prices-strip .venue-freshness {
  display: grid;
  gap: 2px;
  white-space: normal;
}

.market-prices-strip .venue-freshness > strong {
  color: var(--foreground);
  font-size: 10px;
}

.market-prices-strip .venue-freshness > span:not(.venue-flag) {
  font-size: 9px;
}

.market-prices-strip .venue-flag {
  width: max-content;
  margin-left: 0;
}

.market-movement-disclosure {
  margin: 8px;
}

.market-movement-disclosure .moneyline-history-chart,
.market-movement-disclosure .moneyline-history-list {
  border-top: 1px solid var(--border);
}

@media (max-width: 1040px) {
  .projection-game-disclosure > summary {
    grid-template-columns: minmax(280px, 1.5fr) minmax(190px, 1fr) 90px 155px 10px;
    gap: 10px;
  }

  .projection-game-status {
    grid-template-columns: max-content;
  }

  .projection-game-status time {
    grid-column: auto;
  }

  .projection-market-row {
    grid-template-columns: minmax(160px, 0.7fr) minmax(380px, 2fr);
  }

  .projection-market-verdict {
    grid-column: 1 / -1;
  }
}

@media (max-width: 800px) {
  .today-section-header,
  .projection-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .upcoming-headline {
    min-width: 0;
  }

  .yesterday-bet {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .daily-game-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .daily-game-matchup {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .daily-game-bets {
    grid-column: auto;
  }

  .yesterday-pick {
    grid-column: 1;
  }

  .yesterday-outcome {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .projection-filters,
  .projection-sort {
    flex-wrap: wrap;
  }

  .projection-game-disclosure > summary {
    grid-template-columns: minmax(0, 1.5fr) minmax(160px, 1fr) 80px 12px;
  }

  .projection-game-status {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
  }

  .projection-game-status time {
    grid-column: auto;
    justify-self: start;
  }

  .projection-game-disclosure > summary::after {
    grid-column: 4;
    grid-row: 1;
  }

  .projection-market-row {
    grid-template-columns: 1fr;
  }

  .projection-market-verdict,
  .projection-market-math {
    grid-column: auto;
  }

  .projection-decision-callout {
    grid-template-columns: auto 1fr;
  }

  .projection-decision-callout small {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1050px) {
  .daily-game-row.has-projection {
    grid-template-columns: minmax(0, 1fr);
  }

  .daily-game-row.has-projection .daily-game-matchup {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 560px) {
  .yesterday-board,
  .projection-board {
    border-radius: 9px;
    padding: 14px 11px;
  }

  .daily-game-scoreboard {
    min-width: 0;
  }

  .daily-game-scoreboard-model {
    width: 42px;
  }

  .daily-game-scoreboard-market {
    width: 39px;
  }

  .daily-game-scoreboard-score {
    width: 31px;
  }

  .daily-game-scoreboard th,
  .daily-game-scoreboard td {
    padding-right: 2px;
    padding-left: 2px;
  }

  .daily-game-scoreboard thead th {
    font-size: 7px;
    letter-spacing: 0.02em;
  }

  .daily-game-scoreboard-team-cell {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px;
  }

  .daily-game-scoreboard .mlb-team-logo {
    width: 24px;
    height: 24px;
  }

  .daily-game-scoreboard .team-identity-name {
    font-size: 11px;
  }

  .daily-game-scoreboard .team-identity-copy small {
    font-size: 8px;
  }

  .daily-game-scoreboard tbody td:not(.daily-game-team-score) {
    font-size: 10px;
  }

  .daily-game-scoreboard .daily-game-team-score {
    font-size: 16px;
  }

  .daily-game-market-price small {
    font-size: 7px;
  }

  .yesterday-summary,
  .inference-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yesterday-summary > div:nth-child(n + 3),
  .inference-summary > div:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .inference-summary > div:last-child {
    grid-column: 1 / -1;
  }

  .yesterday-bet {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .projection-filters a,
  .projection-sort a {
    min-height: 40px;
  }

  .projection-game-disclosure > summary {
    grid-template-columns: minmax(0, 1fr) 66px 10px;
    gap: 8px;
    min-height: 96px;
  }

  .projection-game-matchup h3 {
    align-items: flex-start;
    flex-direction: column;
  }

  .projection-game-matchup h3 small {
    display: none;
  }

  .projection-game-lean {
    grid-column: 1;
    grid-row: 2;
  }

  .projection-game-edge {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .projection-game-status {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: repeat(2, max-content);
  }

  .projection-game-disclosure > summary::after {
    grid-column: 3;
  }

  .projection-game-body {
    padding: 8px;
  }

  .projection-decision-callout {
    grid-template-columns: 1fr;
  }

  .projection-market-metrics,
  .research-model-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pitch-mix-grid {
    grid-template-columns: 1fr;
  }

  .market-prices-strip table {
    min-width: 680px;
  }
}

/* ---- Model inputs: lineage and feature health -------------------------- */

.data-lineage-panel {
  padding: 0;
  overflow: hidden;
}

.data-lineage-panel > .panel-header {
  padding: 18px 18px 0;
}

.data-lineage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-block: 1px solid var(--border);
  background: #f8fafc;
}

.data-lineage-summary > div {
  padding: 12px 16px;
  border-right: 1px solid var(--border);
}

.data-lineage-summary > div:last-child {
  border-right: 0;
}

.data-lineage-summary dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-lineage-summary dd {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.data-lineage-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  border: 0;
  padding: 14px 18px 0;
}

.data-lineage-toolbar button {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.data-lineage-toolbar button:hover,
.data-lineage-toolbar button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.data-lineage-toolbar button:focus-visible {
  outline: 3px solid rgb(15 118 110 / 22%);
  outline-offset: 2px;
}

.data-lineage-contract-note {
  margin: 10px 18px 0;
  color: var(--muted);
  font-size: 12px;
}

.data-lineage-paths {
  display: grid;
  gap: 12px;
  padding: 14px 18px 18px;
}

.data-lineage-path {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.data-lineage-path__header {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  background: #fbfcfa;
}

.data-lineage-path__header h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.data-lineage-path__header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.data-lineage-scope {
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-lineage-scope--training {
  color: var(--info);
}

.data-lineage-scope--both {
  color: #6d4db3;
}

.data-lineage-scope--settlement {
  color: var(--warning);
}

.source-coverage__scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.callout.source-coverage__warning {
  border-color: #d97706;
  border-left-color: #b45309;
  background: #fff7d6;
  color: #78350f;
}

.source-coverage__warning p {
  margin: 0;
}

.source-coverage__warning ul {
  margin-top: 6px;
}

.source-coverage__table {
  min-width: 1260px;
}

.source-coverage__table th,
.source-coverage__table td {
  padding: 8px 6px;
  text-align: center;
  vertical-align: middle;
}

.source-coverage__table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 245px;
  background: var(--surface);
  text-align: left;
}

.source-coverage__table th:first-child strong,
.source-coverage__table th:first-child span,
.source-coverage__table th:first-child small {
  display: block;
}

.source-coverage__table th:first-child strong {
  color: var(--foreground);
  font-size: 12px;
  text-transform: none;
}

.source-coverage__table th:first-child .source-coverage__missing-badge {
  display: inline-block;
  width: fit-content;
  margin-top: 5px;
  border: 1px solid #d97706;
  border-radius: 999px;
  background: #fff0b3;
  padding: 1px 6px;
  color: #92400e;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.4;
  text-transform: uppercase;
}

.source-coverage__table th:first-child span,
.source-coverage__table th:first-child small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
  white-space: normal;
}

.source-coverage__cell {
  width: 38px;
  font-size: 12px;
  font-weight: 900;
}

.source-coverage__cell--covered {
  background: var(--accent-soft);
  color: var(--positive);
}

.source-coverage__cell--missing {
  background: #fff0b3;
  box-shadow: inset 0 0 0 1px #d97706;
  color: #92400e;
}

.source-coverage__cell--outside {
  background: #f8fafc;
  color: #c7cdd3;
}

.data-lineage-flow {
  display: grid;
  grid-template-columns:
    minmax(180px, 0.9fr) 22px minmax(190px, 1fr) 22px minmax(220px, 1.2fr)
    22px minmax(210px, 1.1fr);
  align-items: stretch;
}

.data-lineage-node {
  min-width: 0;
  padding: 13px;
}

.data-lineage-node__label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.data-lineage-arrow {
  display: grid;
  place-items: center;
  border-inline: 1px solid var(--border);
  background: #f8fafc;
  color: var(--accent);
  font-size: 17px;
  font-weight: 800;
}

.data-lineage-source-list,
.data-lineage-job-list,
.data-lineage-consumers,
.data-lineage-step-list,
.data-lineage-artifacts ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.data-lineage-source-list,
.data-lineage-job-list {
  display: grid;
  gap: 10px;
}

.data-lineage-source-list strong,
.data-lineage-source-list span,
.data-lineage-job-list strong,
.data-lineage-job-list span,
.data-lineage-job-list code {
  display: block;
}

.data-lineage-source-list strong,
.data-lineage-job-list strong {
  font-size: 12px;
}

.data-lineage-source-list span,
.data-lineage-job-list span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.data-lineage-job-list code {
  margin-top: 3px;
  color: var(--foreground);
  font-size: 9px;
}

.data-lineage-step-list {
  counter-reset: lineage-step;
}

.data-lineage-step-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 5px;
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.35;
  counter-increment: lineage-step;
}

.data-lineage-step-list li:first-child {
  margin-top: 0;
}

.data-lineage-step-list li::before {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  content: counter(lineage-step);
  font-size: 9px;
  font-weight: 900;
}

.data-lineage-artifacts,
.data-lineage-families {
  margin-top: 11px;
}

.data-lineage-artifacts summary,
.data-lineage-families summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.data-lineage-artifacts ul {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.data-lineage-artifacts code {
  font-size: 9px;
}

.data-lineage-consumers {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.data-lineage-consumers li {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 800;
}

.data-lineage-family-scroll {
  margin-top: 7px;
  overflow-x: auto;
}

.data-lineage-family-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

.data-lineage-family-scroll th,
.data-lineage-family-scroll td {
  border-bottom: 1px solid var(--border);
  padding: 5px 4px;
  text-align: left;
  vertical-align: top;
}

.data-lineage-family-scroll th {
  font-weight: 800;
}

.data-lineage-family-scroll code {
  font-size: 8px;
}

.data-lineage-no-families {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 1050px) {
  .data-lineage-flow {
    grid-template-columns: 1fr;
  }

  .data-lineage-arrow {
    height: 22px;
    border-block: 1px solid var(--border);
    border-inline: 0;
    transform: rotate(90deg);
  }
}

@media (max-width: 640px) {
  .data-lineage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-lineage-summary > div:nth-child(2) {
    border-right: 0;
  }

  .data-lineage-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .data-lineage-path__header {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .data-lineage-paths {
    padding-inline: 12px;
  }

  .data-lineage-contract-note,
  .data-lineage-toolbar {
    margin-inline: 12px;
    padding-inline: 0;
  }
}

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

.callout {
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-soft);
  padding: 10px 12px;
  font-size: 14px;
}

.callout--warn {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.reference-badge {
  width: fit-content;
  border-radius: 999px;
  background: var(--info-soft);
  color: var(--info);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.secondary-analysis {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 18px;
}

.message-history-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.message-history-filter input,
.message-history-filter button {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--foreground);
  background: var(--surface);
  font: inherit;
}

.message-history-filter button {
  cursor: pointer;
  font-weight: 700;
}

.message-history-entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.message-history-entry:last-child {
  border-bottom: 0;
}

.message-history-entry h3 {
  margin-top: 0;
}

.secondary-analysis > summary {
  cursor: pointer;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 800;
}

.secondary-analysis__body {
  border-top: 1px solid var(--border);
  padding: 14px 16px 16px;
}

.secondary-analysis__body > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.secondary-analysis .projection-summary {
  max-width: 620px;
}

.secondary-analysis .projection-summary dt {
  color: var(--muted);
  font-size: 11px;
}

.secondary-analysis .projection-summary dd {
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: 800;
}

.feature-importance-list.stale {
  opacity: 0.68;
}

.feature-health__scroll {
  overflow-x: auto;
}

.feature-health__table {
  border-collapse: collapse;
  font-size: 13px;
}

.feature-health__table th,
.feature-health__table td {
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  white-space: nowrap;
  vertical-align: bottom;
}

/* The game name is the one cell that must not wrap. */
.feature-health__table tbody th {
  white-space: nowrap;
  position: sticky;
  left: 0;
  background: var(--surface);
}

.feature-health__family {
  font-weight: 500;
  font-size: 12px;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: bottom;
  /* Wrap to two or three short lines instead of one long one: the glyph
     column underneath is ~20px, so a nowrap header sets the column width and
     only a handful fit on screen. */
  white-space: normal;
  overflow-wrap: break-word;
  width: 4.5rem;
  min-width: 4.5rem;
  padding-left: 4px;
  padding-right: 4px;
  line-height: 1.2;
}

.feature-health__share {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.feature-health__share--fault {
  color: var(--danger);
  font-weight: 600;
}

.feature-health__share--partial {
  color: var(--warning);
  font-weight: 600;
}

.feature-health__cell {
  text-align: center;
  font-size: 15px;
  line-height: 1;
}

.feature-health__cell--live {
  color: var(--accent);
}

.feature-health__cell--expected-default {
  color: var(--warning);
}

.feature-health__cell--partial {
  color: var(--warning);
  font-weight: 700;
}

.feature-health__cell--fault {
  color: var(--danger);
  font-weight: 700;
}

.feature-health__cell--missing {
  color: var(--muted);
}

/* Deliberately the faintest state: it is an absence of information, and must
   never be mistaken for a healthy one. */
.feature-health__cell--not-instrumented {
  color: var(--border);
}

.feature-health__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

.feature-health__legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.feature-health__table th {
  text-transform: none;
  letter-spacing: 0;
}

.feature-health__untracked {
  margin-top: 16px;
  font-size: 13px;
}

.feature-health__untracked summary {
  cursor: pointer;
  color: var(--muted);
}

.feature-health__untracked ul {
  columns: 2;
  margin: 8px 0 0;
  padding-left: 18px;
}

.feature-health-history .feature-health__table th,
.feature-health-history .feature-health__table td {
  min-width: 4.25rem;
  text-align: center;
}

.feature-health-history .feature-health__table tbody th {
  min-width: 11rem;
  text-align: left;
}

.raw-features {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.raw-features__game {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.raw-features__game > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.raw-features__missing {
  color: var(--warning);
  font-size: 12px;
  font-weight: 800;
}

.raw-features__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.raw-features__table th,
.raw-features__table td {
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.raw-features__table tbody th {
  min-width: 18rem;
}

.raw-features__table tbody th span,
.raw-features__table tbody th code {
  display: block;
}

.raw-features__table tbody th code {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.raw-features__value {
  min-width: 7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  white-space: nowrap;
}

.raw-features__value--missing {
  color: var(--warning);
}

.callout ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.callout li {
  margin-top: 2px;
}

.excluded-families {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.excluded-families li {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

.excluded-families__name {
  font-weight: 750;
  overflow-wrap: anywhere;
}

.excluded-families li .muted {
  font-size: 11px;
  line-height: 1.45;
}

/* The collapsed row is a table: time and status first, then every model's
   view of the game, then the edge that actually decides. */
.projection-game-models {
  min-width: 0;
}

.game-model-table-wrap {
  overflow-x: auto;
}

.game-model-table {
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.game-model-table th,
.game-model-table td {
  padding: 0.15rem 0.5rem 0.15rem 0;
  text-align: right;
  font-weight: 400;
}

.game-model-table thead th {
  font-size: 0.72rem;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.6;
  white-space: normal;
}

.game-model-table th[scope="row"] {
  text-align: left;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.game-model-table em {
  font-style: normal;
  opacity: 0.5;
}

.game-model-table small {
  opacity: 0.65;
}

.projection-game-pitchers {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  opacity: 0.7;
}

.projection-market-advisory {
  font-style: normal;
  opacity: 0.7;
  text-transform: uppercase;
  font-size: 0.72em;
  letter-spacing: 0.04em;
}

.moneyline-arm-performance {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.moneyline-arm-performance th,
.moneyline-arm-performance td {
  text-align: left;
  padding: 0.4rem 0.75rem 0.4rem 0;
}

.totals-scorecard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.totals-scorecard-metrics > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
}

.totals-scorecard-metrics span,
.helper-text {
  color: var(--muted);
  font-size: 0.78rem;
}

.totals-scorecard-metrics strong {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

/* The team column anchors the table; only the numbers are right-aligned so
   they line up down each model's column. */
.game-model-table th[scope="col"]:first-child {
  text-align: left;
}

/* Tight against the first number: the eye should travel from club to
   projection without crossing a gap wide enough to lose the row. */
.game-model-table th[scope="row"] {
  padding-right: 0.35rem;
  gap: 0.35rem;
  align-items: start;
  line-height: 1.15;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.game-model-table th[scope="row"] > span {
  display: grid;
}

/* The starter names its own club rather than floating under the matchup. */
.game-model-table th[scope="row"] small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.game-model-table td,
.game-model-table thead th:not(:first-child) {
  padding-left: 0.35rem;
}

/* The table must fit, not scroll: a scrollbar inside a row that is itself in
   a scrolling list hides the market column instead of revealing it.

   Fixed layout is what makes this a table rather than fifteen tables: content
   sizing let each card pick its own column widths, so "tabular" landed at a
   different x on every row and the eye could not travel down a column. */
.game-model-table {
  width: 100%;
  table-layout: fixed;
}

.game-model-col-team {
  width: auto;
}

.game-model-col-arm {
  width: 9.5%;
}

.game-model-col-price {
  width: 13%;
}

.game-model-col-runs {
  width: 7%;
}

.game-model-col-lean {
  width: 9%;
}

/* Runs, not probabilities: the total block spans both rows, so it is centred
   against the pair rather than sitting on one club's line. */
.game-model-table td[rowspan] {
  vertical-align: middle;
}

/* The one number that says whether we disagree with the market on runs. */
.game-model-table .game-model-lean {
  font-weight: 700;
}

.game-model-table td.game-model-lean small,
.game-model-table td.game-model-total small {
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Moneyline and total are two different questions about the same game. The
   group header says so once, instead of prefixing every column label. */
.game-model-group-row th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  opacity: 0.45;
  text-align: left;
  padding-bottom: 0.1rem;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}

.game-model-table .game-model-total {
  border-left: 1px solid var(--border, rgba(0, 0, 0, 0.1));
  padding-left: 0.7rem;
}

/* Smallest the status column can be: the two pills stack rather than sitting
   side by side, so the width is set by the timestamp alone. */
.projection-game-status {
  justify-items: start;
  gap: 4px;
}

.projection-game-status .status-pill,
.projection-game-status .game-decision-summary {
  white-space: nowrap;
}

/* The market is reference, not a fourth projection. Raw implied sums above
   100% across the two sides, so four cells in identical styling would invite
   an arithmetic that does not hold. A rule and a lighter weight say that
   structurally instead of relying on the reader to remember it. */
.game-model-table .game-model-market {
  border-left: 1px solid var(--border, rgba(0, 0, 0, 0.1));
  padding-left: 0.7rem;
  color: var(--muted);
  font-weight: 500;
}

.game-model-table td.game-model-market small {
  opacity: 0.8;
}

/* The projections carry the weight, since comparing them is the job. */
.game-model-table tbody td:not(.game-model-market) {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

/* Full Kelly under the probability. Present on exactly one side per model,
   so its position already says which side that model backs. */
.game-model-table tbody td small {
  display: block;
  color: var(--positive, #1a7f37);
  font-size: 10px;
  font-weight: 600;
}

/* Fixed rather than max-content: every game is its own grid, so a content-
   sized column let one card's wider pill squeeze that card's table while the
   rest rendered fine -- and left the columns unaligned between cards, which
   is the opposite of a table you can scan down. */
.projection-game-status {
  justify-self: start;
}

.projection-game-status .status-pill,
.projection-game-status .game-decision-summary {
  max-width: 100%;
}

/* Two markets, always both: the moneyline blend and the best totals rung.
   Naming each market keeps the column comparable down the list. */
.projection-game-edge > div {
  display: grid;
  gap: 1px;
  margin-bottom: 0.4rem;
}

.projection-game-edge > div > span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

.projection-game-edge > div > strong {
  font-size: 1.25rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* Closing-line value as it accrues: where the price on our side opened, where
   it is now, and which way that cuts. */
.projection-game-edge .moneyline-drift {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.projection-game-edge small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

/* Game notebooks join daily decisions to their retained evidence. */
/* Dense notebook layout; keep dashboard and global table spacing independent. */
.notebook-shell { padding-top: 16px; }
.notebook-shell .page-header { gap: 12px; margin-bottom: 12px; }
.notebook-shell h1 { font-size: 26px; }
.notebook-shell .eyebrow { margin-bottom: 5px; font-size: 11px; }
.notebook-nav { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 12px; border-bottom: 1px solid var(--border); }
.notebook-nav a, .notebook-link { font-weight: 650; color: var(--accent); }
.notebook-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 0; font-size: 13px; text-underline-offset: 4px; }
.notebook-section { min-width: 0; scroll-margin-top: 12px; margin: 0 0 12px; padding: 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 14px; }
.notebook-section .section-kicker { margin: 0 0 3px; font-size: 10px; }
.notebook-section h2 { margin: 0 0 10px; font-size: 17px; }
.notebook-section h3 { margin: 8px 0 5px; font-size: 14px; }
.notebook-section p { max-width: 100ch; margin: 6px 0; line-height: 1.4; }
.notebook-section details { margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--border); }
.notebook-section summary { cursor: pointer; font-weight: 650; min-height: 32px; padding: 5px 0; }
.notebook-section .table-wrap { margin: 8px 0; }
.notebook-section th, .notebook-section td { padding: 6px 8px; font-size: 13px; line-height: 1.35; }
.notebook-section td { font-variant-numeric: tabular-nums; }
.notebook-section th small { display: block; max-width: 55ch; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.notebook-checkpoints, .notebook-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.notebook-checkpoint { min-width: 0; padding: 0; }
.notebook-checkpoint + .notebook-checkpoint { border-left: 1px solid var(--border); padding-left: 12px; }
.notebook-inputs { margin: 8px 0; }
.notebook-inputs > div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--border); padding: 4px 0; }
.notebook-inputs dd { margin: 0; font-variant-numeric: tabular-nums; }
.notebook-current, .notebook-prompt { background: var(--accent-soft); border-radius: 4px; padding: 8px 10px; }
@media (min-width: 1100px) {
  .notebook-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; align-items: start; }
  .notebook-shell > * { grid-column: 1 / -1; }
  .notebook-shell > #forecast { grid-column: 1; }
  .notebook-shell > #why { grid-column: 2; }
}
.game-decision-summary { margin-bottom: 1rem; border-left: 3px solid var(--border); padding: .35rem .8rem; }
.game-decision-summary > strong { font-size: 1.1rem; }
.game-decision-summary p { margin: .3rem 0; line-height: 1.5; }
.game-decision-summary small { color: var(--muted); }
.decision-bet { border-color: var(--accent); }
.decision-information, .decision-watch { border-color: var(--warning); }
.decision-attention { color: var(--warning); }
.notebook-link { padding: .45rem 0; }
@media (max-width: 640px) { .notebook-checkpoints, .notebook-inputs { grid-template-columns: 1fr; } .notebook-section { overflow-wrap: anywhere; } }
.daily-learning { margin: 1.5rem 0; }
.daily-learning > p { color: var(--muted); }
.daily-learning-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.daily-learning-grid article { background: var(--surface); padding: 1.1rem; border: 1px solid var(--border); border-radius: 12px; }
.daily-learning-grid h3 { margin: .6rem 0; }
.daily-learning-grid a { color: var(--accent); }
.daily-learning-grid p { line-height: 1.5; }
@media (max-width: 800px) { .daily-learning-grid { grid-template-columns: 1fr; } }
.daily-game-matchup { grid-template-columns: minmax(0, 1fr); }
.game-decision-summary { min-width: 0; overflow-wrap: anywhere; }
.notebook-section table { min-width: 480px; }
.notebook-section th { white-space: normal; }
.notebook-section tbody th { text-transform: none; font-size: 13px; }
#why th:first-child { width: 55%; }

@media (max-width: 640px) {
  .notebook-shell { width: calc(100% - 20px); padding-top: 12px; }
  .notebook-section { padding: 10px; }
  .notebook-checkpoint + .notebook-checkpoint { border-left: 0; border-top: 1px solid var(--border); padding: 8px 0 0; }
  .notebook-section summary { min-height: 40px; }
  .notebook-nav a { min-height: 44px; }
}

.notebook-section .notebook-feature-help { border: 0; margin: 0; padding: 0; }
.notebook-section .notebook-feature-help summary { min-height: 0; padding: 2px 0; font-size: inherit; }
.notebook-section .notebook-feature-help small { padding-bottom: 4px; }

/* Daily slate: scan first, expand for recorded evidence. */
.daily-board-shell { padding-top: 12px; }
.daily-board-shell .page-header { margin-bottom: 8px; }
.board-header-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 0; color: var(--muted); }
.board-header-meta span { background: var(--accent-soft); color: var(--accent); padding: 3px 8px; border-radius: 4px; font-size: 12px; }
.page-actions a.telegram-link { background: transparent; color: var(--muted); border-color: var(--border); }
.page-actions a.telegram-link:hover { background: var(--accent-soft); }
.board-freshness { margin: 0; font-size: 13px; color: var(--muted); }
.slate-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px 0; font-size: 12px; }
.slate-summary b { font-variant-numeric: tabular-nums; }
.slate-input-alert { border-left: 3px solid var(--warning); padding: 5px 8px; margin: 3px 0; background: #fff8ed; font-size: 13px; line-height: 1.5; }
.paper-results-summary { margin: 8px 0; font-size: 13px; color: var(--muted); }
.paper-results-summary > summary { cursor: pointer; }
.slate-sort { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 13px; margin-top: 10px; }
.slate-sort select { padding: 6px 8px; color: var(--foreground); background: var(--surface); border: 1px solid var(--border); border-radius: 5px; font: inherit; }
.slate-game { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.slate-overview { display: grid; grid-template-columns: 82px minmax(0, 1fr) 150px 200px; gap: 12px; padding: 8px 10px; align-items: center; cursor: pointer; list-style: none; }
.slate-overview::-webkit-details-marker { display: none; }
.slate-overview:hover { background: var(--accent-soft); }
.slate-overview:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.slate-cell { display: flex; min-width: 0; flex-direction: column; gap: 3px; font-size: 12px; }
.slate-overview small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.3; }
.slate-decision { border-left: 1px solid var(--border); padding-left: 10px; }
.slate-expand { color: var(--accent); font-size: 12px; }
.slate-game[open] > summary { border-bottom: 1px solid var(--border); }
.slate-game[open] .slate-expand { text-decoration: underline; }
.slate-game .daily-game-row { border: 0; border-radius: 0 0 8px 8px; }
.slate-game .game-decision-summary { text-transform: none; border-radius: 0; letter-spacing: normal; font-size: 14px; }
.slate-game .daily-game-scoreboard th { text-transform: none; letter-spacing: normal; }
.daily-learning-grid h3 small { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
/* Matching column tracks keep both teams and every game vertically aligned. */
.slate-teams { min-width: 0; display: grid; gap: 2px; }
.slate-team-columns { display: grid; grid-template-columns: minmax(175px, 1fr) repeat(4, 51px) 32px; gap: 7px; align-items: center; }
.slate-column-headings { color: var(--muted); font-size: 10px; }
.slate-team-line { min-height: 29px; font-size: 12px; }
.slate-team-name { display: flex; align-items: center; gap: 5px; min-width: 0; }
.slate-team-name .mlb-team-logo { width: 22px; height: 22px; flex: 0 0 22px; }
.slate-team-copy { min-width: 0; }
.slate-team-copy > strong { font-size: 12px; line-height: 1.3; display: block; }
.slate-probability, .slate-score { text-align: right; font-variant-numeric: tabular-nums; }
.slate-team-line .slate-probability, .slate-team-line .slate-score { font-size: 13px; }
.slate-score { border-left: 1px solid var(--border); padding-left: 8px; }
.slate-model-note { margin-top: 3px; }
@media (min-width: 701px) and (max-width: 1100px) {
  .slate-team-columns { grid-template-columns: minmax(140px, 1fr) repeat(4, 46px) 28px; gap: 5px; }
  .slate-overview { grid-template-columns: minmax(0, 1fr) 190px; gap: 8px 14px; align-items: start; }
  .slate-game-time { grid-column: 1; grid-row: 1; flex-direction: row; align-items: baseline; gap: 10px; }
  .slate-teams { grid-column: 1; grid-row: 2 / 4; }
  .slate-totals { grid-column: 2; grid-row: 1 / 3; }
  .slate-decision { grid-column: 2; grid-row: 3; }
}
@media (max-width: 700px) {
  .slate-overview { padding: 10px; }
  .slate-team-columns { grid-template-columns: minmax(0, 1fr) repeat(4, 38px) 26px; gap: 5px; }
  .slate-team-name { gap: 5px; align-items: flex-start; flex-wrap: wrap; }
  .slate-team-name .mlb-team-logo { width: 22px; height: 22px; flex-basis: 22px; }
  .slate-team-copy { flex: 1; }
  .slate-team-copy > strong { font-size: 12px; }
  .slate-team-line { min-height: 52px; }
  .slate-team-line .slate-probability, .slate-team-line .slate-score { font-size: 12px; }
  .slate-column-headings { font-size: 10px; }
  .slate-score { padding-left: 3px; }
}

.slate-chevron { display: inline-block; transition: transform .15s; }
.slate-game[open] .slate-chevron { transform: rotate(180deg); }

.game-decision-summary { white-space: normal; font-weight: 400; text-transform: none; border-radius: 0; }
.slate-game .daily-game-row.without-bets { grid-template-columns: minmax(0, 1fr); }
.slate-game .daily-game-row.without-bets .daily-game-matchup { border-right: 0; }
.slate-game .daily-game-scoreboard th { font-size: 12px; }
.slate-game .daily-game-scoreboard td { font-size: 14px; font-variant-numeric: tabular-nums; }
@media (min-width: 800px) {
  .slate-game .daily-game-scoreboard-team { width: 40%; }
  .slate-game .daily-game-scoreboard-model,
  .slate-game .daily-game-scoreboard-market,
  .slate-game .daily-game-scoreboard-score { width: auto; }
}

.daily-board-shell h1 { font-size: 26px; }
.daily-board-shell .eyebrow { font-size: 11px; margin-bottom: 3px; }
.daily-board-shell .page-actions a { padding: 6px 9px; font-size: 12px; }
.daily-board-shell .board-header-meta { font-size: 12px; margin-top: 4px; }
.daily-board-shell .yesterday-board { padding: 10px 12px; }
.daily-board-shell .daily-game-list { gap: 5px; margin-top: 7px; }
.slate-totals { border-left: 1px solid var(--border); padding-left: 10px; }
.slate-total-numbers { display: flex; gap: 10px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .slate-overview { padding: 8px; }
  .slate-team-line .slate-probability, .slate-team-line .slate-score { font-size: 11px; }
  .slate-team-columns { gap: 4px; }
}

.slate-overview .slate-team-pitcher { display: block; margin-top: 1px; font-size: 10px; line-height: 1.2; }

.input-coverage-summary { display: grid; gap: 4px; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.input-coverage-summary strong { color: var(--foreground); }
.input-coverage-bar { display: flex; height: 4px; gap: 2px; border-radius: 2px; overflow: hidden; }
.input-coverage-bar > span { flex-basis: 0; }
.coverage-present { background: var(--accent); }
.coverage-partial { background: #60a5a0; }
.coverage-missing { background: #bb5147; }
.coverage-fallback { background: #d39b3a; }
.coverage-unknown { background: #bac2bd; }
.input-coverage-details { font-size: 12px; }
.input-coverage-details h3 { margin: 0 0 6px; font-size: 14px; }
.input-coverage-details p { color: var(--muted); line-height: 1.5; }
.input-coverage-details ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.input-coverage-details li { display: grid; gap: 4px; border: 1px solid var(--border); border-radius: 4px; padding: 8px; }
.input-coverage-details li strong { display: flex; justify-content: space-between; gap: 10px; }
.input-coverage-details li strong span { color: var(--accent); font-weight: 500; }
.input-coverage-details li small { color: var(--muted); line-height: 1.4; }

.input-coverage-details span[data-state="missing"] { color: #a73f35; }
.input-coverage-details span[data-state="fault"], .input-coverage-details span[data-state="expected-default"] { color: #8b641e; }
.input-coverage-details span[data-state="not-instrumented"] { color: var(--muted); }

.slate-moneyline { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.slate-overview .slate-moneyline small { font-size: 10px; font-weight: 400; line-height: 1.1; }
@media (max-width: 700px) { .slate-overview .slate-moneyline small { font-size: 9px; } }
.slate-team-line > .slate-probability:not(.slate-moneyline), .slate-team-line > .slate-score { padding-bottom: 12px; }
@media (max-width: 700px) {
  .slate-team-line > .slate-probability:not(.slate-moneyline), .slate-team-line > .slate-score { padding-bottom: 11px; }
}

/* Totals use the space beside the clock on phones, beside the teams on tablets. */
@media (max-width: 700px) {
  .slate-overview { grid-template-columns: minmax(0, 1fr) minmax(130px, 1fr); gap: 8px 12px; align-items: start; }
  .slate-game-time { grid-column: 1; grid-row: 1; }
  .slate-totals { grid-column: 2; grid-row: 1; padding-left: 10px; }
  .slate-teams { grid-column: 1 / -1; grid-row: 2; }
  .slate-decision { grid-column: 1 / -1; grid-row: 3; padding-left: 0; padding-top: 6px; border-left: 0; border-top: 1px solid var(--border); }
}

/* Shared desktop columns keep matchup identity bounded and comparisons aligned. */
.slate-overview, .slate-board-heading { grid-template-columns: 74px minmax(0, 1fr) 150px 180px; gap: 14px; }
.slate-board-heading { display: grid; position: sticky; top: 0; z-index: 2; align-items: end; padding: 10px; background: var(--surface); border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.slate-team-columns { grid-template-columns: minmax(150px, 200px) 34px repeat(4, minmax(56px, 1fr)); gap: 10px; }
.slate-header-matchup, .slate-header-score { grid-row: 1 / 3; align-self: end; }
.slate-header-forecasts { grid-column: 3 / -1; text-align: center; }
.slate-header-model { grid-row: 2; text-align: right; }
.slate-board-heading .slate-total-numbers { margin-top: 6px; }
.slate-column-headings, .slate-mobile-label { display: none; }
.slate-overview { min-height: 96px; }
.slate-overview:hover { background: var(--surface); }
.slate-game[open] > .slate-overview { background: #f0f1f2; }
.slate-team-copy > strong { font-size: 13px; }
.slate-team-line { min-height: 33px; }
.slate-score { border-left: 0; padding-left: 0; }
.slate-team-line .slate-score { font-size: 17px; }
.slate-team-line .slate-primary { font-size: 16px; }
.slate-team-line .slate-component { color: var(--muted); font-size: 12px; }
.slate-component strong { font-weight: 500; }
.slate-team-line .slate-moneyline { font-size: 15px; }
.slate-row-context { display: grid; grid-template-columns: minmax(150px, 244px) minmax(0, 1fr); gap: 10px; margin-top: 4px; }
.slate-forecast-time { text-align: right; }
.slate-total-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-variant-numeric: tabular-nums; }
.slate-total-numbers > span { text-align: center; }
.slate-total-numbers b { font-size: 18px; }
.slate-decision > strong { font-size: 13px; }
.slate-totals, .slate-decision { padding-left: 12px; }
@media (max-width: 1100px) {
  .slate-board-heading { display: none; }
  .slate-column-headings { display: grid; text-align: right; }
  .slate-mobile-label { display: block; }
  .slate-overview { grid-template-columns: minmax(0, 1fr) 165px; gap: 8px 14px; }
  .slate-team-columns { grid-template-columns: minmax(130px, 190px) 28px repeat(4, minmax(40px, 1fr)); gap: 7px; }
  .slate-row-context { grid-template-columns: 1fr; gap: 3px; }
  .slate-forecast-time { text-align: left; }
}
@media (max-width: 700px) {
  .slate-overview { grid-template-columns: minmax(0, 1fr) minmax(130px, 1fr); }
  .slate-team-columns { grid-template-columns: minmax(0, 1fr) 24px repeat(4, 43px); gap: 6px; }
  .slate-team-copy > strong { font-size: 12px; }
  .slate-team-line .slate-score { font-size: 14px; }
  .slate-team-line .slate-primary { font-size: 13px; }
  .slate-team-line .slate-component { font-size: 11px; }
  .slate-team-line .slate-moneyline { font-size: 12px; }
  .slate-decision { padding-left: 0; }
}

/* Forecast components and the primary/market pair are separate comparison groups. */
@media (min-width: 1101px) {
  .slate-team-columns { grid-template-columns: minmax(150px, 200px) 34px minmax(16px, 1fr) 64px 64px minmax(20px, 1fr) 78px 86px; }
  .slate-team-line > :nth-child(3) { grid-column: 4; }
  .slate-team-line > :nth-child(4) { grid-column: 5; }
  .slate-team-line > :nth-child(5) { grid-column: 7; }
  .slate-team-line > :nth-child(6) { grid-column: 8; }
  .slate-board-heading .slate-header-model:nth-child(4) { grid-column: 4; }
  .slate-board-heading .slate-header-model:nth-child(5) { grid-column: 5; }
  .slate-board-heading .slate-header-model:nth-child(6) { grid-column: 7; }
  .slate-board-heading .slate-header-model:nth-child(7) { grid-column: 8; }
  .slate-totals { margin-left: 4px; border-left: 1px solid var(--border); }
}
.slate-decision > .slate-status-quiet { font-weight: 400; color: var(--muted); }
.slate-comparison-notice { color: var(--muted); font-size: 12px; margin: 12px 0; }
.slate-comparison-notice p { margin: 6px 0; }
.slate-comparison-notice summary { cursor: pointer; }
.slate-total-difference { text-align: center; font-size: 11px; color: var(--muted); margin-top: 5px; }
.comparison-timing { color: var(--muted); font-size: 12px; }
.comparison-timing dl { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.comparison-timing dt { font-weight: 600; }
.comparison-timing dd { margin: 4px 0 0; }
.slate-column-headings { align-items: end; }
@media (min-width: 1101px) and (max-width: 1250px) {
  .slate-team-columns { grid-template-columns: minmax(130px, 170px) 28px minmax(8px, 1fr) 48px 52px minmax(12px, 1fr) 64px 74px; gap: 7px; }
  .slate-overview, .slate-board-heading { grid-template-columns: 68px minmax(0, 1fr) 140px 160px; gap: 10px; }
}

/* Supplements add evidence without repeating the compact game row. */
.game-row-supplement { padding: 12px 16px 16px; border-top: 1px solid var(--border); font-size: 13px; }
.game-row-supplement > :first-child { margin-top: 0; }
.game-row-supplement > section { margin: 16px 0; }
.game-row-supplement h3 { font-size: 14px; margin: 0 0 6px; }
.game-row-supplement h4 { font-size: 12px; margin: 8px 0; }
.game-row-supplement h4 small { font-weight: 400; color: var(--muted); margin-left: 8px; }
.record-availability, .supplement-source { color: var(--muted); font-size: 12px; margin: 6px 0 10px; }
.supplement-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.supplement-table { overflow-x: auto; }
.supplement-table table { width: 100%; font-variant-numeric: tabular-nums; font-size: 12px; }
.supplement-table td, .supplement-table th { padding: 5px 6px; text-align: right; white-space: nowrap; }
.supplement-table th:nth-child(2) { text-align: left; }
.supplement-table tbody th { font-weight: 500; }
.supplement-table tbody th small { margin-left: 5px; font-weight: 400; color: var(--muted); }
.supplement-pitch-mix { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 8px 0; }
.supplement-pitch-mix dt { text-transform: capitalize; color: var(--muted); font-size: 12px; }
.supplement-pitch-mix dd { margin: 3px 0 0; font-variant-numeric: tabular-nums; }
.supplement-pitch-mix meter { display: block; width: 100%; height: 8px; margin-top: 4px; }
.game-row-supplement > .notebook-link { display: inline-block; margin-top: 8px; }
.notebook-technical > summary { cursor: pointer; font-weight: 600; }
@media (max-width: 800px) { .supplement-pair { grid-template-columns: 1fr; gap: 12px; } .game-row-supplement { padding: 12px; } }
.supplement-table table { min-width: 0; }
.supplement-table tbody th { text-transform: none; letter-spacing: normal; color: var(--foreground); white-space: normal; }
.supplement-pitch-mix meter::-webkit-meter-optimum-value { background: var(--accent); }
@media (max-width: 600px) { .supplement-table table { font-size: 11px; } .supplement-table td, .supplement-table th { padding: 5px 3px; } }
@media (max-width: 600px) {
  .supplement-table th:nth-child(3), .supplement-table td:nth-child(3) { display: none; }
}

/* Comparisons stay neutral; colors belong to explicit result labels. */
.slate-outcome-label.slate-result-win { background: #e4f3e8; color: #185c32; }
.slate-outcome-label.slate-result-loss { background: #fbe9e7; color: #8d2923; }
.slate-outcome-label { border-radius: 3px; padding: 1px 4px; width: fit-content; }
.slate-total-results { display: grid; gap: 4px; text-align: center; margin-top: 5px; }
.slate-paper-result { display: grid; gap: 3px; }
.tree-driver-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.tree-driver-list li { display: grid; gap: 3px; }
.tree-driver-list li > span, .tree-driver-list li > small { color: var(--muted); }
.tree-driver-list code { overflow-wrap: anywhere; }

/* Model-selection fills do not add lines or move the aligned probabilities. */
.slate-selection { border-radius: 4px; }
.slate-selection-pending { background: #e8eef7; color: #294f7a; }
.slate-selection-win { background: #e4f3e8; color: #185c32; }
.slate-selection-loss { background: #fbe9e7; color: #8d2923; }
.slate-selection-push { background: #eceeef; color: #50585e; }
.slate-selection-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; margin: 8px 0; }
.slate-selection-legend > span { padding: 2px 5px; }

/* Controls unique to the authenticated, paginated native reader. */
.digest { overflow-wrap: anywhere; font-family: monospace; }
.shell > form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-block: 12px; }
.shell > form label { display: grid; gap: 4px; }
.shell > form input, .shell > form select { max-width: 100%; }
.shell > .panel { margin-block: 12px; }
.shell > footer { margin-top: 20px; }

.table-wrap td { white-space: pre-line; }

.shell > .comparison-filters {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(150px, 1fr)) auto;
  gap: 16px;
  align-items: end;
  padding: 20px;
  margin: 20px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.shell > .comparison-filters label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}
.shell > .comparison-filters input,
.shell > .comparison-filters select,
.shell > .comparison-filters button {
  font: inherit;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--foreground);
  min-width: 0;
  width: 100%;
}
.shell > .comparison-filters button {
  background: var(--accent);
  color: white;
  cursor: pointer;
}
.comparison-results {
  margin: 20px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.comparison-results caption {
  text-align: left;
  padding: 12px 0;
  font-weight: 600;
}
.comparison-results th,
.comparison-results td {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.comparison-results p {
  color: var(--muted);
  line-height: 1.5;
}
.comparison-results .positive {
  color: var(--positive);
  font-weight: 700;
}
.comparison-results .negative {
  color: var(--danger);
  font-weight: 700;
}
@media (max-width: 850px) {
  .shell > .comparison-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shell > .comparison-filters label:first-child {
    grid-column: 1 / -1;
  }
  .shell > .comparison-filters button {
    grid-column: 1 / -1;
  }
  .comparison-results {
    padding: 16px;
  }
}
@media (max-width: 420px) {
  .shell > .comparison-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}
