/* ---------------------------------------------------------------------------
   Light / dark theme
   Both palettes are the template's own token set — the same six values Framer
   switches on body[data-framer-theme]. They are declared on <html data-theme>
   so the stored preference applies before <body> is parsed: no flash of the
   wrong theme on load.
   theme.js sets the attribute; nothing here depends on JavaScript to render.
   --------------------------------------------------------------------------- */

html {
  color-scheme: light;
}

html[data-theme="light"] {
  color-scheme: light;
  background-color: #fafafa;
  --token-0c158ee4-88cd-48b7-9a67-3b5905bf9f82: #fafafa; /* page background */
  --token-41d960b9-3640-4e4a-9fdb-2f72d66e75e4: #000000; /* primary text    */
  --token-f7afee94-b3f4-4ed8-8699-23b46d5d40f1: #f0f0f0; /* surface / chip  */
  --token-e9418e5e-eca1-44bd-ab2c-698a47f0b501: #333333; /* soft text       */
  --token-10a6b8cb-573a-4491-aa89-cfade20f8790: #cccccc; /* border          */
  --token-6922676c-41fc-4547-98e0-6a22735231a7: #757575; /* muted text      */
}

/* Kept as the template's record of what a dark palette would be. NOT applied:
   build.py pins data-theme="light" on every page. See BUILD-NOTES 2026-12-05. */
html[data-theme="dark"] {
  color-scheme: dark;
  background-color: #0d0d0d;
  --token-0c158ee4-88cd-48b7-9a67-3b5905bf9f82: #0d0d0d;
  --token-41d960b9-3640-4e4a-9fdb-2f72d66e75e4: #fafafa;
  --token-f7afee94-b3f4-4ed8-8699-23b46d5d40f1: #1c1c1c;
  --token-e9418e5e-eca1-44bd-ab2c-698a47f0b501: #c2c2c2;
  --token-10a6b8cb-573a-4491-aa89-cfade20f8790: #2b2b2b;
  --token-6922676c-41fc-4547-98e0-6a22735231a7: #808080;
}

/* --- toggle icon: moon shows in light, sun shows in dark ------------------- */
.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-icon svg {
  display: block;
}
html[data-theme="light"] .theme-icon[data-icon="sun"] {
  display: none;
}
html[data-theme="dark"] .theme-icon[data-icon="moon"] {
  display: none;
}

/* No preference stored and no JS: fall back to the system setting. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    background-color: #0d0d0d;
  }
}
