:root {
  color-scheme: light;
  --leaf: #2f7d32;
  --leaf-dark: #1f5c27;
  --sprout: #78b94f;
  --gold: #d79b28;
  --soil: #6d4b2b;
  --sky: #d9eef6;
  --cream: #f7f2df;
  --panel: #fffdf4;
  --ink: #243126;
  --muted: #5f6f61;
  --line: #d8d3bd;
  --danger: #a83f2f;
  --shadow: 0 12px 28px rgba(65, 55, 32, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

a { color: #226f3a; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
:where(h1, h2, h3, p, li, td, th, a, button, figcaption) { overflow-wrap: anywhere; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 242, 223, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: auto;
  padding: 10px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.brand img { width: 42px; height: 42px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 750;
  font-size: .94rem;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: #e5edce;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: currentColor;
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(217, 238, 246, .95), rgba(247, 242, 223, .98)),
    radial-gradient(circle at 70% 20%, rgba(215, 155, 40, .28), transparent 36%);
}

.hero-inner,
.wrap {
  max-width: 1180px;
  margin: auto;
  padding: 42px 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, .98fr);
  gap: 34px;
  align-items: center;
}

.eyebrow {
  color: var(--leaf-dark);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

h1, h2, h3 { letter-spacing: 0; }
h1 {
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: 1.02;
  margin: 10px 0 18px;
}

h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  line-height: 1.14;
  margin: 0 0 14px;
}

h3 { font-size: 1.16rem; margin: 0 0 8px; }
p { margin: 0 0 14px; }

.lead {
  color: var(--muted);
  max-width: 68ch;
  font-size: 1.12rem;
}

.quick-answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.answer {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 244, .78);
}

.answer strong {
  display: block;
  color: var(--leaf-dark);
  margin-bottom: 4px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid #b8c7a3;
  border-radius: 8px;
  background: var(--leaf);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  text-align: center;
}

.btn:hover { background: var(--leaf-dark); color: #fff; text-decoration: none; }
.btn.secondary { background: var(--panel); color: var(--ink); }
.btn.secondary:hover { background: #f2e9c8; color: var(--ink); }
.btn.small { min-height: 34px; padding: 7px 10px; font-size: .9rem; }

.hero-art {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  box-shadow: var(--shadow);
}

.hero-art img {
  width: 100%;
  border-radius: 6px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.caption { color: var(--muted); font-size: .9rem; margin: 8px 4px 0; }

.section { padding: 38px 0; }
.band { background: #eef4d9; border-block: 1px solid var(--line); }
.content { max-width: 880px; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(66, 54, 34, .07);
}

.card.compact { padding: 14px; }
.card img { border-radius: 6px; margin-bottom: 12px; }
.card p { color: var(--muted); }

.tool-card {
  display: flex;
  flex-direction: column;
  min-height: 238px;
}

.tool-card .icon {
  width: fit-content;
  margin-bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7edcf;
  color: var(--leaf-dark);
  font-size: .78rem;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
}
.tool-card .btn { align-self: flex-start; margin-top: auto; }

.fact-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.fact {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.fact strong {
  display: block;
  color: var(--leaf-dark);
  font-size: 1.25rem;
}

.note {
  border-left: 4px solid var(--gold);
  background: #fff8e5;
  padding: 14px 16px;
  margin: 18px 0;
}

.warning { border-left-color: var(--danger); background: #fff0eb; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th { background: #e6edcf; }
tr:last-child td { border-bottom: 0; }

.mobile-table table { min-width: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7edcf;
  color: var(--leaf-dark);
  font-weight: 800;
  font-size: .82rem;
}

.breadcrumbs {
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 16px;
}

.breadcrumbs a { color: var(--muted); text-decoration: underline; }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.toc a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 750;
}

.media-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.video-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 16px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1f2e22;
  color: #fff;
  cursor: pointer;
  text-align: left;
  background-image: var(--thumb);
  background-size: cover;
  background-position: center;
}

.video-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(22, 34, 24, .08), rgba(22, 34, 24, .8) 62%, rgba(22, 34, 24, .94)),
    linear-gradient(90deg, rgba(22, 34, 24, .72), transparent 56%);
  transition: opacity .18s ease;
}

.video-card:hover::before { opacity: .88; }

.video-card span {
  position: relative;
  font-weight: 900;
  font-size: 1.04rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}

.play {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--leaf);
  font-weight: 900;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.control {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.control label { font-weight: 800; }

.control input,
.control select,
.control textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px;
  border: 1px solid #b7c2ac;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.control input[type="range"] { padding: 0; min-height: 26px; }

.result {
  background: #eef4d9;
  border: 1px solid #c8d9b5;
  border-radius: 8px;
  padding: 16px;
}

.big-number {
  color: var(--leaf-dark);
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  line-height: 1.1;
  font-weight: 950;
  margin-bottom: 8px;
}

.planner-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.planner {
  display: grid;
  grid-template-columns: repeat(10, minmax(24px, 1fr));
  gap: 4px;
}

.tile {
  aspect-ratio: 1;
  border: 1px solid #c5cba8;
  border-radius: 4px;
  background: #f9f4d8;
  cursor: pointer;
}

.tile.crop { background: #6fba58; }
.tile.sprinkler { background: #4f83cc; }
.tile.saw { background: #b7bdc1; }
.tile.covered { outline: 3px solid rgba(79, 131, 204, .45); outline-offset: -3px; }

.legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .9rem;
  margin-top: 10px;
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: -2px;
  margin-right: 4px;
}

.footer {
  margin-top: 36px;
  border-top: 1px solid #162219;
  background: #233126;
  color: #e7edcf;
}

.footer a { color: #f2d27b; }
.footer .wrap { padding: 28px 20px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 18, 13, .84);
}

.modal.open { display: flex; }

.modal-box {
  width: min(1040px, 96vw);
  overflow: hidden;
  border: 1px solid #425042;
  border-radius: 8px;
  background: #111;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: #fff;
}

.modal-close {
  border: 0;
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  color: #111;
  font-weight: 900;
  cursor: pointer;
}

.video-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

@media (max-width: 920px) {
  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .brand { min-width: 0; white-space: normal; line-height: 1.15; }
  .brand img { flex: 0 0 auto; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding-top: 8px;
  }
  .nav.nav-open .nav-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .nav-links a {
    justify-content: center;
    min-height: 44px;
    text-align: center;
  }
  .hero-grid, .grid.two, .grid.three, .grid.four, .tool-shell { grid-template-columns: 1fr; }
  .fact-list, .media-row, .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner, .wrap { padding-inline: 16px; }
  .hero-art { max-width: 680px; }
}

@media (max-width: 620px) {
  .quick-answers, .fact-list, .media-row, .video-grid, .planner-toolbar { grid-template-columns: 1fr; }
  .nav { padding: 8px 12px; }
  .brand { font-size: .98rem; }
  .brand img { width: 36px; height: 36px; }
  .nav.nav-open .nav-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
  .hero-inner, .wrap { padding-block: 28px; }
  h1 { font-size: 2.35rem; }
  .planner { grid-template-columns: repeat(6, minmax(28px, 1fr)); }
  .nav-links a { font-size: .9rem; padding: 7px 8px; }
  .card { padding: 15px; }
  .tool-card { min-height: 0; }
  .video-card { min-height: 168px; }
  .play { width: 42px; height: 42px; }
  .modal { padding: 10px; align-items: flex-start; padding-top: 72px; }
  .modal-head { align-items: flex-start; }
  .mobile-table {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .mobile-table table,
  .mobile-table thead,
  .mobile-table tbody,
  .mobile-table tr,
  .mobile-table th,
  .mobile-table td {
    display: block;
    width: 100%;
  }
  .mobile-table thead { display: none; }
  .mobile-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }
  .mobile-table td {
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
  }
  .mobile-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 850;
  }
  .mobile-table tr:last-child td { border-bottom: 1px solid var(--line); }
  .mobile-table tr td:last-child { border-bottom: 0; }
}

@media (max-width: 420px) {
  .nav.nav-open .nav-links { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
  .lead { font-size: 1rem; }
  .mobile-table td { grid-template-columns: 1fr; gap: 3px; }
}
