/* =============================================================================
   Login, error and maintenance pages – a single exercise-book page.
   The one orchestrated motion of the app lives here: the margin line is
   drawn top-to-bottom when the page opens (disabled for reduced motion).
   ============================================================================= */

.auth-body {
  background:
    radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--cyan) 18%, transparent) 0, transparent 38%),
    var(--paper);
}

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--s-5) var(--s-4);
}

.auth-sheet {
  position: relative;
  width: min(30rem, 100%);
  padding: var(--s-6) var(--s-6) var(--s-6) calc(var(--margin-x) + var(--s-5));
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(2rem - 1px),
      color-mix(in srgb, var(--cyan) 22%, transparent) calc(2rem - 1px),
      color-mix(in srgb, var(--cyan) 22%, transparent) 2rem
    ),
    var(--sheet);
  background-position: 0 4.25rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  box-shadow: 0 30px 60px -30px rgba(23, 35, 59, 0.35);
}
.auth-sheet-wide { width: min(46rem, 100%); }

.auth-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--margin-x);
  width: 2px;
  background: var(--margin);
  transform-origin: top;
  animation: draw-margin 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.1s both;
}
@keyframes draw-margin { from { transform: scaleY(0); } }

.auth-logo {
  position: absolute;
  top: var(--s-5);
  right: var(--s-5);
  width: 3.25rem;
  height: 3.25rem;
}

.auth-title {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.6rem);
  line-height: 1.05;
  margin: 0 4rem var(--s-2) 0;
}
.auth-lead {
  color: var(--ink-soft);
  margin-bottom: var(--s-5);
}

.auth .field { margin-bottom: var(--s-4); }
.auth input[type="text"], .auth input[type="password"] { min-height: 2.75rem; background: color-mix(in srgb, var(--sheet) 92%, transparent); }
.auth .btn[type="submit"] { min-height: 2.75rem; width: 100%; font-size: var(--fs-md); }

.auth-captcha { margin: var(--s-2) 0 var(--s-4); min-height: 78px; }

.auth-secondary {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
}
.auth-secondary p { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--s-2); }
.auth-secondary .cluster .btn { flex: 1 1 10rem; }

.auth-status {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--margin);
  margin-bottom: var(--s-2);
}

.auth-illustration { max-height: 14rem; margin: 0 0 var(--s-4); border-radius: var(--r-md); }

@media (max-width: 600px) {
  .auth-sheet { padding: var(--s-5) var(--s-4) var(--s-5) calc(var(--margin-x) + var(--s-4)); }
  .auth-logo { width: 2.5rem; height: 2.5rem; top: var(--s-4); right: var(--s-4); }
}

/* honeypot: never visible or focusable for people, bots fill it in */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.auth-privacy { margin: var(--s-5) 0 0; text-align: center; color: var(--ink-soft); }

/* 3FA: "Step 2 of 2" above the lead */
.auth-step { margin: 0 0 var(--s-2); font-size: var(--fs-sm); font-weight: 700; color: var(--cyan-ink); }
