.budget-page {
  overflow-x: hidden;
}

.budget-hero {
  display: grid;
  width: min(calc(100% - 32px), var(--max));
  grid-template-columns: minmax(0, 1.22fr) minmax(300px, 0.78fr);
  gap: clamp(34px, 7vw, 100px);
  align-items: end;
  margin: 0 auto;
  padding: clamp(68px, 9vw, 132px) 0 clamp(76px, 9vw, 126px);
}

.budget-hero-copy h1 {
  max-width: 870px;
  font-size: clamp(52px, 7.3vw, 104px);
}

.budget-hero-intro {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: clamp(18px, 1.8vw, 24px);
}

.budget-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.budget-promises li {
  padding: 8px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.budget-hero-note {
  display: grid;
  min-height: 340px;
  align-content: space-between;
  gap: 34px;
  padding: clamp(26px, 4vw, 46px);
  background: var(--yellow);
  border: var(--line);
  border-radius: 30px 30px 0 30px;
  box-shadow: 9px 9px 0 var(--ink);
}

.budget-hero-note > span {
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.budget-hero-note strong {
  font-size: clamp(27px, 3vw, 43px);
  line-height: 1.06;
}

.budget-hero-note p {
  margin: 0;
  padding-top: 18px;
  border-top: 1.5px solid var(--ink);
  font-size: 12px;
}

.calculator-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.58fr) minmax(0, 1.42fr);
  gap: clamp(38px, 6vw, 86px);
  padding-right: clamp(24px, 5vw, 72px);
  padding-left: clamp(24px, 5vw, 72px);
  background: var(--surface);
  border: var(--line);
  border-radius: 34px 34px 0 34px;
}

.calculator-heading h2 {
  font-size: clamp(36px, 4vw, 58px);
}

.calculator-heading > p:last-child {
  max-width: 560px;
  margin-bottom: 0;
  font-size: 15px;
}

.budget-calculator {
  min-width: 0;
  padding: clamp(22px, 3.5vw, 40px);
  background: var(--paper);
  border: var(--line);
  box-shadow: 8px 8px 0 var(--ink);
}

.budget-country-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.budget-country-fieldset legend,
.budget-duration-control > label {
  display: block;
  margin-bottom: 14px;
  padding: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.budget-country-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.budget-country-choice {
  position: relative;
  min-width: 0;
}

.budget-country-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  opacity: 0;
}

.budget-country-choice label {
  position: relative;
  display: grid;
  min-height: 100px;
  padding: 15px 10px;
  place-items: center;
  align-content: center;
  gap: 7px;
  background: var(--surface);
  border: 2px solid var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
}

.budget-country-choice label:hover {
  background: var(--yellow);
}

.budget-country-choice input:checked + label {
  background: var(--coral);
  box-shadow: inset 0 -7px 0 rgba(23, 22, 22, 0.12);
}

.budget-country-choice input:checked + label::after {
  position: absolute;
  top: 7px;
  right: 8px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: white;
  content: "";
}

.budget-country-choice input:checked + label::before {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 13px;
  width: 7px;
  height: 4px;
  border-bottom: 2px solid white;
  border-left: 2px solid white;
  content: "";
  transform: rotate(-45deg);
}

.budget-country-choice input:focus-visible + label,
.budget-select-wrap select:focus-visible {
  outline: 4px solid #6d4aff;
  outline-offset: 3px;
}

.budget-flag {
  font-size: 24px;
  line-height: 1;
}

.budget-duration-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}

.budget-duration-control > label {
  margin: 0;
}

.budget-select-wrap {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  font-weight: 850;
}

.budget-select-wrap select {
  min-width: 78px;
  min-height: 48px;
  padding: 8px 28px 8px 12px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
}

.budget-result {
  display: block;
}

.budget-result-heading {
  display: block;
  margin-bottom: 12px;
  color: var(--coral);
  font-size: clamp(19px, 2vw, 28px);
  font-weight: 900;
}

.budget-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: var(--line);
  border-left: var(--line);
}

.budget-metric {
  display: grid;
  min-width: 0;
  min-height: 210px;
  padding: clamp(18px, 3vw, 28px);
  align-content: space-between;
  gap: 16px;
  background: white;
  border-right: var(--line);
  border-bottom: var(--line);
}

.budget-metric-total {
  background: var(--coral);
}

.budget-metric small {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.budget-metric strong {
  overflow-wrap: anywhere;
  font-size: clamp(27px, 3.4vw, 46px);
  line-height: 1;
}

.budget-metric > span:last-child {
  color: #5d5750;
  font-size: 11px;
  font-weight: 750;
}

.budget-status,
.budget-noscript {
  margin: 17px 0 0;
  color: #5d5750;
  font-size: 10px;
}

.budget-noscript {
  padding: 10px;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
}

.budget-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1.5px solid var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.budget-source-row a {
  text-underline-offset: 4px;
}

.cost-map {
  padding-bottom: clamp(88px, 10vw, 150px);
}

.cost-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: var(--line);
  border-left: var(--line);
  list-style: none;
}

.cost-grid li {
  min-height: 270px;
  padding: clamp(22px, 3vw, 36px);
  background: var(--surface);
  border-right: var(--line);
  border-bottom: var(--line);
}

.cost-grid li:nth-child(2),
.cost-grid li:nth-child(5) {
  background: var(--blue);
}

.cost-grid li:nth-child(3),
.cost-grid li:nth-child(6) {
  background: var(--green);
}

.cost-grid li > span {
  font-size: 10px;
  font-weight: 950;
}

.cost-grid h3 {
  margin: 68px 0 14px;
  font-size: clamp(22px, 2.3vw, 32px);
}

.cost-grid p {
  margin: 0;
  font-size: 13px;
}

.source-ledger {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(40px, 7vw, 96px);
  padding-right: clamp(24px, 5vw, 72px);
  padding-left: clamp(24px, 5vw, 72px);
  background: var(--ink);
  border-radius: 34px 34px 0 34px;
  color: white;
}

.source-ledger-intro h2 {
  font-size: clamp(36px, 4vw, 58px);
}

.source-ledger-intro > p:last-child {
  color: #cbc5bd;
  font-size: 14px;
}

.source-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid #5a5754;
  list-style: none;
}

.source-list li {
  display: grid;
  grid-template-columns: 34px minmax(130px, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid #5a5754;
}

.source-list li > span {
  font-size: 21px;
}

.source-list strong,
.source-list a {
  font-size: 12px;
}

.source-list a {
  color: var(--yellow);
  font-weight: 850;
  text-underline-offset: 4px;
}

.budget-faq {
  display: grid;
  grid-template-columns: minmax(260px, 0.66fr) minmax(0, 1.34fr);
  gap: clamp(40px, 8vw, 110px);
}

.faq-list {
  border-top: var(--line);
}

.faq-list details {
  border-bottom: var(--line);
}

.faq-list summary {
  position: relative;
  min-height: 76px;
  padding: 22px 50px 22px 0;
  cursor: pointer;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 850;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  position: absolute;
  top: 20px;
  right: 4px;
  content: "+";
  font-size: 30px;
  font-weight: 600;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  max-width: 700px;
  margin: 0;
  padding: 0 50px 24px 0;
  color: #5d5750;
  font-size: 14px;
}

.budget-final-cta {
  margin-top: 20px;
}

@media (max-width: 980px) {
  .budget-hero,
  .calculator-section,
  .source-ledger,
  .budget-faq {
    grid-template-columns: 1fr;
  }

  .budget-hero-note {
    min-height: 0;
  }

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

@media (max-width: 780px) {
  .budget-hero {
    width: min(calc(100% - 24px), var(--max));
    padding-top: 54px;
  }

  .budget-hero-copy h1 {
    font-size: clamp(46px, 13vw, 72px);
  }

  .calculator-section,
  .source-ledger {
    padding-right: 22px;
    padding-left: 22px;
    border-radius: 22px 22px 0 22px;
  }

  .budget-country-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-grid {
    grid-template-columns: 1fr;
  }

  .cost-grid li {
    min-height: 220px;
  }

  .source-list li {
    grid-template-columns: 32px 1fr;
    padding: 12px 0;
  }

  .source-list a {
    grid-column: 2;
  }
}

@media (max-width: 520px) {
  .budget-hero-note {
    padding: 24px;
    border-radius: 22px 22px 0 22px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .budget-calculator {
    padding: 17px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .budget-country-choice label {
    min-height: 88px;
    padding: 12px 8px;
  }

  .budget-duration-control {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .budget-select-wrap {
    justify-content: space-between;
  }

  .budget-result-grid {
    grid-template-columns: 1fr;
  }

  .budget-metric {
    min-height: 180px;
  }
}
