/*
 * Master single Post structure.
 *
 * This layer establishes placement and shared component slots only. Rank Math
 * owns TOC behavior and the existing iSPH FAQ block owns FAQ rendering.
 */

.single-post-layout .isp-post-component {
  width: 100%;
}

/* Main article components share the centered editorial canvas. */
.single-post-layout .isp-post-component--at-a-glance,
.single-post-layout .isp-post-component--conclusion {
  width: 100%;
  max-width: var(--isp-article-width-wide);
  margin-inline: auto;
}

.single-post-layout .isp-post-component--content .entry-content {
  margin-bottom: 0;
}

/* Contextual callouts stay centered on the reading rail. */
.single-post-layout .entry-content .isp-quick-action,
.single-post-layout .entry-content .isp-safety {
  margin-left: auto;
  margin-right: auto;
}

/* Structured Section reading layers remain centered inside the wider shell. */
.single-post-layout .entry-content .isp-structured-section__header,
.single-post-layout .entry-content .isp-structured-section__facts {
  margin-left: auto;
  margin-right: auto;
}

/*
 * Keep the metadata close to the section introduction, then leave one clear
 * rhythm step before the actionable content. This avoids isolated fact cards
 * floating in excessive whitespace.
 */
.single-post-layout .entry-content .isp-structured-section__facts {
  margin-top: var(--isp-article-space-4, 1.5rem);
}

.single-post-layout .entry-content .isp-structured-section__facts + .isp-structured-section__content {
  margin-top: var(--isp-article-space-5, 2rem);
}

/*
 * Legacy Gutenberg note styles predate the component system. On standard Posts
 * they use the same centered reading rail, radius, padding and restrained
 * surface rules as current iSPH callouts.
 */
.single-post-layout .entry-content > .wp-block-group.is-style-isp-soft-pink,
.single-post-layout .entry-content > .wp-block-group.is-style-isp-soft-blue,
.single-post-layout .entry-content > .wp-block-group.is-style-isp-warm-note {
  width: min(100%, var(--isp-article-width-reading));
  margin-left: auto;
  margin-right: auto;
  padding: var(--isp-article-padding-callout);
  border: var(--isp-article-border);
  border-left-width: 3px;
  border-radius: var(--isp-article-radius-callout);
  background: var(--isp-article-color-surface-soft);
  box-shadow: var(--isp-article-shadow-none);
}

.single-post-layout .entry-content > .wp-block-group.is-style-isp-soft-pink,
.single-post-layout .entry-content > .wp-block-group.is-style-isp-soft-blue {
  border-left-color: var(--isp-article-color-link);
}

.single-post-layout .entry-content > .wp-block-group.is-style-isp-warm-note {
  border-left-color: var(--isp-accent, #ebbf7a);
}

/* Conclusion remains the final editorial section on the centered reading rail. */
.single-post-layout .isp-post-component--conclusion .isp-article-conclusion {
  margin-top: var(--isp-article-space-block);
  margin-left: auto;
  margin-right: auto;
}
