/* 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;
}

/* MELA 1.0.58 — Office Journal QA: sources are a trust layer, not another card. */
.article-sources {
  width: min(100%, 1540px);
  margin: clamp(4.5rem, 8vw, 8rem) auto 0;
  padding: 0 var(--page-x);
  color: var(--black);
}
.article-sources > small {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1.1rem;
  color: var(--violet);
  font-family: var(--display);
  font-size: .72rem;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.article-sources > small::before {
  content: "";
  width: .48rem;
  height: .48rem;
  flex: 0 0 .48rem;
  background: currentColor;
}
.article-sources h2 {
  max-width: 18ch;
  margin: 0 0 clamp(1.75rem, 3vw, 2.75rem);
}
.article-sources__list {
  display: grid;
  border-top: 1px solid rgba(9,9,10,.18);
}
.article-sources__list a {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 1.5rem;
  align-items: center;
  min-height: 4.4rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(9,9,10,.18);
  color: var(--black) !important;
  font-family: var(--body);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.35;
  text-decoration: none !important;
}
.article-sources__list a:hover span,
.article-sources__list a:focus-visible span { color: var(--violet); }
.article-sources__list i {
  font-size: 1.35rem;
  font-style: normal;
  transition: transform .2s ease;
}
.article-sources__list a:hover i,
.article-sources__list a:focus-visible i { transform: translate(2px,-2px); }

@media (max-width: 819px) {
  .article-sources {
    margin-top: 3.75rem;
    padding: 0 1.25rem;
  }
  .article-sources h2 { max-width: 100%; }
  .article-sources__list a { min-height: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .article-sources__list i { transition: none; }
}


/* MELA 1.0.59 — Office Journal final article polish.
 * Keep the approved editorial system; only remove residual friction. */
.article-page .article-layout {
  padding-top: clamp(68px, 5.8vw, 104px) !important;
}

.article-page .article-note {
  margin-top: clamp(1.7rem, 2.5vw, 2.35rem) !important;
  padding: clamp(1.25rem, 2vw, 1.65rem) clamp(1.35rem, 2.2vw, 1.9rem) !important;
  border: 0 !important;
  border-left: 10px solid var(--signal) !important;
  background: var(--violet-light) !important;
  color: var(--black) !important;
  box-shadow: none !important;
  font-size: clamp(1rem, 1.2vw, 1.16rem) !important;
  font-weight: 650 !important;
  line-height: 1.5 !important;
}

@media (max-width: 900px) {
  .article-page .article-layout { padding-top: 3.8rem !important; }
}

@media (max-width: 767px) {
  .article-page .article-layout { padding-top: 2.8rem !important; }
  .article-page .article-note {
    border-left-width: 7px !important;
    padding: 1.1rem 1.15rem !important;
  }
}

/* MELA 1.0.60 — editorial kicker-to-headline rhythm.
 * The kicker is an orientation layer, not part of the headline block. Give it
 * enough breathing room on article surfaces while preserving the approved
 * typography and section geometry. */
.article-page {
  --mela-kicker-title-gap: clamp(1.25rem, 1.45vw, 1.55rem);
}

/* Article hero: separate OFFICE JOURNAL clearly from the H1. */
.article-page .article-hero > small {
  margin-bottom: var(--mela-kicker-title-gap) !important;
}
.article-page .article-hero > small + h1 {
  margin-top: 0 !important;
}

/* Conversion / FAQ / sources: same editorial rhythm when kicker and title are
 * stacked. This keeps the system consistent without changing their layout. */
.article-page .article-conversion > small,
.article-page .article-faq > small,
.article-page .article-sources > small {
  margin-bottom: var(--mela-kicker-title-gap) !important;
}
.article-page .article-conversion > small + h2,
.article-page .article-faq > small + h2,
.article-page .article-sources > small + h2 {
  margin-top: 0 !important;
}

/* Author block: the lime ÜBER MELA kicker needs a visible pause before the
 * statement headline on dark background. */
.article-page .article-author > div > small {
  display: flex !important;
  margin-bottom: var(--mela-kicker-title-gap) !important;
}
.article-page .article-author > div > small + h2 {
  margin-top: 0 !important;
}

/* The Weiterlesen header is a two-column editorial rail on desktop, so its
 * kicker intentionally stays beside the title. Once stacked, apply the same
 * vertical rhythm. */
@media (max-width: 767px) {
  .article-page {
    --mela-kicker-title-gap: .95rem;
  }
  .article-page .article-related-v2__head > small {
    margin-bottom: .15rem !important;
  }
}
