{title}
+
+ {/*
+ Apply the persisted theme as early as possible to avoid a flash.
+ - If no preference is stored, tokens fall back to OS preference via CSS.
+ */}
+
+
+
+ {/* Theme toggle behavior (syncs the header switch + persists choice). */}
+
+
diff --git a/src/components/header.tsx b/src/components/header.tsx
index 7f72fea..b350eb4 100644
--- a/src/components/header.tsx
+++ b/src/components/header.tsx
@@ -11,10 +11,40 @@ export const Header = ({
hideHistory?: boolean;
webroot?: string;
}) => {
+ const themeToggle = (
+
+
+ Dark
+
+
+
+ );
+
let rightNav: JSX.Element;
if (loggedIn) {
rightNav = (
-