Along these lines, I've always liked the system Randall uses for What If: https://what-if.xkcd.com/
Agreed. I've pinched his popup implementation for my homepage and expanded it a little so that there's both a footnotes section with anchor links at the bottom for non-JS use and search engines, as well as the popup panels. E.g. https://www.buttercookie.de/The%20Burkiss%20Way/Transcripts/...
Your suggestion is noted, though!