/* Back to top, on every page (public site and console): a thick arrow to the top bar, lower right, once the
   page has been scrolled (to-top.js). Ink and gold read on light and dark pages alike. */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 380; display: grid; place-items: center; width: 54px; height: 54px; min-height: 0;
  padding: 0; margin: 0; border-radius: 999px; border: 2px solid #ffc226; background: #101820; color: #ffc226; cursor: pointer;
  box-shadow: 0 6px 22px -6px rgb(0 0 0 / .45); opacity: 0; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease, background .15s ease, color .15s ease; }
.to-top.is-shown { opacity: 1; transform: none; }
.to-top:hover { background: #ffc226; color: #101820; transform: translateY(-3px); }
.to-top:focus-visible { outline: 3px solid #ffc226; outline-offset: 3px; }
.to-top svg { width: 26px; height: 26px; }
.to-top[hidden] { display: none; }
body:has(.vbar) .to-top, body:has(.reg-bar) .to-top { bottom: 96px; }
@media (max-width: 600px) { .to-top { right: 14px; bottom: 14px; width: 48px; height: 48px; } .to-top svg { width: 23px; height: 23px; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
@media print { .to-top { display: none !important; } }

/* iOS Safari can leave a fixed `bottom` button partway up the page after its toolbars collapse (Steve, 2026-10-24); the dynamic viewport
   height follows the toolbars, so where it's supported the button is placed from the top of that instead. */
@supports (height: 100dvh) {
  .to-top { bottom: auto; top: calc(100dvh - 54px - 20px - env(safe-area-inset-bottom, 0px)); }
  body:has(.vbar) .to-top, body:has(.reg-bar) .to-top { top: calc(100dvh - 54px - 96px - env(safe-area-inset-bottom, 0px)); }
  @media (max-width: 600px) { .to-top { top: calc(100dvh - 48px - 14px - env(safe-area-inset-bottom, 0px)); } body:has(.vbar) .to-top, body:has(.reg-bar) .to-top { top: calc(100dvh - 48px - 96px - env(safe-area-inset-bottom, 0px)); } }
}
