:root {
  color-scheme: dark;
  --bg: #121212;
  --surface: #1b1b1b;
  --surface-2: #222222;
  --surface-3: #2c2c2c;
  --surface-raised: #262626;
  --border: #383838;
  --line: var(--border);
  --border-strong: #666666;
  --text: #ededed;
  --muted: #a8a8a8;
  --muted-strong: #c9c9c9;
  --blue: #6695ff;
  --blue-soft: rgba(255, 255, 255, 0.06);
  --red: #f07178;
  --red-soft: rgba(240, 113, 120, 0.12);
  --green: #4dd49b;
  --green-soft: rgba(77, 212, 155, 0.12);
  --amber: #f0b85b;
  --amber-soft: rgba(240, 184, 91, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius: 16px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.2);
  --content-max: 1480px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

#main-content:focus,
#page-title:focus,
#calculator-title:focus {
  outline: none;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.fallback-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 28px;
}

.fallback-card {
  width: min(100%, 560px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface-raised), var(--surface));
  padding: clamp(28px, 7vw, 52px);
  box-shadow: var(--shadow-md);
}

.fallback-card img {
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  border-radius: var(--radius-sm);
}

.fallback-card h1 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1.05;
}

.fallback-card > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted-strong);
  font-size: 15px;
}

.fallback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 230px;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #181818;
  padding: 26px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 6px;
  margin-top: 54px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-radius: 10px;
  padding: 0 12px;
  color: var(--muted);
  text-decoration: none;
  transition: 160ms ease;
}

.nav-link .nav-number {
  font-family: var(--mono);
  font-size: 11px;
}

.nav-link .nav-mobile-label {
  display: none;
}

.nav-link:hover,
.nav-link.active {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar-note {
  display: flex;
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.sidebar-note p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.visit-count {
  display: none;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.market-readiness {
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
}

.market-readiness-blocked {
  border-color: rgba(239, 106, 106, 0.48);
  background: linear-gradient(120deg, var(--red-soft), var(--surface) 65%);
}

.market-readiness-at_risk,
.market-readiness-unavailable {
  border-color: rgba(233, 184, 92, 0.42);
  background: linear-gradient(120deg, var(--amber-soft), var(--surface) 65%);
}

.market-readiness-ready {
  border-color: rgba(72, 213, 151, 0.4);
}

.market-readiness-heading,
.market-readiness-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.market-readiness-heading .eyebrow {
  margin: 0 0 5px;
}

.market-readiness-summary {
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
}

.market-readiness-metrics {
  justify-content: flex-start;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
}

.market-readiness-metrics strong {
  color: var(--text);
  font-size: 13px;
}

.market-readiness-alerts p {
  display: grid;
  gap: 3px;
  margin: 12px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 11px;
}

.market-readiness-alerts span {
  color: var(--muted);
}

.market-readiness-details {
  margin-top: 12px;
}

.market-readiness-diagnostics {
  padding: 12px;
}

.market-readiness-diagnostics > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.market-readiness-details .market-readiness-alerts p:first-child {
  margin-top: 0;
  border-top: 0;
}

.nas-update-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.nas-update-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nas-update-heading .eyebrow,
.nas-update-panel .field-note {
  margin: 0;
}

.nas-update-panel .button {
  justify-self: start;
}

.nas-update-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.deployment-console-dialog {
  width: min(860px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  background: #161616;
}

.deployment-console {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.deployment-console-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b2b2b2;
  font-family: var(--mono);
  font-size: 12px;
}

#nas-update-console-meta {
  margin-left: auto;
  color: var(--muted);
  font-weight: 600;
}

.deployment-console-help {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(239, 106, 106, 0.4);
  border-radius: 10px;
  background: var(--red-soft);
  padding: 12px 14px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.deployment-console-help[hidden] { display: none; }

.deployment-console-help span { color: var(--muted); }

.terminal-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px currentColor;
}

.deployment-console[data-state="current"] .terminal-light { background: var(--green); }
.deployment-console[data-state="failed"] .terminal-light { background: var(--red); }
.deployment-console[data-state="agent_unavailable"] .terminal-light { background: var(--red); }

#nas-update-console-log {
  min-height: clamp(220px, 38vh, 400px);
  max-height: 48vh;
  overflow: auto;
  margin: 0;
  border: 1px solid #383838;
  border-radius: 10px;
  background: #101010;
  color: #a8f0c6;
  padding: 16px;
  font: 12px/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.nas-update-panel[data-state="update_available"] {
  border-color: rgba(233, 184, 92, 0.48);
  background: linear-gradient(120deg, var(--amber-soft), var(--surface) 65%);
}

.nas-update-panel[data-state="current"] {
  border-color: rgba(72, 213, 151, 0.4);
}

.nas-update-panel[data-state="failed"] {
  border-color: rgba(239, 106, 106, 0.48);
  background: linear-gradient(120deg, var(--red-soft), var(--surface) 65%);
}

.nas-update-panel[data-state="agent_unavailable"] {
  border-color: rgba(239, 106, 106, 0.48);
  background: linear-gradient(120deg, var(--red-soft), var(--surface) 65%);
}

@media (max-width: 640px) {
  .deployment-console { gap: 11px; padding: 14px; }
  .deployment-console-status { align-items: flex-start; flex-wrap: wrap; }
  #nas-update-console-meta { width: 100%; margin-left: 17px; }
  #nas-update-console-log { min-height: 34vh; max-height: 44vh; padding: 12px; font-size: 11px; }
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.main {
  min-width: 0;
  min-height: 100vh;
  margin-left: 230px;
  padding: 0 34px 72px;
}

.topbar {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.topbar h1 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.035em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.small {
  font-size: 13px;
  line-height: 1.5;
}

.compact-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
}

select,
input {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
}

.compact-field select {
  border: 0;
  background: transparent;
  margin-left: auto;
  min-width: 104px;
  text-align: right;
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
  transition: 160ms ease;
}

.button-primary {
  background: var(--text);
  color: #141414;
}

.button-primary:hover {
  background: #d9d9d9;
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  background: var(--surface-3);
}

.full {
  width: 100%;
}

.view {
  display: none;
  min-width: 0;
  padding-top: 28px;
}

.view.active {
  display: block;
}

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(233, 184, 92, 0.25);
  border-radius: 12px;
  background: var(--amber-soft);
  padding: 14px 16px;
}

.notice p {
  margin: 4px 0 0;
  color: #c7b992;
  font-size: 13px;
}

.authority-strip {
  border-color: rgba(160, 160, 160, 0.3);
  background: linear-gradient(105deg, var(--blue-soft), var(--surface) 72%);
}

.authority-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.authority-copy p {
  color: var(--muted);
}

.authority-flow {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill.amber {
  border-color: rgba(233, 184, 92, 0.3);
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.green {
  border-color: rgba(72, 213, 151, 0.3);
  background: var(--green-soft);
  color: var(--green);
}

.pill.blue {
  border-color: rgba(160, 160, 160, 0.38);
  background: var(--blue-soft);
  color: #a8c7ff;
}

.pill.red {
  border-color: rgb(255 99 99 / 28%);
  background: rgb(255 99 99 / 10%);
  color: var(--red);
}

.event-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 40px 0 30px;
}

.live-card-panel {
  margin: 0 0 1.35rem;
  padding: 1rem 1.15rem;
}

.live-adjustment-panel {
  border-color: rgba(160, 160, 160, 0.35);
}

.live-adjustment-metrics {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.live-adjustment-metrics span {
  color: var(--muted);
  display: grid;
  gap: 0.15rem;
}

.live-adjustment-metrics strong {
  color: var(--text);
  font-size: 1.05rem;
}

.compact-label {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: var(--blue-soft);
  padding: 3px 7px;
  color: #a8c7ff;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-card-heading,
.live-card-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.live-card-heading strong {
  font-size: 1.15rem;
}

.live-card-grid {
  margin-top: 0.9rem;
  align-items: stretch;
}

.live-card-grid > div {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.02);
}

.live-card-grid span,
.live-card-grid strong {
  display: block;
}

.live-card-grid span {
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.live-card-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.polymarket-panel {
  margin: 0 0 1.35rem;
  padding: 1rem 1.15rem;
}

.polymarket-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.polymarket-heading > div > strong,
.polymarket-heading > div > span {
  display: block;
}

.polymarket-heading > div > span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.polymarket-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.polymarket-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) repeat(2, minmax(135px, 0.8fr)) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.02);
}

.polymarket-matchup span,
.polymarket-quote span,
.polymarket-quote small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.polymarket-matchup strong {
  display: block;
  margin-bottom: 0.2rem;
}

.polymarket-quote strong {
  display: block;
  margin: 0.1rem 0;
  color: var(--green);
  font-size: 1.08rem;
}

.polymarket-link {
  padding: 0.55rem 0.7rem;
  white-space: nowrap;
}

.compact-details {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.016);
}

.compact-details > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--muted);
  font: 700 10px/1.35 var(--mono);
  list-style: none;
  cursor: pointer;
}

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

.compact-details > summary::after {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  color: var(--muted);
  content: "";
}

.compact-details[open] > summary {
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.compact-details[open] > summary::after {
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

.market-reference-details {
  margin-top: 12px;
}

.market-reference-details .polymarket-list {
  margin-top: 0;
  padding: 12px;
}

.market-reference-details > p {
  margin: 0;
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.schedule-strip {
  margin-top: 22px;
}

.schedule-list {
  display: grid;
  grid-auto-columns: minmax(210px, 1fr);
  grid-auto-flow: column;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-color: var(--border) transparent;
}

.schedule-card {
  min-height: 112px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 15px;
  text-align: left;
}

.schedule-card:hover,
.schedule-card.active {
  border-color: rgba(72, 213, 151, 0.5);
  background: var(--green-soft);
}

.live-event-label {
  display: inline-block;
  margin-right: 6px;
  border-radius: 999px;
  padding: 2px 5px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.schedule-card span,
.schedule-card strong,
.schedule-card small {
  display: block;
}

.schedule-card span,
.schedule-card small {
  color: var(--muted);
  font-size: 10px;
}

.schedule-card strong {
  margin: 9px 0;
  line-height: 1.3;
}

.year-tabs,
.organization-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 6px;
}

.year-tabs button,
.organization-tabs button {
  min-width: 66px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
}

.history-split-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.year-tabs button:hover,
.year-tabs button.active,
.organization-tabs button:hover,
.organization-tabs button.active {
  border-color: rgba(72, 213, 151, 0.5);
  background: var(--green-soft);
  color: var(--text);
}

.organization-tabs {
  margin-bottom: 8px;
}

.organization-tabs button {
  min-width: max-content;
  padding: 0 14px;
}

.history-layout,
.fighter-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 2fr);
  gap: 14px;
}

.history-events-panel,
.fighter-results-panel {
  align-self: start;
  max-height: calc(100vh - 210px);
  overflow-y: auto;
}

.history-events,
.fighter-results {
  display: grid;
  gap: 8px;
}

.history-event-card,
.fighter-result {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  padding: 13px;
  text-align: left;
}

.history-event-card:hover,
.history-event-card.active,
.fighter-result:hover,
.fighter-result.active {
  border-color: rgba(160, 160, 160, 0.48);
  background: var(--blue-soft);
}

.history-event-card span,
.history-event-card strong,
.history-event-card small,
.fighter-result span,
.fighter-result strong,
.fighter-result small {
  display: block;
}

.history-event-card span,
.history-event-card small,
.fighter-result span,
.fighter-result small {
  color: var(--muted);
  font-size: 10px;
}

.history-event-card strong,
.fighter-result strong {
  margin: 7px 0;
  line-height: 1.35;
}

.history-detail-heading,
.fighter-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.history-detail-heading h2,
.fighter-detail-heading h2 {
  margin: 7px 0;
}

.history-scorecard {
  min-width: 132px;
  text-align: right;
}

.history-scorecard span,
.history-scorecard strong,
.history-scorecard small {
  display: block;
}

.history-scorecard span,
.history-scorecard small {
  color: var(--muted);
  font-size: 10px;
}

.history-scorecard strong {
  margin: 7px 0;
  font-family: var(--mono);
  font-size: 22px;
}

.history-fights,
.fighter-fight-history {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.history-fight-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(120px, 0.7fr));
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  padding: 13px;
}

.history-fight-row .fighters button {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  font-weight: 750;
  text-align: left;
}

.history-fight-row .fighters button:hover {
  color: var(--blue);
}

.fighter-search {
  max-width: 620px;
  margin-bottom: 14px;
}

.fighter-search input {
  width: 100%;
}

.fighter-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.fighter-totals {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 15px;
}

.fighter-totals h3,
.fighter-fight-history h3 {
  margin: 0 0 9px;
  font-size: 14px;
}

.fighter-totals p,
.fighter-totals small {
  color: var(--muted);
  line-height: 1.6;
}

.fighter-fight-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.8fr);
  gap: 18px;
  border-top: 1px solid var(--border);
  padding: 13px 0;
}

.fighter-fight-row > div {
  display: grid;
  gap: 5px;
}

.fighter-fight-row span {
  font-weight: 700;
}

.fighter-fight-row small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.event-hero h2,
.section-heading h2,
.panel h2 {
  margin: 7px 0 0;
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -0.03em;
}

.event-hero .muted {
  margin: 9px 0 0;
}

.event-stats {
  display: flex;
  gap: 36px;
}

.event-stats div {
  display: grid;
  gap: 5px;
}

.event-stats span,
.metric-card span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.event-stats strong {
  font-family: var(--mono);
  font-size: 18px;
}

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

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

.section-block {
  margin-top: 10px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot.blue {
  background: var(--blue);
}

.dot.red {
  background: var(--red);
}

.dot.green {
  background: var(--green);
}

.dot.amber {
  background: var(--amber);
}

.fight-list {
  display: grid;
  gap: 10px;
}

.fight-row {
  display: grid;
  width: 100%;
  appearance: none;
  grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(105px, 0.65fr)) 42px;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  padding: 15px 16px;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.fight-row:hover,
.fight-row.selected {
  border-color: #666666;
  background: var(--surface-2);
}

.fight-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-color: var(--blue);
  background: var(--surface-2);
}

.fight-identity {
  display: grid;
  gap: 8px;
}

.fight-meta {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.fighters {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
}

.fighters .versus {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.fighter-a-text {
  color: #a8c7ff;
}

.fighter-b-text {
  color: #ffadad;
}

.row-metric {
  display: grid;
  gap: 4px;
}

.row-metric span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.row-metric strong {
  font-family: var(--mono);
  font-size: 14px;
}

.favorite-row-metric small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.relationship-label {
  color: var(--muted-strong);
}

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

.row-action {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
}

.unavailable-row {
  opacity: 0.72;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.7fr);
  gap: 16px;
  margin-top: 42px;
}

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

.fighter-probabilities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 26px;
}

.fighter-probability {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px;
}

.fighter-probability > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.fighter-probability strong {
  font-family: var(--mono);
  font-size: 24px;
}

.fighter-name-block {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.fighter-name-block > span {
  overflow-wrap: anywhere;
  font-weight: 700;
  line-height: 1.25;
}

.favorite-tag {
  display: inline-flex;
  width: fit-content;
  min-height: 20px;
  align-items: center;
  border: 1px solid rgba(160, 160, 160, 0.42);
  border-radius: 999px;
  background: rgba(160, 160, 160, 0.12);
  padding: 0 7px;
  color: #a8c7ff;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.favorite-tag[hidden] {
  display: none;
}

.fighter-probability.is-model-favorite {
  border-color: rgba(160, 160, 160, 0.72);
  box-shadow: inset 0 0 0 1px rgba(160, 160, 160, 0.15);
}

.fighter-a {
  background: var(--blue-soft);
}

.fighter-b {
  background: var(--red-soft);
}

.probability-track {
  height: 5px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.probability-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.fighter-a .probability-track span {
  background: var(--blue);
}

.fighter-b .probability-track span {
  background: var(--red);
}

.favorite-summary {
  margin-top: 12px;
}

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

.favorite-verdict {
  display: grid;
  min-width: 0;
  min-height: 106px;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  padding: 14px;
}

.favorite-verdict > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.favorite-verdict strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.3;
}

.favorite-verdict strong b {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 14px;
}

.favorite-verdict small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.favorite-verdict.model-source {
  border-color: rgba(160, 160, 160, 0.38);
  background: linear-gradient(145deg, var(--blue-soft), var(--surface-2) 72%);
}

.favorite-verdict.model-source strong b {
  color: #a8c7ff;
}

.favorite-verdict.market-source {
  border-color: rgba(233, 184, 92, 0.34);
  background: linear-gradient(145deg, var(--amber-soft), var(--surface-2) 72%);
}

.favorite-verdict.market-source strong b {
  color: var(--amber);
}

.favorite-verdict.relationship-source.agree {
  border-color: rgba(72, 213, 151, 0.35);
  background: linear-gradient(145deg, var(--green-soft), var(--surface-2) 72%);
}

.favorite-verdict.relationship-source.agree strong {
  color: var(--green);
}

.favorite-verdict.relationship-source.disagree {
  border-color: rgba(233, 184, 92, 0.44);
  background: linear-gradient(145deg, var(--amber-soft), var(--surface-2) 72%);
}

.favorite-verdict.relationship-source.disagree strong {
  color: var(--amber);
}

.favorite-verdict.relationship-source.even,
.favorite-verdict.relationship-source.unavailable {
  background: linear-gradient(145deg, rgba(160, 160, 160, 0.08), var(--surface-2) 72%);
}

.favorite-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
  -webkit-overflow-scrolling: touch;
}

.favorite-table-wrap:focus-within {
  border-color: rgba(160, 160, 160, 0.56);
}

.favorite-detail {
  margin-top: 10px;
}

.favorite-detail .favorite-table-wrap {
  margin-top: 0;
  border: 0;
  border-radius: 0;
}

.favorite-comparison-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 11px;
}

.favorite-comparison-table caption {
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: left;
}

.favorite-comparison-table th,
.favorite-comparison-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.favorite-comparison-table thead th {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.favorite-comparison-table tbody th {
  color: var(--muted);
  font-weight: 600;
}

.favorite-comparison-table tbody td:nth-child(2),
.favorite-comparison-table tbody td:nth-child(3) {
  font-family: var(--mono);
}

.favorite-comparison-table tbody tr:last-child th,
.favorite-comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.favorite-context {
  position: sticky;
  left: 0;
  width: min(100%, 760px);
  margin: 0;
  border-top: 1px solid var(--border);
  padding: 11px 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

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

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

.selected-fight-details {
  margin-top: 10px;
}

.selected-fight-details > .details-body {
  padding: 12px;
}

.selected-fight-details .metric-grid,
.selected-fight-details .chart-card,
.selected-fight-details .driver-grid {
  margin-top: 0;
}

.selected-fight-details .value-detail-grid {
  margin-top: 10px;
}

.secondary-comparison-metrics .metric-card strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.metric-card {
  display: grid;
  gap: 7px;
  min-height: 90px;
  align-content: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  padding: 14px;
}

.metric-card strong {
  font-family: var(--mono);
  font-size: 18px;
}

.metric-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.market-gap-board {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgb(255 255 255 / 1.5%);
  padding: 13px;
}

.market-gap-heading,
.best-value-highlight,
.outcome-comparison > div,
.model-gap-row,
.model-gap-identity,
.model-gap-call {
  display: flex;
  align-items: center;
}

.market-gap-heading {
  justify-content: space-between;
  gap: 14px;
}

.market-gap-heading > div {
  display: grid;
  gap: 4px;
}

.market-gap-heading > span:first-child {
  font-weight: 750;
}

.market-gap-heading small,
.best-value-highlight small,
.outcome-comparison small,
.model-gap-row small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.context-notice {
  margin: 10px 0 0;
  border: 1px solid rgba(233, 184, 92, 0.35);
  border-radius: 9px;
  background: var(--amber-soft);
  padding: 9px 11px;
  color: #d6c9a8;
  font-size: 11px;
  line-height: 1.45;
}

.context-notice[hidden] {
  display: none;
}

.process-market-details .context-notice {
  margin-top: 0;
}
.prop-label { display: block; color: var(--muted); font-size: .8125rem; margin-bottom: 8px; }
.prop-market { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); }
.prop-state { margin: 16px 0 8px; font-size: .8125rem; color: var(--muted); }
.prop-table { table-layout: fixed; width: 100%; border-collapse: collapse; font-size: .8125rem; }
.prop-table th, .prop-table td { padding: 12px 6px; border-bottom: 1px solid var(--border); text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.prop-table th { color: var(--muted-strong); font-weight: 500; }
.prop-table td { color: var(--text); }
.prop-table tr > :first-child { text-align: left; width: 40%; }
.prop-table tbody tr:last-child > * { border-bottom: 0; }
.prop-controls { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: end; gap: 8px; }
.prop-help { align-self: end; }
.prop-help[open] { display: contents; }
.prop-help[open]::details-content { display: contents; }
.prop-help[open] > summary { grid-column: 2; grid-row: 1; align-self: end; }
.prop-help[open] .price-history-help-copy { position: static; grid-column: 1 / -1; width: auto; min-width: 0; overflow-wrap: anywhere; }
.prop-research { margin-top: 16px; }
.prop-help p { color: var(--muted); font-size: .8125rem; }
@media (max-width: 420px) {
  .prop-controls > div { grid-column: 1 / -1; grid-row: 1; }
  .prop-controls .prop-help, .prop-help[open] > summary { grid-column: 2; grid-row: 2; }
  .prop-table { font-size: .75rem; }
  .prop-table tr > :first-child { width: 36%; }
  .prop-table th, .prop-table td { padding-inline: 4px; }
}

.best-value-highlight {
  justify-content: space-between;
  gap: 16px;
  margin-top: 11px;
  border: 1px solid rgba(160, 160, 160, 0.32);
  border-radius: 10px;
  background: linear-gradient(110deg, var(--blue-soft), var(--surface-2) 72%);
  padding: 13px 14px;
}

.best-value-highlight > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.best-value-highlight > div > span,
.outcome-comparison span,
.model-gap-call > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.best-value-highlight strong {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.best-value-highlight > b {
  flex: 0 0 auto;
  color: #a8c7ff;
  font-family: var(--mono);
  font-size: 18px;
  white-space: nowrap;
}

.best-value-highlight[data-gap-tier="large"],
.best-value-highlight[data-gap-tier="moderate"] {
  border-color: rgba(233, 184, 92, 0.45);
  background: linear-gradient(110deg, var(--amber-soft), var(--surface-2) 72%);
}

.best-value-highlight[data-gap-tier="large"] > b,
.best-value-highlight[data-gap-tier="moderate"] > b {
  color: var(--amber);
}

.best-value-highlight[data-gap-tier="unavailable"] {
  border-color: var(--border);
  background: var(--surface-2);
}

.best-value-highlight[data-gap-tier="unavailable"] > b {
  color: var(--muted);
}

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

.outcome-comparison {
  display: grid;
  min-width: 0;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  padding: 11px 12px;
}

.outcome-comparison > div {
  justify-content: space-between;
  gap: 10px;
}

.outcome-comparison > div b {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.outcome-comparison > strong {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.4;
}

.outcome-comparison[data-state="served"] {
  border-color: rgba(160, 160, 160, 0.4);
  background: linear-gradient(145deg, var(--blue-soft), var(--surface-2) 76%);
}

.model-gap-details {
  margin-top: 8px;
}

.model-gap-rows {
  display: grid;
  gap: 1px;
  background: var(--border);
}

.model-gap-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  background: var(--surface-2);
  padding: 11px 12px;
}

.model-gap-row[data-role="live"] {
  background: linear-gradient(110deg, var(--blue-soft), var(--surface-2) 68%);
}

.model-gap-identity,
.model-gap-call {
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.model-gap-identity {
  position: relative;
  padding-left: 62px;
}

.model-role-pill {
  position: absolute;
  top: 1px;
  left: 0;
  display: inline-flex;
  width: 53px;
  min-height: 19px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.model-gap-row[data-role="live"] .model-role-pill {
  border-color: rgba(160, 160, 160, 0.45);
  color: #a8c7ff;
}

.model-gap-call strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
}

.model-gap-row[data-gap-tier="large"] .model-gap-call strong,
.model-gap-row[data-gap-tier="moderate"] .model-gap-call strong {
  color: var(--amber);
}

.value-details {
  margin-top: 10px;
}

.value-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.value-detail-grid > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface-2);
  padding: 11px 12px;
  color: var(--muted);
  font-size: 10px;
}

.value-detail-grid strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.metric-footnote {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 10px;
}

.chart-card {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  padding: 16px;
}

.chart-heading,
.ledger-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.chart-heading span {
  font-weight: 700;
}

.chart-heading small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.probability-chart {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.probability-plot {
  position: relative;
  min-height: 58px;
}

.probability-axis {
  position: absolute;
  inset: auto 0 20px;
  height: 2px;
  background: #454545;
}

.probability-range {
  position: absolute;
  bottom: 13px;
  height: 16px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--blue-soft);
}

.probability-marker {
  position: absolute;
  bottom: 8px;
  width: 2px;
  height: 27px;
  background: var(--green);
}

.probability-marker.model {
  background: var(--blue);
}

.probability-marker.market {
  background: var(--amber);
}

.probability-marker.break-even {
  background: var(--green);
}

.probability-marker.baseline {
  background: var(--red);
}

.probability-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.probability-legend span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgb(255 255 255 / 3%);
  padding: 8px 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.probability-legend b {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.probability-legend strong {
  margin-left: auto;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.legend-line {
  flex: 0 0 auto;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: var(--green);
}

.legend-line.market {
  background: var(--amber);
}

.legend-line.model {
  background: var(--blue);
}

.legend-line.baseline {
  background: var(--red);
}

.axis-label {
  position: absolute;
  bottom: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.driver-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.driver-card {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px;
}

.driver-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.driver-card strong {
  display: block;
  margin-top: 7px;
  font-family: var(--mono);
}

.driver-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.stake-panel {
  align-self: start;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
}

.input-prefix {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}

.input-prefix span {
  padding-left: 12px;
  color: var(--muted);
}

.input-prefix input {
  border: 0;
}

.stake-result {
  display: grid;
  gap: 5px;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 17px;
}

.stake-result span {
  color: var(--muted-strong);
  font-size: 11px;
  text-transform: uppercase;
}

.stake-result strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 31px;
}

.stake-result p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.stake-result.qualified {
  border-color: rgba(72, 213, 151, 0.25);
  background: var(--green-soft);
}

.stake-result.qualified span,
.stake-result.qualified p {
  color: #9ccfb8;
}

.stake-result.qualified strong {
  color: var(--green);
}

.calculation-stack {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.calculation-details,
.quote-tools {
  margin-top: 12px;
}

.quote-tools > .button {
  width: calc(100% - 24px);
  margin: 10px 12px 0;
}

.quote-tools > .button + .button {
  margin-top: 8px;
}

.quote-tools > .field-note {
  display: block;
  margin: 8px 12px 12px;
}

.calculation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
}

.calculation-row strong {
  color: var(--text);
  font-family: var(--mono);
}

.calculation-row.total {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.decision-box {
  margin: 18px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px;
}

.decision-box span {
  font-weight: 800;
}

.decision-box p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.positive-box {
  border-color: rgba(72, 213, 151, 0.25);
  background: var(--green-soft);
}

.negative-box {
  border-color: rgba(239, 106, 106, 0.25);
  background: var(--red-soft);
}

.neutral-box {
  border-color: rgba(233, 184, 92, 0.28);
  background: var(--amber-soft);
}

.stake-panel .button + .button {
  margin-top: 8px;
}

.segmented-control {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
}

.segmented-control button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 12px;
  font-size: 11px;
}

.segmented-control button.active {
  background: var(--surface-3);
  color: var(--text);
}

.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

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

.clv-panel {
  margin-top: 14px;
}

.prospective-panel {
  margin-top: 14px;
}

.model-update-panel {
  margin: 14px 0;
}

.model-update-progress {
  height: 10px;
  margin: 18px 0 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-3);
}

#model-update-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 300ms ease;
}

.model-update-log {
  min-height: 150px;
  max-height: 360px;
  margin: 14px 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #161616;
  padding: 14px;
  color: #c5c5c5;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.prospective-ledger {
  max-height: 520px;
  margin-top: 16px;
  overflow: auto;
}

.prospective-row {
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.prospective-row .prospective-reasons {
  grid-column: 1 / -1;
  margin-top: -4px;
  overflow-wrap: anywhere;
}

.field-note {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.clv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.summary-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px;
}

.summary-card span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 22px;
}

.summary-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.performance-panel {
  margin-top: 14px;
}

.performance-chart {
  min-height: 300px;
  margin-top: 20px;
}

.performance-chart svg {
  display: block;
  width: 100%;
  height: 300px;
  overflow: visible;
}

.model-performance-panel {
  background: var(--surface);
}

.cohort-note {
  max-width: 760px;
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.model-performance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.model-performance-stat {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 14px;
}

.model-performance-stat span,
.model-performance-stat small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.model-performance-stat strong {
  display: block;
  margin: 8px 0 5px;
  font-family: var(--mono);
  font-size: 20px;
}

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

.model-performance-chart {
  min-height: 330px;
  margin-top: 12px;
}

.model-performance-chart svg {
  display: block;
  width: 100%;
  height: 330px;
  overflow: visible;
}

.model-performance-model-line,
.model-performance-market-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.model-performance-model-line {
  stroke: var(--blue);
}

.model-performance-market-line {
  stroke: var(--amber);
  stroke-dasharray: 8 6;
}

.model-performance-point-model {
  fill: var(--blue);
  stroke: var(--surface);
  stroke-width: 3;
}

.model-performance-point-market {
  fill: var(--surface);
  stroke: var(--amber);
  stroke-width: 3;
}

.model-performance-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.model-performance-values {
  margin-top: 12px;
}

.model-performance-values .comparison-table-wrap {
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
}

.trade-tracking-details {
  margin-top: 14px;
}

.trade-tracking-body {
  display: grid;
  gap: 14px;
}

.trade-tracking-toolbar {
  align-items: center;
  margin: 0;
}

.trade-tracking-toolbar h2 {
  font-size: 18px;
}

.trade-tracking-body .clv-panel,
.trade-tracking-body .prospective-panel,
.trade-tracking-body .performance-panel {
  margin-top: 0;
}

.chart-grid-line {
  stroke: #343434;
  stroke-width: 1;
}

.chart-zero-line {
  stroke: #727272;
  stroke-dasharray: 5 5;
}

.chart-axis-text {
  fill: #909090;
  font-family: var(--mono);
  font-size: 10px;
}

.actual-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
}

.paper-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-dasharray: 8 5;
}

.chart-point-actual {
  fill: var(--blue);
}

.chart-point-paper {
  fill: var(--green);
}

.ledger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.ledger-heading {
  margin-bottom: 15px;
}

.ledger {
  display: grid;
  gap: 8px;
}

.ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.ledger-row:first-child {
  border-top: 0;
}

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

.ledger-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.ledger-value {
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
}

.result-badge {
  min-width: 52px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
  text-transform: uppercase;
}

.result-select {
  min-height: 30px;
  max-width: 92px;
  padding: 0 7px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 26px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.model-lab-heading {
  margin-bottom: 14px;
}

.model-lab-tabs {
  position: sticky;
  top: 8px;
  z-index: 5;
  display: flex;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(22, 22, 22, 0.9);
  padding: 5px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.model-lab-tab {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0 16px;
  color: var(--muted);
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.02em;
  cursor: pointer;
}

.model-lab-tab:hover,
.model-lab-tab:focus-visible {
  background: var(--surface-2);
  color: var(--text);
}

.model-lab-tab.active {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.model-lab-panel {
  display: grid;
  gap: 14px;
}

.model-lab-panel[hidden] {
  display: none;
}

.model-lab-panel:focus {
  outline: none;
}

.model-decision-summary {
  max-width: 780px;
  margin: -2px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.evidence-grid-primary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.model-blocker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  border-left: 3px solid var(--amber);
  border-radius: 4px 10px 10px 4px;
  background: var(--amber-soft);
  padding: 12px 14px;
}

.model-blocker-label {
  color: var(--amber);
  font: 800 9px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-blocker strong {
  font-size: 12px;
  line-height: 1.45;
}

.model-details {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.016);
}

.model-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  font: 750 11px/1.35 var(--mono);
  list-style: none;
  cursor: pointer;
}

.model-details > summary::-webkit-details-marker,
.roadmap-item > summary::-webkit-details-marker {
  display: none;
}

.model-details > summary::after {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  color: var(--muted);
  content: "";
}

.model-details[open] > summary::after {
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

.model-details > summary > span:first-child {
  display: grid;
  gap: 4px;
}

.model-detail-body,
.metric-glossary > .metric-definition-grid {
  margin: 0;
  border-top: 1px solid var(--border);
  padding: 16px;
}

.metric-glossary.panel {
  padding: 0;
}

.evidence-operations {
  margin-top: 14px;
}

.evidence-operations > .evidence-grid {
  border-top: 1px solid var(--border);
  padding: 14px;
}

.model-roster {
  border-top: 1px solid var(--border);
}

.model-roster-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(240px, 1.25fr);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.model-roster-row:last-child {
  border-bottom: 0;
}

.model-roster-row > div {
  display: grid;
  gap: 4px;
}

.model-roster-row strong {
  font-size: 13px;
}

.model-roster-row span,
.model-roster-row small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.model-role {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 9px;
  font-family: var(--mono);
  white-space: nowrap;
}

.model-role.live {
  border-color: rgba(72, 213, 151, 0.35);
  background: var(--green-soft);
  color: var(--green);
}

.model-role.blocked {
  border-color: rgba(239, 68, 68, 0.3);
  background: var(--red-soft);
  color: var(--red);
}

.rolling-backtest-empty {
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 0;
  padding: 18px 0 0;
}

.rolling-backtest-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

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

.evidence-panel {
  margin-bottom: 14px;
  border-color: rgba(239, 68, 68, 0.34);
}

.accuracy-roadmap-panel {
  margin-bottom: 14px;
  border-color: rgba(233, 184, 92, 0.3);
  background: linear-gradient(180deg, rgba(233, 184, 92, 0.035), var(--surface) 180px);
}

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

.accuracy-score-summary > .empty-state {
  grid-column: 1 / -1;
}

.accuracy-score-card {
  display: grid;
  min-width: 0;
  min-height: 108px;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  padding: 14px;
}

.accuracy-score-card > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.accuracy-score-card strong {
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.25;
}

.accuracy-score-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.accuracy-score-card.positive,
.accuracy-score-card.is-improvement {
  border-color: rgba(72, 213, 151, 0.35);
  background: linear-gradient(145deg, var(--green-soft), var(--surface-2) 72%);
}

.accuracy-score-card.warning,
.accuracy-score-card.is-unproven {
  border-color: rgba(233, 184, 92, 0.4);
  background: linear-gradient(145deg, var(--amber-soft), var(--surface-2) 72%);
}

.accuracy-roadmap {
  display: grid;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.accuracy-roadmap:empty {
  display: none;
}

.roadmap-item {
  border-bottom: 1px solid var(--border);
}

.roadmap-item > summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  list-style: none;
  cursor: pointer;
}

.roadmap-item > summary::after {
  display: block;
  width: 12px;
  height: 12px;
  grid-column: 4;
  justify-self: center;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  color: var(--muted);
  content: "";
}

.roadmap-item[open] > summary::after {
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

.roadmap-summary {
  display: grid;
  gap: 4px;
}

.roadmap-rank {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(160, 160, 160, 0.4);
  border-radius: 9px;
  background: var(--blue-soft);
  color: #a8c7ff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.roadmap-item h3,
.roadmap-item h4,
.roadmap-item strong {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.roadmap-item p,
.roadmap-item small,
.roadmap-item .roadmap-impact {
  display: block;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.roadmap-item > p {
  margin: -3px 48px 16px 52px;
  border-left: 2px solid var(--border);
  padding-left: 14px;
}

.roadmap-item .roadmap-status {
  align-self: center;
  white-space: nowrap;
}

.metric-definition-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.metric-definition-grid > div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  padding: 13px;
}

.metric-definition-grid strong {
  font-family: var(--mono);
  font-size: 11px;
}

.metric-definition-grid span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.evidence-item {
  min-height: 92px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.evidence-item span,
.evidence-item small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.evidence-item strong {
  display: block;
  margin: 9px 0 5px;
  font-size: 17px;
}

.model-card {
  min-height: 220px;
}

.model-index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.model-card h3 {
  margin: 32px 0 10px;
  font-size: 20px;
}

.model-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.model-card strong {
  display: block;
  margin-top: 22px;
  color: var(--green);
  font-size: 11px;
}

.methodology {
  display: grid;
  grid-template-columns: 0.8fr 2fr;
  gap: 40px;
  margin-top: 14px;
}

.experiment-results {
  margin-top: 14px;
}

.backtest-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.model-comparison {
  grid-column: 1 / -1;
  min-width: 0;
}

.comparison-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.comparison-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.comparison-table caption {
  padding: 0 12px 10px;
  color: var(--muted);
  font: 700 11px/1.45 var(--mono);
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.comparison-table th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.compact-grid {
  margin-top: 16px;
}

.backtest-metric {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 15px;
}

.backtest-metric span,
.backtest-metric small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.backtest-metric strong {
  display: block;
  margin: 8px 0 6px;
  font-family: var(--mono);
  font-size: 19px;
}

.backtest-warning {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--amber);
  font-size: 11px;
}

.rolling-backtest {
  grid-column: 1 / -1;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(72, 213, 151, 0.05), transparent 55%);
  padding: 18px;
}

.rolling-backtest-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.rolling-backtest-heading h3 {
  margin: 5px 0 0;
  font-size: 17px;
}

.rolling-backtest-return {
  text-align: right;
}

.rolling-backtest-return strong,
.rolling-backtest-return span {
  display: block;
}

.rolling-backtest-return strong {
  font-family: var(--mono);
  font-size: 26px;
}

.rolling-backtest-return span,
.rolling-backtest-meta,
.rolling-backtest-coverage {
  color: var(--muted);
  font-size: 10px;
}

.rolling-backtest-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  font-family: var(--mono);
}

.rolling-backtest-chart {
  min-height: 270px;
  margin-top: 10px;
}

.rolling-backtest-chart svg {
  display: block;
  width: 100%;
  height: 270px;
  overflow: visible;
}

.backtest-return-line {
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.backtest-unobserved-area {
  fill: rgba(160, 160, 160, 0.06);
}

.backtest-observed-line {
  stroke: var(--amber);
  stroke-dasharray: 3 5;
  stroke-width: 1;
}

.backtest-point-win {
  fill: var(--green);
  stroke: var(--surface);
  stroke-width: 3;
}

.backtest-point-loss {
  fill: var(--red);
  stroke: var(--surface);
  stroke-width: 3;
}

.chart-date-label {
  text-anchor: middle;
}

.rolling-backtest-coverage {
  margin: 8px 0 0;
  line-height: 1.5;
}

.methodology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.methodology-grid div {
  display: grid;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.methodology-grid strong {
  font-family: var(--mono);
}

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

dialog {
  width: min(480px, calc(100vw - 28px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

dialog form {
  padding: 22px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.dialog-heading h2 {
  margin: 6px 0 0;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-error {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--red);
  font-size: 11px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 1480px) {
  .history-fight-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-fight-row > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1180px) {
  .fighter-fight-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .fight-row {
    grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(92px, 0.65fr)) 42px;
  }

  .fight-row .row-metric:nth-of-type(5) {
    display: none;
  }

  .metric-grid,
  .portfolio-summary,
  .model-performance-summary,
  .clv-grid,
  .evidence-grid,
  .model-grid,
  .backtest-results {
    grid-template-columns: 1fr 1fr;
  }

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

  .accuracy-score-summary,
  .metric-definition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .stake-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
  }

  .stake-panel > div:first-child,
  .stake-panel .stake-result,
  .stake-panel > .compact-details,
  .stake-panel .decision-box,
  .stake-panel .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1024px) {
  .history-layout,
  .fighter-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-events-panel,
  .fighter-results-panel {
    max-height: 360px;
  }

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

  .fight-identity {
    grid-column: 1 / -1;
  }

  .fight-row .row-action {
    display: none;
  }

  .fight-row .row-metric:nth-of-type(5) {
    display: grid;
  }
}

@media (max-width: 820px) {
  .model-lab-tabs {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .model-performance-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .model-performance-toolbar .segmented-control {
    width: 100%;
  }

  .model-lab-tabs::-webkit-scrollbar {
    display: none;
  }

  .model-lab-tab {
    width: auto;
    flex: 1 1 auto;
    min-width: max-content;
    padding-inline: 10px;
  }

  .model-roster-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .model-roster-row > small {
    grid-column: 1 / -1;
  }

  .live-card-heading,
  .live-card-grid,
  .polymarket-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .polymarket-matchup,
  .polymarket-link {
    grid-column: 1 / -1;
  }

  .sidebar {
    inset: auto 0 0;
    width: auto;
    height: calc(68px + env(safe-area-inset-bottom));
    flex-direction: row;
    align-items: center;
    border-top: 1px solid var(--border);
    border-right: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }

  .brand,
  .sidebar-note {
    display: none;
  }

  .nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    margin: 0;
  }

  .nav-link {
    min-width: 0;
    justify-content: center;
    gap: 7px;
    padding: 0 5px;
    font-size: 11px;
    white-space: nowrap;
  }

  .nav-link .nav-mobile-label {
    display: inline;
  }

  .nav-link .nav-number,
  .nav-link .nav-desktop-label {
    display: none;
  }

  .main {
    margin-left: 0;
    padding: 0 18px calc(100px + env(safe-area-inset-bottom));
  }

  button,
  input,
  select {
    min-height: 44px;
  }

  input,
  select {
    font-size: 16px;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .topbar {
    min-height: 92px;
  }

  .authority-strip,
  .authority-copy {
    align-items: flex-start;
  }

  .authority-strip {
    flex-direction: column;
    gap: 10px;
  }

  .authority-flow {
    padding-left: 0;
    white-space: normal;
  }

  .event-hero {
    display: grid;
  }

  .event-stats {
    justify-content: space-between;
    gap: 14px;
  }

  .favorite-verdict-grid {
    grid-template-columns: 1fr;
  }

  .ledger-grid,
  .methodology {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .model-lab-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
  }

  .model-lab-tab {
    width: 100%;
    min-height: 40px;
    padding: 0 13px;
  }

  .model-blocker,
  .rolling-backtest-empty {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .model-details > summary {
    align-items: flex-start;
  }

  .model-details > summary > .pill {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0;
  }

  .topbar-actions {
    display: grid;
    width: 100%;
    justify-items: stretch;
  }

  .compact-field {
    justify-content: space-between;
  }

  #export-data {
    display: none;
  }

  .notice,
  .section-heading {
    align-items: flex-start;
  }

  .section-heading,
  .chart-heading {
    flex-wrap: wrap;
    gap: 12px;
  }

  .section-heading > :first-child,
  .chart-heading > :first-child {
    min-width: 0;
    flex: 1 1 100%;
  }

  .section-heading > .pill,
  .chart-heading > .pill {
    max-width: 100%;
    height: auto;
    min-height: 26px;
    padding-block: 5px;
    line-height: 1.3;
    white-space: normal;
  }

  #portfolio-view > .section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }

  #portfolio-view > .section-heading > div:first-child,
  #portfolio-view > .section-heading > .segmented-control {
    grid-column: 1 / -1;
  }

  #portfolio-view > .section-heading > .button {
    width: 100%;
    padding-inline: 10px;
  }

  .segmented-control button {
    flex: 1 1 0;
  }

  .notice .pill,
  .section-heading .legend {
    display: none;
  }

  .event-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .event-stats strong {
    font-size: 15px;
  }

  .fighter-probabilities,
  .driver-grid,
  .probability-legend,
  .portfolio-summary,
  .model-performance-summary,
  .clv-grid,
  .evidence-grid,
  .model-grid,
  .backtest-results,
  .methodology-grid,
  .form-row,
  .accuracy-score-summary,
  .metric-definition-grid {
    grid-template-columns: 1fr;
  }

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

  .metric-grid .quote-card {
    grid-column: 1 / -1;
  }

  .value-detail-grid {
    grid-template-columns: 1fr;
  }

  .market-gap-heading {
    align-items: flex-start;
  }

  .market-gap-heading .pill {
    min-height: 22px;
    padding-inline: 8px;
    font-size: 10px;
  }

  .best-value-highlight {
    align-items: flex-start;
  }

  .best-value-highlight > b {
    font-size: 14px;
  }

  .outcome-comparison-grid,
  .model-gap-row {
    grid-template-columns: 1fr;
  }

  .model-gap-row {
    gap: 9px;
  }

  .roadmap-item {
    display: block;
  }

  .roadmap-item > summary {
    grid-template-columns: 32px minmax(0, 1fr) 20px;
    gap: 12px;
  }

  .roadmap-rank {
    width: 30px;
    height: 30px;
  }

  .roadmap-item .roadmap-status {
    grid-column: 2;
    justify-self: start;
  }

  .roadmap-item > summary::after {
    grid-column: 3;
    grid-row: 1;
  }

  .roadmap-item > p {
    margin: 0 0 14px 44px;
  }

  .favorite-comparison-table {
    min-width: 640px;
  }

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

  .history-detail-heading,
  .fighter-detail-heading,
  .fighter-fight-row {
    display: grid;
  }

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

  .history-scorecard {
    text-align: left;
  }

  .history-fight-row {
    grid-template-columns: 1fr 1fr;
  }

  .history-fight-row > div:first-child {
    grid-column: 1 / -1;
  }

  .rolling-backtest-heading {
    display: grid;
  }

  .rolling-backtest-return {
    text-align: left;
  }

  .metric-card {
    min-height: 84px;
  }

  .stake-panel {
    display: block;
  }

  .panel {
    padding: 17px;
  }

  .performance-chart svg {
    height: 250px;
  }

  .model-performance-chart,
  .model-performance-chart svg {
    min-height: 260px;
    height: 260px;
  }

  .ledger-row {
    grid-template-columns: 1fr auto;
  }

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

  .prospective-row .ledger-value {
    text-align: left;
  }

  .ledger-row .result-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Public-release visual system */

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: var(--radius-sm);
  background: var(--text);
  padding: 10px 14px;
  color: var(--bg);
  font-weight: 800;
  text-decoration: none;
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sidebar {
  width: 248px;
  border-color: rgba(102, 102, 102, 0.72);
  background: rgba(24, 24, 24, 0.97);
  padding: 28px 20px 24px;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.12);
}

.brand {
  gap: 13px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.brand strong {
  font-size: 16px;
  letter-spacing: -0.015em;
}

.brand small {
  color: var(--muted-strong);
  font-size: 10px;
}

.nav {
  gap: 7px;
  margin-top: 48px;
}

.nav-link {
  position: relative;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0 13px;
  color: var(--muted);
  font-weight: 680;
}

.nav-link::before {
  position: absolute;
  inset: 10px auto 10px -21px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: transparent;
  content: "";
}

.nav-link:hover {
  border-color: rgba(102, 102, 102, 0.54);
  background: rgba(34, 34, 34, 0.7);
}

.nav-link.active {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.nav-link.active::before {
  background: var(--blue);
}

.nav-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sidebar-note {
  color: var(--muted-strong);
}

.main {
  margin-left: 248px;
  padding: 0 clamp(24px, 3.7vw, 56px) 80px;
}

.topbar,
.view,
.app-footer {
  width: 100%;
  max-width: var(--content-max);
  margin-right: auto;
  margin-left: auto;
}

.topbar {
  min-height: 118px;
  border-color: var(--border);
}

.topbar-copy {
  min-width: 0;
  padding: 24px 0;
}

.topbar h1 {
  margin-top: 4px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.page-summary {
  max-width: 720px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.eyebrow {
  color: var(--muted-strong);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.pill {
  min-height: 28px;
  border-color: var(--border);
  padding: 0 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.compact-field {
  min-height: 46px;
  border-color: var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(27, 27, 27, 0.78);
  padding: 0 12px;
  color: var(--muted-strong);
  font-size: 13px;
}

.compact-field select {
  min-height: 42px;
}

select,
input {
  border-color: var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.button {
  min-height: 44px;
  border-radius: var(--radius-sm);
  padding: 0 17px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}

.button-primary {
  background: var(--text);
  color: var(--bg);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.button-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted-strong);
  box-shadow: none;
}

.button-ghost:hover {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.button:not(:disabled):active,
.schedule-card:active,
.history-event-card:active,
.fighter-result:active {
  transform: translateY(1px);
}

.view {
  padding-top: 30px;
}

.panel,
.market-readiness {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel {
  border-radius: var(--radius);
  padding: 24px;
}

.notice {
  border-radius: var(--radius-md);
  padding: 15px 17px;
}

.notice p,
.market-readiness-summary,
.market-readiness-alerts p,
.market-readiness-diagnostics > p {
  font-size: 12px;
  line-height: 1.55;
}

.market-readiness-metrics {
  gap: 16px;
  font-size: 12px;
}

.market-readiness-metrics strong {
  font-size: 15px;
}

.section-heading {
  margin-bottom: 20px;
}

.event-hero h2,
.section-heading h2,
.panel h2 {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.legend {
  color: var(--muted-strong);
  font-size: 12px;
}

.schedule-strip {
  margin-top: 14px;
}

.schedule-list {
  grid-auto-columns: minmax(230px, 1fr);
  gap: 10px;
  scroll-snap-type: inline proximity;
}

.schedule-card {
  min-height: 122px;
  scroll-snap-align: start;
  border-color: var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.schedule-card:hover,
.schedule-card.active {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.schedule-card span,
.schedule-card small,
.history-event-card span,
.history-event-card small,
.fighter-result span,
.fighter-result small {
  font-size: 12px;
  line-height: 1.45;
}

.schedule-card strong {
  margin: 8px 0;
  font-size: 15px;
}

.event-hero {
  align-items: center;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding: 30px 2px;
}

.event-stats {
  gap: 0;
}

.event-stats div {
  min-width: 124px;
  border-left: 1px solid var(--border);
  padding-left: 22px;
}

.event-stats span,
.metric-card span,
.row-metric span,
.summary-card span,
.model-performance-stat span,
.evidence-item span,
.evidence-item small,
.backtest-metric span,
.backtest-metric small {
  color: var(--muted-strong);
  font-size: 11px;
  letter-spacing: 0.025em;
}

.event-stats strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.fight-list {
  gap: 11px;
}

.fight-row {
  min-height: 92px;
  border-color: var(--border);
  border-radius: var(--radius-md);
  background: rgba(27, 27, 27, 0.88);
  padding: 17px 18px;
  box-shadow: var(--shadow-sm);
}

.fight-row:hover,
.fight-row.selected {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.fight-row.selected {
  box-shadow: inset 3px 0 0 var(--blue), var(--shadow-sm);
}

.fight-meta {
  flex-wrap: wrap;
  font-size: 11px;
  line-height: 1.35;
}

.fighters {
  flex-wrap: wrap;
  font-size: 15px;
  line-height: 1.35;
}

.fighters .versus {
  font-size: 11px;
}

.row-metric span,
.favorite-row-metric small {
  font-size: 11px;
}

.row-metric strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.row-action {
  width: 38px;
  height: 38px;
  border-color: var(--border-strong);
}

.calculator-layout {
  gap: 18px;
  margin-top: 46px;
}

.calculator-panel {
  grid-column: 1;
  grid-row: 1;
}

.calculator-support {
  display: grid;
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  gap: 10px;
}

.calculator-support .selected-fight-details {
  margin-top: 0;
}

.stake-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 18px;
}

.fighter-probability,
.favorite-verdict,
.metric-card,
.backtest-metric,
.summary-card,
.model-performance-stat {
  border-color: var(--border);
  background: rgba(34, 34, 34, 0.8);
}

.favorite-tag,
.compact-label {
  min-height: 22px;
  font-size: 10px;
}

.favorite-verdict > span,
.favorite-verdict small,
.metric-card small,
.driver-card span,
.driver-card p,
.field-note,
.model-performance-note,
.favorite-context,
.favorite-comparison-table caption {
  font-size: 12px;
}

.favorite-comparison-table {
  font-size: 12px;
}

.favorite-comparison-table thead th {
  font-size: 11px;
}

.compact-details,
.model-details {
  border-color: var(--border);
  border-radius: var(--radius-md);
}

.compact-details > summary,
.model-details > summary {
  min-height: 48px;
  padding: 11px 14px;
  color: var(--muted-strong);
  font-size: 12px;
}

.context-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.field > span,
.stake-result span,
.decision-box p,
.calculation-row {
  font-size: 12px;
}

.decision-box {
  border-radius: var(--radius-md);
  padding: 15px;
}

.result-select {
  min-height: 44px;
  max-width: 118px;
  border-color: var(--border-strong);
  padding: 0 10px;
  font-size: 11px;
}

.segmented-control {
  border-color: var(--border-strong);
  border-radius: 10px;
  background: rgba(18, 18, 18, 0.25);
}

.segmented-control button {
  min-height: 38px;
  border-radius: 7px;
  font-size: 12px;
}

.segmented-control button.active,
.segmented-control button[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.history-layout,
.fighter-layout {
  grid-template-columns: minmax(270px, 0.62fr) minmax(0, 1.75fr);
  gap: 18px;
}

.history-events-panel,
.fighter-results-panel {
  border-radius: var(--radius);
}

.history-event-card,
.fighter-result {
  min-height: 74px;
  border-color: transparent;
  border-radius: var(--radius-md);
  background: transparent;
  padding: 13px 14px;
}

.history-event-card:hover,
.history-event-card.active,
.fighter-result:hover,
.fighter-result.active {
  border-color: var(--border);
  background: var(--surface-2);
}

.history-event-card.active,
.fighter-result.active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.year-tabs button,
.organization-tabs button {
  min-height: 42px;
  border-color: var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.year-tabs button.active,
.organization-tabs button.active {
  border-color: var(--border-strong);
  background: var(--blue-soft);
}

.history-split-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.inline-diagnostics {
  display: inline-block;
  margin-left: 6px;
}

.inline-diagnostics summary {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 12px;
}

.inline-diagnostics p {
  margin: 8px 0 0;
}

.history-fight-row {
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.8fr);
  align-items: start;
  gap: 16px;
  border-color: var(--border);
  border-radius: var(--radius-md);
  background: rgba(34, 34, 34, 0.72);
  padding: 16px;
}

.history-fight-outcome,
.history-bout-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.history-bout-stats {
  grid-column: 1 / -1;
}

.history-bout-stat-grid {
  padding: 14px;
}

.history-fight-row .fighters button {
  min-height: 32px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.fighter-search input {
  min-height: 46px;
  padding: 0 14px;
}

.fighter-metric-groups {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.fighter-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 0;
  padding: 14px;
}

.fighter-metric-section > summary .pill {
  margin-left: auto;
}

.fighter-totals {
  border-color: var(--border);
  border-radius: var(--radius-md);
  background: rgba(34, 34, 34, 0.72);
  padding: 17px;
}

.fighter-fight-row small {
  font-size: 12px;
}

.model-lab-tabs {
  top: 12px;
  border-color: var(--border-strong);
  background: rgba(18, 18, 18, 0.88);
  box-shadow: var(--shadow-md);
}

.model-lab-tab {
  min-height: 42px;
  font-size: 12px;
}

.evidence-item span,
.evidence-item small,
.backtest-metric span,
.backtest-metric small,
.model-roster-row span,
.model-roster-row small,
.methodology-grid span {
  font-size: 12px;
  line-height: 1.5;
}

.comparison-table-wrap {
  border-color: var(--border);
  scrollbar-color: var(--border-strong) transparent;
}

.comparison-table {
  font-size: 13px;
}

.comparison-table th {
  font-size: 11px;
}

.app-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding: 26px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.app-footer strong {
  color: var(--muted-strong);
}

.app-footer p {
  max-width: 650px;
  margin: 5px 0 0;
}

.operator-access-note,
.responsible-use-note {
  margin: 4px 0 14px;
  border-left: 3px solid var(--amber);
  padding: 4px 0 4px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.operator-access-note a,
.responsible-use-note a {
  color: var(--text);
  text-underline-offset: 3px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.footer-links a {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  color: var(--muted-strong);
  text-underline-offset: 3px;
}

.policy-body {
  min-width: 0;
}

.policy-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.policy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.policy-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 780;
  text-decoration: none;
}

.policy-brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.policy-header .button {
  flex: 0 0 auto;
}

.policy-hero {
  padding: clamp(46px, 8vw, 84px) 0 28px;
}

.policy-hero h1 {
  max-width: 760px;
  margin: 7px 0 14px;
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.policy-hero > p:last-child {
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
}

.policy-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 18px 0 28px;
  padding-bottom: 6px;
}

.policy-nav a {
  min-height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--muted-strong);
  text-decoration: none;
}

.policy-grid {
  display: grid;
  gap: 14px;
}

.policy-section {
  scroll-margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: clamp(22px, 4vw, 34px);
}

.policy-section h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: -0.035em;
}

.policy-section h3 {
  margin: 24px 0 7px;
  font-size: 16px;
}

.policy-section p,
.policy-section li {
  color: var(--muted);
  line-height: 1.7;
}

.policy-section a {
  color: var(--text);
  text-underline-offset: 3px;
}

.policy-section ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.policy-callout {
  margin-top: 20px;
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
  padding: 14px 16px;
}

.policy-footer {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  color: var(--muted);
  font-size: 12px;
}

dialog {
  border-color: var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

dialog::backdrop {
  background: rgba(16, 16, 16, 0.78);
  backdrop-filter: blur(4px);
}

.dialog-heading {
  gap: 18px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.result-review-context {
  display: grid;
  gap: 4px;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  padding: 14px;
}

.result-review-context span,
.result-review-warning {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.result-review-warning {
  margin: 16px 0 0;
  border-left: 3px solid var(--amber);
  padding-left: 12px;
}

@media (max-width: 1180px) {
  .stake-panel {
    grid-column: 1;
    grid-row: auto;
    order: 2;
    position: static;
  }

  .calculator-panel {
    order: 1;
  }

  .calculator-support {
    grid-column: 1;
    grid-row: auto;
    order: 3;
  }

  .fighter-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .history-layout,
  .fighter-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-events-panel,
  .fighter-results-panel {
    max-height: 330px;
  }

  .history-fight-row {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.8fr);
  }
}

@media (max-width: 820px) {
  .sidebar {
    width: auto;
    height: calc(74px + env(safe-area-inset-bottom));
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: rgba(24, 24, 24, 0.94);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
  }

  .nav {
    margin: 0;
    gap: 4px;
  }

  .nav-link {
    min-height: 58px;
    flex-direction: column;
    gap: 3px;
    border-radius: 10px;
    padding: 5px 2px;
    font-size: 10px;
  }

  .nav-link::before {
    inset: auto 22% -7px;
    width: auto;
    height: 3px;
    border-radius: 4px 4px 0 0;
  }

  .nav-icon,
  .nav-icon svg {
    width: 21px;
    height: 21px;
  }

  .main {
    margin-left: 0;
    padding: 0 20px calc(108px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 106px;
  }

  .view {
    padding-top: 24px;
  }

  .calculator-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .stake-panel {
    display: block;
  }

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

  .model-lab-tabs {
    display: flex;
    width: 100%;
    overflow-x: auto;
  }

  .model-lab-tab {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
  }

  .compact-field select,
  .year-tabs button,
  .organization-tabs button,
  .segmented-control button,
  .result-select,
  .model-lab-tab,
  .history-event-card,
  .fighter-result,
  .compact-details > summary,
  .model-details > summary,
  .inline-diagnostics > summary,
  [data-fighter-link],
  .footer-links a {
    min-height: 44px;
  }

  .inline-diagnostics > summary,
  [data-fighter-link],
  .footer-links a {
    display: inline-flex;
    align-items: center;
  }

  .inline-diagnostics > summary::after {
    width: 10px;
    height: 10px;
    margin-left: 7px;
    background:
      linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
      linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
    color: var(--blue);
    content: "";
  }

  .inline-diagnostics[open] > summary::after {
    background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
  }
}

@media (max-width: 640px) {
  .main {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar {
    min-height: 0;
    align-items: flex-start;
    padding: 20px 0;
  }

  .topbar-copy {
    padding: 0;
  }

  .year-tabs button {
    min-width: 62px;
  }

  .topbar h1 {
    font-size: 30px;
  }

  .page-summary {
    font-size: 13px;
  }

  .topbar-actions {
    width: 100%;
  }

  .compact-field {
    width: 100%;
  }

  .model-lab-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }

  .model-lab-tab {
    width: 100%;
    min-width: 0;
  }

  .schedule-list {
    grid-auto-columns: min(82vw, 300px);
  }

  .event-hero {
    gap: 22px;
    padding: 25px 0;
  }

  .event-stats {
    width: 100%;
  }

  .event-stats div {
    min-width: 0;
    padding-left: 12px;
  }

  .event-stats div:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .event-stats span {
    font-size: 10px;
    line-height: 1.35;
  }

  .event-stats strong {
    font-size: 18px;
  }

  .fight-row {
    gap: 14px 12px;
    padding: 16px;
  }

  .fight-identity,
  .fight-row .row-metric {
    min-width: 0;
  }

  .fighters {
    align-items: flex-start;
    font-size: 14px;
  }

  .fighters .versus {
    padding-top: 2px;
  }

  .panel {
    padding: 18px;
  }

  .fighter-probabilities,
  .history-fight-outcome,
  .history-bout-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .history-bout-stats {
    grid-column: 1;
  }

  .history-scorecard {
    min-width: 0;
  }

  .fighter-metric-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 10px;
  }

  .section-heading > .pill,
  .chart-heading > .pill,
  .notice .pill,
  .model-details > summary > .pill {
    display: inline-flex;
  }

  .section-heading .legend {
    display: flex;
  }

  #export-data {
    display: inline-flex;
  }

  .trade-tracking-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trade-tracking-toolbar > div:first-child,
  .trade-tracking-toolbar > .segmented-control {
    grid-column: 1 / -1;
  }

  .trade-tracking-toolbar > .button {
    width: 100%;
    padding-inline: 8px;
  }

  .app-footer {
    display: grid;
    gap: 18px;
    margin-top: 44px;
  }

  .footer-links {
    display: grid;
    justify-content: start;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .dialog-actions .button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .nav-link {
    font-size: 10px;
  }

  .fighter-metric-grid,
  .metric-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-grid .quote-card {
    grid-column: auto;
  }

  .trade-tracking-toolbar,
  .dialog-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .trade-tracking-toolbar > *,
  .dialog-actions > * {
    grid-column: 1;
  }
}

/* Compact whole-row toggles; details belong to each matchup, never a side pane. */
.fight-card-bout.matchup-card { display: block; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: none; }
.matchup-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 16px; width: 100%; min-height: 80px; gap: 20px; align-items: center; padding: 20px; border: 0; border-radius: 12px; text-align: left; color: var(--text); background: transparent; box-shadow: none; transform: none; transition: background-color 140ms ease; }
.matchup-row:hover, .matchup-row[aria-expanded="true"] { background: var(--surface-2); box-shadow: none; transform: none; }
.matchup-row[aria-expanded="true"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.matchup-row:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.matchup-row-names { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.matchup-row-names > span { color: var(--muted); font-weight: 400; }
.matchup-row-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.matchup-row-values > span { display: grid; gap: 4px; }
.matchup-row-values small { font-size: .75rem; color: var(--muted); font-weight: 400; }
.matchup-row-values b { font-family: var(--sans); font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.matchup-row-names > .matchup-gap { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--amber); vertical-align: middle; }
.matchup-row.matchup-row-gap { background: var(--amber-soft); }
.matchup-row.matchup-row-gap:hover, .matchup-row.matchup-row-gap[aria-expanded="true"] { background: rgba(240, 184, 91, .17); }
.gap-settings { position: relative; }
.gap-settings > summary, .gap-settings-help > summary { min-height: 44px; padding: 12px; cursor: pointer; color: var(--muted-strong); }
.gap-settings-panel { position: absolute; z-index: 30; right: 0; width: min(290px, calc(100vw - 32px)); padding: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.gap-settings-panel label { display: block; font-size: .8125rem; margin-bottom: 8px; }
.gap-settings-panel input, .gap-settings-panel select { width: 100%; min-height: 44px; margin-bottom: 12px; }
.gap-settings-panel p { font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.gap-settings-help > summary { display: grid; place-items: center; width: 44px; padding: 0; margin-left: auto; list-style: none; border-radius: 50%; text-align: center; }
.gap-settings-help > summary::-webkit-details-marker { display: none; }
.matchup-chevron { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.matchup-row[aria-expanded="true"] .matchup-chevron { transform: rotate(225deg); }
.matchup-detail-host:empty { display: none; }
.matchup-inline-detail.calculator-layout { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; margin: 0; padding: 24px; border-top: 1px solid var(--border); }
.matchup-inline-detail.calculator-layout > * { grid-column: 1 / -1; grid-row: auto; min-width: 0; }
.matchup-inline-detail > .panel { width: 100%; min-width: 0; box-shadow: none; }
.matchup-inline-detail .calculator-panel, .matchup-inline-detail .calculator-support, .matchup-inline-detail .stake-panel { position: static; max-height: none; overflow: visible; }
.matchup-inline-detail > .matchup-inline-meta { margin: 0; font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.matchup-inline-detail .eyebrow, .matchup-inline-detail .pill, .matchup-inline-detail .field-label { font-family: var(--sans); letter-spacing: .025em; }
@media (max-width: 640px) {
  .matchup-row { grid-template-columns: minmax(0, 1fr) 12px; gap: 12px; }
  .matchup-row-names { grid-column: 1; }
  .matchup-row-values { grid-column: 1; }
  .matchup-chevron { grid-column: 2; grid-row: 1 / 3; }
  .matchup-inline-detail.calculator-layout { padding: 12px; }
}

/* Shared full-scale chart: solid observations, dashed current model estimates. */
.price-history { --fighter-a: #6ee7b7; --fighter-b: #8ab8ff; min-width: 0; margin: 16px 0 28px; padding: 24px 0; border-block: 1px solid var(--border); font-family: var(--sans); font-variant-numeric: tabular-nums; }
.price-history-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; gap: 12px 16px; margin-bottom: 24px; }
.price-history-heading h3 { margin: 0 0 2px; font-size: 1rem; font-weight: 600; }
.price-history-heading span, .price-history small { color: var(--muted); font-size: .75rem; }
.price-history-readout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.price-history-contender { display: grid; align-content: start; gap: 4px; min-width: 0; }
.price-history-a { --fighter: var(--fighter-a); }
.price-history-b { --fighter: var(--fighter-b); }
.price-history-name { color: var(--fighter); font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
.price-history-name::before { content: ""; display: inline-block; width: 12px; margin: 0 7px 4px 0; border-top: 3px solid currentColor; }
.price-history-value { color: var(--text); font: 600 clamp(1.5rem, 3vw, 2.125rem)/1.2 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.price-history-estimate { color: var(--fighter); font-size: .8125rem; }
.price-history-estimate::before { content: ""; display: inline-block; width: 12px; margin: 0 7px 4px 0; border-top: 2px dashed currentColor; }
.price-history-contender small { min-height: 3em; overflow-wrap: anywhere; }
.price-history button { min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted-strong); font: inherit; font-size: .875rem; box-shadow: none; transform: none; overflow-wrap: anywhere; }
.price-history button[aria-pressed="true"] { color: var(--text); border-color: var(--border); background: var(--surface-3); }
.price-history button:hover { color: var(--text); background: var(--surface-2); box-shadow: none; transform: none; }
.price-history button:focus-visible, .price-history-graph:focus-visible, .price-history-help-disclosure summary:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.price-history p { margin: 12px 0; font-size: .8125rem; color: var(--muted-strong); overflow-wrap: anywhere; }
.price-history-help-disclosure { position: relative; align-self: start; }
.price-history-help-disclosure summary { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; cursor: pointer; list-style: none; color: var(--muted); border-radius: 50%; }
.price-history-help-disclosure summary::-webkit-details-marker { display: none; }
.price-history-help-disclosure summary span { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; font: 600 .75rem var(--sans); }
.price-history-help-disclosure summary:hover, .price-history-help-disclosure[open] summary { color: var(--text); background: var(--surface-2); }
.price-history-help-copy { position: absolute; z-index: 4; right: 0; top: calc(100% + 8px); width: min(280px, calc(100vw - 96px)); padding: 4px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); box-shadow: 0 8px 28px #0005; }
.price-history-graph { display: grid; grid-template-columns: 40px minmax(0, 1fr); height: 240px; margin-top: 20px; border-radius: 4px; }
.price-history-scale { display: flex; flex-direction: column; justify-content: space-between; padding-block: 0; color: var(--muted); font-size: .75rem; line-height: 16px; }
.price-history-canvas { position: relative; min-width: 0; height: 240px; }
.price-history-graph svg { display: block; width: 100%; height: 240px; overflow: visible; touch-action: pan-y; cursor: crosshair; }
.price-history-grid { stroke: var(--border); stroke-width: 1; opacity: .6; vector-effect: non-scaling-stroke; }
.price-history-line { fill: none; stroke: var(--fighter); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.price-history-line.price-history-b { stroke-width: 1.5; }
.price-history-model { stroke: var(--fighter); stroke-width: 5; stroke-dasharray: 6 6; opacity: .5; vector-effect: non-scaling-stroke; }
.price-history-model.price-history-b { stroke-dashoffset: 6; }
.price-history-cursor { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.price-history-dot { position: absolute; width: 9px; height: 9px; border: 1px solid var(--surface); border-radius: 50%; background: var(--fighter); transform: translate(-50%, -50%); pointer-events: none; }
.price-history-dot.price-history-b { width: 6px; height: 6px; }
.price-history-plot { position: relative; }
.price-history .price-history-status { position: absolute; z-index: 2; top: 84px; left: 56px; right: 16px; margin: 0; padding: 12px; border-radius: 8px; background: var(--surface); text-align: center; pointer-events: none; }
.price-history [id$="price-history-observation"] { min-height: 3em; }
.price-history-times { display: flex; justify-content: space-between; gap: 16px; min-height: 3em; margin: 8px 0 20px 40px; font-size: .75rem; color: var(--muted); }
.price-history-times span { max-width: 48%; overflow-wrap: anywhere; }
.price-history-times span:last-child { text-align: right; }
.price-history-ranges { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; }
.price-history [role="status"]:empty { display: none; }
.price-history > small { display: block; min-height: 3em; margin-top: 12px; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .price-history-heading { grid-template-columns: minmax(0, 1fr) 44px; }
  .price-history-ranges { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .price-history-help-disclosure { grid-column: 2; grid-row: 1; }
}
@media (max-width: 380px) {
  .price-history-times { min-height: 4.5em; }
}
@media (prefers-reduced-motion: reduce) {
  .matchup-row, .price-history button { transition: none; }
}

@media (pointer: coarse) {
  .button,
  .nav-link,
  .year-tabs button,
  .organization-tabs button,
  .segmented-control button,
  .result-select,
  .model-lab-tab,
  .history-event-card,
  .fighter-result,
  .compact-details > summary,
  .model-details > summary {
    min-height: 44px;
  }
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
}
.event-select-control {
  display: none;
  min-width: 0;
  gap: 7px;
  margin-bottom: 14px;
}
.event-select-control label {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}
.event-select-control select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 9px 38px 9px 12px;
  color: var(--text);
}
#fight-card-time-zone {
  margin: -12px 0 16px;
}
.fight-card-segments {
  min-width: 0;
  overflow: clip;
  gap: 22px;
}
.fight-card-segment,
.fight-card-segment__header,
.fight-card-segment__heading,
.fight-card-segment__bouts,
.segment-fights,
.fight-card-bout,
.fight-card-bout__identity,
.fight-card-bout__metrics,
.fight-metrics,
.fight-card-bout__metric {
  min-width: 0;
}
.fight-card-segment__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 22px;
  margin-bottom: 10px;
}
.fight-card-segment__heading {
  display: flex;
  min-width: 0;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px 12px;
}
.fight-card-segment h3,
.segment-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.fight-card-segment__time {
  color: var(--muted-strong);
  font: 700 11px/1.45 var(--mono);
}
.fight-card-segment__count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.fight-card-segment__bouts,
.segment-fights {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fight-card-segment__bouts > li,
.segment-fights > li {
  min-width: 0;
}
.fight-card-bout {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(105px, 0.65fr)) minmax(132px, auto);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(27, 27, 27, 0.88);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.fight-card-bout__identity {
  grid-column: 1;
}
.fight-card-bout__matchup {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
}
.fight-card-bout__meta {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  font: 700 11px/1.45 var(--mono);
}
.fight-card-bout__metrics,
.fight-metrics {
  display: grid;
  grid-column: 2 / span 4;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}
.fight-card-bout__metric {
  display: grid;
  gap: 4px;
}
.fight-card-bout__metric dt {
  color: var(--muted-strong);
  font-size: 11px;
  letter-spacing: 0.025em;
}
.fight-card-bout__metric dd {
  margin: 0;
  overflow-wrap: anywhere;
  font: 700 13px/1.45 var(--mono);
}
.fight-card-bout__action,
.fight-detail-action:not(.matchup-row) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 8px 10px;
  color: var(--text);
  overflow-wrap: anywhere;
  cursor: pointer;
}
.fight-card-bout__action:focus-visible,
.fight-detail-action:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.fight-card-segment__empty {
  margin: 0;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 15px;
  color: var(--muted);
}
@supports (grid-template-columns: subgrid) {
  .fight-card-bout__metrics,
  .fight-metrics {
    grid-template-columns: subgrid;
  }
}
@media (min-width: 821px) and (max-width: 1180px) {
  .fight-card-bout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .fight-card-bout__identity {
    grid-column: 1 / -1;
  }
  .fight-card-bout__metrics,
  .fight-metrics {
    grid-column: 1 / span 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .event-select-control {
    display: grid;
  }
  .schedule-list {
    display: none;
  }
  .fight-card-segment__header {
    align-items: flex-start;
    flex-direction: column;
  }
  .fight-card-bout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .fight-card-bout__identity,
  .fight-card-bout__metrics,
  .fight-metrics,
  .fight-card-bout__action,
  .fight-detail-action {
    grid-column: 1 / -1;
  }
  .fight-card-bout__metrics,
  .fight-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 380px) {
  .fight-card-bout,
  .fight-card-bout__metrics,
  .fight-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}
