:root {
  color-scheme: light dark;
  --bg: light-dark(#fff, #16181c);
  --fg: light-dark(#1b1d21, #e4e6ea);
  --muted: light-dark(#5f6670, #9aa1ab);
  --line: light-dark(#dde0e4, #2f333a);
  --better: light-dark(#1a7f37, #4ac26b);
  --worse: light-dark(#b3261e, #f27b73);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, sans-serif;
  line-height: 1.4;
}

main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

h1 {
  margin: 0 0 1rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
}

.controls label {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
}

/* Fixed height: a taller glyph such as ℚ would otherwise grow the row and
   shift the table below. */
.controls select {
  box-sizing: border-box;
  height: 2em;
  font: inherit;
}

.hint {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.status,
.notes {
  color: var(--muted);
  font-size: 0.875rem;
}

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

.results {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.results th,
.results td {
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.results .instance,
.results thead th:first-child {
  text-align: left;
  font-weight: normal;
}

.results thead th {
  position: sticky;
  top: 0;
  background: var(--bg);
}

.results tfoot th,
.results tfoot td {
  border-top: 2px solid var(--line);
  border-bottom: 0;
  font-weight: 600;
}

.sort {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ratio {
  display: inline-block;
  min-width: 4em;
  margin-left: 0.5rem;
  font-size: 0.85em;
  text-align: left;
}

.ratio--better {
  color: var(--better);
}

.ratio--worse {
  color: var(--worse);
}

.cell--timeout,
.cell--error,
.cell--stopped,
.cell--none {
  color: var(--muted);
  font-style: italic;
}

.cell--mismatch {
  color: var(--worse);
  font-weight: 600;
}

.cell--partial .value::after {
  content: "*";
}

.count {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: normal;
}
