/**
 * Version 4.2.3: denser full-post reader with minimal unused white space.
 *
 * The article pane still keeps a narrow safety rail for the floating scroll
 * controls, but the post body, media, engagement, and action sections now use
 * almost the complete available workspace.
 */

body.single-post.had-theme .had-blog-single-inner {
  width: 100%;
  min-height: 100%;
  padding:
    clamp(18px, 1.7vw, 28px)
    clamp(52px, 3.25vw, 62px)
    clamp(30px, 3vw, 44px)
    clamp(18px, 1.9vw, 30px);
}

body.single-post.had-theme .had-blog-single-inner > figure,
body.single-post.had-theme .had-blog-single-copy,
body.single-post.had-theme .had-blog-single-inner > .had-blog-engagement,
body.single-post.had-theme .had-blog-single-actions {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* Remove inherited content-width limits from Gutenberg and classic-editor media. */
body.single-post.had-theme .had-blog-single-copy > .wp-block-image,
body.single-post.had-theme .had-blog-single-copy > figure,
body.single-post.had-theme .had-blog-single-copy > .alignwide,
body.single-post.had-theme .had-blog-single-copy > .alignfull,
body.single-post.had-theme .had-blog-single-copy > .wp-block-gallery,
body.single-post.had-theme .had-blog-single-copy > .wp-block-embed,
body.single-post.had-theme .had-blog-single-copy > .wp-block-video,
body.single-post.had-theme .had-blog-single-copy > .wp-block-table {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Large article images should occupy the reader width rather than sitting in
 * a narrow centred column. Explicitly resized small images keep their size. */
body.single-post.had-theme .had-blog-single-copy .wp-block-image:not(.is-resized) img,
body.single-post.had-theme .had-blog-single-copy img.size-full,
body.single-post.had-theme .had-blog-single-copy img.size-large,
body.single-post.had-theme .had-blog-single-copy img.alignwide,
body.single-post.had-theme .had-blog-single-copy img.alignfull,
body.single-post.had-theme .had-blog-single-copy > p > img.aligncenter,
body.single-post.had-theme .had-blog-single-copy > p > a > img.aligncenter {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  object-fit: contain;
}

body.single-post.had-theme .had-blog-single-copy figcaption,
body.single-post.had-theme .had-blog-single-copy .wp-element-caption {
  width: 100%;
  max-width: none;
}

/* Keep a readable rhythm while allowing the text to use the wider reader. */
body.single-post.had-theme .had-blog-single-copy {
  font-size: clamp(15px, .92vw, 17px);
  line-height: 1.72;
}

body.single-post.had-theme .had-blog-single-copy > :first-child {
  margin-top: 0;
}

/* The control rail is slightly closer to the edge, returning more space to
 * the article while keeping the buttons clear of the text and media. */
body.single-post.had-theme .had-blog-scroll-controls {
  right: 10px;
}

@media (min-width: 1900px) {
  body.single-post.had-theme .had-blog-single-inner {
    padding-left: 34px;
    padding-right: 68px;
  }
}

@media (max-width: 900px) {
  body.single-post.had-theme .had-blog-single-inner {
    padding: 20px 54px 34px 18px;
  }

  body.single-post.had-theme .had-blog-scroll-controls {
    right: 8px;
  }
}

@media (max-width: 560px) {
  body.single-post.had-theme .had-blog-single-inner {
    padding: 18px 46px 30px 14px;
  }

  body.single-post.had-theme .had-blog-single-copy {
    font-size: 15px;
    line-height: 1.68;
  }
}

/* JavaScript also identifies large classic-editor images by their intrinsic
 * dimensions, covering posts that do not carry Gutenberg size classes. */
body.single-post.had-theme .had-blog-single-copy .had-blog-wide-media-wrap {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.single-post.had-theme .had-blog-single-copy img.had-blog-wide-media {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  object-fit: contain;
}
