.auth-mainline-page {
  --auth-primary: #0e2247;
  --auth-primary-ink: #ffffff;
  --auth-primary-hover: #12295a;
  --auth-primary-line: #16335e;
  --auth-ink: #09090b;
  --auth-muted: #515a66;
  --auth-faint: #6b7788;
  --auth-line: #e4e4e7;
  --auth-field-line: #dadbd4;
  background: #fff;
  color: var(--auth-ink);
  font-family: var(--font-sans);
}

/* Header: handled globally by css/mainline-header.css (data-nav-variant=mainline). */

/* Shell: the tinted, rounded panel the card sits on. */
.auth-mainline {
  position: relative;
  margin: 10px 16px 0;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(to bottom, #fafafc 0%, #fff 30%, #fff 100%);
}
.auth-mainline__inner {
  width: min(100% - 32px, 26rem);
  margin: 0 auto;
  padding: 7.5rem 0 4.5rem;
}

.auth-mainline-card {
  background: #fff;
  border: 1px solid var(--auth-field-line);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgb(9 9 11 / 0.06), 0 10px 28px -20px rgb(9 9 11 / 0.28);
}

.auth-mainline-card__head { padding: 1.5rem 1.5rem 0; text-align: center; }

.auth-mainline-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.auth-mainline-logo .logo__name { font: 700 1.05rem var(--font-sans); letter-spacing: -0.02em; }

.auth-mainline-card__title { font: 700 1.5rem/1.2 var(--font-sans); letter-spacing: -0.03em; }
.auth-mainline-card__sub { margin-top: 0.4rem; color: var(--auth-muted); font-size: 0.875rem; }

.auth-mainline-card__body { padding: 1.5rem; }

.auth-mainline-form { display: grid; gap: 1rem; }

.auth-mainline-field { display: block; }

.auth-mainline-label {
  display: block;
  margin: 0 0 0.375rem;
  font: 600 0.75rem/1.1 var(--font-sans);
  letter-spacing: 0.01em;
  color: var(--auth-ink);
}

.auth-mainline-input-wrap { position: relative; }
.auth-mainline-input-wrap .auth-mainline-input { padding-right: 2.75rem; }

.auth-mainline-input {
  width: 100%;
  height: 2.375rem;
  min-width: 0;
  border: 1px solid var(--auth-field-line);
  border-radius: 6px;
  background: #fff;
  padding: 0 0.75rem;
  color: var(--auth-ink);
  font: 400 0.875rem/1 var(--font-sans);
  box-shadow: inset 0 0 0 1px transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-mainline-input::placeholder { color: var(--auth-faint); }
.auth-mainline-input:hover { border-color: #c6c8bf; }
.auth-mainline-input:focus { outline: none; border-color: var(--auth-primary-line); box-shadow: 0 0 0 3px rgb(14 34 71 / 0.18); }

.auth-mainline-input--select { appearance: none; cursor: pointer; }
.auth-mainline-input--select::-ms-expand { display: none; }
.auth-mainline-input-chevron {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--auth-faint);
  pointer-events: none;
}

.auth-mainline-input-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: #71717a;
  cursor: pointer;
}
.auth-mainline-input-toggle:hover { color: var(--auth-ink); background: #f4f4f5; }
.auth-mainline-input-toggle svg { width: 1.05rem; height: 1.05rem; }

.auth-mainline-hint { margin-top: 0.4rem; color: var(--auth-faint); font-size: 0.75rem; }

.auth-mainline-error {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
  color: #dc2626;
  font-size: 0.75rem;
}
.auth-mainline-error svg { width: 0.9rem; height: 0.9rem; flex: none; }

.auth-mainline-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.auth-mainline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: 500 0.875rem var(--font-sans);
  cursor: pointer;
  user-select: none;
}
.auth-mainline-check input {
  appearance: none;
  width: 1rem;
  height: 1rem;
  margin: 0;
  border: 1px solid #a1a1aa;
  border-radius: 4px;
  background: #fff;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-mainline-check input:hover { border-color: var(--auth-primary-line); }
.auth-mainline-check input:checked { background: var(--auth-primary); border-color: var(--auth-primary-line); }
.auth-mainline-check input:checked::after {
  content: '';
  width: 0.45rem;
  height: 0.28rem;
  border: solid var(--auth-primary-ink);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translate(0.1rem, -0.1rem);
}
.auth-mainline-check input:focus-visible { outline: 2px solid var(--auth-primary-line); outline-offset: 2px; }

.auth-mainline-rowlink { font: 500 0.875rem var(--font-sans); color: var(--auth-muted); }
.auth-mainline-rowlink:hover { color: var(--auth-ink); }

.auth-mainline-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 2.375rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font: 600 0.875rem var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.auth-mainline-button svg { width: 1.25rem; height: 1.25rem; flex: none; }

.auth-mainline-button--primary { background: var(--auth-primary); color: var(--auth-primary-ink); }
.auth-mainline-button--primary:hover { background: var(--auth-primary-hover); color: #ffffff; }

/*
 * Busy state for the sign-in buttons. The label swaps out for a small dots
 * spinner (see js/loader.js) so a slow send or verify reads as progress rather
 * than a dead click. The default accent is the site orange, which reads poorly
 * against a filled navy button, so filled buttons take white.
 */
.auth-mainline-button__art {
  flex: 0 0 auto;
  width: 1.375rem;
  height: 1.375rem;
  --loader-size: 1.375rem;
}

.auth-mainline-button[aria-busy='true'] { cursor: progress; }
.auth-mainline-button__label { display: inline-flex; align-items: center; }

.auth-mainline-button--primary .bl-art,
.auth-mainline-button--primary .loading-spinner {
  --loader-accent: #ffffff;
}

.auth-mainline-button--google {
  background: #fff;
  border-color: var(--auth-field-line);
  box-shadow: 0 1px 2px rgb(9 9 11 / 0.04);
  color: var(--auth-ink);
  font-weight: 500;
}
.auth-mainline-button--google:hover { background: #f4f4f5; border-color: #d8dde6; }

/* Set by js/google-redirect.js once the hand-off starts, so the button dims
   instead of sitting there looking clickable while Google loads. */
.auth-mainline-button--google.is-pending {
  opacity: 0.55;
  pointer-events: none;
}

.auth-mainline-trust {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  color: var(--auth-muted);
  font-size: 0.75rem;
}
.auth-mainline-trust b { color: var(--auth-primary-line); font-weight: 700; }

.auth-mainline-note { margin-top: 1.5rem; text-align: center; color: var(--auth-muted); font-size: 0.875rem; }
.auth-mainline-note a { font-weight: 600; color: var(--auth-ink); }
.auth-mainline-note a:hover { text-decoration: underline; }

.auth-error {
  padding: 0.7rem 0.85rem;
  margin: 0 0 0.25rem;
  border: 1px solid rgb(200 50 26 / 0.28);
  border-radius: 6px;
  background: #fdf1f0;
  color: #b22a1e;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.auth-info {
  padding: 0.7rem 0.85rem;
  margin: 0 0 0.25rem;
  border: 1px solid rgb(14 34 71 / 0.18);
  border-radius: 6px;
  background: #f1f5ff;
  color: #27457a;
  font-size: 0.8125rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .auth-mainline { margin: 10px 12px 0; }
  .auth-mainline__inner { padding: 4.5rem 0 3rem; }
}

/* One-time code (OTP) entry boxes */
.otp-boxes { display: flex; justify-content: center; gap: 0.5rem; }
.otp-box {
  width: 2.75rem;
  height: 3rem;
  border: 1px solid var(--auth-field-line);
  border-radius: 6px;
  background: #fff;
  color: var(--auth-ink);
  font: 700 1.25rem/1 var(--font-sans);
  text-align: center;
  caret-color: var(--auth-primary-line);
  box-shadow: inset 0 0 0 1px transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.otp-box::-webkit-outer-spin-button,
.otp-box::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.otp-box[data-filled] { border-color: var(--auth-primary-line); background: #f6f8fd; }
.otp-box:hover { border-color: #c6c8bf; }
.otp-box:focus { outline: none; border-color: var(--auth-primary-line); box-shadow: 0 0 0 3px rgb(14 34 71 / 0.18); }
.otp-box:disabled { background: #f4f4f5; color: #a1a1aa; border-color: #e4e4e7; cursor: not-allowed; }

.otp-timer { margin-top: 1rem; text-align: center; color: var(--auth-muted); font-size: 0.78rem; }
.otp-timer b { color: var(--auth-primary-line); font-weight: 700; font-variant-numeric: tabular-nums; }
.otp-expired { display: block; margin-top: 1rem; color: #dc2626; font-size: 0.8rem; font-weight: 600; }
.otp-expired[hidden] { display: none; }

@media (max-width: 640px) {
  .otp-boxes { gap: 0.4rem; }
}