/* Plain, readable, no assets: system fonts, one column, the browser's own
   light and dark colours. */
:root {
  color-scheme: light dark;
  --border: #767676;
  --problem: #b00020;
}

@media (prefers-color-scheme: dark) {
  :root {
    --problem: #ff8a80;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* "Loading..." is for a page whose script is on its way: with scripting off it
   would never go away. */
#boot {
  display: none;
}

@media (scripting: enabled) {
  #boot {
    display: block;
  }
}

body {
  margin: 0;
  font: 1.0625rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

h1 {
  margin: 0.5rem 0 1rem;
  font-size: 1.75rem;
}

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

h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.25rem;
}

a {
  color: inherit;
}

label {
  display: block;
  margin: 1rem 0 0.25rem;
  font-weight: 600;
}

textarea,
select,
input {
  display: block;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  color: inherit;
  background: transparent;
}

textarea {
  min-height: 10rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  resize: vertical;
}

button {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  font-weight: 600;
  color: inherit;
  background: ButtonFace;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.6;
}

:focus-visible {
  outline: 3px solid Highlight;
  outline-offset: 2px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
}

.row {
  display: flex;
  gap: 0.5rem;
}

.row input {
  flex: 1 1 auto;
  min-width: 0;
}

.note {
  margin: 0.5rem 0;
}

.note:empty {
  margin: 0;
}

.problem {
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  border-left: 0.35rem solid var(--problem);
  font-weight: 600;
}

.problem p {
  margin: 0 0 0.5rem;
}
