:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --fg: #16181c;
  --muted: #5d636e;
  --line: #d9dbe0;
  --accent: #0a66e8;
  --accent-fg: #ffffff;
  --error: #b42318;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --fg: #f1f2f4;
    --muted: #a3a9b3;
    --line: #333841;
    --accent: #4c94ff;
    --accent-fg: #0b0d10;
    --error: #ff8078;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  max-width: 460px;
  padding: 48px 16px 32px;
  background: var(--bg);
  color: var(--fg);
  font:
    16px / 1.5 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}

h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.lede {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 18px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  font-weight: 600;
}

input[type="tel"],
input[inputmode="numeric"] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 18px;
}

.consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.consent label {
  font-weight: 400;
}

.consent input {
  margin: 2px 0 0;
  width: 18px;
  height: 18px;
}

button,
.button {
  display: block;
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--accent);
}

button[hidden] {
  display: none;
}

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

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

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

#qr-block {
  margin-top: 24px;
  text-align: center;
}

#qr {
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

#error {
  margin: 16px 0 0;
  color: var(--error);
}

[hidden] {
  display: none;
}

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