:root {
  --ink: #1f3028;
  --muted: #68746c;
  --line: #d8ded8;
  --soft: #f4f5f0;
  --surface: #fffefa;
  --green: #286b4e;
  --green-dark: #194d39;
  --green-soft: #e6efe8;
  --amber-soft: #fff4d9;
  --amber-ink: #795d18;
  --shadow: 0 8px 28px rgba(31, 48, 40, 0.07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--green-dark); }

.site-header.page-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 12px;
}

.brand {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.affiliate-disclosure {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.site-nav, .footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.site-nav a, .footer-nav a {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.site-nav a { white-space: nowrap; }

.site-nav a:hover, .site-nav a:focus-visible, .footer-nav a:hover, .footer-nav a:focus-visible { color: var(--green-dark); border-bottom-color: var(--green); }

button, input, select { font: inherit; }
button { cursor: pointer; }

.page-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.tool-card, .content-section {
  background: var(--surface);
  border: 1px solid rgba(217, 230, 223, 0.95);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.tool-card { padding: clamp(20px, 4vw, 42px); }

.tool-heading, .section-bar, .results-header, .cost-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.tool-heading { padding-bottom: 20px; border-bottom: 1px solid var(--line); }

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(1.9rem, 3.5vw, 2.8rem); line-height: 1.08; letter-spacing: -0.04em; }
h2 { margin-bottom: 5px; font-size: 1.18rem; line-height: 1.2; }
h3 { margin-bottom: 6px; font-size: 0.96rem; }
.heading-copy, .section-bar p, .cost-panel p, .content-section > p { color: var(--muted); }
.heading-copy { max-width: 520px; margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.step-strip { display: flex; flex-wrap: wrap; gap: 12px 26px; margin: 18px 0 4px; padding: 13px 0 0; color: var(--muted); border-top: 1px solid var(--line); font-size: .82rem; font-weight: 700; }
.step-strip span { display: inline-flex; align-items: center; gap: 7px; }
.step-strip b { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid #a8b7ad; border-radius: 50%; color: var(--green-dark); font-size: .72rem; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.trust-strip span::before { content: "✓"; color: var(--green); margin-right: 5px; }
.project-journey { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:0 0 22px; border:1px solid #cfd6cc; background:#f7f7f0; }
.project-journey a { position:relative; display:grid; grid-template-columns:31px minmax(0,1fr); grid-template-rows:auto auto; column-gap:10px; padding:13px 16px; color:var(--ink); text-decoration:none; border-right:1px solid #d7ddd3; }
.project-journey a:last-child { border-right:0; }
.project-journey a:hover, .project-journey a:focus-visible { background:#edf2e9; outline-offset:-3px; }
.project-journey a[aria-current="step"] { background:#203c32; color:#fffefa; }
.project-journey a > span { grid-row:1 / span 2; align-self:center; display:grid; place-items:center; width:27px; height:27px; border:1px solid currentColor; border-radius:50%; font-size:10px; letter-spacing:.04em; }
.project-journey strong { align-self:end; font-size:13px; line-height:1.3; }
.project-journey small { align-self:start; color:var(--muted); font-size:10px; line-height:1.45; }
.project-journey a[aria-current="step"] small { color:#d6e1d7; }
.workflow-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 27px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.workflow-links a { display: flex; flex-direction: column; gap: 4px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcf8; color: var(--ink); text-decoration: none; }
.workflow-links a:hover, .workflow-links a:focus-visible { border-color: var(--green); background: var(--green-soft); }
.workflow-links strong { font-size: 0.94rem; }
.workflow-links span { color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.meta-note { font-size: 0.88rem !important; color: var(--muted); }
.related-guide { padding: 12px 15px; border-left: 3px solid var(--green); background: #f5faf7; }


.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: var(--soft);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #25a263; }

.form-grid { display: grid; gap: 14px; }
.top-controls { grid-template-columns: repeat(3, 1fr); margin-top: 30px; }
.planning-controls { grid-template-columns: repeat(2, 1fr); margin-top: 14px; }

.field { display: grid; gap: 7px; min-width: 0; color: var(--ink); font-size: 0.82rem; font-weight: 750; }
.field small { color: var(--muted); font-size: 0.72rem; font-weight: 500; line-height: 1.35; }
.muted { color: var(--muted); font-weight: 500; }

input, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbdcd3;
  border-radius: 11px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus, select:focus, button:focus-visible, summary:focus-visible {
  border-color: var(--green);
  outline: 3px solid rgba(22, 115, 75, 0.16);
  outline-offset: 1px;
}

.input-with-unit { display: flex; align-items: center; min-width: 0; border: 1px solid #cbdcd3; border-radius: 11px; background: #fff; overflow: hidden; }
.input-with-unit input { min-width: 0; border: 0; border-radius: 0; }
.input-with-unit > span { padding-right: 12px; color: var(--muted); font-size: 0.78rem; font-weight: 650; white-space: nowrap; }
.currency-symbol { padding: 0 0 0 12px !important; }

.section-bar { align-items: center; margin-top: 34px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.section-bar p, .cost-panel p { margin: 0; font-size: 0.83rem; }

.button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 9px 14px;
  font-weight: 800;
  transition: transform 0.15s ease, background 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { color: var(--green-dark); background: var(--green-soft); }
.button-danger { color: #8c3939; background: #fff0f0; }
.button-small { min-height: 34px; padding: 6px 10px; font-size: 0.76rem; }

.areas-list { display: grid; gap: 12px; padding-top: 16px; }
.area-row { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcf8; }
.area-row-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.area-number { font-size: 0.84rem; font-weight: 850; }
.area-row-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.area-row .field span { font-size: 0.76rem; }
.depth-note { display: flex; align-items: center; gap: 6px; min-height: 44px; color: var(--amber-ink); font-size: 0.72rem; font-weight: 700; }
.depth-note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d9a72d; }

.cost-panel { align-items: center; margin-top: 25px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfb; }
.cost-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: min(100%, 440px); }

.results-header { align-items: center; margin-top: 32px; }
.results-header h2 { margin-bottom: 0; font-size: 1.35rem; }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 13px; }
.result-card { min-height: 115px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.result-card.emphasis { border-color: #a9d8bd; background: var(--green-soft); }
.result-label { margin-bottom: 10px; color: var(--muted); font-size: 0.76rem; font-weight: 750; }
.result-value { font-size: clamp(1.32rem, 3vw, 1.8rem); font-weight: 850; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.result-subtext { margin-top: 5px; color: var(--muted); font-size: 0.72rem; }
.copy-status { min-height: 20px; margin: 10px 0 0; color: var(--green); font-size: 0.8rem; font-weight: 700; text-align: right; }

.content-section { margin-top: 22px; padding: clamp(20px, 4vw, 36px); box-shadow: none; }
.example-section { background: #f8fcf9; }
.content-section > p:not(.eyebrow) { max-width: 840px; }
.content-section > ul, .content-section > ol { max-width:840px; padding-left:22px; color:var(--muted); line-height:1.7; }
.content-section > ul li + li, .content-section > ol li + li { margin-top:8px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.info-grid article { padding: 16px; border-radius: 14px; background: var(--soft); }
.info-grid p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.faq-section details { border-top: 1px solid var(--line); }
.faq-section details:last-of-type { border-bottom: 1px solid var(--line); }
.faq-section summary { padding: 15px 0; cursor: pointer; font-weight: 800; }
.faq-section details p { max-width: 800px; margin: -3px 0 15px; color: var(--muted); font-size: 0.88rem; }

.simple-page { padding-top: 8px; }
.prose { max-width: 820px; }
.prose h1 { margin-bottom: 12px; }
.prose h2 { margin-top: 30px; margin-bottom: 10px; }
.prose p, .prose li { font-size: 1rem; }
.prose p, .prose ul { color: var(--muted); }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose .table-wrap { width:100%; overflow-x:auto; margin:20px 0; border:1px solid var(--line); border-radius:10px; }
.prose table { width:100%; min-width:760px; border-collapse:collapse; font-size:.9rem; }
.prose th, .prose td { padding:13px 14px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; line-height:1.55; }
.prose th { color:var(--green-dark); background:var(--green-soft); font-size:.78rem; }
.prose tbody tr:last-child td { border-bottom:0; }
.prose .contact-address {
  display: inline-block;
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
  margin: 8px 0 4px;
  padding: 12px 15px;
  border: 1px solid #b9dcc7;
  border-radius: 12px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: clamp(.9rem, 4vw, 1.08rem);
  font-weight: 850;
  text-decoration: none;
}
.site-footer.page-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 34px;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 820px) {
  .top-controls, .results-grid { grid-template-columns: repeat(2, 1fr); }
  .planning-controls { grid-template-columns: 1fr 1fr; }
  .area-row-grid { grid-template-columns: repeat(2, 1fr); }
  .depth-note { grid-column: span 2; min-height: 30px; }
  .area-row-grid > .button { justify-self: start; }
  .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header.page-shell {
    position: sticky;
    top: 0;
    z-index: 10;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 10px 8px 12px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .site-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 4px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }
  .site-nav a {
    min-height: 42px;
    padding: 8px 3px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
  }
  .site-nav a[aria-current="page"] {
    background: transparent;
    color: var(--green-dark);
    border-bottom-color: var(--green-dark);
  }
  .site-nav a:hover, .site-nav a:focus-visible { color: var(--green-dark); background: transparent; border-bottom-color: var(--green); }
  .site-nav a[aria-current="page"]:hover, .site-nav a[aria-current="page"]:focus-visible { color: var(--green-dark); background: transparent; }
  .footer-nav { gap: 8px; }
  .footer-nav a { min-height: 42px; padding: 8px 10px; }
  .site-footer.page-shell { align-items: flex-start; flex-direction: column; }
  .page-shell { width: min(100% - 16px, 1120px); padding-top: 8px; }
  .tool-card, .content-section { border-radius: 18px; }
  .tool-card { padding: 17px; }
  .tool-heading, .section-bar, .results-header, .cost-panel { align-items: stretch; flex-direction: column; }
  .result-actions { justify-content: stretch; }
  .result-actions .button { flex: 1 1 180px; }
  .status-pill { display: none; }
  .top-controls, .planning-controls, .results-grid, .cost-fields, .workflow-links { grid-template-columns: 1fr; }
  .project-journey { grid-template-columns:1fr; margin-bottom:15px; }
  .project-journey a { min-height:54px; border-right:0; border-bottom:1px solid #d7ddd3; }
  .project-journey a:last-child { border-bottom:0; }
  .area-row { padding: 12px; }
  .area-row-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .area-row-grid .field:first-child { grid-column: span 2; }
  .depth-note { grid-column: span 2; }
  .area-row-grid > .button { grid-column: span 2; width: 100%; }
  .results-header .button { width: 100%; }
  .copy-status { text-align: left; }
  h1 { font-size: 2rem; }
}


/* Native hidden controls and solid mobile header. */
[hidden] { display: none !important; }
:root { --paper: #f1f0ea; }



/* Keep the five primary tool categories on one row at standard mobile widths. */
@media (max-width: 560px) {
  .site-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .site-nav a:nth-child(-n+3) { grid-column: span 2; }
  .site-nav a:nth-child(4) { grid-column: 2 / span 2; }
  .site-nav a:nth-child(5) { grid-column: 4 / span 2; }
}

@media (min-width: 360px) and (max-width: 560px) {
  .site-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
  .site-nav a { padding-left: 0; padding-right: 0; font-size: 0.72rem; letter-spacing: -0.02em; }
  .site-nav a:nth-child(-n+5) { grid-column: auto; }
}
