/* ==========================================================================
   Page TOC (wp-toc)
   ========================================================================== */

.wp-toc {
  border: 2px solid var(--wp--preset--color--contrast-3, #d1d5db);
  border-radius: 12px;
  background: #fff;
  margin: 2rem 2rem;
  padding: 1.25rem 1.25rem;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}

.wp-toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: .5rem;
}

.wp-toc__title {
  font-size: 1rem;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.wp-toc__title-icon svg {
  width: 1.1em;
  height: 1.1em;
  display: block;
}

.wp-toc__toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
  line-height: 0;
  color: currentColor;
}

.wp-toc__toggle:hover {
  background: rgba(0,0,0,.04);
}

.wp-toc__toggle .icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.wp-toc__list {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: .25rem 0;
}

.wp-toc__sublist {
  list-style: disc;
  padding-left: 1.25rem;
  margin: .25rem 0;
}

.wp-toc__item {
  margin: .25rem 0;
}

.wp-toc__link {
  text-decoration: none;
}

.wp-toc__link:hover {
  text-decoration: underline;
}

.wp-toc.is-collapsed .wp-toc__list > li:nth-child(n+4) {
  display: none;
}

.wp-toc.is-collapsed .wp-toc__sublist {
  display: none;
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.wp-toc .wp-toc__sublist li {
  counter-increment: none !important;
}

.wp-toc .wp-toc__sublist .wp-toc__item::before {
  content: none !important;
}

.wp-toc .wp-toc__sublist li::marker {
  content: initial;
}

html {
  scroll-behavior: smooth;
}
