// themes.jsx — theme + density swapper, applied to <html> via data-attrs.
// Three variations the user asked for:
//   "editorial" — warm off-white, serif display (Newsreader), minimal chrome
//   "lab"       — dark monospace terminal aesthetic
//   "studio"    — bright white, generous radii, modern SaaS look

const THEMES = ['editorial', 'lab', 'studio'];
const DENSITIES = ['compact', 'regular', 'roomy'];

function applyTheme(theme) {
  document.documentElement.setAttribute('data-theme', theme);
}
function applyDensity(density) {
  document.documentElement.setAttribute('data-density', density);
}

// Apply defaults immediately so first paint doesn't flash unstyled.
applyTheme('editorial');
applyDensity('regular');

Object.assign(window, { THEMES, DENSITIES, applyTheme, applyDensity });
