/* DBC / BIOTEN Homepage V7.8.2 — accessible mobile newsroom disclosure. */ (function () { 'use strict'; var toggle = document.querySelector('.v782-news-toggle'); var grid = document.getElementById('v782-news-grid'); if (!toggle || !grid) return; function prefersReducedMotion() { return window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches; } toggle.addEventListener('click', function () { var willExpand = toggle.getAttribute('aria-expanded') !== 'true'; toggle.setAttribute('aria-expanded', String(willExpand)); grid.classList.toggle('is-expanded', willExpand); if (!willExpand && window.matchMedia('(max-width: 760px)').matches) { window.requestAnimationFrame(function () { toggle.scrollIntoView({ block: 'center', behavior: prefersReducedMotion() ? 'auto' : 'smooth' }); }); } }); }());