/* ─────────────────────────────────────────────────────────────
   Wald & Forst Job – Inhaltsseiten (Wissen, Leitfaden)
   Baut auf job-forst.css auf und nutzt dieselben Tokens.
───────────────────────────────────────────────────────────── */

:root {
  --text:    #2E322B;   /* Fließtext: 11:1 auf Creme */
  --rule:    rgba(26,31,24,0.12);
  --bark:    #8A6A4F;   /* Rindenbraun für Schemazeichnungen */
  --phloem:  #E9D8B8;   /* Bast */
  --sap:     #F4EBD6;   /* Splintholz */
}

body.sub { background: var(--cream); }

/* ── Seitenkopf ───────────────────────────────────────── */
.page-head {
  padding: 9.5rem 3rem 3.5rem;
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
}
.page-head-inner { max-width: 1180px; margin: 0 auto; }

.crumbs { margin-bottom: 1.6rem; }
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--mid);
}
.crumbs li + li::before { content: '/'; margin-right: 0.4rem; opacity: 0.6; }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink); }

.page-title {
  hyphens: auto;
  overflow-wrap: break-word;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.6rem, 5.5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 16ch;
}
.page-title em { font-style: italic; color: var(--green); }

.page-lead {
  margin-top: 1.4rem;
  max-width: 62ch;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text);
}
.page-meta {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  font-size: 0.78rem;
  color: var(--mid);
}

/* ── Zweispaltiges Layout mit Inhaltsverzeichnis ──────── */
.doc {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 3rem 6rem;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 5rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: 6.5rem;
  font-size: 0.82rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding-right: 0.5rem;
}
.toc-title {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.9rem;
}
.toc ol { list-style: none; border-left: 1.5px solid var(--rule); }
.toc li a {
  display: block;
  padding: 0.38rem 0 0.38rem 1rem;
  margin-left: -1.5px;
  border-left: 1.5px solid transparent;
  color: var(--mid);
  line-height: 1.35;
  transition: color 0.15s, border-color 0.15s;
}
.toc li a:hover { color: var(--ink); }
.toc li a[aria-current] { color: var(--ink); border-left-color: var(--green); font-weight: 500; }

/* ── Fließtext ────────────────────────────────────────── */
.prose { max-width: min(70ch, 100%); min-width: 0; color: var(--text); }
.prose > section { scroll-margin-top: 6.5rem; }
.prose > section + section { margin-top: 4.5rem; padding-top: 4.5rem; border-top: 1px solid var(--rule); }

.prose h2 {
  hyphens: auto;
  overflow-wrap: break-word;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.prose h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--ink);
  margin: 2.2rem 0 0.6rem;
}
.prose p, .prose li { font-size: 1rem; font-weight: 300; line-height: 1.8; }
.prose p + p { margin-top: 1rem; }
.prose strong { font-weight: 500; color: var(--ink); }
.prose em { font-style: italic; }
.prose ul, .prose ol { margin: 1rem 0 1rem 1.3rem; }
.prose li + li { margin-top: 0.35rem; }
.prose a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose abbr[title] { text-decoration: underline dotted; cursor: help; }

.section-eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-l);
  margin-bottom: 0.8rem;
}

/* Quellenhinweis direkt am Absatz */
.src {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--mid);
  white-space: nowrap;
}
.src a { color: var(--mid); }

/* ── Kästen ───────────────────────────────────────────── */
.box {
  margin: 1.8rem 0;
  padding: 1.4rem 1.6rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--rule);
}
.box-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.box p, .box li { font-size: 0.94rem; }
.box.merke { background: var(--sage); border-color: transparent; }
.box.achtung { background: var(--pink); border-color: transparent; }
.box.dark { background: var(--green); border-color: transparent; color: #fff; }
.box.dark .box-title { color: var(--yellow); font-style: italic; }
.box.dark p, .box.dark li { color: rgba(255,255,255,0.85); }
.box.dark a { color: var(--yellow); }

/* ── Zwei Käferarten nebeneinander ────────────────────── */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.8rem 0;
}
.pair > div {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
}
.pair h3 { margin-top: 0; font-family: var(--serif); font-weight: 900; font-size: 1.3rem; }
.pair .latin { font-style: italic; font-size: 0.85rem; color: var(--mid); margin: 0.1rem 0 0.8rem; }
.pair dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; font-size: 0.88rem; }
.pair dt { color: var(--mid); }
.pair dd { color: var(--ink); line-height: 1.5; }

/* ── Abbildungen ──────────────────────────────────────── */
.fig { margin: 2rem 0; }
.fig img, .fig svg { width: 100%; height: auto; border-radius: 12px; display: block; }
.fig figcaption {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--mid);
}

/* Schemazeichnung Fraßbild */
.diagram { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 1.2rem; }
.diagram svg { border-radius: 8px; }
.diagram text { font-family: var(--sans); }

/* ── Tabellen ─────────────────────────────────────────── */
.table-wrap { max-width: 100%; overflow-x: auto; margin: 1.8rem 0; border-radius: 12px; border: 1px solid var(--rule); background: #fff; }
.table-wrap:focus-visible { outline: 3px solid var(--green-l); outline-offset: 3px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
caption {
  text-align: left;
  padding: 1rem 1.2rem 0.4rem;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1rem;
  color: var(--ink);
}
th, td { text-align: left; vertical-align: top; padding: 0.85rem 1.2rem; border-top: 1px solid var(--rule); line-height: 1.55; }
thead th { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); border-top: none; }
tbody th { font-weight: 500; color: var(--ink); }
td { font-weight: 300; color: var(--text); }
td.num, th.num { white-space: nowrap; font-family: var(--serif); font-weight: 900; font-size: 1.05rem; color: var(--green); }
tr.hl td, tr.hl th { background: var(--sage); }

/* ── Glossar ──────────────────────────────────────────── */
.glossar { margin-top: 1.4rem; }
.glossar div { padding: 1rem 0; border-top: 1px solid var(--rule); }
.glossar dt {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--ink);
  scroll-margin-top: 6.5rem;
}
.glossar dd { margin-top: 0.3rem; font-size: 0.95rem; font-weight: 300; line-height: 1.7; }

/* ── Quellenverzeichnis ───────────────────────────────── */
.quellen { list-style: none; margin: 1.2rem 0 0; counter-reset: q; }
.quellen li {
  counter-increment: q;
  position: relative;
  padding: 0.8rem 0 0.8rem 2.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  line-height: 1.6;
}
.quellen li::before {
  content: counter(q);
  position: absolute;
  left: 0; top: 0.8rem;
  font-family: var(--serif);
  font-weight: 900;
  color: var(--green);
}
.quellen .q-type { display: block; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); margin-bottom: 0.15rem; }

/* ── Leitfaden: Jahresband ────────────────────────────── */
.year {
  margin: 2rem 0 1rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.4rem 1.4rem 1.2rem;
}
.year-grid {
  display: grid;
  grid-template-columns: 9.5rem repeat(24, minmax(0, 1fr));
  row-gap: 0.55rem;
  align-items: center;
  font-size: 0.78rem;
}
.year-grid .m { grid-column: span 2; text-align: center; color: var(--mid); font-size: 0.72rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--rule); }
.year-grid .lab { color: var(--ink); font-weight: 500; line-height: 1.25; padding-right: 0.8rem; }
.bar {
  height: 1.55rem;
  border-radius: 100px;
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.bar.prep   { background: var(--sage);  color: var(--green); }
.bar.swarm  { background: var(--green); color: #fff; }
.bar.late   { background: var(--pink);  color: var(--ink); }
.bar.fund   { background: none; justify-content: center; padding: 0; overflow: visible; }
.bar.fund b { background: var(--yellow); color: var(--ink); font-weight: 500; font-size: 0.66rem; padding: 0.2rem 0.45rem; border-radius: 100px; }
.print-btn { margin-top: 1.4rem; background: none; border: 1.5px solid var(--green); color: var(--green); border-radius: 100px; padding: 0.55rem 1.2rem; font: inherit; font-size: 0.82rem; font-weight: 500; cursor: pointer; }
.print-btn:hover { background: var(--green); color: #fff; }
.prose .year-note { margin-top: 0.9rem; font-size: 0.78rem; color: var(--mid); line-height: 1.5; }

/* ── Leitfaden: Phasen ────────────────────────────────── */
.phase {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 8.5rem minmax(0,1fr);
  gap: 1.5rem;
}
.phase-when {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1.2;
  color: var(--green);
  padding-top: 0.2rem;
}
.phase-when small { display: block; font-family: var(--sans); font-weight: 400; font-size: 0.72rem; color: var(--mid); margin-top: 0.3rem; letter-spacing: 0.04em; }
.phase h3 { margin-top: 0; }
.todo { list-style: none; margin: 0.6rem 0 0 !important; }
.todo li {
  position: relative;
  padding-left: 1.6rem;
}
.todo li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.5em;
  width: 0.85rem; height: 0.85rem;
  border: 1.5px solid var(--green);
  border-radius: 4px;
}

/* ── Leitfaden: Befund-Schritte (echte Reihenfolge) ──── */
.steps-list { list-style: none; margin: 1.6rem 0 0 !important; counter-reset: st; }
.steps-list > li {
  counter-increment: st;
  position: relative;
  padding: 1.2rem 0 1.2rem 3.4rem;
  border-top: 1px solid var(--rule);
}
.steps-list > li::before {
  content: counter(st);
  position: absolute;
  left: 0; top: 1.1rem;
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--yellow);
  font-family: var(--serif);
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.steps-list strong { display: block; margin-bottom: 0.2rem; }

/* ── Kennzahlen für Erfahrene ─────────────────────────── */
.kz { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; margin: 1.6rem 0; }
.kz div { background: #fff; padding: 1.1rem 1.2rem; }
.kz b { display: block; font-family: var(--serif); font-weight: 900; font-size: 1.5rem; color: var(--green); line-height: 1.1; }
.kz span { display: block; margin-top: 0.3rem; font-size: 0.8rem; color: var(--text); line-height: 1.45; }

/* ── Abschluss-Aufruf ─────────────────────────────────── */
.cta-band {
  background: var(--green);
  color: #fff;
  padding: 5rem 3rem;
}
.cta-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: center; }
.cta-band h2 { color: #fff; font-size: clamp(2rem, 3.5vw, 3rem); margin-bottom: 0.8rem; }
.cta-band p { color: rgba(255,255,255,0.8); font-weight: 300; line-height: 1.7; max-width: 52ch; }
.cta-actions { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }
.btn-yellow { background: var(--yellow); color: var(--ink); padding: 0.9rem 1.8rem; border-radius: 100px; font-weight: 500; font-size: 0.9rem; }
.btn-yellow:hover { opacity: 0.9; }
.cta-band .btn-ghost { color: #fff; text-decoration: underline; text-underline-offset: 4px; font-size: 0.9rem; }

.disclaimer { max-width: 70ch; margin-top: 3rem; font-size: 0.82rem; color: var(--mid); line-height: 1.6; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 980px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding: 2.5rem 1.5rem 5rem; }
  .toc, .prose { min-width: 0; max-width: 100%; }
  .toc { position: static; max-height: none; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 1.2rem 1.2rem 0.8rem; }
  .page-head { padding: 8rem 1.5rem 2.5rem; }
  .cta-band { padding: 4rem 1.5rem; }
  .cta-inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .pair { grid-template-columns: 1fr; }
  .phase { grid-template-columns: 1fr; gap: 0.4rem; }
  .year-grid { grid-template-columns: 6.5rem repeat(24, minmax(0, 1fr)); font-size: 0.7rem; }
  .year-grid .m { font-size: 0.62rem; }
  .bar { font-size: 0; padding: 0; height: 1.1rem; }
  .bar.fund b { font-size: 0.55rem; padding: 0.15rem 0.3rem; }   /* Text steht als Beschriftung links und in der Liste darunter */
}

/* ── Druck (Leitfaden als Handzettel) ─────────────────── */
@media print {
  nav, .mobile-menu, .cookie-banner, .toc, .cta-band, footer, .skip-link, .no-print { display: none !important; }
  body, body.sub { background: #fff; font-size: 11pt; }
  .page-head { padding: 0 0 1rem; border: none; }
  .doc { display: block; padding: 0; max-width: none; }
  .prose { max-width: none; }
  .prose > section + section { margin-top: 1.5rem; padding-top: 1.5rem; }
  .prose a { color: #000; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; word-break: break-all; }
  .box, .year, .table-wrap, .phase, .steps-list > li { break-inside: avoid; }
  .bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
