:root {
  color-scheme: light dark;
  --text: #1c1b22;
  --muted: #5c5a66;
  --surface: #ffffff;
  --page: #f3f2f7;
  --line: #dcdae3;
  --accent: #5b4bd6;
  --accent-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f1f0f5;
    --muted: #a9a6b5;
    --surface: #1f1e26;
    --page: #121117;
    --line: #34323e;
    --accent: #8b7cf6;
    --accent-text: #121117;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--page);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}

.brand {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--accent);
}

h1 { font-size: 1.35rem; line-height: 1.3; margin: 0 0 12px; }
h2 { font-size: 1rem; margin: 20px 0 6px; }
p, li, dd { color: var(--muted); }
ul { margin: 0; padding-left: 20px; }

dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0;
}

dt { font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; }

label { display: block; font-weight: 600; margin: 12px 0 4px; }

input {
  width: 100%;
  padding: 12px;
  font: inherit;
  color: var(--text);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 10px;
}

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

button {
  margin-top: 16px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: wait; }

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

button.link {
  width: auto;
  min-height: 0;
  padding: 0;
  color: var(--accent);
  background: none;
  font-weight: 500;
}

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 0.9rem; margin-top: 16px; }
#status { min-height: 1.5em; margin: 16px 0 0; }
