:root {
  --ink: #17211b;
  --muted: #5c665f;
  --paper: #f6f7f2;
  --surface: #ffffff;
  --line: #d9dfd6;
  --green: #24543f;
  --green-dark: #183c2d;
  --clay: #b85f3d;
  --blue: #315f72;
  --gold: #c3a351;
  --shadow: 0 24px 70px rgba(23, 33, 27, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

label,
input,
select,
textarea {
  min-width: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(246, 247, 242, 0.9);
  border-bottom: 1px solid rgba(217, 223, 214, 0.85);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  font-weight: 800;
}

.brand-logo {
  width: clamp(98px, 16vw, 150px);
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  gap: clamp(14px, 3vw, 32px);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.main-nav a:hover,
.footer-links a:hover {
  color: var(--green);
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  align-items: stretch;
  gap: clamp(28px, 5vw, 70px);
  min-height: calc(100vh - 74px);
  padding: clamp(34px, 6vw, 86px) clamp(18px, 4vw, 56px) 44px;
  background:
    linear-gradient(135deg, rgba(36, 84, 63, 0.08), transparent 45%),
    linear-gradient(45deg, rgba(184, 95, 61, 0.11), transparent 52%),
    var(--paper);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.45rem, 6vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.26rem);
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.button.primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 28px rgba(36, 84, 63, 0.22);
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  background: var(--blue);
  color: #fff;
}

.button.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.button.full-width {
  width: 100%;
}

.anti-spam-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.hero-visual {
  position: relative;
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(217, 223, 214, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
}

.photo-credit {
  position: absolute;
  left: 14px;
  bottom: 14px;
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(23, 33, 27, 0.74);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.74rem;
  font-weight: 700;
}

.photo-credit a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.visual-stat {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 150px);
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(23, 33, 27, 0.18);
}

.visual-stat span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 900;
}

.visual-stat strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.process-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 0 clamp(18px, 4vw, 56px);
  background: var(--line);
}

.process-strip div {
  min-height: 120px;
  padding: 24px;
  background: var(--surface);
}

.pricing-band {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: start;
  padding: clamp(34px, 6vw, 70px) clamp(18px, 4vw, 56px);
  background: #edf1e9;
}

.pricing-intro p:last-child {
  color: var(--muted);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.price-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(23, 33, 27, 0.08);
}

.price-card .tier {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.price-card strong {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: clamp(1.55rem, 2.4vw, 2.2rem);
  line-height: 1;
}

.price-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.process-strip strong,
.process-strip span {
  display: block;
}

.process-strip span {
  margin-top: 8px;
  color: var(--muted);
}

.estimator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 420px);
  gap: clamp(22px, 4vw, 44px);
  align-items: start;
  padding: clamp(34px, 6vw, 76px) clamp(18px, 4vw, 56px);
}

.estimator,
.result-sticky,
.review-form,
.legal-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(23, 33, 27, 0.07);
}

.form-header {
  padding: clamp(22px, 4vw, 34px);
  border-bottom: 1px solid var(--line);
}

.form-header p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

fieldset {
  margin: 0;
  padding: clamp(20px, 4vw, 34px);
  border: 0;
  border-bottom: 1px solid var(--line);
}

legend {
  width: 100%;
  margin-bottom: 16px;
  padding: 0;
  font-size: 1.04rem;
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.grid.compact {
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

label span:not(.input-pair) {
  color: var(--clay);
}

input,
select,
textarea {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid #cbd3c7;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
  font-weight: 500;
}

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

.subtype-field select {
  overflow: hidden;
  text-overflow: ellipsis;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(36, 84, 63, 0.13);
}

.input-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 8px;
}

.full {
  margin-top: 16px;
}

.help-note,
.optional-note,
.photo-note,
.form-message {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.optional-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(49, 95, 114, 0.22);
  border-radius: var(--radius);
  background: rgba(49, 95, 114, 0.08);
  color: var(--blue);
  font-weight: 800;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--ink);
  font-size: 0.92rem;
}

.check-option input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}

.check-option span {
  color: var(--ink);
}

.upload-zone {
  position: relative;
  display: grid;
  min-height: 170px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #9aaa9b;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(49, 95, 114, 0.1), transparent),
    linear-gradient(45deg, rgba(195, 163, 81, 0.17), transparent),
    #fbfcf9;
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-zone label {
  justify-items: center;
  max-width: 430px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.upload-zone strong {
  color: var(--ink);
  font-size: 1.04rem;
}

.upload-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  color: var(--green);
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.photo-preview figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f9f6;
}

.photo-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-preview figcaption {
  overflow: hidden;
  padding: 7px 8px;
  color: var(--muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.document-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f9f6;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.form-actions {
  padding: clamp(20px, 4vw, 34px);
}

.result-panel {
  position: relative;
}

.result-sticky {
  position: sticky;
  top: 92px;
  padding: clamp(20px, 3vw, 28px);
}

.result-sticky p {
  color: var(--muted);
}

.range-box {
  margin: 22px 0;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
}

.range-box span {
  display: block;
  margin-bottom: 8px;
  opacity: 0.82;
  font-size: 0.86rem;
  font-weight: 800;
}

.range-box strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.result-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.result-list div {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.result-list dt {
  color: var(--muted);
  font-weight: 800;
}

.result-list dd {
  margin: 0;
  font-weight: 700;
}

.locked-message {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(184, 95, 61, 0.35);
  border-radius: var(--radius);
  background: rgba(184, 95, 61, 0.08);
}

.locked-message span {
  color: var(--muted);
}

.review-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 420px);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  padding: clamp(34px, 6vw, 72px) clamp(18px, 4vw, 56px);
  background: var(--ink);
  color: #fff;
}

.review-band p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.review-form {
  display: grid;
  gap: 16px;
  padding: 22px;
  color: var(--ink);
}

.review-form .form-message {
  margin-top: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 800;
}

.legal-main {
  width: min(980px, calc(100% - 36px));
  margin: 42px auto 70px;
}

.legal-panel {
  padding: clamp(24px, 5vw, 48px);
}

.legal-panel h1 {
  max-width: none;
  margin-bottom: 20px;
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.legal-panel h2 {
  margin-top: 30px;
  font-size: 1.3rem;
}

.legal-panel p,
.legal-panel li {
  color: var(--muted);
}

.legal-panel a {
  color: var(--green);
  font-weight: 800;
}

@media (max-width: 980px) {
  .tool-hero,
  .estimator-layout,
  .review-band {
    grid-template-columns: 1fr;
  }

  .tool-hero {
    min-height: auto;
  }

  .hero-visual img {
    min-height: 330px;
  }

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

  .pricing-band,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .result-sticky {
    position: static;
  }
}

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

  .main-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 4rem);
  }

  .process-strip,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .process-strip div {
    min-height: auto;
  }

  .input-pair {
    grid-template-columns: 1fr;
  }

  .result-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .visual-stat {
    left: 14px;
    right: 14px;
    bottom: 50px;
    grid-template-columns: auto 1fr;
  }

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