.post-directory {
  font-size: 14px;
  background: var(--surface);
  box-shadow: 0 2px 10px 2px var(--shadow-color);
  width: 300px;
  max-height: calc(100vh - 200px);
  border-radius: 12px;
  overflow: hidden;
  overflow-y: auto;
}

#post-directory-module {
  position: sticky;
  top: 100px;
  z-index: 5;
}

#post-directory-module .post-directory {
  max-height: calc(100vh - 220px);
  overflow: hidden;
  overflow-y: auto;
}

.post-directory li {
  border-left: 5px solid var(--border-color);
  cursor: pointer;
  margin: 0;
  padding: 6px 5px 6px 15px;
  line-height: 1.6;

  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.post-directory a {
  color: var(--text-color);
  text-decoration: none;
}

.post-directory li:hover,
.post-directory li:focus-within {
  background: var(--surface-hover);
  border-left-color: var(--brand-primary);
}

.post-directory li:hover a {
  color: var(--text-color);
}

.col-md-4 {
  position: static; /* fix strange behavior */
}

.post-directory .toc-h1 {
  font-weight: bold;
}

.post-directory .toc-h2 {
  padding-left: 30px;
}

.post-directory .toc-h3 {
  padding-left: 45px;
}

.post-directory .toc-h4 {
  padding-left: 60px;
}

.post-directory .toc-h5 {
  padding-left: 75px;
}

.post-directory .toc-h6 {
  padding-left: 90px;
}

.post-directory ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.post-directory a {
  display: block;
}
