/* Nowa.Moda 0.5.12 — document layout. No scroll-position overrides.
 * Keep the working standard-page mobile rule; standalone documents use only
 * the viewport scroll, with no hidden/auto overflow on their content wrapper.
 */
@media (max-width: 782px) {
  html { scroll-behavior: auto; }
  @supports (overflow: clip) {
    body:not(.nmcc-documentBody):not(.wp-admin):not(.login) {
      overflow-x: clip;
      overflow-y: visible;
    }
  }
}

html.nmcc-documentRoot {
  --nmcc-layout-revision: nmcc-0-5-12;
  --nmt-header-h: 0px;
  scroll-behavior: auto;
  scroll-padding-top: 16px;
}

body.nmcc-documentBody {
  /* Do not use percentage heights or a fixed viewport-sized scroll box. */
  min-height: 100vh;
  min-height: 100svh;
  overflow: visible;
}

.nmcc-documentBody > .nmcc-documentMain {
  display: flow-root;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

/* Known, trusted document containers from the HTML supplied for the site.
 * Do not reset dialogs, cookie preferences, the admin bar or embedded widgets.
 * `overflow-x:hidden` computes an automatic Y overflow as well; avoid making
 * the entire legal document an additional scrolling ancestor.
 */
.nmcc-documentBody .nmcc-documentMain :is(.nmp-privacy, .nml-document, .nmn-terms) {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

@supports (overflow: clip) {
  html.nmcc-documentRoot,
  body.nmcc-documentBody,
  .nmcc-documentBody .nmcc-documentMain :is(.nmp-privacy, .nml-document, .nmn-terms) {
    overflow-x: clip;
    overflow-y: visible;
  }
}

/* A blank document has no 84px sticky site header to compensate for. */
.nmcc-documentBody .nmcc-documentMain :is(.nmp-card, .nml-card, .nmn-section) {
  scroll-margin-top: 16px;
}

@media (max-width: 782px) {
  .nmcc-documentBody .nmcc-documentMain :is(.nmn-toc, .nml-sidebar, .nmp-nav) {
    position: static;
    max-height: none;
    overflow: visible;
  }
}
