:root {
  --ink: #14382b;
  --muted: #5b655d;
  --green: #3e8e5f;
  --green-dark: #14382b;
  --green-soft: #eaf4ef;
  --cream: #f7f4ec;
  --white: #ffffff;
  --line: #d9e1dc;
  --warning: #fff4d8;
  --danger: #a53a2a;
  --shadow: 0 22px 70px rgba(20, 38, 31, .12);
  --radius: 22px;
  --max: 1180px;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-var.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-var.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fbfcfa;
  font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: "Bricolage Grotesque", "Instrument Sans", sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.hero {
  width: min(calc(100% - 32px), var(--max));
  margin: 10px auto 64px;
  min-height: 570px;
  border-radius: 34px;
  padding: clamp(36px, 7vw, 82px);
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 60px;
  align-items: center;
  color: white;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 85% 15%, rgba(156, 214, 184, .34), transparent 27%),
    linear-gradient(135deg, #143e31, #0e2c23);
}
.breadcrumb { display: flex; gap: 8px; align-items: center; margin-bottom: 24px; color: rgba(255,255,255,.68); font-size: 13px; }
.breadcrumb a { color: white; text-underline-offset: 3px; }
.hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -130px;
  bottom: -190px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.02);
}
.hero-copy, .hero-card { position: relative; z-index: 1; }
.eyebrow {
  display: inline-block;
  color: #8fd0b1;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.hero h1 {
  font-size: clamp(42px, 6.5vw, 76px);
  line-height: .98;
  letter-spacing: -.055em;
  margin: 16px 0 24px;
  max-width: 760px;
}
.lead {
  max-width: 670px;
  color: rgba(255,255,255,.78);
  font-size: clamp(18px, 2.2vw, 22px);
}
.hero-actions { display: flex; gap: 12px; margin: 30px 0; flex-wrap: wrap; }
.button {
  border: 0;
  text-decoration: none;
  border-radius: 12px;
  min-height: 48px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 780;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--green); box-shadow: 0 10px 30px rgba(28,104,78,.24); }
.hero .button.primary { color: var(--green-dark); background: #b7e0cc; box-shadow: none; }
.button.ghost { color: var(--ink); border: 1px solid var(--line); background: white; }
.hero .button.ghost { color: white; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.06); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.trust-list { display: flex; padding: 0; margin: 0; gap: 22px; flex-wrap: wrap; list-style: none; color: rgba(255,255,255,.72); font-size: 13px; }
.trust-list li::before { content: "✓"; color: #a5ddc1; font-weight: 900; margin-right: 7px; }

.hero-card {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(18px);
  padding: 26px;
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(0,0,0,.2);
}
.hero-card h2 { font-size: 24px; margin: 12px 0 20px; }
.mini-status { display: inline-flex; background: #b7e0cc; color: var(--green-dark); border-radius: 999px; padding: 5px 10px; font-weight: 800; font-size: 11px; text-transform: uppercase; }
.mini-row { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255,255,255,.13); padding: 16px 0; font-size: 14px; }
.mini-row span { color: rgba(255,255,255,.66); }
.mini-row strong { text-align: right; }
.hero-card p { color: rgba(255,255,255,.62); font-size: 13px; margin: 12px 0 0; }

.calculator-shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto 90px;
}
.calculator-heading { max-width: 740px; margin-bottom: 28px; }
.calculator-heading h2, .content-section h2, .sources-section h2 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -.04em; line-height: 1.05; margin: 10px 0 13px; }
.calculator-heading p, .content-section p, .sources-section p { color: var(--muted); }

.wizard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}
.progress-panel {
  position: sticky;
  top: 20px;
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
  padding: 24px;
}
.progress-panel ol { list-style: none; padding: 0; margin: 0; }
.progress-panel li {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px 0 22px;
  opacity: .48;
}
.progress-panel li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 50px;
  width: 2px;
  height: 18px;
  background: rgba(255,255,255,.22);
}
.progress-panel li span {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.42);
  display: grid; place-items: center; font-weight: 800;
}
.progress-panel li strong, .progress-panel li small { display: block; }
.progress-panel li small { color: rgba(255,255,255,.58); font-size: 11px; }
.progress-panel li.active, .progress-panel li.done { opacity: 1; }
.progress-panel li.active span { color: var(--green-dark); background: #b7e0cc; border-color: #b7e0cc; }
.progress-panel li.done span { background: rgba(183,224,204,.16); border-color: #8fc9ad; }
.progress-note { border-top: 1px solid rgba(255,255,255,.12); margin-top: 8px; padding-top: 20px; }
.progress-note strong { color: #b7e0cc; font-size: 13px; }
.progress-note p { color: rgba(255,255,255,.62); font-size: 12px; margin-bottom: 0; }

.wizard-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 650px;
  overflow: hidden;
}
.step { display: none; padding: clamp(26px, 5vw, 56px); }
.step.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.step-kicker { color: var(--green); font-weight: 850; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.step h3 { font-size: clamp(27px, 3vw, 39px); line-height: 1.1; letter-spacing: -.035em; margin: 10px 0; }
.step-intro { color: var(--muted); margin: 0 0 30px; max-width: 690px; }

.field { display: block; margin-bottom: 22px; }
.field > span, fieldset legend { display: block; font-weight: 760; margin-bottom: 8px; }
.field em { color: var(--muted); font-weight: 500; font-style: normal; }
.field input, .field select, .use-row select, .use-row input {
  width: 100%;
  height: 52px;
  color: var(--ink);
  background: #fbfcfa;
  border: 1px solid #ccd6d0;
  border-radius: 11px;
  padding: 0 14px;
  outline: none;
}
.field input:focus, .field select:focus, .use-row select:focus, .use-row input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(28,104,78,.1); }
.field small { display: block; color: var(--muted); margin-top: 6px; font-size: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.unit-input { position: relative; }
.unit-input input { padding-right: 50px; }
.unit-input b { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }

.info-box, .warning-box {
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--green-soft);
  border: 1px solid #cfe5d9;
  margin-top: 10px;
}
.warning-box { background: var(--warning); border-color: #ead89d; margin: 20px 0; }
.info-box strong, .warning-box strong { font-size: 14px; }
.info-box p, .warning-box p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.choice-grid {
  border: 0; padding: 0; margin: 0 0 24px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.choice-grid legend { grid-column: 1 / -1; }
.choice-card {
  position: relative;
  min-height: 132px;
  border: 1px solid var(--line);
  background: #fbfcfa;
  border-radius: 15px;
  padding: 18px;
  cursor: pointer;
}
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked) { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.choice-icon { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 9px; font-weight: 850; margin-bottom: 12px; }
.choice-card strong, .choice-card small { display: block; }
.choice-card small { color: var(--muted); font-size: 12px; margin-top: 4px; }

.inline-options { border: 0; padding: 0; margin: 0; }
.inline-options label { display: inline-flex; align-items: center; gap: 8px; margin: 0 18px 10px 0; }
.inline-options input { accent-color: var(--green); }

.area-details {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 20px;
  margin: 8px 0 22px;
}
.area-details summary { cursor: pointer; padding: 17px 0; font-weight: 780; }
.area-details[open] { padding-bottom: 20px; }
.area-details > p { color: var(--muted); font-size: 13px; margin-top: 0; }
.reference-preview {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ink); color: white; padding: 18px; border-radius: 12px;
}
.reference-preview span { color: rgba(255,255,255,.7); font-size: 13px; }
.reference-preview strong { font-size: 20px; }

.toggle-row {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 14px; padding: 17px; margin-bottom: 14px; cursor: pointer;
}
.toggle-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row small { color: var(--muted); margin-top: 2px; }

.mixed-use-panel { padding: 18px; background: var(--cream); border-radius: 14px; margin-bottom: 20px; }
.mixed-use-panel > p { color: var(--muted); font-size: 13px; margin-top: 0; }
.use-row { display: grid; grid-template-columns: 1.6fr .8fr 38px; gap: 8px; margin-bottom: 8px; }
.use-row select, .use-row input { height: 46px; background: white; }
.remove-row { border: 0; border-radius: 9px; background: white; border: 1px solid var(--line); cursor: pointer; font-size: 22px; }
.text-button { border: 0; background: transparent; color: var(--green); font-weight: 800; padding: 8px 0; cursor: pointer; }

.wizard-footer {
  border-top: 1px solid var(--line);
  padding: 18px clamp(26px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.footer-progress { color: var(--muted); font-size: 13px; }

.result-hero {
  padding: 24px;
  border-radius: 18px;
  margin-bottom: 22px;
  color: white;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
}
.result-hero.not-required { background: linear-gradient(135deg, #425a50, #688174); }
.result-hero.manual { background: linear-gradient(135deg, #74571b, #a37a25); }
.result-badge {
  display: inline-flex; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em;
}
.result-hero h3 { margin: 13px 0 8px; font-size: 31px; }
.result-hero p { margin: 0; color: rgba(255,255,255,.8); }

.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.metric { border: 1px solid var(--line); border-radius: 14px; padding: 17px; background: #fbfcfa; }
.metric span, .metric strong, .metric small { display: block; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 21px; margin-top: 5px; }
.metric small { color: var(--muted); margin-top: 3px; }

.result-section { border-top: 1px solid var(--line); padding: 22px 0 4px; }
.result-section h4 { margin: 0 0 10px; font-size: 19px; }
.result-section p { color: var(--muted); }
.checklist { margin: 0; padding-left: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.checklist li { position: relative; padding-left: 24px; font-size: 14px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.reason-list { padding-left: 18px; color: var(--muted); }

.lead-box { margin-top: 26px; background: var(--cream); border-radius: 18px; padding: 24px; }
.lead-box h3 { margin: 6px 0; font-size: 28px; }
.lead-box > div > p { color: var(--muted); margin-top: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.consent input { margin-top: 3px; accent-color: var(--green); }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.form-message { min-height: 22px; font-size: 13px; color: var(--green); margin-bottom: 0; }
.form-message.is-error { color: var(--danger); }
.consent a { color: var(--green-dark); font-weight: 700; text-underline-offset: 2px; }

.content-section, .sources-section {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto 90px;
}
.content-section { display: grid; grid-template-columns: .7fr 1.3fr; gap: 70px; align-items: start; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-grid article { border: 1px solid var(--line); background: white; border-radius: 17px; padding: 22px; }
.feature-grid article > span { color: var(--green); font-weight: 900; font-size: 12px; }
.feature-grid h3 { margin: 12px 0 6px; }
.feature-grid p { margin: 0; font-size: 13px; }
.sources-section { background: var(--ink); color: white; border-radius: 26px; padding: clamp(28px, 5vw, 50px); }
.sources-section p { color: rgba(255,255,255,.67); max-width: 740px; }
.source-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.source-links a { color: white; text-decoration: none; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 9px 13px; font-size: 13px; }
.related-guides { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.16); }
.related-guides h3 { margin: 0; font-size: 20px; }
.related-guides .source-links { margin-top: 12px; }

.invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(165,58,42,.08) !important; }
.validation-message { color: var(--danger); font-size: 12px; margin: -12px 0 15px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 30px; }
  .hero-card { max-width: 520px; }
  .wizard-layout { grid-template-columns: 1fr; }
  .progress-panel { position: static; padding: 15px; }
  .progress-panel ol { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .progress-panel li { display: block; text-align: center; padding: 0; }
  .progress-panel li:not(:last-child)::after, .progress-panel li div, .progress-note { display: none; }
  .progress-panel li span { margin: 0 auto; width: 34px; height: 34px; }
  .content-section { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 680px) {
  .hero { padding: 34px 23px; border-radius: 24px; }
  .hero h1 { font-size: 43px; }
  .field-row, .choice-grid, .metrics-grid, .feature-grid, .checklist { grid-template-columns: 1fr; }
  .step { padding: 27px 20px; }
  .wizard-footer { padding: 15px 20px; }
  .footer-progress { display: none; }
  .use-row { grid-template-columns: 1fr 100px 38px; }
}
@media print {
  body { background: white; }
  .site-header, .hero, .calculator-heading, .progress-panel, .wizard-footer, .content-section, .sources-section, .site-footer, .lead-box { display: none !important; }
  .calculator-shell, .wizard-layout, .wizard-card { width: 100%; margin: 0; display: block; border: 0; box-shadow: none; }
  .step { display: none !important; padding: 0; }
  .step.result-step { display: block !important; }
  .result-hero { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
