body.-toc aside.toc.sidebar {
  display: none;
}

.top-scroll-btn {
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  bottom: 85px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--color-bwg-main);
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
}

.top-scroll-btn:hover {
  transition: transform 0.2s ease-in-out;
  background-color: #005bb5;
  transform: scale(1.1);
}

@media screen and (max-width: 1023.5px) {
  aside.toc.sidebar {
    display: none;
  }

  main > .content {
    overflow-x: auto;
  }
}

@media screen and (min-width: 1024px) {
  main {
    flex: auto;
    min-width: 0; /* min-width: 0 required for flexbox to constrain overflowing elements */
  }

  main > .content {
    display: flex;
    height: calc(100% - 50px);
  }

  aside.toc.embedded {
    display: none;
  }

  aside.toc.sidebar {
    flex: 0 0 var(--toc-width);
    order: 1;
  }
}

@media screen and (min-width: 1216px) {
  aside.toc.sidebar {
    flex-basis: var(--toc-width--widescreen);
  }
}
