/* #last edited 2026-08-11T22:00:59.7424157+01:00 */
html {
  scroll-behavior: smooth;
}

.tld-toc,
.tld-toc * {
  box-sizing: border-box;
}

.tld-toc {
  position: relative;
  z-index: 30;
  color: #353535;
  font-family: "Josefin Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tld-toc__panel {
  width: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: visible;
  overscroll-behavior: contain;
}

.tld-toc__title {
  margin: 0 0 0.55rem;
  color: #2d2d2d;
  font-family: "Special Elite", Georgia, serif;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.15;
}

.tld-toc__list {
  display: grid;
  gap: 0.18rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tld-toc__list--sub {
  margin-top: 0.18rem;
  padding-left: 0.7rem;
  border-left: 1px solid rgba(26, 74, 94, 0.16);
}

.tld-toc__item {
  margin: 0;
  line-height: 1.24;
}

.tld-toc__link {
  display: block;
  padding: 0.14rem 0;
  color: #6b94b3;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.24;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 160ms ease, transform 160ms ease;
}

.tld-toc__link:hover,
.tld-toc__link:focus-visible,
.tld-toc__link.is-active {
  color: #1a4a5e;
}

.tld-toc__link:focus-visible {
  outline: 2px solid rgba(26, 74, 94, 0.35);
  outline-offset: 2px;
}

.tld-toc__handle {
  display: none !important;
}

@media (min-width: 768px) {
  .tld-toc[data-sticky="1"] {
    position: relative;
    top: auto;
    width: 100%;
    margin: 1.25rem 0 2rem;
  }

  .tld-toc__panel {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(26, 74, 94, 0.16);
    border-radius: 6px;
    background: rgba(255, 253, 247, 0.86);
    overflow-x: hidden;
    overflow-y: visible;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }

  .tld-toc.tld-toc--needs-scroll .tld-toc__panel {
    max-height: var(--tld-toc-panel-max-height, 340px);
    overflow-y: hidden;
  }

  .tld-toc.tld-toc--needs-scroll .tld-toc__panel:hover,
  .tld-toc.tld-toc--needs-scroll .tld-toc__panel:focus,
  .tld-toc.tld-toc--needs-scroll .tld-toc__panel:focus-within {
    overflow-y: auto;
    scrollbar-color: rgba(26, 74, 94, 0.36) transparent;
  }

  .tld-toc__panel::-webkit-scrollbar {
    width: 6px;
  }

  .tld-toc__panel::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
  }

  .tld-toc.tld-toc--needs-scroll .tld-toc__panel:hover::-webkit-scrollbar-thumb,
  .tld-toc.tld-toc--needs-scroll .tld-toc__panel:focus-within::-webkit-scrollbar-thumb {
    background: rgba(26, 74, 94, 0.36);
  }
}

@media (max-width: 767.98px) {
  .tld-toc {
    position: fixed;
    top: 38%;
    right: 0;
    left: auto;
    z-index: 1004;
  }

  .tld-toc__handle {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-height: 112px;
    padding: 8px 6px;
    border: 1px solid rgba(26, 74, 94, 0.18);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: #f7f3ea;
    color: #1a4a5e;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    cursor: pointer;
  }

  .tld-toc__handle span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
  }

  .tld-toc__panel {
    position: absolute;
    top: -72px;
    right: 0;
    width: min(286px, calc(100vw - 54px));
    max-height: min(66vh, 520px);
    padding: 14px 14px 16px;
    border: 1px solid rgba(26, 74, 94, 0.14);
    border-radius: 8px 0 0 8px;
    background: #fffdf7;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateX(calc(100% + 44px));
    transition: transform 220ms ease;
    -webkit-overflow-scrolling: touch;
  }

  .tld-toc.tld-toc--open .tld-toc__panel {
    transform: translateX(-42px);
  }

  .tld-toc__title {
    padding-right: 24px;
    font-size: 0.9rem;
  }

  .tld-toc__link {
    padding: 0.24rem 0;
    font-size: 0.72rem;
  }
}

@media (max-width: 420px) {
  .tld-toc {
    top: 34%;
  }

  .tld-toc__panel {
    top: -58px;
    width: min(274px, calc(100vw - 50px));
    max-height: 68vh;
  }
}
