.calc-intro,
.calculator-area,
.calc-bottom {
  max-width: 1232px;
  margin: auto;
  padding: 65px 30px;
}
.calc-intro {
  padding-bottom: 30px;
}
.calc-intro h1 {
  font-size: clamp(40px, 5vw, 64px);
}
.calc-intro > p:last-child {
  max-width: 680px;
  color: #555;
  font-size: 19px;
}
.calculator-area {
  padding-top: 10px;
}
.calc-tabs {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.calc-tab-group {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 9px;
  border: 1px solid #e3e3df;
  border-radius: 14px;
  position: relative;
  padding-top: 25px;
}
.calc-tab-group > span {
  position: absolute;
  top: 6px;
  left: 14px;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #777;
}
.calc-tabs button {
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #ddd;
  background: #fff;
  padding: 12px 18px;
  border-radius: 30px;
  color: #1c1c1c;
}
.calc-tabs button[aria-selected="true"] {
  background: #1c1c1c;
  color: #fff;
  border-color: #1c1c1c;
}
.calc-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border: 1px solid #e2e2e2;
}
.calc-form {
  padding: 36px;
}
.calc-form h2 {
  font-size: 30px;
  margin-bottom: 12px;
}
.calc-description {
  font-size: 15px;
  color: #555;
  margin: 0 0 30px;
}
.field {
  margin: 24px 0;
}
.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.field label {
  font-size: 14px;
  font-weight: 700;
}
.number-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.number-wrap input {
  width: 125px;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #aaa;
  background: white;
  color: #1c1c1c;
  font:
    700 17px Quicksand,
    Arial,
    sans-serif;
  border-radius: 3px;
}
.number-wrap span {
  font-size: 12px;
  min-width: 24px;
}
input[type="range"] {
  width: 100%;
  accent-color: #1c1c1c;
  min-height: 30px;
  margin-top: 9px;
  cursor: pointer;
}
input[aria-invalid="true"] {
  border-color: #ae3030;
}
.limits {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #777;
}
.check {
  display: flex;
  gap: 12px;
  font-size: 14px;
  align-items: center;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: #1c1c1c;
}
.calc-result {
  background: #1c1c1c;
  color: white;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.result-label {
  font-size: 14px;
  color: #d0d0d0;
  margin: 0 0 8px;
}
.result-main {
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  margin: 0 0 28px;
  font-variant-numeric: tabular-nums;
}
.result-row {
  border-top: 1px solid #555;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 0;
  font-size: 14px;
}
.result-row strong {
  text-align: right;
  white-space: nowrap;
}
.assumptions {
  font-size: 13px;
  line-height: 1.65;
  color: #ccc;
  margin: 24px 0 0;
}
.assumptions summary {
  cursor: pointer;
  color: #fff;
  font-weight: 700;
}
.assumptions p {
  margin: 10px 0 0;
}
.calc-result .button {
  align-self: flex-start;
  margin-top: 28px;
}
.error {
  color: #ffb9b9;
  font-size: 16px;
}
.calc-bottom {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 50px;
  align-items: center;
  border-top: 1px solid #ddd;
  padding-top: 45px;
  padding-bottom: 0;
}
.calc-bottom p {
  max-width: 550px;
}
.calc-bottom img {
  display: block;
  width: 100%;
  height: 330px;
  object-fit: cover;
  object-position: top;
}
.calc-bottom .button {
  margin-bottom: 35px;
}
.calc-promo {
  background: #f5f5f4;
}
.calc-promo p {
  max-width: 650px;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #999;
  outline-offset: 4px;
}
nav > a.always {
  display: block !important;
}
@media (max-width: 760px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .calc-intro,
  .calculator-area,
  .calc-bottom {
    padding-left: 6%;
    padding-right: 6%;
  }
  .calc-form,
  .calc-result {
    padding: 26px;
  }
  .calc-intro {
    padding-top: 38px;
  }
  .calc-bottom {
    grid-template-columns: 1fr;
  }
  .calc-bottom img {
    display: none;
  }
  .calc-tabs {
    gap: 6px;
  }
  .calc-tab-group {
    width: 100%;
  }
  .calc-tabs button {
    font-size: 12px;
    padding: 10px 13px;
  }
  .field-head {
    gap: 10px;
  }
  .number-wrap input {
    width: 110px;
  }
  nav > a.always {
    font-size: 12px;
  }
  .result-main {
    font-size: 37px;
  }
}
@media (max-width: 380px) {
  .field-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .result-row {
    flex-direction: column;
    gap: 4px;
  }
  .result-row strong {
    text-align: left;
  }
}

header .site-nav > a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: 14px;
}
header .site-nav > a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
}
@media (max-width: 900px) {
  header {
    flex-wrap: wrap;
    gap: 18px;
  }
  header .site-nav {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
  }
  header .site-nav > a {
    padding: 5px 0;
  }
  header .site-nav > a.button {
    padding: 8px 18px;
  }
}
@media (max-width: 600px) {
  header .identity span {
    letter-spacing: 1px;
  }
  header .site-nav {
    gap: 4px 16px;
  }
  header .site-nav > a {
    font-size: 14px;
  }
  header .site-nav > a.button {
    padding: 6px 14px;
  }
}

.calc-intro {
  padding-top: 36px;
  padding-bottom: 16px;
}
.calc-intro h1 {
  font-size: 38px;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.calc-intro h1 br {
  display: none;
}
.calc-intro .eyebrow {
  margin-bottom: 12px;
}
.calc-intro > p:last-child {
  font-size: 16px;
  margin-bottom: 8px;
}
.limits {
  font-size: 12px;
}
.calc-tabs button {
  font-size: 14px;
}
.calc-result [hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  header {
    flex-wrap: wrap;
  }
  .calc-intro h1 {
    font-size: 32px;
  }
  .calc-tabs button {
    padding: 10px 12px;
  }
  .calc-form h2 {
    font-size: 27px;
  }
}
.select-field {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin: 22px 0;
}
.select-field select {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 9px;
  padding: 13px 10px;
  font: inherit;
  color: #1c1c1c;
  background: #fff;
  border: 1px solid #aaa;
}
.advanced {
  margin-top: 28px;
  border-top: 1px solid #bbb;
  padding-top: 18px;
}
.advanced summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}
.calc-explanation {
  font-size: 13px;
  color: #ddd;
  border-top: 1px solid #666;
  padding-top: 20px;
  margin-top: 24px;
}
.calc-explanation a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.calc-explanation p {
  margin: 10px 0;
}
.payoff-chart {
  margin: 30px 0 0;
}
.payoff-chart figcaption {
  font-size: 14px;
  font-weight: 700;
}
.payoff-chart svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 15px;
}
.payoff-chart p {
  font-size: 12px;
  color: #ccc;
}
.chart-key {
  display: flex;
  gap: 22px;
  font-size: 12px;
}
.calc-result .result-row strong {
  white-space: normal;
  overflow-wrap: anywhere;
}
.calc-result .result-row span {
  flex: 1;
}
.calc-result .result-row strong {
  max-width: 58%;
}
.calc-result .result-main {
  font-size: clamp(28px, 3.2vw, 42px);
}
input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
select:focus-visible {
  outline: 3px solid #888;
  outline-offset: 3px;
}

.bank-disclaimer {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  padding: 24px 0;
  max-width: 1000px;
}
.bank-disclaimer strong {
  color: #1c1c1c;
  display: block;
  margin-bottom: 5px;
}
