:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #16181d;
  --muted: #6b7280;
  --line: #e2e5ea;
  --accent: #1f6feb;
  --ok: #147d4a;
  --error: #c02626;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --card: #171a20;
    --text: #e8eaed;
    --muted: #9aa1ac;
    --line: #2a2f38;
    --accent: #4d90fe;
    --ok: #4ade80;
    --error: #f87171;
  }
}

* {
  box-sizing: border-box;
}

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

.card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 8px 24px rgb(0 0 0 / 0.06);
}

.card__head {
  margin-bottom: 22px;
}

h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

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

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

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

input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font-size: 16px;
  font-family: inherit;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.otp-input {
  font-size: 26px;
  letter-spacing: 0.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

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

button {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

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

.primary {
  background: var(--accent);
  color: #fff;
}

.secondary {
  margin-top: 9px;
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.linklike {
  width: auto;
  padding: 0 0 0 6px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
}

.status {
  margin: 16px 0 0;
  min-height: 20px;
  font-size: 13.5px;
}

.status--info {
  color: var(--muted);
}
.status--ok {
  color: var(--ok);
}
.status--error {
  color: var(--error);
}

.tick {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 15%, transparent);
  color: var(--ok);
  font-size: 24px;
  font-weight: 700;
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0 0 16px;
  font-size: 14px;
}

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

.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

details {
  margin-bottom: 16px;
  font-size: 13px;
}

summary {
  cursor: pointer;
  color: var(--muted);
}

pre {
  max-height: 130px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

.banner {
  margin: 14px 0 20px;
  padding: 8px 11px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

/* Keep the invisible reCAPTCHA from adding stray whitespace. */
#recaptcha-container {
  margin-top: 12px;
}
