function scrollToHash() {
    const hash = window.location.hash.substring(1);
    if (hash) {
      const el = document.getElementById(hash);
      const delta = document.body.classList.contains('scrolled') ? 72 : 128;
      document.body.scrollTop = el.offsetTop - delta;
    }
  }
Scrolls to the window's current hash.  Note: this is required
because of the {position: fixed} banner at the top, which will
cover the heading if we let the browser scroll on its own.
Instead, we add a delta to ensure that the heading ends up
below the banner.