/* BTools related posts across content and right sidebar - 2026-11-06.
   Remove this section to restore the theme's original related-post width. */
@media (min-width: 1025px) {
  body.single-post.has-sidebar:not(.has-left-sidebar) #primary > .content-container {
    container-type: inline-size;
  }

  body.single-post.has-sidebar:not(.has-left-sidebar) #main .entry-related {
    width: 100cqw;
    max-width: none;
    margin-inline: 0;
  }

  body.single-post.has-sidebar:not(.has-left-sidebar) #main .entry-related-inner {
    width: 100%;
    max-width: none;
    padding-inline: 0;
  }

  body.single-post.has-sidebar:not(.has-left-sidebar) #main .entry-related-inner-content {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding-inline: 0;
  }
}

/* Preserve the full source image and give each related article a clear card. */
body.single-post #main .entry-related .entry-related-carousel .loop-entry {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e4e6e8;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(22, 22, 20, .07);
}

body.single-post #main .entry-related .post-thumbnail {
  flex: none;
  height: auto;
  margin: 0;
  padding: 0;
  aspect-ratio: 768 / 429;
}

body.single-post #main .entry-related .post-thumbnail-inner {
  position: absolute;
  inset: 0;
  height: 100%;
}

body.single-post #main .entry-related .post-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
}

body.single-post #main .entry-related .loop-entry .entry-content-wrap {
  flex: 1;
  padding: 24px;
}

body.single-post #main .entry-related .entry-header {
  margin: 0;
}

body.single-post #main .entry-related .entry-related-carousel h3.entry-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 3.2em;
  max-height: 3.2em;
  margin: 0;
  font-size: 20px;
  line-height: 1.6;
}

body.single-post #main .entry-related .entry-related-carousel .entry-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: 5.25em;
  max-height: 5.25em;
  margin: 12px 0 0;
  color: #555;
  font-size: 16px;
  line-height: 1.75;
}

body.single-post #main .entry-related .entry-summary p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

body.single-post #main .entry-related .splide__track {
  padding-block: 4px 16px;
  margin-block: -4px -16px;
}

@media (max-width: 767px) {
  body.single-post #main .entry-related .loop-entry .entry-content-wrap {
    padding: 20px;
  }
}
