/* The hosted pages of BearIdentity: legible, nothing more (#18). Replaced with the UI of #19. */
:root {
  --text: #1a1a1a;
  --muted: #555;
  --border: #888;
  --error: #a4161a;
  --focus: #0b57d0;
  --background: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--background);
}

body {
  margin: 0;
}

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

h1 {
  font-size: 1.5rem;
}

form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.25rem;
}

label {
  font-weight: 600;
}

input {
  font: inherit;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

button {
  font: inherit;
  padding: 0.6rem 1rem;
  border: 1px solid var(--text);
  border-radius: 4px;
  background: var(--text);
  color: var(--background);
  cursor: pointer;
}

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

/* An error is said in words ("Error: …") and marked by the field's aria-invalid, not by colour alone. */
.error {
  color: var(--error);
  font-weight: 600;
}

.error:empty,
.notice:empty {
  display: none;
}

input[aria-invalid="true"] {
  border: 2px solid var(--error);
}

.notice {
  border-left: 4px solid var(--text);
  padding-left: 0.75rem;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}
