@import url("https://fonts.googleapis.com/css2?family=Covered+By+Your+Grace&display=swap");

/* ============================================================
   The sign-in pages' split layout (body.ax_page).

   Left: the animated lights, a handwritten line, the headline and — on
   log in and sign up — what Fiatmo is. Right: the form. On a phone the
   form sits between the headline and the tiles.

   Everything is scoped under .ax_page / .ax_form on purpose. The form
   classes these rules restyle (.form_clm, .btn_main, .social_btn …) are
   also used by the sign-in popup and by auth pages that have not moved
   to this layout; an unscoped rule here would restyle those too.

   Colours are base.css tokens only, so light and dark follow the theme.
   ============================================================ */

/* The label beside a sign-in icon. Hidden wherever the old round icon
   buttons are still drawn. */
.social_lbl {
  display: none;
}

body.ax_page {
  background: var(--bg-color);
  /* base.css centres a short page in a tall window; on a phone-width page
     shorter than the screen that left a band of nothing above the logo. */
  align-content: start;
}

/* ---------- top bar: logo over the left pane, sign-up over the right ---------- */
.ax_page .header_min {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 100%;
  padding: 28px clamp(24px, 5vw, 72px) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}
.ax_page .header_min .h_lnk_box {
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.2;
}
.ax_page .header_min .h_hint {
  font-size: 14px;
  color: var(--text-secondary);
}
.ax_page .header_min .h_lnk {
  height: 44px;
  padding: 0 22px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1.5px solid var(--blue);
  font-size: 15px;
  font-weight: 600;
}
/* .text_primary on the link (shared header markup) would otherwise win. */
.ax_page .header_min .h_lnk,
.ax_page .header_min .h_lnk.text_primary {
  color: var(--blue) !important;
}
/* A page that names no link (reset password, the profile step) draws no
   empty pill. */
.ax_page .header_min .h_lnk:empty {
  display: none;
}
.ax_page .header_min .h_lnk:hover {
  background: color-mix(in srgb, var(--blue) 12%, transparent);
}

/* ---------- the grid ---------- */
.ax_grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
  /* The outer rows centre the stack; the first never shrinks under the
     top bar, which is laid over it. */
  grid-template-rows: minmax(110px, 1fr) auto auto minmax(48px, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.ax_lights {
  grid-column: 1;
  grid-row: 1 / -1;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
/* animated_lights.css centres the blobs on their box; a zero-size box
   parked low and right keeps the glow behind the tiles, off the headline. */
.ax_lights .blobs {
  position: absolute;
  left: 68%;
  top: 56%;
  width: 0;
  height: 0;
}

.ax_pitch,
.ax_more {
  grid-column: 1;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  max-width: calc(640px + 2 * clamp(24px, 5vw, 72px));
  padding: 0 clamp(24px, 5vw, 72px);
}
.ax_pitch {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.ax_more {
  grid-row: 3;
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ax_kicker {
  font-family: "Covered By Your Grace", cursive;
  font-size: 26px;
  line-height: 1.1;
  color: var(--blue);
  transform: rotate(-2deg);
  transform-origin: left center;
}
.ax_head {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.ax_mark {
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 6px;
  text-underline-offset: 8px;
  /* The underlined words stay on one line, so the rule is never cut in two. */
  white-space: nowrap;
}
.ax_body {
  margin: 0;
  max-width: 520px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.ax_tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.ax_tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border-highlight);
  /* See-through, so the lights show behind it. */
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-primary);
}
.ax_tile svg {
  flex: none;
}
.ax_tile_t {
  font-size: 15px;
  font-weight: 600;
}
.ax_tile_s {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.ax_more .auth_learn_more {
  display: block;
  margin: 0;
}
.ax_learn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1.5px solid color-mix(in srgb, var(--blue) 55%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-primary);
  text-decoration: none;
}
.ax_learn:hover {
  border-color: var(--blue);
}
.ax_learn_txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ax_learn_q {
  font-size: 13px;
  color: var(--text-secondary);
}
.ax_learn_t {
  font-size: 16px;
  font-weight: 600;
}

/* ---------- the form pane ---------- */
.ax_form {
  grid-column: 2;
  grid-row: 1 / -1;
  z-index: 1;
  box-sizing: border-box;
  padding: 112px clamp(24px, 5vw, 72px) 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--container);
  border-left: 1px solid var(--border-color);
}
/* The line of help under a page title sits close to it. */
.ax_form h1 + .profile_note,
.ax_form h1 + .verify_subtitle {
  margin: -14px 0 24px;
}
.ax_form .profile_note,
.ax_form .verify_subtitle {
  text-align: left;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.ax_form h1 {
  margin: 0 0 26px;
  padding: 0;
  font-size: 38px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ax_form .form_rw {
  margin-bottom: 18px;
}
.ax_form .form_tit {
  margin: 0;
  padding-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-intermediate);
}
.ax_form .form_clm input {
  height: 58px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border-highlight);
  background-color: var(--surface);
  color: var(--text-primary);
  font-size: 15px;
}
.ax_form .form_clm input:focus {
  border-color: var(--blue);
}
/* A label with a link at the far end of its line (Password · Forgot password?). */
.ax_lbl_row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.ax_lbl_row .auth_action_link {
  font-size: 13px;
  padding-bottom: 8px;
}
.ax_form .pw_toggle {
  right: 8px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.ax_form .pw_field input {
  padding-right: 56px !important;
}
.ax_form .btn_main {
  height: 58px;
  padding: 0 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.ax_form .ax_submit,
.ax_form form .cntnr {
  margin-top: 6px;
}

/* The older forms space themselves with empty .v_spcr blocks; here the
   rules below do it. */
.ax_form .v_spcr {
  display: none;
}
/* What follows a form's button: the way back, then the consent line. */
.ax_form .auth_actions {
  margin-top: 18px;
  justify-content: flex-start;
}
.ax_form form .lnk_spn {
  margin-top: 14px;
}
.ax_form .resend_wrap {
  text-align: left;
}
.ax_or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 18px;
  font-size: 13px;
  color: var(--text-secondary);
}
.ax_or::before,
.ax_or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.ax_social {
  display: flex;
  gap: 10px;
}
.ax_social .social_btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 50px;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}
.ax_social .social_btn svg {
  flex: none;
  width: 18px;
  height: 18px;
}
.ax_social .social_lbl {
  display: inline;
}

.ax_alt {
  margin: 22px 0 0;
  font-size: 15px;
  color: var(--text-secondary);
}
.ax_alt a {
  font-size: 15px;
  font-weight: 600;
}
/* The consent line on pages whose form still carries it inside. */
.ax_form .lnk_spn {
  text-align: left;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.ax_form .ax_consent {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ---------- the verify-email code page (verify_email_code.html) ---------- */
/* Its states swap with the hidden attribute, which a display rule beats. */
.vec [hidden] {
  display: none !important;
}
.vec_boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.vec_boxes input {
  width: 100%;
  height: 64px;
  box-sizing: border-box;
  padding: 0;
  text-align: center;
  font: inherit;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border-highlight);
  border-radius: 12px;
  outline: none;
}
.vec_boxes input:focus {
  border: 1.5px solid var(--blue);
}
.vec_boxes input.err_code {
  border-color: var(--red);
}
.vec_err {
  margin: -6px 0 14px;
  font-size: 14px;
  line-height: 1.5;
}
.vec_resend {
  margin-top: 28px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.vec_resend strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.vec_resend_row {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.vec_resend_btn {
  height: 46px;
  padding: 0 20px;
  box-sizing: border-box;
  border: 1px solid var(--border-highlight);
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.vec_resend_btn:disabled {
  color: var(--text-secondary);
  cursor: default;
}
.vec_resend_note {
  color: var(--text-intermediate);
}
.vec_done_lnk {
  align-self: flex-start;
  color: var(--blue);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

/* ---------- phone ---------- */
@media only screen and (max-width: 800px) {
  .ax_page .header_min {
    position: relative;
    padding: 16px 20px 0;
  }
  .ax_page .header_min .h_hint {
    display: none;
  }
  .ax_page .header_min .h_lnk {
    padding: 0 18px;
  }
  .ax_grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: 0;
  }
  .ax_lights {
    grid-row: 1;
  }
  .ax_lights .blobs {
    left: 62%;
    top: 58%;
  }
  .ax_pitch {
    grid-row: 1;
    gap: 12px;
    padding: 28px 20px 32px;
  }
  .ax_kicker {
    font-size: 24px;
  }
  .ax_head {
    font-size: 34px;
    line-height: 1.1;
  }
  .ax_mark {
    text-decoration-thickness: 5px;
    text-underline-offset: 6px;
  }
  /* The sentence is dropped so the form starts higher on the screen. */
  .ax_body {
    display: none;
  }
  .ax_form {
    grid-column: 1;
    grid-row: 2;
    padding: 28px 20px;
    border-left: 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
  }
  .ax_form h1 {
    font-size: 28px;
    margin-bottom: 20px;
  }
  .ax_form .form_clm input {
    height: 54px;
    font-size: 16px;
  }
  .ax_form .btn_main {
    height: 56px;
  }
  .ax_more {
    grid-row: 3;
    padding: 28px 20px 36px;
    gap: 12px;
  }
  /* Nothing in it on a bare page: no band of padding under the form. */
  .ax_more.ax_bare {
    padding: 0;
  }
  .ax_tiles {
    grid-template-columns: minmax(0, 1fr);
  }
  .ax_tile {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
  }
  .ax_tile_s {
    margin-top: 0;
  }
  .ax_learn {
    padding: 16px 18px;
  }
}
