The server-side twin of theme.js's resolution, for ui <- function(request):
?theme=dark|light in the query string, else the cc_theme cookie
(Domain=.calcofi.io, set by any CalCOFI site's toggle), else default.
Pass the result as mode to cc_brand_header() so bslib's switch starts in
the right state and the page never flashes the other colour.
Usage
cc_theme(request = NULL, default = c("dark", "light"))