(function(){'use strict';
var nav=document.querySelector('[data-workflow-tabs]');if(!nav)return;
var links=[].slice.call(nav.querySelectorAll('a[href^="#"]'));
var panels=links.map(function(a){return document.querySelector(a.getAttribute('href'));}).filter(Boolean);
function activate(){var top=window.scrollY+190,active=panels[0];panels.forEach(function(p){if(p.offsetTop<=top)active=p;});links.forEach(function(a){a.classList.toggle('is-active',active&&a.getAttribute('href')==='#'+active.id);});}
links.forEach(function(a){a.addEventListener('click',function(e){var p=document.querySelector(a.getAttribute('href'));if(!p)return;e.preventDefault();p.scrollIntoView({behavior:'smooth',block:'start'});history.replaceState(null,'',a.getAttribute('href'));});});
window.addEventListener('scroll',activate,{passive:true});activate();
})();
