/* Plant guide pages (tool/build_plant_pages.py in the GardenGuide project). */
.pg { padding-top: 28px; padding-bottom: 56px; }
.pg h1 { font: 700 clamp(32px, 5vw, 46px)/1.1 var(--serif); margin: 0 0 6px; }
.pg h2 { font: 700 24px/1.3 var(--serif); margin: 36px 0 10px; }
.pg section { max-width: 820px; }
.pg-crumbs { font-size: 14.5px; color: var(--muted); margin-bottom: 18px; }
.pg-crumbs a { color: var(--muted); }
.pg-hero { display: grid; grid-template-columns: 1.1fr 1fr; grid-template-areas: "fig info" "cta info"; grid-template-rows: auto 1fr; gap: 20px 32px; align-items: start; max-width: none !important; }
.pg-fig { grid-area: fig; margin: 0; }
.pg-info { grid-area: info; }
.pg-cta-side { grid-area: cta; margin: 0 !important; padding: 18px !important; }
.pg-cta-side img { width: 52px; height: 52px; }
.pg-cta-side h2 { font-size: 19px !important; }
.pg-cta-side p { font-size: 15px; }
.pg-fig img { width: 100%; border-radius: 16px; aspect-ratio: 3 / 2; object-fit: cover; background: var(--line); }
.pg-fig figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.pg-hero .eyebrow a { color: inherit; text-decoration: none; }
.pg-sci { color: var(--muted); margin: 0 0 16px; }
.pg-answer { margin: 0 0 18px; padding: 10px 14px; border-left: 4px solid var(--leaf); background: rgba(63, 107, 58, 0.08); border-radius: 0 10px 10px 0; font-size: 16.5px; line-height: 1.5; }
.pg-trouble { min-width: 560px; }
.pg-when-answer { font-size: 17.5px; font-weight: 600; }
.pg-facts { border-collapse: collapse; width: 100%; min-width: 0 !important; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pg-facts caption { text-align: left; font: 700 15px/1.4 var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--leaf); padding: 0 0 8px; }
.pg-facts th, .pg-facts td { text-align: left; vertical-align: top; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 15.5px; }
.pg-facts tr:first-child th, .pg-facts tr:first-child td { border-top: 0; }
.pg-facts th { color: var(--muted); font-weight: 600; width: 46%; background: rgba(63, 107, 58, 0.07); }
.pg-vars td:first-child { font-weight: 700; }
.pg-muted { color: var(--muted); }
.pg ul { padding-left: 22px; }
.pg li { margin-bottom: 6px; }
.pg-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.pg-lead { font-size: 18px; max-width: 820px; }
.pg-la-warn { max-width: 820px; border-left: 3px solid var(--line); padding: 6px 0 6px 14px; color: var(--muted); }
.pg-la-rule { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.pg-la-members { list-style: none; padding: 0; }
.pg-la-members li { border-top: 1px solid var(--line); padding: 10px 0; }
.pg-window { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 18px 20px; margin-top: 28px; }
.pg-window h2 { margin-top: 0; }
.pg-win-wants { font-weight: 600; margin: 10px 0 14px; }
.pg-win-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.pg-win-row > span { font-size: 14.5px; color: var(--muted); min-width: 108px; }
.pg-win-b { font: inherit; font-size: 15px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: inherit; cursor: pointer; }
.pg-win-b:hover { border-color: currentColor; }
.pg-win-b[aria-pressed="true"] { background: var(--accent, #2f6f45); color: #fff; border-color: transparent; }
.pg-win-out { margin: 14px 0 0; font-weight: 600; min-height: 1.4em; }
.pg-win-out.is-dark { color: #8a5e00; }
.pg-win-out.is-bright { color: #a33; }
/* The warning colours are readable on the cream card but far too dark on the dark-mode card
   (#a33 on #26201C is 2.5:1, under the 4.5:1 minimum), so dark mode gets its own pair. */
@media (prefers-color-scheme: dark) {
  .pg-win-out.is-dark { color: #e3b261; }
  .pg-win-out.is-bright { color: #e8907f; }
}
.pg-win-care { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
@media (max-width: 560px) { .pg-win-row > span { min-width: 100%; } }
.pg-vars { border-collapse: collapse; min-width: 640px; width: 100%; font-size: 15px; }
.pg-vars th, .pg-vars td { text-align: left; vertical-align: top; padding: 8px 12px; border-top: 1px solid var(--line); }
.pg-vars thead th { border-top: 0; color: var(--muted); font-weight: 600; }
.pg-vars th, .pg-vars td { overflow-wrap: break-word; }
.pg-cta { display: flex; gap: 18px; align-items: flex-start; max-width: 820px; margin: 36px 0; padding: 22px; border-radius: 18px; background: var(--deep-leaf); color: #F5EFE2; }
.pg-cta img { border-radius: 14px; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22), 0 4px 12px rgba(0, 0, 0, 0.25); }
.pg-cta h2 { color: #fff; margin: 0 0 6px; font-size: 22px; }
.pg-cta p { margin: 0 0 12px; }
.pg-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.pg-sources { font-size: 14.5px; }
.pg-sources ul { columns: 2; }
.pg-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 8px; }
.pg-toc a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; text-decoration: none; font-size: 15px; }
#pg-find { width: 100%; max-width: 420px; font: inherit; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.pg-list { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 18px; }
.pg-list li { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pg-list span { display: block; font-size: 13px; color: var(--muted); font-style: italic; }
.pg h3 { font: 700 17px/1.4 var(--sans); margin: 18px 0 4px; }
.pg h3 + p { margin-top: 0; }
.pg-sub a[aria-current="page"] { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.pg-nophoto { grid-template-columns: 1fr 1fr; grid-template-areas: "info cta"; }
.pg-wide { max-width: none !important; }
.pg-feed { display: inline-block; margin-top: 4px; padding: 6px 10px; border-left: 3px solid var(--leaf); background: rgba(63, 107, 58, 0.08); border-radius: 0 8px 8px 0; font-size: 15.5px; }
.pg-vars td small { display: block; font-size: 12.5px; color: var(--muted); }
.pg-vnote, .pg-vsrc, .pg-vwarn { display: block; margin-top: 4px; }
.pg-vnote { color: var(--muted); font-size: 14px; }
.pg-vsrc { font-size: 13px; color: var(--muted); }
.pg-vwarn { color: var(--red); font-weight: 600; font-size: 14px; }
.pg-cite { font-size: 12.5px; text-decoration: none; margin-left: 2px; }
.pg-vars tr:target { background: rgba(166, 214, 126, 0.25); }
.pg-vname { color: inherit; text-decoration: none; }
.pg-warn { max-width: 820px; margin: 28px 0; padding: 16px 20px; border: 2px solid var(--red); border-radius: 14px; background: rgba(158, 42, 34, 0.06); }
.pg-warn h2 { color: var(--red); margin-top: 0 !important; font-size: 21px !important; }
.pg-warn ul { margin: 4px 0 10px; }
.pg-steps { padding-left: 26px !important; }
.pg-steps li { margin-bottom: 14px; }
.pg-steps li p { margin: 0 0 4px; }
.pg-tag { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(63, 107, 58, 0.12); color: var(--leaf); vertical-align: 1px; }
.pg-tag-warn { background: rgba(158, 42, 34, 0.12); color: var(--red); }
.pg-caution { padding: 6px 10px; border-left: 3px solid var(--red); background: rgba(158, 42, 34, 0.06); border-radius: 0 8px 8px 0; font-size: 15px; }
.pg-regions { max-width: 460px; margin-top: 10px; }
.pg-lvl-high { color: var(--red); font-weight: 700; }
.pg-lvl-moderate { color: #9A6A12; font-weight: 600; }
.pg-sources ol { columns: 2; padding-left: 30px; }
.pg-sources li { break-inside: avoid; }
.pg-sources li:target { background: rgba(166, 214, 126, 0.3); }
@media (prefers-color-scheme: dark) {
  .pg-sub a[aria-current="page"] { background: var(--sprout); border-color: var(--sprout); color: #1C1714; }
  .pg-vwarn, .pg-warn h2, .pg-tag-warn, .pg-lvl-high { color: #E07A6E; }
  .pg-warn { border-color: #E07A6E; }
  .pg-tag { color: var(--sprout); }
  .pg-answer { border-left-color: var(--sprout); background: rgba(166, 214, 126, 0.10); }
  .pg-lvl-moderate { color: #E0B860; }
}
@media (max-width: 640px) {
  /* The site's tables turn into cards on phones; keep the facts as a plain two-column table. */
  .pg-facts { display: table; background: var(--card); }
  .pg-facts tbody { display: table-row-group; }
  .pg-facts tr { display: table-row; border: 0; margin: 0; padding: 0; background: none; border-radius: 0; }
  .pg-facts th, .pg-facts td { display: table-cell; width: auto; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 15px; }
  .pg-facts td:first-child { font-weight: 400; font-family: var(--sans); font-size: 15px; }
  .pg-facts caption { display: table-caption; }
  .pg-scroll { border: 0; background: none; overflow: visible; }
  .pg-vars { min-width: 0; }
  .pg-vars td { border-top: 0; }
}
@media (max-width: 760px) {
  .pg-hero { grid-template-columns: 1fr; grid-template-areas: "fig" "info" "cta"; grid-template-rows: auto; gap: 18px; }
  .pg-cta-side { flex-direction: row !important; }
  .pg-sources ul, .pg-sources ol { columns: 1; }
  .pg-nophoto { grid-template-areas: "info" "cta"; }
  .pg-sub a { padding: 6px 11px; font-size: 14px; }
  .pg-sub .wrap { gap: 5px; }
  .pg-cta { flex-direction: column; }
  /* Nov 12: the app bar, phones only */
  .pg-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: 10px;
            padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--deep-leaf); color: #F5EFE2;
            box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.22); }
  .pg-bar img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
  .pg-bar span { flex: 1; min-width: 0; font-size: 13px; line-height: 1.25; }
  .pg-bar b { display: block; font-size: 15px; color: #fff; }
  .pg-bar-btn { flex: none; background: var(--sprout); color: #1E3A1B; font-weight: 700; font-size: 14px;
                text-decoration: none; border-radius: 999px; padding: 9px 14px; }
  .site-foot { padding-bottom: 76px; }
}
@media (min-width: 761px) {
  .pg-bar { display: none; }
}
