Why can't the User Agent allow the user to set themes, with some sensible defaults provided? There should be a background color, foreground (text) color, a few accent colors, etc. Custom themes should only be used by applications which have really different requirements; background/foreground/accents/good-bad-error colors should be enough for 95% of them and the other 4% can interpolate to get more colors. This also helps people with special needs such as colorblindness (almost 10% of men) and poor eyesight.
For example, on KDE I can set a system-wide color scheme applied to Qt (and also attempted to apply to GTK) applications. It comes with a pretty good default light and dark theme, but the user can get any custom theme they want or make their own. It seems to work just fine here, with a wide variety of applications looking great even with nonstandard themes.
Of course HTML/CSS has been evolving for many decades, but there needs to be a reset at some point where we switch from legacy technology designed to make reading documents to a new system that is useful for making web applications and interactive documents.
One thing I've done on my browser is to disable custom fonts. Font CSS is ignored; all webpages render with GNU FreeFont (sans + serif; sans is very similar to San Francisco / Helvetica) and Fira Code. It looks great; once in a blue moon I find a page where typography is the focus of the page and in those instances I copy the URL into another browser. When I occasionally use that other browser for normal browsing, the presence of custom fonts makes me feel the same way as when you turn off an ad blocker and surf the web - it's absolutely disgusting. There's no reason to allow companies to push their ridiculous branding styles down our throats.
An idea I just had is to make a browser addon which automatically tries to do this - every element's color value is categorized as light, dark, accent, etc. and then gets replaced by the user-configured theme.