// Applied before first paint to avoid a flash of the wrong theme. Lives in a file (not // inline) so the SPA can ship a CSP with script-src 'self' (AUDIT M-2). (function () { try { // Dark-first: default new users to dark unless they've chosen light. var t = localStorage.getItem('ii:theme') || 'dark'; if (t === 'dark') document.documentElement.classList.add('dark'); } catch (e) {} })();