/* Auth surface — /login, /check-your-email, /signup.
 *
 * Auth pages share the canonical handler/templates/_base.html with marketing,
 * storefront, onboarding, and the 404; this stylesheet is loaded per-page via
 * the {{define "head"}} block in each auth template.
 *
 * Auth pages render a centered card on the page background. They override
 * the shared base's {{block "header"}} and {{block "footer"}} to empty so
 * the auth card floats on a clean shell — intentional, matches the
 * "focused task" UI pattern for sign-in flows.
 */

/* Body flex column so the auth-shell .main child can flex:1 fill the
 * viewport and center its child card vertically. We scope to body.auth
 * (set per page via {{define}}) so this rule doesn't leak to surfaces
 * that share the base. */
body.auth {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.auth main {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  max-width: none;
}

/* Auth pages override {{block "header"}} + {{block "footer"}} with an
 * HTML-comment-only body so the override registers, but the surrounding
 * <header class="site-header"> / <footer class="site-footer"> wrapper
 * elements still render (and base.css applies padding + borders to them).
 * Hide the wrappers here so the auth card truly floats on a clean shell. */
body.auth > header.site-header,
body.auth > footer.site-footer {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 32px;
}
.auth-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 12px;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-display);
  margin: 0 0 8px;
}
.auth-card p.lede {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--ink-soft);
  margin: 0 0 24px;
}
.auth-form label {
  display: block;
  font-size: var(--text-secondary);
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.auth-form input[type="email"],
.auth-form input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font-size: var(--text-body);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  box-sizing: border-box;
}
.auth-form input[type="email"]:focus-visible,
.auth-form input[type="text"]:focus-visible {
  border-color: var(--blue);
  background: var(--bg-card);
  /* Defer to the global :focus-visible ring from base.css — no
   * outline:none override here so keyboard users always see the ring. */
}
.auth-form button {
  width: 100%;
  margin-top: 16px;
  padding: 12px 18px;
  font-size: var(--text-body);
  font-weight: 600;
  color: #FFFFFF;
  background: var(--blue);
  border: 0;
  border-radius: var(--radius-card);
  cursor: pointer;
}
.auth-form button:hover {
  background: var(--blue-bright);
}
.auth-error {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid var(--red);
  padding: 10px 12px;
  border-radius: var(--radius-card);
  font-size: var(--text-secondary);
  margin: 0 0 16px;
}
.auth-alt {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
  font-size: var(--text-secondary);
  color: var(--ink-muted);
  text-align: center;
}
.auth-alt a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.auth-alt a:hover {
  text-decoration: underline;
}
.auth-brand {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 28px;
}

/* E1: username availability hint + ToS checkbox */
.auth-hint {
  font-size: 13px;
  color: var(--ink-muted);
  margin: -4px 0 12px;
  line-height: 1.4;
}
.auth-hint[data-mood="ok"] {
  color: #1a7f37;
}
.auth-hint[data-mood="warn"] {
  color: #b35900;
}
.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  cursor: pointer;
}
.auth-checkbox input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}
.auth-checkbox a {
  color: var(--blue);
  text-decoration: none;
}
.auth-checkbox a:hover {
  text-decoration: underline;
}
