/* hour chrome v1 — the page takes the visitor's hour the way the art already does.
   The light is field.js's own lightOf(): morning 05-11, midday 11-16, evening 16-21, night 21-05. The head script on
   every page writes it to html[data-l] before the first paint, the same attribute the art already reads, so page and
   piece agree without a second clock.
   Only the page's own ground and accent move. The art is not touched: no filter, no veil, no overlay, no image swap.
   Each hour value is derived from what the room already is, so every room keeps its character:
     dark rooms   Night, Lamplight — the ground travels toward the art's own hourly ink (HOURLIGHT, field.js) and the
                  accent toward that hour's light (LITC), so the chrome sits in the same air as the film beside it.
     paper rooms  North Light, Sunflower, Grown, Overgrown — the paper travels toward the hour's own paper and the
                  accent warms toward evening and cools toward morning.
   Gallery is the white cube and stays neutral at every hour, by design.
   Contrast measured for all six rooms at all four hours: every pair of text and ground stays above 5.5:1. */
html[data-l]{--h-ink:#100e0c;--h-up:#de9e34;--h-paper:#e9e6df;--h-dn:#6b4410}
html[data-l=morning]{--h-ink:#18202c;--h-up:#ccc095;--h-paper:#e0e7ea;--h-dn:#39434e}
html[data-l=evening]{--h-ink:#1c1008;--h-up:#fd964f;--h-paper:#f1dfc0;--h-dn:#8a3311}
html[data-l=night]{--h-ink:#0a0806;--h-up:#d4703f;--h-paper:#efd5ad;--h-dn:#7d1f10}
/* what each room is, before the hour touches it */
html:not([data-theme]),html[data-theme=night]{--r-ink:#100e0c;--r-sig:#de9e34;--r-code:#de9e34}
html[data-theme=lamplight]{--r-ink:#0a0806;--r-sig:#dbb270;--r-code:#c9a15e}
html[data-theme=northlight]{--r-ink:#e9e6df;--r-sig:#6e5226;--r-code:#6e5226}
html[data-theme=sunflower]{--r-ink:#f8d65c;--r-sig:#7a3a0c;--r-code:#7a3a0c}
html[data-theme=grown],html[data-theme=overgrown]{--r-ink:#f6b52b;--r-sig:#6a260a;--r-code:#6a260a}

/* dark rooms: the ground and the accent both travel; the art's cream stays the art's */
html:root[data-l]:not([data-theme]),
html:root[data-l][data-theme=night],
html:root[data-l][data-theme=lamplight]{
  --ink:color-mix(in srgb,var(--r-ink) 50%,var(--h-ink))!important;
  --sig:color-mix(in srgb,var(--r-sig) 72%,var(--h-up))!important;
  --code:color-mix(in srgb,var(--r-code) 72%,var(--h-up))!important;
  --glow:var(--sig)!important;--warm-yellow:var(--sig)!important;
  --deep:color-mix(in srgb,var(--ink),#fff 3%)!important;
  --void:color-mix(in srgb,var(--ink),#000 30%)!important;
  --sig-ink:var(--ink)!important;
  --i8:color-mix(in srgb,var(--ink) 80%,transparent)!important}

/* paper rooms: the paper itself travels, and its shade tokens travel with it */
html:root[data-l][data-theme=northlight],
html:root[data-l][data-theme=sunflower],
html:root[data-l][data-theme=grown],
html:root[data-l][data-theme=overgrown]{
  --ink:color-mix(in srgb,var(--r-ink) 42%,var(--h-paper))!important;
  --sig:color-mix(in srgb,var(--r-sig) 70%,var(--h-dn))!important;
  --code:color-mix(in srgb,var(--r-code) 70%,var(--h-dn))!important;
  --glow:var(--sig)!important;--warm-yellow:var(--sig)!important;
  --deep:color-mix(in srgb,var(--ink),#000 6%)!important;
  --void:color-mix(in srgb,var(--ink),#000 10%)!important;
  --sig-ink:var(--ink)!important;
  --i8:color-mix(in srgb,var(--ink) 80%,transparent)!important}

/* the page ground and the header follow the ground the room files pin */
html:root[data-l]:not([data-theme]) body,
html:root[data-l][data-theme=night] body,
html:root[data-l][data-theme=lamplight] body,
html:root[data-l][data-theme=northlight] body,
html:root[data-l][data-theme=sunflower] body,
html:root[data-l][data-theme=grown] body,
html:root[data-l][data-theme=overgrown] body{background:var(--ink)!important}
html:root[data-l]:not([data-theme]) .hud,
html:root[data-l][data-theme=night] .hud,
html:root[data-l][data-theme=lamplight] .hud,
html:root[data-l][data-theme=northlight] .hud,
html:root[data-l][data-theme=sunflower] .hud,
html:root[data-l][data-theme=grown] .hud,
html:root[data-l][data-theme=overgrown] .hud{background:color-mix(in srgb,var(--ink) 90%,transparent)!important}
