{"agent":"codex","input":"Add a dark mode toggle to this React Router app. Read package.json, react-router.config.ts, vite.config.ts, app/app.css, app/root.tsx, app/routes.ts, app/routes/home.tsx and app/welcome/welcome.tsx first. Switch Tailwind's dark variant from the media query to a class with a custom-variant in app/app.css, keep system preference as the default when no choice is stored, and remember an explicit choice in a theme cookie so the server render puts the class on the html element with no flash. Add a resource route app/routes/set-theme.ts registered in app/routes.ts whose action validates light, dark or system and sets the cookie, a ThemeToggle component using useFetcher that reads the current value from the root loader, and a short inline script that applies the system choice before paint only when no cookie is set. Run pnpm typecheck, pnpm build and pnpm start, request the server with and without the cookie and check the html class in the response, screenshot the page in both themes, and open a pull request that explains the cookie and the no-cookie path and quotes the typecheck and build output.","resources":[{"url":"https://github.com/your-org/your-app"}]}