/**
 * Ava Hart's Daily Prep — post styling.
 *
 * DESIGN THESIS: a broadcast RUNDOWN, not a blog post. The reader is a host
 * or producer at 4am who needs two things: get to my segment fast (the
 * numbered sticky rundown), and read it aloud (17px/1.65 body, calm panels,
 * one accent per section header — never a wall of tinted boxes).
 *
 * Every color is a --rcp-* token with its canonical hex as fallback
 * (src/styles/tokens.css is the ONLY source), so the page follows dark mode
 * by construction. The two FIXED surfaces (the espresso masthead and its
 * cream ink) deliberately never flip — ink on a fixed surface must be fixed.
 *
 * The signature element is the system's red→gold hairline: the masthead's
 * base edge, the active rundown item, and the coaching tip's crown. Numbers
 * come from CSS counters — the markup (wordpress_client.py) is untouched,
 * and the numbering is honest: this content IS a running order.
 *
 * This file has a byte-identical twin at
 * automations/ava-hart-daily-prep/templates/wordpress-post.css — edit here,
 * copy there.
 */

.rcp-post-body {
    --ava-espresso: #201a14;            /* fixed dark surface — never flips */
    --ava-on-espresso: #f4ece0;         /* fixed cream ink for the masthead */
    --ava-on-espresso-soft: #d8cfc0;    /* fixed soft cream */
    --ava-hairline: linear-gradient(90deg, var(--rcp-red, #be5240) 0%, var(--rcp-gold, #f4b23c) 100%);
    --ava-radius: 16px;

    font-size: 17px;
    line-height: 1.65;
    color: var(--rcp-text, #474039);
    counter-reset: rundown-nav rundown-section;
}

/* ===== Masthead — the fixed espresso band ===== */

.rcp-post-body .ava-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--ava-espresso);
    border-radius: var(--ava-radius);
    padding: 32px 36px 36px;
    margin-bottom: 28px;
    overflow: hidden;
}

.rcp-post-body .ava-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--ava-hairline);
}

.rcp-post-body .ava-header img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--ava-on-espresso);
    object-fit: cover;
    flex-shrink: 0;
}

.rcp-post-body .ava-header-info {
    min-width: 0;
}

.rcp-post-body .ava-header-label {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--rcp-gold, #f4b23c); /* gold kicker on fixed espresso — the hero grammar */
    margin: 0 0 6px;
}

.rcp-post-body .ava-header-name {
    font-family: 'DM Serif Display', Georgia, serif; /* the page's ONE display moment */
    font-weight: 400;
    font-size: 34px;
    line-height: 1.15;
    color: var(--ava-on-espresso);
    margin: 0 0 8px;
}

.rcp-post-body .ava-header-bio {
    font-size: 15px;
    line-height: 1.5;
    color: var(--ava-on-espresso-soft);
    margin: 0;
    max-width: 52ch;
}

/* ===== The rundown — numbered sticky nav ===== */

.rcp-post-body .prep-nav {
    display: flex;
    align-items: baseline;
    gap: 10px 18px;
    flex-wrap: wrap;
    padding: 14px 20px;
    background: var(--rcp-surface, #ffffff);
    border: 1px solid var(--rcp-border, #e5e5e5);
    border-radius: 12px;
    margin-bottom: 36px;
    position: sticky;
    top: var(--rcp-sticky-top, 92px);
    z-index: 40;
    transition: box-shadow 0.2s ease, border-radius 0.2s ease;
}

.rcp-post-body .prep-nav.is-stuck {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rcp-post-body .prep-nav-label {
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--rcp-text-muted, #9a9a96);
    margin: 0;
    flex-shrink: 0;
}

.rcp-post-body .prep-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 0;
}

.rcp-post-body .prep-nav-links a,
.rcp-post-body .prep-nav-links a:link,
.rcp-post-body .prep-nav-links a:visited {
    counter-increment: rundown-nav;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--rcp-text-light, #6b6b67);
    padding: 4px 0 6px;
    /* Hairline underline, revealed on the active segment. */
    background-image: var(--ava-hairline);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: color 0.15s ease, background-size 0.2s ease;
}

.rcp-post-body .prep-nav-links a::before {
    content: counter(rundown-nav, decimal-leading-zero);
    font-size: 11px;
    color: var(--rcp-gold-text, #8a5a12);
    letter-spacing: 0.02em;
}

.rcp-post-body .prep-nav-links a:hover {
    color: var(--rcp-text-heavy, #1f1d1c);
}

.rcp-post-body .prep-nav-links a:focus-visible {
    outline: 2px solid var(--rcp-blue, #2f6f8d);
    outline-offset: 3px;
    border-radius: 4px;
}

.rcp-post-body .prep-nav-links a.active,
.rcp-post-body .prep-nav-links a.active:link,
.rcp-post-body .prep-nav-links a.active:visited {
    color: var(--rcp-red-text, #a8412e);
    background-size: 100% 2px; /* the on-air marker */
}

/* ===== Coaching tip — the lead card, crowned by the hairline ===== */

.rcp-post-body .coaching-tip {
    position: relative;
    background: var(--rcp-surface, #ffffff);
    border: 1px solid var(--rcp-border, #e5e5e5);
    border-radius: var(--ava-radius);
    padding: 30px 32px 28px;
    margin-bottom: 28px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.rcp-post-body .coaching-tip::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ava-hairline);
}

.rcp-post-body .coaching-tip-label {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rcp-gold-text, #8a5a12);
    margin: 0 0 10px;
}

.rcp-post-body .coaching-tip-title {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.3;
    color: var(--rcp-text-heavy, #1f1d1c);
    margin: 0 0 12px;
}

.rcp-post-body .coaching-tip-text {
    font-size: 18px;
    margin: 0 0 16px;
}

.rcp-post-body .coaching-tip-avas-take {
    font-style: italic;
    font-size: 16px;
    color: var(--rcp-text-light, #6b6b67);
    border-left: 2px solid var(--rcp-border, #e5e5e5);
    padding-left: 16px;
    margin: 0;
}

/* ===== Section panels — one calm card language ===== */

.rcp-post-body .prep-section {
    background: var(--rcp-surface, #ffffff);
    border: 1px solid var(--rcp-border, #e5e5e5);
    border-radius: var(--ava-radius);
    padding: 26px 32px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    counter-increment: rundown-section;
    scroll-margin-top: calc(var(--rcp-sticky-top, 92px) + 64px);
}

/* Section header = a rundown row: number, tracked label, quiet rule. */
.rcp-post-body .prep-section-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rcp-red-text, #a8412e);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rcp-border, #e5e5e5);
}

.rcp-post-body .prep-section-title::before {
    content: counter(rundown-section, decimal-leading-zero);
    font-size: 13px;
    color: var(--rcp-text-muted, #9a9a96);
    letter-spacing: 0.02em;
}

/* Per-section accent lives ONLY in the label color — the calm stays calm. */
.rcp-post-body .prep-section-title--purple {
    color: var(--rcp-purple-text, #6a3086);
}

.rcp-post-body .prep-section-title--terracotta {
    color: var(--rcp-red-text, #a8412e);
}

.rcp-post-body .prep-section-title--brown {
    color: var(--rcp-gold-text, #8a5a12);
}

/* ===== Inner items — divider rows, not boxes ===== */

.rcp-post-body .headline-item,
.rcp-post-body .pop-culture-item,
.rcp-post-body .birthday-item,
.rcp-post-body .history-item,
.rcp-post-body .music-history-item,
.rcp-post-body .horoscope-item,
.rcp-post-body .trivia-item,
.rcp-post-body .weekly-item,
.rcp-post-body .topic-card {
    padding: 14px 0;
    border-bottom: 1px solid var(--rcp-border, #e5e5e5);
    background: none;
    border-radius: 0;
}

.rcp-post-body .headline-item:last-child,
.rcp-post-body .pop-culture-item:last-child,
.rcp-post-body .birthday-item:last-child,
.rcp-post-body .history-item:last-child,
.rcp-post-body .music-history-item:last-child,
.rcp-post-body .horoscope-item:last-child,
.rcp-post-body .trivia-item:last-child,
.rcp-post-body .weekly-item:last-child,
.rcp-post-body .topic-card:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.rcp-post-body .headline-item:hover,
.rcp-post-body .pop-culture-item:hover,
.rcp-post-body .birthday-item:hover,
.rcp-post-body .history-item:hover,
.rcp-post-body .music-history-item:hover,
.rcp-post-body .horoscope-item:hover,
.rcp-post-body .trivia-item:hover,
.rcp-post-body .weekly-item:hover,
.rcp-post-body .topic-card:hover {
    background: var(--rcp-gray-50, #fafaf6);
}

.rcp-post-body .trivia-item:nth-child(odd),
.rcp-post-body .trivia-item:nth-child(even) {
    background: none; /* the old zebra stripes — divider rows carry the rhythm now */
}

/* Item titles: bold ink, reading size. */
.rcp-post-body .headline-title,
.rcp-post-body .pop-culture-title,
.rcp-post-body .history-title,
.rcp-post-body .music-history-title {
    font-weight: 700;
    font-size: 17px;
    color: var(--rcp-text-heavy, #1f1d1c);
    margin: 0 0 4px;
}

.rcp-post-body .headline-summary,
.rcp-post-body .pop-culture-summary,
.rcp-post-body .history-summary,
.rcp-post-body .music-history-summary {
    margin: 0;
}

/* Item eyebrows: year, sign, dates, labels — small, tracked, quiet. */
.rcp-post-body .history-year,
.rcp-post-body .music-history-year,
.rcp-post-body .music-history-artist,
.rcp-post-body .horoscope-dates,
.rcp-post-body .topic-card-label,
.rcp-post-body .trivia-label,
.rcp-post-body .weekly-item-number {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rcp-text-muted, #9a9a96);
    margin: 0 0 3px;
}

.rcp-post-body .horoscope-sign {
    font-weight: 700;
    font-size: 17px;
    color: var(--rcp-text-heavy, #1f1d1c);
    margin: 0 0 2px;
}

.rcp-post-body .horoscope-text,
.rcp-post-body .topic-card-text,
.rcp-post-body .weekly-item-text,
.rcp-post-body .trivia-content {
    margin: 0;
}

.rcp-post-body .birthday-item p,
.rcp-post-body .birthday-item strong {
    margin: 0;
}

.rcp-post-body .birthday-item strong {
    color: var(--rcp-text-heavy, #1f1d1c);
}

/* ===== Pipeline content boxes (shared contract) ===== */

.rcp-post-body .content-box,
.rcp-post-body .content-box--blue,
.rcp-post-body .content-box--purple {
    background: var(--rcp-gray-50, #fafaf6);
    border: 1px solid var(--rcp-border, #e5e5e5);
    border-radius: 12px;
    padding: 18px 20px;
    margin: 16px 0;
}

.rcp-post-body .content-box p {
    margin: 0 0 10px;
}

.rcp-post-body .content-box p:last-child {
    margin-bottom: 0;
}

/* ===== Footer sign-off ===== */

.rcp-post-body .prep-footer {
    text-align: center;
    padding: 28px 20px 8px;
    margin-top: 8px;
    border-top: 1px solid var(--rcp-border, #e5e5e5);
}

.rcp-post-body .prep-footer p {
    margin: 0;
}

.rcp-post-body .prep-footer-label {
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--rcp-text-muted, #9a9a96);
    margin-bottom: 6px;
}

.rcp-post-body .prep-footer-name {
    font-weight: 700;
    font-size: 17px;
    color: var(--rcp-text-heavy, #1f1d1c);
}

.rcp-post-body .prep-footer-tagline {
    font-size: 14px;
    color: var(--rcp-text-light, #6b6b67);
    margin-top: 4px;
}

/* ===== Small screens ===== */

@media (max-width: 768px) {
    .rcp-post-body {
        font-size: 16px;
    }

    .rcp-post-body .ava-header {
        flex-direction: column;
        text-align: center;
        gap: 14px;
        padding: 26px 22px 30px;
    }

    .rcp-post-body .ava-header-bio {
        max-width: none;
    }

    .rcp-post-body .ava-header-name {
        font-size: 28px; /* still the display moment, still serif */
    }

    .rcp-post-body .prep-nav {
        padding: 12px 16px;
        gap: 8px 14px;
        top: var(--rcp-sticky-top, 106px);
    }

    .rcp-post-body .prep-section,
    .rcp-post-body .coaching-tip {
        padding: 20px 18px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rcp-post-body .prep-nav,
    .rcp-post-body .prep-nav-links a {
        transition: none;
    }
}
