:root {
  color-scheme: light dark;
  --bg: #0f1410;
  --surface: #171d18;
  --border: #2a332b;
  --text: #eef2ee;
  --muted: #a9b3aa;
  --accent: #6fcf97;
  --accent-text: #06210f;
  --error-bg: #3a1414;
  --error-text: #ffb4b0;
  --success-bg: #12301c;
  --success-text: #9ff0bd;
  --max-width: 640px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8f6;
    --surface: #ffffff;
    --border: #dde3dd;
    --text: #14201a;
    --muted: #55625a;
    --accent: #1f9d5b;
    --accent-text: #ffffff;
    --error-bg: #fdecea;
    --error-text: #7a1a14;
    --success-bg: #e8f7ee;
    --success-text: #0d5c33;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px 64px;
}

header.site {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

header.site .logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  flex-shrink: 0;
}

header.site h1 {
  font-size: 1.1rem;
  margin: 0;
}

nav.site {
  display: flex;
  gap: 16px;
  padding: 12px 16px 0;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

nav.site a:hover, nav.site a:focus-visible {
  color: var(--accent);
}

h2 {
  font-size: 1.4rem;
  margin-top: 2em;
}

h3 {
  font-size: 1.1rem;
  margin-top: 1.6em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

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

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

button {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-text);
  margin-top: 14px;
  width: 100%;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.danger {
  background: #c0392b;
  color: #fff;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.message.error { background: var(--error-bg); color: var(--error-text); }
.message.success { background: var(--success-bg); color: var(--success-text); }

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

ul.plain { padding-left: 20px; }
ul.plain li { margin-bottom: 8px; }

footer.site {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.85rem;
}
