:root {
  --ink: #1f2a25;
  --muted: #5f6d66;
  --line: #d6ddd9;
  --line-strong: #b7c5be;
  --paper: #ffffff;
  --surface: #f5f7f6;
  --surface-2: #eef4f1;
  --brand: #246a4b;
  --brand-dark: #174a34;
  --brand-soft: #e2f0e8;
  --accent: #c47a1b;
  --warning: #825b00;
  --warning-bg: #fff7dc;
  --danger: #9c2d2d;
  --danger-bg: #fff0f0;
  --shadow: 0 8px 24px rgba(29, 54, 43, 0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 1180px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(36, 106, 75, 0.32); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  padding: .65rem 1rem;
  color: #fff;
  background: var(--brand-dark);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.site-strip {
  color: #dbe9e2;
  background: var(--brand-dark);
  font-size: .78rem;
}
.site-strip__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: .38rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.site-strip a { color: #fff; }

.site-header {
  color: #fff;
  background: var(--brand);
  border-bottom: 4px solid var(--accent);
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: .9rem 1rem;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: #fff; }
.brand__mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 4px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 9px;
}
.brand__mark img { width: 100%; height: 100%; display: block; }
.brand__text { display: grid; line-height: 1.1; }
.brand__name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.025em; }
.brand__tagline { margin-top: .18rem; color: #dcebe4; font-size: .72rem; font-weight: 500; }

.header-search { position: relative; }
.header-search form { display: flex; }
.header-search input {
  width: 100%;
  min-height: 42px;
  padding: .65rem 3.2rem .65rem .9rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: var(--radius-sm);
}
.header-search button {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 42px;
  height: 38px;
  color: var(--brand-dark);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
}
.header-search svg { width: 20px; height: 20px; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: var(--radius-sm);
}
.primary-nav { background: rgba(0,0,0,.08); }
.primary-nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: .2rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.primary-nav a {
  padding: .65rem .8rem;
  color: #fff;
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { background: rgba(255,255,255,.08); border-bottom-color: #fff; }

.site-main { min-height: 60vh; }
.container { width: min(100% - 2rem, var(--max-width)); margin-inline: auto; }
.breadcrumbs {
  margin: 0;
  padding: .8rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  color: var(--muted);
  font-size: .82rem;
  list-style: none;
}
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .35rem; color: #91a098; }
.breadcrumbs a { color: var(--muted); }

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.35rem;
  align-items: start;
  padding-bottom: 2.5rem;
}
.content-column { min-width: 0; }
.sidebar { display: grid; gap: 1rem; position: sticky; top: 1rem; }

.page-card,
.calculator-card-shell,
.content-card,
.directory-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-hero {
  margin-bottom: 1rem;
  padding: 1.4rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.page-hero h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.15; letter-spacing: -.035em; }
.page-hero p { max-width: 800px; margin: .7rem 0 0; color: var(--muted); font-size: 1.03rem; }
.page-meta { margin-top: .75rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--muted); font-size: .78rem; }
.page-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.page-meta svg { width: 15px; height: 15px; }

.home-hero {
  background: linear-gradient(135deg, #174a34, #2d7a58);
  color: #fff;
  border-radius: 0 0 18px 18px;
}
.home-hero__inner {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: clamp(2.1rem, 6vw, 4.3rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .65fr);
  gap: 2.5rem;
  align-items: center;
}
.home-hero h1 { margin: 0; max-width: 760px; font-size: clamp(2rem, 5vw, 3.65rem); line-height: 1.02; letter-spacing: -.055em; }
.home-hero p { max-width: 700px; margin: 1rem 0 1.4rem; color: #e1eee8; font-size: 1.1rem; }
.hero-search { display: flex; max-width: 680px; padding: .3rem; background: #fff; border-radius: 9px; box-shadow: 0 10px 32px rgba(0,0,0,.18); }
.hero-search input { min-width: 0; flex: 1; padding: .8rem 1rem; border: 0; border-radius: 6px; }
.hero-search button { padding: .75rem 1.05rem; color: #fff; background: var(--accent); border: 0; border-radius: 6px; font-weight: 750; }
.hero-proof { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: #dcebe4; font-size: .82rem; }
.hero-visual {
  min-height: 250px;
  padding: 1.2rem;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
}
.hero-visual svg { width: 100%; max-height: 250px; }

.section-block { padding: 2rem 0; }
.section-heading { margin-bottom: 1rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.03em; }
.section-heading p { max-width: 690px; margin: .35rem 0 0; color: var(--muted); }

.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.category-card {
  padding: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.category-card:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--ink); }
.category-card__icon { width: 42px; height: 42px; margin-bottom: .65rem; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 8px; }
.category-card__icon svg { width: 25px; height: 25px; }
.category-card h3 { margin: 0; font-size: 1rem; }
.category-card p { margin: .4rem 0 0; color: var(--muted); font-size: .84rem; }

.calculator-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.calculator-card {
  min-width: 0;
  padding: 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .8rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(29,54,43,.05);
  transition: border-color .15s ease, transform .15s ease;
}
.calculator-card:hover { color: var(--ink); border-color: var(--brand); transform: translateY(-1px); }
.calculator-card__icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 8px; }
.calculator-card__icon svg { width: 24px; height: 24px; }
.calculator-card h3 { margin: 0; font-size: 1rem; line-height: 1.25; }
.calculator-card p { margin: .3rem 0 0; color: var(--muted); font-size: .82rem; }
.calculator-card__arrow { margin-top: .35rem; color: var(--brand); font-size: .76rem; font-weight: 750; }
.search-empty { padding: 2rem; text-align: center; color: var(--muted); background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.trust-card { padding: 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.trust-card h3 { margin: 0 0 .4rem; font-size: 1rem; }
.trust-card p { margin: 0; color: var(--muted); font-size: .88rem; }

.ad-wrap { text-align: center; }
.ad-label { margin: 0 0 .25rem; color: #7c8882; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.ad-placeholder,
.adsbygoogle {
  width: 100%;
  min-height: 100px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #7b8881;
  background: #f4f5f4;
  border: 1px dashed #c8cfcb;
  border-radius: var(--radius-sm);
  font-size: .75rem;
}
.ad-placeholder--leaderboard { min-height: 90px; }
.ad-placeholder--rectangle { min-height: 250px; }
.ad-placeholder--inline { min-height: 160px; }
.top-ad { margin: .8rem auto 1rem; }
.top-ad:empty { display: none; }

.calculator-card-shell { overflow: hidden; }
.calculator-shell__bar {
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #fff;
  background: var(--brand-dark);
}
.calculator-shell__bar h2 { margin: 0; font-size: 1rem; }
.calculator-shell__bar span { color: #dfece6; font-size: .73rem; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; align-items: start; }
.calculator-form { min-width: 0; padding: 1rem; }
.calculator-diagram { padding: 1rem; background: var(--surface-2); border-left: 1px solid var(--line); }
.calculator-diagram h3 { margin: 0 0 .5rem; font-size: .82rem; }
.calculator-diagram p { margin: .5rem 0 0; color: var(--muted); font-size: .72rem; }
.calculator-diagram svg { width: 100%; height: auto; display: block; }

.form-section { margin: 0 0 1rem; padding: 0; border: 0; }
.form-section:last-of-type { margin-bottom: .6rem; }
.form-section legend { width: 100%; margin: 0 0 .15rem; padding: 0 0 .4rem; font-weight: 800; font-size: .9rem; border-bottom: 1px solid var(--line); }
.form-section__description { margin: .25rem 0 .55rem; color: var(--muted); font-size: .76rem; }
.input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem .85rem; padding-top: .55rem; }
.field { min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field__label { margin-bottom: .25rem; display: block; font-size: .78rem; font-weight: 700; }
.field-control { display: flex; min-width: 0; }
.field-control input,
.field-control select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: .54rem .6rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.field-control input:focus,
.field-control select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36,106,75,.12); outline: 0; }
.field-control--adorned input { border-radius: 0; }
.field-control--adorned input:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.field-control--adorned input:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.field-adornment {
  min-height: 40px;
  padding: .54rem .55rem;
  display: inline-flex;
  align-items: center;
  color: #56635d;
  background: #eef1ef;
  border: 1px solid var(--line-strong);
  white-space: nowrap;
  font-size: .74rem;
}
.field-adornment:first-child { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.field-adornment:last-child { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.field-help { margin: .25rem 0 0; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.checkbox-field {
  min-height: 40px;
  padding: .52rem .6rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.checkbox-field input { width: 18px; height: 18px; accent-color: var(--brand); }
.checkbox-field label { margin: 0; font-size: .78rem; }

.pricing-note { margin: .5rem 0 0; padding: .55rem .65rem; color: #4d5b54; background: #f3f7f5; border-left: 3px solid var(--brand); font-size: .72rem; }
.form-actions { margin-top: .8rem; display: flex; flex-wrap: wrap; gap: .55rem; }
.btn {
  min-height: 40px;
  padding: .56rem .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 750;
  text-decoration: none;
}
.btn:hover { color: var(--ink); background: #f2f5f3; }
.btn--primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.btn--primary:hover { color: #fff; background: var(--brand-dark); }
.btn--quiet { background: transparent; }
.btn svg { width: 16px; height: 16px; }
.save-status { min-height: 1.25rem; margin: .5rem 0 0; color: var(--brand-dark); font-size: .72rem; }

.results-actions {
  margin: 1rem 0;
  padding: .65rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.calculator-results {
  margin-top: 1rem;
  padding: 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.calculator-results:focus { outline: none; }
.result-heading-row { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.eyebrow { margin: 0 0 .2rem; color: var(--brand); font-size: .7rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.result-heading-row h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.025em; }
.result-timestamp { margin: .15rem 0 0; color: var(--muted); font-size: .68rem; text-align: right; }
.summary-grid { margin-top: 1rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.summary-card { min-width: 0; padding: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.summary-card span { display: block; color: var(--muted); font-size: .68rem; font-weight: 700; }
.summary-card strong { margin-top: .15rem; display: block; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.summary-card small { margin-top: .25rem; display: block; color: var(--muted); font-size: .64rem; line-height: 1.3; }
.summary-card--emphasis { color: #fff; background: var(--brand); border-color: var(--brand); }
.summary-card--emphasis span, .summary-card--emphasis small { color: #e4efe9; }

.result-alert { margin-top: .8rem; padding: .7rem .85rem; color: var(--warning); background: var(--warning-bg); border: 1px solid #ead89e; border-radius: var(--radius-sm); font-size: .78rem; }
.result-alert strong { display: block; }
.result-alert ul { margin: .35rem 0 0 1.1rem; padding: 0; }
.result-alert--error { color: var(--danger); background: var(--danger-bg); border-color: #e9bbbb; }

.result-section { margin-top: 1.15rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.result-section h3 { margin: 0 0 .35rem; font-size: 1rem; }
.section-intro { margin: 0 0 .65rem; color: var(--muted); font-size: .72rem; }
.cost-chart { display: grid; gap: .6rem; }
.cost-row__label { margin-bottom: .2rem; display: flex; justify-content: space-between; gap: 1rem; font-size: .75rem; }
.cost-row__label strong { font-size: .78rem; }
.cost-bar { height: 9px; overflow: hidden; background: #e7ece9; border-radius: 99px; }
.cost-bar span { height: 100%; display: block; background: var(--brand); border-radius: inherit; }
.cost-breakdown { margin-top: .7rem; font-size: .73rem; }
.cost-breakdown summary { color: var(--brand); font-weight: 750; cursor: pointer; }
.cost-breakdown dl { max-width: 430px; margin: .45rem 0 0; }
.cost-breakdown dl div { padding: .25rem 0; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dotted var(--line); }
.cost-breakdown dt, .cost-breakdown dd { margin: 0; }

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .74rem; }
.data-table th, .data-table td { padding: .55rem .6rem; text-align: left; vertical-align: top; border: 1px solid var(--line); }
.data-table thead th { color: #fff; background: var(--brand-dark); font-weight: 750; }
.data-table tbody th { background: #f6f8f7; font-weight: 750; }
.data-table tbody tr:nth-child(even) td { background: #fafbfa; }
.shopping-table th:first-child { width: 25%; }
.shopping-table td:nth-child(2) { width: 24%; font-weight: 750; }

.project-steps { margin: .7rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .55rem; list-style: none; counter-reset: steps; }
.project-steps li { position: relative; padding: .7rem .65rem .65rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); counter-increment: steps; }
.project-steps li::before { content: counter(steps); width: 22px; height: 22px; margin-bottom: .4rem; display: grid; place-items: center; color: #fff; background: var(--brand); border-radius: 50%; font-size: .68rem; font-weight: 800; }
.project-steps strong { display: block; font-size: .73rem; }
.project-steps span { margin-top: .2rem; display: block; color: var(--muted); font-size: .65rem; line-height: 1.35; }
.result-disclaimer { margin: 1rem 0 0; padding: .65rem; color: var(--muted); background: #f6f7f6; border-radius: var(--radius-sm); font-size: .65rem; }

.content-card { margin-top: 1rem; padding: 1.2rem; }
.content-card h2 { margin: 0 0 .65rem; font-size: 1.25rem; letter-spacing: -.02em; }
.content-card h3 { margin: 1.1rem 0 .4rem; font-size: 1rem; }
.content-card p { color: #445149; }
.content-card p:last-child { margin-bottom: 0; }
.formula-box { margin: .8rem 0; padding: .9rem; background: #f1f6f3; border-left: 4px solid var(--brand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.formula-box code { color: var(--brand-dark); font-family: var(--font-mono); font-size: .85rem; white-space: normal; }
.example-box { margin: .8rem 0; padding: .9rem; background: #fff8e8; border: 1px solid #ead9ac; border-radius: var(--radius-sm); }
.example-box strong { color: #725016; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: .7rem 0; font-weight: 750; cursor: pointer; }
.faq-list p { margin: 0 0 .8rem; color: var(--muted); font-size: .86rem; }
.related-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.related-list a { padding: .65rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; font-size: .8rem; font-weight: 700; }
.related-list a:hover { border-color: var(--brand); }

.sidebar-card { padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.sidebar-card h2, .sidebar-card h3 { margin: 0 0 .6rem; font-size: .92rem; }
.sidebar-card p { margin: 0; color: var(--muted); font-size: .76rem; }
.sidebar-links { margin: .3rem 0 0; padding: 0; list-style: none; }
.sidebar-links li + li { border-top: 1px solid var(--line); }
.sidebar-links a { padding: .5rem 0; display: flex; justify-content: space-between; gap: .5rem; color: var(--ink); text-decoration: none; font-size: .76rem; }
.sidebar-links a:hover { color: var(--brand); }

.directory-panel { padding: 1rem; }
.directory-search { margin-bottom: 1rem; }
.directory-search input { width: 100%; min-height: 44px; padding: .7rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.directory-category + .directory-category { margin-top: 1.5rem; }
.directory-category h2 { margin: 0 0 .65rem; padding-bottom: .45rem; font-size: 1.1rem; border-bottom: 2px solid var(--brand); }

.prose-page { padding-bottom: 2.5rem; }
.prose-card { padding: clamp(1rem, 4vw, 2rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.prose-card h1 { margin-top: 0; }
.prose-card h2 { margin-top: 1.6rem; font-size: 1.25rem; }
.prose-card h3 { margin-top: 1.2rem; font-size: 1rem; }
.prose-card p, .prose-card li { color: #445149; }
.prose-card table { width: 100%; border-collapse: collapse; }
.prose-card th, .prose-card td { padding: .55rem; text-align: left; border: 1px solid var(--line); }
.callout { padding: .8rem; background: var(--brand-soft); border-left: 4px solid var(--brand); }

.site-footer { color: #dce7e1; background: #1f3028; }
.footer__inner { max-width: var(--max-width); margin: 0 auto; padding: 2rem 1rem 1.2rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 1.5rem; }
.footer-grid h2, .footer-grid h3 { margin: 0 0 .6rem; color: #fff; font-size: .9rem; }
.footer-grid p { max-width: 380px; margin: 0; color: #bfcfc7; font-size: .76rem; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid li + li { margin-top: .35rem; }
.footer-grid a { color: #dce7e1; font-size: .76rem; text-decoration: none; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 1.5rem; padding-top: 1rem; display: flex; justify-content: space-between; gap: 1rem; color: #9fb1a8; border-top: 1px solid rgba(255,255,255,.12); font-size: .68rem; }

@media (max-width: 1000px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 250px; }
  .calculator-layout { grid-template-columns: minmax(0, 1fr) 200px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calculator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .site-strip { display: none; }
  .site-header__inner { grid-template-columns: 1fr auto; gap: .7rem; }
  .brand__tagline { display: none; }
  .header-search { grid-column: 1 / -1; grid-row: 2; }
  .nav-toggle { display: inline-flex; }
  .primary-nav { display: none; }
  .primary-nav[data-open] { display: block; }
  .primary-nav__inner { padding: .5rem 1rem; display: grid; overflow: visible; }
  .primary-nav a { border: 0; border-radius: var(--radius-sm); }
  .home-hero__inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .page-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calculator-layout { grid-template-columns: 1fr; }
  .calculator-diagram { border-top: 1px solid var(--line); border-left: 0; }
  .calculator-diagram svg { max-height: 230px; }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .container { width: min(100% - 1rem, var(--max-width)); }
  .site-header__inner { padding-inline: .65rem; }
  .brand__mark { width: 36px; height: 36px; flex-basis: 36px; }
  .brand__name { font-size: 1.08rem; }
  .home-hero__inner { width: min(100% - 1rem, var(--max-width)); padding: 2rem 0; }
  .hero-search { display: grid; }
  .hero-search button { margin-top: .2rem; }
  .page-hero { padding: 1rem; }
  .input-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .project-steps { grid-template-columns: 1fr; }
  .calculator-grid, .category-grid, .related-list { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .result-heading-row { display: block; }
  .result-timestamp { margin-top: .4rem; text-align: left; }
  .results-actions .btn { flex: 1 1 42%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-top: .25rem; }
}

@media print {
  :root { --shadow: none; }
  body { color: #000; background: #fff; font-size: 11pt; }
  .site-strip, .site-header, .breadcrumbs, .top-ad, .sidebar, .calculator-card-shell, .results-actions, .ad-wrap, .site-footer, .related-list, .save-status { display: none !important; }
  .container, .page-grid { width: 100%; display: block; }
  .page-hero { padding: 0 0 .5rem; border: 0; box-shadow: none; }
  .page-hero p, .page-meta { display: none; }
  .calculator-results { margin: 0; padding: 0; border: 0; box-shadow: none; }
  .summary-grid { grid-template-columns: repeat(4, 1fr); }
  .summary-card--emphasis { color: #000; background: #fff; border: 2px solid #000; }
  .summary-card--emphasis span, .summary-card--emphasis small { color: #000; }
  .cost-bar { border: 1px solid #888; }
  .cost-bar span { background: #555; }
  .data-table thead th { color: #000; background: #eee; }
  .project-steps { grid-template-columns: repeat(5, 1fr); }
  .content-card { box-shadow: none; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
