:root {
  --focus-ring-color: rgba(11, 143, 139, 0.62);
  --skip-link-bg: #114b5f;
}

html,
body {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--skip-link-bg);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 4px 4px;
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(11, 143, 139, 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, #124f69, #0b8f8b);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(18, 79, 105, 0.26);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.94);
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, visibility 0s linear 0.2s;
}

#back-to-top i {
  font-size: 0.95rem;
}

#back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

#back-to-top:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 30px rgba(18, 79, 105, 0.34);
}

#back-to-top:active {
  transform: translateY(0) scale(0.98);
}

#back-to-top:focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  #back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #back-to-top {
    transition: none;
  }
}

.page-shell :is(a, button):focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 2px;
}
