.case-modal-open,
.resident-modal-open,
.live-modal-open {
    overflow: hidden;
}

.case-modal[hidden],
.resident-modal[hidden],
.live-modal[hidden] {
    display: none;
}

.case-modal,
.resident-modal,
.live-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: clamp(16px, 3vw, 42px);
}

.case-modal__overlay,
.resident-modal__overlay,
.live-modal__overlay {
    position: absolute;
    inset: 0;
    border: 0;
    background: #87674f9c;
    cursor: pointer;
}

.case-modal__dialog,
.resident-modal__dialog,
.live-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(900px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    overflow-y: auto;
    background: #fff;
    color: #171717;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.24);
}

.case-modal__dialog {
    display: grid;
    grid-template-columns: minmax(230px, 0.34fr) minmax(0, 0.66fr);
    width: min(1060px, 100%);
}

.resident-modal__dialog {
    display: grid;
    grid-template-columns: minmax(280px, 0.44fr) minmax(0, 0.56fr);
}

.case-modal__close,
.resident-modal__close,
.live-modal__close {
    position: absolute;
    right: 16px;
    top: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #171717;
    cursor: pointer;
}

.resident-modal__close svg {
    width: 18px;
    height: 18px;
}

.resident-modal__close path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.resident-modal__aside,
.case-modal__aside {
    min-width: 0;
    background: #f7f2ec;
    border-right: 1px solid rgba(23, 23, 23, 0.12);
}

.resident-modal__media {
    width: 100%;
    height: 100%;
    min-height: 520px;
    background: #dbd3cc;
}

.resident-modal__media img,
.resident-modal__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.resident-modal__media img {
    object-fit: cover;
}

.resident-modal__media img[hidden],
.resident-modal__placeholder[hidden],
.case-modal__logo[hidden] {
    display: none;
}

.resident-modal__content,
.case-modal__content {
    min-width: 0;
    padding: clamp(26px, 3.4vw, 58px);
}

.case-modal__brand {
    color: #8a613e;
    text-transform: uppercase;
}

.resident-modal__tag {
    color: #fff;
    -webkit-text-fill-color: #fff;
    text-transform: uppercase;
}

.resident-modal__title,
.case-modal__title {
    margin: 0;
    font-family: var(--font-heading, inherit);
    text-transform: uppercase;
}

.resident-modal__title {
    font-size: 58px;
    line-height: 0.96;
}

.resident-modal__meta {
    margin: 22px 0 0;
    font-size: 18px;
    line-height: 1.45;
    white-space: pre-line;
}

.resident-modal__metric {
    margin-top: 38px;
    padding-top: 24px;
    border-top: 1px solid rgba(23, 23, 23, 0.12);
}

.resident-modal__metric strong {
    display: block;
    font-size: 72px;
    line-height: 0.9;
    color: #8a613e;
}

.case-modal__media {
    background: #111;
    aspect-ratio: 0.72;
}

.case-modal__media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-modal__title {
    font-size: 48px;
    line-height: 0.98;
}

.case-modal__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 34px 0 0;
    padding: 24px 0;
    border-block: 1px solid rgba(23, 23, 23, 0.12);
}

.live-modal__dialog {
    width: min(920px, 100%);
    padding: clamp(16px, 2vw, 24px);
    background: #171717;
}

.live-modal__media {
    background: #050505;
    aspect-ratio: 16 / 9;
}

.live-modal__media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 767px) {
    .case-modal,
    .resident-modal,
    .live-modal {
        align-items: end;
        padding: 0;
    }

    .case-modal__dialog,
    .resident-modal__dialog {
        grid-template-columns: 1fr;
        width: 100%;
        max-height: 92vh;
    }

    .case-modal__aside,
    .resident-modal__aside {
        border-right: 0;
        border-bottom: 1px solid rgba(23, 23, 23, 0.12);
    }

    .case-modal__media {
        aspect-ratio: 16 / 10;
    }

    .resident-modal__media {
        min-height: 320px;
        height: 42vh;
    }

    .case-modal__content,
    .resident-modal__content {
        padding: 24px 18px 30px;
    }

    .case-modal__title {
        font-size: 24px;
    }

    .resident-modal__title {
        font-size: 32px;
    }

    .resident-modal__meta {
        font-size: 14px;
    }

    .resident-modal__metric strong {
        font-size: 42px;
    }

    .live-modal__dialog {
        width: 100%;
        max-height: calc(100vh - 24px);
        padding: 16px;
    }

    .live-modal__media {
        aspect-ratio: 9 / 16;
    }
}
