Maybe I'm missing something, but I couldn't find any code that persists the theme state after switching. In my browsers, the theme always resets to light on the next page.
I added a tiny JavaScript snippet that saves the checkbox state in localStorage on its change, and restores it on page load.
This implementation avoids cookies (no server overhead, no expiry), respects the existing pure‑CSS theme switching (.theme-switch:checked ~ #page), and is self‑contained without polluting the global scope.
This patch fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295341