/* Shared stylesheet for the generated crop-library pages (crops/*.html,
   crops/index.html, crops/companion-planting.html). One cached file across
   the whole library instead of per-page inline styles.
   Source of the design: design/Verdie Crop Page (standalone).html.
   Tokens mirror index.html / mobile (see landing_page/CLAUDE.md — style parity). */
:root {
  --cream: #F6F3EE;
  --cream-2: #EDE7DB;
  --cream-3: #E4DDCC;
  --surface: #FFFEF9;
  --ink: #1A1816;
  --ink-2: #4A443D;
  --ink-3: #6E665D;
  --muted: #958E86;
  --border: #E4DFD8;
  --border-l: #EFEAE2;
  --sage: #3B6854;
  --sage-dark: #2A4E3E;
  --sage-deep: #1F3B30;
  --sage-light: #5A8C6E;
  --sage-pale: #C8E0CE;
  --sage-mist: #EAF0E7;
  --sage-soft: #DCE7DD;
  --clay: #C87E6E;
  --clay-dark: #9F5648;
  --clay-soft: #F4DFD7;
  --water-soft: #D9E8F1;
  --water: #4A82AC;
  --amber: #C4993E;
  --amber-soft: #F2E2BD;
  --amber-edge: #9A7830;
  /* Category-chip tones — the app's CATEGORY_TONES, value for value
     (mobile/src/components/garden/CropCatalogBrowser.tsx). The two pickers
     are meant to be indistinguishable, so these are copied rather than
     re-derived. cover-crop / companion-plant are the only pair the app has
     no tone for; they follow the same idiom.                            */
  --cat-vegetable: #5A8A64;         --cat-vegetable-edge: #426847;
  --cat-vegetable-soft: rgba(90, 138, 100, .14);
  --cat-fruit: #C87E6E;             --cat-fruit-edge: #A45F50;
  --cat-fruit-soft: #F4DFD7;
  --cat-berry: #8B6A9E;             --cat-berry-edge: #6E5380;
  --cat-berry-soft: rgba(139, 106, 158, .16);
  --cat-nut: #8A7050;               --cat-nut-edge: #6D573E;
  --cat-nut-soft: rgba(138, 112, 80, .16);
  --cat-root: #7A5A3E;              --cat-root-edge: #5C4530;
  --cat-root-soft: rgba(122, 90, 62, .14);
  --cat-flower: #A5547E;            --cat-flower-edge: #843F62;
  --cat-flower-soft: rgba(165, 84, 126, .14);
  --cat-perennial: #7B8C7F;         --cat-perennial-edge: #5F6E62;
  --cat-perennial-soft: rgba(123, 140, 127, .16);
  --cat-grain: #C4993E;             --cat-grain-edge: #9A7830;
  --cat-grain-soft: #F2E2BD;
  --cat-cover: #6E8478;             --cat-cover-edge: #52655B;
  --cat-cover-soft: rgba(110, 132, 120, .16);
  --cat-companion: #9E7B5A;         --cat-companion-edge: #7A5E44;
  --cat-companion-soft: rgba(158, 123, 90, .16);
  --ch-indoors: #B8841F;
  --ch-transplant: #237A49;
  --ch-sow: #4A82AC;
  --ch-harvest: #C25538;
}
* { box-sizing: border-box; }
/* An author `display` on a class beats the UA's [hidden] rule, so any
   element toggled via .hidden that also carries a display (grid, flex…)
   would stay on screen. Normalize it once, here. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
html, body {
  margin: 0; padding: 0; background: var(--cream); color: var(--ink);
  font-family: "Baloo 2", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--sage); color: #fff; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }

/* ---- buttons ---- *
   The top bar itself lives in /assets/nav.css (scripts/site/nav.css) —
   one copy for the whole marketing site, this page included.            */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 100px;
  font-family: inherit; font-size: 14.5px; font-weight: 800; letter-spacing: -.1px;
  border: 0; cursor: pointer; text-decoration: none; position: relative;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn.primary { background: var(--sage); color: #fff; box-shadow: 0 4px 0 0 var(--sage-dark); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 5px 0 0 var(--sage-dark); }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 0 var(--sage-dark); }
.btn.secondary { background: var(--sage-mist); color: var(--sage-dark); box-shadow: 0 4px 0 0 var(--sage-soft); }
.btn.secondary:hover { background: var(--sage-soft); }
.btn.secondary:active { transform: translateY(3px); box-shadow: 0 1px 0 0 var(--sage-soft); }
.btn.sm { padding: 9px 16px; font-size: 13px; }
.btn:focus-visible, a:focus-visible, [tabindex]:focus-visible, summary:focus-visible { outline: 3px solid var(--sage-pale); outline-offset: 2px; }

/* ---- breadcrumb ---- */
.crumbs { padding: 18px 0 0; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.crumbs a:hover { color: var(--sage); }
.crumbs [aria-current] { color: var(--ink); }

/* ---- hero ---- */
header.hero { position: relative; padding: 26px 0 54px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border-l);
  font-size: 11px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ink-2);
}
h1 {
  font-weight: 800; font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08; letter-spacing: -.5px; margin: 16px 0 0;
  text-wrap: balance;
}
.hero-pitch { margin: 16px 0 0; font-size: 17.5px; line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.hero-latin { margin: 14px 0 0; font-size: 14px; color: var(--ink-3); font-weight: 600; }
.hero-latin .sci { font-style: italic; color: var(--ink-2); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px;
  border-radius: 100px; font-size: 13px; font-weight: 800; letter-spacing: -.1px;
}
.chip.mist { background: var(--sage-mist); color: var(--sage-dark); }
.chip.amber { background: var(--amber-soft); color: #8E6B26; }
.chip.clay { background: var(--clay-soft); color: var(--clay-dark); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.hero-art { position: relative; display: flex; align-items: center; justify-content: center; min-height: 280px; }
.hero-art::before {
  content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle at 42% 36%, var(--sage-mist) 0%, var(--sage-soft) 62%, transparent 72%);
}
.hero-art img { position: relative; width: 248px; height: 248px; filter: drop-shadow(0 14px 22px rgba(31,59,48,.18)); }

/* ---- fact band ---- */
.facts { background: var(--surface); border-top: 1px solid var(--border-l); border-bottom: 1px solid var(--border-l); padding: 30px 0; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.fact { background: var(--cream); border: 1px solid var(--border-l); border-radius: 18px; padding: 14px 16px; }
.fact .k { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3); }
.fact .v { margin-top: 4px; font-size: 17px; font-weight: 800; letter-spacing: -.2px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.3; }
.fact .s { margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--ink-3); line-height: 1.35; }

/* ---- shared section scaffolding ---- */
section { padding: 62px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border-l); border-bottom: 1px solid var(--border-l); }
.sec-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--sage); }
h2.sec-title { font-weight: 800; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; letter-spacing: -.4px; margin: 10px 0 0; text-wrap: balance; }
.sec-sub { margin: 12px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.prose { font-size: 16.5px; line-height: 1.62; color: var(--ink-2); max-width: 65ch; }
.prose p { margin: 14px 0 0; }

/* ---- timeline ---- */
.tl-card { margin-top: 30px; background: var(--surface); border: 1px solid var(--border-l); border-radius: 22px; padding: 26px 26px 20px; }
section.alt .tl-card { background: var(--cream); }
.tl-scroll { overflow-x: auto; }
.tl { min-width: 640px; padding-right: 36px; }
.tl-row { display: grid; grid-template-columns: 168px 1fr; align-items: center; gap: 14px; padding: 9px 0; }
.tl-label { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.tl-label .sw { width: 11px; height: 11px; border-radius: 4px; flex-shrink: 0; }
.tl-track { position: relative; height: 30px; }
.tl-band {
  position: absolute; top: 3px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 800; color: #fff; white-space: nowrap;
  cursor: default;
}
.tl-band .out { position: absolute; left: calc(100% + 8px); color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.tl-band .tip {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.4;
  padding: 8px 12px; border-radius: 10px; width: max-content; max-width: 250px; white-space: normal;
  display: none; pointer-events: none; z-index: 5;
}
.tl-band:hover .tip, .tl-band:focus-visible .tip { display: block; }
.tl-band.fade { background-image: linear-gradient(90deg, var(--ch-harvest) 68%, rgba(194,85,56,0)); background-color: transparent !important; }
.tl-axis { position: relative; margin-left: 182px; height: 26px; border-top: 1px solid var(--border); margin-top: 4px; }
.tl-tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--muted); padding-top: 6px; font-variant-numeric: tabular-nums; }
.tl-tick::before { content: ""; position: absolute; top: -1px; left: 50%; width: 1px; height: 5px; background: var(--border); }
.tl-frost { position: absolute; top: 32px; bottom: 0; width: 0; border-left: 2px dashed var(--ink-3); opacity: .55; }
.tl-frost-label {
  position: absolute; top: 2px; transform: translateX(-50%);
  font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  color: var(--ink-2); background: var(--sage-mist); padding: 3px 9px; border-radius: 100px; white-space: nowrap;
}
.tl-plot { position: relative; padding-top: 38px; }
.tl-axis-title { margin-top: 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.tl-notes { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.tl-note { display: flex; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tl-note .b { font-weight: 800; color: var(--ink); white-space: nowrap; }
.callout {
  margin-top: 20px; display: flex; gap: 12px; align-items: flex-start;
  background: var(--clay-soft); border: 1px solid #EACDC2; border-radius: 16px; padding: 14px 18px;
  font-size: 14.5px; line-height: 1.5; color: var(--clay-dark); font-weight: 600; max-width: 640px;
}
.callout .t { font-weight: 800; white-space: nowrap; }

/* Prose fallback when a crop's timing doesn't parse into chart bands —
   the phrases themselves are the contract, the chart is progressive
   enhancement (see scripts/crops/build.py). */
.win-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.win-card { background: var(--surface); border: 1px solid var(--border-l); border-radius: 20px; padding: 20px 22px; }
.win-card .season {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 100px;
  background: var(--sage-mist); color: var(--sage-dark); font-size: 11.5px; font-weight: 800;
  letter-spacing: .8px; text-transform: uppercase;
}
.win-card .method { margin-top: 10px; font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.win-card p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }

/* ---- steps ---- */
.steps { margin-top: 34px; display: flex; flex-direction: column; gap: 18px; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px;
  background: var(--cream); border: 1px solid var(--border-l); border-radius: 22px; padding: 24px 26px;
}
section:not(.alt) .step { background: var(--surface); }
.step .num {
  counter-increment: step; width: 44px; height: 44px; border-radius: 14px;
  background: var(--sage-mist); color: var(--sage-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 19px;
}
.step .num::before { content: counter(step); }
.step h3 { margin: 8px 0 0; font-weight: 800; font-size: 21px; letter-spacing: -.3px; line-height: 1.2; }
.step .when { margin-top: 3px; font-size: 13px; font-weight: 800; color: var(--sage); }
.step p { margin: 10px 0 0; font-size: 15px; line-height: 1.58; color: var(--ink-2); max-width: 62ch; }
.step .kv { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; }
.kv .cell { background: var(--sage-mist); border-radius: 100px; padding: 5px 13px; font-size: 12.5px; font-weight: 800; color: var(--sage-dark); font-variant-numeric: tabular-nums; }
.follow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.follow {
  background: var(--sage-mist); border: 1px solid var(--sage-soft); border-radius: 22px; padding: 22px 24px;
}
.follow h3 { margin: 0; font-weight: 800; font-size: 17px; letter-spacing: -.2px; color: var(--sage-deep); }
.follow p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }

/* ---- companions ---- */
.comp-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-top: 30px; }
.comp-card { background: var(--surface); border: 1px solid var(--border-l); border-radius: 22px; padding: 24px 26px; }
.comp-card.avoid { background: var(--cream-2); }
.comp-card h3 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.comp-card.good h3 { color: var(--sage); }
.comp-card.avoid h3 { color: var(--clay-dark); }
.comp-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.comp-pill {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--cream); border: 1px solid var(--border-l); border-radius: 100px;
  padding: 7px 16px 7px 8px; font-size: 14px; font-weight: 800; color: var(--ink);
  transition: transform .13s ease, border-color .13s ease;
}
.comp-card.avoid .comp-pill { background: var(--surface); }
a.comp-pill:hover { transform: translateY(-2px); border-color: var(--sage-soft); }
.comp-pill img { width: 30px; height: 30px; }
.comp-pill .fallback {
  width: 30px; height: 30px; border-radius: 50%; background: var(--sage-mist);
  display: inline-flex; align-items: center; justify-content: center; color: var(--sage);
}
.comp-pill .fallback svg { width: 17px; height: 17px; }
.comp-note { margin: 16px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); font-weight: 600; }
.comp-more { margin-top: 22px; font-size: 14px; font-weight: 800; }
.comp-more a { color: var(--sage); }
/* v3: structured rotation facts (family rest, good next crops). */
.rot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 28px; }
.rot-cell { background: var(--surface); border: 1px solid var(--border-l); border-radius: 18px; padding: 18px 20px; }
.rot-cell .lbl { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--sage); }
.rot-cell p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; font-weight: 600; color: var(--ink-2); }
.rot-note { margin: 18px 0 0; font-size: 15px; line-height: 1.6; font-weight: 600; color: var(--ink-2); max-width: 68ch; }

/* v3: each companion carries its reason sentence under the pill. */
.comp-list.comp-reasons { flex-direction: column; align-items: stretch; gap: 14px; }
.comp-item { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.comp-why { margin: 0 0 0 8px; font-size: 13.5px; line-height: 1.55; color: var(--ink-3); font-weight: 600; max-width: 62ch; }
.hero-fallback {
  width: 200px; height: 200px; border-radius: 50%; background: var(--sage-mist);
  display: inline-flex; align-items: center; justify-content: center; color: var(--sage);
}
.hero-fallback svg { width: 90px; height: 90px; }
.cc-crop .fallback {
  width: 30px; height: 30px; border-radius: 50%; background: var(--sage-mist);
  display: inline-flex; align-items: center; justify-content: center; color: var(--sage); flex: none;
}
.cc-crop .fallback svg { width: 17px; height: 17px; }
.comp-more a:hover { color: var(--sage-dark); }

/* ---- trouble ---- */
.trouble-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 30px; }
.trouble-col h3 { margin: 0 0 14px; font-size: 15px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--ink-2); }
.trouble-list { display: flex; flex-direction: column; gap: 12px; }
.trouble {
  background: var(--cream); border: 1px solid var(--border-l); border-radius: 18px; padding: 16px 20px;
}
.trouble h4 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.trouble .line { display: grid; grid-template-columns: 64px 1fr; gap: 10px; margin-top: 9px; font-size: 13.5px; line-height: 1.5; }
.trouble .line .lbl { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding-top: 2px; }
.trouble .line.sign .lbl { color: var(--clay-dark); }
.trouble .line.fix .lbl { color: var(--sage); }
.trouble .line div:last-child { color: var(--ink-2); }

/* ---- edible note ---- */
.edible {
  margin-top: 26px; display: flex; gap: 12px; align-items: flex-start;
  background: var(--amber-soft); border: 1px solid #E8D6A8; border-radius: 16px; padding: 15px 19px;
  font-size: 14px; line-height: 1.55; color: #6E5417; font-weight: 600; max-width: 68ch;
}
.edible .t { font-weight: 800; white-space: nowrap; }

/* ---- faq ---- */
.faq-list { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
details.faq { background: var(--surface); border: 1px solid var(--border-l); border-radius: 18px; overflow: hidden; }
details.faq summary {
  list-style: none; cursor: pointer; padding: 17px 22px;
  font-size: 16px; font-weight: 800; letter-spacing: -.2px; display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 21px; font-weight: 700; color: var(--sage); flex-shrink: 0; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq .a { padding: 0 22px 18px; font-size: 14.5px; line-height: 1.58; color: var(--ink-2); max-width: 62ch; }

/* ---- CTA ---- */
.cta { background: linear-gradient(135deg, var(--sage-deep) 0%, var(--sage) 90%); color: #fff; padding: 66px 0; }
.cta .inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.cta h2 { margin: 0; font-weight: 800; font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -.4px; line-height: 1.12; text-wrap: balance; max-width: 21ch; }
.cta p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--sage-pale); max-width: 56ch; }
.cta .badge-row { display: flex; align-items: center; gap: 16px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.cta .badge-row img { height: 52px; width: auto; }
.cta .free { font-size: 13px; font-weight: 700; color: var(--sage-pale); }

/* ---- related ---- */
.related { padding: 56px 0 72px; }
.rel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; }
.rel-card {
  background: var(--surface); border: 1px solid var(--border-l); border-radius: 18px;
  padding: 20px 14px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: transform .15s ease, border-color .15s ease; text-align: center;
}
.rel-card:hover { transform: translateY(-3px); border-color: var(--sage-soft); }
.rel-card img { width: 74px; height: 74px; }
.rel-card .fallback {
  width: 74px; height: 74px; border-radius: 50%; background: var(--sage-mist);
  display: inline-flex; align-items: center; justify-content: center; color: var(--sage);
}
.rel-card .fallback svg { width: 34px; height: 34px; }
.rel-card .name { font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.rel-card .cat { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }

/* ---- hub (crops/index.html) ---- */
.hub-hero { padding-top: 40px; padding-bottom: 20px; }
.hub-hero .lead { margin: 14px 0 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.hub-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hub-group { padding: 34px 0 8px; }
.hub-group h2 { font-weight: 800; font-size: 24px; letter-spacing: -.3px; margin: 0 0 4px; }
.hub-group .n { color: var(--ink-3); font-size: 15px; font-weight: 700; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 18px; }

/* ---- companion chart page ---- */
.cc-row {
  display: grid; grid-template-columns: 200px 1fr 1fr; gap: 18px;
  background: var(--surface); border: 1px solid var(--border-l); border-radius: 20px;
  padding: 18px 22px; margin-top: 14px; align-items: start;
  scroll-margin-top: 92px;
}
.cc-crop { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 16px; letter-spacing: -.2px; }
.cc-crop img { width: 44px; height: 44px; flex-shrink: 0; }
.cc-crop a:hover { color: var(--sage); }
.cc-col .lbl { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.cc-col.good .lbl { color: var(--sage); }
.cc-col.avoid .lbl { color: var(--clay-dark); }
.cc-col .comp-list { margin-top: 0; }
.cc-none { font-size: 13px; font-weight: 600; color: var(--ink-3); }

/* ---- footer ---- */
footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 56px 0 32px; }
.foot-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: #fff; }
.foot-brand svg { width: 26px; height: 26px; }
.foot-links { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.foot-links a { font-size: 13.5px; color: rgba(255,255,255,.78); transition: color .15s ease; }
.foot-links a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }

/* ---- cookie consent card (same behavior as index.html) ---- */
.consent-card {
  position: fixed; left: 20px; right: 20px; bottom: 20px;
  z-index: 1000;
  max-width: 560px; margin: 0 auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 18px 40px -18px rgba(26,24,22,.35), 0 4px 12px -4px rgba(26,24,22,.12);
  padding: 20px 22px;
  transform: translateY(120%); opacity: 0;
  transition: transform 280ms ease, opacity 280ms ease;
}
.consent-card[data-open="true"] { transform: translateY(0); opacity: 1; }
.consent-card[hidden] { display: none; }
.consent-card .ck-close {
  position: absolute; top: 10px; right: 12px;
  appearance: none; background: transparent; border: 0;
  width: 28px; height: 28px; border-radius: 999px;
  font-size: 18px; line-height: 1; color: var(--ink-3); cursor: pointer;
}
.consent-card .ck-close:hover { background: var(--cream-2); color: var(--ink); }
.consent-card .ck-close:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.consent-card h2 { margin: 0 0 6px; font-size: 17px; font-weight: 800; letter-spacing: -.2px; }
.consent-card p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.consent-card p a { color: var(--sage); text-decoration: underline; text-underline-offset: 2px; }
.consent-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-art { order: -1; min-height: 220px; }
  .hero-art::before { width: 250px; height: 250px; }
  .hero-art img { width: 186px; height: 186px; }
  .comp-cols, .trouble-cols, .follow-grid, .win-cards { grid-template-columns: 1fr; }
  .rel-grid { grid-template-columns: repeat(2, 1fr); }
  .cc-row { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  section { padding: 46px 0; }
  .step { grid-template-columns: 1fr; gap: 6px; }
  .consent-card { left: 12px; right: 12px; bottom: 12px; padding: 18px; }
  .consent-card-actions button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---- catalog UI: search + chips + tile grid + picker ---------------- *
   Shared by the crop hub, the planner's crop picker, and /plan. Mirrors
   the app's CropCatalogBrowser / CropProfilePanel — chunky chips over a
   darker edge, one alphabetical tile grid, profile-on-tap. Behaviour lives
   in scripts/crops/catalog_ui.js.                                        */

.cat-bar {
  position: sticky; top: var(--nav-h, 68px); z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid var(--border-l);
  padding: 14px 0 12px;
}
.cat-bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.cat-search { position: relative; flex: 1 1 260px; min-width: 180px; }
.cat-search::before {
  content: ""; position: absolute; left: 15px; top: 50%; width: 17px; height: 17px;
  transform: translateY(-50%); opacity: .5; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A443D' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20.5 20.5 16 16'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cat-search-input {
  width: 100%; font-family: inherit; font-size: 15px; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 100px;
  padding: 11px 40px 11px 42px; appearance: none;
}
.cat-search-input::placeholder { color: var(--muted); font-weight: 600; }
.cat-search-input:focus { outline: 3px solid var(--sage-pale); outline-offset: 1px; border-color: var(--sage-soft); }
.cat-search-input::-webkit-search-cancel-button, .cat-search-input::-webkit-search-decoration { appearance: none; display: none; }
.cat-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: inherit; font-size: 17px; line-height: 1; color: var(--ink-3);
  width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--cream-2);
  cursor: pointer; padding: 0;
}
.cat-search-clear:hover { background: var(--cream-3); color: var(--ink); }

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip-edge {
  display: inline-block; border-radius: 100px;
  --tone: var(--sage); --tone-edge: var(--sage-dark); --tone-soft: var(--sage-mist);
  background: var(--tone-edge);
}
.cat-chip-edge[data-tone="vegetable"] { --tone: var(--cat-vegetable); --tone-edge: var(--cat-vegetable-edge); --tone-soft: var(--cat-vegetable-soft); }
.cat-chip-edge[data-tone="fruit"] { --tone: var(--cat-fruit); --tone-edge: var(--cat-fruit-edge); --tone-soft: var(--cat-fruit-soft); }
.cat-chip-edge[data-tone="berry"] { --tone: var(--cat-berry); --tone-edge: var(--cat-berry-edge); --tone-soft: var(--cat-berry-soft); }
.cat-chip-edge[data-tone="nut"] { --tone: var(--cat-nut); --tone-edge: var(--cat-nut-edge); --tone-soft: var(--cat-nut-soft); }
.cat-chip-edge[data-tone="root"] { --tone: var(--cat-root); --tone-edge: var(--cat-root-edge); --tone-soft: var(--cat-root-soft); }
.cat-chip-edge[data-tone="edible-flower"] { --tone: var(--cat-flower); --tone-edge: var(--cat-flower-edge); --tone-soft: var(--cat-flower-soft); }
.cat-chip-edge[data-tone="edible-perennial"] { --tone: var(--cat-perennial); --tone-edge: var(--cat-perennial-edge); --tone-soft: var(--cat-perennial-soft); }
.cat-chip-edge[data-tone="grain"] { --tone: var(--cat-grain); --tone-edge: var(--cat-grain-edge); --tone-soft: var(--cat-grain-soft); }
.cat-chip-edge[data-tone="cover-crop"] { --tone: var(--cat-cover); --tone-edge: var(--cat-cover-edge); --tone-soft: var(--cat-cover-soft); }
.cat-chip-edge[data-tone="companion-plant"] { --tone: var(--cat-companion); --tone-edge: var(--cat-companion-edge); --tone-soft: var(--cat-companion-soft); }
.cat-chip {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 3px;
  font-family: inherit; font-size: 13px; font-weight: 800; line-height: 1.3;
  color: var(--tone); background: var(--tone-soft);
  border: 1.5px solid var(--tone-soft); border-radius: 100px;
  padding: 8px 15px; cursor: pointer;
}
.cat-chip[aria-pressed="true"] { color: #fff; background: var(--tone); border-color: var(--tone); }
.cat-chip:active { transform: translateY(3px); }
.cat-chip .n { font-size: 11.5px; font-weight: 700; opacity: .72; font-variant-numeric: tabular-nums; }

.cat-count { margin: 16px 0 12px; font-size: 13px; font-weight: 800; color: var(--ink-3); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cat-tile { position: relative; width: 100%; font-family: inherit; cursor: pointer; }
.rel-card .cat.note { color: var(--amber-edge); font-weight: 800; }
/* In the picker but not plantable in this bed — visible so a search for it
   answers, muted so it never looks pickable. */
.cat-tile.off { cursor: default; background: var(--cream); border-style: dashed; }
.cat-tile.off img, .cat-tile.off .name { opacity: .55; }
.cat-tile.off .cat.note { color: var(--ink-3); }
.cat-empty { text-align: center; padding: 46px 16px 56px; }
.cat-empty p { margin: 0 0 16px; font-size: 15px; font-weight: 700; color: var(--ink-3); }

/* ---- bed summary strip (planner + /plan) ---- */
.cat-sum-line { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.45; color: var(--ink-2); }
.cat-dots { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.cat-dot {
  width: 10px; height: 10px; border-radius: 50%; --tone: var(--sage); background: var(--tone);
}
.cat-dot[data-tone="vegetable"] { --tone: var(--cat-vegetable); }
.cat-dot[data-tone="fruit"] { --tone: var(--cat-fruit); }
.cat-dot[data-tone="berry"] { --tone: var(--cat-berry); }
.cat-dot[data-tone="nut"] { --tone: var(--cat-nut); }
.cat-dot[data-tone="root"] { --tone: var(--cat-root); }
.cat-dot[data-tone="edible-flower"] { --tone: var(--cat-flower); }
.cat-dot[data-tone="edible-perennial"] { --tone: var(--cat-perennial); }
.cat-dot[data-tone="grain"] { --tone: var(--cat-grain); }

/* ---- picker dialog ---- */
.cat-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 56px));
  padding: 0; border: 0; border-radius: 26px;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 60px -24px rgba(26, 24, 22, .48);
  display: flex; flex-direction: column; overflow: hidden;
}
dialog.cat-dialog:not([open]) { display: none; }
.cat-dialog::backdrop { background: rgba(26, 24, 22, .46); }
.cat-dialog-inline {
  width: auto; max-height: none; margin-top: 12px;
  box-shadow: none; border: 1px solid var(--border-l); border-radius: 20px;
}
.cat-dialog-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 12px; border-bottom: 1px solid var(--border-l);
}
.cat-dialog-title { margin: 0; flex: 1; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.cat-dialog-x {
  font-family: inherit; font-size: 20px; line-height: 1; color: var(--ink-3);
  width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--cream-2);
  cursor: pointer; padding: 0; flex-shrink: 0;
}
.cat-dialog-x:hover { background: var(--cream-3); color: var(--ink); }
.cat-dialog .cat-bar-inner { padding: 14px 20px 0; }
.cat-dialog .cat-count { margin: 12px 20px 10px; }
.cat-dialog-body { flex: 1 1 auto; overflow-y: auto; padding: 0 20px 20px; }
.cat-dialog-inline .cat-dialog-body { max-height: 420px; }

/* ---- profile peek (mirrors CropProfilePanel) ---- */
.cp-panel { display: flex; flex-direction: column; }
.cp-head { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px; }
.cp-back, .cp-navbtn {
  font-family: inherit; line-height: 1; color: var(--ink);
  border: 0; border-radius: 12px; background: var(--cream-2); cursor: pointer; padding: 0;
}
.cp-back { width: 34px; height: 34px; font-size: 20px; flex-shrink: 0; }
.cp-navbtn { width: 30px; height: 30px; font-size: 17px; }
.cp-navbtn[disabled] { opacity: .35; cursor: default; }
.cp-eyebrow { flex: 1; min-width: 0; }
.cp-kicker { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.cp-cat { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.cp-nav { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cp-count { font-size: 12.5px; font-weight: 800; color: var(--ink-3); min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }

.cp-hero { text-align: center; }
.cp-hero img { width: 128px; height: 128px; margin: 0 auto; }
.cp-hero .fallback {
  width: 128px; height: 128px; border-radius: 50%; background: var(--sage-mist);
  display: inline-flex; margin: 0 auto;
}
.cp-name { margin: 8px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.cp-latin { margin: 4px 0 0; font-size: 14px; font-weight: 600; font-style: italic; color: var(--ink-3); }

.cp-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.cp-fact { background: var(--cream); border: 1px solid var(--border-l); border-radius: 14px; padding: 11px 12px; }
.cp-fact .k { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.cp-fact .v { font-size: 15px; font-weight: 800; letter-spacing: -.2px; margin-top: 3px; }
.cp-pitch { margin: 18px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }

.cp-sect { margin-top: 20px; }
.cp-sect .lbl { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
.cp-sect.good .lbl { color: var(--sage); }
.cp-sect.avoid .lbl { color: var(--clay-dark); }
.cp-sect .comp-list { margin-top: 0; }
.cp-sect .comp-pill[title] { cursor: help; }
.cp-sect.avoid .comp-pill { background: var(--surface); }

/* Selectable companions inside the picker peek (tapping one arms it in the
   planner). About three rows show; a longer guide list scrolls in place. */
.cp-comp-list { display: flex; flex-direction: column; gap: 8px; max-height: 172px; overflow-y: auto; padding-right: 2px; }
.cp-comp {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  font-family: inherit; background: var(--cream); border: 1px solid var(--border-l);
  border-radius: 14px; padding: 7px 10px; flex-shrink: 0;
}
.cp-comp img { width: 30px; height: 30px; flex-shrink: 0; }
.cp-comp .nm { font-size: 13.5px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.cp-comp .why { font-size: 11.5px; font-weight: 700; color: var(--ink-3); margin-top: 1px; }
.cp-comp .add { margin-left: auto; font-size: 17px; font-weight: 800; color: var(--sage); flex-shrink: 0; }
button.cp-comp { cursor: pointer; }
button.cp-comp:hover { border-color: var(--sage-soft); }
button.cp-comp:active { transform: translateY(1px); }
.cp-comp.off { opacity: .65; }
.cp-more { display: inline-block; margin-top: 20px; font-size: 14px; font-weight: 800; color: var(--sage); }
.cp-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.cp-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  position: sticky; bottom: 0; margin-top: 20px; padding: 14px 0;
  background: var(--surface); border-top: 1px solid var(--border-l);
}
.cp-actions .btn { flex: 0 1 auto; }

@media (max-width: 620px) {
  /* Chips scroll sideways rather than wrapping to four rows — a sticky
     bar that tall eats the grid. Same shape as the app's horizontal
     ScrollView of CategoryChips. */
  .cat-chips {
    flex-wrap: nowrap; overflow-x: auto; width: 100%;
    padding-bottom: 2px; scrollbar-width: none;
  }
  .cat-chips::-webkit-scrollbar { display: none; }
  .cat-chip-edge { flex: 0 0 auto; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 10px; }
  .cp-facts { grid-template-columns: repeat(2, 1fr); }
  .cat-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; }
}
