:root {
  color-scheme: light;
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-subtle: #f7f9fb;
  --ink: #111827;
  --muted: #5f6f82;
  --soft: #8b98a8;
  --line: #d8e0e9;
  --line-strong: #bcc8d6;
  --blue: #175cd3;
  --blue-soft: #e8f0fe;
  --green: #16794b;
  --green-soft: #e6f5ed;
  --red: #b42318;
  --red-soft: #feeceb;
  --amber: #a15c07;
  --amber-soft: #fff2d9;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  --radius: 6px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button,
summary,
select,
input[type="checkbox"],
input[type="range"] {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.topbar {
  min-width: 0;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.run-state {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.run-state code {
  max-width: 140px;
  overflow: hidden;
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--soft);
}

.run-state.ready .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.run-state.not-ready .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

.topnav-link,
.report-menu summary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.topnav-link:hover,
.topnav-link.active,
.report-menu[open] summary,
.report-menu summary:hover {
  color: var(--ink);
  background: var(--surface-subtle);
}

.report-menu {
  position: relative;
}

.report-menu summary {
  list-style: none;
}

.report-menu summary::-webkit-details-marker {
  display: none;
}

.report-menu summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: -3px 1px 0 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.report-menu-panel {
  width: 320px;
  max-height: min(420px, calc(100vh - 80px));
  overflow-y: auto;
  position: absolute;
  top: 40px;
  right: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.15);
}

.report-menu-panel a {
  display: block;
  padding: 10px;
  border-radius: 4px;
}

.report-menu-panel a:hover {
  background: var(--surface-subtle);
}

.report-menu-panel strong,
.report-menu-panel span {
  display: block;
}

.report-menu-panel strong {
  font-size: 12px;
  font-weight: 800;
}

.report-menu-panel span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.repo-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
  font-weight: 750;
}

.repo-link:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.repo-link svg,
.clear-button svg,
.search-field svg,
.detail-actions svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.repo-link svg {
  fill: currentColor;
}

.clear-button svg,
.search-field svg,
.detail-actions svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.run-overview,
.pipeline-panel {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.run-title-row,
.pipeline-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.run-title-row > div,
.pipeline-heading > div {
  min-width: 0;
}

.run-title-row h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 850;
}

.run-title-row p,
.pipeline-heading p {
  margin: 5px 0 0;
  max-width: 900px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.primary-action {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  color: #ffffff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.primary-action:hover {
  background: #263244;
}

.run-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 16px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.run-stats div {
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
}

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

.run-stats div:last-child {
  padding-right: 0;
  border-right: 0;
}

.run-stats dt,
.stage-card dt,
.baseline-grid dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.run-stats dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.pipeline-panel {
  padding-top: 14px;
  padding-bottom: 15px;
  background: var(--surface-subtle);
}

.pipeline-heading h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 850;
}

.pipeline-heading p {
  max-width: 1060px;
  font-size: 12px;
}

.pipeline-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 4px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 800;
}

.pipeline-status.not-ready {
  color: var(--red);
  background: var(--red-soft);
}

.stage-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stage-card {
  min-width: 0;
  padding: 11px 13px;
  border-right: 1px solid var(--line);
}

.stage-card:last-child {
  border-right: 0;
}

.stage-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.stage-card h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 850;
}

.stage-card header span {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.stage-card header span.not-ready {
  color: var(--red);
}

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

.stage-card dd {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stage-card a {
  display: inline-block;
  margin-top: 9px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 750;
}

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

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

.workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 232px) minmax(650px, 1fr) minmax(390px, 420px);
  gap: 14px;
  padding: 14px;
}

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

.filters {
  align-self: start;
  max-height: calc(100vh - 76px);
  overflow-y: auto;
  padding: 15px;
  position: sticky;
  top: 72px;
}

.filter-section {
  padding: 0 0 16px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.filter-section:last-of-type {
  margin-bottom: 12px;
  border-bottom: 0;
}

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

.section-heading h2,
.detail-section h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

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

.check-list,
.toggle-list {
  display: grid;
  gap: 7px;
}

.tag-list {
  max-height: 230px;
  overflow-y: auto;
  padding-right: 2px;
}

.check-row,
.toggle-row {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
}

.check-row input,
.toggle-row input {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--blue);
}

.check-row span,
.toggle-row span {
  overflow-wrap: anywhere;
}

.search-field {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-subtle);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.score-range {
  width: 100%;
  accent-color: var(--blue);
}

.clear-button {
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
  font-weight: 750;
}

.clear-button:hover,
.detail-actions button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.results-panel {
  overflow: hidden;
}

.results-toolbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.result-count {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 850;
}

.dataset-summary {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.sort-control select {
  min-height: 32px;
  max-width: 210px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
}

.table-wrap {
  max-height: calc(100vh - 150px);
  overflow: auto;
}

.scenario-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

.scenario-table th {
  padding: 10px 11px;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f4f7fa;
  text-align: left;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.scenario-table td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 12px;
}

.scenario-table tbody tr {
  cursor: pointer;
}

.scenario-table tbody tr:hover td,
.scenario-table tbody tr.selected td {
  background: #f2f7ff;
}

.scenario-table tbody tr.selected td:first-child {
  box-shadow: inset 3px 0 0 var(--blue);
}

.rank-cell {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.scenario-name,
.scenario-source {
  display: block;
  overflow-wrap: anywhere;
}

.scenario-name {
  max-width: 250px;
  font-weight: 800;
}

.scenario-source {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.dataset-chip,
.score-chip,
.failure-chip,
.tag-chip {
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.dataset-chip {
  padding: 0 7px;
  color: var(--blue);
  background: var(--blue-soft);
}

.score-chip {
  min-width: 50px;
  justify-content: center;
  color: #ffffff;
  background: var(--ink);
}

.failure-chip {
  min-width: 58px;
  justify-content: center;
  color: var(--amber);
  background: var(--amber-soft);
}

.tag-cell,
.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-cell {
  max-width: 240px;
}

.tag-chip {
  padding: 0 7px;
  color: #374151;
  background: #edf1f5;
}

.tag-chip.vru,
.tag-chip.pedestrian_crossing,
.tag-chip.cyclist_interaction {
  color: var(--red);
  background: var(--red-soft);
}

.tag-chip.unprotected_turn,
.tag-chip.hard_braking {
  color: var(--amber);
  background: var(--amber-soft);
}

.tag-chip.low_interaction {
  color: var(--green);
  background: var(--green-soft);
}

.reason-snippet {
  max-width: 280px;
  color: var(--muted);
  line-height: 1.35;
}

.empty-row td {
  padding: 26px 16px;
  color: var(--muted);
  text-align: center;
}

.diagnostics-panel,
.selector-atlas-panel {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.selector-atlas-panel {
  background: var(--surface-subtle);
}

.diagnostics-panel[hidden],
.selector-atlas-panel[hidden] {
  display: none;
}

.diagnostics-header,
.selector-atlas-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.credibility-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.diagnostics-header p,
.selector-atlas-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.diagnostics-header a,
.selector-atlas-header a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--blue);
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
}

.diagnostic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.diagnostic-tabs button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 11px;
  font-weight: 800;
}

.diagnostic-tabs button[aria-selected="true"] {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--surface);
}

.diagnostic-tabs span {
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
  background: #e7ecf2;
  font-size: 10px;
}

.diagnostic-cases,
.selector-atlas-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 11px;
}

.diagnostic-case,
.selector-atlas-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.diagnostic-case {
  padding: 11px;
}

.diagnostic-case.regression,
.selector-atlas-card.false_promotion {
  border-left-color: var(--red);
}

.diagnostic-case.fallback,
.selector-atlas-card.retained_hold {
  border-left-color: var(--amber);
}

.selector-atlas-card.candidate_recovery,
.selector-atlas-card.accepted_recovery {
  border-left-color: var(--green);
}

.diagnostic-case header {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.diagnostic-case header > span {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  color: #ffffff;
  background: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.diagnostic-case strong,
.diagnostic-case small {
  display: block;
  overflow-wrap: anywhere;
}

.diagnostic-case strong {
  font-size: 12px;
  font-weight: 850;
}

.diagnostic-case small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.diagnostic-case em {
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.diagnostic-case dl,
.selector-card-body dl,
.selector-atlas-metrics {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
}

.diagnostic-case dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.diagnostic-case dl div,
.selector-card-body dl div,
.selector-atlas-metrics div {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.diagnostic-case dt,
.selector-card-body dt,
.selector-atlas-metrics dt {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.diagnostic-case dd,
.selector-card-body dd,
.selector-atlas-metrics dd {
  margin: 3px 0 0;
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.diagnostic-case p,
.selector-card-body p {
  margin: 9px 0 0;
  color: #39485a;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

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

.selector-atlas-card {
  overflow: hidden;
  background: var(--surface);
}

.selector-atlas-card img {
  width: 100%;
  min-height: 160px;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border-bottom: 1px solid var(--line);
  background: #f5f7fa;
}

.selector-card-body {
  padding: 10px;
}

.selector-card-body header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.selector-card-body header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.selector-card-body strong {
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}

.selector-card-body dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-panel {
  align-self: start;
  max-height: calc(100vh - 76px);
  overflow-y: auto;
  padding: 16px;
  position: sticky;
  top: 72px;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 11px;
}

.detail-header > div:first-child {
  min-width: 0;
}

.detail-header h1 {
  margin: 0 0 5px;
  max-width: 100%;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.detail-header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.detail-actions {
  display: flex;
  gap: 5px;
}

.detail-actions button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: var(--surface);
}

.tag-strip {
  margin-top: 12px;
}

.detail-section {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.svg-frame {
  margin-top: 9px;
  overflow: hidden;
  aspect-ratio: 1.45;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f5f7fa;
}

.svg-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.baseline-card,
.component-bars {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

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

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

.baseline-grid div,
.metric-grid div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-subtle);
}

.baseline-grid dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.baseline-card p {
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid var(--blue);
  color: #39485a;
  background: #eef5ff;
  font-size: 11px;
  line-height: 1.45;
}

.baseline-card p.fallback-note {
  border-left-color: var(--amber);
  background: #fff8e8;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(85px, 110px) 1fr 44px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.bar-label {
  font-weight: 750;
  overflow-wrap: anywhere;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe5ec;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.bar-value {
  color: var(--muted);
  font-weight: 750;
  text-align: right;
}

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

.metric-grid dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-grid dd {
  margin: 0;
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

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

.reason-list li {
  position: relative;
  padding-left: 14px;
  color: #39485a;
  font-size: 11px;
  line-height: 1.45;
}

.reason-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  position: absolute;
  top: 0.62em;
  left: 0;
  border-radius: 50%;
  background: var(--blue);
}

@media (max-width: 1380px) {
  .run-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .run-stats div:nth-child(3) {
    border-right: 0;
  }

  .run-stats div:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .workspace {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .detail-panel {
    grid-column: 1 / -1;
    max-height: none;
    position: static;
  }

  .table-wrap {
    max-height: 650px;
  }
}

@media (max-width: 900px) {
  .topbar {
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
  }

  .run-state {
    margin-left: auto;
    padding-left: 0;
    border-left: 0;
  }

  .run-state code {
    display: none;
  }

  .topnav {
    width: 100%;
    order: 3;
    flex-wrap: wrap;
    overflow-x: visible;
    margin-left: 0;
    position: relative;
  }

  .repo-link {
    display: none;
  }

  .report-menu {
    position: static;
  }

  .report-menu-panel {
    width: auto;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
  }

  .run-overview,
  .pipeline-panel {
    padding-right: 14px;
    padding-left: 14px;
  }

  .stage-summary {
    grid-template-columns: 1fr;
  }

  .stage-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stage-card:last-child {
    border-bottom: 0;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .results-panel {
    order: 1;
  }

  .detail-panel {
    order: 2;
  }

  .filters {
    order: 3;
  }

  .filters,
  .detail-panel {
    max-height: none;
    position: static;
  }

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

@media (max-width: 620px) {
  .run-title-row,
  .pipeline-heading,
  .results-toolbar,
  .diagnostics-header,
  .selector-atlas-header {
    display: grid;
  }

  .primary-action,
  .diagnostics-header a,
  .selector-atlas-header a {
    justify-self: start;
  }

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

  .run-stats div:nth-child(2n) {
    border-right: 0;
  }

  .run-stats div:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .run-stats div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .run-stats div:nth-child(3),
  .run-stats div:nth-child(5) {
    padding-left: 0;
  }

  .run-title-row h1 {
    font-size: 21px;
  }

  .sort-control {
    width: 100%;
    justify-content: space-between;
  }

  .diagnostic-cases,
  .selector-atlas-cards {
    grid-template-columns: 1fr;
  }

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

  .selector-card-body dl,
  .diagnostic-case dl,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diagnostic-case header {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .diagnostic-case em {
    grid-column: 2;
  }

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