/*
  Sign in and create an account.

  Everything here is prefixed `auth-`. `.brand` and `.btn` are borrowed on purpose — the wordmark
  and the hero's button, so these screens read as the same product rather than as a login bolted
  onto it.

  NO COLOUR ON THE ERROR STATE, and that is a decision rather than an omission. This host has one
  accent, teal, and it means "grew". The negative value in docs/design/README.md's table
  (#E8674F) was validated on the admin host's grounds, not these, and that file says to re-run the
  check rather than move a value across. So an error is carried by weight, position and
  role="alert". Give it a colour once the ramp has been measured here.
*/

.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 3rem 1rem;
}

/* No .brand rule here on purpose: Screens' ground.css already has one, and a second treatment on
   the sign-in page would be a second wordmark. */

.auth-card {
  width: 100%;
  max-width: 26rem;
  padding: clamp(1.5rem, 5vw, 2.25rem);
  border-radius: var(--r-lg);
  border: 1px solid var(--stroke);
  background: var(--raise);
}

.auth-card h1 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

/* A section of /account, one card each. */
.auth-card h2 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}

.auth-lede {
  color: var(--ink-soft);
  font-size: var(--t-small);
  margin: 0 0 1.5rem;
  text-wrap: pretty;
}

.auth-card > .auth-lede:last-child { margin-bottom: 0; }

/* What a change on /account just did. Ink and a tint, not teal: teal means "went up" alone. */
.auth-done {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line-hi);
  background: var(--tint);
  color: var(--ink);
  font-size: var(--t-small);
}

.auth-field { margin-bottom: 1.1rem; }

/* A visible label, never a placeholder standing in for one: a placeholder vanishes the moment
   anyone types, which is when they most need to know which box they are in. */
.auth-field label {
  display: block;
  font-size: var(--t-small);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.auth-input {
  width: 100%;
  /* 44px at the base type scale — a touch target, not a text line. */
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke-hi);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
}

.auth-input::placeholder { color: var(--ink-faint); }

/* Never `outline: none`. A keyboard is how half of this form is filled in. */
.auth-input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-color: var(--ink);
}

.auth-hint {
  color: var(--ink-faint);
  font-size: var(--t-small);
  margin: 0.4rem 0 0;
}

.auth-hint a { color: var(--ink-soft); }

.auth-msg {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: var(--t-small);
  margin-top: 0.35rem;
}

.auth-error {
  margin: 0 0 1.25rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--r-md);
  border: 1px solid var(--ink-faint);
  background: var(--glass-hi);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 600;
}

.auth-error p { margin: 0; }
.auth-error p + p { margin-top: 0.35rem; }

.auth-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--t-small);
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

.auth-check input { flex: none; width: 1rem; height: 1rem; accent-color: var(--ink); }

.auth-submit { width: 100%; }

/* The bot check's field (SignUpCheck): off screen rather than display:none, which some bots skip. */
.auth-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-alt {
  font-size: var(--t-small);
  color: var(--ink-soft);
  margin: 0;
}

.auth-alt a { color: var(--ink); }
