:root {
  --focus-ring: rgba(30, 94, 255, .32);
}

html {
  scroll-padding-top: 96px;
}

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.reading-progress {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #1e5eff, #20d5ec);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.back-to-top {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 86px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(30, 94, 255, .2);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  color: var(--primary, #1e5eff);
  box-shadow: 0 10px 28px rgba(8, 24, 66, .18);
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s, transform .2s, background .2s;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--primary, #1e5eff);
  color: #fff;
}

.btn:active,
button:active,
a:active,
summary:active {
  transform: scale(.985);
}

.click-feedback {
  animation: clickFeedback .3s ease;
}

.country-jump-nav a.active {
  color: var(--country-secondary, var(--primary, #1e5eff));
  background: color-mix(in srgb, var(--country-primary, #20d5ec) 14%, #fff);
}

[data-copy-text].copied {
  color: #0a7f58 !important;
  border-color: rgba(10, 127, 88, .35) !important;
}

@keyframes clickFeedback {
  0% {
    filter: brightness(1);
  }
  42% {
    filter: brightness(1.08);
  }
  100% {
    filter: brightness(1);
  }
}

@media (max-width: 760px) {
  .back-to-top {
    right: 14px;
    bottom: 76px;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .click-feedback {
    animation: none;
  }

  .back-to-top {
    transition: none;
  }
}
