/* A) Remove any space right under the tab header */
details > summary {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}



/* C) Field Group sometimes puts margins on the details wrapper itself */
details.js-form-wrapper,
details.form-wrapper {
  margin-top: -31px !important;
  padding-top: 0 !important;
}

/* D) Clamp the first content element inside the pane (field wrapper or anything else) */
details > .details-wrapper > *:first-child {
  margin-top: -45 !important;
  padding-top: 0 !important;
}

/* E) If the first child is the Drupal field container, zero it too */
details > .details-wrapper > .field,
details > .details-wrapper > .field__item {
  margin-top: -45 !important;
  padding-top: 0 !important;
}

/* F) CKEditor: neutralize any leading blank paragraph */
.ckeditor-accordion dd > p:first-child {
  margin-top: -45 !important;
  line-height: 0; /* collapses a lone <br>'s visual height */
}
.ckeditor-accordion dd > p > br:only-child {
  display: none;
}

/* G) Accordion block: don’t add top margin on this page */
.ckeditor-accordion {
  margin-top: -45 !important;
}
.ckeditor-accordion dt:first-of-type,
.ckeditor-accordion dd:first-of-type {
  margin-top: -45 !important;
}

/* H) Tables should not introduce top spacing at the start */
.ckeditor-accordion dd table {
  margin-top: -45 !important;
  border-collapse: collapse;
}
.ckeditor-accordion dd table th,
.ckeditor-accordion dd table td {
  padding: .5rem;
}