/* single.php only (docs/PLAN.md §8/§12): Article Detail's hero and the fixed parts of its body
   (meta row, image, author section, related-articles section) stay template markup, not a
   tt360/hero block — there's no editorial need to rearrange a single-instance detail page's own
   structure, the same reasoning already applied to Newsletter Issue Detail. Ported from the
   prototype's own layout/article-detail.css, unchanged, since single.php writes the exact same
   .hero/.ad-* class names directly rather than going through tt360/hero's own render.php.
   core/pullquote (styled via its own "ad-quote" block style, components/pullquote.css) replaces
   the prototype's bare .ad-quote markup; tt360/author-card (components/author-card.css) replaces
   .ad-author-card's own internals, this file only keeps the section-level .ad-author wrapper
   (padding/background) around it. */

.ad-hero::before {
    content: none;
}

.ad-hero .hero-content {
    align-items: flex-start;
    margin: 0;
    text-align: left;
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.ad-meta .category {
    display: inline-block;
    padding: 4px 12px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: rgba(var(--charcoal), 1);
    background-color: rgba(var(--light-gold), 1);
    border-radius: 999px;
}

.ad-meta .meta {
    font-size: 13px;
    color: rgba(var(--warm-gray-dark), 1);
}

.ad-author-avatar {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: rgba(var(--charcoal), 0.08);
    border-radius: 4px;
}

/* Article body sits inside the same cream .hero section as the text block above it, no seam.
   Only text content caps to a reading measure (758px, same as the hero description's max-width);
   .media-placeholder/the real hero image and its caption stay full container width. */
.ad-body {
    margin-top: 48px;
}

.ad-body > p,
.ad-body > h2,
.ad-body > h3,
.ad-body > ul,
.ad-body > ol,
.ad-body > .wp-block-pullquote {
    max-width: 758px;
}

.ad-body .ad-hero-image {
    margin-top: 48px;
}

.ad-body .ad-hero-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1168 / 528;
    object-fit: cover;
    border-radius: 4px;
}

.ad-caption {
    max-width: 758px;
    margin: 8px 0 0;
    font-size: 13px;
    color: rgba(var(--warm-gray-dark), 1);
}

/* The lead paragraph (the first, larger paragraph of the article body) gets its own
   className in the editor, "ad-lead" — the same manual-className convention this theme
   already uses for .eyebrow/.description and tt360/newsletter-story's own .nid-intro/
   .nid-signoff, rather than a structural :first-child selector, which would misfire the
   moment a real hero image/caption (also rendered as children of .ad-body, ahead of
   the_content()'s own output) sit in front of it. */
.ad-body > .ad-lead {
    margin: 0;
    font-size: 18px;
    line-height: 28px;
}

/* 40px gap only when a hero image (with or without a caption) actually precedes the lead
   paragraph — an article with no featured image set has the lead as .ad-body's own first
   child instead, margin:0 same as the prototype's original conditional behavior. */
.ad-body > .ad-hero-image + .ad-lead,
.ad-body > .ad-caption + .ad-lead {
    margin-top: 40px;
}

.ad-body > p {
    margin: 16px 0 0;
    font-size: 16px;
    line-height: 26px;
}

/* Every plain h2/h3 the author types directly into the article body is the same visual
   weight here, matching the prototype's own "subhead" look (standing sitewide rule already
   sets the terra-green color; only the size needs setting here). */
.ad-body > h2,
.ad-body > h3 {
    margin: 48px 0 0;
    font-size: 32px;
}

.ad-body > ul,
.ad-body > ol {
    margin: 24px 0 0;
    padding-left: 24px;
    font-size: 16px;
    line-height: 26px;
}

.ad-body > ul li + li,
.ad-body > ol li + li {
    margin-top: 8px;
}

.ad-author {
    padding: 96px 0;
    background-color: rgba(var(--white), 1);
}

.ad-subscribe {
    padding: 96px 0;
    background-color: rgba(var(--white), 1);
}

.ad-related {
    padding: 96px 0;
    background-color: rgba(var(--cream), 1);
}

.ad-related .post-cards {
    margin-top: 55px;
}

/* sm */
@media (max-width: 575.98px) {
    .ad-author {
        padding: 48px 0;
    }

    .ad-subscribe {
        padding: 48px 0;
    }

    .ad-related {
        padding: 48px 0;
    }
}
