:root {
  --bg: #f7f4ec; --card: #ffffff; --ink: #1f2a1f; --muted: #5d6b5a; --line: #e4dfd2;
  --green: #2f7d3b; --green-dark: #1f5a29; --green-soft: #e5f1e3;
  --indoor: #7d62c4; --sow: #2f8f45; --transplant: #e08a2c; --plant: #a85a32;
  --shadow: 0 1px 2px rgba(30,40,20,.06), 0 4px 16px rgba(30,40,20,.06);
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; }
a { color: var(--green-dark); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

header.hero { background: linear-gradient(160deg, #24622e 0%, #2f7d3b 55%, #4d9a4a 100%); color: #fff; padding: 40px 0 56px; }
.brand { font-weight: 700; letter-spacing: .02em; opacity: .9; font-size: 14px; margin-bottom: 18px; }
.brand a { color: #fff; text-decoration: none; }
h1 { font-size: clamp(30px, 5.5vw, 48px); line-height: 1.1; margin: 0 0 10px; letter-spacing: -.02em; }
.lede { font-size: clamp(16px, 2.2vw, 19px); margin: 0 0 26px; opacity: .95; max-width: 640px; }
.finder { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.18); max-width: 640px; }
.finder-row { display: flex; gap: 10px; flex-wrap: wrap; }
.finder input, .finder select, .finder button { font: inherit; font-size: 17px; border-radius: 10px; padding: 12px 14px; border: 1.5px solid #cfd8cb; }
.finder input { flex: 1 1 160px; min-width: 0; }
.finder input:focus, .finder select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,125,59,.18); }
.btn { background: var(--green); color: #fff; border: 0 !important; font-weight: 650; cursor: pointer; }
.btn:hover { background: var(--green-dark); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 12px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.finder select { width: 100%; background: #fff; }
.msg { margin-top: 10px; font-size: 14px; color: #a23b2a; min-height: 0; }

main { margin-top: -24px; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 22px; }
.loc { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.zone-badge { background: var(--green-soft); color: var(--green-dark); font-weight: 800; font-size: 22px; border-radius: 12px; padding: 8px 14px; }
.loc-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.fact { font-size: 14px; color: var(--muted); }
.fact b { display: block; color: var(--ink); font-size: 16px; }
.source { font-size: 13px; color: var(--muted); margin-top: 12px; }
details.adjust { margin-top: 10px; font-size: 14px; }
details.adjust summary { cursor: pointer; color: var(--green-dark); font-weight: 600; }
.adjust-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-top: 10px; }
.adjust-row label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 4px; }
.adjust-row input, .adjust-row button { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1.5px solid #cfd8cb; }

h2 { font-size: clamp(22px, 3.4vw, 28px); margin: 0 0 4px; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 0 0 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { font: inherit; font-size: 14px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.group-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin: 18px 0 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #eef0e8; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { margin: 0; font-size: 17px; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 700; color: #fff; border-radius: 6px; padding: 2px 8px; }
.until { font-size: 13px; color: var(--muted); }
.until.urgent { color: #b3501f; font-weight: 600; }
.tip { font-size: 13px; color: var(--ink); opacity: .85; margin-top: 2px; }
.empty { color: var(--muted); background: #faf8f2; border: 1px dashed var(--line); padding: 14px; border-radius: 10px; }

.soon { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.soon li { display: flex; gap: 10px; align-items: center; font-size: 15px; padding: 8px 10px; border-radius: 10px; background: #faf8f2; }
.soon li .when { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
.soon img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; flex: none; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; margin-bottom: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
.cal { min-width: 760px; font-size: 14px; }
.cal-row { display: grid; grid-template-columns: 150px 1fr; border-bottom: 1px solid #f0ece2; }
.cal-row:last-child { border-bottom: 0; }
.cal-name { position: sticky; left: 0; background: #fff; padding: 6px 10px; font-weight: 600; z-index: 2; border-right: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-track { position: relative; height: 32px; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 12 - 1px), #f0ece2 calc(100% / 12 - 1px), #f0ece2 calc(100% / 12)); }
.cal-head .cal-track { height: 30px; background: none; display: grid; grid-template-columns: repeat(12, 1fr); }
.cal-head .cal-track div { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 30px; }
.cal-head .cal-name { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; line-height: 18px; }
.cal-section .cal-name { background: #f7f4ec; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.cal-section .cal-track { height: 26px; background: #f7f4ec; }
.bar { position: absolute; top: 7px; height: 18px; border-radius: 5px; opacity: .92; }
.bar.indoor { top: 11px; height: 10px; }
.today { position: absolute; top: 0; bottom: 0; width: 2px; background: #d0342c; z-index: 1; }
.cal-head .today::after { content: "Today"; position: absolute; top: -1px; left: 4px; font-size: 10px; font-weight: 800; color: #d0342c; background: #fff; padding: 0 3px; border-radius: 3px; }
.cal-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.cal-actions .btn { font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 8px; }

.content h2 { margin-top: 6px; }
.content h3 { margin: 22px 0 6px; font-size: 18px; }
.content p { margin: 0 0 12px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { margin: 8px 0 0; color: #2c3a2c; }
footer { color: var(--muted); font-size: 13px; padding: 10px 0 40px; }
.hidden { display: none !important; }

@media (max-width: 520px) {
  header.hero { padding: 28px 0 46px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card h3 { font-size: 15px; }
  .tip { display: none; }
  .finder .btn { flex: 1 1 100%; }
  .cal { min-width: 640px; }
  .cal-row { grid-template-columns: 112px 1fr; }
  .cal-name { font-size: 13px; padding: 6px 8px; }
}
@media print {
  header.hero, #now-panel, #soon-panel, .content, footer, .cal-actions .btn, .chips, details.adjust { display: none !important; }
  body { background: #fff; }
  main { margin: 0; }
  .panel { box-shadow: none; padding: 0; }
  .cal-scroll { overflow: visible; border: 0; }
  .cal { min-width: 0; font-size: 11px; }
  .cal-row { break-inside: avoid; }
  .bar, .dot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Generated pages ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.topbar .brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; opacity: .95; }
.topnav { display: flex; gap: 16px; font-size: 14px; }
.topnav a { color: #fff; opacity: .9; text-decoration: none; font-weight: 600; }
.topnav a:hover { opacity: 1; text-decoration: underline; }
.crumbs { font-size: 13px; margin: -6px 0 10px; opacity: .9; }
.crumbs a { color: #fff; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
table.dates { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.dates th, table.dates td { text-align: left; padding: 8px 12px; border-bottom: 1px solid #f0ece2; vertical-align: top; }
table.dates thead th { background: #f7f4ec; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
table.dates tbody th { font-weight: 650; white-space: nowrap; }
table.dates .cat-row th { background: var(--green-soft); color: var(--green-dark); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
table.zones-table { min-width: 0; margin-bottom: 8px; }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.month { background: #faf8f2; border-radius: 12px; padding: 12px 14px; }
.month h3 { margin: 0 0 8px !important; font-size: 16px !important; }
.month p { font-size: 14px; margin: 0 0 6px !important; }
.link-grid { list-style: none; padding: 0; margin: 10px 0 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.link-grid a { display: block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 600; background: #fff; }
.link-grid a:hover { border-color: var(--green); background: var(--green-soft); }
.link-grid span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.nearby { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
footer a { color: var(--green-dark); }
@media print { .intro, #dates, #months, .faq, #browse { display: none !important; } }
