:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1d2330;
  --muted: #5f6b7a;
  --border: #d9dee5;
  --accent: #2f6fde;
  --error: #b42318;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --surface: #1d2129;
    --text: #e6e9ee;
    --muted: #9aa4b2;
    --border: #2f3540;
    --accent: #6d9cf0;
    --error: #f97066;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header nav { display: flex; align-items: center; gap: 1rem; }
.site-header form { margin: 0; }

.brand { font-weight: 700; color: var(--text); text-decoration: none; }

.content { max-width: 48rem; margin: 2rem auto; padding: 0 1rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.card.narrow { max-width: 24rem; margin: 0 auto; }

h1 { margin-top: 0; font-size: 1.5rem; }

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

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

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

button {
  margin-top: 1.25rem;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

button.link-button {
  margin: 0;
  padding: 0;
  background: none;
  color: var(--accent);
}

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