:root {
  --cream: #f5f2ea;
  --paper: #fffdfa;
  --ink: #0c1018;
  --muted: #737983;
  --line: #dcd8cf;
  --blue: #123ca4;
  --red: #d72b3f;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--cream);
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 45%, rgb(255 255 255 / .72), transparent 34rem),
    var(--cream);
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(24px, 3.5vw, 54px) clamp(24px, 5vw, 78px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .055em;
}

.auth-brand b { color: var(--red); }

.auth-brand__mark {
  width: 27px;
  height: 27px;
  display: grid;
  gap: 3px;
  transform: rotate(-8deg);
}

.auth-brand__mark i { display: block; border-radius: 20px; }
.auth-brand__mark i:nth-child(1) { background: #fff; box-shadow: inset 0 0 0 1px rgb(7 29 80 / .15); }
.auth-brand__mark i:nth-child(2) { background: #2d66cf; }
.auth-brand__mark i:nth-child(3) { background: #e12f45; }

.auth-close {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.auth-close:hover { color: var(--ink); }

.auth-main {
  width: 100%;
  display: grid;
  place-items: center;
  padding: 48px 24px 72px;
}

.auth-card {
  width: min(100%, 520px);
  text-align: center;
}

.auth-step h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1;
  letter-spacing: -.06em;
}

.auth-lead {
  margin: 18px 0 34px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.auth-lead strong {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.auth-step form {
  display: grid;
  gap: 12px;
}

.auth-step input {
  width: 100%;
  height: 68px;
  padding: 0 21px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: 0;
  color: var(--ink);
  background: rgb(255 253 250 / .9);
  box-shadow: 0 8px 28px rgb(12 16 24 / .035);
  font-size: 17px;
  text-align: left;
  transition: border-color .2s, box-shadow .2s;
}

.auth-step input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgb(18 60 164 / .1);
}

.auth-step input[aria-invalid="true"] { border-color: var(--red); }

.auth-step .auth-code {
  text-align: center;
  letter-spacing: .28em;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.auth-submit {
  height: 68px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: var(--red);
  box-shadow: 0 16px 34px rgb(215 43 63 / .16);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s, opacity .2s;
}

.auth-submit:hover { transform: translateY(-2px); }
.auth-submit:disabled { opacity: .58; cursor: wait; transform: none; }

.auth-code-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.auth-code-actions button {
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.auth-code-actions button:disabled { color: #999da4; cursor: default; }

.auth-status {
  margin: 20px 0 0;
  padding: 13px 16px;
  border-radius: 14px;
  color: #8f1324;
  background: #fdecef;
  font-size: 14px;
  line-height: 1.45;
}

.auth-status.is-success { color: #135b3f; background: #e7f7f0; }

.auth-footer {
  padding: 22px 24px 30px;
  color: #92969d;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.auth-footer a { color: inherit; }

@media (max-width: 560px) {
  .auth-header { padding: 22px 20px; }
  .auth-brand { font-size: 16px; }
  .auth-brand__mark { width: 24px; height: 24px; }
  .auth-main { align-items: start; padding: 18vh 20px 48px; }
  .auth-step h1 { font-size: 43px; }
  .auth-lead { margin: 15px 0 28px; font-size: 16px; }
  .auth-step input, .auth-submit { height: 62px; border-radius: 16px; }
  .auth-code-actions { flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
