/* Standard release interactions. Opt in on the standalone html element only.
   Future host-page scrolling requires separate integration approval. */
html.cx-release-scroll {
  scroll-behavior: smooth;
}

.cx-release {
  --cx-motion-duration: 200ms;
  --cx-motion-easing: ease;
}

.cx-release :is(main[id], section[id]) {
  scroll-margin-top: calc(var(--cx-header-space, 88px) + 16px);
}

.cx-release :is(.text-link, .chapter-nav a, .footer a, summary) {
  transition: color var(--cx-motion-duration) var(--cx-motion-easing),
    border-color var(--cx-motion-duration) var(--cx-motion-easing),
    background-color var(--cx-motion-duration) var(--cx-motion-easing);
}

.cx-release .button {
  transition: transform var(--cx-motion-duration) var(--cx-motion-easing),
    background-color var(--cx-motion-duration) var(--cx-motion-easing),
    border-color var(--cx-motion-duration) var(--cx-motion-easing);
}

.cx-release .text-link > span[aria-hidden="true"] {
  transition: transform var(--cx-motion-duration) var(--cx-motion-easing);
}

@media (hover: hover) and (pointer: fine) {
  .cx-release :is(.text-link, .chapter-nav a, .footer a):hover {
    color: var(--accent);
  }

  .cx-release .chapter-nav a:hover {
    border-bottom-color: var(--accent);
    background-color: #111216;
  }

  .cx-release .text-link:hover > span[aria-hidden="true"] {
    transform: translateY(2px);
  }

  .cx-release .button:hover {
    background-color: #e2e3e9;
    border-color: #e2e3e9;
    transform: translateY(-2px);
  }

  .cx-release .button-secondary:hover {
    background-color: #202229;
    border-color: var(--accent);
    color: var(--text);
  }

  .cx-release summary:hover {
    color: #ffc180;
  }
}

.cx-release .button:active {
  transform: translateY(0) scale(.985);
}

@media (prefers-reduced-motion: reduce) {
  html.cx-release-scroll {
    scroll-behavior: auto !important;
  }

  .cx-release :is(.button, .text-link, .chapter-nav a, .footer a, summary),
  .cx-release .text-link > span[aria-hidden="true"] {
    transition: none !important;
    transform: none !important;
  }
}
