/* Toolixa design system, v2.
   Grounded in the material the site is actually about: mulch, gravel, sod,
   stone. Warm paper tones instead of clinical gray-white, a serif display
   face for headings (the kind a nursery catalogue or stoneyard brand would
   use, not a SaaS dashboard), brand green and terracotta orange used as real
   structural color rather than a single accent line, and hierarchy built
   from type weight, color and spacing rather than a border around every box. */

:root {
  /* Brand */
  --green: #0e5c38;
  --green-dark: #0a4429;
  --green-bright: #15794c;
  --green-tint: #e8f1ea;
  --green-line: #bcd8c7;
  --orange: #c4651c;
  --orange-dark: #9c4e14;
  --orange-tint: #fbede0;
  --orange-line: #eccaa4;
  --stone: #6b5842;
  --stone-tint: #efe8dc;
  --stone-line: #ddccb1;

  /* Warm neutrals: paper and soil tones instead of cool gray */
  --cream: #faf6ee;
  --paper: #fffdf9;
  --sand: #f2e9d8;
  --sand-deep: #e7d8ba;
  --ink: #241d15;
  --muted: #6a6053;
  --faint: #9c9184;
  --border: #e5dac2;
  --border-soft: #eee5d2;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 18px;
  --maxw: 1180px;

  --shadow-sm: 0 1px 2px rgba(40, 28, 10, .08);
  --shadow: 0 6px 18px rgba(43, 30, 10, .10), 0 1px 3px rgba(43, 30, 10, .07);
  --shadow-lg: 0 16px 40px rgba(43, 30, 10, .16);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font: 'Public Sans', Arial, Helvetica, "Segoe UI", Roboto, sans-serif;

  --texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }

a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--green-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.14;
  margin: 0 0 .45em;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 1.5rem + 2.1vw, 2.9rem); color: var(--green-dark); letter-spacing: -.02em; }
h2 {
  font-size: clamp(1.35rem, 1.15rem + 1vw, 1.7rem);
  margin-top: 2.1em;
  padding-top: 14px;
  position: relative;
}
h2::before {
  content: ""; display: block; width: 34px; height: 4px; border-radius: 2px;
  background: var(--orange); margin-bottom: 12px;
}
h3 {
  font-family: var(--font); font-weight: 800; font-size: 1.04rem;
  margin-top: 1.7em; color: var(--green-dark);
}
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.05em; padding-left: 1.25em; }
li { margin-bottom: .4em; }
strong { font-weight: 700; }

/* ---------- Header ---------- */

.site-header { background: var(--paper); position: relative; z-index: 60; }
.site-header::after {
  content: ""; display: block; height: 5px;
  background: linear-gradient(90deg, var(--green) 0%, var(--green) 78%, var(--orange) 78%, var(--orange) 100%);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { height: 30px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  color: var(--ink); text-decoration: none; font-size: .89rem; font-weight: 700;
  padding: 8px 12px; border-radius: 20px; position: relative;
}
.nav a:hover { color: var(--green-dark); background: var(--sand); }
.nav-toggle {
  display: none; background: var(--green); color: #fff; border: 0; border-radius: 20px;
  padding: 7px 14px; font-size: .85rem; font-weight: 700; cursor: pointer;
}

@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--paper);
         border-bottom: 1px solid var(--border); border-top: 1px solid var(--border-soft);
         flex-direction: column; align-items: stretch; gap: 0; padding: 6px 20px 16px; box-shadow: var(--shadow); z-index: 50; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--border-soft); border-radius: 0; }
  .nav-toggle { display: block; }
  .site-header { position: relative; }
}

/* ---------- Homepage hero: the one place color gets to be loud ---------- */

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, var(--green-dark) 0%, var(--green) 62%, var(--green-bright) 100%);
  padding: 56px 0 60px; margin-bottom: 0; color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0; background-image: var(--texture);
  opacity: .05; mix-blend-mode: overlay; pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; right: -60px; bottom: -90px; width: 320px; height: 320px;
  border-radius: 50%; background: var(--orange); opacity: .16; pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { color: #fff; margin-bottom: .4em; max-width: 18ch; }
.hero .lede { font-size: 1.14rem; color: rgba(255,255,255,.88); max-width: 62ch; margin-bottom: 0; }

/* ---------- Calculator-page header: quieter, still branded ---------- */

.page-head { padding: 22px 0 6px; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(1.7rem, 1.4rem + 1.4vw, 2.35rem); margin-bottom: .3em; }
.page-head .lede { font-size: 1.02rem; color: var(--muted); max-width: 70ch; margin-bottom: 0; }

.crumbs { font-size: .78rem; color: var(--faint); margin-bottom: 12px; font-weight: 600; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Page layout: content + sidebar of other calculators ---------- */

.layout { display: grid; grid-template-columns: 1fr 260px; gap: 28px; align-items: start; }
@media (max-width: 920px) { .layout { grid-template-columns: 1fr; } }

.side-nav {
  border: 0; border-radius: var(--radius-lg); background: var(--paper);
  font-size: .87rem; overflow: hidden; box-shadow: var(--shadow);
}
.side-nav-head {
  margin: 0; padding: 14px 16px; background: var(--green-dark); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
}
.side-nav ul { list-style: none; margin: 0; padding: 6px; }
.side-nav li { border: 0; }
.side-nav a {
  display: block; padding: 8px 10px; margin: 1px 0; color: var(--ink); text-decoration: none;
  border-radius: var(--radius-sm); font-weight: 600;
}
.side-nav a:hover { background: var(--sand); color: var(--green-dark); }
.side-nav a.current { background: var(--green-tint); color: var(--green-dark); font-weight: 700; }
.side-nav .side-nav-group {
  padding: 12px 10px 4px; font-family: var(--font); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .07em; color: var(--faint); font-weight: 800;
}
.side-nav-more { border-top: 1px solid var(--border-soft); padding: 10px 16px; }
.side-nav-more a { font-size: .84rem; font-weight: 700; text-decoration: none; color: var(--orange-dark); }
.side-nav-more a:hover { text-decoration: underline; }

/* Mobile: only the category the current calculator lives in, not all 13. */
@media (max-width: 920px) {
  .side-nav li.side-nav-group-wrap:not(.is-current-group) { display: none; }
}

/* ---------- Calculator tool ---------- */

.calc {
  background: var(--paper);
  border: 0; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin: 0 0 32px;
  overflow: hidden;
  position: relative;
}
.calc::before {
  content: ""; display: block; height: 6px;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-bright) 55%, var(--orange) 100%);
}
.calc-grid { display: grid; grid-template-columns: 1fr 320px; }
@media (max-width: 720px) { .calc-grid { grid-template-columns: 1fr; } }

.calc-inputs { padding: 24px 24px 26px; }
.calc-output { background: var(--sand); padding: 24px; }
@media (max-width: 720px) { .calc-output { border-top: 1px solid var(--border-soft); } }

.calc h2, .calc h3 { margin-top: 0; }
.calc h2::before { display: none; }

.calc-section-title {
  font-family: var(--font); font-size: 1.02rem; font-weight: 800; color: var(--ink);
  margin: 26px 0 12px; padding-left: 14px; position: relative;
}
.calc-inputs > .calc-section-title:first-child,
.calc-inputs > div:first-child .calc-section-title { margin-top: 0; }
.calc-section-title::before {
  content: ""; position: absolute; left: 0; top: .18em; width: 5px; height: 1.05em;
  background: var(--orange); border-radius: 3px;
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 5px; color: var(--ink); }
.field .help { font-size: .8rem; color: var(--muted); margin-top: 5px; line-height: 1.5; }

input[type="number"], input[type="text"], select {
  width: 100%; padding: 9px 11px; font-size: .96rem; font-family: inherit; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .12s, box-shadow .12s;
}
input[type="number"]:focus, input[type="text"]:focus, select:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-tint);
}
input.field-invalid { border-color: #b3261e; background: #fdf1f0; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230e5c38' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 11px; }
@media (max-width: 480px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }

.input-suffix { position: relative; }
.input-suffix span {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: .78rem; color: var(--faint); font-weight: 700; pointer-events: none;
}
.input-suffix input { padding-right: 40px; }

/* Area section builder: numbered like an order line-item, not a gray box */
.area-section {
  border: 0; border-radius: var(--radius); padding: 12px 12px 12px 14px; margin-bottom: 10px;
  background: var(--cream); position: relative; border-left: 3px solid var(--green-line);
}
.area-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.area-section-head .idx {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--green); color: #fff; font-weight: 800; font-size: .68rem;
  letter-spacing: .04em; padding: 4px 10px; border-radius: 20px; text-transform: uppercase;
}
.area-total { font-size: .86rem; color: var(--muted); margin-top: 8px; font-weight: 600; }
.area-total b { color: var(--green-dark); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .85rem; font-weight: 700;
  padding: 8px 15px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--sand); border-color: var(--orange); color: var(--orange-dark); }
.btn-primary { background: var(--orange); border-color: var(--orange-dark); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-link { border: 0; background: none; color: var(--muted); padding: 3px 5px; text-decoration: underline; border-radius: 0; }
.btn-link:hover { color: var(--orange-dark); background: none; border-color: transparent; }

/* Results: this is the answer, so it should look like one */
.result-primary {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--green-dark), var(--green));
  border-radius: var(--radius); padding: 18px 20px 20px; margin-bottom: 16px; color: #fff;
}
.result-primary::before {
  content: ""; position: absolute; inset: 0; background-image: var(--texture);
  opacity: .06; mix-blend-mode: overlay; pointer-events: none;
}
.result-primary .label {
  display: inline-block; position: relative;
  font-family: var(--font); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  font-weight: 800; color: var(--green-dark); background: #fff;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 10px;
}
.result-primary .value {
  position: relative; font-family: var(--font-display); font-size: clamp(1.9rem, 1.6rem + 1vw, 2.3rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: #fff;
}
.result-primary .sub { position: relative; font-size: .87rem; color: rgba(255,255,255,.82); margin-top: 6px; font-weight: 500; }

.result-list { list-style: none; padding: 0; margin: 0 0 14px; border-radius: var(--radius); overflow: hidden; }
.result-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 12px; margin: 0; font-size: .88rem; background: var(--paper);
}
.result-list li:nth-child(even) { background: var(--cream); }
.result-list .k { color: var(--muted); font-weight: 600; }
.result-list .v { font-weight: 800; text-align: right; white-space: nowrap; color: var(--ink); font-family: var(--font-display); font-size: .98rem; }

.callout {
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: var(--radius); padding: 12px 14px; font-size: .85rem; line-height: 1.52; margin: 12px 0;
}
.callout::before {
  content: ""; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  margin-top: 2px; background-repeat: no-repeat; background-position: center; background-size: 11px;
}
.callout-green { background: var(--green-tint); }
.callout-green::before {
  background-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3,9 6.5,12.5 13,4.5'/%3E%3C/svg%3E");
}
.callout-orange { background: var(--orange-tint); }
.callout-orange::before {
  background-color: var(--orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Crect x='7' y='3' width='2' height='6.5' rx='1'/%3E%3Ccircle cx='8' cy='12' r='1.2'/%3E%3C/svg%3E");
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }

/* ---------- Content ---------- */

.prose { max-width: 72ch; font-size: 1rem; }
.prose h2:first-child { margin-top: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: .88rem;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border-soft); }
.prose th { background: var(--green-dark); color: #fff; font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.prose td.num, .prose th.num { text-align: right; font-variant-numeric: tabular-nums; }
.prose tbody tr:nth-child(even) { background: var(--sand); }
.prose tbody tr:last-child td { border-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 1.3em 0; }
.table-scroll table { margin: 0; }

.faq-item { border-bottom: 1px solid var(--border-soft); padding: 2px 0; }
.faq-item summary {
  cursor: pointer; font-weight: 700; padding: 13px 0; list-style: none; position: relative;
  padding-right: 30px; font-size: .98rem; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 2px; top: 9px; font-size: 1.3rem; font-weight: 400;
  color: #fff; background: var(--orange); width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-body { padding-bottom: 14px; color: var(--muted); font-size: .93rem; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Cards ---------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 18px 0 28px; }
.card {
  display: block; padding: 18px 18px 20px; text-decoration: none; color: var(--ink); background: var(--paper);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); border-top: 4px solid var(--stone);
  transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.card h3 { margin: 0 0 5px; font-size: 1.02rem; margin-top: 0; font-family: var(--font-display); color: var(--ink); }
.card p { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.5; }
.card .tag {
  display: inline-block; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: #fff; background: var(--orange); padding: 3px 9px; border-radius: 20px; margin-bottom: 8px;
}

.card-grid .card:nth-child(3n+1) { border-top-color: var(--green); }
.card-grid .card:nth-child(3n+2) { border-top-color: var(--orange); }
.card-grid .card:nth-child(3n+3) { border-top-color: var(--stone); }
/* Higher specificity than the nth-child cycling above, so an explicit
   category accent (used on the actual calculator link cards) always wins
   over the decorative default cycling (used on the plain explainer cards). */
.card-grid .card.accent-green:nth-child(n) { border-top-color: var(--green); }
.card-grid .card.accent-orange:nth-child(n) { border-top-color: var(--orange); }
.card-grid .card.accent-stone:nth-child(n) { border-top-color: var(--stone); }

.section { padding: 34px 0; }
.section-tint { background: var(--sand); }

.link-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 5px 20px; margin: 8px 0 20px; }
.link-list-grid a { font-size: .89rem; padding: 3px 0; display: block; font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 0; background: var(--green-dark); color: rgba(255,255,255,.82);
  padding: 38px 0 22px; margin-top: 48px; font-size: .87rem; position: relative;
}
.site-footer::before { content: ""; display: block; height: 4px; background: var(--orange); position: absolute; top: 0; left: 0; right: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; margin-bottom: 26px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-family: var(--font); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--orange-tint); opacity: .8; margin-bottom: 9px; font-weight: 800; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: rgba(255,255,255,.82); text-decoration: none; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-brand img {
  height: 26px; width: auto; box-sizing: content-box; margin-bottom: 12px; display: block; background: #fff;
  padding: 8px 12px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.footer-brand p { color: rgba(255,255,255,.72); font-size: .85rem; max-width: 34ch; }
.footer-brand a { color: rgba(255,255,255,.92); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14); padding-top: 16px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 10px; color: rgba(255,255,255,.62); font-size: .8rem;
}
.footer-bottom a { color: rgba(255,255,255,.82); }
.built-by { color: rgba(255,255,255,.62); }
.built-by a { color: rgba(255,255,255,.9); text-decoration: underline; text-underline-offset: 2px; }
.built-by a:hover { color: #fff; }

.disclaimer { font-size: .82rem; color: var(--faint); border-top: 1px solid var(--border-soft); padding-top: 14px; margin-top: 30px; }

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

/* ---------- Mobile refinements beyond simple stacking ---------- */

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .calc-inputs, .calc-output { padding: 18px; }
  .result-primary .value { font-size: 1.85rem; }
  .card-grid { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 15px 16px 17px; }
  h2 { margin-top: 1.7em; }
}

@media print { .site-header, .site-footer, .nav-toggle, .btn, .side-nav { display: none; } .calc-grid, .layout { grid-template-columns: 1fr; } }
