/* AI Planter · diagrams and visual components for long-form guides (Oct 2026).
   Loaded only by articles that use inline SVG figures. Colours are semantic, taken from
   what the figures depict: living tissue, dead tissue, water, soil, leaf. */
.interior-page {
    --d-ink: #17201c;
    --d-ink-2: #3d5143;
    --d-muted: #5d6b62;
    --d-line: #cbd8c9;
    --d-line-soft: #e3eadf;
    --d-paper: #fffefa;
    --d-tint: #f0f4ec;
    --d-leaf: #2f7a56;
    --d-leaf-soft: #dcebdf;
    --d-live: #5f9f43;
    --d-live-soft: #e4f1d8;
    --d-dead: #8a5a38;
    --d-dead-soft: #f0e3d6;
    --d-water: #3f819b;
    --d-water-soft: #dcecf2;
    --d-warn: #a96a0b;
    --d-warn-soft: #f7e9cc;
    --d-soil: #7a5a42;
    --d-soil-soft: #d9c3a8;
}

/* Keep the back link clear of the fixed header (interior.css lets the 42px article
   padding override the header offset, which tucks the link underneath it). */
.interior-page.page-blog-detail .blog-post { padding-top: calc(var(--header-height, 72px) + 28px); }

/* ---- Contents list ------------------------------------------------------ */
.post-toc {
    margin: 0 0 var(--s-8, 40px);
    border: 1px solid var(--d-line);
    border-radius: 12px;
    background: var(--d-paper);
}
.post-toc > summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #355842;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.post-toc > summary::-webkit-details-marker { display: none; }
.post-toc > summary::after { content: '+'; font-size: 20px; font-weight: 400; letter-spacing: 0; line-height: 1; }
.post-toc[open] > summary::after { content: '\2212'; }
.post-toc ol {
    margin: 0;
    padding: 4px 20px 18px 42px;
    columns: 2;
    column-gap: 36px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--d-ink-2);
}
.post-toc li { margin: 0 0 8px; padding-left: 4px; break-inside: avoid; }
.post-toc a { color: var(--d-ink-2); text-decoration: none; border-bottom: 1px solid var(--d-line); }
.post-toc a:hover { color: var(--d-leaf); border-bottom-color: var(--d-leaf); }

/* ---- Share row near the top of the article ------------------------------ */
.interior-page .share-block--inline {
    margin: calc(var(--s-4, 16px) * -1) 0 var(--s-8, 40px);
    padding: 0;
    border: 0;
    background: none;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.share-inline-label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #355842; }
.share-block--inline .share-row { gap: 8px; }
.share-block--inline .share-btn { padding: 8px 12px; font-size: 13px; background: #fff; color: var(--d-ink); border-color: var(--d-line); }
.share-block--inline .share-btn:hover { background: var(--d-tint); }
.share-btn--email { background: #fff; color: var(--d-ink); }
.share-block .share-btn--email { background: #fff; color: var(--d-ink); }
@media (max-width: 640px) {
    .share-block--inline .share-btn { padding: 9px 11px; }
    .share-block--inline .share-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .share-block--inline .share-btn--copy .share-label,
    .share-block--inline .share-btn--native .share-label { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
}

/* ---- Figures ------------------------------------------------------------ */
.interior-page .post-content .fig {
    margin: 40px 0;
    border: 1px solid var(--d-line);
    border-radius: 12px;
    background: var(--d-paper);
    overflow: hidden;
}
.fig-body { padding: 18px 18px 6px; }
.fig-body svg { display: block; width: 100%; height: auto; max-width: 100%; }
.fig--narrow .fig-body svg { max-width: 460px; margin-inline: auto; }
.fig--mid .fig-body svg { max-width: 640px; margin-inline: auto; }
.interior-page .post-content .fig figcaption {
    padding: 4px 22px 16px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--d-muted);
}
.fig figcaption strong { color: var(--d-ink); }
.fig-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    padding: 12px 22px;
    border-top: 1px solid var(--d-line-soft);
    background: var(--d-tint);
    font-size: 13px;
}
.fig-tool {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--d-leaf);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: #b6c8b6;
    text-underline-offset: 3px;
}
.fig-tool:hover { text-decoration-color: currentColor; }
.interior-page .post-content .fig .fig-tool { color: var(--d-leaf); }
.fig-text { border-top: 1px solid var(--d-line-soft); font-size: 14px; color: var(--d-ink-2); }
.fig-text > summary { cursor: pointer; padding: 12px 22px; font-weight: 600; color: var(--d-ink-2); }
.fig-text > div { padding: 0 22px 18px; line-height: 1.7; }
.fig-text ol { margin: 8px 0 0; padding-left: 20px; }
.fig-text li { margin-bottom: 6px; }

/* Hero figure: replaces the stock photo; same footprint as .post-hero-image */
.interior-page .post-content .fig-hero,
.interior-page .fig-hero {
    margin: 0 0 40px;
    border: 1px solid var(--d-line);
    border-radius: 12px;
    background: var(--d-tint);
    overflow: hidden;
}
.fig-hero svg { display: block; width: 100%; height: auto; }
.fig-hero figcaption { padding: 10px 18px 14px; font-size: 13px; color: var(--d-muted); background: var(--d-paper); border-top: 1px solid var(--d-line-soft); }


/* ---- Panel figures: responsive grid of small drawings with real HTML text ---- */
.fig-grid { display: grid; gap: 26px 18px; padding: 24px 22px 12px; }
.fig-grid--2 { grid-template-columns: repeat(2, 1fr); }
.fig-grid--3 { grid-template-columns: repeat(3, 1fr); }
.fig-grid--4 { grid-template-columns: repeat(4, 1fr); }
.fig-grid--6 { grid-template-columns: repeat(6, 1fr); gap: 22px 10px; }
.fig-cell { text-align: center; min-width: 0; }
.fig-cell-svg { display: block; width: 100%; max-width: 172px; height: auto; margin: 0 auto 8px; }
.fig-grid--6 .fig-cell-svg { max-width: 118px; }
.fig-grid--2 .fig-cell-svg { max-width: 230px; }
.interior-page .post-content .fig-cell-title { margin: 0 0 2px; font-size: 15px; font-weight: 800; line-height: 1.35; color: var(--d-ink); }
.interior-page .post-content .fig-cell-sub { margin: 0 0 3px; font-size: 13.5px; line-height: 1.45; color: var(--d-muted); }
.interior-page .post-content .fig-cell-links { list-style: none; margin: 4px 0 0; padding: 0; font-size: 14px; line-height: 1.6; }
.interior-page .post-content .fig-cell-links li { margin: 0; padding: 0; }
.interior-page .post-content .fig-cell-links a { color: var(--d-leaf); }

/* Scratch-test figure: stem, cross-section and a numbered legend */
.fig-split { display: grid; grid-template-columns: 84px minmax(0, 250px) minmax(0, 1fr); gap: 8px 28px; align-items: center; padding: 22px 24px 8px; }
.fig-split svg { display: block; width: 100%; height: auto; }
.fig-legend { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 1.5; color: var(--d-ink-2); }
.interior-page .post-content .fig-legend li { margin: 0 0 10px; padding: 0 0 0 38px; position: relative; }
.fig-legend .fig-num { position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; background: var(--d-ink); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.fig-legend b { color: var(--d-ink); }
.fig-outcomes { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 6px 24px 14px; font-size: 14px; font-weight: 600; color: var(--d-ink); }
.fig-outcomes span { display: inline-flex; align-items: center; gap: 8px; }
.fig-outcomes i, .fig-swatch { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 3px; border: 1.5px solid; }
.sw-live { background: var(--d-live-soft); border-color: var(--d-live); }
.sw-dead { background: var(--d-dead-soft); border-color: var(--d-dead); }
.sw-air { background: #d9c3a8; border-color: var(--d-soil); }
.sw-wet { background: #cfe3ec; border-color: var(--d-water); }
.sw-stone { background: #c9cdc6; border-color: #8b918a; }

/* ---- SVG vocabulary shared by every figure ------------------------------ */
.fig svg text, .fig-hero svg text { font-family: var(--font-body, 'Nunito Sans', sans-serif); fill: var(--d-ink); }
.il-title { font-size: 15px; font-weight: 700; }
.il-label { font-size: 13px; font-weight: 600; }
.il-sub { font-size: 12px; font-weight: 400; fill: var(--d-ink-2); }
.il-hero-label { font-size: 28px; font-weight: 700; }
.il-hero-sub { font-size: 22px; font-weight: 700; }
.il-hero-note { font-size: 18px; font-weight: 500; fill: var(--d-ink-2); }
.il-link { font-size: 12.5px; font-weight: 600; fill: var(--d-leaf) !important; text-decoration: underline; text-decoration-color: #b6c8b6; text-underline-offset: 2px; }
.fig svg a:hover .il-link { text-decoration-color: currentColor; }
.il-note { font-size: 12px; font-weight: 600; fill: var(--d-muted); letter-spacing: .06em; text-transform: uppercase; }
.il-line { fill: none; stroke: var(--d-ink-2); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.il-leader { fill: none; stroke: var(--d-muted); stroke-width: 1; }
.il-leaf { fill: var(--d-leaf-soft); stroke: var(--d-leaf); stroke-width: 1.6; stroke-linejoin: round; }
.il-vein { fill: none; stroke: var(--d-leaf); stroke-width: 1.2; stroke-linecap: round; opacity: .85; }
.il-live { fill: var(--d-live-soft); stroke: var(--d-live); stroke-width: 1.6; }
.il-dead { fill: var(--d-dead-soft); stroke: var(--d-dead); stroke-width: 1.6; }
.il-water { fill: var(--d-water-soft); stroke: var(--d-water); stroke-width: 1.4; }
.il-soil { fill: var(--d-soil-soft); stroke: var(--d-soil); stroke-width: 1.4; }
.il-warn { fill: var(--d-warn-soft); stroke: var(--d-warn); stroke-width: 1.6; }
.il-pot { fill: #e9e5db; stroke: #8f8a7c; stroke-width: 1.6; }
.il-grow { fill: #f3f4ee; stroke: #5e6a62; stroke-width: 1.5; }
.il-bg { fill: var(--d-tint); }
.il-paper { fill: var(--d-paper); }
.il-ok text, .il-bad text { font-weight: 700; }

/* ---- Flowchart ---------------------------------------------------------- */
.fc-box { fill: #fff; stroke: var(--d-leaf); stroke-width: 1.6; }
.fc-q { fill: #fff; stroke: var(--d-ink-2); stroke-width: 1.6; }
.fc-ok { fill: var(--d-live-soft); stroke: var(--d-live); }
.fc-bad { fill: var(--d-dead-soft); stroke: var(--d-dead); }
.fc-warn { fill: var(--d-warn-soft); stroke: var(--d-warn); }
.fc-info { fill: var(--d-water-soft); stroke: var(--d-water); }
.fc-start { fill: var(--d-ink); stroke: var(--d-ink); }
.fc-start-text { fill: #fff !important; font-weight: 700; }
.fc-t { font-size: 15px; font-weight: 700; }
.fc-s { font-size: 13.5px; font-weight: 400; fill: var(--d-ink-2); }
.fc-edge { fill: none; stroke: var(--d-ink-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fc-edge-label { font-size: 13.5px; font-weight: 700; fill: var(--d-ink-2); paint-order: stroke; stroke: var(--d-paper); stroke-width: 5px; stroke-linejoin: round; }
.fc-arrow { fill: var(--d-ink-2); }
.fc-link text { fill: var(--d-leaf); text-decoration: underline; }

/* ---- Callouts and tables ------------------------------------------------ */
.interior-page .post-content .callout {
    margin: 32px 0;
    padding: 20px 24px;
    border-left: 3px solid var(--d-leaf);
    background: var(--d-tint);
    border-radius: 0 12px 12px 0;
    font-size: 16px;
    line-height: 1.7;
}
.interior-page .post-content .callout > :first-child { margin-top: 0; }
.interior-page .post-content .callout > :last-child { margin-bottom: 0; }
.interior-page .post-content .callout--warn { border-left-color: var(--d-warn); background: var(--d-warn-soft); }
.callout-title { display: block; margin-bottom: 4px; font-weight: 800; color: var(--d-ink); }

.table-wrap { margin: 32px 0; overflow-x: auto; border: 1px solid var(--d-line); border-radius: 12px; background: var(--d-paper); -webkit-overflow-scrolling: touch; }
.dx-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; line-height: 1.55; }
.dx-table caption { text-align: left; padding: 14px 18px 4px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #355842; caption-side: top; }
.dx-table th, .dx-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--d-line-soft); color: var(--d-ink-2); }
.dx-table thead th { background: #f0f4ec; color: #2b4a38; font-weight: 700; font-size: 13px; letter-spacing: .04em; border-top: 1px solid var(--d-line); }
.dx-table tbody th { color: var(--d-ink); font-weight: 700; background: none; width: 15%; min-width: 108px; }
.dx-table td strong { color: var(--d-ink); }
.dx-table--compact { min-width: 520px; }
.dx-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Plain-language steps that really are sequential */
.interior-page .post-content ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 24px 0; }
.interior-page .post-content ol.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 52px; margin: 0; }
.interior-page .post-content ol.steps > li::before {
    content: counter(step);
    position: absolute; left: 0; top: 0;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1.5px solid var(--d-leaf); color: var(--d-leaf);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px; background: var(--d-paper);
}
.interior-page .post-content ol.steps > li:not(:last-child)::after {
    content: ''; position: absolute; left: 16.5px; top: 38px; bottom: 4px; width: 1px; background: var(--d-line);
}
.interior-page .post-content ol.steps strong { color: var(--d-ink); }

/* Footnote under a table */
.interior-page .post-content .fig-note { margin: -18px 0 28px; color: var(--d-muted); line-height: 1.6; }

/* ---- Publisher strip under the toolkit CTA ------------------------------ */
.book-strip {
    margin: -8px 0 var(--s-8, 40px);
    padding: 16px 22px;
    border: 1px solid var(--d-line);
    border-radius: 12px;
    background: var(--d-paper);
    font-size: 14px;
    line-height: 1.65;
    color: var(--d-ink-2);
}
.book-strip strong { color: var(--d-ink); }
.book-strip a { color: var(--d-leaf); font-weight: 600; text-decoration: underline; text-decoration-color: #b6c8b6; text-underline-offset: 3px; }
.book-strip a:hover { text-decoration-color: currentColor; }
.book-strip p { margin: 0 0 6px; }
.book-strip p:last-child { margin-bottom: 0; }

/* ---- Motion: only when diagrams.js confirms the visitor allows it ------- */
@keyframes fig-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fig-draw { from { stroke-dashoffset: 1; opacity: 0; } 12% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes fig-pop { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
@keyframes fig-rise { from { transform: translateY(var(--rise, 40px)); } to { transform: translateY(0); } }
@keyframes fig-sway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
@keyframes fig-drip { 0% { transform: translateY(-16px); opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(var(--drip, 70px)); opacity: 0; } }
@keyframes fig-scan { 0% { transform: translateX(0); } 50% { transform: translateX(var(--scan, 120px)); } 100% { transform: translateX(0); } }
@keyframes fig-dash { to { stroke-dashoffset: -24; } }
@keyframes fig-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.anim-ready [data-fig] .a-node,
.anim-ready .fig-hero .a-node { opacity: 0; }
.anim-ready [data-fig] .a-edge,
.anim-ready .fig-hero .a-edge { opacity: 0; stroke-dasharray: 1; stroke-dashoffset: 1; }
.anim-ready [data-fig].in-view .a-node,
.anim-ready .fig-hero.in-view .a-node {
    transform-box: fill-box; transform-origin: center;
    animation: fig-pop .5s cubic-bezier(.2, .8, .3, 1) forwards;
    animation-delay: calc(var(--i, 0) * 110ms);
}
.anim-ready [data-fig].in-view .a-fade,
.anim-ready .fig-hero.in-view .a-fade { animation-name: fig-fade-up; animation-duration: .6s; animation-fill-mode: forwards; animation-delay: calc(var(--i, 0) * 110ms); transform-box: fill-box; }
.anim-ready [data-fig].in-view .a-edge,
.anim-ready .fig-hero.in-view .a-edge {
    animation: fig-draw .7s ease-out forwards;
    animation-delay: calc(var(--i, 0) * 110ms + 120ms);
}
.anim-ready [data-fig] .a-fade,
.anim-ready .fig-hero .a-fade { opacity: 0; }

/* Ambient loops (water, drips, sway) only run while the figure is on screen */
.a-loop { animation-play-state: paused; }
.in-view .a-loop { animation-play-state: running; }
.anim-ready .in-view .a-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: fig-sway 5s ease-in-out infinite; }
.anim-ready .in-view .a-node.a-sway {
    transform-box: fill-box; transform-origin: 50% 100%;
    animation: fig-pop .5s cubic-bezier(.2, .8, .3, 1) forwards, fig-sway 5s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 110ms), calc(var(--i, 0) * 110ms + 700ms);
}
.anim-ready .in-view .a-drip { animation: fig-drip 2.6s ease-in infinite; animation-delay: calc(var(--i, 0) * 700ms); }
.anim-ready .in-view .a-rise { animation: fig-rise 2.4s ease-out both; }
.anim-ready .in-view .a-scan { animation: fig-scan 4.2s ease-in-out infinite; }
.anim-ready .in-view .a-march { stroke-dasharray: 5 5; animation: fig-dash 1.4s linear infinite; }
.anim-ready .in-view .a-pulse { animation: fig-pulse 2.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .a-node, .a-edge, .a-fade, .a-loop, .a-sway, .a-drip, .a-rise, .a-scan, .a-march, .a-pulse { animation: none !important; opacity: 1 !important; stroke-dasharray: none !important; stroke-dashoffset: 0 !important; transform: none !important; }
}

/* ---- Small screens ------------------------------------------------------ */
@media (max-width: 720px) {
    .post-toc ol { columns: 1; }
    .fig-body { padding: 12px 10px 4px; }
    .interior-page .post-content .fig figcaption { padding: 4px 16px 14px; }
    .fig-tools { padding: 12px 16px; }
    .fig-text > summary { padding: 12px 16px; }
    .fig-text > div { padding: 0 16px 16px; }
    .interior-page .post-content .callout { padding: 16px 18px; }
    .book-strip { padding: 14px 16px; }
    .dx-table { font-size: 14px; }
    .dx-table th, .dx-table td { padding: 10px 12px; }
}

/* Wide comparison tables become stacked, labelled cards on phones (labels are
   injected from the header row by the generator). */
@media (max-width: 720px) {
    .table-wrap--stack { overflow: visible; border: 0; background: none; border-radius: 0; }
    .dx-table--stack { min-width: 0; display: block; }
    .dx-table--stack caption { display: block; padding: 0 0 10px; }
    .dx-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .dx-table--stack tbody, .dx-table--stack tr, .dx-table--stack th, .dx-table--stack td { display: block; width: auto; }
    .dx-table--stack tr { margin: 0 0 14px; border: 1px solid var(--d-line); border-radius: 12px; background: var(--d-paper); overflow: hidden; }
    .dx-table--stack tbody th { width: auto; min-width: 0; background: var(--d-tint); border-top: 0; font-size: 15px; }
    .dx-table--stack td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #355842; }
}

@media (max-width: 720px) {
    .fig-grid { padding: 20px 14px 8px; gap: 22px 12px; }
    .fig-grid--3, .fig-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .fig-grid--6 { grid-template-columns: repeat(3, 1fr); }
    .fig-split { grid-template-columns: 64px minmax(0, 1fr); padding: 18px 16px 6px; gap: 12px 16px; }
    .fig-split .fig-legend { grid-column: 1 / -1; }
    .fig-outcomes { padding: 6px 16px 12px; }
    .fig-body { padding: 10px 4px 4px; }
}
@media (max-width: 560px) {
    .il-hero-note { display: none; }
    .fig-grid--3 { grid-template-columns: 1fr; }
    .fig-grid--3 .fig-cell { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0 14px; text-align: left; align-items: start; }
    .fig-grid--3 .fig-cell-svg { grid-row: 1 / span 6; margin: 0; }
}
@media (max-width: 380px) {
    .fig-grid--6 { grid-template-columns: repeat(2, 1fr); }
}
@media print {
    .share-block, .share-block--inline, .ebook-inline-cta, .book-strip, .fig-tools, .post-toc { display: none !important; }
    .fig { break-inside: avoid; }
}
