/* MELA 1.0.43 — restored pre-redesign journal template.
 * Only the small chapter navigation is enhanced here. The visual article
 * system itself continues to come from the proven pre-1.0.39 theme CSS. */

.article-page .article-index a {
  transition: color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.article-page .article-index a.is-active {
  color: var(--violet);
  box-shadow: inset 3px 0 0 var(--violet);
}

.article-page .article-index a.is-active small {
  color: currentColor;
}

.article-index-toggle {
  display: none;
}

@media (max-width: 819px) {
  .article-page .article-index {
    margin-bottom: 56px;
  }

  .article-page .article-index > span {
    display: none;
  }

  .article-index-toggle {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 0 14px;
    border: 0;
    border-bottom: 1px solid var(--black);
    border-radius: 0;
    background: transparent;
    color: var(--black);
    font-family: var(--display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: left;
    cursor: pointer;
  }

  .article-index-toggle b {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--violet);
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
    transition: transform .2s ease;
  }

  .article-page .article-index nav {
    display: none;
    padding-top: 8px;
  }

  .article-page .article-index.is-open nav {
    display: flex;
  }

  .article-page .article-index.is-open .article-index-toggle b {
    transform: rotate(45deg);
  }

  .article-page .article-index a {
    padding-top: 14px;
    padding-bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-page .article-index a,
  .article-index-toggle b {
    transition: none;
  }
}

/* MELA 1.0.44 — unified article content width.
 * The highlighted keyline already uses the full article-body width. All
 * editorial copy and Gutenberg content now follows that same width instead of
 * falling back to the narrower reading-width token. */
.article-page .article-body,
.article-page .article-body > section,
.article-page .article-body > section > p,
.article-page .article-body > section > :is(h2,h3,h4,h5,h6,ul,ol,blockquote,figure,table),
.article-page .article-body .article-list,
.article-page .article-body .article-list p,
.article-page .article-body :is(.wp-block-paragraph,.wp-block-heading,.wp-block-list,.wp-block-quote,.wp-block-image,.wp-block-gallery,.wp-block-columns,.wp-block-table,.wp-block-video,.wp-block-embed),
.article-page .article-inline-check {
  width: 100%;
  max-width: 100% !important;
}

/* Nested Gutenberg wrappers sometimes carry their own reading measure. Keep
 * their direct text children aligned with the same editorial edge. */
.article-page .article-body :is(.wp-block-group__inner-container,.wp-block-column) > :is(p,h2,h3,h4,h5,h6,ul,ol,blockquote,figure) {
  width: 100%;
  max-width: 100% !important;
}
