/* Site design system. No external fonts or frameworks. */
:root {
  --spruce: #1f3d2b; --spruce-2: #2c5a3f; --moss: #4f7a4a; --sprout: #cfe3c4;
  --cream: #f7f3ea; --paper: #fffdf8; --line: #e4dccb; --ink: #1d2420; --ink-2: #4a544d; --muted: #6a726c;
  --soil: #7a5a3f; --sun: #e7b75a; --sun-2: #b9822a;
  --frost-1: #1f5f8b; --frost-2: #3f86b4; --frost-3: #8fbfda;
  --c-indoor: #b9822a; --c-transplant: #2c5a3f; --c-sow: #6e9c4a; --c-fall: #a3542f;
  --radius: 14px; --radius-s: 8px;
  --shadow: 0 1px 2px rgba(31,61,43,.06), 0 6px 24px rgba(31,61,43,.07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font: 17px/1.6 var(--sans); color: var(--ink); background: var(--cream); }
img, svg { max-width: 100%; }
a { color: var(--spruce-2); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--spruce); }
:focus-visible { outline: 3px solid var(--sun-2); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); color: var(--spruce); line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: .2em 0 .3em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.2rem; }
p, ul, ol, dl { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .nowrap { white-space: nowrap; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 12px; border-radius: 6px; }
mark.pending { background: #ffe8a6; color: #5a3d00; padding: 0 .25em; border-radius: 4px; font-size: .9em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(247,243,234,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 1.3rem/1 var(--serif); color: var(--spruce); text-decoration: none; letter-spacing: -.01em; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { background: #ece5d6; color: var(--spruce); }
@media (max-width: 800px) {
  .site-header { position: static; }
  .site-header__inner { flex-wrap: wrap; gap: 8px; padding-block: 10px; }
  .nav { margin: 0; width: 100%; }
  .nav ul { flex-wrap: wrap; }
  .nav a { font-size: .9rem; padding: 7px 10px; background: #efe8d9; }
}

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 18px 20px 0; margin: 0 auto; max-width: var(--wrap); font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); }

/* Page head */
.page-head { padding: 28px 0 8px; max-width: 820px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--soil); margin: 0; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 70ch; }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(231,183,90,.28), transparent 60%), linear-gradient(180deg, #eef3e6, var(--cream)); border-bottom: 1px solid var(--line); }
.hero__inner { padding: 56px 20px 44px; }
.hero h1 { max-width: 15ch; font-size: clamp(2.3rem, 5.5vw, 3.8rem); }
.hero .lede { font-size: 1.2rem; }

/* Search */
.search { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); max-width: 680px; margin-top: 20px; }
.search label { display: block; font-weight: 650; margin-bottom: 8px; }
.search__row { display: flex; gap: 10px; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; padding: 12px 14px; border: 1.5px solid #cfc5b1; border-radius: 10px; background: #fff; color: var(--ink); }
.search input:focus { border-color: var(--spruce-2); outline: none; box-shadow: 0 0 0 3px rgba(44,90,63,.18); }
.search p { margin: 8px 0 0; }
.search__result:not(:empty) { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #f1f6ec; border: 1px solid #d5e5c8; }
.search-panel .search { margin: 0 0 20px; }
@media (max-width: 520px) { .search__row { flex-direction: column; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 650 1rem/1.2 var(--sans); padding: 12px 18px; border-radius: 10px; border: 1.5px solid var(--spruce); background: var(--spruce); color: #fff; text-decoration: none; cursor: pointer; min-height: 46px; }
.btn:hover { background: var(--spruce-2); color: #fff; }
.btn--ghost { background: transparent; color: var(--spruce); }
.btn--ghost:hover { background: #e9efe2; color: var(--spruce); }
.btn--small { padding: 8px 12px; min-height: 38px; font-size: .92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.stat__k { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.stat__v { font: 700 1.6rem/1.1 var(--serif); color: var(--spruce); }
.stat__s { font-size: .85rem; color: var(--ink-2); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.callout { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--moss); border-radius: var(--radius-s); padding: 14px 16px; margin: 18px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--sun-2); background: #fff8e8; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin: 12px 0 18px; }
table.data { border-collapse: collapse; width: 100%; font-size: .95rem; }
.data caption { text-align: left; padding: 12px 14px; font-size: .88rem; color: var(--ink-2); border-bottom: 1px solid var(--line); caption-side: top; }
.data th, .data td { padding: 10px 14px; border-bottom: 1px solid #efe8da; text-align: left; vertical-align: top; }
.data thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #faf6ee; position: sticky; top: 0; }
.data tbody tr:hover { background: #fbf8f1; }
.data tbody th { font-weight: 600; white-space: nowrap; }
.data th[aria-sort] button, .data th button.sort { all: unset; cursor: pointer; }
.data th button.sort::after { content: " ↕"; color: #b8ae9a; }

/* Charts */
.chart { margin: 8px 0 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px 6px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart figcaption { font-size: .85rem; color: var(--muted); padding: 6px 4px; }
.chart .grid { stroke: #ece4d4; } .chart .axis { font: 11px var(--sans); fill: var(--muted); } .chart .axisline, .chart .tick { stroke: #cbbfa8; }
.chart .lbl { font: 600 12px var(--sans); } .chart .tband { fill: url(#none) var(--frost-3); fill: #9cc3d5; }
.chart .freezeline { stroke: var(--frost-1); stroke-dasharray: 4 4; }

/* Gantt */
.gantt { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 14px 0 8px; }
.gantt__months, .gantt__row { display: grid; grid-template-columns: 150px 1fr; align-items: center; }
.gantt__months { grid-template-columns: 150px repeat(12, 1fr); font-size: .75rem; color: var(--muted); text-align: center; padding-bottom: 4px; border-bottom: 1px solid #efe8da; }
.gantt__months::before { content: ""; }
.gantt__row { padding: 5px 0; border-bottom: 1px dashed #f0eadf; }
.gantt__row:last-child { border-bottom: 0; }
.gantt__label { font-size: .9rem; font-weight: 600; color: var(--ink); text-decoration: none; padding-right: 10px; }
.gantt__track { position: relative; height: 18px; background: repeating-linear-gradient(90deg, transparent 0 calc(100%/12 - 1px), #f1ebdf calc(100%/12 - 1px) calc(100%/12)); border-radius: 5px; }
.bar { position: absolute; top: 3px; height: 12px; border-radius: 6px; }
.bar--indoor, .sw.bar--indoor { background: var(--c-indoor); }
.bar--transplant, .sw.bar--transplant { background: var(--c-transplant); }
.bar--sow, .sw.bar--sow { background: var(--c-sow); }
.bar--fall-sow, .bar--fall-transplant, .bar--fall-plant, .sw.bar--fall-sow { background: var(--c-fall); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; padding: 0; font-size: .85rem; color: var(--ink-2); }
.legend .sw { display: inline-block; width: 18px; height: 10px; border-radius: 5px; margin-right: 6px; vertical-align: middle; position: static; }
@media (max-width: 600px) { .gantt__months, .gantt__row { grid-template-columns: 92px 1fr; } .gantt__months { grid-template-columns: 92px repeat(12, 1fr); } .gantt__label { font-size: .8rem; } }

/* Month accordions */
.months { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.month { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); }
.month summary { cursor: pointer; padding: 12px 14px; font-weight: 650; color: var(--spruce); display: flex; justify-content: space-between; list-style: none; }
.month summary::-webkit-details-marker { display: none; }
.month summary::after { content: "+"; font-weight: 400; margin-left: 10px; }
.month[open] summary::after { content: "–"; }
.month .count { margin-left: auto; color: var(--muted); font-weight: 500; font-size: .88rem; }
.month ul { margin: 0; padding: 0 14px 12px 32px; font-size: .93rem; }
.month p { padding: 0 14px; }
@media (max-width: 760px) { .months { grid-template-columns: 1fr; } }

/* Lists */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chips li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; list-style: none; padding: 0; }
.card a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; height: 100%; transition: transform .15s ease, box-shadow .15s ease; }
.card a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card__t { display: block; font: 700 1.15rem var(--serif); color: var(--spruce); } .card__s { color: var(--muted); font-size: .9rem; }
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 34px 0 10px; }
.tool { display: block; background: var(--spruce); color: #fff; border-radius: var(--radius); padding: 22px; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s ease; }
.tool:hover { color: #fff; transform: translateY(-2px); }
.tool:nth-child(2) { background: var(--frost-1); } .tool:nth-child(3) { background: var(--soil); }
.tool__t { display: block; font: 700 1.3rem var(--serif); margin-bottom: 6px; } .tool__s { color: rgba(255,255,255,.88); }
@media (max-width: 800px) { .tools { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts dt, .facts dd { margin: 0; padding: 12px 14px; border-bottom: 1px solid #efe8da; }
.facts dt { font-weight: 650; color: var(--spruce); background: #faf6ee; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } .facts dt { border-bottom: 0; padding-bottom: 2px; } }
.cite { font-size: .85rem; color: var(--muted); } .cite a { color: var(--muted); }
.notes li { margin-bottom: .5em; }
.faq dt { font-weight: 700; color: var(--spruce); margin-top: 1em; } .faq dd { margin: .3em 0 0; }
.sources { font-size: .92rem; } .sources li { margin-bottom: .4em; }
.prose { max-width: 820px; } .prose li { margin-bottom: .4em; }
code { font-size: .88em; background: #efe8da; padding: .1em .35em; border-radius: 4px; }

/* Ads */
.ad { margin: 26px 0; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 120px; }
.ad__label { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* Tools UI */
.tool-app { margin: 10px 0 24px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .field legend { font-weight: 650; }
.field input, .field select { font: inherit; padding: 11px 12px; border: 1.5px solid #cfc5b1; border-radius: 10px; background: #fff; color: var(--ink); min-height: 46px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.checks label { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-weight: 500; min-height: 44px; }
.checks input { width: 18px; height: 18px; accent-color: var(--spruce); }
.seg { display: inline-flex; border: 1.5px solid var(--spruce); border-radius: 10px; overflow: hidden; }
.seg label { padding: 9px 14px; cursor: pointer; font-weight: 600; color: var(--spruce); min-height: 42px; display: flex; align-items: center; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { color: #fff; } .seg label:has(input:checked) { background: var(--spruce); color: #fff; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--sun-2); outline-offset: -3px; }
.loc { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.loc strong { font-family: var(--serif); font-size: 1.2rem; color: var(--spruce); }
.risk-big { font: 700 2.4rem/1 var(--serif); color: var(--frost-1); }
.risk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.risk-card { background: #f2f7fa; border: 1px solid #d3e4ee; border-radius: var(--radius); padding: 14px; }
.risk-card h3 { margin: 0 0 6px; font-size: 1rem; color: var(--frost-1); }
@media (max-width: 700px) { .risk-grid { grid-template-columns: 1fr; } }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.warn { color: #7a4a00; background: #fff4d8; border: 1px solid #f0d89a; padding: 10px 12px; border-radius: 8px; }

/* Footer */
.site-footer { margin-top: 70px; background: var(--spruce); color: #dfe9da; padding: 44px 0 26px; }
.site-footer a { color: #fff; } .site-footer .muted { color: #b9cbb6; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; }
.footer-grid ul { list-style: none; padding: 0; } .footer-grid li { margin-bottom: 6px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font: 700 1.25rem var(--serif); color: #fff; }
.footer-h { font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 20px; padding-top: 16px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Print: planner and calendars */
@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .crumbs, .ad, .actions, .toolbar, .search, .no-print, .tool-notes { display: none !important; }
  .panel, .table-wrap, .gantt, .chart { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .gantt__track { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .bar, .sw { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
/* Long source titles and URLs must wrap on small screens */
.sources, .cite, .notes, .facts dd, .prose { overflow-wrap: anywhere; }
@media (min-width: 641px) { .data td { white-space: nowrap; } }
@media (max-width: 640px) {
  .data th, .data td { padding: 8px; }
  .data tbody th { white-space: normal; }
}
@media (max-width: 640px) { .chart { overflow-x: auto; } .chart svg { min-width: 560px; } }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 2px 4px rgba(31,61,43,.05), 0 18px 48px rgba(31,61,43,.12); }
.hc__title { font: 700 1.2rem/1.25 var(--serif); color: var(--spruce); margin: 6px 0 14px; }
.hc__list { list-style: none; padding: 0; margin: 0 0 14px; }
.hc__row { display: grid; grid-template-columns: 44px 1fr 62px; gap: 10px; align-items: center; padding: 6px 0; }
.hc__p { font-weight: 700; color: var(--frost-1); } .hc__d { text-align: right; font-weight: 650; }
.hc__bar { height: 10px; background: #edf3f7; border-radius: 6px; overflow: hidden; }
.hc__fill { display: block; height: 100%; border-radius: 6px; }
.hc__fill--hi { background: var(--frost-3); } .hc__fill--mid { background: var(--frost-2); } .hc__fill--lo { background: var(--frost-1); }
.hc__note { font-size: .95rem; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }
.seg { align-self: flex-start; }
