/** * Anchor Nav — Digital Suite * * v1.0.5 * * A sticky in-page section nav that collapses into a horizontal rail below a * breakpoint. Extracted from the LXP Features page custom code * (`responsiveAnchorNavbar()`), generalised so any page can author one in the * Designer without touching JavaScript. * * What it owns * - scroll-spy: marks the link whose section is under the spy line * - rail sync: keeps that link scrolled into view once the nav is a rail * - scroll offset: writes scroll-margin-top on every target so a jumped-to * heading is not swallowed by the sticky sub-header * - stickiness, when nothing above the nav is already sticky * - its own CSS: structure always, presentation unless the page opts out * - one Splide instance per nav, mounted only below the breakpoint * * Every DOM lookup is a data attribute — no class in this file is used to find * anything. The splide__* classes Splide needs are added at runtime and * stripped again after mount, so the global splide.min.css can never reach in. * See vault: Ops/Gotchas — "The site's global Splide CSS hijacks any carousel". * * Requires the site-wide Splide 4.1.4 (Site Settings -> Footer). Waits for it. * No GSAP, no ScrollTrigger — the spy is an IntersectionObserver. * * Configure with data-anchor-nav-config='{...}' on the nav (preferred — keeps the * page footer a bare