/* 1. Gwarantowany Offset +100px */
.toc-anchor {
  display: block;
  position: relative;
  top: -100px; /* To przesunięcie decyduje o dystansie od góry */
  visibility: hidden;
}

/* 2. Płynne rozwijanie (Grid hack) */
.toc-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.toc-wrapper.is-open {
  grid-template-rows: 1fr;
}

.toc-inner {
  min-height: 0;
}

/* 3. Minimalizm (bazowanie na stylach strony) */
.custom-toc-container {
  margin: 2rem 0 0rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.toc-button:hover, .toc-button:focus {
  border-color: var(--global-palette6);
  background: none;
  padding-left: 20px;
  transition: 0.4s;
}

.toc-inner ul {
  padding-left: 20px;
}



.toc-button {
  width: 100%;
  text-align: left;
  background: none;
  padding: 15px 0;
  font-weight: bold;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
  font-family: Syne, sans-serif;
  border-bottom: 1px solid #ffffff40;
  margin-bottom: 20px;
  transition: 0.4s;

}

ol .toc-item::marker {
  font-weight: 600;
  font-family: var(--global-heading-font-family);
  color: #464646 !important;
}

.toc-inner ol {
  list-style: decimal-leading-zero;
}


.toc-inner ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.toc-item a {
  display: block;
  padding: 10px 0;
  text-decoration: none;
  color: #fff;
  opacity: 0.5;
  font-size: 1.2rem;
  font-weight: 300;
  font-family: Syne, sans-serif;
}


.toc-item a:hover {
  opacity: 1;
  text-decoration: underline var(--global-palette6);
}

/* Płynne przewijanie całej strony */
html {
  scroll-behavior: smooth;
}

