:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --ink: #172033;
  --muted: #667085;
  --soft: #d9e0ea;
  --line: #e5eaf1;
  --nav: #101827;
  --nav-soft: #1c2637;
  --green: #10a36d;
  --green-soft: #dcf7ed;
  --amber: #c98612;
  --amber-soft: #fff2d8;
  --red: #d84f45;
  --blue: #2f68c9;
  --cyan: #00a5c8;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(18, 31, 53, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

.boot-screen,
.error-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
}

.boot-mark {
  width: 46px;
  height: 46px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(16, 163, 109, 0.06), transparent 220px),
    var(--bg);
}

.sidebar {
  min-height: 100vh;
  padding: 22px 16px;
  background: var(--nav);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
}

.brand-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #d8ffeb;
  background: #173927;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}

.brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.08;
  letter-spacing: 0;
}

.brand span,
.source-label,
.nav-list a,
.source-card dt,
.source-card dd {
  font-size: 12px;
}

.brand span {
  display: block;
  color: #a6b2c5;
  margin-top: 5px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-list a {
  color: #b7c3d4;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 7px;
}

.nav-list a.active,
.nav-list a:hover {
  color: #ffffff;
  background: var(--nav-soft);
}

.source-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.source-card.quiet {
  margin-top: auto;
}

.provenance-card {
  background:
    linear-gradient(180deg, rgba(16, 163, 109, 0.08), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.06);
}

.source-label {
  display: block;
  color: #9fb0c5;
  margin-bottom: 12px;
}

.source-card dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.source-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.source-card dt {
  color: #9fb0c5;
}

.source-card dd {
  margin: 0;
  color: #ffffff;
  font-weight: 700;
}

.provenance-card dd {
  max-width: 116px;
  line-height: 1.25;
  text-align: right;
  overflow-wrap: anywhere;
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 92px;
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.topbar h1,
.panel h2,
.match-title h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 22px;
  line-height: 1.15;
}

.topbar p,
.panel-head p,
.match-title p,
.drivers p,
.error-screen p {
  margin: 5px 0 0;
  color: var(--muted);
}

.topbar p {
  font-size: 13px;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-controls,
.feed-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.feed-controls {
  flex: 1 1 100%;
}

.search-box,
.select-control,
.edge-control,
.file-control,
.source-chip {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
}

.search-box input,
.select-control select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-box input {
  width: 190px;
}

.edge-control span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.edge-control input {
  width: 76px;
  accent-color: var(--green);
}

.file-control {
  position: relative;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.file-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.sample-button {
  min-height: 38px;
  padding: 0 11px;
  color: #145b42;
  background: var(--green-soft);
  border: 1px solid #b9ead9;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.sample-button.result {
  color: #28598f;
  background: #edf4ff;
  border-color: #cfe0ff;
}

.sample-button.model {
  color: #684b00;
  background: #fff7dc;
  border-color: #f3df9f;
}

.sample-button.json {
  color: #3b4a62;
  background: #f4f7fb;
  border-color: #d7e0ec;
}

.sample-button.prediction {
  color: #5f3d00;
  background: #fff3cd;
  border-color: #ead08a;
}

.sample-button.ai {
  color: #24585e;
  background: #e9fbff;
  border-color: #b9e7f0;
}

.sample-button.llm {
  color: #4c1d95;
  background: #ede9fe;
  border-color: #ddd6fe;
}

.source-chip {
  color: var(--muted);
  background: #f2f5f9;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.source-chip.imported {
  color: #06784f;
  background: var(--green-soft);
  border-color: #b9ead9;
}

.source-chip.settled {
  color: #28598f;
  background: #edf4ff;
  border-color: #cfe0ff;
}

.source-chip.model {
  color: #684b00;
  background: #fff7dc;
  border-color: #f3df9f;
}

.source-chip.ai {
  color: #24585e;
  background: #e9fbff;
  border-color: #b9e7f0;
}

.source-chip.llm {
  color: #4c1d95;
  background: #ede9fe;
  border-color: #ddd6fe;
}

.feed-control {
  min-height: 38px;
  display: grid;
  grid-template-columns: auto minmax(170px, 240px) 34px auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.feed-control label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.feed-control > input {
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  font-size: 12px;
}

.feed-control > input:focus {
  border-color: #93d8bf;
  box-shadow: 0 0 0 3px rgba(16, 163, 109, 0.12);
}

.feed-button {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #145b42;
  background: var(--green-soft);
  border: 1px solid #b9ead9;
  border-radius: 6px;
  cursor: pointer;
}

.feed-button svg {
  width: 15px;
  height: 15px;
}

.auto-feed {
  min-height: 28px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.auto-feed input {
  accent-color: var(--green);
}

.feed-control small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.feed-control.synced {
  border-color: #b9ead9;
  background: #fbfffd;
}

.feed-control.synced small {
  color: #06784f;
}

.feed-control.error {
  border-color: #f2b8b3;
  background: #fffafa;
}

.feed-control.error small {
  color: var(--red);
}

.main-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(580px, 1fr) minmax(340px, 400px);
  grid-template-rows: minmax(340px, 1fr) minmax(290px, 0.82fr);
  gap: 14px;
  padding: 16px;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.featured-prediction-panel {
  grid-column: 1 / -1;
  grid-row: 1;
  overflow: hidden;
}

.featured-prediction-panel > .panel-head,
.featured-prediction-grid,
.featured-analysis-layout {
  width: 100%;
  max-width: 1480px;
  margin-left: auto;
  margin-right: auto;
}

.featured-head {
  align-items: flex-start;
}

.featured-head-meta {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.featured-model-spec {
  min-width: 220px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: right;
}

.featured-model-spec strong,
.featured-model-spec span {
  display: block;
}

.featured-model-spec strong {
  font-size: 13px;
}

.featured-model-spec span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.featured-score-live {
  min-width: 220px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: right;
}

.featured-score-live span,
.featured-score-live strong,
.featured-score-live small {
  display: block;
}

.featured-score-live span,
.featured-score-live small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.featured-score-live strong {
  margin-top: 4px;
  font-size: 18px;
}

.featured-score-live.live {
  border-color: rgba(16, 163, 109, 0.28);
  background: #f8fffb;
}

.featured-score-live.live span {
  color: #06784f;
}

.featured-score-live.final {
  border-color: rgba(36, 92, 255, 0.18);
  background: #f7faff;
}

.featured-score-live.final span {
  color: var(--blue);
}

.featured-prediction-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px 0;
}

.featured-card {
  min-width: 0;
  padding: 13px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.featured-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.featured-card-title span,
.featured-card-title b {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 900;
}

.featured-card-title b {
  color: var(--green);
}

.featured-prob-row {
  display: grid;
  grid-template-columns: 48px 54px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin-bottom: 8px;
}

.featured-prob-row span,
.featured-prob-row b {
  font-size: 12px;
  font-weight: 800;
}

.featured-prob-row span {
  color: #42526b;
}

.featured-prob-row i {
  height: 9px;
  overflow: hidden;
  background: #e8edf4;
  border-radius: 10px;
}

.featured-prob-row em {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.market-card .featured-prob-row em {
  background: var(--blue);
}

.ai-card {
  border-color: rgba(16, 163, 109, 0.28);
  background: #f8fffb;
}

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

.featured-score-strip div {
  padding: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.featured-score-strip span,
.featured-card small,
.featured-block p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.featured-score-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.featured-card small {
  display: block;
  margin-top: 10px;
  line-height: 1.45;
}

.source-pill {
  min-height: 22px;
  padding: 3px 8px;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.source-pill.live {
  color: #06784f;
  background: var(--green-soft);
}

.market-odds-row,
.edge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.market-odds-row span,
.edge-strip span {
  min-height: 24px;
  padding: 4px 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
}

.featured-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.75fr);
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 16px;
}

.analysis-main-stack,
.analysis-side-stack {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.featured-block {
  min-width: 0;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ai-analysis-block {
  min-height: 150px;
  background: #f8fffb;
  border-color: rgba(16, 163, 109, 0.32);
  border-left: 4px solid var(--green);
}

.featured-block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.featured-block-heading h3 {
  margin-bottom: 0;
}

.featured-block-heading span {
  min-height: 22px;
  padding: 3px 8px;
  color: #06784f;
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.featured-block h3 {
  margin-bottom: 9px;
  font-size: 12px;
}

.featured-block ul {
  display: grid;
  gap: 7px;
  padding-left: 17px;
}

.featured-block li {
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

.featured-block p {
  margin-top: 10px;
  line-height: 1.45;
}

.ai-analysis-block .ai-rationale {
  margin-top: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.65;
}

.ai-analysis-block small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.risk-block {
  background: #fffdf8;
  border-color: #f1dfbd;
}

.risk-block h3 {
  color: #8a5d0a;
}

.risk-block li {
  color: #667085;
  font-size: 11px;
}

.model-rationale-block ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.model-rationale-block p {
  max-width: 760px;
}

.edge-block {
  background: #fbfcfe;
}

.edge-group {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.edge-group:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.edge-group strong {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 11px;
}

.edge-group .edge-strip {
  margin-top: 0;
}

.edge-block p,
.correct-score-block p {
  margin-top: 4px;
}

.correct-score-block .correct-score-list {
  grid-template-columns: repeat(5, minmax(54px, 1fr));
}

.correct-score-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.correct-score-list div {
  padding: 8px 6px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: center;
}

.correct-score-list strong,
.correct-score-list span {
  display: block;
}

.correct-score-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.schedule-panel {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel-head {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head.compact {
  padding-bottom: 12px;
}

.panel h2 {
  font-size: 17px;
}

.panel-head p {
  font-size: 12px;
}

.icon,
.nav-list svg,
.controls svg,
.block-title svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.icon-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.icon-button:hover {
  border-color: #b9c4d3;
}

.table-wrap {
  overflow: auto;
  min-height: 0;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #6b7585;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #f8fbff;
}

tbody tr.selected {
  background: #eef8f3;
  box-shadow: inset 3px 0 0 var(--green);
}

td strong {
  display: block;
  font-size: 12px;
}

td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.match-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.match-no,
.group-tag,
.value-badge,
.ledger-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.match-no {
  color: var(--blue);
  background: #edf4ff;
}

.group-tag {
  color: #42526b;
  background: #f0f3f8;
}

.value-badge {
  color: var(--amber);
  background: var(--amber-soft);
}

.value-badge.hot,
.edge-note.hot {
  color: #06784f;
  background: var(--green-soft);
}

.score-status-line {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.score-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.score-status-badge.scheduled {
  color: #64748b;
  background: #f1f5f9;
}

.score-status-badge.live {
  color: #06784f;
  background: var(--green-soft);
}

.score-status-badge.final {
  color: var(--blue);
  background: #edf4ff;
}

.mini-probs {
  width: 124px;
  height: 8px;
  display: flex;
  overflow: hidden;
  border-radius: 10px;
  background: var(--line);
}

.mini-probs span:nth-child(1) {
  background: var(--green);
}

.mini-probs span:nth-child(2) {
  background: #d3dae6;
}

.mini-probs span:nth-child(3) {
  background: var(--blue);
}

.inspector {
  grid-column: 2;
  grid-row: 2 / span 2;
  padding: 16px;
  overflow: auto;
}

.match-title {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.match-number {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.match-title h2 {
  font-size: 20px;
  line-height: 1.18;
}

.match-title p {
  font-size: 12px;
}

.score-card {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.score-card div {
  padding: 11px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.score-card span,
.h2h-grid span,
.metric-card span,
.chart-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.score-card strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

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

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

.warning {
  color: #b7791f;
}

.inspector-block {
  margin-top: 16px;
}

.block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #2b3445;
  font-size: 13px;
  font-weight: 800;
}

.legend {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
}

.model-dot,
.market-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

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

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

.prob-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.prob-label {
  font-size: 12px;
  font-weight: 800;
}

.prob-stack {
  position: relative;
  height: 18px;
  border-radius: 12px;
  background: #eef2f7;
  overflow: hidden;
}

.prob-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 12px;
}

.prob-fill.model {
  background: rgba(16, 163, 109, 0.74);
}

.prob-fill.market {
  top: 11px;
  height: 7px;
  background: rgba(47, 104, 201, 0.76);
}

.prob-values {
  text-align: right;
}

.prob-values strong,
.prob-values span {
  display: block;
  font-size: 11px;
}

.prob-values span {
  color: var(--muted);
}

.odds-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 11px;
}

.odds-row span {
  padding: 7px 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  background: var(--panel-2);
  border-radius: 6px;
}

.market-meta,
.result-meta,
.model-meta,
.model-spec-card {
  margin-top: 9px;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 11px;
}

.market-meta span,
.result-meta span,
.model-meta span,
.model-spec-card span {
  color: var(--green);
  font-weight: 900;
}

.market-meta strong,
.result-meta strong,
.model-meta strong,
.model-spec-card strong {
  color: var(--ink);
}

.market-meta em,
.result-meta em,
.model-meta em,
.model-spec-card em {
  font-style: normal;
}

.result-meta {
  margin-top: 10px;
}

.result-meta span {
  color: var(--amber);
}

.result-meta.settled span {
  color: var(--blue);
}

.result-meta.live span {
  color: #06784f;
}

.model-meta span {
  color: var(--amber);
}

.model-meta.imported span {
  color: #8a6500;
}

.model-meta.rolling span {
  color: var(--blue);
}

.model-spec-card {
  margin: 0 0 10px;
  background: #f9fbff;
}

.model-spec-card span {
  color: var(--blue);
}

.spec-weight-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.spec-weight-line span {
  min-height: 26px;
  display: grid;
  place-items: center;
  color: #42526b;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  text-align: center;
}

.market-timeline {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.timeline-title,
.timeline-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 104px;
  gap: 8px;
  align-items: center;
}

.timeline-title {
  padding: 8px 9px;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.timeline-title span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.timeline-title em {
  grid-column: span 2;
  font-size: 10px;
  font-style: normal;
  text-align: right;
}

.timeline-row {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
}

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

.timeline-row.active {
  background: #eef8f3;
  box-shadow: inset 3px 0 0 var(--green);
}

.timeline-phase strong,
.timeline-edge strong {
  display: block;
  font-size: 11px;
}

.timeline-phase small,
.timeline-edge small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
}

.timeline-odds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.timeline-odds span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  color: #42526b;
  background: #f1f5f9;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
}

.timeline-edge {
  text-align: right;
}

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

.h2h-grid div {
  padding: 10px;
  background: var(--panel-2);
  border-radius: var(--radius);
}

.h2h-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.form-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.form-line.compact {
  margin-top: 6px;
}

.form-badge,
.form-empty {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 900;
}

.form-badge.w {
  color: #06784f;
  background: var(--green-soft);
}

.form-badge.d {
  color: #6b7585;
  background: #edf0f5;
}

.form-badge.l {
  color: #b8332b;
  background: #ffe4e1;
}

.form-empty {
  width: auto;
  padding: 0 8px;
  color: var(--muted);
  background: #edf0f5;
}

.h2h-evidence {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.h2h-status,
.h2h-note,
.h2h-trends > div {
  padding: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.h2h-evidence.direct .h2h-status {
  border-color: #b9ead9;
  background: var(--green-soft);
}

.h2h-evidence.none .h2h-status {
  border-color: #f3df9f;
  background: var(--amber-soft);
}

.h2h-status span,
.h2h-note span,
.h2h-trends span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.h2h-status strong,
.h2h-note strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.h2h-trends {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.component-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: center;
  margin-bottom: 9px;
}

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

.component-row small {
  color: var(--muted);
  text-align: right;
}

.dual-bars {
  display: grid;
  gap: 3px;
}

.dual-bars i,
.dual-bars b {
  height: 6px;
  display: block;
  border-radius: 999px;
}

.dual-bars i {
  background: var(--green);
}

.dual-bars b {
  background: var(--blue);
}

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

.drivers article {
  padding: 10px;
  background: var(--panel-2);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.drivers strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.drivers strong span {
  color: var(--green);
}

.drivers p {
  font-size: 11px;
  line-height: 1.45;
}

.edge-note {
  margin-top: 16px;
  padding: 11px;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.analytics-panel {
  grid-column: 1;
  grid-row: 3;
  min-height: 0;
  overflow: auto;
}

.ledger-chip {
  gap: 7px;
  color: #145b42;
  background: var(--green-soft);
}

.ledger-chip svg {
  width: 15px;
  height: 15px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.metric-card,
.chart-card,
.bias-audit,
.snapshot-audit,
.opportunity-audit,
.run-archive,
.forecast-backtest,
.locked-replay,
.timing-audit,
.readiness-panel,
.claim-panel,
.provider-panel,
.h2h-provenance,
.team-input-audit,
.llm-control-panel,
.inference-panel {
  min-height: 104px;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 25px;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.chart-card {
  min-width: 0;
  grid-column: span 2;
}

.bias-audit,
.snapshot-audit,
.opportunity-audit,
.run-archive,
.forecast-backtest,
.locked-replay,
.timing-audit,
.readiness-panel,
.claim-panel,
.provider-panel,
.h2h-provenance,
.team-input-audit,
.llm-control-panel,
.inference-panel {
  min-width: 0;
  grid-column: 1 / -1;
  overflow: auto;
}

.claim-panel,
.llm-control-panel,
.inference-panel {
  position: relative;
  overflow: hidden;
}

.claim-panel::before,
.llm-control-panel::before,
.inference-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #cbd5e1;
}

.claim-panel.model::before,
.claim-panel.ready::before,
.llm-control-panel.model::before,
.inference-panel.model::before {
  background: var(--green);
}

.claim-panel.market::before,
.llm-control-panel.market::before,
.inference-panel.market::before {
  background: var(--blue);
}

.claim-panel.blocked::before {
  background: var(--red);
}

.claim-panel.collecting::before,
.claim-panel.preview::before,
.llm-control-panel.early::before,
.llm-control-panel.preview::before,
.inference-panel.early::before,
.inference-panel.preview::before {
  background: #f0b429;
}

.claim-body,
.inference-body {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.6fr);
  gap: 12px;
}

.claim-safe-body {
  grid-template-columns: minmax(210px, 0.55fr) minmax(0, 1.8fr);
}

.claim-verdict,
.inference-verdict {
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.claim-verdict span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.claim-verdict strong {
  display: block;
  margin-top: 6px;
  font-size: 25px;
  line-height: 1;
}

.claim-verdict small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.inference-verdict strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.inference-verdict small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

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

.claim-rules {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.claim-rule-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.claim-rule-strip.claim-safe-strip {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
}

.claim-rule-strip span {
  min-height: 30px;
  display: grid;
  align-items: center;
  padding: 7px 9px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.claim-table {
  width: 100%;
  min-width: 0;
}

.claim-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.provider-panel {
  display: grid;
  gap: 10px;
  container-type: inline-size;
}

.provider-ai-title em {
  overflow-wrap: anywhere;
}

.h2h-provenance,
.team-input-audit,
.llm-control-panel {
  display: grid;
  gap: 10px;
}

.provider-summary-strip {
  display: grid;
  grid-template-columns: 150px 130px 90px minmax(0, 1fr);
  gap: 8px;
}

.h2h-source-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.llm-control-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.team-input-strip {
  grid-template-columns: 90px 150px 84px 110px minmax(150px, 1fr);
}

.provider-summary-strip span {
  min-height: 30px;
  display: grid;
  align-items: center;
  padding: 7px 9px;
  color: #42526b;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
}

.provider-table {
  min-width: 880px;
}

.provider-evidence-table {
  min-width: 940px;
}

.proxy-status-table {
  min-width: 760px;
}

.llm-control-table {
  min-width: 780px;
}

.team-input-table {
  min-width: 1060px;
}

.h2h-provenance-table {
  min-width: 860px;
}

.h2h-source-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.h2h-source-note a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.provider-table td small,
.provider-table td a,
.provider-evidence-table td small,
.proxy-status-table td small,
.llm-control-table td small,
.team-input-table td small,
.h2h-provenance-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.provider-table td a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.team-input-table td {
  vertical-align: top;
}

.team-input-table strong.imported {
  color: var(--green);
}

.team-score-cell {
  min-width: 72px;
  display: grid;
  gap: 5px;
}

.team-score-cell span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.team-score-cell i {
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  border-radius: 999px;
}

.provider-ai-title {
  margin-top: 2px;
}

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

.inference-grid > div,
.llm-compare-grid > div {
  min-width: 0;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.inference-grid span,
.inference-grid small,
.llm-compare-grid span,
.llm-compare-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.inference-grid strong,
.llm-compare-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 15px;
  line-height: 1.2;
}

.inference-grid small,
.llm-compare-grid small {
  margin-top: 7px;
  font-weight: 700;
  line-height: 1.3;
}

.readiness-panel {
  position: relative;
  overflow: hidden;
}

.readiness-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #cbd5e1;
}

.readiness-panel.ready::before,
.readiness-panel.audit::before {
  background: var(--green);
}

.readiness-panel.blocked::before {
  background: var(--red);
}

.readiness-panel.preview::before,
.readiness-panel.collecting::before {
  background: #f0b429;
}

.readiness-body {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.6fr);
  gap: 12px;
}

.readiness-verdict {
  min-width: 0;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.readiness-verdict span,
.readiness-verdict small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.readiness-verdict strong {
  display: block;
  margin-top: 6px;
  font-size: 25px;
  line-height: 1;
}

.readiness-verdict small {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.35;
}

.readiness-meter {
  height: 7px;
  margin-top: 10px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
}

.readiness-meter div {
  height: 100%;
  background: var(--green);
}

.readiness-panel.preview .readiness-meter div,
.readiness-panel.collecting .readiness-meter div {
  background: #f0b429;
}

.readiness-panel.blocked .readiness-meter div {
  background: var(--red);
}

.readiness-table {
  width: 100%;
  min-width: 0;
}

.readiness-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.bias-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

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

.bias-title em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-align: right;
}

.bias-table {
  min-width: 640px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.bias-table th {
  position: static;
  padding: 8px 10px;
  background: #f1f5f9;
}

.bias-table td {
  padding: 8px 10px;
  background: #ffffff;
}

.bias-table tr {
  cursor: default;
}

.bias-table tbody tr:hover {
  background: transparent;
}

.bias-table td,
.bias-table td strong {
  font-size: 11px;
}

.free-source-capture-archive {
  display: grid;
  width: 100%;
  width: 100cqi;
  max-width: 100cqi;
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.capture-trend-title {
  margin-top: 2px;
}

.capture-trend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  width: 100cqi;
  max-width: 100cqi;
}

.capture-trend-grid.empty {
  grid-template-columns: 1fr;
}

.free-source-policy-title {
  margin-top: 12px;
}

.requirement-coverage-panel {
  border-color: rgba(16, 163, 109, 0.24);
}

.requirement-coverage-strip {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  margin-bottom: 10px;
}

.requirement-coverage-table {
  min-width: 880px;
}

.requirement-coverage-table td {
  vertical-align: top;
}

.requirement-coverage-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.free-source-priority-title {
  margin-top: 12px;
}

.free-source-priority-table {
  min-width: 920px;
  margin-bottom: 10px;
}

.free-source-priority-table td {
  vertical-align: top;
}

.free-source-priority-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.free-source-policy-strip {
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  margin-bottom: 10px;
}

.free-source-policy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 10px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.free-source-policy-table {
  min-width: 720px;
}

.free-source-upgrade-table {
  min-width: 560px;
}

.free-source-policy-table td,
.free-source-upgrade-table td {
  vertical-align: top;
}

.free-source-policy-table td small,
.free-source-upgrade-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.capture-schedule-title {
  margin-top: 12px;
}

.capture-schedule-strip {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  margin-bottom: 10px;
}

.capture-schedule-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 10px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.capture-schedule-table {
  min-width: 520px;
}

.capture-schedule-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.capture-run-ledger-title {
  margin-top: 2px;
}

.capture-run-ledger-table {
  min-width: 780px;
  margin-bottom: 12px;
}

.capture-run-ledger-table td {
  vertical-align: top;
}

.capture-run-ledger-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.provider-capture-title {
  margin-top: 12px;
}

.provider-capture-strip {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  margin-bottom: 10px;
}

.provider-capture-table {
  min-width: 820px;
  margin-bottom: 12px;
}

.provider-capture-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.capture-trend-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.capture-trend-card strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.1;
}

.capture-trend-card small,
.capture-trend-card em {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.capture-trend-card .sparkline {
  width: 100%;
  height: 42px;
}

.capture-archive-row {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 0.72fr);
  min-width: 0;
  border-top: 1px solid var(--line);
}

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

.capture-archive-row > div {
  min-width: 0;
  padding: 8px 10px;
  overflow-wrap: anywhere;
}

.capture-archive-head {
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.capture-archive-row strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.25;
}

.capture-archive-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.capture-archive-row.empty {
  grid-template-columns: 1fr;
}

.free-source-capture-status {
  align-items: flex-start;
}

.free-source-capture-status strong,
.free-source-capture-status small {
  white-space: normal;
  overflow-wrap: anywhere;
}

.snapshot-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.opportunity-table {
  min-width: 820px;
}

.opportunity-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.run-archive-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.run-archive-title .bias-title {
  flex: 1;
  display: block;
  margin-bottom: 0;
}

.run-archive-title .bias-title span,
.run-archive-title .bias-title em {
  display: block;
  text-align: left;
}

.run-archive-title .bias-title em {
  max-width: 250px;
  margin-top: 3px;
  line-height: 1.25;
}

.run-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.import-run-control {
  position: relative;
  overflow: hidden;
}

.import-run-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.run-import-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  padding: 8px 10px;
  background: #f4fbf8;
  border: 1px solid #b7e4d1;
  border-radius: 6px;
}

.run-import-status.error {
  background: #fff4f2;
  border-color: #f3c3bd;
}

.run-import-status strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.run-import-status small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

.run-trend-summary {
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
}

.run-verdict {
  padding: 10px 11px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid #cbd5e1;
  border-radius: 6px;
}

.run-verdict.model {
  border-left-color: var(--green);
}

.run-verdict.market {
  border-left-color: var(--blue);
}

.run-verdict.early {
  border-left-color: #f0b429;
}

.run-verdict strong,
.run-verdict small {
  display: block;
}

.run-verdict strong {
  font-size: 13px;
}

.run-verdict small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

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

.run-evidence-strip span {
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: #42526b;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.run-input-drift {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.run-input-drift.same {
  border-color: #b7e4d1;
  background: #f4fbf8;
}

.run-input-drift.changed {
  border-color: #f0b429;
  background: #fffaf0;
}

.run-input-drift strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.run-input-drift small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

.run-trend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.run-trend-card {
  min-width: 0;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.run-trend-card span,
.run-trend-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.run-trend-card strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  line-height: 1;
}

.run-trend-card small {
  margin-top: 5px;
}

.run-trend-card .sparkline {
  height: 50px;
  margin-top: 6px;
}

.run-trend-empty {
  padding: 10px;
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.export-button.secondary {
  color: #42526b;
  background: #f4f7fb;
  border-color: #d7e0ec;
}

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

.run-table {
  min-width: 820px;
}

.run-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.backtest-strip {
  margin-bottom: 10px;
}

.locked-replay .run-verdict {
  margin-bottom: 10px;
}

.locked-replay-inference {
  margin-bottom: 10px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.replay-inference-grid {
  margin-top: 8px;
}

.locked-replay-strip {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-bottom: 10px;
}

.locked-replay-timeline {
  margin-bottom: 10px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.locked-replay-timeline.empty {
  color: var(--muted);
  border-style: dashed;
}

.locked-replay-timeline.empty strong,
.locked-replay-timeline.empty small {
  display: block;
  font-size: 11px;
  line-height: 1.35;
}

.locked-replay-timeline.empty small {
  margin-top: 3px;
}

.replay-trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.replay-trend-card {
  min-width: 0;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
}

.replay-trend-card span,
.replay-trend-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.replay-trend-card strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
  line-height: 1.1;
}

.replay-trend-card small {
  margin-top: 5px;
}

.comparison-sparkline-wrap {
  margin-top: 8px;
}

.comparison-sparkline {
  width: 100%;
  height: 62px;
  overflow: visible;
}

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

.comparison-line.model,
.comparison-legend-item.model i {
  stroke: var(--green);
  background: var(--green);
}

.comparison-line.market,
.comparison-legend-item.market i {
  stroke: #315fbb;
  background: #315fbb;
}

.comparison-line.llm,
.comparison-legend-item.llm i {
  stroke: #8b5cf6;
  background: #8b5cf6;
}

.comparison-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.comparison-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.comparison-legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.locked-replay-timeline-table {
  min-width: 760px;
}

.locked-replay-timeline-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.locked-replay-table {
  min-width: 860px;
}

.locked-replay-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.backtest-tables {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: 0;
}

.bias-title.mini {
  margin: 0 0 6px;
}

.backtest-table {
  width: 100%;
  min-width: 0;
}

.backtest-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.timing-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 10px;
}

.timing-table {
  width: 100%;
  min-width: 720px;
}

.timing-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.sparkline,
.calibration-chart {
  width: 100%;
  height: 78px;
  margin-top: 8px;
  overflow: visible;
}

.calibration-chart {
  height: 88px;
}

.experiment-ledger {
  margin: 0 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  overflow: hidden;
}

.ledger-title {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.ledger-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.ledger-title span,
.ledger-title em {
  color: var(--muted);
  font-size: 11px;
}

.ledger-title strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

.ledger-title em {
  max-width: 360px;
  font-style: normal;
  text-align: right;
}

.export-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: #145b42;
  background: var(--green-soft);
  border: 1px solid #b9ead9;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.export-button svg {
  width: 15px;
  height: 15px;
}

.ledger-table-wrap {
  max-height: 174px;
  overflow: auto;
}

.ledger-table {
  min-width: 840px;
}

.ledger-table th {
  background: #f1f5f9;
}

.ledger-table td {
  padding: 8px 12px;
  background: #ffffff;
}

.ledger-table tr {
  cursor: default;
}

.ledger-table tbody tr:hover {
  background: transparent;
}

.ledger-table td strong {
  font-size: 11px;
}

.ledger-table td small {
  font-size: 10px;
}

.sparkline-grid,
.chart-grid {
  stroke: #d9e0ea;
  stroke-width: 1;
  fill: none;
}

.sparkline-area {
  fill: rgba(16, 163, 109, 0.14);
}

.sparkline-line,
.chart-model,
.chart-market,
.chart-perfect {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline-line {
  stroke: var(--green);
  stroke-width: 3;
}

.chart-perfect {
  stroke: #c9d2df;
  stroke-dasharray: 4 4;
}

.chart-model {
  stroke: var(--green);
  stroke-width: 3;
}

.chart-market {
  stroke: var(--blue);
  stroke-width: 3;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .workspace {
    height: auto;
    overflow: visible;
  }

  .sidebar {
    min-height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .nav-list {
    display: flex;
  }

  .source-card {
    min-width: 180px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .controls {
    justify-content: flex-start;
  }

  .primary-controls,
  .feed-controls {
    justify-content: flex-start;
  }

  .main-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .featured-prediction-panel,
  .schedule-panel,
  .inspector,
  .analytics-panel {
    grid-column: auto;
    grid-row: auto;
  }

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

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

  .analytics-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (min-width: 1181px) {
  body,
  #app,
  .app-shell,
  .workspace {
    min-height: 100vh;
  }

  .main-grid {
    grid-template-rows: auto auto auto;
    align-items: start;
    overflow: visible;
  }

  .schedule-panel {
    max-height: 520px;
    overflow: hidden;
  }

  .analytics-panel {
    overflow: visible;
  }

  .inspector {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
  }
}

@media (max-width: 720px) {
  .sidebar {
    padding: 14px;
  }

  .brand {
    min-width: 220px;
  }

  .nav-list a {
    white-space: nowrap;
  }

  .topbar {
    padding: 14px;
  }

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

  .controls,
  .primary-controls,
  .feed-controls,
  .search-box,
  .select-control,
  .edge-control,
  .file-control,
  .source-chip,
  .sample-button,
  .feed-control {
    width: 100%;
  }

  .feed-control {
    grid-template-columns: minmax(0, 1fr) 34px auto;
  }

  .feed-control > label:first-child {
    grid-column: 1 / -1;
  }

  .search-box input,
  .select-control select,
  .feed-control > input {
    width: 100%;
  }

  .main-grid {
    padding: 10px;
    gap: 10px;
  }

  .featured-head {
    flex-direction: column;
  }

  .featured-model-spec {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .featured-prediction-grid,
  .featured-analysis-layout {
    grid-template-columns: 1fr;
    padding-left: 10px;
    padding-right: 10px;
  }

  .model-rationale-block ul {
    grid-template-columns: 1fr;
  }

  .correct-score-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .correct-score-block .correct-score-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel-head,
  .score-card,
  .h2h-grid,
  .h2h-trends,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .schedule-panel {
    max-height: 620px;
    overflow: hidden;
  }

  .chart-card {
    grid-column: span 1;
  }

  .claim-body,
  .claim-rule-strip,
  .provider-summary-strip,
  .h2h-source-strip,
  .llm-control-strip,
  .team-input-strip,
  .inference-body,
  .inference-grid,
  .llm-compare-grid,
  .run-evidence-strip,
  .spec-weight-line,
  .run-trend-grid,
  .replay-trend-grid,
  .backtest-tables,
  .free-source-policy-grid,
  .capture-schedule-grid {
    grid-template-columns: 1fr;
  }

  .ledger-title,
  .run-archive-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .ledger-actions,
  .run-actions {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .run-input-drift {
    align-items: flex-start;
    flex-direction: column;
  }

  .run-import-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .run-input-drift strong {
    white-space: normal;
  }

  .run-input-drift small,
  .run-import-status small {
    text-align: left;
  }

  .ledger-title em {
    text-align: left;
  }

  .export-button {
    width: 100%;
    justify-content: center;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .prob-row {
    grid-template-columns: 48px minmax(0, 1fr) 56px;
  }

  .timeline-title,
  .timeline-row {
    grid-template-columns: 1fr;
  }

  .timeline-title em,
  .timeline-edge {
    grid-column: auto;
    text-align: left;
  }
}
