:root {
  --toc-width: 300px;
}

@media screen and (min-width: 960px) {
  body {
    max-width: 100vw;
    margin: 0;
    padding: 0;
  }
  main {
    display: grid;
    grid-template-columns: var(--toc-width) 1fr;
    grid-template-rows: auto auto;
  }
  nav[role="doc-toc"] {
    grid-row: 1 / -1;
    grid-column: 1 / 2;
    border: none;
    margin: 0;
    width: var(--toc-width);
    > ul {
      padding-top: 0;
      padding-bottom: 0;
      position: sticky;
      max-height: 100vh;
      overflow-y: auto;
      top: 0;
      border: none;
      > li:first-child {
        padding-top: 0.5rem;
      }
    }
  }
}


@media screen and (min-width: 960px) and (max-width: 1260px) {
  main {
    width: calc(100vw - 2rem);
  }
  header, article {
    width: calc(100vw - var(--toc-width) - 6rem);
    padding: 0 0 0 4rem;
  }
}

@media screen and (min-width: 1260px) {
  main {
    width: calc(1260px - 2rem);
    margin: 0 calc(50vw - 480px) 0 auto;
  }
  header, article {
    width: calc(960px - 6rem);
    padding: 0 0 0 4rem;
  }
}
