width: 576px)");
      var tocEl = document.querySelector("#toc");
      var toggleTocEl = document.querySelector("#toggle-toc");

      window.closeTocIfSmallScreen = function() {
        if (isSmallScreen.matches) {
          console.log("close toc");
          tocEl.classList.add("hide-toc");
        }
      };

      function toggleToc() {
        console.log("toggling toc");
        tocEl.classList.toggle("hide-toc");
      }

      document
        .querySelector("#content")
        .addEventListener(