:root {
  --paper: #f5f0e7;
  --white: #fff;
  --ink: #10231d;
  --muted: #5e6c66;
  --green: #155c50;
  --green-dark: #0a2a22;
  --green-soft: #dfeae3;
  --gold: #d4a331;
  --wine: #963c59;
  --line: #c9d1ca;
  --radius: 18px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); }
a { color: inherit; text-underline-offset: 4px; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 99; padding: 12px 16px; border-radius: 4px; background: var(--white); font: 800 14px/1 var(--sans); }
.skip-link:focus { top: 12px; }

.site-header { display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 36px; width: min(1180px, calc(100% - 64px)); margin: 0 auto; font-family: var(--sans); }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--green); color: var(--white); font: 900 19px/1 var(--sans); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; line-height: 1.1; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.site-header nav { display: flex; align-items: center; gap: 28px; font-size: 13px; font-weight: 760; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--green); }
.site-header .nav-download { padding: 11px 16px; border-radius: 5px; background: var(--wine); color: var(--white); }
.site-header .nav-download:hover, .site-header .nav-download:focus-visible { color: var(--white); background: #7d2f49; }

.hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(460px, 1.08fr); gap: 62px; align-items: center; min-height: 680px; padding: 78px max(40px, calc((100vw - 1180px) / 2)); background: var(--green-dark); color: var(--white); }
.eyebrow { margin: 0 0 18px; color: #f1c85f; font: 850 12px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.eyebrow-dark { color: var(--wine); }
h1, h2, h3 { margin-top: 0; font-family: var(--sans); letter-spacing: -.035em; }
h1 { max-width: 680px; margin-bottom: 26px; font-size: clamp(48px, 5vw, 74px); line-height: .98; }
.hero-lede { max-width: 690px; margin: 0; color: #dce6e1; font-size: 21px; line-height: 1.58; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; font-family: var(--sans); }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 13px 19px; border: 2px solid transparent; border-radius: 6px; font-size: 14px; font-weight: 820; text-decoration: none; }
.button-primary { background: var(--gold); color: #17221e; }
.button-primary:hover, .button-primary:focus-visible { background: #e0b343; }
.button-secondary { border-color: rgba(255,255,255,.62); color: var(--white); }
.button-secondary:hover, .button-secondary:focus-visible { border-color: var(--white); background: rgba(255,255,255,.08); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 27px 0 0; padding: 0; list-style: none; font: 760 11px/1.2 var(--sans); text-transform: uppercase; }
.hero-badges li { padding: 8px 10px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: #dce6e1; }
.hero-media { margin: 0; }
.hero-media img { width: 100%; border-radius: var(--radius); box-shadow: 0 28px 70px rgba(0,0,0,.32); }
.hero-media figcaption { margin-top: 14px; color: #aebfb7; font: 650 12px/1.5 var(--sans); }

.fact-band { display: grid; grid-template-columns: repeat(3, 1fr); width: min(1180px, calc(100% - 64px)); margin: 0 auto; border-bottom: 1px solid var(--line); }
.fact-band > div { padding: 34px 30px; border-right: 1px solid var(--line); }
.fact-band > div:first-child { padding-left: 0; }
.fact-band > div:last-child { border-right: 0; }
.fact-band strong, .fact-band span { display: block; }
.fact-band strong { margin-bottom: 7px; font: 850 18px/1.2 var(--sans); }
.fact-band span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.fact-band code { font-size: .88em; }

.calculator-section, .method-section { width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 104px 0; }
.section-heading { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 80px; align-items: end; margin-bottom: 46px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.section-heading h2 { max-width: 620px; margin-bottom: 0; font-size: clamp(38px, 4vw, 56px); line-height: 1.02; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 19px; line-height: 1.65; }
.calculator-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr); gap: 40px; padding: 42px; border-radius: var(--radius); background: var(--white); box-shadow: 0 18px 56px rgba(31,53,44,.08); }
.calculator-form { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; align-content: start; }
.calculator-form label > span:first-child { display: block; margin-bottom: 9px; font: 800 13px/1.2 var(--sans); }
.input-wrap { display: flex; min-height: 52px; align-items: center; padding: 0 13px 0 0; border: 1px solid #aebbb3; border-radius: 6px; background: #fbfcfb; font: 750 14px/1 var(--sans); }
.input-wrap:focus-within { border-color: var(--green); outline: 3px solid rgba(21,92,80,.12); }
.input-wrap input { min-width: 0; width: 100%; height: 50px; padding: 0 12px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 780 18px/1 var(--sans); }
.form-note { grid-column: 1/-1; margin: 8px 0 0; padding: 18px 20px; border-left: 4px solid var(--gold); background: #fbf7ec; color: var(--muted); font-size: 15px; line-height: 1.55; }
.result-panel { min-height: 264px; padding: 30px; border-radius: 13px; background: var(--green); color: var(--white); }
.result-label { display: block; color: #cfe0d9; font: 750 12px/1.4 var(--sans); text-transform: uppercase; }
.result-panel > strong { display: block; margin-top: 13px; font: 880 48px/1 var(--sans); letter-spacing: -.04em; }
#monthly-food { display: block; margin-top: 9px; color: #dce6e1; font-size: 15px; }
.result-panel dl { margin: 27px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.24); }
.result-panel dl div { display: flex; justify-content: space-between; gap: 15px; padding: 5px 0; }
.result-panel dt { color: #cfe0d9; font: 680 12px/1.5 var(--sans); }
.result-panel dd { margin: 0; text-align: right; font: 800 12px/1.5 var(--sans); }
.calculation-boundary { max-width: 900px; margin: 28px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }

.steps-section { padding: 104px max(40px, calc((100vw - 1180px) / 2)); background: var(--green-dark); color: var(--white); }
.section-heading-light { border-color: rgba(255,255,255,.22); }
.section-heading-light > p { color: #c6d2cc; }
.install-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.24); border-left: 1px solid rgba(255,255,255,.24); }
.install-grid article { min-height: 430px; padding: 34px; border-right: 1px solid rgba(255,255,255,.24); border-bottom: 1px solid rgba(255,255,255,.24); }
.step-number { color: #f1c85f; font: 850 12px/1 var(--sans); }
.card-kicker { margin: 62px 0 11px; color: #f1c85f; font: 800 11px/1.2 var(--sans); text-transform: uppercase; }
.install-grid h3 { margin-bottom: 22px; font-size: 25px; line-height: 1.08; }
.install-grid ol { margin: 0; padding-left: 21px; color: #cbd7d1; font-size: 16px; line-height: 1.7; }
.install-grid code { color: var(--white); font-size: .86em; }
.temporary-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.18); color: #aebfb7; font-size: 13px; line-height: 1.5; }
.text-link { display: inline-flex; gap: 9px; margin-top: 25px; color: var(--green); font: 820 14px/1.4 var(--sans); text-decoration-thickness: 2px; }
.text-link-light { margin-top: 30px; color: #f1c85f; }

.privacy-section { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 90px; width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 104px 0; }
.privacy-copy h2 { margin-bottom: 25px; font-size: clamp(38px, 4vw, 56px); line-height: 1.02; }
.privacy-copy > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 19px; line-height: 1.65; }
.privacy-list { border-top: 1px solid var(--line); }
.privacy-list > div { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 18px; padding: 27px 0; border-bottom: 1px solid var(--line); }
.privacy-list > div > span { color: var(--wine); font: 850 16px/1.45 var(--sans); }
.privacy-list p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.privacy-list strong { display: block; margin-bottom: 5px; color: var(--ink); font: 820 19px/1.2 var(--sans); }

.method-section { padding-top: 30px; }
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.formula-card { min-height: 155px; padding: 26px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.56); }
.formula-card p { margin: 0 0 24px; color: var(--muted); font: 750 12px/1.2 var(--sans); text-transform: uppercase; }
.formula-card code { color: var(--ink); font-size: 15px; line-height: 1.6; }
.boundary-card { grid-column: 1/-1; display: grid; grid-template-columns: minmax(240px,.72fr) minmax(0,1.28fr); gap: 60px; margin-top: 14px; padding: 38px; border-radius: 12px; background: var(--green-soft); }
.boundary-card h3 { margin: 0; font-size: 27px; line-height: 1.1; }
.boundary-card p { margin: 0; color: #4a5c54; font-size: 17px; line-height: 1.65; }

.citation-section { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 80px; padding: 84px max(40px, calc((100vw - 1180px) / 2)); background: var(--wine); color: var(--white); }
.citation-section h2 { margin-bottom: 16px; font-size: 43px; line-height: 1.04; }
.citation-section > div:first-child > p:last-child { margin: 0; color: #f0dfe5; font-size: 17px; line-height: 1.6; }
.citation-card { padding: 28px; border: 1px solid rgba(255,255,255,.36); border-radius: 12px; background: rgba(255,255,255,.07); }
.citation-card > span { display: block; font-size: 18px; line-height: 1.6; }
.citation-card > div { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 23px; }
.citation-card button, .citation-card a { min-height: 42px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.6); border-radius: 5px; background: transparent; color: var(--white); font: 800 12px/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.citation-card button:hover, .citation-card button:focus-visible, .citation-card a:hover, .citation-card a:focus-visible { background: var(--white); color: var(--wine); }
#copy-status { min-height: 20px; margin: 12px 0 0; color: #f5d8e1; font: 700 12px/1.4 var(--sans); }

footer { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 70px; padding: 70px max(40px, calc((100vw - 1180px) / 2)); background: #071913; color: var(--white); }
footer strong { font: 850 27px/1.1 var(--sans); }
footer p { max-width: 620px; margin: 14px 0 0; color: #aebfb7; font-size: 15px; line-height: 1.6; }
footer nav { display: grid; align-content: start; gap: 12px; font: 750 13px/1.4 var(--sans); }
footer nav a { color: #dce6e1; }

@media (max-width: 980px) {
  .site-header { width: min(100% - 44px, 1180px); }
  .site-header nav a:not(.nav-download) { display: none; }
  .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 66px; }
  .hero-media { max-width: 760px; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .calculator-shell { grid-template-columns: 1fr; }
  .privacy-section { grid-template-columns: 1fr; gap: 52px; }
  .install-grid { grid-template-columns: 1fr; }
  .install-grid article { min-height: 0; }
  .card-kicker { margin-top: 34px; }
  .citation-section { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 700px) {
  .site-header { min-height: 72px; width: calc(100% - 32px); }
  .brand small { display: none; }
  .site-header .nav-download { padding: 10px 13px; }
  .hero, .steps-section, .citation-section { padding-left: 18px; padding-right: 18px; }
  .hero { min-height: 0; padding-top: 58px; padding-bottom: 62px; }
  h1 { font-size: 44px; }
  .hero-lede { font-size: 18px; line-height: 1.55; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .hero-media figcaption { font-size: 11px; }
  .fact-band, .calculator-section, .privacy-section, .method-section { width: calc(100% - 36px); }
  .fact-band { grid-template-columns: 1fr; padding: 15px 0; }
  .fact-band > div, .fact-band > div:first-child { padding: 20px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .fact-band > div:last-child { border-bottom: 0; }
  .calculator-section, .privacy-section, .method-section { padding: 70px 0; }
  .section-heading { margin-bottom: 30px; padding-bottom: 23px; }
  .section-heading h2, .privacy-copy h2 { font-size: 36px; }
  .section-heading > p, .privacy-copy > p:not(.eyebrow) { font-size: 17px; line-height: 1.6; }
  .calculator-shell { gap: 24px; padding: 20px; border-radius: 13px; }
  .calculator-form { grid-template-columns: 1fr; }
  .result-panel { min-height: 0; padding: 24px; }
  .result-panel > strong { font-size: 43px; }
  .steps-section { padding-top: 70px; padding-bottom: 70px; }
  .install-grid article { padding: 26px 20px; }
  .privacy-list > div { grid-template-columns: 34px minmax(0,1fr); gap: 8px; }
  .method-section { padding-top: 0; }
  .method-grid { grid-template-columns: 1fr; }
  .boundary-card { grid-template-columns: 1fr; gap: 18px; padding: 26px 22px; }
  .citation-section { padding-top: 65px; padding-bottom: 65px; }
  .citation-section h2 { font-size: 36px; }
  .citation-card { padding: 22px; }
  .citation-card > span { font-size: 16px; }
  footer { grid-template-columns: 1fr; gap: 38px; padding: 55px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
