/* =============================================================
   WOCRNY — Native Gardening Guidebook
   Print-first stylesheet (A4, 210×297 mm)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Kalam:wght@300;400;700&display=swap');

:root {
  --stem:        #35723F;
  --stem-dark:   #274f2c;
  --prickly:     #8CA45D;
  --prickly-l:   #b6c790;
  --goldenrod:   #F1BE48;
  --goldenrod-l: #fbeac8;
  --monarch:     #DC582A;
  --coneflower:  #A15A95;
  --dragonfly:   #F3F1EF;
  --chickadee:   #414042;
  --wo-gray:     #636466;
  --paper:       #FAF8F3;
  --cream:       #F7F1E3;

  --f-head: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Lora', Georgia, 'Times New Roman', serif;
  --f-hand: 'Kalam', 'Brush Script MT', cursive;
}

/* ---------- Page setup (WeasyPrint + browser print) ---------- */
@page {
  size: A4;
  margin: 0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #d9d4c9;
  font-family: var(--f-body);
  color: var(--chickadee);
  -webkit-font-smoothing: antialiased;
  font-size: 10.5pt;
  line-height: 1.55;
}

/* The .page element represents a single A4 page.
   Screen: visible boundaries + 8mm margin + drop shadow so pages look like paper.
   Print / WeasyPrint: exactly 210×297mm, no margin, no shadow, hard page break after each. */
.page {
  width: 210mm;
  height: 297mm;
  background: var(--paper);
  position: relative;
  overflow: hidden;
  page-break-after: always;
  break-after: page;
  page-break-inside: avoid;
  break-inside: avoid;
  box-shadow: 0 4mm 10mm rgba(0,0,0,.15);
  margin: 8mm auto;
}
.page:last-child { page-break-after: auto; break-after: auto; }

@media print {
  html, body { background: white; }
  .page {
    margin: 0 !important;
    box-shadow: none !important;
    width: 210mm;
    height: 297mm;
  }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 { font-family: var(--f-head); font-weight: 900; color: var(--stem); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 34pt; line-height: 1.05; }
h2 { font-size: 20pt; line-height: 1.15; }
h3 { font-size: 13pt; line-height: 1.2; font-weight: 700; color: var(--stem); }
h4 { font-size: 11pt; line-height: 1.3; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--stem); }
p  { margin: 0 0 7pt 0; }
p + p { margin-top: 0; }
strong { font-weight: 600; color: var(--stem-dark); }
em { font-style: italic; }
a { color: var(--stem); text-decoration: none; border-bottom: .5pt solid var(--prickly-l); word-break: break-word; }

.hand { font-family: var(--f-hand); }
.eyebrow { font-family: var(--f-head); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: 8.5pt; color: var(--prickly); }
.kicker { font-family: var(--f-head); font-weight: 700; font-size: 9pt; letter-spacing: .14em; text-transform: uppercase; color: var(--stem); }

/* ---------- Page frame (header + footer) ---------- */
.page-body {
  position: absolute;
  inset: 22mm 16mm 18mm 16mm;
  display: flex;
  flex-direction: column;
}

.page-header {
  position: absolute;
  top: 10mm; left: 16mm; right: 16mm;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-head);
  font-size: 8pt;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wo-gray);
  border-bottom: .5pt solid rgba(99,100,102,.25);
  padding-bottom: 3mm;
}
.page-header .mark { color: var(--stem); font-weight: 700; }
.page-header .sec-title { color: var(--chickadee); font-weight: 500; letter-spacing: .08em; text-transform: none; font-style: italic; font-family: var(--f-body); }

.page-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 12mm;
  display: flex;
  align-items: flex-end;
}
.page-footer::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 6mm;
  background: linear-gradient(90deg, var(--stem) 0%, var(--stem) 38%, var(--prickly) 100%);
}
.page-footer .pnum {
  position: absolute;
  right: 16mm; bottom: 8mm;
  display: flex; align-items: center; gap: 4mm;
  font-family: var(--f-head); font-weight: 700;
  font-size: 10pt; color: var(--stem);
}
.page-footer .pnum::before {
  content: '';
  display: inline-block;
  width: 12mm; height: 1.2pt;
  background: var(--prickly);
}
.page-footer .brand {
  position: absolute;
  left: 16mm; bottom: 8mm;
  font-family: var(--f-head);
  font-size: 7.5pt; letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--wo-gray);
}

/* ---------- Section Cover ---------- */
.cover {
  background: var(--stem);
  color: var(--paper);
  padding: 0;
  position: relative;
  overflow: hidden;
}
/* Section-cover decorative illustration: large background watermark, right side
   — sits in the empty space beside the title block, low opacity so text reads cleanly */
.cover .cover-illus {
  position: absolute;
  top: 35mm;
  right: -12mm;
  width: 120mm;
  height: auto;
  opacity: .12;
  filter: brightness(0) invert(1);  /* white silhouette over green */
  pointer-events: none;
  z-index: 1;
}
.cover .cover-inner {
  position: absolute; inset: 18mm 16mm;
  display: flex; flex-direction: column;
  justify-content: space-between;
  color: var(--paper);
  z-index: 2;
}
.cover .num {
  font-family: var(--f-head);
  font-weight: 900;
  font-size: 150pt;
  line-height: .9;
  color: rgba(255,255,255,.18);
  letter-spacing: -.04em;
}
.cover .sec-label {
  font-family: var(--f-head);
  font-weight: 700;
  letter-spacing: .28em;
  font-size: 10pt;
  text-transform: uppercase;
  color: var(--goldenrod);
}
.cover h1 {
  color: var(--paper);
  font-size: 44pt;
  line-height: 1.02;
  margin-top: 6mm;
  max-width: 160mm;
}
.cover .sub {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 13pt;
  color: rgba(255,255,255,.82);
  margin-top: 8mm;
  max-width: 150mm;
  line-height: 1.4;
}
.cover .photo-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3mm;
  height: 70mm;
  margin-top: 10mm;
}
.cover .photo-grid > * {
  border-radius: 2mm;
  background: rgba(255,255,255,.08);
  border: 1pt dashed rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Courier New', monospace;
  font-size: 8pt;
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 4mm;
}

.cover .cover-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--f-head);
  font-size: 8.5pt;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
}
.cover .cover-meta .leaf {
  width: 20mm; height: 1.5pt; background: var(--goldenrod);
}

/* ---------- Green banner heading ---------- */
.banner {
  background: var(--stem);
  color: var(--paper);
  padding: 4mm 7mm;
  margin: 5mm 0 4mm 0;
  display: flex;
  align-items: center;
  gap: 5mm;
  border-radius: 0 2mm 2mm 0;
  margin-left: -4mm;
  position: relative;
}
.banner::before {
  content: '';
  position: absolute;
  left: -4mm; top: 0; bottom: 0;
  width: 4mm;
  background: var(--prickly);
}
.banner .icon {
  width: 9mm; height: 9mm;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.banner h2 {
  color: var(--paper);
  font-size: 15pt;
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0;
}
.banner.first { margin-top: 0; }

/* Purple banner for ACTION steps (distinguishes from green background-info banner) */
.banner.action { background: var(--coneflower); }
.banner.action::before { background: color-mix(in srgb, var(--coneflower) 70%, black 30%); }

/* ---------- Sub-heading (prickly underline) ---------- */
.sub-head {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 12pt;
  color: var(--stem-dark);
  margin: 5mm 0 2.5mm 0;
  padding-bottom: 1.5mm;
  border-bottom: 1pt solid var(--prickly-l);
  letter-spacing: .01em;
}

/* ---------- Tip & info boxes ---------- */
.tip {
  display: flex;
  align-items: flex-start;
  gap: 3mm;
  background: color-mix(in srgb, var(--goldenrod) 9%, var(--paper));
  border-left: 3pt solid var(--goldenrod);
  margin: 3mm 0;
  padding: 2.5mm 4mm;
  border-radius: 0 2mm 2mm 0;
}
.tip .tip-label {
  font-family: var(--f-head);
  font-weight: 900;
  font-size: 9pt;
  color: var(--monarch);
  letter-spacing: .12em;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
  padding-top: 1mm;
}
.tip .tip-body { font-size: 10pt; line-height: 1.5; flex: 1; }
.tip .tip-body p:last-child { margin-bottom: 0; }

.info-box {
  border-left: 3pt solid var(--stem);
  background: color-mix(in srgb, var(--stem) 5%, var(--paper));
  padding: 3mm 5mm;
  margin: 3mm 0;
  border-radius: 0 2mm 2mm 0;
}
.info-box h5 {
  font-family: var(--f-head);
  font-weight: 700;
  color: var(--stem);
  font-size: 9.5pt;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 2mm;
}
.info-box ul { margin: 0; padding-left: 5mm; }
.info-box li { font-size: 9.5pt; line-height: 1.55; margin-bottom: 1.5mm; }
.info-box a { font-size: 8.5pt; color: var(--stem); display: block; font-family: 'Courier New', monospace; word-break: break-all; border: 0; opacity: .75; margin-top: .5mm; }
/* Keep small URL anchors inline & compact (no extra border line adding vertical space) */
a.small,
.info-box a.small { display: inline; border-bottom: 0; opacity: .75; word-break: break-all; margin-top: 0; }
a.small:hover { opacity: 1; }

.callout {
  background: var(--dragonfly);
  padding: 7mm 9mm;
  border-radius: 2mm;
  margin: 5mm 0;
  position: relative;
  font-family: var(--f-body);
  font-style: italic;
  font-size: 12pt;
  line-height: 1.45;
  color: var(--stem-dark);
}
.callout::before {
  content: '“';
  position: absolute;
  top: -2mm; left: 3mm;
  font-family: Georgia, serif;
  font-size: 48pt;
  line-height: 1;
  color: var(--prickly);
  opacity: .35;
}
.callout cite {
  display: block;
  margin-top: 3mm;
  font-family: var(--f-head);
  font-style: normal;
  font-size: 9pt;
  color: var(--wo-gray);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- Journal action step (🌱) ---------- */
.journal-step {
  display: grid;
  grid-template-columns: 12mm 1fr;
  gap: 4mm;
  align-items: start;
  background: #FBF7E8;
  padding: 3mm 5mm;
  border-radius: 2mm;
  margin: 3mm 0;
  border: 1pt dashed var(--goldenrod);
}
.journal-step .seedling {
  width: 10mm; height: 10mm;
  border-radius: 50%;
  background: var(--stem);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-size: 14pt;
  flex-shrink: 0;
}
.journal-step .js-body {
  font-family: var(--f-body);
  font-size: 10pt;
  line-height: 1.5;
}
.journal-step .js-body .label {
  font-family: var(--f-head);
  font-weight: 700;
  color: var(--stem);
  font-size: 8.5pt;
  letter-spacing: .14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1.5mm;
}
.journal-step .js-body .blank {
  display: inline-block;
  min-width: 40mm;
  border-bottom: 1pt dotted var(--wo-gray);
  margin: 0 1mm;
  height: 1.1em;
}

/* ---------- Journal writing space (v2: badge replaces inline lines) ---------- */
.journal-space {
  position: relative;
  background: var(--cream);
  border: 1pt solid var(--goldenrod);
  border-radius: 2mm;
  padding: 4mm 5mm 4mm 5mm;
  margin: 4mm 0;
}
.journal-space h4 {
  font-family: var(--f-hand);
  font-weight: 700;
  color: var(--stem);
  font-size: 14pt;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 .5mm 0;
  padding-right: 36mm; /* clear the JOURNAL #XX badge in top-right */
  line-height: 1.15;
}
.journal-space .prompt {
  font-style: italic;
  font-size: 9pt;
  color: var(--wo-gray);
  margin-bottom: 0;
  line-height: 1.4;
}
.journal-space .lines,
.journal-space .lines .line,
.journal-space .line { display: none !important; }

/* Badge: top-right inside the journal-space — combines book ID + write CTA */
.journal-badge {
  position: absolute;
  top: 3.5mm;
  right: 4mm;
  display: inline-flex;
  align-items: center;
  gap: 1.5mm;
  background: var(--stem);
  color: var(--paper);
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 7.5pt;
  letter-spacing: .12em;
  padding: 1mm 2.2mm;
  border-radius: 6pt;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Bottom CTA: minimal one-liner */
.journal-cta {
  margin-top: 2mm;
  padding-top: 1.5mm;
  border-top: .5pt dashed color-mix(in srgb, var(--goldenrod) 70%, transparent);
  font-family: var(--f-head);
  font-size: 7.5pt;
  color: var(--wo-gray);
  letter-spacing: .04em;
  line-height: 1.2;
}
.journal-cta strong {
  color: var(--monarch);
  font-weight: 800;
  font-size: 8.5pt;
  letter-spacing: .04em;
}

/* ---------- Resource / link list ----------
   Compact: source · title in one line. URLs hidden on screen & print
   (the whole row is a clickable anchor). Small arrow glyph hints clickability. */
.resources ul { list-style: none; padding: 0; margin: 0; }
.resources li {
  border-top: .5pt solid rgba(99,100,102,.22);
  padding: 0;
}
.resources li:last-child { border-bottom: .5pt solid rgba(99,100,102,.22); }
.resources a.r-link {
  display: grid;
  grid-template-columns: 42mm 1fr auto;
  gap: 4mm;
  align-items: baseline;
  padding: 1.8mm 0;
  text-decoration: none;
  color: var(--chickadee);
}
.resources a.r-link:hover { color: var(--stem); }
.resources a.r-link:hover .r-arrow { opacity: 1; transform: translateX(1mm); }
.resources .r-src {
  color: var(--prickly);
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 7.5pt;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.35;
}
.resources .r-title {
  font-family: var(--f-body);
  font-size: 9.5pt;
  color: var(--chickadee);
  line-height: 1.4;
}
.resources .r-title em { color: var(--wo-gray); font-style: italic; }
.resources .r-arrow {
  font-family: var(--f-head);
  font-size: 9pt;
  color: var(--stem);
  opacity: .5;
  transition: all .15s;
  align-self: center;
}

/* Dense variant for pages with many resources */
.resources.dense a.r-link { padding: 1.2mm 0; }
.resources.dense .r-title { font-size: 9pt; }

/* Legacy r-url (kept for backward-compat but hidden) */
.resources .r-url { display: none; }

/* ---------- Stat row ---------- */
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3mm;
  margin: 5mm 0;
}
.stat-row .stat {
  background: var(--stem);
  color: var(--paper);
  padding: 5mm;
  border-radius: 2mm;
  text-align: center;
}
.stat-row .stat .n {
  font-family: var(--f-head);
  font-weight: 900;
  font-size: 28pt;
  line-height: 1;
  color: var(--goldenrod);
  letter-spacing: -.02em;
}
.stat-row .stat .lbl {
  font-family: var(--f-head);
  font-size: 8pt;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 2mm;
  line-height: 1.3;
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4mm;
  margin: 4mm 0;
}
.card-grid .card {
  background: var(--dragonfly);
  border-radius: 2mm;
  padding: 4mm 5mm;
  border-top: 3pt solid var(--prickly);
}
.card-grid .card h5 {
  font-family: var(--f-head);
  font-weight: 900;
  color: var(--stem-dark);
  font-size: 11pt;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 2mm;
}
.card-grid .card p {
  font-size: 9.5pt;
  line-height: 1.5;
  margin-bottom: 0;
}

/* ---------- Photo placeholder ---------- */
.photo {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(53,114,63,.06) 0 6mm,
      rgba(53,114,63,.12) 6mm 12mm
    ),
    linear-gradient(135deg, var(--prickly-l), color-mix(in srgb, var(--prickly-l) 60%, var(--goldenrod-l)));
  border-radius: 2mm;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  font-size: 8pt;
  color: var(--stem-dark);
  text-align: center;
  padding: 4mm;
  min-height: 40mm;
  position: relative;
  overflow: hidden;
}
.photo::after {
  content: '';
  position: absolute; inset: 3mm;
  border: 1pt dashed rgba(53,114,63,.4);
  border-radius: 1mm;
  pointer-events: none;
}
.photo .ph-label {
  background: rgba(255,255,255,.85);
  padding: 2mm 3mm;
  border-radius: 1mm;
  position: relative;
  z-index: 1;
  line-height: 1.3;
  max-width: 90%;
}
.photo.tall { min-height: 70mm; }
.photo.full { min-height: 110mm; }

/* ---------- Body list ---------- */
ul.body-list, ol.body-list { margin: 3mm 0 5mm 0; padding-left: 6mm; }
ul.body-list li, ol.body-list li { margin-bottom: 2mm; line-height: 1.5; }
ul.body-list li::marker { color: var(--prickly); }

/* ---------- Two column text ---------- */
.two-col {
  column-count: 2;
  column-gap: 7mm;
  column-rule: .5pt solid rgba(99,100,102,.2);
}
.two-col p { break-inside: avoid; }

/* ---------- Cover page only ---------- */
.book-cover {
  background: var(--stem);
  overflow: hidden;
}
.book-cover .bc-frame {
  position: absolute; inset: 10mm;
  border: .75pt solid rgba(241,190,72,.5);
  padding: 12mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--paper);
}
.book-cover .bc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.book-cover .bc-mark {
  font-family: var(--f-head);
  font-weight: 900;
  letter-spacing: .2em;
  font-size: 9.5pt;
  color: var(--goldenrod);
  line-height: 1.3;
}
.book-cover .bc-chapter-logo {
  width: 56mm;
  height: auto;
  display: block;
  /* white-on-transparent PNG — no filter needed */
}
.book-cover .bc-year {
  font-family: var(--f-head);
  font-size: 9pt;
  letter-spacing: .22em;
  color: rgba(255,255,255,.55);
}
.book-cover .bc-title {
  font-family: var(--f-head);
  font-weight: 900;
  font-size: 64pt;
  line-height: .95;
  color: var(--paper);
  letter-spacing: -.02em;
  max-width: 170mm;
}
.book-cover .bc-title em {
  font-family: var(--f-hand);
  font-weight: 700;
  font-style: normal;
  color: var(--goldenrod);
  font-size: 70pt;
  letter-spacing: -.01em;
}
.book-cover .bc-sub {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 14pt;
  color: rgba(255,255,255,.85);
  max-width: 150mm;
  margin-top: 5mm;
  line-height: 1.4;
}
.book-cover .bc-hero {
  height: 90mm;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 6mm, rgba(255,255,255,.10) 6mm 12mm);
  border: 1pt dashed rgba(255,255,255,.3);
  border-radius: 2mm;
  margin: 6mm 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Courier New', monospace;
  font-size: 9pt;
  color: rgba(255,255,255,.6);
}
.book-cover .bc-bot {
  display: flex; justify-content: space-between; align-items: flex-end;
  border-top: .5pt solid rgba(241,190,72,.5);
  padding-top: 6mm;
  font-family: var(--f-head);
  font-size: 8.5pt;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
}
.book-cover .bc-bot strong { color: var(--goldenrod); font-weight: 700; }

/* ---------- Misc ---------- */
.divider {
  height: 1pt;
  background: linear-gradient(90deg, var(--prickly) 0%, transparent 100%);
  margin: 6mm 0;
}
.small { font-size: 9pt; color: var(--wo-gray); }
.intro-lead {
  font-family: var(--f-body);
  font-size: 11.5pt;
  line-height: 1.55;
  color: var(--chickadee);
}
.intro-lead .dropcap {
  font-family: var(--f-head);
  font-weight: 900;
  color: var(--stem);
  float: left;
  font-size: 34pt;
  line-height: .9;
  padding-right: 2mm;
  margin-top: 1mm;
}
.intro-lead.no-dropcap .dropcap {
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
  float: none;
  font-size: inherit;
  line-height: inherit;
  padding-right: 0;
  margin-top: 0;
}

/* ---------- TOC ---------- */
.toc {
  margin-top: 4mm;
}
.toc .toc-item {
  display: grid;
  grid-template-columns: 18mm 1fr auto;
  gap: 4mm;
  align-items: baseline;
  padding: 4mm 0;
  border-bottom: .5pt solid rgba(99,100,102,.25);
}
.toc .toc-item .num {
  font-family: var(--f-head);
  font-weight: 900;
  font-size: 22pt;
  color: var(--prickly);
  line-height: 1;
}
.toc .toc-item .tt {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 13pt;
  color: var(--stem-dark);
  line-height: 1.25;
}
.toc .toc-item .tt small {
  display: block;
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 400;
  font-size: 9.5pt;
  color: var(--wo-gray);
  margin-top: 1mm;
}
.toc .toc-item .pn {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 12pt;
  color: var(--stem);
}

/* ---------- Seedling legend ---------- */
.legend-chip {
  display: inline-flex; align-items: center; gap: 2mm;
  background: var(--stem);
  color: var(--paper);
  padding: 1.5mm 4mm;
  border-radius: 20mm;
  font-family: var(--f-head);
  font-size: 8.5pt;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
}

/* Print-only controls panel */
#controls {
  position: fixed;
  top: 12px; right: 12px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--f-head);
  font-size: 11px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  z-index: 999;
  display: flex; flex-direction: column; gap: 6px;
  max-width: 200px;
}
#controls button {
  background: var(--stem); color: white; border: 0;
  padding: 6px 10px; border-radius: 4px;
  font-family: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer; letter-spacing: .05em;
}
#controls .hint { color: var(--wo-gray); font-size: 10px; line-height: 1.4; }
@media print { #controls { display: none !important; } }

/* ---------- President's letter layout ---------- */
.pres-layout {
  display: grid;
  grid-template-columns: 68mm 1fr;
  grid-template-rows: 1fr auto;
  gap: 0 9mm;
  height: 100%;
}
.pres-left {
  display: flex;
  flex-direction: column;
  grid-row: 1 / 2;
}
.pres-photo {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 2mm;
  background: var(--gray-100);
}
.pres-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pres-right {
  grid-row: 1 / 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.pres-quote {
  grid-column: 1 / -1;
  grid-row: 2 / 3;
  background: var(--stem-lighter);
  border-left: 3mm solid var(--prickly);
  padding: 6mm 8mm 6mm 14mm;
  margin-top: 6mm;
  position: relative;
}
.pres-quote .pq-mark {
  font-family: 'Lora', serif;
  font-size: 60pt;
  line-height: 0.5;
  color: var(--prickly);
  position: absolute;
  top: 9mm;
  left: 6mm;
  opacity: .35;
}
.pres-quote .pq-text {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 15pt;
  line-height: 1.4;
  color: var(--chickadee);
}

/* Full-width pull quote above the president layout */
.pres-pullquote {
  position: relative;
  background: var(--stem-lighter);
  border-left: 3mm solid var(--prickly);
  padding: 6mm 8mm 6mm 14mm;
  margin-bottom: 7mm;
}
.pres-pullquote .pq-mark {
  font-family: 'Lora', serif;
  font-size: 64pt;
  line-height: 0.5;
  color: var(--prickly);
  position: absolute;
  top: 9mm;
  left: 6mm;
  opacity: .35;
}
.pres-pullquote .pq-text {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 17pt;
  line-height: 1.35;
  color: var(--stem);
  padding-left: 0;
  text-wrap: balance;
}
.pq-mark {
  font-family: 'Lora', serif;
  font-size: 42pt;
  line-height: 0.6;
  color: var(--prickly);
  position: absolute;
  top: 4mm;
  left: 4mm;
  opacity: .4;
}
.pq-text {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 11.5pt;
  line-height: 1.4;
  color: var(--stem);
  padding-left: 6mm;
  text-wrap: pretty;
}
.pres-right p {
  margin-top: 2.2mm;
  font-size: 10pt;
  line-height: 1.55;
}
.pres-right p:first-of-type { margin-top: 0; }
.pres-sign {
  margin-top: 6mm;
  padding-top: 4mm;
  border-top: .5pt solid var(--gray-300);
}

/* ---------- How to use the guide layout ---------- */
.howto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8mm;
}
.howto-col { display: flex; flex-direction: column; gap: 5mm; }
.howto-card {
  display: grid;
  grid-template-columns: 14mm 1fr;
  gap: 4mm;
  align-items: start;
  padding-bottom: 4mm;
  border-bottom: .5pt solid var(--gray-300);
}
.howto-col .howto-card:last-child { border-bottom: none; padding-bottom: 0; }
.howto-num {
  font-family: var(--f-head);
  font-weight: 900;
  font-size: 26pt;
  color: var(--prickly);
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.howto-body h4 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 11pt;
  color: var(--stem);
  margin-bottom: 2mm;
  letter-spacing: .01em;
}
.howto-body p {
  font-size: 9.5pt;
  line-height: 1.5;
  color: var(--chickadee);
}

/* ---------- Reason list (bullet list with dot markers) ---------- */
.reason-list {
  list-style: none;
  margin: 3mm 0 0 0;
  padding: 0;
}
.reason-list li {
  position: relative;
  padding: 0.7mm 0 0.7mm 6mm;
  font-family: var(--f-body);
  font-size: 10pt;
  line-height: 1.45;
}
.reason-list li::before {
  content: "•";
  position: absolute;
  left: 1.5mm;
  top: 0.7mm;
  color: var(--stem);
  font-size: 12pt;
  line-height: 1.3;
  font-weight: 700;
}

/* Two-column split — further reading + companion text */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8mm;
  align-items: start;
}

/* ---------- Ask question (lead-in framing question) ---------- */
.ask-question {
  background: var(--goldenrod-light);
  border-left: 2mm solid var(--goldenrod);
  padding: 4mm 5mm;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 11.5pt;
  line-height: 1.4;
  color: var(--chickadee);
  text-wrap: pretty;
}
.ask-question em { color: var(--stem); font-style: italic; }

/* ---------- Compare grid (two cards with OR divider) ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 5mm;
  align-items: stretch;
}
.compare-card {
  display: flex;
  flex-direction: column;
}
.compare-photo {
  width: 100%;
  height: 40mm;
  background: var(--gray-100);
  border-radius: 2mm;
  overflow: hidden;
}
.compare-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.compare-caption {
  margin-top: 2mm;
  padding-top: 2mm;
  border-top: 2pt solid var(--coneflower);
}
.compare-caption h5 {
  font-family: var(--f-head);
  font-size: 10pt;
  font-weight: 700;
  margin-bottom: 1mm;
  color: var(--chickadee);
}
.compare-caption h5 em { font-style: italic; }
.compare-caption p {
  font-size: 9pt;
  line-height: 1.45;
  color: var(--wo-gray);
}
.compare-or {
  font-family: var(--f-head);
  font-weight: 900;
  font-size: 14pt;
  color: var(--wo-gray);
  align-self: center;
  letter-spacing: .08em;
  padding: 0 2mm;
}


/* ---------- "How to use the guide" v2 — journal hero + 3 cards + link cards ---------- */
.journal-hero {
  display: grid;
  grid-template-columns: 22mm 1fr;
  gap: 0;
  background: var(--stem-lighter);
  border-left: 4mm solid var(--stem);
  border-radius: 2mm;
  padding: 7mm 8mm 7mm 0;
  align-items: start;
}
.jh-seedling {
  font-size: 34pt;
  line-height: 1;
  text-align: center;
  padding-top: 2mm;
}
.jh-title {
  font-family: var(--f-head);
  font-size: 20pt;
  font-weight: 800;
  color: var(--stem);
  line-height: 1.05;
  margin: 0 0 3mm 0;
}
.jh-text {
  font-family: var(--f-body);
  font-size: 10.5pt;
  line-height: 1.55;
  color: var(--chickadee);
  margin: 0;
  max-width: 135mm;
}
.jh-inline-seed {
  display: inline-block;
  font-size: 12pt;
  vertical-align: -1px;
}

.howto-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5mm;
}
.howto-card-v2 {
  border-top: 2pt solid var(--stem);
  padding-top: 4mm;
}
.howto-num-v2 {
  font-family: var(--f-head);
  font-weight: 900;
  font-size: 28pt;
  line-height: 1;
  color: var(--prickly);
  margin-bottom: 2mm;
  letter-spacing: -0.01em;
}
.howto-card-v2 h4 {
  font-family: var(--f-head);
  font-size: 13pt;
  font-weight: 800;
  color: var(--chickadee);
  margin: 0 0 2mm 0;
  line-height: 1.15;
}
.howto-card-v2 p {
  font-family: var(--f-body);
  font-size: 9.5pt;
  line-height: 1.5;
  color: var(--wo-gray);
  margin: 0;
}

/* Link cards — overview-resource style (compact, subtle) */
.link-list {
  display: flex;
  flex-direction: column;
}
.link-card {
  display: grid;
  grid-template-columns: 7mm 1fr;
  gap: 3mm;
  align-items: start;
  padding: 1.3mm 0;
  border-bottom: .5pt solid var(--gray-300);
  text-decoration: none;
  color: inherit;
}
.link-card:last-child { border-bottom: none; }
.link-card .lc-icon {
  width: 5.5mm;
  height: 5.5mm;
  background: rgba(99,145,91,0.22);
  color: var(--stem);
  border-radius: 1mm;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8pt;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.4mm;
}
.link-card .lc-title {
  font-family: var(--f-head);
  font-size: 9.5pt;
  font-weight: 700;
  color: var(--stem);
  text-decoration: underline;
  text-decoration-thickness: 0.5pt;
  text-underline-offset: 1.5pt;
  line-height: 1.25;
  margin-bottom: 0.3mm;
}
.link-card .lc-src {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 8pt;
  color: var(--wo-gray);
  letter-spacing: .01em;
  line-height: 1.3;
}
.link-card:hover .lc-title {
  color: var(--prickly);
}

/* On the Page 5 overview (fewer links, more emphasis) — slightly larger */
.link-list.prominent .link-card {
  padding: 2.8mm 0;
  grid-template-columns: 9mm 1fr;
  gap: 4mm;
}
.link-list.prominent .link-card .lc-icon {
  width: 7mm;
  height: 7mm;
  font-size: 10pt;
  border-radius: 1.5mm;
}
.link-list.prominent .link-card .lc-title {
  font-size: 11pt;
  margin-bottom: 1mm;
}
.link-list.prominent .link-card .lc-src {
  font-size: 9pt;
}


/* Compact variant for pages with many sections */
.link-list.compact .link-card {
  padding: 1.8mm 0;
  grid-template-columns: 8mm 1fr;
  gap: 3mm;
}
.link-list.compact .link-card .lc-icon {
  width: 6.5mm;
  height: 6.5mm;
  font-size: 9pt;
  border-radius: 1mm;
}
.link-list.compact .link-card .lc-title {
  font-size: 10pt;
  margin-bottom: 0.5mm;
}
.link-list.compact .link-card .lc-src {
  font-size: 8.5pt;
}

/* Plant-name captions below cover photos */
.cover .photo-grid > * {
  position: relative;
}
.cover .photo-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 5mm 4mm 2.5mm;
  background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.45) 60%, transparent 100%);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 7.5pt;
  line-height: 1.25;
  letter-spacing: .01em;
}
.cover .photo-caption strong {
  display: block;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 8pt;
  color: var(--paper);
  letter-spacing: .03em;
  margin-bottom: .3mm;
}
.cover .photo-caption em {
  font-style: italic;
  color: rgba(255,255,255,.78);
  font-size: 7pt;
}

/* Book cover hero caption */
.book-cover .bc-hero {
  position: relative;
}
.book-cover .bc-hero-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 6mm 8mm 4mm;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 60%, transparent 100%);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 9pt;
  line-height: 1.3;
}
.book-cover .bc-hero-caption strong {
  display: block;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 9.5pt;
  letter-spacing: .03em;
}
.book-cover .bc-hero-caption em {
  font-style: italic;
  color: rgba(255,255,255,.78);
  font-size: 8pt;
}

/* In grid layouts, journal-space takes its natural compact height */
[style*="grid-template-columns"] > .journal-space {
  align-self: start;
}

/* Corner journal variant: stacked badge + title (used when journal sits in a small grid cell) */
.journal-space.journal-corner {
  display: flex;
  flex-direction: column;
  padding: 3.5mm 4mm;
}
.journal-space.journal-corner h4 {
  padding-right: 0 !important;
}
