IMHO, it’s more about security than about incorrect behavior.
User styles and script shouldn’t impact the whole site.
In addition, if CSS frameworks used for styling they often have CSS reset rules that applied to body and html element, and if they not applied we get improper style because body and html CSS rules are important for overall CSS framework style. But if they applied we break the whole site design.
Which is why I think it’s important that CSS frameworks are cool for styling complicated cards like programming or science. Using of manual styles in card type template is tedious in these cases. It’s simpler include one file, then add few html tags with classes and to get cool styled card.
The study screen is hosted on a different domain to limit what JavaScript can do. I agree an iframe solution would be better, but when I tried it in the the past I ran into problems, and have not had a chance to return to it yet.