/* =========================================================================
   The Planters' Guild — Field Manual article (dossier) styles
   Loads after tokens.css + base.css. Site chrome (header/footer/search) lives
   in base.css. Ported from the legacy Thrips inline block; raw palette → tokens
   (--forest → --forest-pine), 'Source Serif 4'/'Inter' → --font-serif/--font-sans,
   legacy --max-width 1200 → --container-width, legacy 720px content width kept as
   a local --fm-content-width so it doesn't clobber the global --content-width token.
   Two-column guide layout (article + sticky sidebar), the Mug-Shot dossier card,
   the field-note, the sources callout, and the image-grid related block.
   ========================================================================= */

:root { --side-pad: clamp(20px, 5vw, 56px); --fm-content-width: 720px; }

/* --- Guide hero ------------------------------------------------------------ */
.guide-hero { background: var(--kraft); padding: 80px var(--side-pad) 64px; }
.guide-hero__inner { max-width: var(--container-width); margin: 0 auto; }
.breadcrumb { font-size: 12px; letter-spacing: 0.06em; color: var(--aged-ink); margin-bottom: 32px; }
.breadcrumb a { color: var(--aged-ink); }
.breadcrumb a:hover { color: var(--forest-pine); text-decoration: none; }
.breadcrumb .sep { margin: 0 10px; color: rgba(42, 33, 27, 0.3); }
.guide-hero .kicker {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--terracotta); margin-bottom: 16px;
}
.guide-hero h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1; letter-spacing: -0.012em;
  color: var(--walnut); margin-bottom: 24px;
  max-width: 880px;
}
.guide-meta {
  display: flex; gap: 28px; flex-wrap: wrap;
  font-size: 13px; color: var(--aged-ink); margin-bottom: 28px;
}
.guide-meta-item { display: inline-flex; align-items: center; }
.guide-meta-item::before { content: '·'; margin-right: 28px; color: rgba(42, 33, 27, 0.3); }
.guide-meta-item:first-child::before { display: none; }
.guide-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.tag {
  display: inline-block; padding: 5px 12px;
  background: var(--cream); border: 1px solid rgba(42, 33, 27, 0.12);
  color: var(--aged-ink); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; border-radius: 2px;
}
.tag.tag-primary { background: var(--forest-pine); color: var(--cream); border-color: var(--forest-pine); }
.guide-hero__visual {
  width: 100%; aspect-ratio: 32 / 10;
  background: var(--walnut); position: relative; overflow: hidden;
}
.guide-hero__visual img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; position: absolute; inset: 0;
}
.guide-hero__visual-label {
  position: absolute; bottom: 20px; left: 24px;
  color: var(--cream); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.6; text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* --- Two-column guide layout ----------------------------------------------- */
.guide-layout { background: var(--cream); padding: 80px var(--side-pad) 100px; }
.guide-layout__inner {
  max-width: var(--container-width); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 280px; gap: 80px;
}

/* --- Sidebar (TOC + quick facts) ------------------------------------------- */
.guide-sidebar { position: sticky; top: 96px; align-self: start; }
.toc-card { background: var(--kraft); padding: 28px 24px; margin-bottom: 24px; border-left: 2px solid var(--terracotta); }
.toc-card__label {
  font-family: var(--font-sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 16px;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 2px; }
.toc-list a {
  display: block; padding: 7px 12px; font-size: 13px;
  color: var(--aged-ink); border-left: 2px solid transparent;
  margin-left: -14px; transition: all 0.18s ease;
}
.toc-list a:hover { color: var(--walnut); text-decoration: none; background: rgba(42, 33, 27, 0.04); }
.toc-list a.is-active {
  color: var(--walnut); font-weight: 600;
  border-left-color: var(--terracotta); background: rgba(42, 33, 27, 0.06);
}
.quick-facts { background: var(--kraft); padding: 24px; }
.quick-facts__label {
  font-family: var(--font-sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 14px;
}
.fact-row {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px dashed rgba(42, 33, 27, 0.15); font-size: 13px;
}
.fact-row:last-child { border-bottom: none; }
.fact-label { color: var(--aged-ink); }
.fact-value { color: var(--walnut); font-weight: 600; }

/* --- Article prose --------------------------------------------------------- */
.guide-content { max-width: var(--fm-content-width); }
.guide-content > p.lede {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(16px, 2vw, 20px); line-height: 1.6;
  color: var(--aged-ink); margin-bottom: 32px;
}
.guide-content h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(24px, 3vw, 36px);
  margin-top: 52px; margin-bottom: 20px;
  color: var(--walnut); scroll-margin-top: 120px;
}
.guide-content h3 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 20px; margin-top: 36px; margin-bottom: 16px; color: var(--walnut);
}
.guide-content p { margin-bottom: 18px; line-height: 1.8; }
.guide-content ul, .guide-content ol { margin-left: 24px; margin-bottom: 20px; line-height: 1.8; }
.guide-content li { margin-bottom: 10px; }
.guide-content em { font-style: italic; }
.guide-content strong { font-weight: 600; color: var(--walnut); }

/* --- Field note (first-hand author voice) ---------------------------------- */
.field-note {
  background: var(--kraft); border-left: 3px solid var(--terracotta);
  padding: 22px 26px; margin: 28px 0 36px; font-family: var(--font-serif);
}
.field-note__label {
  font-family: var(--font-sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--terracotta);
  margin-bottom: 10px; display: block;
}
.field-note__body { font-style: italic; font-size: 17px; line-height: 1.65; color: var(--walnut); margin-bottom: 0; }

/* --- Mug-Shot dossier card (Field Manual signature component) --------------- */
.dossier {
  background: var(--cream); border: 1px solid rgba(42, 33, 27, 0.18);
  margin: 40px 0 48px; box-shadow: 0 4px 28px rgba(42, 33, 27, 0.08);
}
.dossier__banner {
  background: var(--terracotta); color: var(--cream); padding: 12px 24px;
  display: flex; justify-content: space-between; align-items: center;
  letter-spacing: 0.08em; font-size: 11px; font-weight: 500;
  text-transform: uppercase; font-family: var(--font-sans);
}
.dossier__banner-seal { font-size: 10px; opacity: 0.92; letter-spacing: 0.18em; }
.dossier__body { padding: 28px 28px 24px; }
.dossier__id-block { margin-bottom: 24px; }
.dossier__kicker {
  font-size: 10px; color: var(--aged-ink); letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 8px; font-family: var(--font-sans);
}
.dossier__name {
  font-family: var(--font-serif); font-weight: 600; font-size: 38px;
  line-height: 1; letter-spacing: -0.012em; color: var(--walnut); margin: 0 0 8px;
}
.dossier__binomials { font-family: var(--font-serif); font-style: italic; font-size: 13px; color: var(--aged-ink); }
.dossier__mugshot {
  background: var(--walnut); aspect-ratio: 16 / 9;
  position: relative; overflow: hidden; margin-bottom: 24px;
}
.dossier__mugshot img { width: 100%; height: 100%; object-fit: contain; background: #ffffff; display: block; }
.dossier__mugshot-caption {
  position: absolute; bottom: 10px; left: 14px; color: var(--walnut);
  font-family: var(--font-sans); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 500;
  background: rgba(244, 238, 222, 0.92); padding: 4px 8px; border-radius: 2px;
}
.dossier__mugshot-caption span { opacity: 0.55; margin-left: 8px; font-weight: 400; text-transform: none; letter-spacing: 0.04em; }
.dossier__section { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid rgba(92, 79, 64, 0.16); }
.dossier__section:last-of-type { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.dossier__label {
  font-family: var(--font-sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--aged-ink); margin-bottom: 12px;
}
.dossier__vitals { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 28px; font-size: 13px; }
.dossier__vitals .vital { border-bottom: 1px dashed rgba(92, 79, 64, 0.28); padding: 7px 0; display: flex; justify-content: space-between; }
.dossier__vitals dt { color: var(--aged-ink); font-weight: 400; }
.dossier__vitals dd { color: var(--walnut); font-weight: 600; }
.dossier__protocol-row {
  display: grid; grid-template-columns: 70px 1fr; gap: 14px; padding: 9px 0;
  border-bottom: 1px solid rgba(92, 79, 64, 0.14); font-size: 13px; line-height: 1.55;
}
.dossier__protocol-row:last-child { border-bottom: none; }
.dossier__tier {
  color: var(--terracotta); font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; font-size: 10px; padding-top: 2px;
}
.dossier__action, .dossier__action strong { color: var(--walnut); }
.dossier__action strong { font-weight: 600; }
.dossier__prose { font-size: 14px; line-height: 1.6; color: var(--walnut); }

/* --- Sources callout ------------------------------------------------------- */
.callout--field {
  background: var(--kraft); border-left: 3px solid var(--aged-ink);
  padding: 24px 26px; margin: 48px 0 0;
}
.callout--field .callout__label {
  display: block; font-family: var(--font-sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--aged-ink); margin-bottom: 14px;
}
.callout--field p { font-size: 13px; line-height: 1.6; color: var(--aged-ink); margin-bottom: 12px; }
.callout--field p:last-child { margin-bottom: 0; }
.callout--field a { color: var(--forest-pine); }

/* --- Related --------------------------------------------------------------- */
.related { margin-top: 80px; padding-top: 80px; border-top: 1px solid rgba(42, 33, 27, 0.08); }
.related__label { font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 12px; }
.related h3 { margin-top: 0; font-size: 28px; margin-bottom: 32px; font-family: var(--font-serif); font-weight: 600; color: var(--walnut); }
.related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; max-width: var(--fm-content-width); }
.related-card {
  background: var(--kraft); border: 1px solid rgba(42, 33, 27, 0.08);
  overflow: hidden; transition: all 0.18s ease; display: flex; flex-direction: column;
}
.related-card:hover { border-color: rgba(42, 33, 27, 0.15); box-shadow: 0 4px 12px rgba(42, 33, 27, 0.08); text-decoration: none; }
.related-card__visual { width: 100%; aspect-ratio: 16 / 9; background: var(--walnut); position: relative; overflow: hidden; }
.related-card__visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guide-hero__visual-label { /* reused on related visuals in legacy via inline; keep base */ }
.related-card__body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.related-card__pillar { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 8px; }
.related-card h4 { font-family: var(--font-serif); font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--walnut); }
.related-card p { font-size: 13px; line-height: 1.6; color: var(--aged-ink); margin-bottom: 0; flex-grow: 1; }

/* --- In-body figures (e.g. Fungus Gnats lifecycle / protocol / substrate plates) */
.figure { margin: 36px 0 40px; }
.figure__frame { background: var(--cream); border: 1px solid rgba(42, 33, 27, 0.10); padding: 8px; }
.figure__frame img { width: 100%; height: auto; display: block; }
.figure__caption {
  font-family: var(--font-sans); font-size: 12px; color: var(--aged-ink);
  letter-spacing: 0.02em; margin-top: 12px; line-height: 1.5;
}
.figure__caption strong { font-weight: 600; color: var(--walnut); margin-right: 6px; }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .guide-layout__inner { grid-template-columns: 1fr; gap: 48px; }
  .guide-sidebar { position: relative; top: 0; }
  .dossier__vitals { grid-template-columns: 1fr; }
}

/* === Field Manual — DUAL dossier: two suspects, house-style cards + tab switch === */
.fmd { margin: 38px 0; }
.fmd__tabs { display: flex; gap: 6px; padding-left: 8px; position: relative; z-index: 2; }
.fmd__tab { appearance: none; cursor: pointer; border: 1px solid rgba(42, 33, 27, .18); border-bottom: none;
  background: var(--kraft); color: var(--aged-ink); font-family: var(--font-sans); font-weight: 600;
  font-size: 13.5px; letter-spacing: .02em; padding: 11px 18px 14px; border-radius: 8px 8px 0 0;
  margin-bottom: -1px; display: flex; align-items: center; gap: 9px; transition: background .15s, color .15s; }
.fmd__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: currentColor; opacity: .45; }
.fmd__tab--friend .fmd__dot { background: var(--forest-pine); opacity: 1; }
.fmd__tab--pest .fmd__dot { background: var(--terracotta); opacity: 1; }
.fmd__tab-word { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.fmd__tab[aria-selected="true"] { background: var(--cream); color: var(--walnut); }
.fmd__tab--friend[aria-selected="true"] { box-shadow: 0 -3px 0 var(--forest-pine) inset; }
.fmd__tab--pest[aria-selected="true"] { box-shadow: 0 -3px 0 var(--terracotta) inset; }
.fmd__panel[hidden] { display: none; }
.fmd .dossier { margin: 0; }
.fmd .dossier__mugshot img { object-fit: cover; }
.dossier--friend .dossier__banner { background: var(--forest-pine); }
.dossier__also { display: flex; gap: 14px; align-items: center; }
.dossier__also img { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; flex: none; }
.verdict-tag { font-weight: 700; }
.dossier--friend .verdict-tag { color: var(--forest-pine); }
.dossier--pest .verdict-tag { color: var(--terracotta); }
@media (max-width: 640px) {
  .dossier__also { flex-direction: column; align-items: flex-start; }
  .dossier__also img { width: 100%; height: auto; aspect-ratio: 16 / 10; }
}
