/* The page background on every ServStream page: a field of fine vertical lines that stays put while the page scrolls,
   brighter "rails" in the gutters beside the content, and lights that travel down the rails (a lead moving through
   the system). Pure CSS: the lines are anchored to each edge, so rails (placed on multiples of the 9px spacing) always
   sit exactly on a line. Needs: html{background} set, body transparent, and --wrap = the page's content width. */
:root{--zone:max(22px,calc((100vw - var(--wrap,1180px)) / 2 + 14px))}
.bgfx{position:fixed;left:0;top:0;width:100%;height:100vh;height:100lvh;z-index:-1;pointer-events:none;overflow:hidden;contain:strict}
.bg-glow{position:absolute;inset:0;background:
  radial-gradient(ellipse 62% 44% at 50% 108%,rgba(63,102,234,.34),transparent 70%),
  radial-gradient(ellipse 28% 20% at 50% 112%,rgba(240,113,79,.24),transparent 72%),
  radial-gradient(ellipse 34% 56% at -6% 38%,rgba(63,102,234,.2),transparent 70%),
  radial-gradient(ellipse 34% 56% at 106% 58%,rgba(124,155,255,.16),transparent 70%)}
.bg-lines{position:absolute;inset:0;background:
  repeating-linear-gradient(90deg,rgba(146,172,255,.36) 0 1px,transparent 1px 9px) left top/50% 100% no-repeat,
  repeating-linear-gradient(270deg,rgba(146,172,255,.36) 0 1px,transparent 1px 9px) right top/50% 100% no-repeat;
  /* strongest in the gutters and in a dome rising from the bottom; faint behind the reading column */
  -webkit-mask-image:radial-gradient(ellipse 58% 44% at 50% 106%,rgba(0,0,0,.85) 0,rgba(0,0,0,.45) 45%,transparent 78%),linear-gradient(90deg,#000 0,rgba(0,0,0,.6) 6%,rgba(0,0,0,.2) 17%,rgba(0,0,0,.09) 38%,rgba(0,0,0,.09) 62%,rgba(0,0,0,.2) 83%,rgba(0,0,0,.6) 94%,#000 100%);
  mask-image:radial-gradient(ellipse 58% 44% at 50% 106%,rgba(0,0,0,.85) 0,rgba(0,0,0,.45) 45%,transparent 78%),linear-gradient(90deg,#000 0,rgba(0,0,0,.6) 6%,rgba(0,0,0,.2) 17%,rgba(0,0,0,.09) 38%,rgba(0,0,0,.09) 62%,rgba(0,0,0,.2) 83%,rgba(0,0,0,.6) 94%,#000 100%)}
/* soft fade under the floating menu so the top edge never looks cut */
.bg-fade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(13,17,23,.85),rgba(13,17,23,0) 22%),rgba(128,136,154,.055)}

.bgr{position:absolute;top:0;bottom:0;width:1px;left:max(9px,calc(var(--zone) * var(--x)));left:max(9px,round(calc(var(--zone) * var(--x)),9px));
  background:linear-gradient(180deg,transparent 0,rgba(156,180,255,.3) 14%,rgba(156,180,255,.3) 86%,transparent 100%)}
.bgr.r{left:auto;right:max(9px,calc(var(--zone) * var(--x)));right:max(9px,round(calc(var(--zone) * var(--x)),9px))}
/* the light: a faint, soft glow on the line. It only moves while the page is scrolled (bg.js sets its position from
   how far down the page you are), so nothing moves while you read. */
.bgr i{position:absolute;left:-1px;top:0;width:3px;height:130px;border-radius:3px;opacity:.5;filter:blur(1.2px);
  background:linear-gradient(180deg,transparent 0,rgba(124,155,255,.28) 55%,rgba(176,196,255,.7) 100%);
  transform:translate3d(0,-150px,0);will-change:transform}
.bgr i:after{content:"";position:absolute;left:50%;bottom:-2px;width:5px;height:5px;margin-left:-2.5px;border-radius:50%;background:rgba(214,225,255,.85);
  box-shadow:0 0 12px 3px rgba(124,155,255,.45)}
.bgr.c i{background:linear-gradient(180deg,transparent 0,rgba(240,113,79,.26) 55%,rgba(255,180,155,.62) 100%)}
.bgr.c i:after{background:rgba(255,222,210,.85);box-shadow:0 0 12px 3px rgba(240,113,79,.4)}
/* narrow gutters (small laptops, tablets): two rails a side */
@media (max-width:1320px){.bgr.x{display:none}}
/* phones: no lines, rails or lights at all, just the soft glow and the grey wash under the glass */
@media (max-width:760px){.bg-lines,.bgr{display:none}}
/* motion off (the visitor's setting, or the Pause motion button): the rails stay, the lights go */
@media (prefers-reduced-motion:reduce){.bgr i{opacity:0}}
.still .bgr i{opacity:0}

/* Nov 18: neutral dark grey to match the app. Soft grey light instead of blue and coral, and white-grey lines. */
.bg-glow{background:
  radial-gradient(ellipse 62% 44% at 50% 108%,rgba(150,154,165,.2),transparent 70%),
  radial-gradient(ellipse 40% 50% at 4% -4%,rgba(120,124,136,.22),transparent 70%),
  radial-gradient(ellipse 34% 56% at -6% 48%,rgba(110,114,126,.14),transparent 70%),
  radial-gradient(ellipse 34% 56% at 106% 40%,rgba(130,134,146,.17),transparent 70%)}
.bg-lines{background:
  repeating-linear-gradient(90deg,rgba(205,210,222,.26) 0 1px,transparent 1px 9px) left top/50% 100% no-repeat,
  repeating-linear-gradient(270deg,rgba(205,210,222,.26) 0 1px,transparent 1px 9px) right top/50% 100% no-repeat}
.bg-fade{background:linear-gradient(180deg,rgba(14,15,17,.85),rgba(14,15,17,0) 22%),rgba(140,144,154,.04)}
.bgr{background:linear-gradient(180deg,transparent 0,rgba(210,214,226,.24) 14%,rgba(210,214,226,.24) 86%,transparent 100%)}
.bgr i{background:linear-gradient(180deg,transparent 0,rgba(200,205,218,.26) 55%,rgba(232,235,242,.7) 100%)}
.bgr i:after{background:rgba(240,242,247,.85);box-shadow:0 0 12px 3px rgba(200,205,218,.4)}
/* The same soft grey backdrop the app uses, so the glass has light to catch */
.bg-glow{background:
  radial-gradient(90vw 46vh at 8% -4%,#34363D,transparent 70%),
  radial-gradient(80vw 50vh at 108% 34%,#3A3C43,transparent 68%),
  radial-gradient(90vw 44vh at -6% 70%,#2A2C31,transparent 70%),
  radial-gradient(80vw 40vh at 100% 104%,#33353B,transparent 70%)}
@media (min-width:761px){.bg-glow{background:
  radial-gradient(60vw 50vh at 6% -6%,#30323A,transparent 70%),
  radial-gradient(46vw 60vh at 104% 30%,#35373E,transparent 68%),
  radial-gradient(50vw 56vh at -4% 72%,#282A2F,transparent 70%),
  radial-gradient(56vw 50vh at 96% 106%,#303238,transparent 70%)}}
