:root {
  --ink: #10291f;
  --ink-2: #183b2d;
  --cream: #f5f1e8;
  --paper: #fffdf8;
  --muted: #6d766f;
  --line: rgba(16, 41, 31, 0.16);
  --lime: #d7f36a;
  --red: #a63f32;
  --stop: #6f2e33;
  --stop-soft: #f1e0dc;
  --stop-accent: #f0afa8;
  --incomplete: #e8e4da;
  --incomplete-accent: #77766f;
  --amber: #9a6417;
  --shadow: 0 18px 46px rgba(9, 28, 22, 0.14);
  --race-card-content-inset: 24px;
  --nod-usable-height: 100dvh;
  --today-nav-reserve: calc(92px + env(safe-area-inset-bottom));
}

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: hidden; background: var(--cream); scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(circle at 15% -10%, rgba(215, 243, 106, 0.16), transparent 34%), var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, summary:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
a { color: inherit; }
.app-shell {
  width: 100%; min-height: 100dvh;
  padding: 0 max(18px, env(safe-area-inset-right)) calc(152px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}
.masthead {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand-lockup { display: flex; align-items: center; gap: 11px; border: 0; background: transparent; padding: 0; cursor: pointer; }
.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--lime);
  border-radius: 50% 50% 50% 10%;
  font-weight: 900;
}
.brand-name { font-weight: 850; letter-spacing: -0.035em; font-size: 18px; }
.profile-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(16, 41, 31, 0.22);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.page { animation: rise 180ms ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { padding: 38px 0 24px; }
.page-head.compact { padding-bottom: 14px; }
.eyebrow, .mono-label, .empty-kicker, .rank-number, .odds-label {
  margin: 0 0 10px;
  color: var(--muted);
  font: 720 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.page-head h1 { margin: 0; font-size: clamp(42px, 12vw, 72px); line-height: 0.95; letter-spacing: -0.065em; }
.page-intro { max-width: 620px; margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.market-switch { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 18px 0; padding: 4px; border: 1px solid var(--line); border-radius: 4px 15px 4px 4px; background: rgba(255, 253, 248, 0.62); }
.market-switch:has(.market-option:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.market-switch:has(.market-option:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.day-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; max-width: 420px; margin: 8px 0 18px; padding: 4px; border: 1px solid var(--line); border-radius: 4px 13px 4px 4px; background: rgba(255, 253, 248, 0.62); }
.day-switch:has(.day-option:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; }
.day-option { min-height: 44px; border: 0; border-radius: 2px 8px 2px 2px; background: transparent; color: var(--muted); font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.05em; cursor: pointer; }
.day-option.active { background: var(--ink); color: var(--lime); }
.meeting-history-switch { display: grid; gap: 5px; margin: -8px 0 18px; color: var(--muted); font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.05em; text-transform: uppercase; }
.meeting-history-switch select { min-height: 44px; font: 700 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0; text-transform: none; }
.market-option { min-height: 44px; padding: 7px 6px; border: 0; border-radius: 3px 11px 3px 3px; background: transparent; color: var(--muted); font: 820 11px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.035em; cursor: pointer; }
.market-option.active { background: var(--ink); color: var(--lime); box-shadow: 0 5px 12px rgba(9, 28, 22, 0.16); }
.meeting-line { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 32px; }
.meeting-track { display: block; font-size: 13px; font-weight: 820; letter-spacing: 0.06em; text-transform: uppercase; }
.meeting-date { display: block; margin-top: 5px; color: var(--muted); font-size: 14px; }
.status-pill, .small-pill, .eligibility-pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 6px 9px;
  border: 1px solid rgba(16, 41, 31, 0.22);
  border-radius: 999px;
  font: 720 9px/1 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.small-pill.good, .eligibility-pill.eligible { background: var(--lime); border-color: var(--lime); }
.small-pill.dark { color: var(--paper); border-color: rgba(255, 255, 255, 0.3); }
.empty-card, .dark-card {
  background: var(--ink);
  color: var(--paper);
  padding: 30px 25px 24px;
  border-radius: 4px 26px 4px 4px;
  box-shadow: var(--shadow);
}
.empty-kicker { color: var(--lime); }
.empty-card h2 { max-width: 520px; margin: 22px 0 18px; font-size: clamp(29px, 8vw, 43px); line-height: 1.01; letter-spacing: -0.045em; }
.empty-card p { margin: 0; max-width: 520px; color: #bdc8c1; line-height: 1.55; font-size: 15px; }
.empty-card p + p { margin-top: 12px; }
.meeting-status-card { margin-bottom: 12px; }
.meeting-status-card h2 { margin-top: 0; }
.meeting-publication-window { display: grid; gap: 6px; margin: 0 0 18px !important; padding: 14px 16px; border: 1px solid rgba(190, 255, 43, 0.38); border-radius: 3px 14px 3px 3px; background: rgba(190, 255, 43, 0.1); }
.meeting-publication-window span { color: #bdc8c1; font: 760 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.meeting-publication-window strong { color: var(--lime); font-size: clamp(22px, 6vw, 30px); line-height: 1.05; letter-spacing: -.035em; }
.responsible-note { margin: 20px 4px 62px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.stack { display: grid; gap: 12px; }
.mobile-today-view { display: block; padding-top: 18px; }
.desktop-today-overview { display: none; }
.mobile-meeting-context {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 14px;
  padding: 0 2px 16px; border-bottom: 1px solid var(--line);
}
.mobile-meeting-market { margin: 0 0 5px; color: var(--muted); font: 720 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.mobile-meeting-track { margin: 0; font-size: 20px; line-height: 1.1; font-weight: 850; letter-spacing: -0.035em; }
.mobile-meeting-date { margin: 5px 0 0; color: var(--muted); font-size: 15px; line-height: 1.3; }
.mobile-meeting-state { align-self: center; color: var(--amber); font-size: 15px; line-height: 1.25; font-weight: 800; text-align: right; }
.mobile-meeting-state strong, .mobile-meeting-state span { display: block; }
.mobile-meeting-state span { max-width: 18ch; margin-top: 4px; color: var(--muted); font-size: 15px; font-weight: 680; }
.race-jump-bar {
  display: flex; gap: 6px; margin: 10px -18px 12px; padding: 2px 18px 5px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding-inline: 18px;
}
.race-jump-bar::-webkit-scrollbar { display: none; }
.race-jump {
  position: relative; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%;
  background: rgba(255, 253, 248, 0.7); color: var(--muted); font-size: 16px; font-weight: 800; cursor: pointer;
}
.race-jump.current { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.race-jump.has-nod::after, .race-jump.has-no-nod::after, .race-jump.has-incomplete::after, .race-jump.has-scratched::after {
  content: ""; position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%);
}
.race-jump.has-nod::after {
  width: 6px; height: 6px;
  border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 1px var(--ink);
}
.race-jump.has-no-nod::after { width: 9px; height: 3px; border-radius: 999px; background: #a54b53; }
.race-jump.current.has-no-nod::after { background: var(--stop-accent); }
.race-jump.has-scratched::after { width: 9px; height: 3px; border-radius: 999px; background: var(--amber); }
.race-jump.has-incomplete::after { width: 6px; height: 6px; background: var(--incomplete-accent); }
.race-jump.current.has-incomplete::after { background: var(--paper); }
.race-jump.has-preview::after { width: 7px; height: 7px; transform: translateX(-50%) rotate(45deg); background: var(--amber); }
.race-deck-viewport {
  width: 100%; overflow: hidden; touch-action: pan-y pinch-zoom; container-type: inline-size;
  -webkit-user-select: none; user-select: none;
  border-radius: 4px 24px 4px 4px;
}
.race-deck-track {
  display: flex; width: 100%; visibility: hidden; will-change: transform;
  transition: transform 220ms cubic-bezier(0.22, 0.72, 0.24, 1);
}
.race-deck-track.is-ready { visibility: visible; }
.race-deck-track.dragging { transition: none; }
.race-deck-slide { flex: 0 0 100%; width: 100%; min-width: 0; }
.mobile-race-card {
  position: relative; min-height: clamp(500px, 62dvh, 610px);
  overflow: hidden; border: 1px solid var(--line); border-radius: 4px 24px 4px 4px;
  background: var(--paper); box-shadow: 0 14px 34px rgba(9, 28, 22, 0.1);
}
.mobile-race-card-inner { height: 100%; min-height: 0; display: flex; flex-direction: column; padding: 24px var(--race-card-content-inset); }
.mobile-race-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: rgba(16, 41, 31, 0.24); }
.mobile-market-label, .race-market-label { display: inline-flex; width: fit-content; margin-bottom: 8px; color: rgba(255, 253, 248, 0.72); font: 800 10px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.11em; text-transform: uppercase; }
.race-market-label { color: var(--muted); }
.race-card.nod .race-market-label { color: #aebcb4; }
.mobile-race-card.nod { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mobile-race-card.nod::before { background: var(--lime); }
.mobile-race-card.nod.scratched-nod::before { background: var(--amber); }
.mobile-race-card.no-nod { background: var(--stop); color: var(--paper); border-color: var(--stop); box-shadow: 0 14px 34px rgba(73, 22, 27, 0.2); }
.mobile-race-card.no-nod::before { background: var(--stop-accent); }
.mobile-race-card.panel-incomplete { background: var(--incomplete); color: var(--ink); border-color: rgba(16, 41, 31, 0.2); }
.mobile-race-card.panel-incomplete::before { background: var(--incomplete-accent); }
.mobile-race-topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.mobile-race-card .race-number { color: var(--paper); font-size: 21px; }
.mobile-race-card .race-time { color: rgba(255, 253, 248, 0.82); font-size: 16px; font-family: inherit; font-weight: 760; }
.mobile-race-name { margin: 15px 0 0; max-width: 28ch; font-size: 19px; line-height: 1.2; font-weight: 790; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.mobile-race-card .mobile-race-name { color: var(--paper); }
.mobile-race-meta { margin: 7px 0 0; color: rgba(255, 253, 248, 0.76); font-size: 16px; line-height: 1.3; }
.mobile-publication-time { display: block; margin-top: 4px; color: rgba(255, 253, 248, 0.72); font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; text-transform: uppercase; }
.mobile-race-card.panel-incomplete .race-number, .mobile-race-card.panel-incomplete .mobile-race-name { color: var(--ink); }
.mobile-race-card.panel-incomplete .race-time, .mobile-race-card.panel-incomplete .mobile-race-meta { color: var(--muted); }
.mobile-decision { margin-top: 28px; }
.mobile-nod-label { margin: 0; color: var(--lime); font-size: 28px; line-height: 1; font-weight: 900; letter-spacing: -0.045em; }
.mobile-horse-name { margin: 12px 0 0; max-width: 100%; font-size: clamp(40px, 11cqi, 50px); line-height: 0.94; font-weight: 900; letter-spacing: -0.06em; overflow-wrap: anywhere; }
.mobile-consensus { display: block; margin: 18px 0 0; font-size: 22px; line-height: 1.1; font-weight: 840; letter-spacing: -0.03em; }
.mobile-conviction { display: block; margin: 7px 0 0; color: #d0d9d3; font-size: 16px; line-height: 1.3; }
.mobile-units { display: block; margin: 18px 0 0; color: var(--lime); font-size: 30px; line-height: 1; font-weight: 900; letter-spacing: -0.045em; }
.mobile-scratched-nod { display: block; width: fit-content; margin: 18px 0 0; padding: 8px 11px; border: 1px solid var(--amber); border-radius: 3px 10px 3px 3px; color: #ffe2a6; font-size: 19px; line-height: 1.15; font-weight: 900; letter-spacing: -0.025em; }
.mobile-no-nod-label { margin: 0; color: var(--paper); font-size: 35px; line-height: 0.95; font-weight: 900; letter-spacing: -0.055em; }
.mobile-no-nod-reason { display: block; margin: 16px 0 0; max-width: 30ch; font-size: 21px; line-height: 1.22; font-weight: 820; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.mobile-no-nod-copy { margin: 13px 0 0; color: rgba(255, 253, 248, 0.82); font-size: 17px; line-height: 1.48; }
.mobile-incomplete-label { margin: 0; color: var(--ink); font-size: 32px; line-height: 0.98; font-weight: 900; letter-spacing: -0.055em; }
.mobile-incomplete-reason { display: block; margin: 16px 0 0; max-width: 31ch; font-size: 20px; line-height: 1.25; font-weight: 820; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.mobile-incomplete-copy { margin: 13px 0 0; color: var(--muted); font-size: 17px; line-height: 1.48; }
.mobile-preview-label { margin: 0; color: var(--amber); font-size: 27px; line-height: 0.98; font-weight: 900; letter-spacing: -0.045em; }
.mobile-preview-units { display: block; margin: 18px 0 0; color: var(--amber); font-size: 23px; line-height: 1; font-weight: 900; letter-spacing: -0.035em; }
.mobile-panel-status { margin-top: auto; padding-top: 28px; }
.mobile-panel-status strong { display: block; font-size: 18px; line-height: 1.3; }
.mobile-panel-status span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.35; }
.mobile-race-card.nod .mobile-panel-status span { color: #aebcb4; }
.open-votes-button {
  width: 100%; min-height: 50px; margin-top: 18px; padding: 12px 16px; border: 1px solid rgba(16, 41, 31, 0.3);
  border-radius: 3px 14px 3px 3px; background: transparent; font-size: 16px; font-weight: 820; cursor: pointer;
}
.mobile-race-card.nod .open-votes-button, .mobile-race-card.no-nod .open-votes-button { border-color: rgba(255, 255, 255, 0.42); color: var(--paper); }
.race-deck-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 7px; margin-top: 12px; }
.race-deck-control {
  min-height: 48px; padding: 10px 7px; border: 1px solid rgba(16, 41, 31, 0.28); border-radius: 3px 13px 3px 3px;
  background: transparent; font-size: 16px; font-weight: 820; cursor: pointer;
}
.race-deck-count { min-width: 90px; font-size: 15px; line-height: 1.2; font-weight: 820; text-align: center; white-space: nowrap; }
.race-deck-hint { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.35; text-align: center; }
.mobile-today-view .responsible-note { margin: 18px 3px 20px; font-size: 12px; }
.vote-sheet-layer { position: fixed; z-index: 60; inset: 0; height: var(--nod-usable-height, 100dvh); display: grid; align-items: end; }
.vote-sheet-layer.qa-width-320, .vote-sheet-layer.qa-width-375, .vote-sheet-layer.qa-width-390, .vote-sheet-layer.qa-width-393, .vote-sheet-layer.qa-width-430 { left: 50%; right: auto; transform: translateX(-50%); }
.vote-sheet-layer.qa-width-320 { width: 320px; }
.vote-sheet-layer.qa-width-375 { width: 375px; }
.vote-sheet-layer.qa-width-390 { width: 390px; }
.vote-sheet-layer.qa-width-393 { width: 393px; }
.vote-sheet-layer.qa-width-430 { width: 430px; }
.vote-sheet-scrim { position: absolute; inset: 0; border: 0; background: rgba(5, 18, 13, 0.62); cursor: pointer; }
.vote-sheet {
  position: relative; width: 100%; max-height: min(82%, calc(var(--nod-usable-height, 100dvh) - max(18px, env(safe-area-inset-top)))); overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; padding: 20px max(20px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  border-radius: 24px 24px 0 0; background: var(--paper); box-shadow: 0 -22px 58px rgba(9, 28, 22, 0.24);
}
.vote-sheet-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; }
.vote-sheet-kicker { margin: 0 0 5px; color: var(--muted); font-size: 15px; font-weight: 800; }
.vote-sheet h2 { margin: 0; font-size: 28px; line-height: 1.03; letter-spacing: -0.045em; overflow-wrap: anywhere; }
.vote-sheet-close { min-width: 66px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-size: 16px; font-weight: 800; cursor: pointer; }
.vote-sheet-summary { margin: 16px 0 6px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.vote-sheet-availability { margin: 10px 0 16px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.vote-sheet-availability strong { color: var(--ink); }
.vote-sheet-list { display: grid; margin-top: 8px; border-top: 1px solid var(--line); }
.vote-sheet-row { min-height: 68px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.vote-sheet-analyst { display: block; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.vote-sheet-choice { font-size: 16px; line-height: 1.3; text-align: right; overflow-wrap: anywhere; }
.vote-sheet-choice.has-scratching { display: grid; justify-items: end; gap: 5px; }
.scratched-label { display: inline-flex; width: fit-content; padding: 4px 7px; border: 1px solid currentColor; border-radius: 999px; color: #8a5310; font-size: 12px; line-height: 1; font-weight: 850; letter-spacing: 0.02em; white-space: nowrap; }
.vote-sheet-reserve { display: block; margin-top: 4px; color: var(--amber); font-size: 15px; font-weight: 760; }
.vote-sheet-unavailable { margin: 16px 0 0; padding-top: 15px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 15px; line-height: 1.45; }
body.vote-sheet-open { overflow: hidden; }
.race-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 4px 22px 4px 4px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(9, 28, 22, 0.06);
}
.race-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: rgba(16, 41, 31, 0.24); }
.race-card.nod { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.race-card.nod::before { background: var(--lime); }
.race-card.nod.scratched-nod::before { background: var(--amber); }
.race-card.no-nod { background: var(--stop-soft); border-color: rgba(111, 46, 51, 0.28); }
.race-card.no-nod::before { background: var(--stop); }
.race-card.panel-incomplete { background: var(--incomplete); border-color: rgba(16, 41, 31, 0.2); }
.race-card.panel-incomplete::before { background: var(--incomplete-accent); }
.race-toggle { width: 100%; border: 0; background: transparent; padding: 20px; text-align: left; cursor: pointer; }
.race-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.race-number { display: inline-flex; align-items: center; color: var(--muted); font-size: 16px; line-height: 1; font-weight: 820; letter-spacing: 0.01em; }
.race-card.nod .race-number { color: #aebcb4; }
.race-card.no-nod .race-number { color: var(--stop); }
.race-time { color: var(--muted); font-size: 14px; line-height: 1; font-weight: 720; font-variant-numeric: tabular-nums; }
.race-card.nod .race-time { color: #aebcb4; }
.race-title { margin: 13px 0 0; color: var(--muted); font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: -0.025em; }
.race-card.nod .race-title { color: #aebcb4; }
.race-decision { display: block; margin-top: 24px; }
.nod-word { display: block; color: var(--lime); font-size: 18px; line-height: 1; font-weight: 850; letter-spacing: 0.01em; }
.no-nod-word { display: block; color: var(--stop); font-size: 31px; line-height: 0.95; font-weight: 880; letter-spacing: -0.055em; }
.incomplete-word { display: block; color: var(--ink); font-size: 28px; line-height: 0.98; font-weight: 880; letter-spacing: -0.05em; }
.preview-word { display: block; color: var(--amber); font-size: 26px; line-height: 0.98; font-weight: 880; letter-spacing: -0.045em; }
.horse-name { display: block; max-width: 620px; margin-top: 8px; font-size: clamp(30px, 9vw, 42px); line-height: 0.98; font-weight: 880; letter-spacing: -0.055em; }
.no-nod-reason { display: block; margin-top: 13px; color: #56383a; font-size: 17px; line-height: 1.4; }
.incomplete-reason { display: block; margin-top: 13px; color: var(--ink); font-size: 17px; line-height: 1.4; }
.decision-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 22px; }
.decision-facts > span { min-width: 0; padding: 12px 10px; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 3px 11px 3px 3px; }
.decision-facts small, .evidence-grid span { display: block; color: #aebcb4; font: 680 8px/1.25 ui-monospace, SFMono-Regular, monospace; letter-spacing: 0.07em; text-transform: uppercase; }
.decision-facts strong { display: block; color: var(--paper); font-size: 16px; line-height: 1.2; letter-spacing: -0.02em; }
.decision-facts .stake-fact { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.decision-facts .stake-fact small, .decision-facts .stake-fact strong { color: var(--ink); }
.decision-facts .scratched-fact { border-color: var(--amber); }
.decision-facts .scratched-fact strong { color: #ffe2a6; }
.no-nod-consensus { display: block; margin-top: 19px; color: #56383a; font-size: 16px; line-height: 1.35; font-weight: 760; }
.preview-facts { display: grid; gap: 5px; margin-top: 19px; color: var(--ink); font-size: 16px; line-height: 1.35; }
.preview-facts span { color: var(--muted); }
.publication-time, .vote-availability { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.35; font-weight: 680; }
.race-card.nod .publication-time, .race-card.nod .vote-availability { color: #aebcb4; }
.expand-cue { display: block; margin-top: 18px; color: var(--muted); font-size: 15px; line-height: 1; font-weight: 760; }
.race-card.nod .expand-cue { color: var(--lime); }
.race-card.no-nod .expand-cue { color: var(--stop); }
.race-card.panel-incomplete .expand-cue { color: var(--incomplete-accent); }
.vote-panel { border-top: 1px solid var(--line); padding: 7px 20px 15px; }
.race-card.nod .vote-panel { border-color: rgba(255, 255, 255, 0.14); }
.vote-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.race-card.nod .vote-row { border-color: rgba(255, 255, 255, 0.12); }
.vote-row:last-child { border-bottom: 0; }
.vote-row strong { overflow: hidden; text-overflow: ellipsis; }
.vote-row > span:last-child { text-align: right; color: var(--muted); }
.race-card.nod .vote-row > span:last-child { color: #bdc8c1; }
.vote-choice .scratched-label { margin-left: 5px; color: #8a5310; vertical-align: middle; }
.race-card.nod .vote-choice .scratched-label { color: #ffe2a6; }
.vote-panel-title { margin: 10px 0 3px; color: var(--muted); font-size: 16px; line-height: 1.2; font-weight: 800; }
.race-card.nod .vote-panel-title { color: var(--lime); }
.reserve-tag { display: inline-block; margin-left: 5px; padding: 3px 6px; border: 1px solid currentColor; border-radius: 999px; color: var(--amber); font-size: 11px; line-height: 1; font-weight: 760; }
.race-card.nod .reserve-tag { color: var(--lime); }
.unavailable-panel { margin-top: 7px; padding: 13px 0 2px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 14px; line-height: 1.5; }
.unavailable-panel p { margin: 0 0 8px; font-size: 14px; line-height: 1.2; font-weight: 800; }
.race-card.nod .unavailable-panel { border-color: rgba(255, 255, 255, 0.18); color: #aebcb4; }
.unavailable-panel span { color: var(--amber); }
.race-card.nod .unavailable-panel span { color: var(--lime); }
.rehearsal-banner {
  display: grid; gap: 7px; margin: 0 0 16px; padding: 18px 20px;
  border: 1px solid rgba(154, 100, 23, 0.38); border-left: 5px solid var(--amber);
  background: #fff8e8; border-radius: 3px 16px 3px 3px;
}
.rehearsal-banner.compact { margin-top: 12px; }
.rehearsal-banner strong { font-size: 18px; letter-spacing: -0.02em; }
.rehearsal-banner p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.rehearsal-label { color: var(--amber); font-size: 13px; line-height: 1.2; font-weight: 800; letter-spacing: 0.04em; }
.rehearsal-pill { border-color: var(--amber); color: var(--amber); }
.desktop-today-overview .eyebrow { font-size: 12px; letter-spacing: 0.1em; }
.desktop-today-overview .status-pill { font-size: 12px; }
.section-title { margin: 28px 0 14px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.field { display: grid; gap: 7px; }
.field span { color: var(--muted); font-size: 11px; font-weight: 720; text-transform: uppercase; letter-spacing: 0.05em; }
input, select, textarea {
  width: 100%; min-height: 44px; border: 1px solid rgba(16, 41, 31, 0.23); border-radius: 3px;
  background: var(--paper); color: var(--ink); padding: 10px 11px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(215, 243, 106, 0.48); }
textarea { min-height: 80px; resize: vertical; }
.plain-card { padding: 20px; border: 1px solid var(--line); background: rgba(255, 253, 248, 0.8); border-radius: 3px 18px 3px 3px; }
.plain-card h2, .plain-card h3 { margin: 0; letter-spacing: -0.035em; }
.plain-card p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.ranking-section-title { margin: 0 0 11px; font: 800 11px/1.2 ui-monospace, SFMono-Regular, monospace; letter-spacing: 0.14em; }
.ranking-section-title.challenger-heading { margin-top: 30px; }
.ranking-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ranking-row:last-child { border-bottom: 0; }
.rank-number { margin: 0; font-size: 16px; color: var(--ink); }
.rank-name { font-weight: 800; letter-spacing: -0.025em; }
.rank-meta { margin-top: 4px; color: var(--muted); font-size: 11px; }
.incumbent-pill { border-color: rgba(16, 41, 31, 0.32); background: var(--ink); color: var(--paper); }
.challenger-list { margin-top: 10px; }
.challenger-row { padding: 17px 0; border-bottom: 1px solid var(--line); }
.challenger-row:last-child { border-bottom: 0; }
.challenger-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.challenger-evidence { margin-top: 8px; }
.challenger-evidence summary { display: flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 11px; cursor: pointer; list-style: none; }
.challenger-evidence summary::-webkit-details-marker { display: none; }
.challenger-evidence summary::after { content: "+"; margin-left: auto; color: var(--ink); font-size: 18px; }
.challenger-evidence[open] summary::after { content: "−"; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); }
.evidence-grid > div { min-width: 0; padding: 11px 8px; border-right: 1px solid var(--line); }
.evidence-grid > div:last-child { border-right: 0; }
.evidence-grid span { color: var(--muted); }
.evidence-grid strong { display: block; margin-top: 6px; font-size: 12px; }
.challenger-evidence p { margin: 10px 0 2px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.action-button, .secondary-button, .text-button, .danger-button {
  min-height: 44px; border-radius: 3px 13px 3px 3px; padding: 11px 15px; font-weight: 780; cursor: pointer;
}
.action-button { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.action-button.lime { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.secondary-button { border: 1px solid rgba(16, 41, 31, 0.3); background: transparent; }
.danger-button { border: 1px solid var(--red); color: var(--red); background: transparent; }
.text-button { border: 0; background: transparent; text-decoration: underline; padding-inline: 0; }
button:disabled { opacity: 0.42; cursor: not-allowed; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.admin-actions { margin: 0 0 16px; }
.space-top { margin-top: 12px; }
.settings-form { margin-top: 18px; }
.full-span { grid-column: 1 / -1; }
.settings-list { display: grid; gap: 13px; }
.notification-preferences { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.notification-preferences legend { padding: 0 6px; font-weight: 800; }
.notification-preferences > p { margin: 0 0 4px; color: var(--muted); font-size: .84rem; }
.notification-preference { display: grid; grid-template-columns: minmax(140px, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .notification-preference { grid-template-columns: 1fr 1fr; } .notification-preference strong { grid-column: 1 / -1; } }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.switch-row input { width: 21px; min-height: 21px; }
.legal-copy { color: var(--muted); font-size: 12px; line-height: 1.6; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 100px; width: calc(100% - 36px); max-width: 440px; transform: translateX(-50%); padding: 13px 15px; background: var(--ink); color: var(--paper); border-radius: 3px 14px 3px 3px; box-shadow: var(--shadow); font-size: 13px; }
.toast.error { background: #6d241d; }
.loading { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }
.admin-shell { display: grid; gap: 16px; }
.admin-card { padding: 20px; border: 1px solid var(--line); background: var(--paper); border-radius: 3px 18px 3px 3px; }
.admin-card h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.04em; }
.admin-card > p { margin: 0 0 17px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.rehearsal-admin { border-color: rgba(154, 100, 23, 0.42); background: #fffaf0; }
.rehearsal-admin-status h3 { margin: 12px 0 0; font-size: 19px; }
.rehearsal-admin-status p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.form-grid { display: grid; gap: 12px; }
.selection-scroll { margin: 14px -20px 0; padding: 0 20px 10px; overflow-x: auto; }
.selection-grid { min-width: 780px; display: grid; gap: 7px; }
.selection-row { display: grid; grid-template-columns: 90px repeat(6, minmax(105px, 1fr)); gap: 7px; align-items: stretch; }
.selection-cell { min-height: 58px; padding: 8px; border: 1px solid var(--line); background: var(--cream); }
.selection-cell.header { min-height: auto; font-size: 10px; font-weight: 760; }
.selection-cell input { min-height: 38px; padding: 7px; font-size: 12px; }
.inline-check { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 9px; color: var(--muted); }
.inline-check input { width: 14px; min-height: 14px; }
.challenger-entry-list { display: grid; gap: 8px; margin-top: 14px; }
.challenger-entry { display: grid; grid-template-columns: 1fr; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); background: var(--cream); }
.challenger-entry input { min-height: 38px; }
.admin-preview { background: #e8e3d7; border: 1px dashed rgba(16, 41, 31, 0.35); padding: 14px; }
.preview-warning { margin: 0 0 12px; color: var(--red); font: 750 9px/1.4 ui-monospace, monospace; letter-spacing: 0.09em; }
.device-frame { width: 100%; max-width: 390px; margin: 0 auto; padding: 14px; background: var(--cream); border: 7px solid var(--ink); border-radius: 28px; box-shadow: var(--shadow); }
.device-frame .race-toggle { padding: 16px; }
.device-frame .stack { gap: 8px; }
.audit-row { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.audit-row:last-child { border-bottom: 0; }
.reserve-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
.panel-readiness { display: grid; gap: 4px; margin-top: 14px; padding: 12px; border: 1px solid var(--line); background: var(--incomplete); }
.panel-readiness.complete { background: rgba(215, 243, 106, 0.3); border-color: rgba(16, 41, 31, 0.3); }
.panel-readiness strong { font-size: 16px; }
.panel-readiness span { color: var(--stop); font-size: 13px; font-weight: 800; }
.collector-admin { border-color: rgba(16, 41, 31, 0.28); }
.collector-summary { display: grid; gap: 4px; padding: 14px; border: 1px solid rgba(154, 100, 23, 0.38); background: #fff7e8; }
.collector-summary.complete { border-color: rgba(16, 41, 31, 0.3); background: rgba(215, 243, 106, 0.28); }
.collector-summary strong { font-size: 17px; letter-spacing: -0.02em; }
.collector-summary span { color: var(--muted); font-size: 13px; }
.collector-list { display: grid; gap: 8px; margin-top: 18px; }
.collector-row { padding: 12px; border: 1px solid var(--line); background: var(--cream); }
.collector-row.ready { border-color: rgba(16, 41, 31, 0.34); background: rgba(215, 243, 106, 0.18); }
.collector-row.manual_required, .collector-row.blocked, .collector-row.needs_review { border-color: rgba(154, 100, 23, 0.34); background: #fffaf0; }
.collector-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.collector-row-head strong, .collector-row-head span { display: block; }
.collector-row-head > div > span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.collector-status { flex: 0 0 auto; padding: 5px 7px; border: 1px solid var(--line); border-radius: 999px; font: 750 9px/1 ui-monospace, SFMono-Regular, monospace; letter-spacing: 0.04em; }
.collector-row > p { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.collector-picks { margin-top: 10px; font-size: 12px; }
.collector-picks summary { cursor: pointer; font-weight: 780; }
.collector-picks ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 14px; margin: 10px 0 0; padding-left: 24px; }
.collector-picks li { color: var(--muted); }
.collector-picks li strong { color: var(--ink); }
@media (max-width: 520px) {
  .collector-row-head { flex-wrap: wrap; }
  .collector-picks ol { grid-template-columns: minmax(0, 1fr); }
}
.bottom-nav {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: calc(80px + env(safe-area-inset-bottom));
  padding: 8px max(6px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  background: rgba(9, 28, 22, 0.99); border-top: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0;
  box-shadow: 0 -10px 28px rgba(9, 28, 22, 0.18);
}
.nav-item {
  position: relative; min-width: 0; min-height: 60px; border: 0; background: transparent; color: #9aa69f;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 2px 5px; font-size: 12px; line-height: 1; font-weight: 680; cursor: pointer;
}
.nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-glyph { width: 24px; height: 24px; display: grid; place-items: center; }
.nav-glyph svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: var(--lime); font-weight: 820; }
.nav-item.active::before { content: ""; position: absolute; top: -8px; left: 50%; width: 34px; height: 3px; border-radius: 999px; background: var(--lime); transform: translateX(-50%); }
.mobile-qa-shell { margin: 0 auto !important; padding: 0 18px calc(152px + env(safe-area-inset-bottom)) !important; }
.mobile-qa-shell.qa-width-320 { max-width: 320px !important; }
.mobile-qa-shell.qa-width-375 { max-width: 375px !important; }
.mobile-qa-shell.qa-width-390 { max-width: 390px !important; }
.mobile-qa-shell.qa-width-393 { max-width: 393px !important; }
.mobile-qa-shell.qa-width-430 { max-width: 430px !important; }
.mobile-qa-shell .bottom-nav { left: 50%; right: auto; bottom: 0; transform: translateX(-50%); }
.mobile-qa-shell.qa-width-320 .bottom-nav { width: 320px; }
.mobile-qa-shell.qa-width-375 .bottom-nav { width: 375px; }
.mobile-qa-shell.qa-width-390 .bottom-nav { width: 390px; }
.mobile-qa-shell.qa-width-393 .bottom-nav { width: 393px; }
.mobile-qa-shell.qa-width-430 .bottom-nav { width: 430px; }
.mobile-qa-shell .mobile-today-view { display: block !important; }
.mobile-qa-shell .desktop-today-overview { display: none !important; }
.mobile-qa-shell .page-head { padding-top: 38px; }
.mobile-qa-shell .page-head h1 { font-size: 47px; }
.mobile-qa-shell .horse-name, .device-frame .horse-name { font-size: 35px; }
.mobile-qa-shell .empty-card h2 { font-size: 31px; }
.hidden { display: none !important; }
.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; }

.snapshot-note { margin: 6px 0 10px; color: var(--muted); font: 700 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.05em; text-transform: uppercase; }
.all-nods-grid { display: grid; gap: 12px; }
.admin-market-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -8px 0 18px; padding: 13px 15px; border-radius: 3px 13px 3px 3px; background: var(--ink); color: var(--paper); }
.admin-market-banner span { color: var(--lime); font: 800 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.1em; }
.admin-market-banner strong { font-size: 13px; text-align: right; }
.manual-recovery { padding: 0; overflow: hidden; }
.manual-recovery > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; padding: 16px 20px; cursor: pointer; list-style: none; }
.manual-recovery > summary::-webkit-details-marker { display: none; }
.manual-recovery > summary span { font-size: 20px; font-weight: 850; letter-spacing: -.035em; }
.manual-recovery > summary small { color: var(--muted); font-size: 12px; text-align: right; }
.manual-recovery > summary::after { content: "+"; flex: 0 0 auto; font-size: 22px; }
.manual-recovery[open] > summary::after { content: "−"; }
.manual-recovery[open] > summary { border-bottom: 1px solid var(--line); }
.manual-exception-copy { margin: 16px 20px 0; color: var(--stop); font-size: 13px; line-height: 1.45; }
.manual-recovery-grid { display: grid; gap: 14px; padding: 16px; }

@media (min-width: 620px) {
  .form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .app-shell { max-width: 1060px; margin: 0 auto; padding: 0 max(40px, env(safe-area-inset-right)) 148px max(40px, env(safe-area-inset-left)); }
  .page-head { padding-top: 32px; }
  .empty-card, .dark-card { padding: 32px; }
  .bottom-nav { left: 0; right: 0; width: auto; transform: none; }
  .admin-shell { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-card.wide { grid-column: 1 / -1; }
  .manual-recovery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-recovery-grid .admin-card.wide { grid-column: 1 / -1; }
  .challenger-entry { grid-template-columns: 65px minmax(120px, 1fr) minmax(160px, 1fr) auto; }
}
@media (min-width: 820px) {
  .mobile-today-view { display: none; }
  .desktop-today-overview { display: block; }
  .desktop-today-overview > .market-switch { max-width: 560px; margin: 24px 0 2px; }
  .all-nods-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .mobile-today-view { display: block; }
  .desktop-today-overview { display: none; }
}
@media (max-width: 350px) {
  .mobile-race-card { min-height: 450px; }
}
.mobile-qa-shell.qa-width-320 .mobile-race-card { min-height: 450px; }
@media (max-width: 389px) {
  .decision-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-facts .stake-fact { grid-column: 1 / -1; }
  .incumbent-row { align-items: start; }
  .incumbent-pill { white-space: normal; text-align: center; }
  .nav-item { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
  .race-deck-track { transition: none !important; }
}

/* Mobile Today is a bounded horizontal experience; other views retain normal page scrolling. */
html.today-deck-active,
body.today-deck-active {
  width: 100%;
  height: var(--nod-usable-height, 100dvh);
  min-height: 0;
  max-height: var(--nod-usable-height, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
}
body.today-deck-active #app { height: 100%; min-height: 0; overflow: hidden; }
body.today-deck-active .app-shell {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 max(18px, env(safe-area-inset-right)) var(--today-nav-reserve) max(18px, env(safe-area-inset-left));
}
body.today-deck-active .masthead {
  flex: 0 0 calc(56px + env(safe-area-inset-top));
  height: calc(56px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
}
body.today-deck-active .brand-mark { width: 28px; height: 28px; }
body.today-deck-active .brand-name { font-size: 17px; }
body.today-deck-active .profile-button { width: 34px; height: 34px; }
body.today-deck-active .page { flex: 1 1 auto; min-height: 0; overflow: hidden; }
body.today-deck-active .mobile-today-view {
  height: 100%;
  min-height: 0;
  display: flex !important;
  flex-direction: column;
  padding-top: 6px;
  overflow: hidden;
}
body.today-deck-active .market-switch { flex: 0 0 52px; min-height: 52px; margin: 0 0 5px; padding: 3px; gap: 3px; }
body.today-deck-active .day-switch { flex: 0 0 50px; min-height: 50px; width: 100%; max-width: none; margin: 0 0 5px; padding: 2px; }
body.today-deck-active .day-option { min-height: 44px; }
body.today-deck-active .market-option { min-height: 44px; padding: 5px 3px; font-size: 9px; }
body.today-deck-active .mobile-meeting-context {
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 0 2px 7px;
}
body.today-deck-active .mobile-meeting-track {
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
body.today-deck-active .mobile-meeting-date { margin-top: 2px; font-size: 14px; line-height: 1.25; }
body.today-deck-active .mobile-meeting-state { max-width: none; font-size: 12px; line-height: 1.2; }
body.today-deck-active .mobile-meeting-state span { max-width: 21ch; margin-top: 2px; font-size: 12px; line-height: 1.2; }
body.today-deck-active .mobile-race-deck {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.today-deck-active .race-jump-bar {
  flex: 0 0 auto;
  gap: 6px;
  margin: 5px -18px 6px;
  padding: 0 18px 2px;
}
body.today-deck-active .race-deck-viewport { flex: 1 1 auto; min-height: 0; }
body.today-deck-active .race-deck-track,
body.today-deck-active .race-deck-slide { height: 100%; min-height: 0; }
body.today-deck-active .mobile-race-card {
  height: 100%;
  min-height: 0;
}
body.today-deck-active .mobile-race-card-inner { padding-block: 16px; }
body.today-deck-active .mobile-market-label { margin-bottom: 4px; font-size: 9px; }
body.today-deck-active .mobile-race-card .race-number { font-size: 20px; }
body.today-deck-active .mobile-race-card .race-time { font-size: 15px; }
body.today-deck-active .mobile-race-name { margin-top: 8px; font-size: 19px; line-height: 1.15; }
body.today-deck-active .mobile-race-meta { margin-top: 3px; font-size: 16px; line-height: 1.2; }
body.today-deck-active .mobile-decision { margin-top: 12px; }
body.today-deck-active .mobile-nod-label { font-size: 28px; }
body.today-deck-active .mobile-horse-name { margin-top: 7px; font-size: clamp(40px, 11cqi, 48px); }
body.today-deck-active .mobile-horse-name.is-long { font-size: clamp(30px, 8.8cqi, 36px); line-height: 0.96; }
body.today-deck-active .mobile-consensus { margin-top: 10px; font-size: 20px; line-height: 1.15; }
body.today-deck-active .mobile-consensus span { color: #d0d9d3; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
body.today-deck-active .mobile-units { margin-top: 10px; font-size: 28px; }
body.today-deck-active .mobile-no-nod-label { font-size: 32px; }
body.today-deck-active .mobile-no-nod-reason { margin-top: 10px; font-size: 20px; line-height: 1.18; }
body.today-deck-active .mobile-no-nod-copy { margin-top: 8px; font-size: 17px; line-height: 1.3; }
body.today-deck-active .open-votes-button {
  flex: 0 0 auto;
  min-height: 44px;
  margin-top: auto;
  padding: 9px 14px;
}
body.today-deck-active .race-deck-controls {
  flex: 0 0 44px;
  min-height: 44px;
  margin-top: 6px;
}
body.today-deck-active .race-deck-control { min-height: 44px; padding: 8px 6px; font-size: 14px; }
body.today-deck-active .race-deck-count { min-width: 82px; font-size: 13px; }
body.today-deck-active .mobile-qa-shell { padding-bottom: var(--today-nav-reserve) !important; }
body.today-deck-active .mobile-qa-shell .bottom-nav { position: absolute; }

/* Keep the complete verdict and analyst button visible when mobile browser chrome squeezes the deck. */
html.race-card-compact body.today-deck-active .mobile-race-card-inner { padding-block: 10px; }
html.race-card-compact body.today-deck-active .mobile-market-label { margin-bottom: 2px; font-size: 8px; }
html.race-card-compact body.today-deck-active .mobile-publication-time { margin-top: 2px; font-size: 9px; }
html.race-card-compact body.today-deck-active .mobile-race-card .race-number { font-size: 18px; }
html.race-card-compact body.today-deck-active .mobile-race-card .race-time { font-size: 14px; }
html.race-card-compact body.today-deck-active .mobile-race-name {
  max-width: 100%; margin-top: 3px; overflow: hidden; font-size: 16px; line-height: 1.1;
  text-overflow: ellipsis; white-space: nowrap;
}
html.race-card-compact body.today-deck-active .mobile-race-meta { margin-top: 1px; font-size: 14px; line-height: 1.15; }
html.race-card-compact body.today-deck-active .mobile-decision { margin-top: 5px; }
html.race-card-compact body.today-deck-active .mobile-nod-label { font-size: 23px; }
html.race-card-compact body.today-deck-active .mobile-horse-name { margin-top: 3px; font-size: clamp(36px, 10cqi, 40px); line-height: 0.92; }
html.race-card-compact body.today-deck-active .mobile-horse-name.is-long { font-size: clamp(25px, 7cqi, 28px); line-height: 0.94; }
html.race-card-compact body.today-deck-active .mobile-consensus { margin-top: 5px; font-size: 17px; line-height: 1.1; }
html.race-card-compact body.today-deck-active .mobile-consensus span { font-size: 14px; }
html.race-card-compact body.today-deck-active .mobile-units { margin-top: 5px; font-size: 24px; }
html.race-card-compact body.today-deck-active .mobile-no-nod-label { font-size: 28px; }
html.race-card-compact body.today-deck-active .mobile-no-nod-reason { margin-top: 6px; font-size: 17px; line-height: 1.15; }
html.race-card-compact body.today-deck-active .mobile-no-nod-copy { margin-top: 5px; font-size: 14px; line-height: 1.25; }
html.race-card-compact body.today-deck-active .mobile-incomplete-label { font-size: 26px; }
html.race-card-compact body.today-deck-active .mobile-incomplete-reason { margin-top: 6px; font-size: 17px; line-height: 1.15; }
html.race-card-compact body.today-deck-active .open-votes-button { min-height: 44px; padding: 7px 12px; font-size: 15px; }
.mobile-qa-shell.qa-height-664,
.vote-sheet-layer.qa-height-664 { height: 664px; }
.mobile-qa-shell.qa-height-700,
.vote-sheet-layer.qa-height-700 { height: 700px; }
.mobile-qa-shell.qa-height-750,
.vote-sheet-layer.qa-height-750 { height: 750px; }
.mobile-qa-shell.qa-height-800,
.vote-sheet-layer.qa-height-800 { height: 800px; }

@media (max-height: 700px) {
  body.today-deck-active .masthead { flex-basis: calc(54px + env(safe-area-inset-top)); height: calc(54px + env(safe-area-inset-top)); }
  body.today-deck-active .mobile-today-view { padding-top: 4px; }
  body.today-deck-active .mobile-meeting-context { padding-bottom: 5px; }
  body.today-deck-active .mobile-race-card-inner { padding-block: 14px; }
  body.today-deck-active .mobile-race-name { margin-top: 6px; }
  body.today-deck-active .mobile-decision { margin-top: 10px; }
  body.today-deck-active .mobile-horse-name { margin-top: 6px; }
  body.today-deck-active .mobile-consensus,
  body.today-deck-active .mobile-units { margin-top: 8px; }
}
body.today-deck-active .mobile-qa-shell.qa-height-664 .masthead,
body.today-deck-active .mobile-qa-shell.qa-height-700 .masthead { flex-basis: calc(54px + env(safe-area-inset-top)); height: calc(54px + env(safe-area-inset-top)); }
body.today-deck-active .mobile-qa-shell.qa-height-664 .mobile-today-view,
body.today-deck-active .mobile-qa-shell.qa-height-700 .mobile-today-view { padding-top: 4px; }
body.today-deck-active .mobile-qa-shell.qa-height-664 .mobile-meeting-context,
body.today-deck-active .mobile-qa-shell.qa-height-700 .mobile-meeting-context { padding-bottom: 5px; }
body.today-deck-active .mobile-qa-shell.qa-height-664 .mobile-race-card-inner,
body.today-deck-active .mobile-qa-shell.qa-height-700 .mobile-race-card-inner { padding-block: 14px; }

@media (max-width: 350px) {
  body.today-deck-active .market-option { font-size: 8px; letter-spacing: 0; }
  body.today-deck-active .race-jump-bar { gap: 5px; }
  body.today-deck-active .race-jump { flex-basis: 38px; width: 38px; height: 38px; font-size: 14px; }
  body.today-deck-active .mobile-race-card-inner { padding-block: 12px; }
  body.today-deck-active .mobile-race-card .race-number { font-size: 18px; }
  body.today-deck-active .mobile-race-name { margin-top: 5px; font-size: 17px; }
  body.today-deck-active .mobile-race-meta { font-size: 14px; }
  body.today-deck-active .mobile-decision { margin-top: 8px; }
  body.today-deck-active .mobile-nod-label { font-size: 25px; }
  body.today-deck-active .mobile-horse-name { margin-top: 5px; font-size: 37px; }
  body.today-deck-active .mobile-consensus { margin-top: 7px; font-size: 17px; }
  body.today-deck-active .mobile-consensus span { font-size: 14px; }
  body.today-deck-active .mobile-units { margin-top: 7px; font-size: 25px; }
  body.today-deck-active .open-votes-button { min-height: 44px; padding: 6px 10px; font-size: 14px; }
  body.today-deck-active .race-deck-controls { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); gap: 3px; }
  body.today-deck-active .race-deck-control { padding-inline: 2px; font-size: 12px; }
  body.today-deck-active .race-deck-count { min-width: 0; font-size: 11px; }
}

body.today-deck-active .mobile-qa-shell.qa-width-320 .market-option { font-size: 8px; letter-spacing: 0; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .race-jump-bar { gap: 5px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .race-jump { flex-basis: 38px; width: 38px; height: 38px; font-size: 14px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .mobile-race-card { height: 100%; min-height: 0; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .mobile-race-card-inner { padding-block: 12px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .mobile-race-card .race-number { font-size: 18px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .mobile-race-name { margin-top: 5px; font-size: 17px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .mobile-race-meta { font-size: 14px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .mobile-decision { margin-top: 8px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .mobile-nod-label { font-size: 25px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .mobile-horse-name { margin-top: 5px; font-size: 37px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .mobile-consensus { margin-top: 7px; font-size: 17px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .mobile-consensus span { font-size: 14px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .mobile-units { margin-top: 7px; font-size: 25px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .open-votes-button { min-height: 44px; padding: 6px 10px; font-size: 14px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .race-deck-controls { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); gap: 3px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .race-deck-control { padding-inline: 2px; font-size: 12px; }
body.today-deck-active .mobile-qa-shell.qa-width-320 .race-deck-count { min-width: 0; font-size: 11px; }

/* Public membership and account shell. */
.public-shell { min-height: 100dvh; }
.public-header { position: relative; z-index: 2; min-height: calc(70px + env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); }
.public-header nav { display: flex; align-items: center; gap: 12px; }
.public-main { width: min(1120px, 100%); min-height: 58dvh; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right)) 72px max(20px, env(safe-area-inset-left)); }
.public-hero { min-height: min(720px, calc(100dvh - 70px)); display: grid; align-content: center; justify-items: start; padding: 72px 0; }
.public-hero h1 { max-width: 920px; margin: 0; font-size: clamp(54px, 10vw, 128px); line-height: .84; letter-spacing: -.075em; }
.hero-line { max-width: 760px; margin: 30px 0 0; color: var(--red); font-size: clamp(24px, 3.5vw, 42px); line-height: 1.05; font-weight: 850; letter-spacing: -.04em; }
.hero-copy { max-width: 720px; margin: 24px 0 0; color: var(--muted); font-size: clamp(17px, 2vw, 22px); line-height: 1.5; }
.hero-copy.secondary-copy { margin-top: 14px; font-size: clamp(16px, 1.7vw, 19px); }
.public-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.public-actions .text-button { padding-inline: 12px; }
.hero-fine, .form-fine { max-width: 610px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.hero-fine { margin: 16px 0 0; }
.public-proof { display: grid; gap: 12px; padding: 0 0 80px; }
.public-proof article { min-height: 220px; padding: 26px; border: 1px solid var(--line); border-radius: 4px 24px 4px 4px; background: rgba(255, 253, 248, .76); }
.public-proof article > span { color: var(--red); font: 850 50px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.public-proof h2 { margin: 34px 0 8px; font-size: 21px; letter-spacing: -.035em; }
.public-proof p { margin: 0; color: var(--muted); line-height: 1.5; }
.public-method { display: grid; gap: 28px; align-items: end; padding: 0 0 84px; }
.public-method h2, .pricing-section h2, .public-install-promo h2, .install-panel h2 { margin: 0; font-size: clamp(36px, 6vw, 66px); line-height: .95; letter-spacing: -.055em; }
.public-method > div:first-child > p:not(.eyebrow) { max-width: 670px; margin: 22px 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.unit-table { border-top: 1px solid var(--line); }
.unit-table > div { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); font-size: 17px; }
.unit-table strong { font-size: 20px; }
.pricing-section { padding: 72px 0; border-top: 1px solid var(--line); }
.pricing-grid { display: grid; gap: 10px; margin: 30px 0 18px; }
.pricing-grid article { min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; border: 1px solid var(--line); border-radius: 4px 22px 4px 4px; background: var(--paper); }
.pricing-grid span { color: var(--muted); font-weight: 750; }
.pricing-grid strong { font-size: clamp(34px, 5vw, 52px); letter-spacing: -.05em; }
.pricing-grid .text-button { width: max-content; max-width: 100%; padding: 8px 0 0; text-align: left; }
.pricing-section > p:not(.eyebrow) { margin: 0 0 20px; color: var(--muted); line-height: 1.5; }
.public-install-promo { display: grid; gap: 24px; align-items: center; margin-bottom: 80px; padding: 30px; border-radius: 4px 26px 4px 4px; background: var(--red); color: var(--paper); }
.public-install-promo .eyebrow { color: var(--paper); opacity: .72; }
.public-install-promo p:last-child { max-width: 600px; margin: 18px 0 0; line-height: 1.5; }
.public-install-promo .action-button { width: max-content; max-width: 100%; }
.public-dark { margin: 0 -20px; padding: 70px max(20px, calc((100vw - 1120px) / 2)); background: var(--ink); color: var(--paper); }
.public-dark .eyebrow { color: var(--lime); }
.public-dark h2 { max-width: 850px; margin: 0; font-size: clamp(42px, 7.5vw, 86px); line-height: .94; letter-spacing: -.065em; }
.public-dark > p:not(.eyebrow) { max-width: 620px; margin: 28px 0 0; color: #bdc8c1; font-size: 18px; line-height: 1.55; }
.dark-link-button { margin-top: 26px; padding: 0; border: 0; background: transparent; color: var(--lime); font-weight: 820; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.public-footer { padding: 38px max(20px, env(safe-area-inset-right)) calc(38px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.5; }
.public-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 20px 0; }
.public-footer button, .inline-link { padding: 0; border: 0; background: transparent; color: var(--ink); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-panel, .legal-page { width: min(580px, 100%); margin: 0 auto; padding: 30px 0 60px; }
.auth-panel .page-head, .legal-page .page-head { padding-top: 50px; }
.auth-panel form { padding: 24px; border: 1px solid var(--line); border-radius: 4px 24px 4px 4px; background: var(--paper); box-shadow: 0 18px 38px rgba(9, 28, 22, .08); }
.billing-plan-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.billing-plan-options legend { margin-bottom: 10px; font-weight: 820; }
.billing-plan-options label { min-width: 0; display: block; cursor: pointer; }
.billing-plan-options input { position: absolute; opacity: 0; pointer-events: none; }
.billing-plan-options label > span { min-height: 76px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 4px 14px 4px 4px; background: var(--paper); }
.billing-plan-options input:checked + span { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.billing-plan-options input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }
.billing-plan-options small { color: var(--muted); line-height: 1.3; }
.billing-plan-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.billing-plan-buttons button { min-width: 0; }
.check-row { min-height: 48px; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }

@media (max-width: 560px) {
  .billing-plan-options, .billing-plan-buttons { grid-template-columns: 1fr; }
}
.required-check { color: var(--ink); font-weight: 700; }
.auth-switch { margin-top: 22px; color: var(--muted); text-align: center; }
.auth-link { display: block; margin: 18px auto 0; }
.action-button.compact { width: auto; min-height: 38px; padding: 8px 14px; }
.account-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.account-summary h2 { margin: 14px 0 4px; overflow-wrap: anywhere; }
.account-summary p { margin: 0; }
.install-page { max-width: 920px; margin: 0 auto; padding: 54px 0 70px; }
.install-back { margin-top: 24px; }
.install-panel { padding: 30px; border: 1px solid var(--line); border-radius: 4px 26px 4px 4px; background: var(--paper); box-shadow: var(--shadow); }
.install-panel .install-intro { max-width: 620px; margin: 18px 0 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.install-platform-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 28px 0; padding: 4px; border: 1px solid var(--line); border-radius: 4px 15px 4px 4px; }
.install-platform-tabs button { min-height: 44px; border: 0; border-radius: 3px 11px 3px 3px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.install-platform-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--lime); }
.install-instructions { margin-top: 26px; }
.install-instructions h3 { margin: 16px 0 8px; font-size: 28px; letter-spacing: -.04em; }
.install-instructions ol { margin: 20px 0; padding-left: 24px; color: var(--ink); font-size: 17px; line-height: 1.55; }
.install-instructions li + li { margin-top: 9px; }
.install-instructions > p { max-width: 580px; color: var(--muted); line-height: 1.5; }
.desktop-install-grid { display: grid; gap: 28px; align-items: center; margin-top: 28px; }
.install-qr-frame { width: min(300px, 100%); padding: 12px; border: 1px solid var(--line); border-radius: 4px 18px 4px 4px; background: var(--paper); }
.install-qr { display: block; width: 100%; height: auto; }
.copy-app-link { display: grid; gap: 7px; margin-top: 20px; color: var(--muted); font-size: 12px; font-weight: 750; }
.copy-app-link input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px 10px 3px 3px; background: var(--cream); color: var(--ink); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--ink); font-weight: 760; text-underline-offset: 4px; }
.account-install-panel { margin-bottom: 12px; box-shadow: none; }
.installed-state { display: flex; align-items: center; gap: 16px; }
.installed-state h2 { font-size: clamp(27px, 5vw, 38px); }
.installed-state p { margin: 9px 0 0; color: var(--muted); line-height: 1.5; }
.install-status-mark { flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); font-size: 24px; font-weight: 900; }
.historical-preview-banner { margin: 0 0 20px; padding: 18px; border: 1px solid var(--amber); border-radius: 4px 18px 4px 4px; background: #fff5dc; }
.historical-preview-banner .rehearsal-label { color: var(--amber); }
.historical-preview-banner strong { display: block; margin-top: 8px; font-size: 19px; }
.historical-preview-banner p { margin: 8px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.historical-preview-view.desktop-today-overview { padding-top: 24px; }

/* Keep the labelled replay notice without taking the analyst action off a
   bounded phone deck. The full explanation remains on desktop. */
body.today-deck-active .mobile-today-view.historical-preview-view .historical-preview-banner {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  margin: 0 0 6px;
  padding: 9px 12px;
  border-radius: 3px 13px 3px 3px;
}
body.today-deck-active .mobile-today-view.historical-preview-view .historical-preview-banner .rehearsal-label {
  grid-column: 1;
  font-size: 9px;
}
body.today-deck-active .mobile-today-view.historical-preview-view .historical-preview-banner strong {
  grid-column: 1;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.15;
}
body.today-deck-active .mobile-today-view.historical-preview-view .historical-preview-banner p { display: none; }
body.today-deck-active .mobile-today-view.historical-preview-view .historical-preview-banner .text-button {
  grid-column: 2;
  grid-row: 1 / 3;
  min-height: 44px;
  white-space: nowrap;
}
@media (min-width: 720px) {
  .public-header { padding-inline: max(40px, calc((100vw - 1120px) / 2)); }
  .public-proof { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .public-method { grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); }
  .pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .public-install-promo { grid-template-columns: minmax(0, 1fr) auto; padding: 42px; }
  .desktop-install-grid { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); }
  .public-footer { padding-inline: max(40px, calc((100vw - 1120px) / 2)); }
}

@media (max-width: 520px) {
  .public-header .brand-name { display: none; }
  .public-hero { min-height: auto; padding: 70px 0 62px; }
  .hero-line span { display: block; }
  .public-actions { width: 100%; }
  .public-actions button { flex: 1 1 100%; }
  .install-platform-tabs { grid-template-columns: 1fr; }
  .install-panel { padding: 24px 20px; }
  .public-install-promo .action-button { width: 100%; }
  .auth-panel form { padding: 20px; }
}
