/* Load after palettes.css. The third gradient study, shared by calendar and picker. */
html[data-palette="glow"],
.palette-samples[data-palette="glow"] {
  --glow-base: #fbfafc;
  --cal-zero-bg: linear-gradient(125deg, #f6f4f8, #eeebf1);
  --cal-zero-text: #6f6878;
  --cal-low-bg: #d7ac3d40; --cal-low-text: #785e18;
  --cal-mid-bg: #6fa75e40; --cal-mid-text: #426f33;
  --cal-high-bg: #43a78f40; --cal-high-text: #276653;
  --cal-premium-bg: #5b93d750; --cal-premium-text: #365f93;
  --cal-peak-bg: #a573d550; --cal-peak-text: #704694;
  --cal-loss-bg: #ae3d5550; --cal-loss-text: #8e3544;
}
html[data-theme="dark"][data-palette="glow"],
html[data-theme="dark"] .palette-samples[data-palette="glow"] {
  --glow-base: linear-gradient(135deg, #2c2831, #232127);
  --cal-zero-bg: linear-gradient(125deg, #29262e, #242128);
  --cal-zero-text: #aaa5b1;
  --cal-low-bg: #d7ac3d40; --cal-low-text: #ebce7e;
  --cal-mid-bg: #6fa75e40; --cal-mid-text: #b5d9a3;
  --cal-high-bg: #43a78f40; --cal-high-text: #8dd0bd;
  --cal-premium-bg: #5b93d750; --cal-premium-text: #a2c6f4;
  --cal-peak-bg: #a573d550; --cal-peak-text: #d5b5ed;
  --cal-loss-bg: #ae3d5550; --cal-loss-text: #f0a8b4;
}

html[data-palette="glow"] .day.heat-negative,
.palette-samples[data-palette="glow"] .palette-sample.heat-negative {
  --glow: var(--cal-loss-bg); --glow-ink: var(--cal-loss-text);
}
html[data-palette="glow"] .day.heat-1,
.palette-samples[data-palette="glow"] .palette-sample.heat-1 {
  --glow: var(--cal-low-bg); --glow-ink: var(--cal-low-text);
}
html[data-palette="glow"] .day.heat-2,
.palette-samples[data-palette="glow"] .palette-sample.heat-2 {
  --glow: var(--cal-mid-bg); --glow-ink: var(--cal-mid-text);
}
html[data-palette="glow"] .day.heat-3,
.palette-samples[data-palette="glow"] .palette-sample.heat-3 {
  --glow: var(--cal-high-bg); --glow-ink: var(--cal-high-text);
}
html[data-palette="glow"] .day.heat-4,
.palette-samples[data-palette="glow"] .palette-sample.heat-4 {
  --glow: var(--cal-premium-bg); --glow-ink: var(--cal-premium-text);
}
html[data-palette="glow"] .day.heat-5,
.palette-samples[data-palette="glow"] .palette-sample.heat-5 {
  --glow: var(--cal-peak-bg); --glow-ink: var(--cal-peak-text);
}
html[data-palette="glow"] .day:not(.heat-0),
.palette-samples[data-palette="glow"] .palette-sample:not(.heat-0) {
  background: radial-gradient(ellipse at 100% 0%, var(--glow), transparent 85%), var(--glow-base);
  color: var(--glow-ink);
  border: 1px solid color-mix(in srgb, var(--glow-ink) 16%, transparent);
  box-shadow: none;
}
html[data-palette="glow"] .day.heat-0,
.palette-samples[data-palette="glow"] .palette-sample.heat-0 {
  background: var(--cal-zero-bg);
  color: var(--cal-zero-text);
}

/* Keep decoration behind content without changing the existing today/focus outlines. */
html[data-palette="glow"] .day {
  isolation: isolate;
  overflow: hidden;
}
html[data-palette="glow"] .day:not(.heat-0)::before,
html[data-palette="glow"] .day:not(.heat-0)::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .035;
  width: 170px;
  height: 170px;
  right: -85px;
  bottom: -128px;
}
html[data-palette="glow"] .day:not(.heat-0)::after {
  width: 210px;
  height: 210px;
  right: -104px;
  bottom: -148px;
}

/* Tiny legend markers use the study's solid ink, so all seven bands stay legible. */
html[data-palette="glow"] .swatch.negative { background: var(--cal-loss-text); }
html[data-palette="glow"] .swatch.level1 { background: var(--cal-low-text); }
html[data-palette="glow"] .swatch.level2 { background: var(--cal-mid-text); }
html[data-palette="glow"] .swatch.level3 { background: var(--cal-high-text); }
html[data-palette="glow"] .swatch.level4 { background: var(--cal-premium-text); }
html[data-palette="glow"] .swatch.level5 { background: var(--cal-peak-text); }

@media (max-width: 620px) {
  html[data-palette="glow"] .day::before,
  html[data-palette="glow"] .day::after { display: none; }
}
