/* Native form and small compatibility refinements for the static build. */
html { scroll-behavior: smooth; }
body.form-open { overflow: hidden; }
button, input, select { font: inherit; }

/* Keep the form card and its raised progress badge clear of the fixed header. */
.ifp-center { padding-top: 54px; }

.native-app-shell {
  width: 100%;
  min-height: 650px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10px 0 28px;
  font-family: Inter, Arial, sans-serif;
}

.native-app-shell *,
.form-close-button { font-family: Inter, Arial, sans-serif; }

.native-form-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 600px;
  padding: 72px 26px 28px;
  background: #fff;
  border: 1px solid #e3e7e9;
  border-radius: 36px;
  box-shadow: 0 18px 50px rgba(26, 68, 82, .09);
  color: #27323a;
  font-family: Inter, Arial, sans-serif;
}

.native-progress-ring {
  position: absolute;
  top: -38px;
  left: 50%;
  width: 82px;
  height: 82px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#0088a3 var(--progress), #e7ecef 0);
  box-shadow: 0 3px 0 #fff, 0 0 0 1px #dce2e5, 0 10px 26px rgba(0, 98, 120, .12);
}

.native-progress-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e4e8eb;
}

.native-progress-content {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 1px;
  color: #66717a;
  font-size: .72rem;
  font-weight: 800;
}

.native-progress-icon { font-size: 1.25rem; line-height: 1; color: #0088a3; }
.native-form-card h2 {
  margin: 0;
  color: #0088a3;
  font-size: 24px;
  line-height: 1.2;
  text-align: center;
  font-weight: 800;
}
.native-form-sub {
  margin: 12px auto 28px;
  max-width: 420px;
  color: #92989d;
  font-size: .84rem;
  line-height: 1.55;
  text-align: center;
  white-space: pre-line;
}

.native-fields { display: grid; gap: 14px; }
.native-field { display: grid; gap: 7px; }
.native-label {
  color: #4e5d64;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.native-input, .native-select {
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border: 2px solid #e2e5e7;
  border-radius: 999px;
  outline: none;
  background: #fff;
  color: #26343b;
  font-size: .96rem;
  font-weight: 600;
  transition: border-color .18s, box-shadow .18s;
}
.native-input:focus, .native-select:focus {
  border-color: #126694;
  box-shadow: 0 0 0 4px rgba(18, 102, 148, .10);
}
.native-input::placeholder { color: #adb3b7; font-weight: 500; }
.native-field-hint { color: #9aa0a4; font-size: .72rem; padding-left: 18px; }

.native-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.native-choice-grid.cols-1 { grid-template-columns: 1fr; }
.native-choice-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.native-choice {
  min-height: 58px;
  padding: 12px 16px;
  border: 2px solid #e2e5e7;
  border-radius: 18px;
  background: #fff;
  color: #35434b;
  cursor: pointer;
  font-weight: 700;
  transition: border-color .18s, color .18s, background .18s, transform .18s;
}
.native-choice:hover, .native-choice:focus-visible {
  border-color: #126694;
  color: #126694;
  background: #f4fbfd;
  transform: translateY(-1px);
}
.native-choice.selected { border-color: #126694; background: #126694; color: #fff; }

.native-primary {
  width: 100%;
  min-height: 58px;
  margin-top: 22px;
  border: 0;
  border-radius: 999px;
  background: #0088a3;
  color: #fff;
  cursor: pointer;
  font-size: .92rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0, 136, 163, .22);
  transition: opacity .18s, transform .18s, box-shadow .18s;
}
.native-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(0, 136, 163, .28); }
.native-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.native-offer-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.native-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 18px auto 0;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: #6b747a;
  cursor: pointer;
  font-weight: 700;
}
.native-back:hover { color: #0088a3; }
.native-actions { display: grid; justify-items: center; }
.native-error { min-height: 19px; margin: 10px 0 -4px; color: #c24135; font-size: .76rem; text-align: center; font-weight: 700; }

.native-centered-hint { margin-top: 12px; padding: 0; text-align: center; }
.native-date-fallback {
  margin: 12px auto 0;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #087f9a;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.native-lookup-status { min-height: 18px; margin: 14px 0 0; color: #b45345; font-size: .76rem; font-weight: 700; text-align: center; }
.native-routing-guides {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}
.native-routing-guide {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
}
.native-routing-guide img {
  display: block;
  width: min(100%, 420px);
  max-height: 320px;
  object-fit: contain;
  border: 1px solid #e0e7ea;
  border-radius: 14px;
  background: #f8fbfc;
}
.native-routing-guide--check img { max-height: 180px; }
.native-routing-guide figcaption {
  max-width: 420px;
  color: #69757b;
  font-size: .72rem;
  line-height: 1.45;
  text-align: center;
}
.native-consent-card {
  padding: 18px 18px 14px;
  border: 2px solid #b9d9e2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 82, 105, .06);
}
.native-consent-card.expanded { border-color: #70bfd1; }
.native-consent-master {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: start;
  color: #4d5d66;
  font-size: .78rem;
  line-height: 1.55;
  cursor: pointer;
}
.native-consent-master input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: #0093af;
}
.native-consent-master strong { color: #263b45; }
.native-consent-card a { color: #0088a3; font-weight: 700; text-decoration: none; }
.native-consent-card a:hover { text-decoration: underline; }
.native-consent-details {
  margin: 14px 0 0 33px;
  color: #52616a;
  font-size: .75rem;
  line-height: 1.55;
}
.native-consent-details[hidden] { display: none; }
.native-consent-details ul { display: grid; gap: 10px; margin: 0; padding-left: 18px; }
.native-consent-toggle {
  display: block;
  margin: 14px auto 0;
  padding: 5px 10px;
  border: 0;
  background: transparent;
  color: #0088a3;
  cursor: pointer;
  font-size: .74rem;
  font-weight: 800;
}

.native-trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid #e6e9eb;
  color: #69757b;
  font-size: .72rem;
  line-height: 1.35;
}
.native-stars { color: #e7a90d; letter-spacing: 1px; }
.native-ssl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eaf8ef;
  color: #287a4b;
  font-weight: 700;
  white-space: nowrap;
}

.native-review { display: grid; gap: 10px; }
.native-review-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 15px;
  border-radius: 14px;
  background: #f6f8f9;
  color: #667178;
  font-size: .82rem;
}
.native-review-row strong { color: #24414d; text-align: right; }
.native-consent { margin-top: 18px; color: #737d82; font-size: .72rem; line-height: 1.55; text-align: center; }
.native-success { display: grid; place-items: center; min-height: 430px; text-align: center; }
.native-success-icon { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: #e8f8ef; color: #288653; font-size: 2.2rem; margin: 0 auto;}
.native-success h2 { margin-top: 20px; }
.native-success p { max-width: 380px; color: #7a858b; line-height: 1.6; }

.native-confirm {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: inherit;
  background: rgba(247, 250, 251, .94);
  backdrop-filter: blur(8px);
}
.native-confirm-box {
  width: 100%;
  max-width: 390px;
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #e0e5e7;
  box-shadow: 0 18px 55px rgba(30, 60, 73, .15);
  text-align: center;
}
.native-confirm-box h3 { margin: 0 0 10px; color: #153d4d; }
.native-confirm-box p { margin: 0 0 18px; color: #7a8388; font-size: .82rem; line-height: 1.55; }
.native-confirm-alt { width: 100%; margin-top: 10px; padding: 13px; border: 1px solid #dce2e4; border-radius: 999px; background: #fff; cursor: pointer; color: #536169; font-weight: 700; }

.form-close-button {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 950;
  width: 40px;
  height: 40px;
  border: 1px solid #dfe5e7;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #536169;
  cursor: pointer;
  font-size: 1.25rem;
  box-shadow: 0 8px 24px rgba(33, 67, 79, .10);
  display: none;
}
body.form-open .form-close-button { display: grid; place-items: center; }

body.page-light header .logo-img,
body:has(.hero.hero--light) header .logo-img {
  width: auto;
  height: 40px;
  max-width: min(64vw, 215px);
}
.nav-drawer-logo { width: min(190px, 72%); height: auto; max-height: 42px; object-fit: contain; }
.pb-logo { width: min(170px, 78%); height: auto; max-height: 34px; object-fit: contain; }
.cta-mini-logo { width: min(205px, 82%); height: auto; max-height: 40px; object-fit: contain; }
.footer-logo-img {
  width: min(240px, 78vw);
  height: auto;
  max-height: 52px;
  object-fit: contain;
  filter: none;
}

@media (max-width: 768px) {
  .ifp-ambient, .ifp-vdivider { display: none !important; }
  .ifp-center { width: 100%; padding: 54px 12px 24px; }
  .native-app-shell { min-height: 620px; padding-top: 0; }
  .native-form-card { min-height: 570px; padding: 66px 18px 24px; border-radius: 26px; }
  .native-choice-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .native-trust { flex-direction: column; text-align: center; }
  .native-consent-card { padding: 16px 14px 12px; }
  .native-consent-details { margin-left: 30px; }
  .form-close-button { top: 66px; right: 12px; }
}

@media (max-width: 480px) {
  .native-choice-grid { grid-template-columns: 1fr; }
  .native-choice-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .native-form-card h2 { padding-inline: 10px; }
  body.page-light header .logo-img,
  body:has(.hero.hero--light) header .logo-img { height: 34px; max-width: 58vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Mobile performance: retain one-time section reveals, but remove costly
   continuously repainted hero effects and backdrop filters. */
@media (max-width: 768px) {
  .hero.hero--aurora.hero--light {
    background:
      radial-gradient(circle at 100% 8%, rgba(0, 204, 243, .12), transparent 42%),
      radial-gradient(circle at 0 88%, rgba(255, 193, 7, .08), transparent 40%),
      linear-gradient(180deg, #fafbfc 0%, #eef6f8 100%);
  }

  .hero-light-blob,
  .hero-light-shimmer {
    display: none !important;
  }

  .hero-light-ring,
  .hero-fin,
  .hero-msg-thread,
  .hero-msg-bubble,
  .hero.hero--aurora.hero--light .fc-slider-hint svg,
  .ifp-live-dot,
  .secure-badge,
  .float-cta__pulse {
    animation: none !important;
  }

  .hero-msg-thread--left {
    transform: translateY(-50%) !important;
  }

  .hero-msg-bubble,
  .float-cta,
  .native-confirm {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .how-section,
  .loan-types-section,
  .trust-section,
  .table-section,
  footer {
    content-visibility: auto;
    contain-intrinsic-size: 800px;
  }

  .hero.hero--aurora.hero--light .fc-slider-wrap:not(.fc-slider-wrap--used) .fc-slider::-webkit-slider-thumb {
    animation: none !important;
  }

  .hero.hero--aurora.hero--light .fc-slider-wrap:not(.fc-slider-wrap--used) .fc-slider::-moz-range-thumb {
    animation: none !important;
  }
}
