:root {
  color-scheme: light dark;
  --text: #1a1a1a;
  --muted: #555;
  --back: #fff;
  --line: #ccc;
  --bad: #b00020;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e8e8;
    --muted: #aaa;
    --back: #161616;
    --line: #444;
    --bad: #ff7a85;
  }
}

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

main, footer {
  max-width: 44rem;
  margin: 0 auto;
}

footer {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.875rem;
}

label {
  display: block;
  font-weight: 600;
}

small {
  display: block;
  color: var(--muted);
}

input[type="text"], textarea {
  box-sizing: border-box;
  width: 100%;
  font: inherit;
}

.name {
  font-family: ui-monospace, monospace;
}

fieldset.line {
  border: 1px solid var(--line);
  margin: 0 0 1rem;
}

[aria-invalid="true"] {
  outline: 2px solid var(--bad);
}

.problems {
  color: var(--bad);
}

button {
  font: inherit;
}

pre {
  overflow-x: auto;
  white-space: pre-wrap;
  font-size: 0.875rem;
}
