:root {
  --green: #2e6b4f;
  --green-dark: #23543e;
  --ink: #1d2a30;
  --muted: #5b6b72;
  --bg: #f9f9f6;
  --card: #ffffff;
  --line: #e3e5df;
  --warn-bg: #fff7e8;
  --warn-border: #e8b84d;
  --warn-ink: #7a5a12;
  --alert-bg: #fdeeee;
  --alert-border: #d9706a;
  --alert-ink: #8c2f2a;
  --ok-bg: #edf6f0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }
main { padding-bottom: 3rem; }
h1 { font-size: 2rem; line-height: 1.25; }
h2 { font-size: 1.45rem; margin-top: 2.2rem; }
h3 { font-size: 1.1rem; margin-bottom: .35rem; }
a { color: var(--green-dark); }
p.lede { font-size: 1.13rem; color: var(--muted); max-width: 46em; }
.fine { font-size: .85rem; color: var(--muted); }
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* Header / footer */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: .8rem; padding-bottom: .8rem; flex-wrap: wrap; gap: .5rem; }
.brand { font-weight: 700; font-size: 1.05rem; text-decoration: none; color: var(--green-dark); }
.site-header nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; color: var(--ink); font-size: .95rem; }
.site-header nav a.active { color: var(--green-dark); font-weight: 600; }
.site-footer { background: var(--card); border-top: 1px solid var(--line); padding: 1.5rem 0 2rem; margin-top: 3rem; }

/* Buttons */
.btn { display: inline-block; padding: .7rem 1.3rem; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 1rem; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--green-dark); border-color: var(--green); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* Hero */
.hero { background: linear-gradient(180deg, #eef4ee 0%, var(--bg) 100%); padding: 3rem 0 2.5rem; }
.hero h1 { margin-top: 0; }

/* Landing sections */
.steps3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.2rem; }
.step .num { display: inline-flex; width: 1.9rem; height: 1.9rem; align-items: center; justify-content: center; background: var(--green); color: #fff; border-radius: 50%; font-weight: 700; }
.muni-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.muni-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink); }
.muni-card:hover { border-color: var(--green); }
.muni-card h3 { margin-top: 0; color: var(--green-dark); }
.muni-card .cta-text { color: var(--green-dark); font-weight: 600; font-size: .92rem; }
.trust-list li, .two-col p { max-width: 46em; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }

/* Guide pages */
.breadcrumb { font-size: .88rem; color: var(--muted); margin-top: 1.4rem; }
.quick-answer { background: var(--ok-bg); border: 1px solid var(--green); border-radius: 10px; padding: 1rem 1.3rem; margin: 1.4rem 0; }
.quick-answer h2 { margin-top: 0; font-size: 1.15rem; }
.rule { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.2rem; margin: .8rem 0; }
.rule h3 { margin-top: 0; }
.rule p { margin: .3rem 0; }
.cite { font-size: .85rem; color: var(--muted); }
.badge { display: inline-block; font-size: .75rem; padding: .1rem .5rem; border-radius: 99px; font-weight: 600; vertical-align: middle; }
.badge-warn { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-ink); }
.badge-live { background: var(--ok-bg); border: 1px solid var(--green); color: var(--green-dark); }
.project-live { border-color: var(--green); }
.project-soon { opacity: .85; }
.apply-steps li { margin: .45rem 0; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.2rem; }
.faq-item { margin: 1rem 0; }
.faq-item h3 { margin-bottom: .25rem; }
.cta-panel { background: var(--green); color: #fff; border-radius: 12px; padding: 1.4rem 1.5rem; margin: 2.2rem 0; }
.cta-panel h2 { margin-top: 0; color: #fff; }
.cta-panel .btn-primary { background: #fff; color: var(--green-dark); }
.sources li { font-size: .92rem; }

/* Planner form */
.plan-form { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem 1.5rem 1.2rem; margin-top: 1.4rem; }
.plan-form fieldset { border: none; padding: 0; margin: 0; }
.plan-form legend { font-size: 1.2rem; font-weight: 700; margin-bottom: .8rem; }
.stepnum { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.plan-form label { display: block; margin: .9rem 0 .25rem; font-weight: 600; font-size: .95rem; }
.plan-form label.check { font-weight: 400; display: flex; gap: .55rem; align-items: baseline; margin: .55rem 0; }
.plan-form select, .plan-form input[type="number"], .plan-form textarea {
  width: 100%; max-width: 26rem; padding: .55rem .7rem; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  font-family: inherit;
}
.plan-nav { display: flex; gap: .8rem; margin-top: 1.5rem; }
.notice { border-radius: 8px; padding: .7rem 1rem; font-size: .95rem; margin-top: .7rem; }
.notice.warn { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-ink); }

/* Report */
.report { margin-top: 2rem; }
.report section { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.5rem; margin: 1.1rem 0; }
.report h2 { margin-top: 0; padding-bottom: .4rem; border-bottom: 2px solid var(--green); font-size: 1.3rem; }
.report table { border-collapse: collapse; width: 100%; margin: .6rem 0; font-size: .95rem; }
.report th, .report td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.report th { background: var(--ok-bg); }
.report td.num, .report th.num { text-align: right; white-space: nowrap; }
.flag { border-radius: 8px; padding: .7rem 1rem; margin: .7rem 0; }
.flag.alert { background: var(--alert-bg); border: 1px solid var(--alert-border); color: var(--alert-ink); }
.flag.warn { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-ink); }
.report .checklist li { margin: .5rem 0; }
.report-toolbar { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1rem 0; }
.scope-box { background: var(--bg); border: 1px dashed var(--muted); border-radius: 8px; padding: 1rem 1.2rem; white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }

@media (max-width: 640px) {
  h1 { font-size: 1.55rem; }
  .hero { padding-top: 2rem; }
}

/* Print: the report becomes the packet */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .plan-form, .report-toolbar, .no-print { display: none !important; }
  .report section { border: none; padding: 0 0 1rem; break-inside: avoid-page; }
  .report h2 { border-bottom: 1px solid #000; }
  a { color: inherit; text-decoration: none; }
  .cite a::after, .sources a::after { content: " (" attr(href) ")"; font-size: .8em; word-break: break-all; }
}
