/** Applies the stored theme before paint to avoid a flash; inline script is allowed by CSP (unsafe-inline for scripts). */ export function ThemeScript() { const code = `(function(){try{var s=localStorage.getItem('as-theme');var d=s?s==='dark':window.matchMedia('(prefers-color-scheme: dark)').matches;if(d)document.documentElement.classList.add('dark');}catch(e){}})();`; // biome-ignore lint/security/noDangerouslySetInnerHtml: static, constant script return