/* The current route owns both the body class and the main-local variable.
   No head inline state, delayed JS initialization, or descendant-wide reset. */
body.single-post.liuyt-post-width-enabled main.liuyt-post-width-root {
  box-sizing: border-box;
  width: calc(100% - 2rem);
  max-width: var(--liuyt-post-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Override the generated core/group 960px rule, including .alignwide. */
body.single-post.liuyt-post-width-enabled main.liuyt-post-width-root > .wp-block-post-title,
body.single-post.liuyt-post-width-enabled main.liuyt-post-width-root > .wp-block-post-content {
  box-sizing: border-box;
  width: 100%;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.single-post.liuyt-post-width-enabled main.liuyt-post-width-root > .wp-block-post-content {
  --wp--style--global--content-size: var(--liuyt-post-width);
  --wp--style--global--wide-size: var(--liuyt-post-width);
}

/* Only wrappers constrained by the theme/608px plugin. Custom HTML such as
   .lyad and nested components retain their own max-width and internal layout. */
body.single-post.liuyt-post-width-enabled main.liuyt-post-width-root > .wp-block-post-content > :where(p, ul, ol, blockquote, h2, h3, h4, h5, h6, details.wp-block-details, figure.wp-block-pullquote, figure.wp-block-table, figure.wp-block-image, .wp-block-image),
body.single-post.liuyt-post-width-enabled main.liuyt-post-width-root > .wp-block-post-content > :where(figure, .wp-block-image) > figcaption {
  box-sizing: border-box;
  width: 100%;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Includes the title, toggle and collapsed rail. Progress is a separate node. */
body.single-post.liuyt-post-width-enabled .liuyt-toc {
  display: none !important;
}
