/*
 * Standard bottom-of-article experience for single Posts.
 *
 * Conclusion remains editorial content. Everything inside .isp-post-end is the
 * controlled next-stage journey: resource, trust, discovery, utility and comments.
 */

.single-post-layout .isp-post-end {
  width: 100%;
  margin-top: var(--isp-article-space-7, 4rem);
}

.single-post-layout .isp-post-end > .isp-post-component {
  width: 100%;
  margin-top: 0;
}

.single-post-layout .isp-post-end > .isp-post-component + .isp-post-component {
  margin-top: var(--isp-article-space-7, 4rem);
}

.single-post-layout .isp-post-end > .isp-post-component--related + .isp-post-component--navigation {
  margin-top: var(--isp-article-space-6, 3rem);
}

.single-post-layout .isp-post-end > .isp-post-component--related + .isp-post-component--comments {
  margin-top: var(--isp-article-space-8, 6rem);
}

.single-post-layout .isp-post-end > .isp-post-component--navigation + .isp-post-component--comments {
  margin-top: var(--isp-article-space-7, 4rem);
}

/* The ending wrapper owns vertical rhythm, so child components do not add their own outer gaps. */
.single-post-layout .isp-post-end .isp-resource-cta,
.single-post-layout .isp-post-end .isp-author-trust,
.single-post-layout .isp-post-end .isp-related-posts,
.single-post-layout .isp-post-end .single-post-navigation,
.single-post-layout .isp-post-end .comments-area {
  margin-top: 0;
  margin-bottom: 0;
}

/* The funnel expands as the reader moves from editorial content back toward the site. */
.single-post-layout .isp-post-end .isp-resource-cta {
  max-width: var(--isp-article-width-wide, 960px);
}

.single-post-layout .isp-post-end .isp-author-trust {
  max-width: var(--isp-article-width-wide, 960px);
}

.single-post-layout .isp-post-end .isp-related-posts {
  max-width: var(--isp-article-width-container, 1240px);
}

.single-post-layout .isp-post-end .single-post-navigation {
  max-width: var(--isp-article-width-wide, 960px);
}

.single-post-layout .isp-post-end .comments-area {
  max-width: var(--isp-article-width-reading, 760px);
}

/* Previous / Next is utility navigation, not another promotional card system. */
.single-post-layout .isp-post-end .single-post-navigation {
  padding-top: var(--isp-article-space-4, 1.5rem);
  border-top: var(--isp-article-border, 1px solid #eae9ea);
}

.single-post-layout .isp-post-end .single-post-navigation .nav-links {
  gap: var(--isp-article-space-5, 2rem);
}

.single-post-layout .isp-post-end .single-post-navigation a {
  min-height: 44px;
  padding: var(--isp-article-space-3, 1rem) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.single-post-layout .isp-post-end .single-post-navigation a:hover,
.single-post-layout .isp-post-end .single-post-navigation a:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.single-post-layout .isp-post-end .single-post-navigation a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--isp-article-color-link, #2378aa) 28%, transparent);
  outline-offset: 4px;
}

.single-post-layout .isp-post-end .post-nav-label {
  color: var(--isp-article-color-muted, #6f6b6d);
  font-size: var(--isp-article-font-xs, .78rem);
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.single-post-layout .isp-post-end .post-nav-title {
  color: var(--isp-article-color-text, #444244);
  font-size: var(--isp-article-font-sm, .9rem);
  font-weight: 750;
  line-height: var(--isp-article-line-ui, 1.45);
}

.single-post-layout .isp-post-end .single-post-navigation a:hover .post-nav-title,
.single-post-layout .isp-post-end .single-post-navigation a:focus-visible .post-nav-title {
  color: var(--isp-article-color-link, #2378aa);
}

/* Comments are neutral utility content and stay visually separate from discovery. */
.single-post-layout .isp-post-end .comments-area {
  padding-top: var(--isp-article-space-6, 3rem);
  border-top: var(--isp-article-border, 1px solid #eae9ea);
  background: transparent;
}

.single-post-layout .isp-post-end .comments-title,
.single-post-layout .isp-post-end .comment-reply-title {
  margin-top: 0;
  color: var(--isp-article-color-text, #444244);
  font-size: var(--isp-article-font-h3, 1.5rem);
  line-height: var(--isp-article-line-heading, 1.14);
}

.single-post-layout .isp-post-end .comment-notes,
.single-post-layout .isp-post-end .logged-in-as,
.single-post-layout .isp-post-end .must-log-in,
.single-post-layout .isp-post-end .comments-closed {
  color: var(--isp-article-color-muted, #6f6b6d);
  font-size: var(--isp-article-font-sm, .9rem);
  line-height: var(--isp-article-line-ui, 1.45);
}

.single-post-layout .isp-post-end .comment-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.single-post-layout .isp-post-end .comment-form textarea,
.single-post-layout .isp-post-end .comment-form select {
  width: 100%;
  max-width: 100%;
}

/* Keep a clear handoff from post-specific content into the global footer. */
.single-post-layout {
  padding-bottom: var(--isp-article-space-8, 6rem);
}

@media (max-width: 700px) {
  .single-post-layout .isp-post-end {
    margin-top: var(--isp-article-space-6, 3rem);
  }

  .single-post-layout .isp-post-end > .isp-post-component + .isp-post-component,
  .single-post-layout .isp-post-end > .isp-post-component--navigation + .isp-post-component--comments {
    margin-top: var(--isp-article-space-6, 3rem);
  }

  .single-post-layout .isp-post-end > .isp-post-component--related + .isp-post-component--comments {
    margin-top: var(--isp-article-space-7, 4rem);
  }

  .single-post-layout .isp-post-end .single-post-navigation .nav-links {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--isp-article-space-2, .75rem);
  }

  .single-post-layout .isp-post-end .single-post-navigation .nav-next {
    text-align: left;
  }

  .single-post-layout {
    padding-bottom: var(--isp-article-space-7, 4rem);
  }
}
