:root {
  color-scheme: light;
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-strong: #eef4f0;
  --ink: #16211f;
  --muted: #5d6863;
  --line: #d7dfd9;
  --green: #1f7a5f;
  --green-dark: #12343b;
  --gold: #d97904;
  --blue: #4f5d75;
  --red: #b3261e;
  --shadow: 0 18px 46px rgba(22, 33, 31, 0.1);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(31, 122, 95, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(79, 93, 117, 0.07) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(217, 121, 4, 0.45);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

.site-header,
.hero,
.content-band,
.site-footer {
  width: min(var(--max-width), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  width: min(15rem, 62vw);
}

.brand img {
  width: 100%;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.nav a {
  min-height: 2.5rem;
  padding: 0.58rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--green-dark);
  border-color: rgba(31, 122, 95, 0.45);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 2rem;
  align-items: center;
  min-height: calc(100vh - 7rem);
  padding: 2rem 0 4rem;
}

.hero-copy {
  max-width: 38rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  color: var(--green-dark);
  font-size: 4.2rem;
  line-height: 0.98;
}

h2 {
  margin-bottom: 0.9rem;
  color: var(--green-dark);
  font-size: 2rem;
  line-height: 1.12;
}

h3 {
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-size: 1rem;
}

.hero-lede {
  max-width: 36rem;
  margin-bottom: 1.4rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.trust-row span {
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(31, 122, 95, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--green-dark);
  font-weight: 700;
}

.estimator-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool-heading {
  padding: 1.4rem 1.5rem 0.4rem;
}

.tool-heading h2 {
  font-size: 1.55rem;
}

.estimate-form {
  padding: 0 1.5rem 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.38rem;
}

label span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid #c8d3cc;
  border-radius: 6px;
  background: #fbfcfb;
  color: var(--ink);
  padding: 0.68rem 0.72rem;
}

input:hover,
select:hover {
  border-color: rgba(31, 122, 95, 0.45);
}

.wide-field {
  grid-column: 1 / -1;
}

.form-error {
  min-height: 1.5rem;
  margin: 0.8rem 0 0.55rem;
  color: var(--red);
  font-weight: 700;
}

.estimate-button {
  width: 100%;
  min-height: 3rem;
  border: 0;
  border-radius: 6px;
  background: var(--green-dark);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
}

.estimate-button:hover {
  background: #0d2b31;
}

.result-panel {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--surface-strong);
}

.result-panel[hidden] {
  display: none;
}

.result-label,
.result-midpoint,
.result-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-panel strong {
  color: var(--green-dark);
  font-size: 2rem;
  line-height: 1.1;
}

.factor-list {
  display: grid;
  gap: 0.35rem;
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}

.factor-list li {
  border-left: 3px solid var(--gold);
  padding-left: 0.65rem;
  color: var(--ink);
}

.content-band {
  padding: 4rem 0 0;
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 1.2rem;
}

.method-grid,
.factor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.method-grid article,
.factor-grid div,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 1.2rem;
}

.method-grid p,
.factor-grid p,
.faq-list p,
.site-footer p {
  color: var(--muted);
}

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

.metric {
  display: inline-block;
  margin-bottom: 1.4rem;
  color: var(--gold);
  font-weight: 900;
}

.faq-list {
  display: grid;
  gap: 0.7rem;
}

.faq-list summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 850;
}

.faq-list p {
  margin: 0.7rem 0 0;
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 4rem 0 2rem;
}

.site-footer img {
  width: 3rem;
  height: 3rem;
}

.site-footer p {
  max-width: 48rem;
  margin: 0;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1rem;
  }

  h1 {
    font-size: 3.05rem;
  }

  .method-grid,
  .factor-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .site-header,
  .hero,
  .content-band,
  .site-footer {
    width: min(100% - 1rem, var(--max-width));
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav a {
    padding-inline: 0.45rem;
    text-align: center;
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .form-grid,
  .method-grid,
  .factor-grid {
    grid-template-columns: 1fr;
  }

  .tool-heading,
  .estimate-form,
  .result-panel {
    padding-inline: 1rem;
  }

  .result-panel strong {
    font-size: 1.55rem;
  }

  .site-footer {
    align-items: flex-start;
  }
}
