tabatkinsjon_neal using prefers-color-scheme as an input to the system - a way of setting the default value. But then you can toggle the value, and query the current setting in a style query.
@ container style(color-scheme: dark) { /* apply dark mode here */ }
Something like that?