/* Dark theme only. Text colours meet WCAG AA contrast on their backgrounds. */
:root {
  color-scheme: dark;
  --bg: #0f1218;
  --band: #171b23;
  --raised: #1e2430;
  --line: #2c3442;
  --ink: #e6e9ef;
  --muted: #9aa4b2;
  --accent: #7cb4ff;
  --error: #ff8a80;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem max(1rem, env(safe-area-inset-left, 0px));
  background: var(--band);
  border-bottom: 1px solid var(--line);
}

header nav {
  display: flex;
  gap: 1rem;
  flex: 1;
}

#user {
  color: var(--muted);
}

button {
  font: inherit;
  color: var(--ink);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}

button:hover {
  border-color: var(--muted);
}

main {
  padding: 1rem max(1rem, env(safe-area-inset-left, 0px));
  max-width: 72rem;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

th,
td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

tbody tr:hover {
  background: var(--band);
}

dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
}

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

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

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

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