/* Gaither site standard: STD-34 back-to-top, STD-35 theme control and
   STD-48 floating controls (v2, 2026-10-12). Vendored per site at
   /js/site-controls.css. Tokens fall back to sane values so a site without
   --bg/--fg/--line still renders it.

   STD-48: the Report a problem pill (bottom left) and back to top (bottom
   right) are ONE system: both 48px tall, the same distance from the bottom
   and from their side (24px, 16px at <=480px, plus the iPhone home-bar
   inset), the same fill, 2px ring and icon color, the same shadow. On a
   phone the pill is a 48px circle, so the two centers sit on one line.
   A site sets its colors with --gd-fab-bg / --gd-fab-ring / --gd-fab-fg. */
:root{--gd-fab-size:48px;--gd-fab-inset:24px}
@media (max-width:480px){:root{--gd-fab-inset:16px}}
.gd-totop,.gd-flag-fab{position:fixed;bottom:calc(var(--gd-fab-inset) + env(safe-area-inset-bottom,0px));z-index:9000;
  height:var(--gd-fab-size);box-sizing:border-box;border-radius:999px;cursor:pointer;
  background:var(--gd-fab-bg,#0a0a23);border:2px solid var(--gd-fab-ring,var(--cyan,#01CCFF));
  box-shadow:0 8px 24px rgba(0,0,0,.35);transition:opacity .2s,transform .2s,background .2s}
.gd-totop{right:var(--gd-fab-inset);width:var(--gd-fab-size);padding:0;display:grid;place-items:center;
  color:var(--gd-fab-ring,var(--cyan,#01CCFF));opacity:0;transform:translateY(8px);pointer-events:none}
.gd-totop svg{width:20px;height:20px}
.gd-totop.is-on{opacity:1;transform:none;pointer-events:auto}
.gd-flag-fab{left:var(--gd-fab-inset);display:inline-flex;align-items:center;gap:8px;padding:0 18px;
  color:var(--gd-fab-fg,#fef9f3);font:600 .9rem/1 system-ui,-apple-system,"Segoe UI",sans-serif}
.gd-flag-fab svg{width:18px;height:18px;flex:none;fill:none;stroke:var(--gd-fab-ring,var(--cyan,#01CCFF));
  stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.gd-totop:hover,.gd-flag-fab:hover{background:var(--gd-fab-bg-hover,#1a1a40)}
.gd-totop:focus-visible,.gd-flag-fab:focus-visible{outline:3px solid var(--gd-fab-ring,var(--cyan,#01CCFF));outline-offset:3px}
@media (max-width:480px){.gd-flag-fab{width:var(--gd-fab-size);padding:0;justify-content:center}
  .gd-flag-fab span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}
html.gd-flag-open .gd-flag-fab,html.gd-flag-open .gd-totop{display:none}
.gd-theme{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line-strong,var(--line,#3d454e));
  background:var(--card-bg,var(--card,transparent));color:var(--fg,inherit);border-radius:999px;padding:4px 10px;
  font:600 12px/1 system-ui,sans-serif;cursor:pointer}
.gd-theme:focus-visible{outline:2px solid var(--cyan,#01CCFF);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.gd-totop,.gd-flag-fab{transition:none}}
@media print{.gd-totop,.gd-flag-fab,.gd-theme{display:none!important}}
