/* GoLab liquid glass buttons (rebuilt 30 Nov 2026).
   Clear glass like the Fortabbas glass buttons, with GoLab's square corners and no casing: no ring, no bevel and no
   solid fill. The button is see-through and bends what is behind it (glass.js, Chrome and Edge):
   - At rest the glass evenly magnifies what is behind it.
   - On hover it pinches inwards: it tilts towards the pointer and sinks back, the background squeezes in, a liquid
     lens follows the pointer and the colours split into red and cyan (on the text and on the background).
   - The pointer is the light: a soft shine inside and a flare on the nearest edge follow it, gliding rather than
     jumping. At rest the light sits top left, which gives the thin white top edge. A soft shadow makes it float.
   Other browsers (Safari, every iPhone browser, Firefox) get frosted glass with the same light and shadow.
   Primary buttons are blue-tinted glass with a deep blue label; secondary buttons are clear glass; selected tabs and
   options are navy glass (shine, but no edge flare). On dark sections the labels turn white.
   Linked from every new-design page by build.js and from the old-template pages by renderV2 in src/pages.js
   (src/glassx.js writes the links).
   Admin settings (Design › Glass buttons): label colours at rest and on hover, a white, dark or chosen background on
   hover, labels on dark sections, glow, colour split and light. src/glassx.js turns them into the custom properties
   and classes used below (--gx-t1, --gx-hb1, html.gx-hb1 and so on); every one falls back to the design, so the
   default settings change nothing. The lens and the bending are set in glass.js.
   On/off: admin › Design › Effects › Glass and frost › Liquid glass buttons. Off adds class "no-gx" to <html>, and every
   rule here is behind html:not(.no-gx), so the original buttons come back untouched. ?glass=off or ?glass=on in any
   address overrides it for that page view.
   The pages are pre-rendered with inline styles, so rules use !important. The tab and option buttons on Pricing and
   Demo Lab are matched by role, because their inline styles are rewritten when those sections re-render. */

html:not(.no-gx){--gx-ease:cubic-bezier(.2,.8,.2,1)}

/* ---------- Every glass button: clear glass ---------- */
html:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab,button:is([role=tab],[role=radio])[style*="solid"]){
  --gx-lx:28%;--gx-ly:0%;--gx-rx:0deg;--gx-ry:0deg;--gx-on:0;
  position:relative;isolation:isolate;overflow:visible!important;border-radius:0!important;border-color:transparent!important;
  color:#101828!important;text-shadow:0 1px 0 rgba(255,255,255,.55)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.42),rgba(208,214,228,.2))!important;
  -webkit-backdrop-filter:blur(9px) saturate(175%) brightness(1.05);backdrop-filter:blur(9px) saturate(175%) brightness(1.05);
  box-shadow:0 14px 26px -14px rgba(16,32,70,.42),0 3px 8px -3px rgba(16,32,70,.14)!important;
  transform:perspective(560px) translateY(-1px) rotateX(var(--gx-rx)) rotateY(var(--gx-ry))!important;
  transition:transform .34s var(--gx-ease),box-shadow .34s var(--gx-ease),text-shadow .28s,color .28s,background .28s!important;
  -webkit-tap-highlight-color:transparent;
}
/* Chrome and Edge: glass.js sets --gxf to this button's own refraction filter. Almost no blur, so the bending shows. */
html:not(.no-gx) .gx-rf{-webkit-backdrop-filter:var(--gxf) blur(.3px) saturate(180%) brightness(1.06)!important;backdrop-filter:var(--gxf) blur(.3px) saturate(180%) brightness(1.06)!important}

/* Primary buttons: blue-tinted glass, deep blue label (white on see-through blue would be hard to read on white pages) */
html:not(.no-gx) :where(.b1,.b3:not(.v2l *)){
  color:var(--gx-t1,#0A3FA8)!important;
  background:linear-gradient(180deg,rgba(84,150,255,.32),rgba(10,108,255,.16))!important;
  box-shadow:0 16px 28px -14px rgba(10,80,200,.5),0 3px 8px -3px rgba(10,60,160,.18)!important;
}

/* Second buttons and the menu button: clear glass, ink label */
html:not(.no-gx) :where(.b2,.mnav>summary){color:var(--gx-t2,#101828)!important}

/* Selected tabs and options: navy glass, white label */
html:not(.no-gx) :where(.tab.on,.tab[aria-selected=true],button:is([role=tab],[role=radio])[style*="solid"]:is([aria-selected=true],[aria-checked=true])){
  color:#fff!important;text-shadow:0 1px 1px rgba(0,0,0,.3)!important;
  background:linear-gradient(180deg,rgba(24,44,98,.86),rgba(10,24,62,.8))!important;
  box-shadow:0 14px 26px -14px rgba(11,18,32,.6),0 3px 8px -3px rgba(11,18,32,.25)!important;
}

/* Dark sections (glass.js adds .gx-dk): white labels, brighter light */
html:not(.no-gx) .gx-dk{
  color:var(--gx-tdk,#fff)!important;text-shadow:0 1px 1px rgba(0,0,0,.35)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.17),rgba(255,255,255,.05))!important;
  box-shadow:0 18px 32px -14px rgba(0,0,0,.65),0 3px 8px -3px rgba(0,0,0,.3)!important;
}
html:not(.no-gx) :where(.tab.on,.tab[aria-selected=true],button:is([role=tab],[role=radio])[style*="solid"]:is([aria-selected=true],[aria-checked=true])).gx-dk{color:#fff!important}
html:not(.no-gx) :where(.b1,.b3:not(.v2l *)).gx-dk{
  background:linear-gradient(180deg,rgba(84,150,255,.5),rgba(10,108,255,.3))!important;
  box-shadow:0 18px 32px -14px rgba(10,80,200,.7),0 3px 8px -3px rgba(0,0,0,.3)!important;
}

/* Icons in buttons follow the label colour */
html:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab) svg{color:inherit;transition:filter .28s}

/* ---------- Light ---------- */
/* Shine inside the glass: a soft bright spot where the light is, and a faint top sheen. Replaces the old fill sweep. */
html:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab,button:is([role=tab],[role=radio])[style*="solid"])::before{
  content:""!important;display:block!important;position:absolute!important;inset:0!important;z-index:-1!important;
  pointer-events:none;transform:none!important;border-radius:inherit;
  background:
    radial-gradient(150px 90px at var(--gx-lx) var(--gx-ly),rgba(255,255,255,calc((.26 + var(--gx-on) * .3) * var(--gx-light,1))),rgba(255,255,255,0) 72%),
    linear-gradient(180deg,rgba(255,255,255,calc(.2 * var(--gx-light,1))),rgba(255,255,255,0) 48%)!important;
  transition:opacity .3s!important;
}
/* Edge flare: a thin highlight on the part of the edge nearest the light. Not a frame: it fades out along the rest. */
html:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab,button:is([role=tab],[role=radio])[style*="solid"])::after{
  content:""!important;display:block!important;position:absolute!important;inset:0!important;z-index:-1!important;
  pointer-events:none;padding:1px;box-sizing:border-box;border-radius:inherit;
  background:radial-gradient(170px 64px at var(--gx-lx) var(--gx-ly),rgba(255,255,255,calc((.85 + var(--gx-on) * .15) * var(--gx-light,1))),rgba(255,255,255,0) 72%)!important;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);
  opacity:calc(.75 + var(--gx-on) * .25);
}
/* Selected navy tabs keep the shine but no edge flare, so they stay frameless */
html:not(.no-gx) :where(.tab.on,.tab[aria-selected=true],button:is([role=tab],[role=radio])[style*="solid"]:is([aria-selected=true],[aria-checked=true]))::after{display:none!important}
html:not(.no-gx) .gx-dk::before{background:
    radial-gradient(150px 90px at var(--gx-lx) var(--gx-ly),rgba(255,255,255,calc((.22 + var(--gx-on) * .3) * var(--gx-light,1))),rgba(255,255,255,0) 72%),
    linear-gradient(180deg,rgba(255,255,255,calc(.14 * var(--gx-light,1))),rgba(255,255,255,0) 48%)!important}

/* ---------- Hover and touch: tilt towards the pointer, sink back, colours split ----------
   glass.js adds .gx-on while the pointer is over the button or a finger is on it (no :hover, so it can't stick on phones). */
html:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab,button:is([role=tab],[role=radio])[style*="solid"]).gx-on:not(:disabled,[aria-disabled=true]){
  transform:perspective(560px) translateZ(var(--gx-sink,-9px)) rotateX(var(--gx-rx)) rotateY(var(--gx-ry))!important;
  box-shadow:0 8px 16px -10px rgba(16,32,70,.45),0 1px 3px rgba(16,32,70,.12)!important;
  text-shadow:calc(var(--gx-ts,1.1px) * -1) 0 var(--gx-ca,rgba(255,0,72,.55)),var(--gx-ts,1.1px) 0 var(--gx-cb,rgba(0,196,255,.65))!important;
}
html:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab).gx-on:not(:disabled,[aria-disabled=true]) svg{filter:drop-shadow(calc(var(--gx-ts,1px) * -1) 0 var(--gx-ca,rgba(255,0,72,.55))) drop-shadow(var(--gx-ts,1px) 0 var(--gx-cb,rgba(0,196,255,.65)))}
html:not(.no-gx) .gx-dk.gx-on:not(:disabled,[aria-disabled=true]){box-shadow:0 10px 18px -10px rgba(0,0,0,.6),0 1px 3px rgba(0,0,0,.3)!important;text-shadow:calc(var(--gx-ts,1.2px) * -1) 0 var(--gx-cadk,rgba(255,40,96,.75)),var(--gx-ts,1.2px) 0 var(--gx-cbdk,rgba(0,210,255,.8))!important}
html:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab,button:is([role=tab],[role=radio])[style*="solid"]):active:not(:disabled,[aria-disabled=true]){
  transform:perspective(560px) translateZ(calc(var(--gx-sink,-9px) - 7px)) rotateX(var(--gx-rx)) rotateY(var(--gx-ry))!important}

/* ---------- Admin settings on hover (Design › Glass buttons) ----------
   Label colour on hover (unset: the label keeps its colour), a white, dark or chosen background (html.gx-hb1 for main
   buttons, html.gx-hb2 for second buttons; only the colour changes, so it fades in), a coloured glow (html.gx-glow)
   and no colour split on the label (html.gx-nots). Selected tabs and options keep the design. */
html:not(.no-gx) :where(.b1,.b3:not(.v2l *)).gx-on:not(.gx-dk,:disabled,[aria-disabled=true]){color:var(--gx-t1h,var(--gx-t1,#0A3FA8))!important}
html:not(.no-gx) :where(.b1,.b3:not(.v2l *)).gx-dk.gx-on:not(:disabled,[aria-disabled=true]){color:var(--gx-t1h,var(--gx-tdk,#fff))!important}
html:not(.no-gx) :where(.b2,.mnav>summary).gx-on:not(.gx-dk,:disabled,[aria-disabled=true]){color:var(--gx-t2h,var(--gx-t2,#101828))!important}
html:not(.no-gx) :where(.b2,.mnav>summary).gx-dk.gx-on:not(:disabled,[aria-disabled=true]){color:var(--gx-t2h,var(--gx-tdk,#fff))!important}
html.gx-hb1:not(.no-gx) :where(.b1,.b3:not(.v2l *)).gx-on:not(:disabled,[aria-disabled=true]),
html.gx-hb2:not(.no-gx) :where(.b2,.mnav>summary).gx-on:not(:disabled,[aria-disabled=true]){
  background-image:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,0) 60%)!important}
html.gx-hb1:not(.no-gx) :where(.b1,.b3:not(.v2l *)).gx-on:not(:disabled,[aria-disabled=true]){background-color:var(--gx-hb1)!important}
html.gx-hb2:not(.no-gx) :where(.b2,.mnav>summary).gx-on:not(:disabled,[aria-disabled=true]){background-color:var(--gx-hb2)!important}
/* On a solid hover background the shine and edge light are softer, so a dark background stays dark */
html.gx-hb1:not(.no-gx) :where(.b1,.b3:not(.v2l *)).gx-on:not(:disabled,[aria-disabled=true])::before,
html.gx-hb2:not(.no-gx) :where(.b2,.mnav>summary).gx-on:not(:disabled,[aria-disabled=true])::before{opacity:.3}
html.gx-hb1:not(.no-gx) :where(.b1,.b3:not(.v2l *)).gx-on:not(:disabled,[aria-disabled=true])::after,
html.gx-hb2:not(.no-gx) :where(.b2,.mnav>summary).gx-on:not(:disabled,[aria-disabled=true])::after{opacity:.45}
html.gx-glow:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary).gx-on:not(:disabled,[aria-disabled=true]){box-shadow:var(--gx-glow),0 8px 16px -10px rgba(16,32,70,.45)!important}
html.gx-nots:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab,button:is([role=tab],[role=radio])[style*="solid"]).gx-on{text-shadow:none!important}
html.gx-nots:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab).gx-on svg{filter:none!important}

/* Keyboard focus stays easy to see */
html:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab,button:is([role=tab],[role=radio])[style*="solid"]):focus-visible{outline:2px solid #0A6CFF!important;outline-offset:3px}
html:not(.no-gx) .gx-dk:focus-visible{outline-color:#7FB3FF!important}

/* Disabled: dimmed glass, no movement */
html:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.tab,button:is([role=tab],[role=radio])[style*="solid"]):is(:disabled,[aria-disabled=true]){
  opacity:.55;color:#475467!important;text-shadow:none!important;transform:none!important;box-shadow:none!important}

/* ---------- Behind rows of buttons: something for the glass to bend ---------- */
/* glass.js adds .gx-field to rows of buttons that sit straight on a section (not in cards, forms or the header):
   a faint blue grid and glow, faded out at the sides. It reaches up to 36px past the row on each side, but never past
   the window edge (that made the page scroll sideways in windows narrower than 1272px). */
html:not(.no-gx) .gx-field{position:relative;isolation:isolate}
html:not(.no-gx) .gx-field::before{
  content:"";position:absolute;inset:-22px calc(-1 * clamp(0px, (100vw - 100%) / 2 - 8px, 36px));z-index:-1;pointer-events:none;
  background:
    radial-gradient(55% 75% at 35% 50%,rgba(10,108,255,.11),rgba(10,108,255,0) 72%),
    linear-gradient(rgba(10,108,255,.11) 1px,transparent 1px) 0 0/22px 22px,
    linear-gradient(90deg,rgba(10,108,255,.11) 1px,transparent 1px) 0 0/22px 22px;
  -webkit-mask:radial-gradient(closest-side,#000 45%,transparent);mask:radial-gradient(closest-side,#000 45%,transparent);
}
html:not(.no-gx) .gx-field.gx-fdk::before{
  background:
    radial-gradient(55% 75% at 35% 50%,rgba(84,150,255,.22),rgba(84,150,255,0) 72%),
    linear-gradient(rgba(127,179,255,.16) 1px,transparent 1px) 0 0/22px 22px,
    linear-gradient(90deg,rgba(127,179,255,.16) 1px,transparent 1px) 0 0/22px 22px}
@media (max-width:640px){html:not(.no-gx) .gx-field::before{inset:-16px 0}}

/* ---------- Reduced motion: still glass, nothing moves ---------- */
@media (prefers-reduced-motion:reduce){
  html:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab,button:is([role=tab],[role=radio])[style*="solid"]){transition:none!important}
  html:not(.no-gx) :where(.b1,.b2,.b3:not(.v2l *),.mnav>summary,.tab,button:is([role=tab],[role=radio])[style*="solid"]):is(.gx-on,:active){transform:none!important}
}
