.block-toc__box {
  max-width: 720px;
  padding: 22px 26px;
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius);
  background: var(--ib-bg-soft);
}

.block-toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

.block-toc__title {
  font-family: var(--ib-font-display);
  font-size: 17px;
  font-weight: 600;
}

.block-toc__sign {
  position: relative;
  width: 12px;
  height: 12px;
  flex: none;
}

.block-toc__sign::before,
.block-toc__sign::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 1.6px;
  background: var(--ib-muted);
  border-radius: 2px;
  transition: transform var(--ib-motion) var(--ib-ease);
}

.block-toc__sign::before {
  transform: translate(-50%, -50%) rotate(45deg) translateX(-2px);
}

.block-toc__sign::after {
  transform: translate(-50%, -50%) rotate(-45deg) translateX(2px);
}

.block-toc__head[aria-expanded="false"] .block-toc__sign::before {
  transform: translate(-50%, -50%) rotate(-45deg) translateX(-2px);
}

.block-toc__head[aria-expanded="false"] .block-toc__sign::after {
  transform: translate(-50%, -50%) rotate(45deg) translateX(2px);
}

.block-toc__list {
  margin: 16px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.block-toc__list[hidden] {
  display: none;
}

.block-toc__item {
  color: var(--ib-muted);
  font-size: 15px;
}

.block-toc__item--sub {
  margin-left: 18px;
  list-style: none;
  font-size: 14px;
}

.block-toc__item--sub::before {
  content: "— ";
  color: var(--ib-line);
}

.block-toc__link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--ib-motion) var(--ib-ease), border-color var(--ib-motion) var(--ib-ease);
}

.block-toc__link:hover,
.block-toc__link.is-current {
  color: var(--ib-accent);
  border-bottom-color: currentColor;
}
