.tree-explainer { padding: 88px 0 64px; background: var(--bg-band); border-block: 1px solid var(--line); scroll-margin-top: 84px; }
.te-heading { display: grid; grid-template-columns: 1.2fr 1fr; align-items: end; gap: 64px; margin-bottom: 40px; }
.tree-explainer .te-heading h2 { font-size: clamp(2rem, 3.8vw, 3.25rem); line-height: 1.12; font-weight: 600; letter-spacing: -.035em; margin: 0; }
.te-heading h2 span { color: var(--gg-text-2); }
.te-heading > p { max-width: 40ch; font-size: 1rem; color: var(--gg-text-2); line-height: 1.7; margin: 0; }
.te-interactive-controls { display: none; grid-template-columns: repeat(5, 1fr); border-block: 1px solid var(--line-2); }
.te-ready .te-interactive-controls { display: grid; }
.te-interactive-controls button { position: relative; min-height: 65px; padding: 16px 10px; display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--gg-text-2); font-size: .95rem; font-weight: 600; border-bottom: 2px solid transparent; }
.te-interactive-controls button[aria-selected="true"] { color: var(--gg-text); border-bottom-color: var(--gg-orange); background: var(--panel); }
.te-interactive-controls button:hover { background: var(--surface); color: var(--gg-text); }
.te-interactive-controls button:active { background: var(--surface-hi); }
.te-step { font-size: max(.75rem, 11px); color: var(--gg-text-3); font-variant-numeric: tabular-nums; }
.te-interactive-controls button[aria-selected="true"] .te-step { color: var(--gg-orange); }
.te-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
.te-figure { margin: 0; min-width: 0; }
.te-diagram { width: 100%; height: auto; }
.te-figure figcaption { display: flex; align-items: center; gap: 9px; color: var(--gg-text-2); font-size: max(.8rem, 11px); padding: 6px 0 20px; }
.te-legend { width: 7px; height: 7px; background: var(--gg-orange); border-radius: 50%; flex-shrink: 0; }
.te-legend-trunk,.te-legend-health { background: var(--gg-yellow); }
.te-legend-branches { background: var(--gg-text); }
.te-legend-canopy { background: var(--gg-green); }
.te-count { margin-left: auto; color: var(--gg-text-3); font-variant-numeric: tabular-nums; }
.te-copy { padding: 38px 0; }
.te-copy [role="tabpanel"] { min-height: 325px; }
.te-chapter { color: var(--gg-orange); font-weight: 600; margin-bottom: 14px; font-size: max(.85rem, 11px); }
.te-copy h3 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); line-height: 1.2; font-weight: 600; letter-spacing: -.025em; margin: 0 0 22px; max-width: 22ch; }
.te-body { font-size: 1rem; line-height: 1.75; color: var(--gg-text-2); max-width: 46ch; }
.te-observation { border-top: 1px solid var(--line-2); margin-top: 26px; padding-top: 20px; }
.te-observation h4 { font-size: .85rem; font-weight: 700; margin-bottom: 7px; }
.te-observation p { font-size: .9rem; color: var(--gg-text-2); line-height: 1.7; }
.te-interactive-actions { display: none; align-items: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 20px; }
.te-ready .te-interactive-actions { display: flex; }
.te-next { display: inline-flex; gap: 12px; align-items: center; color: var(--gg-yellow); min-height: 44px; font-size: .95rem; font-weight: 600; }
.te-next:hover { text-decoration: underline; }
.te-replay { color: var(--gg-text-2); font-size: max(.8rem, 11px); min-height: 44px; text-decoration: underline; text-underline-offset: .2em; }
.te-transcript { border-top: 1px solid var(--line-2); margin-top: 16px; }
.te-transcript summary { cursor: pointer; padding: 18px 0; font-size: .9rem; color: var(--gg-text-2); }
.te-transcript article { max-width: 70ch; margin: 12px 0 28px; }
.te-transcript article h3 { font-size: 1.15rem; margin-bottom: 10px; }
.te-transcript article p { color: var(--gg-text-2); margin-bottom: 10px; }
.te-footer { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-top: 14px; border-top: 1px solid var(--line); font-size: max(.8rem, 11px); color: var(--gg-text-3); }
.te-footer p { max-width: 65ch; }
.te-footer a { display: inline-flex; gap: 8px; align-items: center; color: var(--gg-text-2); min-height: 44px; }
.te-footer a:hover { text-decoration: underline; }
.te-standalone-header { max-width: var(--maxw); padding: 26px 28px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.te-standalone-header img { height: 50px; width: auto; }
.te-standalone-header a { color: var(--gg-text-2); font-size: .9rem; min-height: 44px; display: inline-flex; align-items: center; }
.te-standalone-title { font-size: 1rem; font-weight: 600; }
.te-standalone .tree-explainer { padding-top: 48px; }
@media (max-width: 760px) {
 .tree-explainer { padding: 48px 0 36px; }
 .te-heading { grid-template-columns: 1fr; gap: 20px; margin-bottom: 26px; }
 .te-heading > p { max-width: 50ch; }
 .te-layout { grid-template-columns: 1fr; gap: 0; }
 .te-figure { max-width: 480px; width: 100%; margin: auto; }
 .te-diagram { max-height: 350px; }
 .te-diagram text { font-size: 26px; }
 .te-interactive-controls button { flex-direction: column; gap: 4px; padding: 12px 3px; font-size: max(.75rem, 11px); min-height: 66px; }
 .te-copy { padding: 22px 0 10px; }
 .te-copy [role="tabpanel"] { min-height: 310px; }
 .te-copy h3 { max-width: 26ch; }
 .te-body { max-width: 60ch; }
 .te-figure figcaption { padding-bottom: 0; }
 .te-footer { flex-direction: column; gap: 6px; }
 .te-standalone-header { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
 .tree-explainer *, .tree-explainer *::before, .tree-explainer *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}

/* The oak is the hero subject. The chapter controls and explanation sit beside it. */
.tree-explainer > .wrap { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr); grid-template-areas: "intro art" "tabs art" "copy art" "transcript transcript" "footer footer"; column-gap: 36px; }
.te-heading { grid-area: intro; display: block; margin: 0 0 28px; }
.tree-explainer .te-heading h2 { font-size: clamp(2rem, 3.3vw, 3rem); }
.te-heading > p { margin-top: 22px; }
.te-interactive-controls { grid-area: tabs; }
.te-interactive-controls button { flex-direction: column; gap: 4px; padding: 12px 3px; font-size: max(.76rem, 11px); }
.te-layout { display: contents; }
.te-figure { grid-area: art; align-self: center; width: 100%; }
.te-diagram { width: 100%; height: auto; max-height: none; }
.te-figure figcaption { margin: 18px 8px 0; }
.te-copy { grid-area: copy; padding: 28px 0 10px; }
.te-copy [role="tabpanel"] { min-height: 340px; }
.te-copy h3 { font-size: clamp(1.5rem, 2.2vw, 1.85rem); }
.te-transcript { grid-area: transcript; }
.te-footer { grid-area: footer; }
.te-standalone .tree-explainer { padding-top: 36px; }
@media (max-width: 760px) {
 .tree-explainer > .wrap { grid-template-columns: minmax(0,1fr); grid-template-areas: "intro" "art" "tabs" "copy" "transcript" "footer"; }
 .te-heading { margin-bottom: 12px; }
 .te-figure { max-width: none; }
 .te-figure figcaption { margin: 8px 0 20px; padding: 0; }
 .te-copy [role="tabpanel"] { min-height: 310px; }
 .te-standalone .tree-explainer { padding-top: 26px; }
}
