/* ==========================================================================
   misa.lol — Log in & Sign up
   The one stylesheet for /login and /signup (templates/pages/{login,signup}):
   a centred form on plain graphite, no artwork, no side panel.
   Behaviour lives in /js/auth.js and /js/v2.js; this file is presentation.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Theme contract
   The two inputs below match an admin Themes-creator record
   ({ config: { background, accent } }). Override them on .auth-page to re-skin
   both pages; the state colours are derived from them. --theme-ink is the
   text colour on the background (flip it for a light background — the admin
   swatch switches to dark ink above YIQ 140).
   These are presentation values only. Sign-in providers, the human check,
   verification codes and every validation rule are fixed by the server and
   /js/auth.js — none of them can be changed from here.
   -------------------------------------------------------------------------- */
.auth-page {
  --theme-background: #101011;
  --theme-accent: #ed164f;
  --theme-ink: #f3efe7;

  /* Fixed palette (not derived): the field and button colours were tuned by hand. */
  --field: #18181a;
  --field-hover: #1e1e21;
  --field-line: #68666b;          /* ≥ 3:1 against --field */
  --text-2: #aba5a8;              /* secondary copy */
  --accent-fill: #d91146;         /* submit, checked boxes */
  --accent-fill-hover: #e51950;
  --on-accent: #fff;
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .14);
  --ok-line: rgba(74, 222, 128, .4);

  /* Static values for the default theme (used where color-mix() is missing). */
  --bg: #101011;
  --surface: #171718;
  --line: rgba(243, 239, 231, .1);
  --line-2: rgba(243, 239, 231, .16);
  --text: #f3efe7;
  --text-3: #8a8784;
  --accent: #ed164f;
  --accent-soft: rgba(237, 22, 79, .14);
  --accent-ring: rgba(237, 22, 79, .32);
  --accent-line: rgba(237, 22, 79, .58);
  --accent-text: #fe8690;
  --focus-line: #f9c9c4;          /* warm ivory: focus ≠ error */
  --focus-ring: rgba(243, 239, 231, .16);
  --accent-busy: #ab213c;
  --invalid-line: #f45a6c;
  --error-bg: #2f1d1f;
  --error-line: rgba(237, 22, 79, .48);
  --ok-bg: #1e2621;
  --valid-line: #65a779;
  --success-fill: #2d4f37;

  --font-ui: "Inter", system-ui, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(22px, 3.5vw, 64px);
  --card-w: 420px;
  --radius: 8px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

@supports (color: color-mix(in oklab, red, blue)) {
  .auth-page {
    --bg: var(--theme-background);
    --surface: color-mix(in oklab, var(--theme-ink) 4%, var(--theme-background));
    --line: color-mix(in oklab, var(--theme-ink) 10%, transparent);
    --line-2: color-mix(in oklab, var(--theme-ink) 16%, transparent);
    --text: var(--theme-ink);
    --text-3: color-mix(in oklab, var(--theme-ink) 58%, var(--theme-background));
    --accent: var(--theme-accent);
    --accent-soft: color-mix(in oklab, var(--theme-accent) 14%, transparent);
    --accent-ring: color-mix(in oklab, var(--theme-accent) 32%, transparent);
    --accent-line: color-mix(in oklab, var(--theme-accent) 58%, transparent);
    --accent-text: color-mix(in oklab, var(--theme-accent) 62%, #fff);
    --focus-line: color-mix(in oklab, var(--theme-ink) 78%, var(--theme-accent));
    --focus-ring: color-mix(in oklab, var(--theme-ink) 16%, transparent);
    --accent-busy: color-mix(in oklab, var(--accent-fill) 78%, var(--surface));
    --invalid-line: color-mix(in oklab, var(--theme-accent) 80%, var(--theme-ink));
    --error-bg: color-mix(in oklab, var(--theme-accent) 12%, var(--surface));
    --error-line: color-mix(in oklab, var(--theme-accent) 48%, transparent);
    --ok-bg: color-mix(in oklab, var(--ok) 9%, var(--surface));
    --valid-line: color-mix(in oklab, var(--ok) 55%, var(--field-line));
    --success-fill: color-mix(in oklab, var(--ok) 32%, var(--surface));
  }
}

/* --------------------------------------------------------------------------
   Base (these pages do not load the site-wide v2.css)
   -------------------------------------------------------------------------- */
:where(.auth-page) *,
:where(.auth-page) *::before,
:where(.auth-page) *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: #101011; }

body.auth-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

/* :where() keeps these resets at element specificity so components win. */
:where(.auth-page) :where(h1, p) { margin: 0; }
:where(.auth-page) :where(img, svg) { display: block; max-width: 100%; }
:where(.auth-page) a { color: inherit; }
:where(.auth-page) :where(button, input) { font: inherit; color: inherit; }
:where(.auth-page) button { cursor: pointer; }
.auth-page [hidden] { display: none !important; }
.auth-page ::selection { background: var(--accent); color: var(--on-accent); }

:where(.auth-page) :focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.ic {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 16px; }

/* Session check — shown until /js/auth.js marks the page ready. */
.auth-session-check {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font: 500 14px/1 var(--font-ui);
}
html:not(.auth-ready) .auth-session-check {
  position: fixed;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translateX(-50%);
  display: inline-flex;
}
.auth-session-check::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  border-top-color: var(--accent);
  animation: auth-spin .8s linear infinite;
}

/* --------------------------------------------------------------------------
   Shell: header bar / centred form / footer
   -------------------------------------------------------------------------- */
.auth {
  position: relative;
  z-index: 1;
  width: min(100%, 1200px);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
}
html:not(.auth-ready) .auth,
html.auth-redirecting .auth { visibility: hidden; }

.auth__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
}

.auth__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.045em;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
}
.auth__mark {
  width: 14px;
  height: 27px;
  fill: var(--accent);
  transform: translateY(-1px);
  transition: transform .5s var(--ease);
}
.auth__brand:hover .auth__mark { transform: rotate(-14deg) translateY(-2px); }

.auth__switch {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-2);
}
.auth__switch-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.auth__switch-link .ic { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.auth__switch-link:hover { color: #ff9ab3; }
.auth__switch-link:hover .ic { transform: translateX(2px); }

.auth__body {
  grid-row: 2;
  align-self: center;
  justify-self: center;
  width: min(100%, var(--card-w));
  padding: 28px 0;
}

/* --------------------------------------------------------------------------
   Heading
   -------------------------------------------------------------------------- */
.auth__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #b9b2b4;
}
.auth__eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.auth__title {
  margin-top: 15px;
  font: 550 clamp(30px, 3vw, 42px)/1.15 var(--font-ui);
  letter-spacing: -.055em;
  color: var(--text);
}
/* /signup: the title is the front page's "I just need your name." lettering. */
.auth__title--art {
  position: relative;
  isolation: isolate;
  margin-top: 10px;
}
.auth__title--art img { width: min(100%, 372px); height: auto; }
.auth__title--art::before {
  content: "";
  position: absolute;
  inset: -22% -6% -18% -4%;
  z-index: -1;
  background: radial-gradient(58% 54% at 46% 58%, rgba(237, 22, 79, .17), transparent 72%);
  pointer-events: none;
}

.auth__lede {
  margin-top: 10px;
  max-width: 42ch;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.auth__title--art + .auth__lede { margin-top: 18px; }

/* Plan chip (shown by /js/auth.js + /js/v2.js for ?plan=…) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--field);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.chip .ic { width: 13px; height: 13px; color: var(--accent); }
.chip--gold .ic { color: #e6c36b; }

/* --------------------------------------------------------------------------
   Status message (#auth-message, driven by /js/auth.js)
   -------------------------------------------------------------------------- */
.auth-message {
  position: relative;
  margin-top: 22px;
  padding: 12px 14px 12px 42px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--field);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}
.auth-message::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 13px;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--msg-icon) center / contain no-repeat;
  mask: var(--msg-icon) center / contain no-repeat;
}
.auth-message.is-visible { animation: auth-msg-in .28s var(--ease-out); }
.auth-message--error {
  --msg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5.2M12 16.4h.01'/%3E%3C/svg%3E");
  border-color: var(--error-line);
  background: var(--error-bg);
}
.auth-message--error::before { color: var(--accent-text); }
.auth-message--ok {
  --msg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m7.8 12.3 2.8 2.8 5.6-5.8'/%3E%3C/svg%3E");
  border-color: var(--ok-line);
  background: var(--ok-bg);
}
.auth-message--ok::before { color: var(--ok); }
.auth-message a {
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */
.auth__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 28px;
}
.auth__fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 19px; }

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.field__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  font-size: 12px;
  font-weight: 550;
  color: var(--text);
}
.field__label label { cursor: pointer; }
.field__opt {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
}
.forgot-link {
  padding: 4px 0;           /* larger hit area, same layout */
  margin: -4px 0;
  font-size: 12px;
  font-weight: 500;
  color: #c9c2c5;
  text-decoration: none;
  transition: color .2s;
}
.forgot-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.field__box {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 51px;
  border-radius: var(--radius);
  border: 1px solid var(--field-line);
  background: var(--field);
  transition: border-color .16s, box-shadow .16s, background-color .16s;
}
.field__box:hover { background: var(--field-hover); }
.field__box:focus-within {
  border-color: var(--focus-line);
  box-shadow: 0 0 0 3px var(--focus-ring);
  background: var(--field-hover);
}
.field.is-invalid .field__box { border-color: var(--invalid-line); }
.field.is-invalid .field__box:focus-within { border-color: var(--invalid-line); box-shadow: 0 0 0 3px var(--accent-ring); }
.field.is-valid .field__box { border-color: var(--valid-line); }
.field.is-valid .field__box:focus-within { border-color: var(--focus-line); }
/* On /login, "valid" only means "well-formed", so it gets no green. */
.login-page .field.is-valid .field__box { border-color: var(--field-line); }
.login-page .field.is-valid .field__box:focus-within { border-color: var(--focus-line); }

.field__input {
  flex: 1 1 auto;
  width: 100%;              /* no intrinsic <input> width in narrow layouts */
  min-width: 0;
  align-self: stretch;
  padding: 0 15px;
  border: 0;
  outline: 0;
  border-radius: inherit;
  background: transparent;
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  caret-color: var(--accent);
}
.field__input::placeholder { font-size: 14px; font-weight: 400; color: var(--text-2); opacity: 1; }
.field__input:disabled { opacity: 1; -webkit-text-fill-color: var(--text-2); }
.field__input:-webkit-autofill,
.field__input:-webkit-autofill:hover,
.field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--accent);
  -webkit-box-shadow: 0 0 0 1000px var(--field) inset;
  box-shadow: 0 0 0 1000px var(--field) inset;
  transition: background-color 600000s 0s;
}

.field__prefix {
  display: flex;
  align-items: center;
  align-self: stretch;
  padding: 0 1px 0 15px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  user-select: none;
}
.field__prefix + .field__input { padding-left: 1px; }

.field__input--code { font-variant-numeric: tabular-nums; letter-spacing: .42em; }
.field__input--code::placeholder { letter-spacing: .42em; }
.field__input--mono { font-variant-numeric: tabular-nums; letter-spacing: .12em; }

.field__eye {
  display: grid;
  place-items: center;
  align-self: stretch;
  width: 48px;
  border: 0;
  border-radius: 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0;
  background: transparent;
  color: var(--text-3);
  transition: color .16s;
}
.field__eye .ic { width: 18px; height: 18px; }
.field__eye:hover,
.field__eye[aria-pressed="true"] { color: var(--text); }
.field__eye:focus-visible { outline-offset: -4px; border-radius: 10px; }

/* "Send code" — sits inside the email box. /js/auth.js drives its text & state. */
.field__action {
  flex: none;
  min-width: 108px;
  height: 38px;
  margin-right: 7px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background-color .16s, border-color .16s;
}
.field__action:hover:not(:disabled) { background: var(--accent-ring); border-color: var(--accent); }
.field__action:disabled { border-color: var(--line-2); background: transparent; color: var(--text-2); }

/* Hints are empty at rest; /js/v2.js fills them with validation and availability messages. */
.field__hint {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-3);
}
.field__hint:has([data-field-hint]:empty) { display: none; }
.field__hint .dot {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 6.5px;
  border-radius: 50%;
  background: var(--line-2);
  transition: background-color .2s, box-shadow .2s;
}
.field__hint b { color: var(--text); font-weight: 650; }
.field.is-valid .field__hint .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.field.is-invalid .field__hint { color: var(--accent-text); }
.field.is-invalid .field__hint .dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* Availability suggestions injected by /js/v2.js */
.claim__fix {
  display: inline;
  padding: 0 6px;
  margin: 0 1px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--field-hover);
  color: var(--text);
  font: 650 12.5px/1.6 var(--font-ui);
}
.claim__fix:hover { border-color: var(--accent); }

/* Caps Lock badge inside password boxes (filled in by /js/auth-ui.js) */
.field__caps {
  position: absolute;
  top: 50%;
  right: 52px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(245, 195, 107, .14);
  color: #f5c36b;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
}
.field__caps:empty { padding: 0; }
.field__caps:not(:empty)::before { content: "⇪"; font-size: 12px; }
.field__box.has-caps .field__input { padding-right: 132px; }

/* Checkbox */
.check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  padding: 2px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
  cursor: pointer;
}
.check input {
  position: absolute;
  top: 4px;
  opacity: 0;
  width: 20px;
  height: 20px;
  margin: 0;
}
.check i {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--field-line);
  background: var(--field);
  color: transparent;
  transition: background-color .16s, border-color .16s, color .16s;
}
.check i .ic { width: 13px; height: 13px; stroke-width: 3; }
.check:hover i { border-color: var(--text-3); }
.check input:checked + i { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.check input:focus-visible + i { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.check.is-invalid i { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.check.is-invalid { color: var(--text); }
.check a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}
.check a:hover { text-decoration-color: var(--accent); }
.check__hint {
  display: none;
  margin-top: -8px;
  padding-left: 31px;
  font-size: 13px;
  color: var(--accent-text);
}
.check.is-invalid + .check__hint { display: block; }

/* Human check (Cloudflare Turnstile, rendered by /js/auth.js) */
.auth__gate {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-2);
}
.auth__gate .dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
  animation: auth-pulse 1.6s var(--ease) infinite;
}
.turnstile-box {
  min-height: 65px;
  border-radius: var(--radius);
}

/* Primary action */
.auth__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  min-height: 51px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.005em;
  transition: transform .18s var(--ease), background-color .18s;
}
.auth__submit .ic { width: 17px; height: 17px; transition: transform .2s var(--ease); }
.auth__submit b { font-weight: 800; }
.auth__submit:hover { background: var(--accent-fill-hover); }
.auth__submit:hover .ic { transform: translateX(3px); }
.auth__submit:active { transform: translateY(1px); }
.auth__submit span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth__submit[aria-busy="true"] { justify-content: center; cursor: progress; background: var(--accent-busy); }
.auth__submit[aria-busy="true"]::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: auth-spin .7s linear infinite;
}
.auth__submit[data-state="success"] {
  cursor: default;
  background: var(--success-fill);
  box-shadow: 0 0 0 1px var(--ok-line) inset;
  color: var(--text);
}
.auth__submit[data-state="success"]::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: var(--ok);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: none;
}

/* Two-step (MFA) form on /login */
.auth__step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--field);
}
.auth__step-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.auth__step-icon .ic { width: 19px; height: 19px; }
.auth__step-title { font-size: 15px; font-weight: 650; color: var(--text); }
.auth__step-text { margin-top: 3px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.auth__back {
  justify-self: center;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}
.auth__back:hover { color: var(--text); text-decoration-color: var(--accent); }

/* --------------------------------------------------------------------------
   Alternate sign-in
   -------------------------------------------------------------------------- */
.auth__or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 23px 0 17px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.auth__or::before,
.auth__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2));
}
.auth__or::after { background: linear-gradient(90deg, var(--line-2), transparent); }

.oauth {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.oauth__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 49px;
  padding: 10px 6px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .16s, background-color .16s;
}
.oauth__btn img { width: 16px; height: 16px; object-fit: contain; }
.oauth__btn:hover { border-color: #8f858b; background: #202023; }
.oauth__btn[aria-disabled="true"] {
  opacity: .42;
  cursor: not-allowed;
  filter: grayscale(.6);
}
.oauth__btn[aria-disabled="true"]:hover { border-color: var(--line-2); background: transparent; }

.auth__fine {
  margin-top: 25px;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  color: var(--text-2);
  text-wrap: pretty;
}
.auth__fine a {
  color: #f1d5de;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 3px;
}
.auth__fine a:hover { text-decoration-color: var(--accent); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.auth__foot {
  grid-row: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  min-height: 68px;
  padding: 20px 0;
  font-size: 11px;
  color: var(--text-2);
}
.auth__foot > span:first-child { margin-right: auto; }
.auth__foot a {
  padding: 6px 0;
  text-decoration: none;
  transition: color .16s;
}
.auth__foot a:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   Motion (none at all with reduced motion)
   -------------------------------------------------------------------------- */
@keyframes auth-spin { to { transform: rotate(360deg); } }
@keyframes auth-pulse { 50% { opacity: .45; } }
@keyframes auth-msg-in { from { opacity: 0; transform: translateY(-4px); } }

@media (prefers-reduced-motion: reduce) {
  .auth-page *,
  .auth-page *::before,
  .auth-page *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .auth-session-check::before,
  .auth__submit[aria-busy="true"]::before {
    animation-duration: 1.4s !important;
    animation-iteration-count: infinite !important;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 1800px) {
  .auth { min-height: min(100svh, 1100px); }
}
@media (max-width: 1050px) {
  .oauth { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .auth__switch-text { display: none; }
}
@media (max-width: 760px) {
  .auth {
    display: flex;
    flex-direction: column;
    max-width: 560px;
    min-height: 100svh;
    padding-inline: 24px;
  }
  .auth__bar { min-height: 76px; }
  .auth__brand { font-size: 21px; }
  .auth__switch-link { font-size: 12px; }
  .auth__body { width: 100%; padding: 30px 0 20px; }
  .auth__title { margin-top: 10px; font-size: 31px; }
  .auth__form { margin-top: 24px; gap: 18px; }
  .auth__fields { gap: 17px; }
  .oauth { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .oauth__btn { flex-direction: column; gap: 7px; min-height: 61px; font-size: 10px; }
  .auth__fine { margin-top: 23px; }
  .auth__foot {
    margin-top: auto;
    justify-content: center;
    gap: 12px 18px;
    min-height: 58px;
    padding: 14px 0 24px;
  }
  .auth__foot > span:first-child { margin: 0; }
  .auth__foot > a:last-child { display: none; }
}
@media (max-width: 380px) {
  .field__action { min-width: 96px; padding: 0 10px; }
}
@media (max-width: 350px) {
  .auth { padding-inline: 18px; }
}

/* Windows High Contrast / forced colours */
@media (forced-colors: active) {
  .field__box,
  .oauth__btn,
  .auth__submit,
  .field__action,
  .check i { border: 1px solid CanvasText; }
  .check input:checked + i { background: Highlight; color: HighlightText; }
}
