/**
 * NCTE in-page jump nav (sticky horizontal section nav).
 * Source of record: assets/styles/components/_jump-nav.scss
 * Hand-compiled: the theme's gulp/node-sass build is non-functional on current Node.
 */

.ncte-jumpnav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 500;
  background: #fff;
  border-bottom: 1px solid #e3e3e1;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .05);
}

.ncte-jumpnav__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.ncte-jumpnav__label {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #767676;
  margin-right: 1.4rem;
  padding: 1.4rem 0;
  white-space: nowrap;
}

.ncte-jumpnav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.ncte-jumpnav__links li { margin: 0; }

.ncte-jumpnav__links a {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  color: #4A4A4A;
  padding: 1.5rem 1.4rem;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}

.ncte-jumpnav__links a:hover,
.ncte-jumpnav__links a:focus {
  color: #1D1A1A;
  text-decoration: none;
}

.ncte-jumpnav__links a:focus-visible {
  outline: 2px solid #9933CC;
  outline-offset: -2px;
}

/* Active state colours are contrast-checked against white:
   text  #3d7d21 = 5.06:1 (WCAG AA normal text, needs 4.5:1)
   rule  #4f9e2a = 3.36:1 (WCAG 1.4.11 non-text/UI state, needs 3:1)
   The brand green #8EDD65 is only 1.66:1 and must NOT be used to carry state. */
.ncte-jumpnav__links a.is-active {
  color: #3d7d21;
  border-bottom-color: #4f9e2a;
}

/* Mobile toggle — hidden on desktop */
.ncte-jumpnav__toggle {
  display: none;
  width: 100%;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1D1A1A;
  text-align: left;
  padding: 1.3rem 0;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
}

.ncte-jumpnav__toggle::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid #9933CC;
  border-bottom: 2px solid #9933CC;
  transform: rotate(45deg);
  transition: transform .2s ease;
  margin-left: 1rem;
  flex: 0 0 auto;
}

.ncte-jumpnav__toggle[aria-expanded="true"]::after { transform: rotate(-135deg); }
.ncte-jumpnav__toggle:focus-visible { outline: 2px solid #9933CC; outline-offset: 2px; }

@media (max-width: 767px) {
  .ncte-jumpnav__label { display: none; }
  .ncte-jumpnav__toggle { display: flex; }
  .ncte-jumpnav__links { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .ncte-jumpnav.is-open .ncte-jumpnav__links { display: flex; border-top: 1px solid #e3e3e1; }
  .ncte-jumpnav__links a { padding: 1.2rem 0; border-bottom: 1px solid #e3e3e1; }
  .ncte-jumpnav__links a.is-active { border-bottom-color: #e3e3e1; box-shadow: inset 3px 0 0 #4f9e2a; padding-left: 1rem; }
}

/* Keep jump targets clear of the sticky bar */
.sidebar-template-intro [id] { scroll-margin-top: 70px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ncte-jumpnav__links a,
  .ncte-jumpnav__toggle::after { transition: none; }
}
