/* The TANNED ground, from the brand book v2 (8 October 2026): one cream ground, and the one soft peach glow
   behind it, placed by sun.js where the reader's sun is (off the top right without it).
   It sets every colour token the pages use, and html:root[data-ground] outranks the pages' own :root. */
html:root[data-ground]{
  --ground:#F6EEE4; --raised:#FBF6F0; --card:#FBF6F0; --paper:#FBF6F0; --field:#EFE4D8; --sand:#EFE4D8;
  --tan:#D9A47A; --ink:#1A1816; --ink-2:#57524D; --line:#DDD3C8; --line-strong:#1A1816;
  --sun-orange:#C8321A; --green:#1E7A46; --peach:#F1D6C6;
  --accent:var(--sun-orange); --sea:var(--ink); --ok:var(--green); --no:var(--sun-orange); --c-ink:var(--ink);
  --lift:none; --glow-a:rgba(241,214,198,.9); --glow-b:rgba(241,214,198,.35);
  --radius-card:14px; --radius-field:12px;
  --f-display:"TANNED Sans","Futura","Avenir Next","Century Gothic",system-ui,sans-serif;
  --f-text:"TANNED Text","Iowan Old Style","Georgia",serif;
  --f-label:var(--f-display);
  color-scheme:light;
}
/* the peach glow: one radial light, nothing else */
html:root[data-ground] body{
  background-color:var(--ground);
  background-image:radial-gradient(var(--sun-sx,90%) var(--sun-sy,55%) at var(--sun-x,92%) var(--sun-y,-12%), var(--glow-a), var(--glow-b) 42%, transparent 72%);
  background-attachment:fixed;
  background-repeat:no-repeat;
}
@media (max-width:700px){
  html:root[data-ground] body{background-attachment:scroll}
}
/* nothing spins, and a reader who asks for less motion gets none */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* the sun's caption: where the light comes from */
.sun-chip{position:fixed;left:max(12px,env(safe-area-inset-left,0px));bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:40;display:flex;align-items:center;gap:8px;max-width:min(560px,calc(100vw - 24px));padding:7px 8px 7px 10px;border-radius:999px;background:rgba(255,255,255,.88);border:1px solid var(--line,#DDD3C8);font-family:var(--f-display,"Futura",system-ui,sans-serif);font-size:.75rem;letter-spacing:.02em;color:var(--ink,#1A1816);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.sun-chip i{flex:none;width:12px;height:12px;border-radius:50%;background:var(--tan,#D9A47A);box-shadow:0 0 10px 3px rgba(241,214,198,.9)}
.sun-chip span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums}
.sun-chip button{flex:none;height:24px;padding:0 10px;border-radius:999px;border:1px solid var(--ink,#1A1816);background:transparent;color:inherit;font:inherit;cursor:pointer}
.sun-chip button:focus-visible{outline:2px solid var(--ink,#1A1816);outline-offset:2px}
@media (max-width:520px){.sun-chip{font-size:.6875rem}}
@media print{.sun-chip{display:none}}
