/* THE SHARED PAGE BACKGROUND (Ollie, 6 Dec). One look on every standard page:
     1. the dark base with a soft navy glow at the top that fades to the base further down
        (the Planner's look);
     2. the faint blueprint dot grid across the top of the page, fading out (the Villages look);
     3. a brighter copy of the grid revealed in a soft circle round the mouse, fed --mx / --my
        by /js/page-bg.js. That script only runs with a mouse and without reduced motion
        (it sets html.gb-bg-live); touch screens and reduced motion get the static dots.

   It replaces /signature.css (the old per-page copy of the dots). Link it AFTER the page's
   own <style>: the background goes on <html>, <body> is transparent, and the dots sit on
   html::before / ::after at z-index -1, beneath everything, heroes included. */

html {
  background:
    radial-gradient(1200px 640px at 50% -8%, rgba(79,125,252,0.13), transparent 62%) no-repeat,
    radial-gradient(900px 520px at 88% 0%, rgba(79,125,252,0.05), transparent 60%) no-repeat,
    var(--bg, #0d1117) !important;
  min-height: 100%;
}
body { background: transparent !important; }

/* the dot grid: low opacity, across the top of the page, fading out by ~820px */
html::before,
html::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 820px;
  z-index: -1;
  pointer-events: none;
  background-size: 22px 22px;
}
html::before {
  background-image: radial-gradient(circle, rgba(120,160,255,0.11) 1px, transparent 1.6px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, rgba(0,0,0,0.65) 45%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, rgba(0,0,0,0.65) 45%, transparent 100%);
}
/* the mouse glow: the same grid, brighter, only inside a soft circle at the pointer */
html::after { display: none; }
html.gb-bg-live::after {
  display: block;
  background-image: radial-gradient(circle, rgba(150,185,255,0.5) 1px, transparent 1.7px);
  -webkit-mask-image:
    radial-gradient(circle 150px at var(--mx, -999px) var(--my, -999px), #000 0%, #000 26%, transparent 72%),
    linear-gradient(to bottom, #000 0, #000 52%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    radial-gradient(circle 150px at var(--mx, -999px) var(--my, -999px), #000 0%, #000 26%, transparent 72%),
    linear-gradient(to bottom, #000 0, #000 52%, transparent 100%);
          mask-composite: intersect;
}
@media (max-width: 700px) { html::before, html::after { height: 660px; } }
