/* Compact sticky navigator for long-form pages that explicitly opt in. */
:is(.supporting-guide-page, .section-navigator-page) {
  --guide-shared-navbar-height: 72px;
  --guide-section-nav-height: 52px;
  --guide-section-scroll-gap: 14px;
  overflow-x: clip;
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav {
  position: sticky;
  top: var(--guide-shared-navbar-height);
  z-index: 3100;
  min-height: var(--guide-section-nav-height);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav__inner {
  display: flex;
  align-items: stretch;
  width: min(1120px, calc(100% - 40px));
  min-height: var(--guide-section-nav-height);
  margin-inline: auto;
  border: 1px solid rgba(184, 140, 63, 0.17);
  border-radius: 11px;
  background: rgba(255, 253, 248, 0.12);
  box-shadow:
    0 4px 12px rgba(10, 31, 23, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
  -webkit-backdrop-filter: blur(3px) saturate(104%);
  backdrop-filter: blur(3px) saturate(104%);
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav__label {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0 18px 0 0;
  padding-right: 18px;
  color: var(--guide-ink, var(--story-ink, #10291f));
  font-size: 10px !important;
  font-weight: 700;
  line-height: 1.2 !important;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  white-space: nowrap;
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav__label::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 0;
  bottom: 14px;
  width: 1px;
  background: rgba(16, 41, 31, 0.14);
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav__track {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 0;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav__track::-webkit-scrollbar {
  display: none;
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: var(--guide-section-nav-height);
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(16, 41, 31, 0.8);
  font-size: 11.5px !important;
  font-weight: 700;
  line-height: 1.2 !important;
  letter-spacing: 0.035em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease;
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: 0;
  left: 13px;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: var(--guide-gold, var(--story-gold, #b88c3f));
  opacity: 0;
  transform: scaleX(0.45);
  transform-origin: center;
  transition: opacity 180ms ease, transform 180ms ease;
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a:hover,
:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a:focus-visible {
  border-color: transparent;
  background: rgba(234, 215, 171, 0.2);
  color: var(--guide-ink, var(--story-ink, #10291f));
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a:focus-visible {
  z-index: 1;
  outline: 2px solid rgba(184, 140, 63, 0.65);
  outline-offset: -4px;
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a.is-active,
:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a[aria-current="location"] {
  color: var(--guide-ink, var(--story-ink, #10291f));
  background: rgba(234, 215, 171, 0.14);
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a.is-active::after,
:is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a[aria-current="location"]::after {
  opacity: 1;
  transform: scaleX(1);
}

:is(.supporting-guide-page, .section-navigator-page) .guide-section[id] {
  scroll-margin-top: calc(
    var(--guide-shared-navbar-height) +
    var(--guide-section-nav-height) +
    var(--guide-section-scroll-gap)
  );
}

@media (max-width: 768px) {
  :is(.supporting-guide-page, .section-navigator-page) {
    --guide-shared-navbar-height: 76px;
    --guide-section-nav-height: 48px;
    --guide-section-scroll-gap: 10px;
  }

  :is(.supporting-guide-page, .section-navigator-page) .guide-section-nav__inner {
    width: calc(100% - 20px);
  }

  :is(.supporting-guide-page, .section-navigator-page) .guide-section-nav__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  :is(.supporting-guide-page, .section-navigator-page) .guide-section-nav__track {
    padding-inline: 8px;
    scroll-padding-inline: 8px;
  }

  :is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a {
    padding-inline: 11px;
    font-size: 10.5px !important;
    letter-spacing: 0.025em;
  }

  :is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a::after {
    right: 11px;
    left: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.supporting-guide-page, .section-navigator-page) .guide-section-nav__track {
    scroll-behavior: auto;
  }

  :is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a,
  :is(.supporting-guide-page, .section-navigator-page) .guide-section-nav a::after {
    transition: none;
  }
}
