/* Contourly — login screen (app-like stage). Owned by Wave-2 Agent C.
   ONE responsive DOM: mobile is content directly on the paper dot-grid; desktop the
   body becomes a comfortably-sized centered cream card. Foundation components (input,
   OTP code cells, notice, check, flagpick, banner) live in app.css; this file is
   layout + a few login-specific bits. Root = .ct-screen--stage → no global chrome. */

/* ---- stage: header above a centered card -------------------------------- */
.ct-login__head { padding: 12px 4px 0; }
.ct-login__body { padding: 12px 4px 0; }
.ct-login__body--loading { min-height: 34vh; display: grid; place-items: center; }

.ct-login__lede { margin: 0 0 4px; }
.ct-login__field { margin-top: 18px; }
.ct-login__submit { margin-top: 16px; }
.ct-login__foot { margin-top: 24px; padding: 0 0 12px; }

/* rate-limit banner: sparkle + text row */
.ct-login__ratelimit { align-items: center; }
.ct-login__spark { flex: none; }

/* inbox code card */
.ct-login__inbox-card { margin-top: 18px; }
.ct-login__resend-btn { margin-top: 12px; }

/* first-time setup: name field with an inline "generated — change me" hint */
.ct-login__name-field { position: relative; }
.ct-login__name-hint { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); margin: 0; pointer-events: none; }
.ct-login__setup-optin { margin-top: 16px; }
.ct-login__setup-actions { margin-top: 20px; }
.ct-login__setup-actions > * { flex: 1; }

/* merge success: mint burst behind the italic "Progress saved!" verdict */
.ct-login__merge { position: relative; overflow: hidden; }
.ct-login__merge-head { position: relative; display: grid; place-items: center; min-height: 150px; margin-bottom: 2px; }
.ct-login__merge-burst { position: absolute; inset: 0; margin: auto; width: 138px; height: 138px; opacity: .9; z-index: 0; animation: ct-spin 22s linear infinite; }
.ct-login__merge-title { position: relative; z-index: 1; transform: rotate(-3deg); text-shadow: none; }
.ct-login__merge-actions { justify-content: center; margin-top: 16px; }
.ct-login__merge-actions > * { flex: 0 0 auto; min-width: 200px; }

/* ========================================================================= */
/* TABLET / DESKTOP ≥768 — the body reads as a centered card on the dot-grid  */
/* ========================================================================= */
@media (min-width: 768px) {
  .ct-login__head { padding: 4px 8px 14px; }
  .ct-login__body {
    background: var(--ct-cream);
    border: var(--ct-bw) solid var(--ct-ink);
    border-radius: var(--ct-r-panel);
    box-shadow: var(--ct-sh-7);
    padding: 26px 28px;
  }
  .ct-login__body--loading { background: none; border: 0; box-shadow: none; }
  .ct-login__foot { text-align: center; padding: 0; }
  .ct-login__inbox-card { box-shadow: var(--ct-sh-4); }
}

@media (min-width: 1024px) {
  .ct-login__merge-head { min-height: 168px; }
  .ct-login__merge-burst { width: 152px; height: 152px; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-login__merge-burst { animation: none !important; }
}
