/* Site r71: Follow the sun. /assets/sun-follow.js writes --bg --card --text --muted --accent --sky-top --sky-bottom
   (and -rgb triples) and the sun and moon positions on <html>, and sets html[data-sun] plus the base view
   (html[data-view]: sunrise under dark text, sunset or night under light text) so every view-made detail still has
   a home. This file points the site's own colour tokens at those variables. Loaded after the shared stylesheet. */
@property --bg{syntax:'<color>';inherits:true;initial-value:#FFF8EC}
@property --card{syntax:'<color>';inherits:true;initial-value:#FFFFFF}
@property --text{syntax:'<color>';inherits:true;initial-value:#182022}
@property --muted{syntax:'<color>';inherits:true;initial-value:#343B3D}
@property --accent{syntax:'<color>';inherits:true;initial-value:#B31600}
@property --sky-top{syntax:'<color>';inherits:true;initial-value:#E4F3F6}
@property --sky-bottom{syntax:'<color>';inherits:true;initial-value:#FFF6E1}
html[data-sun]{transition:--bg 1.5s ease,--card 1.5s ease,--text 1.5s ease,--muted 1.5s ease,--accent 1.5s ease,--sky-top 1.5s ease,--sky-bottom 1.5s ease}
html.sun-jump,html.sun-jump .tc-hero .sky i{transition:none!important}
@media (prefers-reduced-motion:reduce){html[data-sun],html[data-sun] .tc-hero .sky i{transition:none!important}}

/* the page, its type and its cards */
html[data-sun],html[data-sun] body{background:var(--bg)}
html[data-sun]{--bs-body-bg:var(--bg);--bs-body-bg-rgb:var(--bg-rgb);--bs-body-color:var(--text);--bs-body-color-rgb:var(--text-rgb);
  --bs-heading-color:var(--text);--bs-emphasis-color:var(--text);--bs-secondary-color:var(--muted);--bs-secondary-color-rgb:var(--muted-rgb);
  --bs-secondary-bg:var(--card);--bs-tertiary-bg:var(--card);--bs-link-color:var(--accent);--bs-link-color-rgb:var(--accent-rgb);
  --bs-link-hover-color:var(--text);--bs-primary-text-emphasis:var(--accent);--bs-border-color:color-mix(in oklab,var(--text) 22%,transparent)}
html[data-sun] body[data-concept="01"]{
  --tc-page:var(--bg);--tc-fg:var(--text);--tc-acc:var(--accent);--tc-tint:var(--accent);--tc-quote:var(--accent);--tc-tint2:var(--muted);
  --tc-stroke:var(--text);--tc-ln:var(--text-rgb);--tc-sc:var(--bg-rgb);
  --tc-line:color-mix(in oklab,var(--text) 16%,transparent);--tc-line2:color-mix(in oklab,var(--text) 42%,transparent);
  --tc-glass:color-mix(in oklab,var(--card) 72%,transparent);
  --tc-gwater:var(--bg);--tc-gpaper:var(--bg);--tc-g10:var(--bg);--tc-g30a:var(--bg);
  --tc-g30b:color-mix(in oklab,var(--bg) 82%,var(--card));--tc-g60:color-mix(in oklab,var(--bg) 82%,var(--card));
  --tc-g80a:color-mix(in oklab,var(--bg) 82%,var(--card));--tc-g80b:color-mix(in oklab,var(--bg) 70%,var(--card));
  --tc-run-bg:var(--bg);--tc-thumbcut:var(--card);--tc-mbar-bg:var(--bg);--tc-mbar-bd:color-mix(in oklab,var(--text) 18%,transparent);
  --tc-toast-bg:var(--card);--tc-mc-bg:var(--card);--tc-mc-fg:var(--text);
  --tc-cg1:var(--card);--tc-cg2:var(--card);
  --tc-gauge-fg:var(--text);--tc-gauge-rgb:var(--text-rgb);--tc-gauge-acc:var(--accent);
  background:var(--bg);color:var(--text)}
/* the header and the menu drawer */
html[data-sun] .rn-header,html[data-sun] .rn-drawer{--rn-paper:var(--bg);--rn-ink:var(--text);--rn-link:var(--accent);--rn-sand:var(--card);
  --rn-grey:var(--muted);--rn-hair:color-mix(in oklab,var(--text) 22%,transparent)}

/* the hero sky: the scrim's upper half takes the sky colours; the lower half stays dark under the white headline */
html[data-sun] .tc-hero .tc-hero-scrim{background:linear-gradient(180deg,color-mix(in oklab,var(--sky-top) 62%,transparent) 0%,
  color-mix(in oklab,var(--sky-bottom) 30%,transparent) 30%,rgba(24,32,34,.42) 55%,rgba(24,32,34,.9) 100%)}
/* the sun and the moon on their real arcs (east on the left, west on the right) */
html[data-sun] .tc-hero .sky-rays{display:none!important}
html[data-sun] .tc-hero .sky-sun{display:block!important;left:calc(var(--sun-x) * 1%)!important;top:calc(var(--sun-y) * 1%)!important;right:auto!important;bottom:auto!important;
  width:clamp(64px,8vw,128px)!important;height:auto!important;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);opacity:var(--sun-up);
  background:radial-gradient(circle,#FFF4CC 0 30%,#FDDEA0 46%,#FBBC42 64%,rgba(251,188,66,0) 70%);box-shadow:none;mix-blend-mode:normal;
  transition:left 1.5s ease,top 1.5s ease,opacity 1.5s ease}
html[data-sun] .tc-hero .sky-moon{display:block!important;left:calc(var(--moon-x) * 1%)!important;top:calc(var(--moon-y) * 1%)!important;right:auto!important;
  width:clamp(36px,4vw,60px)!important;height:auto!important;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);opacity:var(--moon-up);
  background:#FFF4D6;box-shadow:inset -12px -4px 0 0 #E9D9AE,0 0 34px 6px rgba(255,244,214,.3);transition:left 1.5s ease,top 1.5s ease,opacity 1.5s ease}

/* the footer picker */
.vrow [data-sun-pick][aria-pressed="true"]{font-weight:700}
