.article-nav {
  --is-nav-open: 0;
  display: block;
  position: relative;
  font-size: 17px;
  border-bottom: 1px solid var(--active-link-background, hsl(var(--color-fade)));
}

@media (width >= 1024px) {
  .article-nav {
    --offset: 10px;
    padding: calc(var(--offset) * 2);
    font-size: inherit;
    border-bottom: 0;
    overflow: auto;
  }
}

.article-nav--open {
  --is-nav-open: 1;
}

.article-nav__toggle {
  position: relative;
  width: 100%;
}

@media (width >= 1024px) {
  .article-nav__toggle {
    display: none;
  }
}

.article-nav__content {
  box-sizing: border-box;
  height: 0;
  padding: 0;
  line-height: 1.8;
  overflow: hidden;
  transition: padding 0.3s;
}

.article-nav--open .article-nav__content {
  height: auto;
  padding: var(--offset) 0;
  transition: padding 0.3s;
}

@media (width >= 1024px) {
  .article-nav__content {
    display: initial;
    overflow: auto;
    height: 100%;
    line-height: 1.8;
    overscroll-behavior: contain;
  }
}

@media (width >= 1366px) {
  .article-nav__content {
    line-height: 1.6;
  }
}

.toggle-button__icon--open .article-nav__toggle {
  display: none;
}

.toggle-button {
  box-sizing: border-box;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: inherit;
  border: 0;
  padding-inline-start: var(--offset);
  background-color: transparent;
  -webkit-tap-highlight-color: transparent;
}

.toggle-button[aria-expanded="true"] {
  position: absolute;
  top: 0;
  right: 0;
  width: auto;
  text-align: initial;
}

.toggle-button__icons {
  position: relative;
  width: 48px;
  height: 48px;
  overflow: hidden;
}

.toggle-button__icon {
  position: absolute;
  inset: 0;
  color: var(--color-text);
  background-color: transparent;
  transform: scale(calc(var(--on) + var(--off)* 1.5));
  opacity: var(--on);
  transition: transform 0.5s, opacity 0.5s;
}

.toggle-button__icon--close {
  --on: var(--is-nav-open);
  --off: calc(1 - var(--is-nav-open));
}

.toggle-button__icon--open {
  --on: calc(1 - var(--is-nav-open));
  --off: var(--is-nav-open);
}

.article-nav--open .toggle-button__icon--close {
  display: block;
}

.toggle-text {
  display: inline-block;
}

.article-nav--open .toggle-text {
  display: none;
}
