:root {
  --brand: #5b3df5;
  --brand-ink: #ffffff;
  --bg: #f7f6fc;
  --surface: #ffffff;
  --text: #1c1a29;
  --muted: #5d5a70;
  --line: #e4e1f2;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #8a74ff;
    --brand-ink: #14102e;
    --bg: #131220;
    --surface: #1d1b2e;
    --text: #efedf8;
    --muted: #a9a6bd;
    --line: #2e2b45;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

header a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
}

header img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

h1 {
  font-size: clamp(30px, 7vw, 44px);
  line-height: 1.15;
  margin: 0 0 16px;
}

h2 {
  font-size: 20px;
  margin: 32px 0 8px;
}

.lead {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 28px;
}

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

.card h2 {
  margin-top: 0;
}

ul {
  padding-left: 20px;
}

.button {
  display: inline-block;
  background: var(--brand);
  color: var(--brand-ink);
  text-decoration: none;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
}

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

[hidden] {
  display: none !important;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer a {
  color: inherit;
}

.legal li {
  margin-bottom: 6px;
}

mark.todo {
  background: #ffe066;
  color: #1c1a29;
  padding: 0 4px;
  border-radius: 4px;
}

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

label.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 400;
}

input[type='email'],
input[inputmode='numeric'] {
  width: 100%;
  max-width: 360px;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}

input[inputmode='numeric'] {
  max-width: 180px;
  letter-spacing: 0.2em;
}

button.button {
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button.button:disabled {
  opacity: 0.5;
  cursor: default;
}

.button.danger {
  background: #c62f3b;
  color: #ffffff;
}

button.link {
  background: none;
  border: 0;
  font: inherit;
  color: var(--brand);
  cursor: pointer;
  margin-left: 12px;
  text-decoration: underline;
}

.error {
  background: #fde8ea;
  color: #8f1d27;
  border-radius: 12px;
  padding: 12px 16px;
}

.warn {
  border-left: 4px solid #e0a100;
  padding-left: 12px;
}

.small {
  font-size: 14px;
}
