/* auth.css — branded chrome for the UNAUTHENTICATED pages (login / signup /
 * password reset).
 *
 * Design tokens live in the SHARED contract tokens.css (imported below), so the
 * auth pages and the authenticated app shell skin from the same source. Restyle
 * the whole product by editing tokens.css only — no markup or rule edits here.
 * Default theme is a HYBRID: a clean modern frame with editorial touches
 * (warm-tinted neutrals, a refined serif for headings/wordmark, a sans for UI,
 * one confident accent).
 */
@import url("tokens.css");
/* Flash + field-error rules are SHARED with the app, portal and newsroom shells
   (messages.css). Importing it also gives this shell .form-error, which
   accept_invite.html has always emitted but no auth stylesheet ever styled. */
@import url("messages.css");

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--font-sans);
  color: var(--c-fg);
  background: var(--c-bg);
  /* subtle editorial texture: a faint paper gradient */
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(31, 78, 107, .06), transparent 60%);
}

a { color: var(--c-accent); }
a:hover { color: var(--c-accent-hover); }

/* --- Auth layout: centred card on paper --- */
.auth-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: var(--maxw-card);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 34px 30px;
}

.wordmark {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: .01em;
  color: var(--c-fg);
  text-decoration: none;
  display: inline-block;
}
.wordmark .dot { color: var(--c-accent); }

.auth-card h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 25px;
  margin: 20px 0 4px;
  letter-spacing: .005em;
}
.auth-card .lede {
  color: var(--c-muted);
  margin: 0 0 22px;
  font-size: 15px;
}

/* --- Forms --- */
.field { margin-bottom: var(--gap); }
.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--c-fg);
}
.field input {
  width: 100%;
  font: inherit;
  padding: 11px 13px;
  color: var(--c-fg);
  background: #fff;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field input::placeholder { color: #aaa093; }
.field input:hover { border-color: var(--c-accent); }
.field input:focus-visible,
.field input:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}
.field .errors {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  color: var(--c-error-fg);
  font-size: 13px;
}

.field-row { display: flex; gap: var(--gap-sm); }
.field-row .field { flex: 1; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  width: 100%;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-align: center;
  text-decoration: none;
  transition: background .12s ease, filter .12s ease;
}
.btn-primary {
  background: var(--c-accent);
  color: var(--c-accent-fg);
  border-color: var(--c-accent);
}
.btn-primary:hover { background: var(--c-accent-hover); color: var(--c-accent-fg); }
.btn:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
}

/* --- Auxiliary links / meta --- */
.auth-meta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--c-border);
  font-size: 14px;
  color: var(--c-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}
.auth-aux { margin-top: 14px; font-size: 14px; }

/* --- Flash messages ---
   The family lives in messages.css (@imported above). ONE deviation: the auth
   card stacks a single block under the wordmark, so the list carries more air
   beneath it than the app shell's, where .content's own gap does that job. */
.flashes { margin: 0 0 20px; }

/* --- Locale selector --- */
.locale-bar {
  margin-top: 26px;
  text-align: center;
  font-size: 13px;
  color: var(--c-muted);
}
.locale-bar a { margin: 0 4px; text-decoration: none; }
.locale-bar a[aria-current="true"] { font-weight: 700; text-decoration: underline; }
