/* Keep the different introductions aligned beneath the floating navigation. */
@media screen {
  .inner-page :is(.inner-hero, .op-page, .consult-page, .journal-index-head, .journal-article-head) {
    padding-top: calc(var(--site-header-end) + clamp(1.5rem, 4vw, 3.5rem));
  }

  .inner-page :is(.breadcrumb, .op-trail) {
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .65rem;
    margin-bottom: clamp(1.35rem, 2.8vw, 2.5rem);
  }

  .inner-page .journal-article-head .journal-kind {
    margin-top: clamp(1.35rem, 2.8vw, 2.5rem);
  }

  .inner-page .op-page > .wrap {
    max-width: none;
  }

  .inner-page :is(.journal-outline, .op-topics, .detail-aside) {
    top: var(--site-anchor-offset);
  }

  /* The page's scroll-padding already reserves the navigation height. */
  .inner-page :is(.quick-consult, #deadline-title, .op-faq-group, .journal-passage h2, .journal-sources[id]) {
    scroll-margin-top: 0;
  }

  .inner-page #legal > .wrap,
  .inner-page main:has(> #legal) .inner-hero > .wrap {
    max-width: 78ch;
  }

  .inner-page #legal .legal-copy > h2:first-child {
    margin-top: 0;
  }

  .inner-page :is(#legal, #detail-body, #related) {
    padding-block: clamp(2.75rem, 5.5vw, 5.5rem);
  }
}

.inner-page main {
  overflow-wrap: anywhere;
}

.inner-page:lang(de) :is(.journal-passage p, .detail-copy p, .detail-copy li, .legal-copy p) {
  hyphens: auto;
}

.inner-page :is(.directory-entry, .journal-card-link, .journal-row-copy, .consult-frist, .op-groups, .detail-copy) {
  min-inline-size: 0;
}

.inner-page :is(.op-cta, .quick-primary, .quick-written, .quick-fallback, .consult-action, .quick-wa) {
  max-inline-size: 100%;
  white-space: normal;
}

.inner-page .quick-row {
  /* Field pairs respond to the form column, including when it sits beside the copy. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
}

.inner-page .quick-form input[type="date"] {
  max-inline-size: 100%;
}

.inner-page .related-grid {
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: clamp(.8rem, 1.75vw, 1.6rem);
}

/* Center the article and its outline as a unit on wide screens. */
@media screen and (min-width: 761px) {
  .inner-page .journal-article {
    --reading-gap: clamp(2rem, 5vw, 5.5rem);
  }

  .inner-page .journal-article-head > .wrap,
  .inner-page .journal-reading {
    max-width: calc(16rem + var(--reading-gap) + 72ch);
  }

  .inner-page .journal-reading {
    grid-template-columns: min(24%, 16rem) minmax(0, 1fr);
    column-gap: var(--reading-gap);
  }
}

@media (min-width: 801px) {
  .inner-page .service-detail-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr);
    gap: clamp(2rem, 5vw, 5.5rem);
  }
}

@media (max-width: 900px) {
  .inner-page .related-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

/* On a small tablet the contents list leaves too little width for an article. */
@media screen and (max-width: 760px) {
  .inner-page .journal-reading {
    grid-template-columns: minmax(0,1fr);
    gap: 1.75rem;
  }

  .inner-page .journal-outline {
    position: static;
    border-bottom: 1px solid var(--journal-hairline);
    padding-bottom: 1.25rem;
  }
}

@media (max-width: 520px) {
  .inner-page .related-grid {
    grid-template-columns: minmax(0,1fr);
  }

  .inner-page .related-grid a {
    padding: 1rem 1.2rem;
    min-height: 3.75rem;
  }
}

@media screen and (max-height: 680px) {
  .inner-page :is(.journal-outline, .op-topics, .detail-aside) {
    position: static;
  }
}
