:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1b1f24;
  --muted: #5f6b7a;
  --line: #dde1e6;
  --accent: #2457c5;
  --accent-text: #ffffff;
  --error-bg: #fdecec;
  --error-text: #9b1c1c;
  --ok-bg: #e8f5ec;
  --ok-text: #1e6b38;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --surface: #1d2126;
    --text: #e6e9ed;
    --muted: #98a2ae;
    --line: #2f353c;
    --accent: #6c9bff;
    --accent-text: #0d1117;
    --error-bg: #3a1d1d;
    --error-text: #ffb4b4;
    --ok-bg: #18301f;
    --ok-text: #9be3b0;
  }
}

* { box-sizing: border-box; }

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

a { color: var(--accent); }

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.topbar .brand { font-weight: 700; text-decoration: none; color: var(--text); }
.topbar nav { display: flex; gap: 16px; flex: 1; }
.topbar nav a { text-decoration: none; color: var(--muted); }
.topbar nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.who form { margin: 0; }

.page { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
.narrow { max-width: 380px; margin: 0 auto; padding: 48px 16px; }
.brand-big { text-align: center; margin-bottom: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.stack { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
.muted { color: var(--muted); font-weight: normal; }

label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
input, select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
button {
  font: inherit;
  padding: 9px 14px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  font-weight: 600;
}
button.link { background: none; color: var(--accent); padding: 0; font-weight: normal; }

.error, .ok { padding: 8px 12px; border-radius: 6px; margin: 0 0 12px; }
.error { background: var(--error-bg); color: var(--error-text); }
.ok { background: var(--ok-bg); color: var(--ok-text); }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 32px;
  display: block;
  overflow-x: auto;
}
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
