.payment-page {
  background: #f5f8f8;
}

.payment-intro {
  padding: 42px 0 30px;
  border-bottom: 1px solid #d8e2e2;
}

.payment-intro .breadcrumbs {
  margin: 0 0 18px;
}

.payment-intro h1 {
  max-width: 840px;
  font-size: 2.9rem;
  line-height: 1.12;
}

.payment-intro .hero-lede {
  max-width: 730px;
  margin-bottom: 0;
}

.payment-workspace {
  padding: 28px 0 64px;
}

.payment-estimator {
  background: #fff;
  border: 1px solid #d8e2e2;
  border-top: 5px solid #b24f39;
}

.payment-estimator [hidden] {
  display: none !important;
}

.payment-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.8fr);
  gap: 30px;
  padding: 28px 32px;
  border-bottom: 1px solid #d8e2e2;
  align-items: center;
}

.payment-summary-label {
  display: block;
  color: #4b615e;
  font-size: 0.89rem;
  font-weight: 760;
}

.payment-total {
  display: block;
  margin: 4px 0;
  color: #183b38;
  font-size: 3rem;
  line-height: 1.08;
  font-weight: 800;
}

.payment-summary small,
.payment-summary-note,
.payment-field small,
.payment-breakdown-note,
.payment-source-note {
  color: #566d68;
}

.payment-summary-note {
  margin: 0;
  font-size: 0.94rem;
}

.payment-breakdown {
  padding: 24px 32px;
  border-bottom: 1px solid #d8e2e2;
}

.payment-breakdown h2,
.payment-inputs h2 {
  margin: 0 0 16px;
  font-size: 1.26rem;
  line-height: 1.25;
}

.payment-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 26px;
  margin: 0;
}

.payment-lines div {
  padding: 0 0 11px;
  border-bottom: 1px solid #e3eae8;
}

.payment-lines dt {
  color: #526661;
  font-size: 0.86rem;
}

.payment-lines dd {
  margin: 3px 0 0;
  font-size: 1.2rem;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.payment-breakdown-note {
  margin: 17px 0 0;
  font-size: 0.89rem;
}

.payment-mobile-total {
  display: none;
}

.payment-inputs {
  padding: 28px 32px 32px;
}

.payment-inputs h2:not(:first-child) {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #e3eae8;
}

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

.payment-home-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.payment-loan-line {
  margin: 14px 0 0;
  color: #526661;
  font-size: 0.88rem;
}

.payment-loan-line strong {
  color: #183b38;
  font-variant-numeric: tabular-nums;
}

.payment-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.payment-field label {
  font-size: 0.88rem;
  font-weight: 750;
  color: #1d3532;
}

.payment-field input,
.payment-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #aebfbb;
  border-radius: 6px;
  background: #fff;
  color: #142925;
  padding: 0 12px;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.payment-field input:focus-visible,
.payment-field select:focus-visible {
  outline: 3px solid rgba(25, 108, 104, 0.22);
  outline-offset: 1px;
  border-color: #196c68;
}

.payment-field small {
  font-size: 0.78rem;
  line-height: 1.35;
}

.payment-alert {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #b24f39;
  background: #fdf5f2;
  color: #633625;
  font-size: 0.91rem;
}

.payment-alert:empty {
  display: none;
}

.payment-method {
  padding: 56px 0 72px;
  background: #fff;
  border-top: 1px solid #d8e2e2;
}

.payment-method .prose {
  max-width: 810px;
}

.payment-method .prose h2 {
  margin: 38px 0 12px;
  font-size: 1.62rem;
}

.payment-method .prose h2:first-of-type {
  margin-top: 0;
}

.payment-method .prose h3 {
  margin-top: 23px;
}

.payment-method .prose p,
.payment-method .prose li {
  line-height: 1.68;
}

@media (max-width: 800px) {
  .payment-summary {
    grid-template-columns: 1fr;
    gap: 9px;
  }

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

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

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

@media (max-width: 520px) {
  .payment-mobile-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-top: 1px solid #d8e2e2;
    background: #edf4f2;
    color: #183b38;
  }

  .payment-mobile-total span {
    font-size: 0.84rem;
    font-weight: 700;
  }

  .payment-mobile-total strong {
    font-size: 1.18rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .payment-intro {
    padding: 30px 0 25px;
  }

  .payment-intro h1 {
    max-width: none;
    font-size: 2.05rem;
  }

  .payment-workspace {
    padding-top: 16px;
  }

  .payment-summary,
  .payment-breakdown,
  .payment-inputs {
    padding-inline: 18px;
  }

  .payment-total {
    font-size: 2.35rem;
  }

  .payment-input-grid {
    grid-template-columns: 1fr;
  }
}
