/* Styles zum Block "Inhaltsverzeichnis" */

.toc-js {
  display: none;
}

.toc-js ul li.toc-active a {
  text-decoration: underline;
}

.toc-js ul li.toc-h1 {}
.toc-js ul li.toc-h2 {}
.toc-js ul li.toc-h3 {}

.toc-js ol {
  counter-reset: toc-js-counter;
  list-style: none;
  padding-left: 2rem;
}
.toc-js ol li {
  margin: 0 0 0.5rem 0;
  counter-increment: toc-js-counter;
  position: relative;
}
.toc-js ol li a {
  display: block;
}

.contains-toc-number {
  position : relative;
  padding-left: 1.5rem;
}

.toc-js ol li::before, .toc-number {
  content: counter(toc-js-counter);
  color: white;
  background-color: var(--rot);
  font-size: 1rem;
  font-weight: bold;
  position: absolute;
  --size: 18px;
  left: calc(-1 * var(--size) - 10px);
  line-height: calc(var(--size) - 3px);
  width: var(--size);
  height: var(--size);
  top: 0;
  border-radius: 50%;
  text-align: center;
}

.toc-number {
  left: 0;
  margin-top: 0.3rem;
}
h1 .toc-number {
  margin-top: 0.5rem;
}
h3 .toc-number {
  margin-top : 0;
}

@media (min-width : 768px) {
  .toc-js ol li::before, .toc-number {
    --size: 24px;
  }
  .contains-toc-number {
    padding-left: 2rem;
  }
  .toc-number {
    left: 0;
    margin-top: 0.5rem;
  }
  h1 .toc-number {
    margin-top: 0.8rem;
  }
}

.contrast-mode .toc-js ol li::before, .contrast-mode .toc-number {
  background-color: black;
}

.sidebar-box-red .toc-js ol li::before, .sidebar-box-red .toc-number {
  background-color: white;
  color: var(--rot);
}

.contrast-mode .sidebar-box-red .toc-js ol li::before,
.contrast-mode .sidebar-box-red .toc-number {
  color: black;
}
