- theme.css: semantic tokens (bg, surface, ink, border, brand, tints, status, glass) - ThemeSwitch.tsx: radiogroup with light/dark/auto, persisted in localStorage - auto mode follows device time (06:00-18:00 light), rechecks every minute and on visibilitychange - inline pre-paint script in layout.tsx prevents flash of wrong theme - remapped ~250 hardcoded hex declarations across styles to tokens - fixed --c-ink-2 contrast 4.25 -> 5.36 (WCAG AA) in light mode - 0 contrast failures below 4.5:1 across 8 pages in both themes - DESIGN.md: documented theme system
Frontend — Next.js App Router
npm install
npm run dev
Talks to backend purely via REST through nginx (/api/*, /files/*).