/* The palette and base rules both stylesheets start with; the server puts
   this file in front of login.css and ui.css. */
:root {
  --bg: #f6f6f4;
  --fg: #1d1d1b;
  --muted: #5d5d58;
  --border: #c9c9c2;
  --accent: #2f6f6f;
  --field: #fff;
  --error: #b3261e;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --fg: #e8e8e3;
    --muted: #a3a39d;
    --border: #3a3a37;
    --accent: #6fb7b7;
    --field: #1f1f1e;
    --error: #f2998f;
  }
}

* {
  box-sizing: border-box;
}

/* The only stylesheet a visitor who is not signed in can read, after theme.css. */

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.4 system-ui, sans-serif;
}

form,
main {
  width: min(22rem, 100vw - 2rem);
  display: grid;
  gap: 0.75rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.9rem;
}

input,
button {
  font: inherit;
  padding: 0.5rem 0.6rem;
  border-radius: 0.35rem;
}

input {
  border: 1px solid var(--border);
  background: var(--field);
  color: inherit;
}

button {
  border: 0;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
}

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

[role="alert"] {
  margin: 0;
  color: var(--error);
}
