:root {
  --auth-ink: #183b35;
  --auth-muted: #637670;
  --auth-paper: #fffdf9;
  --auth-sage: #edf4ec;
  --auth-peach: #ffe7d8;
  --auth-line: #dce5df;
}

html:has(.auth-page) { background: var(--auth-sage); }
.auth-page {
  min-height: 100svh;
  background:
    radial-gradient(circle at 8% 12%, #fff7d7 0 8%, transparent 24%),
    radial-gradient(circle at 92% 82%, #f4dfe6 0 8%, transparent 24%),
    linear-gradient(145deg, #f7f5ed 0%, var(--auth-sage) 48%, #e4eee9 100%);
  color: var(--auth-ink);
}
.auth-header {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 22px clamp(20px, 4vw, 42px);
  border: 0;
  background: transparent;
}
.auth-header .brand { font-size: 21px; letter-spacing: -.02em; }
.auth-help {
  color: var(--auth-muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.auth-shell {
  display: grid;
  width: min(100% - 32px, 620px);
  min-height: calc(100svh - 172px);
  margin: 0 auto;
  padding: clamp(18px, 4vh, 46px) 0 52px;
  place-items: center;
}
.auth-card {
  width: 100%;
  padding: clamp(28px, 7vw, 54px);
  border: 1px solid #ffffffc7;
  border-radius: 34px;
  background: #fffdf9f2;
  box-shadow: 0 24px 70px #25423a1c;
  backdrop-filter: blur(14px);
}
.auth-mark {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 30px;
  place-items: center;
  border-radius: 18px;
  background: var(--auth-peach);
  color: #b65d48;
  font-size: 25px;
  font-weight: 900;
  transform: rotate(-4deg);
}
.auth-mark span { transform: rotate(4deg); }
.auth-mark--sent { background: #dcebdc; color: #337052; }
.auth-mark--error { background: #fde3df; color: #b05248; }
.auth-kicker {
  color: #937467;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .1em;
}
.auth-card h1 {
  max-width: 500px;
  margin: 12px 0 18px;
  font-size: clamp(38px, 7.5vw, 58px);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.auth-intro {
  max-width: 480px;
  margin: 0;
  color: #405a54;
  font-size: clamp(17px, 2.6vw, 19px);
  line-height: 1.75;
}
.auth-form { display: grid; gap: 10px; margin-top: 32px; }
.auth-form label { font-size: 14px; font-weight: 850; }
.auth-form input[type="email"] {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid #b9c7c1;
  border-radius: 16px;
  outline: 0;
  background: #fff;
  color: var(--auth-ink);
  font: inherit;
  font-size: 17px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-form input[type="email"]:focus {
  border-color: var(--auth-ink);
  box-shadow: 0 0 0 4px #6b968b21;
}
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  margin-top: 6px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  background: var(--auth-ink);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px #183b3526;
}
.auth-submit:hover { background: #285149; }
.auth-submit:focus-visible { outline: 3px solid #e89b7e; outline-offset: 3px; }
.auth-submit--link { margin-top: 30px; }
.auth-note {
  display: flex;
  gap: 11px;
  margin-top: 20px;
  padding: 15px 16px;
  border-radius: 15px;
  background: #f2f5ef;
  color: #526760;
}
.auth-note > span { color: #d07761; font-size: 16px; }
.auth-note p { margin: 0; font-size: 13px; line-height: 1.55; }
.auth-why {
  margin: 24px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--auth-line);
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.7;
}
.auth-back {
  display: inline-block;
  margin-top: 22px;
  color: var(--auth-ink);
  font-size: 14px;
  font-weight: 800;
  text-underline-offset: 4px;
}
.auth-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 20px calc(22px + env(safe-area-inset-bottom));
  background: transparent;
  color: var(--auth-muted);
  font-size: 12px;
}
.auth-footer a { text-decoration: none; }

@media (max-width: 560px) {
  .auth-header { align-items: center; padding-top: 16px; padding-bottom: 8px; }
  .auth-header .brand::before { width: 40px; height: 40px; flex-basis: 40px; }
  .auth-help { font-size: 12px; }
  .auth-shell { width: min(100% - 24px, 620px); min-height: auto; padding: 18px 0 30px; }
  .auth-card { padding: 28px 22px; border-radius: 26px; }
  .auth-mark { width: 48px; height: 48px; margin-bottom: 24px; border-radius: 16px; }
  .auth-card h1 { font-size: clamp(36px, 11vw, 48px); }
  .auth-form { margin-top: 26px; }
  .auth-footer { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: no-preference) {
  .auth-card { animation: auth-arrive .45s ease both; }
  @keyframes auth-arrive { from { opacity: 0; transform: translateY(12px); } }
}
