Wouldn't the following be a better version of the above.
Use css variables everywhere, and have a defs-dark.css and a defs-light.css that define the colors.
Then, on nginx, serve the correct stylesheet based on cookie value.
Better than subdomains for dark and light, no?