Right, I just fixed the dark mode colour contrast regressions I introduced this morning and the Kitten web site now conforms to WCAG 2.1 AA in both light mode and dark mode.
Let this be a lesson to you: remember to test both your light and dark mode styles for accessibility.
(PS. TIL that overriding CSS variables in :root {} also overrides :root nested in @media blocks. I’d have thought those would have greater specificity. See https://codeberg.org/kitten/site/commit/a8983f9e0c52b2ea5c8e05368c09f73a649ce546)