{
if (scrolled) return;
scrolled = true;
target.style.scrollMarginTop = '100px';
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
};
// Wait for the collapse animation (if any) to finish, otherwise fall back to a short timeout.
document.addEventListener('transitionend', doScroll, { once: true });
setTimeout(doScroll, 250);
}
"
>