import { Html, Head, Main, NextScript } from 'next/document' // Cottage is light-first; dark ("evening") follows the OS setting. The tokens switch on // data-theme, set here before first paint so there's no flash. const themeScript = `(function(){var m=window.matchMedia('(prefers-color-scheme: dark)');function s(){document.documentElement.setAttribute('data-theme',m.matches?'dark':'light')}s();m.addEventListener('change',s)})()` export default function Document() { return (