/* Keep the recovered layout while exposing native block editing controls. */
.entry-content .wp-block-gallery.ahrg-gallery,
.editor-styles-wrapper .wp-block-gallery.ahrg-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px !important;
  margin: 1.5em 0;
}
.entry-content .wp-block-gallery.ahrg-gallery > figure.wp-block-image,
.editor-styles-wrapper .wp-block-gallery.ahrg-gallery > figure.wp-block-image {
  width: auto !important;
  margin: 0 !important;
  aspect-ratio: auto;
  padding-bottom: 6.375px;
  box-sizing: content-box;
  min-width: 0;
}
.entry-content .wp-block-gallery.ahrg-gallery > figure > a,
.editor-styles-wrapper .wp-block-gallery.ahrg-gallery > figure > a {
  display: block !important;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
}
.entry-content .wp-block-gallery.ahrg-gallery > figure img,
.editor-styles-wrapper .wp-block-gallery.ahrg-gallery > figure img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  padding: 0;
  border: 0;
  object-fit: cover;
  box-sizing: border-box;
}
.entry-content > .ahrg-gallery:first-child { margin-top: 1.625em; }
.entry-content .wp-block-table:has(> figcaption) { display: flex; flex-direction: column; }
.entry-content .wp-block-table > figcaption { order: -1; }
.entry-content p.ahrg-legacy-line,
.editor-styles-wrapper p.ahrg-legacy-line { margin: 0; }
.entry-content .ahrg-legacy-group { margin: 0; }
.entry-content .ahrg-table-caption { margin: 0; }
.entry-content .wp-block-table { margin: 0 0 1.625em; }
.entry-content .wp-block-table table { margin-bottom: 0; border-collapse: separate; border-spacing: 0; }
.entry-content .wp-block-table th { padding: 0; border: 0; }
.editor-styles-wrapper .wp-block-gallery.ahrg-gallery { margin-left: auto; margin-right: auto; max-width: 840px; }
.entry-content .ahrg-legacy-video { margin-bottom: 1.625em; }
.entry-content .ahrg-legacy-video .wp-block-embed__wrapper:before { display: none; }
.entry-content .ahrg-legacy-video iframe { position: static; display: inline-block; }
.entry-content .wp-block-table td,
.entry-content .wp-block-table th { border-left: 0; border-right: 0; border-bottom: 0; }
.entry-content .wp-block-table td { border-top: 1px solid #ddd; padding: 6px 10px 6px 0; }
.entry-content .ahrg-legacy-image img { box-sizing: content-box; }
.entry-content figure.ahrg-legacy-image { padding-bottom: 12.375px; margin-bottom: 1.625em; }
.entry-content div.ahrg-legacy-image { padding-top: 6px; padding-bottom: 1.625em; }
.entry-content .wp-block-table thead,
.entry-content .wp-block-table tfoot { border: 0; }
@media (max-width: 650px) {
  .entry-content .wp-block-gallery.ahrg-gallery,
  .editor-styles-wrapper .wp-block-gallery.ahrg-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
  }
  .entry-content .wp-block-gallery.ahrg-gallery > figure.wp-block-image,
  .editor-styles-wrapper .wp-block-gallery.ahrg-gallery > figure.wp-block-image { padding-bottom: 6.125px; }
}
