/* CIT hi-tech scroll-to-top control. */
body button.scroll-top {
    width: 50px;
    height: 50px;
    min-width: 50px;
    max-width: 50px;
    min-height: 50px;
    max-height: 50px;
    aspect-ratio: 1 / 1;
    padding: 0;
    right: 18px;
    bottom: 20px;
    display: none;
    overflow: hidden;
    color: #a5f3fc;
    background: rgba(7, 24, 39, .92);
    border: 0;
    border-radius: 0;
    box-shadow: 0 8px 22px rgba(4, 21, 36, .25);
    line-height: 1;
    transition: color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
body button.scroll-top::before {
    display: none;
}
body button.scroll-top::after {
    display: none;
}
body button.scroll-top .cit-top-frame {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 44px;
    height: 44px;
    z-index: 0;
    box-sizing: border-box;
    border: 0;
    pointer-events: none;
}
body button.scroll-top .cit-top-frame span {
    position: absolute;
    display: block;
    background: #22d3ee;
    box-shadow: 0 0 7px rgba(34, 211, 238, .8);
    opacity: .92;
    transition: transform .18s ease-out;
}
body button.scroll-top .cit-top-frame .cit-top-edge-top,
body button.scroll-top .cit-top-frame .cit-top-edge-bottom {
    width: 100%;
    height: 3px;
    transform: scaleX(var(--cit-top-edge-top, 0));
    transform-origin: left center;
}
body button.scroll-top .cit-top-frame .cit-top-edge-top { top: 0; left: 0; }
body button.scroll-top .cit-top-frame .cit-top-edge-bottom { bottom: 0; right: 0; transform-origin: right center; transform: scaleX(var(--cit-top-edge-bottom, 0)); }
body button.scroll-top .cit-top-frame .cit-top-edge-right,
body button.scroll-top .cit-top-frame .cit-top-edge-left {
    width: 3px;
    height: 100%;
    transform: scaleY(var(--cit-top-edge-right, 0));
    transform-origin: top center;
}
body button.scroll-top .cit-top-frame .cit-top-edge-right { top: 0; right: 0; }
body button.scroll-top .cit-top-frame .cit-top-edge-left { bottom: 0; left: 0; transform-origin: bottom center; transform: scaleY(var(--cit-top-edge-left, 0)); }
body button.scroll-top > span.icon-top {
    position: relative;
    z-index: 1;
    display: inline-block;
    color: #a5f3fc;
    text-shadow: 0 0 7px rgba(34, 211, 238, .75);
    transition: transform .2s ease, text-shadow .2s ease;
}
body button.scroll-top:hover {
    color: #fff;
    border-color: #67e8f9;
    background: #0b2d47;
    box-shadow: 0 10px 26px rgba(4, 21, 36, .34), 0 0 20px rgba(34, 211, 238, .32);
    transform: translateY(-2px);
}
body button.scroll-top:hover > span.icon-top { color: #fff; transform: translateY(-2px); }
body button.scroll-top.cit-top-pulse {
    animation: cit-top-pulse .7s ease-out;
}
body button.scroll-top.cit-top-pulse > span.icon-top {
    animation: cit-top-arrow .7s ease-out;
}
body button.scroll-top.cit-top-complete {
    box-shadow: 0 8px 22px rgba(4, 21, 36, .25), 0 0 22px rgba(34, 211, 238, .6);
    animation: cit-top-complete-glow 1.8s ease-in-out infinite;
}
body button.scroll-top.cit-top-complete::after {
    display: none;
}
body button.scroll-top.cit-top-complete .cit-top-frame span {
    background: #e0fbff;
    box-shadow: 0 0 10px rgba(103, 232, 249, .95);
}
@keyframes cit-top-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .75), 0 8px 24px rgba(4, 21, 36, .28); }
    100% { box-shadow: 0 0 0 18px rgba(34, 211, 238, 0), 0 8px 24px rgba(4, 21, 36, .28); }
}
@keyframes cit-top-arrow {
    0% { transform: translateY(4px) scale(.82); opacity: .45; }
    55% { transform: translateY(-3px) scale(1.14); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes cit-top-complete-glow {
    0%, 100% { box-shadow: 0 8px 22px rgba(4, 21, 36, .25), 0 0 14px rgba(34, 211, 238, .35); }
    50% { box-shadow: 0 8px 22px rgba(4, 21, 36, .25), 0 0 28px rgba(34, 211, 238, .8); }
}
@media (max-width: 767px) {
    body button.scroll-top { right: 12px; bottom: 14px; width: 48px; height: 48px; min-width: 48px; max-width: 48px; min-height: 48px; max-height: 48px; }
    body button.scroll-top .cit-top-frame { top: 3px; left: 3px; width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    body button.scroll-top .cit-top-frame span { transition: none; }
    body button.scroll-top.cit-top-pulse,
    body button.scroll-top.cit-top-pulse > span,
    body button.scroll-top.cit-top-complete { animation: none; }
}
