:root {
  --bg: #f2f4f7;
  --card: #ffffff;
  --text: #1d2733;
  --muted: #5b6a7a;
  --line: #d8dee6;
  --accent: #24589f;
  --accent-hover: #1b4379;
  --banner-bg: #fdf6e0;
  --banner-line: #e5d7a3;
  --error-bg: #faecec;
  --error-line: #e3b8b8;
  --error-text: #8a2626;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161b22;
    --card: #1f2630;
    --text: #e4e9ef;
    --muted: #9aa7b5;
    --line: #333d4a;
    --accent: #4d84c9;
    --accent-hover: #6899d4;
    --banner-bg: #2e2a1c;
    --banner-line: #57502f;
    --error-bg: #33201f;
    --error-line: #5c3230;
    --error-text: #e2a2a2;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2rem 1rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem;
  width: 100%;
  max-width: 30rem;
}

.masthead h1 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

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

.who { color: var(--muted); font-size: 0.9rem; margin-top: 0; }
.meta { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
code { font-size: 0.8rem; }

.banner {
  background: var(--banner-bg);
  border: 1px solid var(--banner-line);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.error {
  background: var(--error-bg);
  border: 1px solid var(--error-line);
  border-radius: 6px;
  color: var(--error-text);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

form { margin: 1rem 0 0; }

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

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

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

button, a.button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.55rem 1.2rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}
button:hover, a.button:hover { background: var(--accent-hover); }

button.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}
button.secondary:hover { background: var(--bg); color: var(--text); }

.logout { margin-top: 2rem; border-top: 1px solid var(--line); }

.foot { color: var(--muted); font-size: 0.8rem; margin-top: 1.25rem; }
