DOC: Fixing styles for the dark theme
- [X] closes ##48527
- [X] xref #48285

I checked that the bright theme continues to look good, and it fixes the most obvious problems of the dark theme.
Thanks @datapythonista 