/* Shared HES sky. Static fallback; bounded viewport particles when JS mounts. */
body.hes-dotted-background {
  --hes-sky-surface: #080914;
  --hes-dot-main: rgba(224, 215, 255, .30);
  --hes-dot-soft: rgba(187, 168, 255, .18);
  --hes-dot-cyan: rgba(116, 230, 232, .23);
  min-height: 100svh;
  background-color: var(--hes-sky-surface);
  background-image:
    radial-gradient(circle at 13px 21px, var(--hes-dot-main) .85px, transparent 1.45px),
    radial-gradient(circle at 43px 57px, var(--hes-dot-soft) .65px, transparent 1.25px),
    radial-gradient(circle at 79px 31px, var(--hes-dot-cyan) .8px, transparent 1.4px),
    radial-gradient(circle at 109px 113px, var(--hes-dot-main) 1px, transparent 1.6px);
  background-size: 67px 83px, 97px 109px, 139px 157px, 211px 223px;
  background-repeat: repeat;
}

body.hes-stars-mounted { isolation: isolate; background-image: none; }
.hes-stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
.hes-stars-canvas { display: block; width: 100%; height: 100%; }
.hes-stars-settings { display: flex; justify-content: center; padding: 0 16px 24px; }
.hes-stars-toggle {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  color: inherit;
  background: var(--hes-sky-surface);
  cursor: pointer;
}
.hes-stars-toggle:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  .hes-stars-settings { display: none; }
}

/* Keep the approved cabinet palette and existing light forms/documents. */
body.hes-dotted-background.cabinet-studio { --hes-sky-surface: #101012; }
body.hes-dotted-background.hes-dots-light {
  --hes-sky-surface: #f3f5f1;
  --hes-dot-main: rgba(36, 89, 76, .25);
  --hes-dot-soft: rgba(36, 89, 76, .12);
  --hes-dot-cyan: rgba(35, 82, 109, .18);
}

/* Shared full-width surfaces keep the continuous page texture. */
.hes-dotted-background .site-footer { background: transparent; }
@media print {
  body.hes-dotted-background { background-image: none; }
  .hes-stars, .hes-stars-settings { display: none; }
}
