/* ==============================================================
   AUREX — register/auth-final.css
   FINAL AUTHORITATIVE MOBILE PRESENTATION LAYER FOR REGISTRATION.

   Loaded AFTER styles.css, so it wins on source order at equal
   specificity. Clean specificity, no !important arms race.

   Scope: <= 560px only. Desktop stays owned by styles.css, which
   keeps its brand-left / form-right composition.
   Field names, handlers and validation hooks are untouched.
   ============================================================== */

@media (max-width: 560px) {

  /* ==========================================================
     0. PAGE
     ========================================================== */
  body.aurex-registration-page {
    --ax-pad: 20px;
    --ax-radius: 14px;
    --ax-field-h: 52px;
    --ax-ink: #f3f7fb;
    --ax-ink-2: rgba(196, 214, 234, 0.92);
    --ax-ink-3: rgba(150, 176, 208, 0.78);
    --ax-line: rgba(150, 184, 218, 0.16);
    --ax-surface: rgba(255, 255, 255, 0.035);
    --ax-accent: #4aa8d8;
    background: #050b14;
  }

  .aurex-registration-page .registration-shell {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: calc(26px + env(safe-area-inset-top, 0px)) var(--ax-pad)
             calc(32px + env(safe-area-inset-bottom, 0px));
  }

  /* ==========================================================
     1. BRAND — wordmark carries the identity
     ========================================================== */
  .aurex-registration-page .registration-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 26px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--ax-ink);
  }
  .aurex-registration-page .registration-brand .aurex-mark-svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
    stroke: none;
  }

  /* ==========================================================
     2. HEADLINE
     ========================================================== */
  .aurex-registration-page .registration-intro { margin: 0 0 26px; }
  .aurex-registration-page .registration-intro .eyebrow { display: none; }
  .aurex-registration-page #registrationTitle {
    margin: 0 0 10px;
    font-size: 1.95rem;
    line-height: 1.22;
    letter-spacing: -0.022em;
    font-weight: 660;
    color: #ffffff;
    text-wrap: balance;
  }
  .aurex-registration-page .registration-lede {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--ax-ink-2);
  }

  /* ==========================================================
     3. DESKTOP ONBOARDING SEQUENCE — off on phones.
     The 01/02/03 explainer pushed the form far below the fold.
     It remains in the DOM and on desktop.
     ========================================================== */
  .aurex-registration-page .aurex-registration-page .registration-steps,
.registration-shell .registration-steps { display: none; }

  /* ==========================================================
     4. THE FORM IS THE PAGE — no card inside a card
     ========================================================== */
  .aurex-registration-page .registration-card {
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    overflow: visible;
  }
  .aurex-registration-page .registration-card::before { content: none; }

  .aurex-registration-page .registration-card-head {
    padding: 0;
    margin: 0 0 18px;
  }
  .aurex-registration-page .registration-card-head .eyebrow,
  .aurex-registration-page .registration-badge { display: none; }
  .aurex-registration-page #registrationFormTitle {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 660;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ax-ink-3);
  }

  /* ---- Fields: one column, full width ---- */
  .aurex-registration-page .registration-field-grid {
    display: block;
    padding: 0;
    margin: 0;
  }
  .aurex-registration-page .registration-field-grid label,
  .aurex-registration-page .registration-card form > label {
    display: block;
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
    font-size: 0.86rem;
    font-weight: 560;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ax-ink-2);
  }
  .aurex-registration-page .registration-field-grid input,
  .aurex-registration-page .registration-field-grid select,
  .aurex-registration-page .registration-card form > label input {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    margin-top: 8px;
    min-height: var(--ax-field-h);
    padding: 0 15px;
    border-radius: var(--ax-radius);
    border: 1px solid var(--ax-line);
    background: var(--ax-surface);
    color: var(--ax-ink);
    font-size: 16px; /* iOS: prevents focus zoom */
    line-height: 1.2;
  }
  .aurex-registration-page .registration-field-grid input::placeholder {
    color: rgba(148, 174, 202, 0.5);
  }
  .aurex-registration-page .registration-field-grid input:focus,
  .aurex-registration-page .registration-field-grid select:focus {
    outline: none;
    border-color: rgba(74, 168, 216, 0.7);
    box-shadow: 0 0 0 3px rgba(74, 168, 216, 0.16);
  }
  .aurex-registration-page .registration-field-grid input:-webkit-autofill {
    -webkit-text-fill-color: var(--ax-ink);
    -webkit-box-shadow: 0 0 0 1000px #0d1724 inset;
  }

  .aurex-registration-page .registration-password-field {
    position: relative;
    display: block;
    width: 100%;
  }
  .aurex-registration-page .registration-password-field input { padding-right: 78px; }
  .aurex-registration-page .registration-password-toggle {
    position: absolute;
    right: 6px;
    bottom: 6px;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--ax-accent);
    font-size: 0.85rem;
    font-weight: 600;
  }

  /* ---- Terms ---- */
  .aurex-registration-page .registration-check {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    margin: 6px 0 0;
    padding: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--ax-ink-2);
  }
  .aurex-registration-page .registration-check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--ax-accent);
  }

  /* ---- Primary action ---- */
  .aurex-registration-page .registration-submit {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 22px 0 0;
    min-height: 52px;
    border-radius: var(--ax-radius);
    border: 1px solid rgba(94, 182, 226, 0.5);
    background: #2f8fc4;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 650;
    transition: background-color 140ms ease, transform 120ms ease;
  }
  .aurex-registration-page .registration-submit:active {
    background: #2a80b1;
    transform: scale(0.99);
  }
  .aurex-registration-page .registration-submit:focus-visible {
    outline: 2px solid rgba(103, 232, 249, 0.75);
    outline-offset: 3px;
  }
  .aurex-registration-page .registration-submit[disabled] { opacity: 0.45; }

  /* ---- Supporting ---- */
  .aurex-registration-page .registration-alert {
    margin: 16px 0 0;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid var(--ax-line);
    background: var(--ax-surface);
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--ax-ink-2);
  }
  .aurex-registration-page .registration-footer {
    margin: 18px 0 0;
    padding: 0;
    font-size: 0.9rem;
    text-align: center;
    color: var(--ax-ink-2);
  }
  .aurex-registration-page .registration-footer a {
    color: var(--ax-accent);
    font-weight: 600;
    text-decoration: none;
  }
  .aurex-registration-page .registration-safe-note {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--ax-line);
    font-size: 0.79rem;
    line-height: 1.45;
    color: var(--ax-ink-3);
  }

  /* ---- Motion ---- */
  .aurex-registration-page .registration-brand,
  .aurex-registration-page .registration-intro,
  .aurex-registration-page .registration-card {
    animation: axaEnter 220ms ease-out both;
  }
  .aurex-registration-page .registration-intro { animation-delay: 40ms; }
  .aurex-registration-page .registration-card { animation-delay: 80ms; }
}

@keyframes axaEnter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 560px) and (prefers-reduced-motion: reduce) {
  .aurex-registration-page .registration-brand,
  .aurex-registration-page .registration-intro,
  .aurex-registration-page .registration-card { animation: none; }
}

@media (max-width: 560px) {
  .aurex-registration-page .registration-brand {
    gap: 0;
    font-size: 1.16rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-indent: 0.25em;
    color: #f6f9fc;
  }
}

/* ==============================================================
   OPEN ACCOUNT — PHONE PARITY ON DESKTOP
   The phone experience is a single centered column with the
   01/02/03 onboarding rail hidden. Two rules diverged above 560px:
     styles.css  .registration-steps                       (visible)
     styles.css  @media (min-width:901px)
                 .aurex-registration-page .registration-field-grid
                   -> repeat(2, minmax(0,1fr))             (paired fields)
   Same selector + later source order wins; no !important.
   .registration-shell is already max-width 560px and centered,
   so the column itself needs no change.
   ============================================================== */
.aurex-registration-page .registration-steps,
.registration-shell .registration-steps { display: none; }

@media (min-width: 901px) {
  .aurex-registration-page .registration-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}