/* One quiet, icon-only control shared by the public site and both portals. */
#fch-back-to-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 880;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 1px solid #b7d8e2;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff 8%, #eaf5f8);
  color: #16465b;
  box-shadow: 0 7px 23px #103a501f, inset 0 1px 0 #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease, box-shadow 180ms ease, visibility 180ms;
  -webkit-tap-highlight-color: transparent;
}
#fch-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
#fch-back-to-top svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
#fch-back-to-top:focus-visible {
  outline: 3px solid #ffb84d;
  outline-offset: 4px;
}
@media (hover: hover) {
  #fch-back-to-top:hover {
    color: #fff;
    background: #174c62;
    border-color: #174c62;
    box-shadow: 0 9px 25px #103a5030;
    transform: translateY(-2px);
  }
}
@media (max-width: 600px) {
  #fch-back-to-top { width: 44px; height: 44px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  #fch-back-to-top { transition: none; transform: none; }
  #fch-back-to-top:hover { transform: none; }
}
@media print {
  #fch-back-to-top { display: none !important; }
}
