/* Lawn Repair — site styles */
:root {
  --ink: #1f2a22;
  --ink-soft: #545f56;
  --page: #f5f3ec;
  --surface: #fffdf8;
  --rule: #dcd8cb;
  --turf: #2e6b3f;
  --turf-2: #3f8450;
  --turf-soft: #e2ecdf;
  --straw: #b9861f;
  --straw-soft: #f6ecd2;
  --link: #275f37;
  --focus: #2e6b3f;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e6ebe4;
    --ink-soft: #aab4aa;
    --page: #131713;
    --surface: #1b211c;
    --rule: #2f3a30;
    --turf: #78c287;
    --turf-2: #5aa86a;
    --turf-soft: #213a27;
    --straw: #e3b34f;
    --straw-soft: #3a3016;
    --link: #93d39f;
    --focus: #93d39f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--text); font-size: 1.12rem; line-height: 1.65; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header: mown-stripe band */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head::before { content: ""; display: block; height: 8px; background: repeating-linear-gradient(90deg, var(--turf) 0 56px, var(--turf-2) 56px 112px); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 28px; padding-top: 18px; padding-bottom: 14px; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; font-stretch: 112%; }
.wordmark span { color: var(--turf); margin-left: 0.12em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-nav a { font-family: var(--display); font-size: 0.98rem; font-weight: 550; color: var(--ink); text-decoration: none; padding: 3px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--turf); }

/* Type */
h1, h2, h3 { font-family: var(--display); line-height: 1.1; color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(2.2rem, 5.8vw, 3.9rem); letter-spacing: -0.025em; margin: 0 0 16px; max-width: 15ch; font-stretch: 105%; }
h2 { font-weight: 750; font-size: clamp(1.4rem, 3vw, 1.8rem); letter-spacing: -0.01em; margin: 2.1em 0 0.55em; }
h3 { font-weight: 700; font-size: 1.18rem; margin: 1.6em 0 0.35em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
.lede { font-size: 1.28rem; line-height: 1.5; color: var(--ink-soft); max-width: 44ch; margin-bottom: 0; }
.small { font-size: 0.95rem; color: var(--ink-soft); }

main { padding: 44px 0 72px; }
.article { max-width: var(--measure); }
.article > h1 { max-width: 20ch; font-size: clamp(2rem, 4.6vw, 3.1rem); }
.article .lede { margin-bottom: 24px; }
.article.wide { max-width: 100%; }
.article.wide > :not(.tool) { max-width: var(--measure); }
.updated { font-family: var(--display); font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 28px; }

table { border-collapse: collapse; width: 100%; margin: 1.1em 0 1.5em; font-size: 1rem; background: var(--surface); }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--display); font-weight: 650; font-size: 0.94rem; background: var(--turf-soft); }
.table-scroll { overflow-x: auto; margin: 1.1em 0 1.5em; }
.table-scroll table { margin: 0; min-width: 520px; }

/* Home */
.hero { padding-bottom: 26px; }
.hero .lede { max-width: 52ch; }
.card-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.card-grid li { margin: 0; }
.card-grid a { display: block; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; text-decoration: none; color: inherit; border-top: 4px solid var(--turf); }
.card-grid a:hover { border-color: var(--turf); }
.card-grid .c-name { font-family: var(--display); font-weight: 700; font-size: 1.12rem; display: block; color: var(--ink); margin-bottom: 4px; }
.card-grid .c-meta { font-size: 0.98rem; color: var(--ink-soft); line-height: 1.45; display: block; }
.tools-grid a { border-top-color: var(--straw); }

/* Tools */
.tool { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 16px; padding: 22px 22px 20px; margin: 8px 0 0; }
.tool h2 { margin: 0 0 6px; font-size: 1.45rem; }
.tool-sub { color: var(--ink-soft); font-size: 1rem; margin: 0 0 16px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px 20px; margin: 14px 0 16px; align-items: start; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label:not(.radio), .field legend { display: block; font-family: var(--display); font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; padding: 0; }
.field input[type="number"], .field input[type="text"], .field select { width: 100%; font: inherit; font-family: var(--display); font-size: 1.05rem; color: var(--ink); background: var(--page); border: 1.5px solid var(--ink); border-radius: 10px; padding: 9px 12px; }
.field .radio { display: flex; gap: 8px; align-items: baseline; font-size: 1rem; margin-bottom: 6px; line-height: 1.35; }
.field .radio input { accent-color: var(--turf); }
.field .radio input:disabled + * , .field .radio:has(input:disabled) { color: var(--ink-soft); }
.measure { margin-top: 8px; font-size: 0.95rem; }
.measure summary { cursor: pointer; font-family: var(--display); font-weight: 600; color: var(--link); }
.measure-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 8px; }
.measure-row label { font-family: var(--display); font-size: 0.85rem; display: flex; flex-direction: column; gap: 3px; }
.measure-row input { width: 6.5em; font: inherit; font-size: 1rem; padding: 7px 9px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--page); color: var(--ink); }
.hint { font-size: 0.88rem; color: var(--ink-soft); margin: 6px 0 0; }
.result { background: var(--straw-soft); border-left: 4px solid var(--straw); border-radius: 0 10px 10px 0; padding: 14px 18px; }
.result p { margin: 0 0 8px; }
.result p:last-child { margin-bottom: 0; }
.result .big { font-family: var(--display); font-size: 1.3rem; line-height: 1.3; }
.result h3 { margin: 16px 0 6px; font-size: 1.08rem; }
.result .facts { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 1rem; }
.result .facts li { margin: 0; }
.result .facts strong { font-family: var(--display); }
.warn { font-weight: 500; }
.credit { font-family: var(--display); font-size: 0.8rem; line-height: 1.45; color: var(--ink-soft); margin: 12px 0 0; }
.credit a { color: var(--ink-soft); }

/* Diagnoser */
.diag-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.diag-opt { text-align: left; font: inherit; color: var(--ink); background: var(--page); border: 1.5px solid var(--rule); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.diag-opt strong { font-family: var(--display); font-size: 1.04rem; }
.diag-opt span { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.4; }
.diag-opt:hover { border-color: var(--turf); }
.diag-opt[aria-pressed="true"] { border-color: var(--turf); background: var(--turf-soft); box-shadow: inset 0 0 0 1px var(--turf); }
.diag-step { margin-top: 16px; background: var(--straw-soft); border-left: 4px solid var(--straw); border-radius: 0 10px 10px 0; padding: 16px 18px; }
.diag-step h3 { margin: 0 0 6px; font-size: 1.25rem; }
.diag-step .q { font-family: var(--display); font-weight: 600; font-size: 1.12rem; margin: 0 0 12px; }
.diag-step p { margin: 0 0 12px; }
.diag-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.diag-step :focus { outline: none; }

/* Buttons & forms */
.btn { display: inline-block; font-family: var(--display); font-weight: 650; font-size: 1rem; padding: 10px 16px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--ink); color: var(--page); cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--turf); border-color: var(--turf); color: #fff; }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { background: var(--turf-soft); color: var(--ink); border-color: var(--ink); }
.linklike { appearance: none; background: none; border: 0; padding: 0; font: inherit; font-family: var(--display); font-size: 0.95rem; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.form { max-width: 34rem; }
.form label { display: block; font-family: var(--display); font-weight: 600; font-size: 0.95rem; margin: 0 0 6px; }
.form input, .form textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1.5px solid var(--rule); border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; }
.form textarea { min-height: 140px; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 30px 0 46px; font-size: 0.98rem; color: var(--ink-soft); }
.site-foot nav ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-foot a { color: var(--ink-soft); }
.site-foot p { max-width: 72ch; margin: 0 0 8px; }

@media print { .site-head, .site-foot, .diag-options { display: none !important; } body { background: #fff; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Analytics consent */
.consent[hidden] { display: none; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 34rem; margin: 0 auto; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 14px; padding: 16px 18px; z-index: 20; font-size: 1rem; box-shadow: 0 6px 24px rgba(31, 42, 34, 0.18); }
.consent p { margin: 0 0 12px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media print { .consent { display: none !important; } }

/* Diagrams (drawn for the site) */
.diagram { margin: 1.4em 0 1.8em; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { font-family: var(--display); font-size: 0.85rem; color: var(--ink-soft); margin-top: 6px; }
.dg-bg { fill: var(--surface); stroke: var(--rule); stroke-width: 1.5; }
.dg-soil, .dg-soil-flap { fill: #8b6a48; }
.dg-soil-flap { opacity: 0.9; }
.dg-turf { fill: #4f8a3c; }
.dg-blade { stroke: #4f8a3c; stroke-width: 2; stroke-linecap: round; fill: none; }
.dg-hole { fill: #6b4f34; }
.dg-hole-fill { fill: #5d4430; }
.dg-cut { fill: none; stroke: #c4472b; stroke-width: 3; stroke-dasharray: 7 5; }
.dg-grub { fill: none; stroke: #f4ead2; stroke-width: 6; stroke-linecap: round; }
.dg-plug { fill: #7a5a3c; stroke: #4f8a3c; stroke-width: 3; }
.dg-spike { fill: #9aa3a8; stroke: #5c666b; stroke-width: 2; }
.dg-press { fill: none; stroke: #4d3824; stroke-width: 3; stroke-linecap: round; }
.dg-arrow { fill: none; stroke: #f4ead2; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 7; }
.dg-arrow-head { fill: none; stroke: #f4ead2; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dg-seed { fill: #f2d27a; }
.dg-dim { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.dg-label text { font-family: var(--display); font-size: 15px; fill: var(--ink); }
.dg-label .dg-h, .dg-h { font-weight: 700; font-size: 16px; fill: var(--ink); font-family: var(--display); }

/* Hero photo */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--turf-soft); }
.hero-photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.photo figcaption { font-family: var(--display); font-size: 0.78rem; color: var(--ink-soft); margin-top: 6px; }
.photo figcaption a { color: var(--ink-soft); }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; gap: 18px; } }
.dg-dim.light { stroke: #f4ead2; }
.dg-label.light text { fill: #f4ead2; }

/* When to seed, by state */
.crumbs { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 10px; }
.crumbs a { color: var(--ink-soft); }
.state-table { min-width: 640px; }
.state-table td.small { font-size: 0.85rem; color: var(--ink-soft); }
.by-state { margin: 20px 0 1.4em; }
.by-state summary { cursor: pointer; font-weight: 600; }
.state-grid { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 6px; }
.state-grid li { margin: 0; }
.state-grid a { display: block; padding: 7px 12px; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; background: var(--surface); }
.state-links { line-height: 1.9; font-size: 0.95rem; }

/* Amazon shop boxes (tools/amazon_gear.py) */
.aff-note { font-size: 0.9rem; color: var(--ink-soft); border-left: 3px solid var(--rule); padding: 2px 0 2px 12px; margin: 0 0 1.4rem; }
.gear { margin: 1.6rem 0 2rem; padding: 16px 18px; border: 1.5px solid var(--rule); border-radius: 14px; background: var(--surface); }
.gear .gear-title { font-size: 1.1rem; margin: 0 0 4px; }
.gear .gear-intro { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 10px; }
.gear-list { list-style: none; margin: 0; padding: 0; }
.gear-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--rule); }
.gear-list li p { margin: 2px 0 0; font-size: 0.95rem; color: var(--ink-soft); }
.shop { flex: none; font-family: var(--display); font-weight: 600; font-size: 0.9rem; color: var(--ink); text-decoration: none; border: 1.5px solid var(--rule); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.shop:hover { border-color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media print { .gear, .aff-note { display: none !important; } }
