/* Case editorial direction — evidence, metadata, challenge and solution rows. */
.case-editorial {
    width: 100%;
    max-width: none;
    margin: 0;
    background: var(--bh-paper);
    color: var(--bh-ink);
}

.case-editorial .case-section,
.case-editorial .case-dark-section,
.case-editorial .case-visit-section {
    padding-right: clamp(1.25rem, 5vw, 6rem);
    padding-left: clamp(1.25rem, 5vw, 6rem);
}

.case-editorial .case-intro-section,
.case-editorial .case-rwd-section,
.case-editorial .case-solution-section {
    border-color: var(--bh-surface-line);
}

.case-editorial .case-rwd-section {
    background: var(--bh-surface-paper);
}

.case-editorial .case-fact-grid {
    margin-top: var(--bh-rhythm-standard);
    border-color: var(--bh-surface-line);
}

.case-editorial .case-fact-grid article {
    min-height: 0;
    padding: 1.25rem clamp(0.75rem, 1.5vw, 1.5rem) 1.35rem 0;
    background: transparent;
}

.case-editorial .case-fact-grid article + article {
    padding-left: clamp(0.75rem, 1.5vw, 1.5rem);
    border-color: var(--bh-surface-line);
}

.case-editorial .case-fact-grid strong {
    margin-top: 0.8rem;
    font-family: var(--bh-serif);
    font-size: clamp(1rem, 1.35vw, 1.2rem);
    font-weight: 400;
}

.case-editorial .case-section-heading {
    margin-bottom: var(--bh-rhythm-standard);
}

.case-editorial .case-device-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(8rem, 0.28fr);
    align-items: start;
    gap: clamp(1.25rem, 3vw, 3rem);
    width: min(100%, 76rem);
    margin-inline: auto;
    padding: 0;
}

.case-editorial .case-desktop-frame,
.case-editorial .case-mobile-frame,
.case-editorial .case-screen-gallery figure {
    border: 0;
    background: transparent;
}

.case-editorial .case-desktop-frame {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    margin: 0;
}

.case-editorial .case-mobile-frame {
    position: relative;
    right: auto;
    bottom: auto;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: center;
    width: 100%;
    max-width: 15rem;
    margin: 0 auto;
    transform: none;
    z-index: 1;
}

.case-editorial .case-desktop-frame img,
.case-editorial .case-mobile-frame img,
.case-editorial .case-screen-gallery img {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.case-editorial .case-desktop-frame figcaption,
.case-editorial .case-mobile-frame figcaption,
.case-editorial .case-screen-gallery figcaption {
    margin-bottom: 0.7rem;
    color: var(--bh-accent-ink);
    font-size: var(--bh-type-meta);
    letter-spacing: 0.14em;
}

.case-editorial .case-mobile-frame figcaption {
    text-align: center;
}

.case-editorial .case-screen-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(1.5rem, 4vw, 4rem);
    width: min(100%, 76rem);
    margin-right: auto;
    margin-left: auto;
    margin-top: clamp(1.5rem, 3vw, 3rem);
}

.case-editorial .case-screen-gallery figure:nth-child(even) {
    margin-top: 0;
}

.case-editorial .case-screen-gallery.single {
    grid-template-columns: minmax(0, 1fr);
}

.case-editorial .case-screen-gallery.single figure {
    width: 100%;
    margin-top: 0;
    margin-left: 0;
}

.case-editorial .case-dark-section {
    background: var(--bh-surface-ink);
}

.case-editorial .case-solution-table {
    display: block;
    border-color: var(--bh-surface-line);
}

.case-editorial .case-solution-table article,
.case-editorial .case-solution-table article:nth-child(even) {
    display: grid;
    grid-template-columns: 4rem minmax(12rem, 0.75fr) minmax(0, 1.25fr);
    align-items: start;
    gap: clamp(1.25rem, 3vw, 4rem);
    min-height: 0;
    padding: var(--bh-rhythm-compact) 0;
    border: 0;
    border-top: 1px solid var(--bh-surface-line);
    background: transparent;
}

.case-editorial .case-solution-table article:first-child {
    border-top: 0;
}

.case-editorial .case-solution-table h3 {
    margin: 0;
    font-family: var(--bh-serif);
    font-size: var(--bh-type-subsection);
    font-weight: 400;
    line-height: 1.1;
}

.case-editorial .case-solution-table p {
    margin: 0;
    color: var(--bh-copy);
    font-family: var(--bh-serif);
    font-size: var(--bh-type-body);
    line-height: 1.85;
}

.case-editorial .case-visit-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: clamp(2rem, 6vw, 7rem);
    border-top: 1px solid var(--bh-surface-line);
    background: var(--bh-surface-soft);
    text-align: start;
}

.case-editorial .case-visit-section h2 {
    margin: 1rem 0 0;
    font-family: var(--bh-serif);
    font-size: var(--bh-type-section);
    font-weight: 400;
    line-height: 1;
}

.case-editorial__actions {
    display: grid;
    justify-items: start;
    gap: 1.25rem;
}

.case-editorial__related {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.2rem;
}

.case-editorial__actions > .bh-cta--primary {
    min-width: 11rem;
}

@media (max-width: 720px) {
    .case-editorial .case-section,
    .case-editorial .case-dark-section,
    .case-editorial .case-visit-section {
        padding-right: 1.25rem;
        padding-left: 1.25rem;
    }

    .case-editorial .case-fact-grid article,
    .case-editorial .case-fact-grid article + article {
        padding: 1rem 0;
        border-left: 0;
    }

    .case-editorial .case-solution-table article,
    .case-editorial .case-solution-table article:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        padding-block: var(--bh-rhythm-compact-mobile);
    }

    .case-editorial .case-solution-table h3 {
        font-size: var(--bh-type-subsection-mobile);
    }

    .case-editorial .case-solution-table p {
        font-size: var(--bh-type-body-mobile);
    }

    .case-editorial .case-visit-section {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .case-editorial__actions,
    .case-editorial__related {
        width: 100%;
    }

    .case-editorial__actions > .bh-cta--primary {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .case-editorial .case-device-stage,
    .case-editorial .case-screen-gallery,
    .case-editorial .case-screen-gallery.single {
        grid-template-columns: 1fr;
        gap: var(--bh-rhythm-compact-mobile);
        width: 100%;
    }

    .case-editorial .case-desktop-frame,
    .case-editorial .case-mobile-frame {
        grid-column: 1;
        grid-row: auto;
    }

    .case-editorial .case-mobile-frame {
        width: min(68%, 14rem);
        max-width: none;
        margin-inline: auto;
    }

    .case-editorial .case-mobile-frame figcaption {
        margin: 0 0 0.7rem;
        text-align: center;
    }

    .case-editorial .case-screen-gallery,
    .case-editorial .case-screen-gallery.single {
        margin-top: var(--bh-rhythm-compact-mobile);
    }

    .case-editorial .case-screen-gallery figure,
    .case-editorial .case-screen-gallery figure:nth-child(even),
    .case-editorial .case-screen-gallery.single figure {
        width: 100%;
        margin: 0;
    }
}
