/* Full-width calculator with the original four-corner pastel background. */
.calculator {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(530px, 73svh, 760px);
  padding: clamp(62px, 7vw, 100px) 22px;
  background-color: #f7f6ff;
  background-image:
    radial-gradient(ellipse at 0% 100%,#afcff6 0%,transparent 44%),
    radial-gradient(ellipse at 100% 100%,#d8c1f4 0%,transparent 48%),
    radial-gradient(ellipse at 100% 0%,#e4e7fa 0%,transparent 52%),
    radial-gradient(ellipse at 0% 0%,#e5dcf8 0%,transparent 49%);
  text-align: center;
}
.calculator-content {
  position: relative;
  width: min(100%, 900px);
  z-index: 1;
}
.commission-title {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0;
  color: #211d32;
}
.commission-media {
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 700;
  line-height: 1.3;
  color: #554b70;
  letter-spacing: -.035em;
}
.commission-line {
  font-size: clamp(45px, 5.4vw, 84px);
  font-weight: 750;
  letter-spacing: -.07em;
  line-height: 1.08;
}
.commission-line strong {
  font-size: 1.13em;
  font-weight: 780;
  letter-spacing: -.07em;
  color: #6340cf;
  white-space: nowrap;
}
.budget-console {
  width: min(100%, 660px);
  margin: clamp(28px, 3.2vw, 44px) auto 0;
  display: grid;
  grid-template-columns: .93fr 1.07fr;
  align-items: center;
  padding: 24px 0;
  background: linear-gradient(118deg, #fffffff5, #fffc 65%, #f9f6ffdb);
  border: 1px solid #fffffff0;
  border-radius: 24px;
  box-shadow: 0 14px 45px -21px #55448561, 0 0 0 1px #57467b17;
}
.budget-field, .calculator-result {
  min-width: 0;
  display: grid;
  justify-items: start;
  align-content: center;
  text-align: left;
  padding-inline: clamp(20px, 3vw, 38px);
}
.budget-field { gap: 7px; }
.budget-label, .result-label {
  color: #504a61;
  font: inherit;
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -.025em;
  line-height: 1.4;
}
.budget-entry {
  width: 100%;
  max-width: 232px;
  min-height: 48px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 14px 5px;
  background: #fff;
  border: 1px solid #c8c2d8;
  border-radius: 11px;
}
.budget-entry:focus-within {
  outline: 3px solid #6a47cf;
  outline-offset: 2px;
}
.budget-entry input {
  flex: 1;
  min-width: 0;
  width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #231f32;
  font: inherit;
  font-size: clamp(26px, 2.65vw, 35px);
  line-height: 1.23;
  font-weight: 650;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
}
.budget-entry input::-webkit-inner-spin-button, .budget-entry input::-webkit-outer-spin-button { appearance: none; }
.budget-entry span, #result-unit { white-space: nowrap; font-size: 16px; font-weight: 650; }
.budget-entry span { color: #5b5469; }
.calculator-result {
  gap: 4px;
  border-left: 1px solid #ddd6eb;
}
.result-number {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
  color: #5739b1;
}
#result-amount {
  font-size: clamp(34px, 3.55vw, 54px);
  line-height: 1.13;
  font-weight: 750;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
}
.long-amount #result-amount { font-size: clamp(23px, 2.4vw, 37px); }
.no-result #result-amount { color: #625c6c; font-size: clamp(24px, 2.2vw, 33px); }
#result-unit:empty { display: none; }
.calculator #comparison-note { margin: 14px auto 0; color: #595367; font-size: 14px; line-height: 1.6; text-wrap: balance; }
.calculator #home-consult {
  min-height: 50px;
  padding: 13px 27px;
  margin-top: clamp(20px, 2vw, 28px);
  background: #292336;
  border-color: #292336;
  color: white;
  text-decoration: none;
  font-size: 16px;
  letter-spacing: -.035em;
}
.calculator #home-consult:hover { background: #46395c; border-color: #46395c; }
@media (max-width: 620px) {
  .calculator { min-height: clamp(490px, 70svh, 615px); padding: 48px 18px; }
  .commission-title { gap: 8px; }
  .commission-line { font-size: clamp(33px, 8.8vw, 48px); }
  .budget-console { width: min(100%, 402px); grid-template-columns: 1fr; gap: 13px; padding: 18px; border-radius: 19px; }
  .budget-field, .calculator-result { padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .budget-label, .result-label { flex: none; font-size: 14px; }
  .budget-entry { max-width: 59%; min-height: 44px; align-items: center; padding: 4px 10px; }
  .budget-entry input { text-align: right; font-size: 27px; }
  .budget-entry span, #result-unit { font-size: 14px; }
  .calculator-result { min-height: 48px; padding-top: 12px; border-left: 0; border-top: 1px solid #dfd9e9; }
  #result-amount { font-size: clamp(30px, 8vw, 38px); }
  .long-amount #result-amount { font-size: clamp(20px, 5.6vw, 29px); }
  .no-result #result-amount { font-size: 24px; }
  .calculator #comparison-note { margin-top: 13px; }
  .calculator #home-consult { margin-top: 22px; min-height: 48px; }
}
