/* Story page: person sidebar + article. Header is unchanged. */

.ap-story-page {
    padding: 4.5rem 0 6rem;
    background: var(--white);
}

.ap-story-page .ap-story-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 48px 64px;
    align-items: start;
}

.ap-story-page .ap-story-person,
.ap-story-page .ap-story-body {
    width: auto;
    max-width: none;
    min-width: 0;
}

.ap-story-page .ap-story-person {
    position: sticky;
    top: 7.5rem;
}

.ap-story-page .ap-story-person-photo {
    margin: 0 0 16px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
}

.ap-story-page .ap-story-person-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ap-story-page .ap-story-person-name,
.ap-story-page .ap-story-person-title {
    margin: 0;
    line-height: 1.35;
}

.ap-story-page .ap-story-person-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
}

.ap-story-page .ap-story-person-title {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #66706c;
}

/* Nested StreamField sections should not add a third column or extra section padding. */
.ap-story-page .ap-story-body section {
    padding: 0;
    background: transparent;
}

.ap-story-page .ap-story-body .container {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.ap-story-page .ap-section-in .ap-row_01,
.ap-story-page .ap-text-list-cta .ap-row_01 {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: stretch;
}

.ap-story-page .ap-section-in .ap-row_01-left,
.ap-story-page .ap-section-in .ap-row_01-right,
.ap-story-page .ap-text-list-cta .ap-row_01-left,
.ap-story-page .ap-text-list-cta .ap-row_01-right {
    flex: none;
    width: 100%;
    max-width: none;
    padding: 0;
}

/* Section title becomes a kicker above the article, not a third column. */
.ap-story-page .ap-text-list-cta .ap-section-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.3;
    color: var(--color_1);
    margin: 0 0 20px;
}

.ap-story-page .ap-text-blocks {
    display: flex;
    flex-direction: column;
}

.ap-story-page .ap-text-block {
    max-width: 760px;
    color: #1a1a1a;
    line-height: 1.4;
}

.ap-story-page .ap-text-block p {
    margin: 0 0 0.7em;
    line-height: 1.4;
}

.ap-story-page .ap-text-block :is(h2, h3, h4) br {
    display: none;
}

.ap-story-page .ap-text-block p:last-child {
    margin-bottom: 0;
}

.ap-story-page .ap-text-block h2,
.ap-story-page .ap-text-block h3,
.ap-story-page .ap-text-block h4 {
    color: var(--black);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.ap-story-page .ap-text-block h3 {
    margin: 0 0 16px;
    font-size: 26px;
    font-weight: 700;
}

.ap-story-page .ap-text-block h4 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
}

.ap-story-page .ap-text-block a {
    color: var(--color_1);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ap-story-page .ap-text-block a:hover {
    color: var(--black);
}

/*
 * Newspaper lift-out quote.
 * Wagtail stores italic quotes as <p><b><i>…</i></b></p> (sometimes with a
 * leading <br>), not as a bare <i> only-child.
 */
.ap-story-page .ap-text-list-cta .ap-text-block p > b:has(> :is(i, em)),
.ap-story-page .ap-text-list-cta .ap-text-block p > strong:has(> :is(i, em)),
.ap-story-page .ap-text-list-cta .ap-text-block p > i,
.ap-story-page .ap-text-list-cta .ap-text-block p > em,
.ap-story-page .ap-text-list-cta .ap-text-block blockquote {
    position: relative;
    display: block;
    margin: 1.15rem auto;
    padding: 1.1rem 0.5rem 1rem;
    max-width: 36rem;
    text-align: center;
    background: none;
    border: 0;
    border-top: 1px solid rgba(4, 97, 76, 0.2);
    border-bottom: 1px solid rgba(4, 97, 76, 0.2);
    border-radius: 0;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
    letter-spacing: -0.015em;
    color: var(--color_1);
}

.ap-story-page .ap-text-list-cta .ap-text-block p > b:has(> :is(i, em))::before,
.ap-story-page .ap-text-list-cta .ap-text-block p > strong:has(> :is(i, em))::before,
.ap-story-page .ap-text-list-cta .ap-text-block p > i::before,
.ap-story-page .ap-text-list-cta .ap-text-block p > em::before,
.ap-story-page .ap-text-list-cta .ap-text-block blockquote::before {
    content: "“";
    display: block;
    margin: 0 0 0.4rem;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 3.4rem;
    font-weight: 600;
    font-style: normal;
    line-height: 0.65;
    color: var(--color_2);
}

.ap-story-page .ap-text-list-cta .ap-text-block p > br:first-child,
.ap-story-page .ap-text-list-cta .ap-text-block p > br:has(+ :is(b, strong):has(> :is(i, em))),
.ap-story-page .ap-text-list-cta .ap-text-block p > br:has(+ br + :is(b, strong):has(> :is(i, em))) {
    display: none;
}

.ap-story-page .ap-text-block h2 {
    margin: 1.5rem 0 16px;
    font-size: 26px;
    font-weight: 700;
}

.ap-story-page .ap-text-block p:has(> :is(b, strong, i, em)) + :is(h2, h3) {
    margin-top: 0.5rem;
}

.ap-story-page .ap-text-block:has(p > :is(b, strong, i, em)) + .ap-text-block.mt-4,
.ap-story-page .ap-text-block:has(p > :is(b, strong, i, em)) + .ap-text-block.mt-md-6 {
    margin-top: 0.75rem !important;
}

.ap-story-page .ap-text-list-cta .ap-text-block p > b:has(> :is(i, em)) :is(i, em, b, strong),
.ap-story-page .ap-text-list-cta .ap-text-block p > strong:has(> :is(i, em)) :is(i, em, b, strong),
.ap-story-page .ap-text-list-cta .ap-text-block p > i,
.ap-story-page .ap-text-list-cta .ap-text-block p > em,
.ap-story-page .ap-text-list-cta .ap-text-block blockquote :is(i, em, b, strong) {
    font-family: inherit;
    font-size: inherit;
    font-style: inherit;
    font-weight: 400;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.ap-story-page .ap-text-list-cta .ap-text-block ul {
    margin: 8px 0 28px;
    padding: 4px 0 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0;
}

.ap-story-page .ap-text-list-cta .ap-text-block ul li {
    width: 100%;
    line-height: 1.45;
    margin: 0 0 12px;
    position: relative;
    padding: 0 0 0 28px;
}

.ap-story-page .ap-text-list-cta .ap-text-block.two-col-ul ul li {
    width: calc(50% - 12px);
}

.ap-story-page .ap-text-list-cta .ap-text-block ul li:before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    background-image: url("/static/include/img/s-icon-check.png");
    left: 0;
    top: 5px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.ap-story-page .ap-text-list-cta .section-cta-block {
    padding: 28px 0 0;
    margin: 8px 0 0;
}

@media (max-width: 991px) {
    .ap-story-page {
        padding: 3.5rem 0 5rem;
    }

    .ap-story-page .ap-story-layout {
        grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
        gap: 36px 40px;
    }

    .ap-story-page .ap-text-block h3 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .ap-story-page {
        padding: 2.25rem 0 3.5rem;
    }

    .ap-story-page .ap-story-layout {
        display: flex;
        flex-direction: column;
        gap: 28px;
    }

    .ap-story-page .ap-story-person {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        width: 100%;
        max-width: 100%;
    }

    .ap-story-page .ap-story-person-photo {
        flex: 0 0 88px;
        width: 88px;
        margin: 0;
        border-radius: 10px;
    }

    .ap-story-page .ap-story-person-name {
        font-size: 16px;
    }

    .ap-story-page .ap-story-person-title {
        font-size: 14px;
    }

    .ap-story-page .ap-text-list-cta .ap-row_01 {
        gap: 12px;
    }

    .ap-story-page .ap-text-block {
        max-width: none;
    }

    .ap-story-page .ap-text-list-cta .ap-text-block.two-col-ul ul li {
        width: 100%;
    }

    .ap-story-page .ap-text-block h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .ap-story-page .ap-text-list-cta .ap-text-block p > b:has(> :is(i, em)),
    .ap-story-page .ap-text-list-cta .ap-text-block p > strong:has(> :is(i, em)),
    .ap-story-page .ap-text-list-cta .ap-text-block p > i,
    .ap-story-page .ap-text-list-cta .ap-text-block p > em,
    .ap-story-page .ap-text-list-cta .ap-text-block blockquote {
        margin: 1rem auto;
        padding: 0.9rem 0.25rem 0.85rem;
        font-size: 22px;
    }

    .ap-story-page .ap-text-list-cta .ap-text-block p > b:has(> :is(i, em))::before,
    .ap-story-page .ap-text-list-cta .ap-text-block p > strong:has(> :is(i, em))::before,
    .ap-story-page .ap-text-list-cta .ap-text-block p > i::before,
    .ap-story-page .ap-text-list-cta .ap-text-block p > em::before,
    .ap-story-page .ap-text-list-cta .ap-text-block blockquote::before {
        font-size: 2.6rem;
        margin-bottom: 0.25rem;
    }
}
