/* ==========================================================================
   Auth pages (login, register, forgot, reset, messages), blue-green tint.
   Loaded only on those pages. Tokens, the --th-* theme variables, the
   .hud-pane family and the xp- dialog kit (fields, primary button, error row)
   come from site.css (do not redefine them here).

   Each page is a compact pane ("login.exe", "register.exe", ...). The pane is
   the window: inside it the h1 is a wide light heading over a hairline, then
   the form, then the links as outlined buttons. Nothing else sits on the page.
   ========================================================================== */

.auth-page-wrap {
  max-width: 1280px;
  min-height: 52vh;
  margin: 0 auto;
  padding: var(--hdr-gap) var(--yh-g) 8px;
  background: transparent;
}
.auth-pane {
  --pane-pad: 24px;
  max-width: 520px;
}

/* the card has no frame of its own: the pane is the window */
.auth-card.xp-win {
  max-width: none;
  overflow: visible;
  border: 0;
  background: transparent;
}
.auth-card .xp-win__title {
  display: block;
  margin: 0 0 24px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--th-rule);
  background: none;
  color: var(--th-ink);
  font-size: clamp(1.05rem, 3.4vw, 1.4rem);
  letter-spacing: 0.16em;
}
.auth-card .xp-win__title::before,
.auth-card .xp-win__title::after {
  display: none;
}
.auth-card .xp-win__body {
  padding: 0;
}

/* message pages: a pictogram beside the text */
.auth-message-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: var(--th-ink);
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.auth-message-body::before {
  content: "";
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  background: var(--th-ink);
  -webkit-mask: url("/images/sig/sig-sprite.png") 0 -48px / 144px 120px no-repeat;
  mask: url("/images/sig/sig-sprite.png") 0 -48px / 144px 120px no-repeat;
}

/* links under the form: outlined buttons in one row, hover = invert */
.auth-card .xp-links {
  justify-content: flex-start;
  gap: 8px;
  margin-top: 24px;
  padding: 24px 0 0;
  border-top: 1px solid var(--th-rule);
  background: transparent;
}
.auth-card .xp-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--th-ink);
  color: var(--th-ink);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.auth-card .xp-links a:hover {
  background: var(--th-ink);
  color: var(--th-on-accent);
  text-decoration: none;
}

/* focus rings on the light surfaces */
/* required fields: the asterisk after the label and the legend line at the top of the form (the accent, never the red of errors) */
.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 4px;
  font-size: 0.85rem;
  line-height: 1.4;
}
.auth-consent input { margin-top: 3px; flex: none; }
.auth-consent a { color: var(--yh-accent-ink); }
.auth-req,
.auth-legend .auth-req {
  color: var(--yh-accent-ink);
  font-weight: 700;
}
.auth-legend {
  margin: 0 0 4px;
  color: var(--th-ink-soft, var(--th-ink));
  font-family: var(--hud-mono);
  font-size: 0.78rem;
  line-height: 1.4;
}

.auth-pane :focus-visible {
  outline: 2px solid var(--th-ink);
  outline-offset: 2px;
}
.auth-pane .xp-input:focus-visible {
  outline-color: var(--yh-accent);
  outline-offset: 1px;
}

/* ---------- small screens ---------- */

@media (max-width: 768px) {
  .auth-pane { --pane-pad: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-card .xp-links a {
    transition: none;
  }
}
