/* Layout: a lookup tool up top, then reference tables and a year-long planting timeline; one reading column on phones. */
:root {
  --bg: #f4f6f3; --surface: #fff; --sunk: #e9eee8; --text: #17201a; --muted: #5a6760; --line: #d9e0d8;
  --accent: #2c6a43; --accent-ink: #fff;
  --frost: #3a78b8; --frost-soft: #e3eef9; --sprout: #3f8f4f; --sprout-soft: #e2f1e3; --harvest: #b7791f;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1411; --surface: #161d18; --sunk: #1d2620; --text: #e4ebe5; --muted: #98a69c; --line: #2a352d;
    --accent: #6fcf8f; --accent-ink: #0b1a10;
    --frost: #7db4ec; --frost-soft: #16283a; --sprout: #6fcf8f; --sprout-soft: #17301f; --harvest: #e6aa52;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1411; --surface: #161d18; --sunk: #1d2620; --text: #e4ebe5; --muted: #98a69c; --line: #2a352d;
  --accent: #6fcf8f; --accent-ink: #0b1a10;
  --frost: #7db4ec; --frost-soft: #16283a; --sprout: #6fcf8f; --sprout-soft: #17301f; --harvest: #e6aa52;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.15; margin: 1.3rem 0 .6rem; letter-spacing: -.015em; text-wrap: balance; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 2rem 0 .6rem; text-wrap: balance; }
h3 { font-size: 1.05rem; margin: 1.3rem 0 .3rem; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 72ch; }
.lead strong { color: var(--text); }
.small, .hint, .note { font-size: .88rem; color: var(--muted); }
.prose { max-width: 72ch; }
.crumbs { font-size: .9rem; color: var(--muted); margin-top: 1rem; }
.crumbs a { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; min-height: 58px; padding-block: 8px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.12rem; color: var(--text); text-decoration: none; }
.mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--frost); color: #fff; }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a { color: var(--text); text-decoration: none; font-weight: 500; white-space: nowrap; }
nav a:hover { color: var(--accent); }

.search { display: flex; flex-wrap: wrap; gap: 8px; margin: 1rem 0 .4rem; max-width: 560px; }
.search input { flex: 1 1 220px; font-size: 1.2rem; letter-spacing: .04em; }
.search.compact input { font-size: 1rem; }
input, button { font: inherit; }
input { color: var(--text); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: .65rem .85rem; min-width: 0; }
input:focus { outline: none; border-color: var(--accent); }
button { font-weight: 700; border: 0; border-radius: var(--radius); padding: .65rem 1.2rem; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .92rem; padding: .28rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.res-title { margin-top: 1.4rem; }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin: 1rem 0 .4rem; }
.figures div { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--frost); border-radius: var(--radius); padding: .65rem .9rem; min-width: 0; }
.figures div.safe { border-top-color: var(--sprout); }
.figures .wide { grid-column: 1 / -1; }
.figures span { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.figures b { display: block; font-size: clamp(1.35rem, 3.4vw, 1.75rem); line-height: 1.2; font-variant-numeric: tabular-nums; }
.figures small { color: var(--muted); font-size: .8rem; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 28px; }
.two-col > div { min-width: 0; }
.table-wrap { overflow-x: auto; margin: .5rem 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.chart { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .95rem; }
.chart th, .chart td { text-align: left; padding: .5rem .8rem; border-top: 1px solid var(--line); white-space: nowrap; }
.chart thead th { border-top: 0; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--sunk); }
.chart tbody th { font-weight: 600; }
.chart small { color: var(--muted); font-weight: 400; }

/* ---- planting calendar: one row per crop, bars on a Jan–Dec track ---- */
.calendar { margin: .6rem 0 .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; }
.crow { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.crow.chead { border-top: 0; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.cname { min-width: 0; }
.cname a { font-weight: 700; }
.cdates { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.5; }
.tag { display: inline-block; min-width: 4.6em; font-weight: 700; }
.tag.in { color: var(--frost); } .tag.out { color: var(--sprout); } .tag.fall { color: var(--harvest); }
.months { display: grid; grid-template-columns: repeat(12, 1fr); font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.track { position: relative; height: 22px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--sunk) 0 calc(100% / 12 - 1px), var(--line) calc(100% / 12 - 1px) calc(100% / 12)); }
.track::before, .track::after { content: ""; position: absolute; top: -4px; bottom: -4px; border-left: 2px dashed var(--frost); opacity: .7; }
.track::before { left: var(--lf); } .track::after { left: var(--ff); }
.bar { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; }
.bar.in { background: var(--frost); } .bar.out { background: var(--sprout); } .bar.fall { background: var(--harvest); }
.legend { font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 8px; vertical-align: -1px; }
.legend i:first-child { margin-left: 0; }
.legend i.in { background: var(--frost); } .legend i.out { background: var(--sprout); } .legend i.fall { background: var(--harvest); }
.frostline { display: none; }
@media (max-width: 640px) {
  .crow { grid-template-columns: minmax(0, 1fr); }
  .crow.chead .cname { order: 2; }
  .months .rest { display: none; }
  .months { text-align: center; }
}

.rules { padding-left: 1.2rem; max-width: 72ch; }
.veg-list { columns: 2; padding-left: 1.2rem; }
.ad { margin: 1.5rem 0; min-height: 100px; }
.foot { border-top: 1px solid var(--line); margin-top: 3rem; padding-block: 1.5rem; color: var(--muted); font-size: .9rem; }
