:root {
  --forest: #173f33;
  --forest-deep: #102f26;
  --forest-mid: #315b47;
  --sage: #9dcaab;
  --cream: #f5f4ee;
  --paper: #fff;
  --ink: #19392f;
  --muted: #627369;
  --line: #d9dfd8;
  --error: #a23328;
  --shadow: 0 18px 55px rgba(23, 63, 51, .10);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-size: 15px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 87% 8%, rgba(157, 202, 171, .16), transparent 28rem),
    var(--cream);
}

.calculator-nav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #000;
}

.calculator-nav .site-header {
  border: 0;
  color: #fff;
}

.calculator-nav .brand {
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.calculator-nav .site-header nav {
  gap: 40px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.calculator-nav .site-header nav a:hover,
.calculator-nav .site-header nav a:focus {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 5px;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1100;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: 5px;
  background: var(--forest);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.5px;
  text-decoration: none;
}

.brand-mark {
  font-size: 23px;
}

.site-header nav {
  display: flex;
  gap: 28px;
  color: #40584e;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.site-header nav a {
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus {
  color: #000;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 28px 70px;
}

.intro {
  max-width: 760px;
  margin-bottom: 34px;
}

.kicker,
.eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.kicker {
  color: var(--forest-mid);
}

h1 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 6vw, 70px);
  font-weight: 400;
  letter-spacing: -2.5px;
  line-height: 1.04;
}

.intro > p:not(.kicker) {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.privacy-note {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  margin-top: 18px;
  padding: 9px 13px;
  border: 1px solid #cfdbd2;
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  color: #52675d;
  font-size: 11px;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr);
  gap: 28px;
  align-items: start;
}

.card {
  border: 1px solid #e0e5dc;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.inputs-card {
  padding: 30px;
}

.card-heading {
  display: flex;
  gap: 20px;
  align-items: start;
  justify-content: space-between;
}

h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
}

h3 {
  margin: 28px 0 16px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

label {
  display: block;
  color: #4f6359;
  font-size: 12px;
}

input {
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid #ccd7cc;
  border-radius: 7px;
  background: #fcfdfb;
  color: var(--ink);
}

input:focus {
  outline: 2px solid #6b987e;
  outline-offset: 2px;
}

details {
  margin-top: 26px;
  padding-top: 21px;
  border-top: 1px solid #e0e5dc;
}

summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.helper-text {
  margin: 14px 0 18px;
  color: #758278;
  font-size: 11px;
  line-height: 1.6;
}

.text-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #60766a;
  cursor: pointer;
  font-size: 11px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button {
  padding: 10px 15px;
  border: 1px solid #b5c6b7;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
}

.button-secondary {
  background: transparent;
  color: var(--ink);
}

.button:hover,
.button:focus {
  border-color: var(--forest);
  background: #eff5f1;
}

.error {
  display: none;
  margin: 18px 0;
  color: var(--error);
  font-size: 12px;
  line-height: 1.5;
}

.status-message {
  min-height: 18px;
  margin: 12px 0 0;
  color: #60766a;
  font-size: 12px;
}

.result-card {
  position: sticky;
  top: 20px;
  align-self: start;
  padding: 30px;
  border: 0;
  background: var(--forest);
  color: #fff;
  box-shadow: 0 22px 65px rgba(16, 47, 38, .22);
}

.result-card .eyebrow {
  color: #c9ddd0;
}

.price {
  margin: 10px 0 15px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 6vw, 66px);
  line-height: 1;
}

.pill {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 20px;
  background: var(--forest-mid);
  font-size: 12px;
}

.result-intro,
.result-caveat {
  color: #bed0c3;
  font-size: 11px;
  line-height: 1.7;
}

.result-intro {
  margin: 20px 0 0;
}

.cost-bar {
  display: flex;
  height: 10px;
  margin: 26px 0 14px;
  overflow: hidden;
  border-radius: 20px;
}

.cost-bar span {
  min-width: 0;
}

.result-row {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
}

.result-total {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #567060;
  font-size: 17px;
}

.result-stats {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #567060;
}

.result-caveat {
  margin: 20px 0 0;
}

.explanation {
  margin-top: 86px;
}

.explanation > h2 {
  max-width: 560px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  font-weight: 400;
}

.explanation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.explanation-grid article {
  padding: 26px;
  border-top: 1px solid #bdcbbf;
}

.explanation-grid article > span {
  color: #6e887a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}

.explanation-grid h3 {
  margin: 18px 0 10px;
  color: var(--ink);
  font-size: 14px;
}

.explanation-grid p,
.planning-note p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.planning-note {
  margin-top: 50px;
  padding: 26px 30px;
  border-left: 4px solid #7b9b89;
  background: rgba(255, 255, 255, .55);
}

.planning-note p {
  margin: 0 0 12px;
}

.planning-note a,
.back-link a {
  font-size: 12px;
  font-weight: 700;
}

.back-link {
  margin-top: 38px;
}

footer {
  padding: 30px 20px;
  background: var(--forest-deep);
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  text-align: center;
}

footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .calculator-nav .site-header nav {
    gap: 16px;
    font-size: 11px;
  }
}

@media (max-width: 820px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .result-card {
    position: static;
  }

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

@media (max-width: 620px) {
  .site-header {
    padding: 22px 18px 18px;
  }

  .calculator-nav .site-header nav {
    gap: 18px;
    font-size: 11px;
  }

  .calculator-nav .site-header nav a:nth-child(2),
  .calculator-nav .site-header nav a:nth-child(3),
  .calculator-nav .site-header nav a:nth-child(4),
  .calculator-nav .site-header nav a:nth-child(6) {
    display: none;
  }

  main {
    padding: 40px 16px 58px;
  }

  h1 {
    font-size: 45px;
    letter-spacing: -1.8px;
  }

  .privacy-note {
    align-items: flex-start;
    border-radius: 12px;
  }

  .inputs-card,
  .result-card {
    padding: 22px;
  }

  .fields {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card-heading {
    display: block;
  }

  .text-button {
    margin-top: 12px;
  }

  .price {
    font-size: 48px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .calculator-nav,
  .privacy-note,
  .actions,
  .explanation,
  .planning-note,
  .back-link,
  footer {
    display: none;
  }

  main {
    max-width: none;
    padding-right: 0;
    padding-left: 0;
  }

  .calculator-layout {
    grid-template-columns: 1fr 1fr;
  }

  .card {
    box-shadow: none;
  }

  .result-card {
    position: static;
    border: 1px solid #ccd7cc;
    background: #fff;
    color: var(--ink);
  }

  .result-card .eyebrow,
  .result-intro,
  .result-caveat {
    color: var(--muted);
  }
}
