/*
Theme Name: Story Press Child
Theme URI: https://example.com/
Description: Editorial story theme for Story Press.
Author: Story Press
Template: generatepress
Version: 1.0.0
Text Domain: storypress-child
*/

:root {
    --sp-ink: #14213d;
    --sp-muted: #7d8793;
    --sp-line: #d8dde3;
    --sp-pink: #d7193f;
    --sp-soft-pink: #f4b4c0;
    --sp-paper: #f5f5f4;
    --sp-content-width: 1180px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--sp-ink);
    background: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
}

a {
    color: inherit;
}

.sp-site-header {
    border-top: 1px solid #1d1d1d;
    border-bottom: 1px solid var(--sp-line);
    background: #ffffff;
}

.sp-header-inner,
.sp-site-main,
.sp-site-footer__inner {
    width: min(100% - 32px, var(--sp-content-width));
    margin-inline: auto;
}

.sp-header-inner {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.sp-brand {
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .01em;
}

.sp-primary-nav ul,
.sp-footer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sp-primary-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.sp-primary-nav a {
    color: #1e2633;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

.sp-primary-nav a:hover,
.sp-footer-nav a:hover {
    color: var(--sp-pink);
}

/* Mobile navigation drawer. The desktop navigation remains unchanged. */
.sp-mobile-menu-toggle,
.sp-mobile-drawer {
    display: none;
}

.sp-site-main {
    padding-block: 24px 42px;
}

.sp-section-heading {
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sp-line);
    color: #182333;
    font-size: 18px;
    font-weight: 400;
}

.sp-top-news {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(210px, .85fr);
    gap: 18px;
    margin-bottom: 34px;
}

.sp-top-news__lead,
.sp-top-news__secondary,
.sp-top-news__trending {
    min-width: 0;
}

.sp-top-news__secondary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.sp-top-news__trending {
    border-left: 1px solid var(--sp-line);
    padding-left: 16px;
}

.sp-mini-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sp-card {
    min-width: 0;
    border: 1px solid transparent;
    background: #ffffff;
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.sp-card:hover {
    border-color: var(--sp-soft-pink);
    box-shadow: 0 7px 18px rgba(215, 25, 63, .13);
    transform: translateY(-2px);
}

.sp-card__image {
    display: block;
    overflow: hidden;
    background: #eeeeee;
}

.sp-card__image img,
.sp-card__placeholder {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    object-position: center;
    background: #eeeeee;
}

.sp-card__body {
    padding-top: 7px;
}

.sp-card__title {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--sp-ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.sp-card__title a {
    text-decoration: none;
}

.sp-card__title a:hover {
    color: #273a64;
}

.sp-card__meta {
    margin-top: 6px;
    color: var(--sp-muted);
    font-family: Arial, sans-serif;
    font-size: 11px;
    line-height: 1.3;
}

.sp-card__excerpt {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    color: #243044;
    font-size: 15px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.sp-card--lead .sp-card__title {
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.05;
}

.sp-card--lead .sp-card__excerpt {
    font-size: 16px;
}

.sp-card--secondary {
    display: block;
}

.sp-card--secondary .sp-card__body {
    padding-top: 6px;
}

.sp-card--secondary .sp-card__title {
    font-size: 18px;
    line-height: 1.12;
}

.sp-card--secondary .sp-card__meta--before-title {
    margin: 0 0 4px;
}

/* Home Trending: thumbnail left, date and title only. */
.sp-card--mini {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
}

.sp-card--mini .sp-card__image {
    width: 110px;
    height: 68px;
}

.sp-card--mini .sp-card__image img,
.sp-card--mini .sp-card__placeholder {
    width: 110px;
    height: 68px;
}

.sp-card--mini .sp-card__body {
    padding-top: 0;
}

.sp-card--mini .sp-card__meta--before-title {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 4px;
    color: #888888;
    font-family: Arial, sans-serif;
    font-size: 11px;
    line-height: 1.25;
}

.sp-card--mini .sp-card__meta-icon {
    color: #999999;
    font-size: 15px;
    line-height: 1;
}

.sp-card--mini .sp-card__title {
    font-size: 17px;
    line-height: 1.12;
}

.sp-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 18px;
}

.sp-latest {
    margin-bottom: 38px;
}

.sp-category-section {
    margin-top: 38px;
}

.sp-category-section__title {
    margin: 0 0 14px;
    color: var(--sp-pink);
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Category archive: one full-width post per row, no pagination. */
.sp-category-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 32px;
    align-items: start;
}

.sp-category-layout--single {
    grid-template-columns: minmax(0, 1fr);
}

.sp-category-archive__header {
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--sp-line);
}

.sp-category-archive__title {
    margin: 0;
    color: var(--sp-pink);
    font-family: Arial, sans-serif;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    text-transform: uppercase;
}

.sp-category-archive__description {
    margin-top: 8px;
    color: var(--sp-muted);
    font-size: 15px;
    line-height: 1.5;
}

.sp-category-search {
    margin-top: 18px;
}

.sp-search-form {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.sp-search-form__field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.sp-search-form__input {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 10px 14px 10px 38px;
    border: 1px solid #c8d2e2;
    border-radius: 6px;
    background: #ffffff;
    color: var(--sp-ink);
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.sp-search-form__input:focus {
    border-color: var(--sp-pink);
    outline: 2px solid rgba(215, 25, 63, .16);
    outline-offset: 1px;
}

.sp-search-form__icon {
    position: absolute;
    top: 50%;
    left: 13px;
    color: #91a0b4;
    font-family: Arial, sans-serif;
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-52%);
}

.sp-search-form__button {
    min-width: 94px;
    border: 1px solid var(--sp-pink);
    border-radius: 4px;
    background: var(--sp-pink);
    color: #ffffff;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    transition: background-color .2s ease, color .2s ease;
}

.sp-search-form__button:hover,
.sp-search-form__button:focus-visible {
    background: #ffffff;
    color: var(--sp-pink);
}

.sp-search-page__header {
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--sp-line);
}

.sp-search-page__title {
    margin: 0 0 16px;
    color: var(--sp-pink);
    font-family: Arial, sans-serif;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.1;
}

.sp-search-page__title span {
    color: var(--sp-ink);
}

.sp-search-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.sp-search-empty {
    padding: 28px 22px;
    border: 1px solid var(--sp-line);
    background: #ffffff;
    color: var(--sp-muted);
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.sp-search-empty p {
    margin: 0;
}

.sp-search-empty__title {
    margin-bottom: 6px !important;
    color: var(--sp-ink);
    font-size: 18px;
    font-weight: 700;
}

.sp-category-archive__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.sp-category-archive__list .sp-card {
    padding-bottom: 4px;
}

.sp-category-archive__list .sp-card__title {
    font-size: clamp(23px, 2.2vw, 31px);
    line-height: 1.08;
}

.sp-category-archive__list .sp-card__excerpt {
    max-width: 920px;
    font-size: 16px;
}

.sp-load-more-wrap {
    display: flex;
    justify-content: center;
    margin: 32px 0 8px;
}

.sp-load-more {
    min-width: 130px;
    padding: 11px 24px;
    border: 1px solid #1877f2;
    border-radius: 2px;
    background: #1877f2;
    color: #ffffff;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    transition: background-color .2s ease, border-color .2s ease, opacity .2s ease;
}

.sp-load-more:hover,
.sp-load-more:focus-visible {
    border-color: #166fe5;
    background: #166fe5;
    color: #ffffff;
    outline: none;
}

.sp-load-more.is-loading,
.sp-load-more:disabled {
    cursor: wait;
    opacity: .65;
}

.sp-category-sidebar {
    position: static;
    top: auto;
}

.sp-category-sidebar__heading {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sp-line);
    font-size: 17px;
    font-weight: 400;
}

.sp-site-footer {
    border-top: 1px solid var(--sp-line);
    background: #f4f4f4;
}

.sp-site-footer__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-block: 24px 32px;
}

.sp-footer-column h2 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}

.sp-footer-nav li {
    margin: 6px 0;
}

.sp-footer-nav a {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    text-decoration: none;
}

/* Single article */
.sp-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}

.sp-site-main.sp-article-page {
    width: min(100% - 20px, 1320px);
    max-width: 1320px;
    background: #f3f3f3;
}

.single-post {
    background: #f3f3f3;
}

.sp-article__category {
    margin: 22px 0 8px;
    color: var(--sp-pink);
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.sp-article__title {
    max-width: 960px;
    margin: 0;
    color: #18294b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(40px, 4.2vw, 58px);
    line-height: 1.02;
    letter-spacing: -.015em;
}

.sp-article__meta {
    margin: 14px 0 24px;
    color: var(--sp-muted);
    font-family: Arial, sans-serif;
    font-size: 12px;
}

.sp-article__meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border: 1px solid var(--sp-pink);
    border-radius: 999px;
    color: var(--sp-pink);
    font-size: 11px;
}

.sp-article__meta-icon {
    font-size: 16px;
    line-height: 1;
}

.sp-article__featured {
    margin-bottom: 30px;
}

.sp-article__featured img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 620px;
    object-fit: contain;
    background: #eeeeee;
}

.sp-article__content {
    max-width: 900px;
    margin-inline: auto;
    color: #1b2c4e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.85;
}

.sp-article__content p {
    margin: 0 0 1.45em;
}

.sp-article__content h2,
.sp-article__content h3 {
    margin: 1.7em 0 .6em;
    color: #18294b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25em;
    line-height: 1.2;
}

.sp-article__content .wp-block-heading {
    scroll-margin-top: 24px;
}


.sp-recommended {
    position: static;
    top: auto;
    padding-top: 0;
}

.sp-recommended__heading {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sp-line);
    color: #18294b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    font-weight: 400;
}

.sp-recommended-list,
.sp-related-posts__list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sp-card--recommended {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
}

.sp-card--recommended .sp-card__image,
.sp-card--recommended .sp-card__image img,
.sp-card--recommended .sp-card__placeholder {
    width: 100px;
    height: 66px;
}

.sp-card--recommended .sp-card__body {
    padding-top: 0;
}

.sp-card--recommended .sp-card__title {
    color: #18294b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 23px;
    line-height: 1.08;
}

.sp-card--recommended .sp-card__meta {
    margin-top: 4px;
    font-size: 10px;
}

.sp-discussion {
    max-width: 900px;
    margin: 36px auto 0;
}

.sp-comments-area {
    padding: 18px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #ffffff;
    color: #18294b;
    font-family: Arial, sans-serif;
}

.sp-comments-title {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dfe4ea;
    color: #18294b;
    font-family: Arial, sans-serif;
    font-size: 17px;
    text-transform: uppercase;
}

.sp-comments-area .comment-list {
    margin: 0 0 15px;
    padding: 0;
}

.sp-comment-status {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dfe4ea;
    font-size: 13px;
}

.sp-comments-area .comment-list li {
    padding: 9px 0;
    border-bottom: 1px solid #e4e7eb;
}

.sp-comments-area .comment-form p {
    margin: 10px 0;
}

.sp-comments-area textarea,
.sp-comments-area input[type="text"],
.sp-comments-area input[type="email"],
.sp-comments-area input[type="url"] {
    width: 100%;
    border: 1px solid #cfd8e3;
    border-radius: 7px;
    padding: 10px 12px;
    color: #18294b;
    font: 14px/1.5 Arial, sans-serif;
}

.sp-comments-area textarea {
    min-height: 88px;
    resize: vertical;
}

.sp-comments-area .form-submit input[type="submit"] {
    padding: 10px 15px;
    border: 0;
    border-radius: 7px;
    background: #2457d6;
    color: #ffffff;
    cursor: pointer;
    font: 700 13px Arial, sans-serif;
}

.sp-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 900px;
    margin: 18px auto 0;
}

.sp-article-taxonomy__category,
.sp-article-taxonomy__tag {
    padding: 9px 14px;
    background: #e9ebee;
    color: #18294b;
    font: 700 12px/1.2 Arial, sans-serif;
    text-decoration: none;
    text-transform: uppercase;
}

.sp-article-taxonomy__tag {
    color: #22365b;
}

.sp-related-posts {
    margin-top: 42px;
}

.sp-related-posts__heading {
    margin: 0 0 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid #1b2d4f;
    color: #18294b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: 400;
}

.sp-related-posts__list {
    gap: 24px;
}

.sp-card--related {
    padding-bottom: 8px;
}

.sp-card--related .sp-card__title {
    color: #18294b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.08;
}

.sp-card--related .sp-card__excerpt {
    max-width: 1050px;
    font-size: 17px;
}

@media (max-width: 900px) {
    .sp-top-news {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    }

    .sp-top-news__trending {
        grid-column: 1 / -1;
        border-top: 1px solid var(--sp-line);
        border-left: 0;
        padding: 18px 0 0;
    }

    .sp-top-news__trending .sp-mini-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sp-article-layout {
        grid-template-columns: minmax(0, 1fr) 230px;
        gap: 22px;
    }

    .sp-category-layout {
        grid-template-columns: minmax(0, 1fr) 220px;
        gap: 22px;
    }
}

@media (max-width: 700px) {
    .sp-header-inner {
        min-height: 58px;
        align-items: center;
        flex-direction: row;
        padding-block: 10px;
    }

    .sp-primary-nav ul {
        gap: 12px;
    }

    .sp-primary-nav {
        display: none;
    }

    .sp-mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 40px;
        padding: 0;
        border: 1px solid var(--sp-line);
        border-radius: 4px;
        background: #ffffff;
        color: var(--sp-ink);
        cursor: pointer;
    }

    .sp-mobile-menu-toggle:hover,
    .sp-mobile-menu-toggle:focus-visible {
        border-color: var(--sp-pink);
        color: var(--sp-pink);
        outline: none;
    }

    .sp-mobile-menu-toggle__icon {
        display: inline-flex;
        flex-direction: column;
        gap: 4px;
        width: 20px;
    }

    .sp-mobile-menu-toggle__icon span {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
    }

    .sp-mobile-drawer {
        position: fixed;
        z-index: 1000;
        inset: 0;
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: visibility 0s linear .25s, opacity .25s ease;
    }

    .sp-mobile-drawer.is-open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition-delay: 0s;
    }

    .sp-mobile-drawer__backdrop {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        background: rgba(20, 33, 61, .42);
        cursor: pointer;
    }

    .sp-mobile-drawer__panel {
        position: relative;
        z-index: 1;
        width: min(82vw, 360px);
        height: 100%;
        overflow-y: auto;
        padding: 16px 24px 32px;
        background: #f5f5f5;
        box-shadow: 8px 0 24px rgba(20, 33, 61, .16);
        transform: translateX(-100%);
        transition: transform .28s ease;
    }

    .sp-mobile-drawer.is-open .sp-mobile-drawer__panel {
        transform: translateX(0);
    }

    .sp-mobile-drawer__topbar {
        display: flex;
        justify-content: flex-end;
        min-height: 48px;
    }

    .sp-mobile-drawer__close {
        width: 42px;
        height: 42px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--sp-pink);
        cursor: pointer;
        font-family: Arial, sans-serif;
        font-size: 42px;
        font-weight: 300;
        line-height: 1;
    }

    .sp-mobile-drawer__close:hover,
    .sp-mobile-drawer__close:focus-visible {
        color: #a81431;
        outline: none;
    }

    .sp-mobile-drawer__nav ul {
        list-style: none;
        margin: 24px 0 0;
        padding: 0;
    }

    .sp-mobile-drawer__nav li + li {
        margin-top: 14px;
    }

    .sp-mobile-drawer__nav a {
        display: block;
        color: #141c2d;
        font-family: Arial, sans-serif;
        font-size: clamp(24px, 7vw, 30px);
        font-weight: 700;
        line-height: 1.15;
        text-decoration: none;
        text-transform: uppercase;
    }

    .sp-mobile-drawer__nav a:hover,
    .sp-mobile-drawer__nav a:focus-visible,
    .sp-mobile-drawer__nav .current-menu-item > a {
        color: var(--sp-pink);
        outline: none;
    }

    body.sp-mobile-menu-open {
        overflow: hidden;
    }

    .sp-top-news,
    .sp-latest-grid,
    .sp-article-layout,
    .sp-category-layout {
        grid-template-columns: 1fr;
    }

    .sp-top-news__trending .sp-mini-list {
        grid-template-columns: 1fr;
    }

    .sp-search-form {
        flex-direction: column;
    }

    .sp-search-form__button {
        width: 100%;
        min-height: 42px;
    }

    .sp-card__title {
        font-size: 20px;
    }

    .sp-card--lead .sp-card__title {
        font-size: 31px;
    }

    .sp-card--mini {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .sp-card--mini .sp-card__image,
    .sp-card--mini .sp-card__image img,
    .sp-card--mini .sp-card__placeholder {
        width: 92px;
        height: 58px;
    }

    .sp-card--mini .sp-card__title {
        font-size: 16px;
    }

    .sp-site-main.sp-article-page {
        width: min(100% - 20px, 1320px);
    }

    .sp-article__category {
        margin-top: 8px;
    }

    .sp-article__title {
        font-size: 34px;
        line-height: 1.05;
    }

    .sp-article__meta-pill {
        flex-wrap: wrap;
        row-gap: 3px;
        font-size: 10px;
    }

    .sp-article__content {
        font-size: 18px;
        line-height: 1.75;
    }

    .sp-article__featured img {
        max-height: none;
    }

    .sp-card--recommended .sp-card__title {
        font-size: 18px;
    }

    .sp-category-sidebar {
        margin-top: 28px;
    }

    .sp-category-archive__list .sp-card__title {
        font-size: 22px;
    }

    .sp-site-footer__inner {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   HOMEPAGE REFERENCE LAYOUT
   ========================================================= */

body.home,
body.front-page {
    background: #f3f3f3;
}

.sp-site-main.sp-home {
    width: min(calc(100% - 48px), 1150px);
    max-width: 1150px;
    padding-top: 22px;
    background: transparent;
}

.sp-home .sp-section-heading {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom-color: #30405d;
    color: #2c3852;
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
}

.sp-home .sp-top-news {
    grid-template-columns: minmax(0, 1.48fr) minmax(0, .92fr) minmax(205px, .86fr);
    gap: 14px;
    margin-bottom: 34px;
}

.sp-home .sp-top-news__secondary {
    gap: 18px;
}

.sp-home .sp-top-news__trending {
    padding-left: 12px;
}

.sp-home .sp-top-news__lead .sp-card__image img,
.sp-home .sp-top-news__lead .sp-card__placeholder {
    aspect-ratio: 16 / 10;
}

.sp-home .sp-card--lead .sp-card__title {
    color: #303b56;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    line-height: 1.04;
}

.sp-home .sp-card--lead .sp-card__excerpt {
    color: #303b56;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    line-height: 1.45;
}

.sp-home .sp-card--secondary .sp-card__title {
    color: #303b56;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.1;
}

.sp-home .sp-card--secondary .sp-card__excerpt {
    color: #303b56;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.42;
    -webkit-line-clamp: 2;
}

.sp-home .sp-card__meta:not(.sp-card__meta--before-title)::before,
.sp-home .sp-card--secondary .sp-card__meta--before-title::before {
    content: "◷";
    display: inline-block;
    margin-right: 4px;
    color: #9a9fa8;
    font-size: 15px;
}

.sp-home .sp-card--mini .sp-card__title {
    color: #303b56;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.08;
}

.sp-home .sp-card--mini .sp-card__meta--before-title {
    font-size: 10px;
}

.sp-home .sp-latest {
    margin-top: 20px;
}

.sp-home .sp-latest .sp-section-heading {
    font-size: 14px;
    font-weight: 400;
}

.sp-home .sp-latest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px 16px;
}

.sp-home .sp-latest-grid .sp-card__title {
    color: #303b56;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    line-height: 1.06;
}

.sp-home .sp-latest-grid .sp-card__meta {
    font-size: 13px;
}

.sp-home .sp-latest-grid .sp-card__excerpt {
    color: #303b56;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.42;
}

.sp-home-categories .sp-category-section {
    min-width: 0;
    margin-top: 0;
}

.sp-home-categories .sp-category-section__title {
    margin: 0 0 14px;
    color: var(--sp-pink);
    font-family: Arial, sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.sp-category-column-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sp-home-categories .sp-card--category .sp-card__image img,
.sp-home-categories .sp-card--category .sp-card__placeholder {
    aspect-ratio: 3 / 2;
}

.sp-home-categories .sp-card--category .sp-card__title {
    color: #303b56;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    line-height: 1.08;
}

.sp-home-categories .sp-card--category .sp-card__meta {
    font-size: 12px;
}

.sp-home-categories .sp-card--category .sp-card__excerpt {
    color: #303b56;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.42;
}

@media (max-width: 900px) {
    .sp-site-main.sp-home {
        width: min(calc(100% - 32px), 760px);
    }

    .sp-home .sp-top-news {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .sp-site-main.sp-home {
        width: calc(100% - 24px);
    }

    .sp-home .sp-top-news,
    .sp-home .sp-latest-grid {
        grid-template-columns: 1fr;
    }

    .sp-home .sp-card--lead .sp-card__title {
        font-size: 30px;
    }

    .sp-home .sp-latest-grid .sp-card__title {
        font-size: 22px;
    }

    .sp-home-categories .sp-category-section__title {
        font-size: 30px;
    }
}

/* =========================================================
   HOMEPAGE FINAL CATEGORY ROWS + TRENDING LIST
   ========================================================= */

.sp-home .sp-top-news__trending {
    padding-top: 0;
}

.sp-home .sp-top-news__trending .sp-mini-list {
    gap: 14px;
}

.sp-home .sp-top-news__trending .sp-card--mini {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 8px;
}

.sp-home .sp-top-news__trending .sp-card--mini .sp-card__image,
.sp-home .sp-top-news__trending .sp-card--mini .sp-card__image img,
.sp-home .sp-top-news__trending .sp-card--mini .sp-card__placeholder {
    width: 100px;
    height: 63px;
}

.sp-home .sp-top-news__trending .sp-card--mini .sp-card__title {
    font-size: 16px;
    line-height: 1.08;
}

.sp-home-categories {
    display: flex;
    flex-direction: column;
    gap: 42px;
    margin-top: 42px;
}

.sp-home-category-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.sp-home-category-row .sp-category-section {
    min-width: 0;
    margin-top: 0;
}

@media (max-width: 900px) {
    .sp-home-category-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .sp-home-category-row {
        grid-template-columns: 1fr;
    }

    .sp-home .sp-top-news__trending .sp-card--mini {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .sp-home .sp-top-news__trending .sp-card--mini .sp-card__image,
    .sp-home .sp-top-news__trending .sp-card--mini .sp-card__image img,
    .sp-home .sp-top-news__trending .sp-card--mini .sp-card__placeholder {
        width: 92px;
        height: 58px;
    }
}

/* Recommended Posts are used on category and single-post sidebars only. */
.sp-category-sidebar .sp-card--recommended .sp-card__title,
.sp-recommended .sp-card--recommended .sp-card__title {
    color: #303b56;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.06;
}

.sp-category-sidebar .sp-card--recommended .sp-card__excerpt,
.sp-recommended .sp-card--recommended .sp-card__excerpt {
    color: #303b56;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.28;
    -webkit-line-clamp: 2;
}

.sp-category-sidebar .sp-card--recommended .sp-card__meta,
.sp-recommended .sp-card--recommended .sp-card__meta {
    font-size: 10px;
}

/* Floating story index on single-post pages. */
.sp-story-index {
    position: fixed;
    z-index: 1200;
    top: 108px;
    right: max(24px, calc((100vw - 1320px) / 2 - 220px));
    width: 190px;
    color: #1d2b47;
    font-family: Arial, sans-serif;
}

.sp-story-index.is-open {
    width: min(360px, calc(100vw - 32px));
}

.sp-story-index__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    gap: 10px;
    padding: 9px 10px 9px 18px;
    border: 1px solid #dce3ec;
    border-radius: 29px;
    background: #ffffff;
    box-shadow: 0 11px 24px rgba(31, 46, 75, .18);
}

.sp-story-index.is-open .sp-story-index__header {
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 3px 14px rgba(31, 46, 75, .08);
}

.sp-story-index__label {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    color: #1c2a45;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.sp-story-index__post-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-story-index__book {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 16px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-radius: 1px;
}

.sp-story-index__book::after {
    position: absolute;
    top: -1.5px;
    bottom: -1.5px;
    left: 50%;
    width: 1px;
    background: currentColor;
    content: "";
    transform: translateX(-50%);
}

.sp-story-index__toggle {
    display: grid;
    flex: 0 0 38px;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #2873f5;
    color: #ffffff;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    transition: background-color .2s ease, transform .2s ease;
}

.sp-story-index__toggle:hover,
.sp-story-index__toggle:focus-visible {
    background: #155fdf;
    outline: 3px solid rgba(40, 115, 245, .2);
    outline-offset: 2px;
}

.sp-story-index__icon--close {
    display: none;
    font-size: 27px;
}

.sp-story-index.is-open .sp-story-index__icon--open {
    display: none;
}

.sp-story-index.is-open .sp-story-index__icon--close {
    display: block;
}

.sp-story-index__body {
    max-height: 0;
    overflow: hidden;
    border: 1px solid #dce3ec;
    border-top: 0;
    border-radius: 0 0 18px 18px;
    background: #ffffff;
    box-shadow: 0 11px 24px rgba(31, 46, 75, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: max-height .38s ease, opacity .24s ease, transform .38s ease;
}

.sp-story-index.is-open .sp-story-index__body {
    max-height: min(70vh, 430px);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.sp-story-index__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid #e4e9f0;
    color: #8290a5;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

.sp-story-index__list {
    max-height: min(70vh, 360px);
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sp-story-index__list li {
    margin: 0;
    border-bottom: 1px solid #e4e9f0;
}

.sp-story-index__list li:last-child {
    border-bottom: 0;
}

.sp-story-index__list a {
    display: flex;
    align-items: center;
    min-height: 54px;
    gap: 13px;
    padding: 8px 16px;
    color: #1e2c48;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.18;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
}

.sp-story-index__list a:hover,
.sp-story-index__list a:focus-visible,
.sp-story-index__list li.is-current > a {
    background: #eaf2ff;
    color: #0f5fe6;
    outline: none;
}

.sp-story-index__number {
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #edf3ff;
    color: #0f5fe6;
    font-size: 13px;
    line-height: 1;
}

.sp-story-index__title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .sp-mobile-drawer {
        z-index: 1300;
    }

    .sp-story-index {
        top: auto;
        right: 12px;
        bottom: max(16px, env(safe-area-inset-bottom));
        width: 164px;
    }

    .sp-story-index.is-open {
        right: 12px;
        width: min(360px, calc(100vw - 24px));
    }

    .sp-story-index__header {
        min-height: 58px;
        padding-left: 16px;
    }

    .sp-story-index__list a {
        min-height: 52px;
        padding-inline: 14px;
    }
}

/* Informational and legal pages. */
.sp-page__article {
    max-width: 900px;
    margin-inline: auto;
}

.sp-page__header {
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--sp-line);
}

.sp-page__title {
    margin: 0;
    color: var(--sp-pink);
    font-family: Arial, sans-serif;
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 700;
    line-height: 1.08;
    text-transform: uppercase;
}

.sp-page__content {
    color: #1b2c4e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.7;
}

.sp-page__content h2,
.sp-page__content h3 {
    margin: 1.5em 0 .5em;
    color: #18294b;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.2;
}

.sp-page__content a {
    color: #0f5fe6;
}

.sp-page__content ul {
    margin: 0 0 1.3em 1.25em;
}

.sp-contact-info {
    margin-top: 28px;
    padding: 20px 22px;
    border: 1px solid var(--sp-line);
    border-left: 4px solid var(--sp-pink);
    border-radius: 6px;
    background: #f8f9fb;
}

.sp-contact-info__title {
    margin: 0 0 10px;
    color: #18294b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.sp-contact-info__email {
    margin: 0;
    color: #33415f;
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

.sp-contact-info__email strong {
    color: #18294b;
}

.sp-contact-info__email a {
    color: #0f5fe6;
    font-weight: 700;
    text-decoration: none;
}

.sp-contact-info__email a:hover,
.sp-contact-info__email a:focus-visible {
    text-decoration: underline;
}

.sp-contact-form {
    margin-top: 28px;
    padding: 22px;
    border: 1px solid var(--sp-line);
    border-radius: 8px;
    background: #ffffff;
    font-family: Arial, sans-serif;
}

.sp-contact-form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.sp-contact-form p {
    margin: 0 0 16px;
}

.sp-contact-form label {
    display: block;
    margin-bottom: 6px;
    color: #18294b;
    font-size: 14px;
    font-weight: 700;
}

.sp-contact-form input,
.sp-contact-form textarea {
    display: block;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #c8d2e2;
    border-radius: 4px;
    color: #18294b;
    background: #ffffff;
    font: inherit;
}

.sp-contact-form input:focus,
.sp-contact-form textarea:focus {
    border-color: #0f5fe6;
    outline: 2px solid rgba(15, 95, 230, .18);
    outline-offset: 1px;
}

.sp-contact-form button {
    padding: 10px 18px;
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    background: var(--sp-pink);
    font: 700 14px/1.2 Arial, sans-serif;
    cursor: pointer;
}

.sp-contact-form button:hover,
.sp-contact-form button:focus-visible {
    background: #b91537;
}

.sp-contact-form__trap {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.sp-contact-notice {
    margin: 20px 0 0;
    padding: 12px 14px;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.sp-contact-notice--success {
    color: #186a36;
    background: #e8f7ed;
}

.sp-contact-notice--error {
    color: #a5142e;
    background: #fff0f0;
}

@media (max-width: 700px) {
    .sp-page__content {
        font-size: 17px;
        line-height: 1.65;
    }

    .sp-contact-form {
        padding: 16px;
    }

    .sp-contact-form__row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* =========================================================
   404 PAGE
   ========================================================= */

.sp-404-page {
    padding-block: 46px 64px;
}

.sp-404-hero {
    overflow: hidden;
    border: 1px solid var(--sp-line);
    border-top: 4px solid var(--sp-pink);
    background: #f7f7f6;
}

.sp-404-hero__inner {
    display: grid;
    grid-template-columns: minmax(190px, .7fr) minmax(0, 1.3fr);
    gap: clamp(36px, 6vw, 82px);
    align-items: center;
    padding: clamp(38px, 6vw, 72px);
}

.sp-404-code {
    color: var(--sp-pink);
    font-family: Arial, sans-serif;
    font-size: clamp(104px, 13vw, 176px);
    font-weight: 800;
    letter-spacing: -.075em;
    line-height: .8;
    white-space: nowrap;
    user-select: none;
}

.sp-404-hero__content {
    max-width: 720px;
}

.sp-404-eyebrow {
    margin: 0 0 12px;
    color: var(--sp-pink);
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sp-404-title {
    margin: 0;
    color: var(--sp-ink);
    font-size: clamp(38px, 5vw, 62px);
    font-weight: 700;
    line-height: 1;
}

.sp-404-description {
    max-width: 650px;
    margin: 20px 0 0;
    color: #4e596d;
    font-size: 17px;
    line-height: 1.65;
}

.sp-404-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.sp-404-button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid #b8c0cc;
    border-radius: 3px;
    background: #ffffff;
    color: var(--sp-ink);
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.sp-404-button:hover,
.sp-404-button:focus-visible {
    border-color: var(--sp-pink);
    color: var(--sp-pink);
}

.sp-404-button--primary {
    border-color: var(--sp-pink);
    background: var(--sp-pink);
    color: #ffffff;
}

.sp-404-button--primary:hover,
.sp-404-button--primary:focus-visible {
    background: #ffffff;
    color: var(--sp-pink);
}

.sp-404-search {
    max-width: 620px;
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid var(--sp-line);
}

.sp-404-search__label {
    margin: 0 0 10px;
    color: #4e596d;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.sp-404-latest {
    margin-top: 48px;
}

.sp-404-latest__header {
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--sp-line);
}

.sp-404-latest__title {
    margin: 0;
    color: var(--sp-ink);
    font-size: 22px;
    font-weight: 400;
}

.sp-404-latest__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 20px;
}

.sp-404-latest__grid .sp-card__title {
    font-size: 21px;
}

@media (max-width: 900px) {
    .sp-404-hero__inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .sp-404-code {
        font-size: clamp(88px, 22vw, 132px);
    }
}

@media (max-width: 700px) {
    .sp-404-page {
        padding-block: 24px 42px;
    }

    .sp-404-hero__inner {
        padding: 28px 22px 32px;
    }

    .sp-404-title {
        font-size: clamp(34px, 11vw, 46px);
    }

    .sp-404-description {
        font-size: 16px;
    }

    .sp-404-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .sp-404-button {
        width: 100%;
    }

    .sp-404-latest {
        margin-top: 36px;
    }

    .sp-404-latest__grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   HOMEPAGE TOP NEWS - balanced three-column layout
   ========================================================= */
@media (min-width: 901px) {
    .sp-home .sp-top-news {
        grid-template-columns: minmax(0, 1.64fr) minmax(0, .98fr) minmax(250px, .92fr);
        gap: 16px;
        align-items: stretch;
    }

    .sp-home .sp-top-news__lead,
    .sp-home .sp-top-news__secondary,
    .sp-home .sp-top-news__trending {
        height: 100%;
    }

    .sp-home .sp-top-news__lead {
        display: flex;
    }

    .sp-home .sp-top-news__lead > .sp-card {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        width: 100%;
        height: 100%;
    }

    .sp-home .sp-top-news__secondary {
        display: grid;
        grid-template-rows: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .sp-home .sp-top-news__secondary > .sp-card {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .sp-home .sp-top-news__secondary .sp-card__image img,
    .sp-home .sp-top-news__secondary .sp-card__placeholder {
        aspect-ratio: 5 / 2;
        object-fit: cover;
    }

    .sp-home .sp-top-news__secondary .sp-card__body {
        flex: 1 1 auto;
    }

    .sp-home .sp-top-news__trending {
        display: flex;
        padding-left: 14px;
    }

    .sp-home .sp-top-news__trending .sp-mini-list {
        width: 100%;
        height: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .sp-home .sp-top-news__trending .sp-card--mini {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 9px;
    }

    .sp-home .sp-top-news__trending .sp-card--mini .sp-card__image,
    .sp-home .sp-top-news__trending .sp-card--mini .sp-card__image img,
    .sp-home .sp-top-news__trending .sp-card--mini .sp-card__placeholder {
        width: 104px;
        height: 66px;
        object-fit: cover;
    }

    .sp-home .sp-top-news__trending .sp-card--mini .sp-card__meta--before-title {
        margin-bottom: 3px;
    }

    .sp-home .sp-top-news__trending .sp-card--mini .sp-card__title {
        font-size: 14px;
        line-height: 1.08;
        -webkit-line-clamp: 3;
    }
}

