/* Only user-selected text colors override the block's original palette. */
.ntu-block-has-text-color :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, blockquote),
.ntu-block-has-text-color .ntu-block-text-columns__intro-description,
.ntu-block-has-text-color .ntu-block-text-columns__lead,
.ntu-block-has-text-color .ntu-block-text-columns__column-body,
.ntu-block-has-text-color .ntu-post-feed__description,
.ntu-block-has-text-color .ntu-event-feed__description,
.ntu-block-has-text-color .ntu-opportunity-feed__description {
  color: var(--ntu-block-text-color) !important;
}

.ntu-block-has-text-color :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, blockquote) a {
  color: inherit !important;
}

/* The editor wrapper holds the preview variables; the published root is styled inline. */
.block-editor-block-list__block.ntu-block-has-background-color .ntu-block,
.block-editor-block-list__block.ntu-block-has-background-color .ntu-block-other-post {
  background-color: var(--ntu-block-background-color) !important;
}

/* Keep default section spacing until a breakpoint-specific toggle is enabled. */
@media (max-width: 1023px) {
  :is(.ntu-block, .ntu-block-other-post).is-mobile-trim-top,
  .block-editor-block-list__block.is-mobile-trim-top :is(.ntu-block, .ntu-block-other-post) {
    padding-top: 0 !important;
  }

  :is(.ntu-block, .ntu-block-other-post).is-mobile-trim-bottom,
  .block-editor-block-list__block.is-mobile-trim-bottom :is(.ntu-block, .ntu-block-other-post) {
    padding-bottom: 0 !important;
  }

  :is(.ntu-block-hero.is-mobile-trim-top, .block-editor-block-list__block.is-mobile-trim-top .ntu-block-hero) .ntu-block-hero__top,
  :is(.ntu-block-text-columns.is-mobile-trim-top, .block-editor-block-list__block.is-mobile-trim-top .ntu-block-text-columns) > :is(.ntu-block-text-columns__columns-wrap, .ntu-block-text-columns__intro, .ntu-block-text-columns__titled-wrap) {
    padding-top: 0 !important;
  }

  :is(.ntu-block-hero.is-mobile-trim-bottom, .block-editor-block-list__block.is-mobile-trim-bottom .ntu-block-hero) .ntu-block-hero__top,
  :is(.ntu-block-text-columns.is-mobile-trim-bottom, .block-editor-block-list__block.is-mobile-trim-bottom .ntu-block-text-columns) > :is(.ntu-block-text-columns__columns-wrap, .ntu-block-text-columns__intro, .ntu-block-text-columns__titled-wrap) {
    padding-bottom: 0 !important;
  }

  :is(.ntu-block-section-intro.is-mobile-trim-bottom, .block-editor-block-list__block.is-mobile-trim-bottom .ntu-block-section-intro) {
    margin-bottom: 0 !important;
  }
}

@media (min-width: 1024px) {
  :is(.ntu-block, .ntu-block-other-post).is-desktop-trim-top,
  .block-editor-block-list__block.is-desktop-trim-top :is(.ntu-block, .ntu-block-other-post) {
    padding-top: 0 !important;
  }

  :is(.ntu-block, .ntu-block-other-post).is-desktop-trim-bottom,
  .block-editor-block-list__block.is-desktop-trim-bottom :is(.ntu-block, .ntu-block-other-post) {
    padding-bottom: 0 !important;
  }

  :is(.ntu-block-hero.is-desktop-trim-top, .block-editor-block-list__block.is-desktop-trim-top .ntu-block-hero) .ntu-block-hero__top,
  :is(.ntu-block-text-columns.is-desktop-trim-top, .block-editor-block-list__block.is-desktop-trim-top .ntu-block-text-columns) > :is(.ntu-block-text-columns__columns-wrap, .ntu-block-text-columns__intro, .ntu-block-text-columns__titled-wrap) {
    padding-top: 0 !important;
  }

  :is(.ntu-block-hero.is-desktop-trim-bottom, .block-editor-block-list__block.is-desktop-trim-bottom .ntu-block-hero) .ntu-block-hero__top,
  :is(.ntu-block-text-columns.is-desktop-trim-bottom, .block-editor-block-list__block.is-desktop-trim-bottom .ntu-block-text-columns) > :is(.ntu-block-text-columns__columns-wrap, .ntu-block-text-columns__intro, .ntu-block-text-columns__titled-wrap) {
    padding-bottom: 0 !important;
  }

  :is(.ntu-block-section-intro.is-desktop-trim-bottom, .block-editor-block-list__block.is-desktop-trim-bottom .ntu-block-section-intro) {
    margin-bottom: 0 !important;
  }
}
