/* Inherit the theme's viewport-based rem and its 4:5 portrait breakpoint.
   Widths, type and spacing scale together, including on large screens. */
.ofl-work {
    max-width: 75.75rem;
    margin: 0 auto;
    padding: 12.75rem 0 6.3rem;
}
.ofl-work__heading {
    max-width: 65.65rem;
    margin: 0 auto 3.5rem;
}
.ofl-work__title {
    color: #111;
    font-size: 4.2rem;
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.045em;
    text-wrap: balance;
    margin: 0;
}
.ofl-work__cover {
    margin: 0 0 4.5rem;
}
.ofl-work__cover img {
    display: block;
    width: 100%;
    height: auto;
}
.ofl-work__cover figcaption {
    max-width: 48rem;
    margin: 0.75rem auto 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #5b5b5b;
}
.ofl-work__content {
    max-width: 48rem;
    margin: 0 auto;
}
.ofl-work__content > :first-child { margin-top: 0; }
.ofl-work__content > :last-child { margin-bottom: 0; }
.ofl-work__content > .wp-block-gallery {
    width: min(75.75rem, 94vw);
    max-width: none;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}
.ofl-work__content .wp-block-gallery.has-nested-images figure.wp-block-image {
    width: 100% !important;
    flex-grow: 0;
    align-self: start;
    margin: 0;
    display: block;
}
.ofl-work__content .wp-block-gallery.has-nested-images figure.wp-block-image img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}
.ofl-work__content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
    position: static;
    background: none;
    color: #5b5b5b;
    padding: 0;
    max-height: none;
    overflow: visible;
    font-size: 0.9rem;
}
.ofl-work__content .wp-block-gallery.has-nested-images figure.wp-block-image:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}
.ofl-work__content > .wp-block-gallery.columns-1 { grid-template-columns: 1fr; }
.ofl-work__content > .wp-block-gallery.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ofl-work__content > .wp-block-gallery.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ofl-work__content .wp-block-gallery:is(.columns-1, .columns-3, .columns-4) figure.wp-block-image:last-child {
    grid-column: auto;
}
.ofl-work__content .wp-block-image img { width: 100%; }
@media (max-aspect-ratio: 800/1000) {
    .ofl-work-article main { padding-inline: 1.7rem; }
    .ofl-work { padding-top: 11.5rem; padding-bottom: 5.5rem; }
    .ofl-work__heading { margin-bottom: 2.75rem; }
    .ofl-work__title { font-size: 2.83rem; letter-spacing: -0.035em; }
    .ofl-work__cover { margin-bottom: 3.4rem; }
    .ofl-work__cover figcaption,
    .ofl-work__content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
        font-size: 1.2rem;
    }
    .ofl-work__content > .wp-block-gallery[class] {
        width: 100%;
        left: auto;
        transform: none;
        grid-template-columns: 1fr;
        gap: 1.7rem;
        margin-top: 2.4rem;
    }
}
