Generate a sticky sidebar table of contents from H2 headings.
The TOC is rendered as a collapsible <details> (open on desktop, easily collapsed on mobile) inside an <aside> so it can sit in a sticky left column next to the article body. Each entry carries a semantic icon and a reading-depth layer badge (L1 quick / L2 analysis / L3 deep dive) derived from the language-stable section id, giving readers a fast visual map of the article in any of the 14 supported languages.
Returns an empty string for very short articles (fewer than two H2s).
Generate a sticky sidebar table of contents from H2 headings.
The TOC is rendered as a collapsible
<details>(open on desktop, easily collapsed on mobile) inside an<aside>so it can sit in a sticky left column next to the article body. Each entry carries a semantic icon and a reading-depth layer badge (L1 quick / L2 analysis / L3 deep dive) derived from the language-stable sectionid, giving readers a fast visual map of the article in any of the 14 supported languages.Returns an empty string for very short articles (fewer than two H2s).