:root {
  --bg: #fff8ee; --card: #ffffff;
  --ink: #3a3226; --ink-soft: #6b604e; --ink-faint: #a4977f;
  --tomato: #e35336; --tomato-deep: #c03a20;
  --leaf: #4c9a58; --leaf-deep: #31703c;
  --squash: #ec8b33; --squash-deep: #9c5410;
  --border: #e0cfae; --tint-warm: #fdeedd; --tl-empty: #f4eede;
  --leaf-btn: #31703c; --squash-btn: #9c5410; --tomato-btn: #c03a20; --soil-btn: #6e6353;
  --shadow: 0 2px 10px rgba(58, 50, 38, 0.07);
}
@media screen and (prefers-color-scheme: dark) {
  :root {
    --bg: #211c14; --card: #2b251b;
    --ink: #f1e8d6; --ink-soft: #c9bda3; --ink-faint: #a89a80;
    --tomato: #ff8a6b; --tomato-deep: #ffa38b;
    --leaf: #7fc48a; --leaf-deep: #9ad0a3;
    --squash: #f2a95c; --squash-deep: #f7bd7e;
    --border: #4d4433; --tint-warm: #3a3122; --tl-empty: #38311f;
    --leaf-btn: #2d5f36; --squash-btn: #8a4a0e; --tomato-btn: #a2321c; --soil-btn: #5d5445;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--bg); color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.6;
}
.wrap { max-width: 1080px; margin-inline: auto; padding-inline: 20px; }
[id] { scroll-margin-top: 84px; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--card); color: var(--ink);
  padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 20;
}
.skip:focus { left: 0; }

/* Masthead */
.masthead { padding: 44px 0 18px; text-align: center; }
.masthead h1 {
  font-size: clamp(40px, 8vw, 56px); font-weight: 800; letter-spacing: -0.5px;
  color: var(--tomato); line-height: 1.1;
}
.masthead h1 .amp { color: var(--leaf); }
.masthead .tagline { margin-top: 6px; font-size: 17px; color: var(--ink-soft); }
.masthead .facts {
  margin-top: 14px; font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-soft);
}
.masthead .facts span { white-space: nowrap; }
@media (max-width: 480px) {
  .masthead .facts .sep { display: none; }
  .masthead .facts span { display: block; line-height: 2; }
}

/* Sticky chip nav */
.chips {
  position: sticky; top: 0; z-index: 10; background: var(--bg);
  padding: 10px 0; box-shadow: var(--shadow);
}
.chips .row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips .row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px;
  padding: 8px 18px; border-radius: 14px; font-size: 15px; font-weight: 800;
  color: #fff; text-decoration: none;
}
.chip:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.chip-now { background: var(--leaf-btn); }
.chip-cal { background: var(--squash-btn); }
.chip-crops { background: var(--tomato-btn); }
.chip-bags { background: var(--soil-btn); }

/* Section scaffolding */
main section.block { padding: 34px 0 10px; }
.block > .wrap > h2 {
  font-size: clamp(26px, 5vw, 32px); font-weight: 800; color: var(--leaf-deep);
  margin-bottom: 4px;
}
.block .blurb { color: var(--ink-soft); margin-bottom: 18px; max-width: 60ch; }

/* Footer */
footer { margin-top: 44px; padding: 26px 0 40px; border-top: 2px dashed var(--border); }
footer .cols { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: center; text-align: center; }
footer .anchors { font-size: 13px; color: var(--ink-soft); }
footer .anchors b { color: var(--ink); }

/* Calendar */
.month-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .month-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .month-grid { grid-template-columns: 1fr 1fr 1fr; } }
.month-card {
  background: var(--card); border: 2px dashed var(--border); border-radius: 16px;
  padding: 16px 18px; position: relative;
}
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.month-head h3 { font-size: 22px; font-weight: 800; }
.season-winter .month-head h3 { color: var(--ink-soft); }
.season-spring .month-head h3 { color: var(--leaf-deep); }
.season-summer .month-head h3 { color: var(--squash-deep); }
.season-fall   .month-head h3 { color: var(--tomato-deep); }
.month-head .season { width: 28px; height: 28px; flex: 0 0 auto; }
.month-card ul { list-style: none; }
.month-card li { font-size: 14.5px; color: var(--ink-soft); padding: 3px 0 3px 18px; position: relative; }
.month-card li::before {
  content: ""; position: absolute; left: 2px; top: 0.77em; width: 7px; height: 7px;
  border-radius: 50%; background: var(--border);
}
.month-card.now { border: 2px solid var(--leaf); background: color-mix(in srgb, var(--leaf) 7%, var(--card)); }
.month-card.now::after {
  content: "right now"; position: absolute; top: -12px; right: 14px;
  background: var(--leaf-btn); color: #fff; font-size: 11px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; border-radius: 100px;
}

/* Crops */
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--ink-soft); margin: 2px 0 10px; }
.legend .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.sw-i { background: var(--squash); } .sw-o { background: var(--leaf); } .sw-h { background: var(--tomato); }
.cat-jump { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; }
.cat-jump a { font-size: 13.5px; font-weight: 700; color: var(--leaf-deep); text-decoration: none; border-bottom: 2px dotted var(--border); padding: 4px 0; }
.cat-jump a:hover { border-bottom-color: var(--leaf); }
.cat { padding-top: 22px; }
.cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cat-icon { width: 44px; height: 44px; flex: 0 0 auto; }
.cat-head h3 { font-size: 24px; font-weight: 800; color: var(--leaf-deep); }
.crop-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 768px) { .crop-grid { grid-template-columns: 1fr 1fr; } }
.crop-card { background: var(--card); border: 2px dashed var(--border); border-radius: 16px; padding: 14px 16px; }
.crop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.crop-head h4 { font-size: 17px; font-weight: 800; }
.pill { flex: 0 0 auto; font-size: 12px; font-weight: 700; background: var(--tint-warm); color: var(--squash-deep); padding: 3px 10px; border-radius: 100px; }
.crop-note { font-size: 13.5px; font-style: italic; color: var(--ink-soft); margin-top: 2px; }
.tl { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin-top: 10px; }
.tl-m { font-size: 9px; font-weight: 700; text-align: center; color: var(--ink-soft); }
.tl-c { height: 9px; border-radius: 2.5px; background: var(--tl-empty); }
.tl-i { background: var(--squash); } .tl-o { background: var(--leaf); } .tl-h { background: var(--tomato); }
.kv { display: grid; grid-template-columns: 76px 1fr; gap: 1px 10px; margin-top: 10px; align-items: baseline; }
.kv dt { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); line-height: 2; }
.kv dd { font-size: 13.5px; line-height: 2; }
/* Linked cards (index): stretched link, whole card tappable */
.crop-card.linked { position: relative; }
.crop-link { color: inherit; text-decoration: none; }
.crop-link::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.crop-link:focus-visible { outline: none; }
.crop-link:focus-visible::after { outline: 3px solid var(--ink); outline-offset: 2px; }
.crop-card.linked:hover, .crop-card.linked:focus-within { border-color: var(--leaf); }
.crop-more { position: absolute; right: 14px; bottom: 3px; font-size: 9.5px; line-height: 1; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-faint); }
.crop-card.linked:hover .crop-more, .crop-card.linked:focus-within .crop-more { color: var(--leaf-deep); }
/* Bags */
.bag-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .bag-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .bag-grid { grid-template-columns: 1fr 1fr 1fr; } }
.bag-card { background: var(--card); border: 2px dashed var(--border); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.bag-card h3 { font-size: 19px; font-weight: 800; color: var(--squash-deep); }
.bag-card p { font-size: 13.5px; color: var(--ink-soft); }
.bag-illo svg { display: block; }
.scale-1 svg { width: 34px; } .scale-2 svg { width: 42px; } .scale-3 svg { width: 50px; }
.scale-4 svg { width: 58px; } .scale-5 svg { width: 66px; } .scale-6 svg { width: 76px; }
/* Masthead / footer illustrations */
.masthead .cluster { width: min(240px, 60vw); margin: 0 auto 6px; }
.masthead .cluster svg { width: 100%; height: auto; display: block; }
.scene { margin-bottom: 16px; }
.scene svg { width: 100%; height: auto; display: block; }
/* Crop pages */
.mast-compact { padding: 16px 0 4px; text-align: center; }
.wordmark { display: inline-block; padding: 8px 12px; font-size: 24px; font-weight: 800; letter-spacing: -0.3px; color: var(--tomato); text-decoration: none; }
.wordmark .amp { color: var(--leaf); }
.wordmark:hover { color: var(--tomato-deep); }
.wordmark:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 12px; }
.chip-home { background: var(--leaf-btn); }
/* Crop pages read as one column: every wrap (nav, article, footer) narrows */
.crop .wrap { max-width: 640px; }
.crop-page { padding: 30px 0 10px; }
.crop-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 11.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--leaf-deep); }
.crop-kicker .cat-icon { width: 34px; height: 34px; }
.crop-page .crop-head h1 { font-size: clamp(24px, 6vw, 30px); line-height: 1.25; }
.crop-prose { max-width: 62ch; margin-top: 24px; }
.crop-prose p { margin-bottom: 14px; }
.crop-prose .crop-intro { font-size: 17.5px; line-height: 1.65; }
.crop-prose h2 { font-size: 21px; font-weight: 800; color: var(--leaf-deep); margin: 24px 0 6px; }
.crop-back { margin-top: 34px; }
.crop-back a { display: inline-block; padding: 10px 0; font-weight: 700; color: var(--leaf-deep); text-decoration: none; border-bottom: 2px dotted var(--border); }
.crop-back a:hover { border-bottom-color: var(--leaf); }
.crop-back a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* Search. All of this DOM is built by app.js at runtime; with JS disabled
   none of it exists. The input sits in the sticky nav's .row as a quiet
   chip. The results panel hangs off .chips itself: .row scrolls
   horizontally (overflow-x) and would clip any dropdown positioned inside
   it, while .chips is position: sticky, i.e. positioned, so it is the
   containing block for the absolutely positioned panel below. */

.search { flex: 0 0 auto; margin-left: auto; }

.search-input {
  min-height: 44px; width: 176px; padding: 8px 16px;
  border: 1.5px solid var(--border); border-radius: 14px;
  background: var(--card); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 600;
  appearance: none;
}
.search-input::placeholder { color: var(--ink-soft); opacity: 1; }
.search-input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Results panel: cream card, dashed border, the chips' radius. The right
   offset pins it to .wrap's content edge (1080px cap, 20px padding). */
.search-pop {
  position: absolute; z-index: 1;
  top: calc(100% + 6px);
  right: max(20px, calc(50% - 520px));
  width: min(320px, calc(100vw - 40px));
  max-height: min(60vh, 420px); overflow-y: auto;
  background: var(--bg);
  border: 1.5px dashed var(--border); border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
}

.search-list { list-style: none; margin: 0; padding: 0; }

.search-option {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 12px;
  border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--ink);
  cursor: pointer;
}

/* Keyboard-active and hovered options: warm tint plus an inset ring, the
   site's raised-border hover language. The tint alone is near-invisible on
   the cream panel; --ink-soft against --bg holds well over 3:1 non-text
   contrast in both schemes, and --ink on --tint-warm stays AA for text. */
.search-option.active,
.search-option:hover {
  background: var(--tint-warm);
  box-shadow: inset 0 0 0 1.5px var(--ink-soft);
}

.search-empty {
  display: flex; align-items: center; min-height: 44px;
  margin: 0; padding: 6px 12px;
  color: var(--ink-soft); font-size: 14.5px;
}
.search-empty[hidden] { display: none; } /* display: flex would beat [hidden] */

/* Screen-reader-only result count (role=status). */
.search-status {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* Small screens: the chips keep their single scrollable row exactly as
   shipped; the input takes a reserved full-width row of its own below them,
   absolutely positioned like the panel so .row's overflow cannot clip it.
   .has-search is set by app.js when it injects the box, so without JS the
   nav keeps its original one-row height and base.css's 84px scroll margin.
   With the box the nav is 10 + 44 + 8 + ~45 + 10 = ~117px tall, so anchor
   targets under it get 137px of headroom (20px clear). 16px input font
   stops iOS Safari zooming the page on focus. */
@media (max-width: 640px) {
  .chips.has-search { padding-bottom: 63px; }
  .chips.has-search .search {
    position: absolute; top: 62px; left: 20px; right: 20px; margin-left: 0;
  }
  .search-input { width: 100%; font-size: 16px; }
  /* Here .search itself is absolutely positioned, so it (not .chips) is the
     pop's containing block; 0/0 keeps the pop flush with the input instead
     of double-insetting 20px inside the already-inset .search. */
  .chips.has-search .search-pop { left: 0; right: 0; width: auto; }
  .chips.has-search ~ main [id] { scroll-margin-top: 137px; }
}
@media print {
  :root { --bg: #ffffff; --card: #ffffff; --ink: #1c1914; --ink-soft: #444038; }
  .chips, .skip { display: none; }
  .crop-more { display: none; } /* hover affordance, not content */
  .month-grid, .crop-grid, .bag-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .month-card, .crop-card, .bag-card { break-inside: avoid; border-color: #bbb; }
  body { font-size: 13px; }
}
