.mortgage-page {
  --mortgage-navy: #082a4d;
  --mortgage-text: #24364b;
  --mortgage-muted: #64748b;
  --mortgage-green: #00a950;
  --mortgage-teal: #078b89;
  --mortgage-cyan: #0ea5c6;
  --mortgage-soft: #effaf7;
  --mortgage-line: #dceeea;
  --mortgage-shadow: 0 22px 54px rgba(8, 42, 77, .12);
  background: #ffffff;
  color: var(--mortgage-text);
}

body.mortgage-active .bank-sticky-cta {
  display: none;
}

.mortgage-page * {
  box-sizing: border-box;
}

.mortgage-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.mortgage-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 34px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .80) 52%, rgba(236, 250, 248, .72) 100%),
    radial-gradient(circle at 12% 22%, rgba(0, 169, 80, .16), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(14, 165, 198, .20), transparent 30%),
    #f4fbfa;
  border-bottom: 1px solid var(--mortgage-line);
}

.mortgage-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
  gap: 44px;
  align-items: center;
}

.mortgage-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #067047;
  background: #e6f8ef;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.mortgage-copy h1,
.mortgage-section h2,
.mortgage-final-cta h2 {
  margin: 14px 0;
  color: var(--mortgage-navy);
  font-weight: 900;
  letter-spacing: 0;
}

.mortgage-copy h1 {
  max-width: 720px;
  font-size: 52px;
  line-height: 1.08;
}

.mortgage-copy p {
  max-width: 650px;
  margin: 0 0 22px;
  color: #38506a;
  font-size: 18px;
  line-height: 1.7;
}

.mortgage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.mortgage-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.mortgage-btn:focus-visible,
.mortgage-product-card a:focus-visible,
.mortgage-faq summary:focus-visible {
  outline: 3px solid rgba(14, 165, 198, .35);
  outline-offset: 3px;
}

.mortgage-btn:hover {
  transform: translateY(-1px);
}

.mortgage-btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--mortgage-green), var(--mortgage-teal));
  box-shadow: 0 16px 34px rgba(0, 169, 80, .22);
}

.mortgage-btn-ghost {
  color: #067047;
  border-color: #a8dfc6;
  background: #ffffff;
}

.mortgage-btn-light {
  color: #067047;
  background: #ffffff;
}

.mortgage-btn-outline-light {
  color: #ffffff;
  border-color: rgba(255, 255, 255, .48);
  background: rgba(255, 255, 255, .10);
}

.mortgage-note,
.mortgage-disclosure {
  margin-top: 18px !important;
  padding: 12px 14px;
  border: 1px solid #cce9e3;
  border-radius: 8px;
  background: rgba(255, 255, 255, .70);
  color: #486174 !important;
  font-size: 13px !important;
}

.mortgage-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.mortgage-proof span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #cfebe4;
  border-radius: 999px;
  background: rgba(255, 255, 255, .80);
  color: #36536a;
  font-size: 13px;
  font-weight: 800;
}

.mortgage-visual {
  position: relative;
  min-height: 430px;
}

.mortgage-visual img {
  display: block;
  width: 100%;
  height: min(52vw, 500px);
  min-height: 380px;
  object-fit: cover;
  object-position: center;
  border-radius: 24px;
  box-shadow: var(--mortgage-shadow);
}

.mortgage-float {
  position: absolute;
  display: grid;
  gap: 4px;
  min-width: 172px;
  padding: 15px 16px;
  border: 1px solid rgba(216, 238, 234, .96);
  border-radius: 18px;
  background: rgba(255, 255, 255, .90);
  box-shadow: 0 16px 42px rgba(8, 42, 77, .14);
  backdrop-filter: blur(12px);
}

.mortgage-float span {
  color: var(--mortgage-muted);
  font-size: 13px;
  font-weight: 800;
}

.mortgage-float strong {
  color: #08724a;
  font-size: 18px;
  line-height: 1.2;
}

.mortgage-float-1 { top: 36px; right: 18px; }
.mortgage-float-2 { right: 44px; bottom: 112px; }
.mortgage-float-3 { left: 20px; bottom: 34px; }

.mortgage-benefits {
  position: relative;
  z-index: 2;
  margin-top: -26px;
}

.mortgage-benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--mortgage-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--mortgage-shadow);
}

.mortgage-benefit-grid article {
  min-height: 170px;
  padding: 24px;
  border-right: 1px solid var(--mortgage-line);
}

.mortgage-benefit-grid article:last-child {
  border-right: 0;
}

.mortgage-benefit-grid span,
.mortgage-step-grid span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--mortgage-green), var(--mortgage-cyan));
  font-weight: 900;
}

.mortgage-benefit-grid h2,
.mortgage-step-grid h3,
.mortgage-product-card h3 {
  margin: 0;
  color: var(--mortgage-navy);
  font-size: 20px;
  line-height: 1.25;
}

.mortgage-benefit-grid p,
.mortgage-product-card p,
.mortgage-step-grid p,
.mortgage-section-head p,
.mortgage-split p,
.mortgage-docs p {
  color: var(--mortgage-muted);
  line-height: 1.65;
}

.mortgage-section {
  padding: 58px 0;
}

.mortgage-soft {
  background: linear-gradient(180deg, #f3fcf9 0%, #ffffff 100%);
}

.mortgage-center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.mortgage-section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.mortgage-section h2,
.mortgage-final-cta h2 {
  font-size: 36px;
  line-height: 1.14;
}

.mortgage-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.mortgage-product-card,
.mortgage-filter-card,
.mortgage-form-panel,
.mortgage-calculator,
.mortgage-step-grid article,
.mortgage-doc-grid span,
.mortgage-faq details {
  border: 1px solid var(--mortgage-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(8, 42, 77, .07);
}

.mortgage-product-card {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  padding: 18px;
}

.mortgage-product-image {
  display: grid;
  min-height: 138px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 15px;
  background: linear-gradient(180deg, #effaf7, #ffffff);
}

.mortgage-product-image img {
  width: 100%;
  height: 150px;
  object-fit: contain;
}

.mortgage-product-card ul,
.mortgage-filter-card ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 16px 0;
  list-style: none;
}

.mortgage-product-card li,
.mortgage-filter-card li,
.mortgage-check-list span,
.mortgage-doc-grid span {
  position: relative;
  padding-left: 28px;
  color: #486174;
  font-weight: 700;
}

.mortgage-product-card li::before,
.mortgage-filter-card li::before,
.mortgage-check-list span::before,
.mortgage-doc-grid span::before {
  content: "";
  position: absolute;
  top: .42em;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e7f8ee;
  box-shadow: inset 0 0 0 5px var(--mortgage-green);
}

.mortgage-product-card a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: #07934f;
  font-weight: 900;
  text-decoration: none;
}

.mortgage-split,
.mortgage-form-shell,
.mortgage-calculator,
.mortgage-docs,
.mortgage-final-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr);
  gap: 28px;
  align-items: center;
}

.mortgage-check-list,
.mortgage-doc-grid,
.mortgage-form-points {
  display: grid;
  gap: 10px;
}

.mortgage-check-list span {
  min-height: 48px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2f1ed;
}

.mortgage-filter-card {
  padding: 24px;
}

.mortgage-filter-card strong,
.mortgage-form-title strong {
  display: block;
  color: var(--mortgage-navy);
  font-size: 24px;
  line-height: 1.2;
}

.mortgage-form-section {
  padding: 58px 0;
  background:
    linear-gradient(135deg, rgba(0, 169, 80, .94), rgba(14, 165, 198, .94)),
    #078b89;
}

.mortgage-form-intro h2,
.mortgage-form-intro p,
.mortgage-form-intro .mortgage-eyebrow {
  color: #ffffff;
}

.mortgage-form-intro h2 {
  margin: 14px 0;
  font-size: 34px;
  line-height: 1.16;
}

.mortgage-form-intro .mortgage-eyebrow {
  background: rgba(255, 255, 255, .16);
}

.mortgage-form-points span {
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, .12);
  font-weight: 800;
}

.mortgage-form-panel {
  padding: 24px;
  border-radius: 22px;
}

.mortgage-form-title {
  margin-bottom: 16px;
  text-align: center;
}

.mortgage-form-title span {
  display: block;
  margin-top: 6px;
  color: var(--mortgage-muted);
  font-size: 14px;
}

.mortgage-form-panel .bank-lead-form-wrap {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.mortgage-calculator {
  align-items: stretch;
  padding: 26px;
}

.mortgage-calculator label {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  color: var(--mortgage-navy);
  font-weight: 900;
}

.mortgage-calculator input[type="range"] {
  width: 100%;
  accent-color: var(--mortgage-green);
}

.mortgage-result {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, #effaf7, #ffffff);
}

.mortgage-result span,
.mortgage-result small {
  color: var(--mortgage-muted);
  font-weight: 800;
}

.mortgage-result strong {
  color: var(--mortgage-navy);
  font-size: 22px;
}

.mortgage-result div {
  margin-top: 10px;
  padding: 18px;
  border-radius: 14px;
  background: #ffffff;
}

.mortgage-result b {
  display: block;
  margin-top: 6px;
  color: #067047;
  font-size: 28px;
  line-height: 1.12;
}

.mortgage-step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mortgage-step-grid article {
  min-height: 188px;
  padding: 20px;
}

.mortgage-doc-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mortgage-doc-grid span {
  min-height: 58px;
  padding: 16px 16px 16px 46px;
}

.mortgage-doc-grid span::before {
  top: 21px;
  left: 18px;
}

.mortgage-faq {
  display: grid;
  gap: 10px;
}

.mortgage-faq details {
  padding: 17px 18px;
}

.mortgage-faq summary {
  color: var(--mortgage-navy);
  font-weight: 900;
  cursor: pointer;
}

.mortgage-faq p {
  margin: 12px 0 0;
  color: var(--mortgage-muted);
}

.mortgage-final-cta {
  padding: 40px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #056646, #087d88 48%, #0b63a3);
}

.mortgage-final-cta .mortgage-eyebrow {
  color: #ffffff;
  background: rgba(255, 255, 255, .16);
}

.mortgage-final-cta h2,
.mortgage-final-cta p {
  color: #ffffff;
}

.mortgage-mobile-cta {
  display: none;
}

@media (max-width: 1100px) {
  .mortgage-hero-grid,
  .mortgage-split,
  .mortgage-form-shell,
  .mortgage-calculator,
  .mortgage-docs,
  .mortgage-final-grid {
    grid-template-columns: 1fr;
  }

  .mortgage-product-grid,
  .mortgage-benefit-grid,
  .mortgage-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mortgage-benefit-grid article:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 680px) {
  body.mortgage-active {
    padding-bottom: 80px;
  }

  .mortgage-container {
    width: min(100% - 24px, 520px);
  }

  .mortgage-hero,
  .mortgage-section,
  .mortgage-form-section {
    padding: 34px 0;
  }

  .mortgage-copy h1 {
    font-size: 34px;
  }

  .mortgage-section h2,
  .mortgage-final-cta h2,
  .mortgage-form-intro h2 {
    font-size: 28px;
  }

  .mortgage-copy p {
    font-size: 16px;
  }

  .mortgage-actions,
  .mortgage-actions .mortgage-btn {
    width: 100%;
  }

  .mortgage-visual {
    min-height: auto;
  }

  .mortgage-visual img {
    height: 310px;
    min-height: 310px;
  }

  .mortgage-float {
    position: static;
    min-width: 0;
    margin-top: 10px;
  }

  .mortgage-benefits {
    margin-top: 0;
    padding-top: 14px;
  }

  .mortgage-product-grid,
  .mortgage-benefit-grid,
  .mortgage-step-grid,
  .mortgage-doc-grid {
    grid-template-columns: 1fr;
  }

  .mortgage-benefit-grid {
    border-radius: 18px;
  }

  .mortgage-benefit-grid article,
  .mortgage-benefit-grid article:nth-child(2) {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--mortgage-line);
  }

  .mortgage-benefit-grid article:last-child {
    border-bottom: 0;
  }

  .mortgage-product-card {
    min-height: auto;
  }

  .mortgage-product-image img {
    height: 170px;
  }

  .mortgage-form-panel,
  .mortgage-filter-card,
  .mortgage-calculator {
    padding: 16px;
  }

  .mortgage-result b {
    font-size: 23px;
  }

  .mortgage-mobile-cta {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 16px 44px rgba(8, 42, 77, .18);
    backdrop-filter: blur(12px);
  }

  .mortgage-mobile-cta a {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--mortgage-green), var(--mortgage-teal));
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mortgage-btn {
    transition: none;
  }

  .mortgage-btn:hover {
    transform: none;
  }
}
