"Sticky" Tablet of contents?

I find it very easy to get lost in long rich text docs. There are two issues: i) headings 1 through 4 are indiscernible, the differences are so small that its hard to visually tell the headings hierarchy. ii) the ToC should have an option to be sticky, i.e. be always on and not only when clicking on it. Connected to this It’s also not ideal that the expanded ToC covers over the rich text.

Thoughts?

I think this makes sense if there was only one panel open. But if two panels are open side-by-side, then screen real estate quickly becomes an issue. How do you imagine this working when two panels are open?