:root {
    --somch-dh-ink: #10151c;
    --somch-dh-muted: #626c79;
    --somch-dh-line: #dce1e7;
    --somch-dh-paper: #ffffff;
    --somch-dh-red: #d7192d;
    --somch-dh-green: #11833b;
    --somch-dh-gold: #c9a653;
}

.somch-dynamic-home {
    width: 100%;
    margin-top: 24px;
    color: var(--somch-dh-ink);
}

.somch-dynamic-home *,
.somch-dynamic-home *::before,
.somch-dynamic-home *::after {
    box-sizing: border-box;
}

.somch-dynamic-home a {
    text-decoration: none;
}

.home.somch-dynamic-home-active .somch-section--dynamic-home > .somch-section__bar,
.home.somch-dynamic-home-active .somch-section--dynamic-home > .somch-section__intro {
    display: none !important;
}

/* Optional compact version of the existing editorial introduction. */
.home.somch-dh-compact-intro .somch-hero {
    padding: 38px 44px !important;
}

.home.somch-dh-compact-intro .somch-hero h1 {
    margin-bottom: 16px !important;
    font-size: clamp(38px, 4vw, 48px) !important;
    line-height: 1.06 !important;
}

.home.somch-dh-compact-intro .somch-hero__main > p:not(:first-child) {
    font-size: 17px !important;
    line-height: 1.55 !important;
}

.home.somch-dh-compact-intro .somch-hero__brief {
    padding: 24px !important;
}

.somch-dynamic-home__lead-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(330px, .75fr);
    gap: 18px;
}

.somch-dynamic-home__featured,
.somch-dynamic-home__latest,
.somch-dynamic-home__story {
    overflow: hidden;
    border: 1px solid var(--somch-dh-line);
    border-radius: 7px;
    background: var(--somch-dh-paper);
    box-shadow: 0 10px 30px rgba(16, 21, 28, .07);
}

.somch-dynamic-home__featured > a {
    display: grid;
    min-height: 560px;
    color: #fff;
    grid-template-rows: minmax(250px, 1fr) auto;
}

.somch-dynamic-home__featured-media {
    position: relative;
    min-height: 290px;
    overflow: hidden;
    background: linear-gradient(135deg, #10151c, #762329 64%, #11833b);
}

.somch-dynamic-home__featured-media::after {
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(180deg, transparent, rgba(16, 21, 28, .48));
    content: "";
}

.somch-dynamic-home__featured-media img {
    width: 100%;
    height: 100%;
    min-height: 290px;
    object-fit: cover;
    transition: transform .35s ease;
}

.somch-dynamic-home__featured:hover img {
    transform: scale(1.025);
}

.somch-dynamic-home__featured-media > span {
    position: absolute;
    right: 34px;
    bottom: 28px;
    color: rgba(255, 255, 255, .18);
    font-size: clamp(26px, 4vw, 58px);
    font-weight: 900;
    letter-spacing: .03em;
}

.somch-dynamic-home__featured-body {
    padding: 34px 38px 36px;
    background: var(--somch-dh-ink);
}

.somch-dynamic-home__eyebrow {
    display: block;
    color: var(--somch-dh-red);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .07em;
    line-height: 1.3;
    text-transform: uppercase;
}

.somch-dynamic-home__featured .somch-dynamic-home__eyebrow {
    color: #ff9ba4;
}

body.home.somch-media-design-v3 .somch-dynamic-home__featured h2,
.somch-dynamic-home__featured h2 {
    max-width: 760px;
    margin: 13px 0 15px;
    color: #fff;
    font-size: clamp(31px, 3.3vw, 48px);
    line-height: 1.06;
    letter-spacing: 0;
}

.somch-dynamic-home__featured p {
    max-width: 720px;
    margin: 0;
    color: #cdd3db;
    font-size: 16px;
    line-height: 1.62;
}

.somch-dynamic-home__featured-body > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.somch-dynamic-home__featured time,
.somch-dynamic-home__featured strong {
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.somch-dynamic-home__latest {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 27px 28px;
}

.somch-dynamic-home__latest header {
    margin-bottom: 7px;
}

body.home.somch-media-design-v3 .somch-dynamic-home__latest h2,
.somch-dynamic-home__latest h2 {
    margin: 7px 0 0;
    font-size: 25px;
    line-height: 1.15;
}

.somch-dynamic-home__compact {
    border-bottom: 1px solid var(--somch-dh-line);
}

.somch-dynamic-home__compact > a {
    display: block;
    padding: 17px 0;
    color: var(--somch-dh-ink);
}

.somch-dynamic-home__compact span {
    color: var(--somch-dh-red);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.somch-dynamic-home__compact h3 {
    margin: 5px 0 7px;
    color: var(--somch-dh-ink);
    font-size: 18px;
    line-height: 1.2;
    transition: color .18s ease;
}

.somch-dynamic-home__compact a:hover h3 {
    color: var(--somch-dh-red);
}

.somch-dynamic-home__compact time,
.somch-dynamic-home__story time {
    color: var(--somch-dh-muted);
    font-size: 11px;
    font-weight: 700;
}

.somch-dynamic-home__all {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 20px;
    color: var(--somch-dh-red);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.somch-dynamic-home__topic {
    margin-top: 46px;
    padding-top: 32px;
    border-top: 1px solid var(--somch-dh-line);
}

.somch-dynamic-home__topic > header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 22px;
}

body.home.somch-media-design-v3 .somch-dynamic-home__topic > header h2,
.somch-dynamic-home__topic > header h2 {
    margin: 7px 0 0;
    font-size: clamp(28px, 3vw, 39px);
    line-height: 1.08;
}

.somch-dynamic-home__topic > header > a {
    flex: 0 0 auto;
    color: var(--somch-dh-red);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.somch-dynamic-home__topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.somch-dynamic-home__story {
    position: relative;
    min-width: 0;
    background-color: var(--somch-dh-paper) !important;
    background-image: none !important;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.somch-dynamic-home__story:hover {
    transform: translateY(-3px);
    border-color: rgba(215, 25, 45, .38);
    box-shadow: 0 18px 42px rgba(16, 21, 28, .12);
}

.somch-dynamic-home__story > a {
    display: grid;
    height: 100%;
    color: var(--somch-dh-ink);
    background-color: var(--somch-dh-paper) !important;
    background-image: none !important;
    grid-template-rows: 190px 1fr;
}

.somch-dynamic-home__story-media {
    position: relative;
    display: flex;
    align-items: end;
    min-height: 190px;
    overflow: hidden;
    padding: 20px;
    background: linear-gradient(135deg, #161c24, #762329 64%, #11833b);
}

.somch-dynamic-home__story-media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform .3s ease;
}

.somch-dynamic-home__story:hover .somch-dynamic-home__story-media img {
    transform: scale(1.03);
}

.somch-dynamic-home__story-media > span {
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

.somch-dynamic-home__story-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 23px 24px 25px;
    color: var(--somch-dh-ink) !important;
    background-color: var(--somch-dh-paper) !important;
    background-image: none !important;
}

/*
 * Some legacy visual modules inject an inline background on generic article
 * cards. Keep the editorial copy in its own opaque panel even when those
 * modules are still active.
 */
body.home .somch-dynamic-home .somch-dynamic-home__story,
body.home .somch-dynamic-home .somch-dynamic-home__story > a,
body.home .somch-dynamic-home .somch-dynamic-home__story-body {
    background-image: none !important;
    background-position: initial !important;
    background-repeat: no-repeat !important;
    background-size: auto !important;
}

.somch-dynamic-home__story-body > span {
    color: var(--somch-dh-red);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

body.home.somch-media-design-v3 .somch-dynamic-home__story h3,
.somch-dynamic-home__story h3 {
    margin: 8px 0 11px;
    color: var(--somch-dh-ink);
    font-size: 22px;
    line-height: 1.16;
}

.somch-dynamic-home__story p {
    margin: 0 0 19px;
    color: var(--somch-dh-muted);
    font-size: 14.5px;
    line-height: 1.55;
}

.somch-dynamic-home__story time {
    margin-top: auto;
}

.somch-dynamic-home__topic--editorial {
    padding: 32px;
    border: 0;
    border-radius: 8px;
    background: #10151c;
}

.somch-dynamic-home__topic--editorial h2,
.somch-dynamic-home__topic--editorial > header > a {
    color: #fff;
}

.somch-dynamic-home__topic--editorial .somch-dynamic-home__eyebrow {
    color: #ff9ba4;
}

@media (max-width: 980px) {
    .somch-dynamic-home__lead-grid {
        grid-template-columns: 1fr;
    }

    .somch-dynamic-home__featured > a {
        min-height: 0;
    }

    .somch-dynamic-home__latest {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 24px;
    }

    .somch-dynamic-home__latest header,
    .somch-dynamic-home__all {
        grid-column: 1 / -1;
    }

    .somch-dynamic-home__topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .somch-dynamic-home__story:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .home.somch-dh-compact-intro .somch-hero {
        padding: 26px 20px !important;
    }

    .home.somch-dh-compact-intro .somch-hero h1 {
        font-size: 36px !important;
    }

    .somch-dynamic-home {
        margin-top: 18px;
    }

    .somch-dynamic-home__featured > a {
        grid-template-rows: 220px auto;
    }

    .somch-dynamic-home__featured-media,
    .somch-dynamic-home__featured-media img {
        min-height: 220px;
    }

    .somch-dynamic-home__featured-body {
        padding: 25px 23px 27px;
    }

    .somch-dynamic-home__featured h2 {
        font-size: 31px;
    }

    .somch-dynamic-home__featured p {
        font-size: 15px;
    }

    .somch-dynamic-home__latest {
        display: block;
        padding: 24px 22px;
    }

    .somch-dynamic-home__topic {
        margin-top: 38px;
        padding-top: 28px;
    }

    .somch-dynamic-home__topic > header {
        display: block;
    }

    .somch-dynamic-home__topic > header > a {
        display: inline-block;
        margin-top: 14px;
    }

    .somch-dynamic-home__topic-grid {
        grid-template-columns: 1fr;
    }

    .somch-dynamic-home__story:last-child {
        grid-column: auto;
    }

    .somch-dynamic-home__story > a {
        grid-template-rows: 180px 1fr;
    }

    .somch-dynamic-home__topic--editorial {
        padding: 26px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .somch-dynamic-home *,
    .somch-dynamic-home *::before,
    .somch-dynamic-home *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
