/* base: site-kit/to-top @ a43c4eb (1.0.0), copied 2026-11-25. Do not edit; themed through --kit-* tokens in site.css. */
/* site-kit to-top 1.0.0. Back-to-top button with a scroll-progress ring, from probuildingsolutions.ca and
   surfstudios.co (the same 48px disc and 44-unit ring on both). Reads only --kit-* tokens.

   Use: component.js creates the button (or adopts a .kit-to-top already in the page). On a site with the
   phone tab bar, also load corner-stack/component.css AFTER this file: the button carries .kit-corner,
   so it sits above the bar and rides down with it. Without corner-stack it stays at its own corner.
   Spec and numbers: README.md. */

.kit-to-top {
  /* corner-stack keeps these transitions when it adds its own ride (its .kit-corner rule reads this list) */
  --kit-corner-transition: opacity .4s var(--kit-ease, cubic-bezier(.16, 1, .3, 1)), transform .4s var(--kit-ease, cubic-bezier(.16, 1, .3, 1)), background-color .2s ease;
  position: fixed; right: var(--kit-to-top-right, 24px); bottom: calc(var(--kit-to-top-bottom, 24px) + env(safe-area-inset-bottom));
  z-index: var(--kit-to-top-z, 40);
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--kit-to-top-bg, rgba(14, 14, 18, .86));
  box-shadow: var(--kit-to-top-shadow, 0 8px 24px -10px rgba(0, 0, 0, .55));
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none;
  transition: var(--kit-corner-transition);
  -webkit-tap-highlight-color: transparent;
}
.kit-to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.kit-to-top.is-shown:active { transform: scale(.9); transition-duration: .1s; }
@media (hover: hover) and (pointer: fine) {
  .kit-to-top:hover { background: var(--kit-to-top-bg-hover, var(--kit-to-top-bg, rgba(14, 14, 18, 1))); }
}
.kit-to-top:focus-visible { outline: 2px solid var(--kit-to-top-focus, var(--kit-accent, currentColor)); outline-offset: 3px; }

.kit-to-top svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.kit-to-top .kit-tt-track { fill: none; stroke: var(--kit-to-top-track, rgba(242, 242, 244, .22)); stroke-width: 2.5; }
.kit-to-top .kit-tt-prog {
  fill: none; stroke: var(--kit-to-top-ring, var(--kit-accent, #4ec9dd)); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 119.38; stroke-dashoffset: 119.38; transition: stroke-dashoffset .12s linear;
}
/* The arrow is a drawn chevron in the arrow colour, not a glyph, so it centres the same in every font. */
.kit-to-top .kit-tt-arr {
  position: absolute; left: 50%; top: 54%; width: 9px; height: 9px;
  border-left: 2px solid var(--kit-to-top-fg, #f2f2f4); border-top: 2px solid var(--kit-to-top-fg, #f2f2f4);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* The landing spot focus() moves to after a jump: not a control, so no ring around the whole page. */
[data-kit-tt-start]:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  .kit-to-top { --kit-corner-transition: opacity .01s; transform: none; }
  .kit-to-top.is-shown:active { transform: none; }
  .kit-to-top .kit-tt-prog { transition: none; }
}
