:root {
  color-scheme: light dark;
  --text: #1d1d1f;
  --muted: #5f6368;
  --background: #ffffff;
  --line: #d9dce1;
  --accent: #b3261e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ececec;
    --muted: #a0a4ab;
    --background: #16171a;
    --line: #34363b;
    --accent: #f28b82;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font:
    16px/1.5 system-ui,
    sans-serif;
}

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

h1 {
  margin: 0 0 0.5rem;
}

.intro,
#status {
  color: var(--muted);
}

a {
  color: var(--accent);
}

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

th,
td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

th:first-child,
td:first-child {
  text-align: left;
}

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

th[aria-sort='ascending'] button::after {
  content: ' ▲';
}

th[aria-sort='descending'] button::after {
  content: ' ▼';
}

#status.error {
  color: var(--accent);
}
