/* =========================================================
   IDYLEASE PICTURES — PORTRAIT TABLET RECOMPOSITION
   Page scoped. External CSS only.
   Applies only to portrait tablets from 768px through 1024px.
   Desktop, tablet landscape and phone are untouched.
   ========================================================= */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {

    /* Collapse the desktop proprietor rail into one composed tablet sequence. */
    html body.idy-media-body .idy-media-grid.idy-media-grid--proprietor,
    html body.idy-media-body .idy-proprietor-grid.idy-media-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        column-gap: 0 !important;
        row-gap: 0 !important;
    }

    html body.idy-media-body .idy-media-grid--proprietor > .idy-proprietor-separator {
        display: none !important;
    }

    html body.idy-media-body .idy-media-grid--proprietor > .idy-proprietor-sidebar {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-areas:
            "portrait archive"
            "founder archive"
            "quote archive"
            "landmarkdivider landmarkdivider"
            "preservation plaque"
            "calendar calendar"
            "medicaldirectory medicaldirectory"
            "filmdivider filmdivider"
            "videoone videotwo" !important;
        column-gap: 48px !important;
        row-gap: 0 !important;
        width: 100% !important;
        max-width: 820px !important;
        order: 2 !important;
        margin: 64px auto 0 !important;
        padding: 0 !important;
        position: relative !important;
        top: auto !important;
        align-items: start !important;
        justify-items: stretch !important;
    }

    /* ---------------------------------------------------------
       OPENING BAND
       Dr. Day occupies the left side; the archive poster shares
       the same opening band on the right.
       --------------------------------------------------------- */
    html body.idy-media-body .idy-proprietor-sidebar__kicker {
        grid-area: founder !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 18px auto 0 !important;
        text-align: left !important;
        justify-self: center !important;
        align-self: start !important;
    }

    html body.idy-media-body .idy-proprietor-portrait {
        grid-area: portrait !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        justify-self: center !important;
        align-self: start !important;
    }

    html body.idy-media-body .idy-proprietor-portrait img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
    }

    html body.idy-media-body .idy-proprietor-quote {
        grid-area: quote !important;
        width: 100% !important;
        max-width: 330px !important;
        margin: 18px auto 0 !important;
        padding: 0 8px !important;
        justify-self: center !important;
        align-self: start !important;
        text-align: center !important;
    }

    html body.idy-media-body .idy-proprietor-quote p {
        margin: 0 0 6px !important;
        font-size: 18.5px !important;
        line-height: 1.46 !important;
    }

    /* Compact the citation so the founder and archive columns close
       at the same visual height in portrait-tablet view. */
    html body.idy-media-body .idy-proprietor-quote cite {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        line-height: 1.2 !important;
    }

    html body.idy-media-body .idy-media-archive-promo {
        grid-area: archive !important;
        width: 100% !important;
        max-width: 310px !important;
        margin: 0 auto !important;
        justify-self: center !important;
        align-self: start !important;
        text-align: center !important;
    }

    html body.idy-media-body .idy-media-archive-promo img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }

    html body.idy-media-body .idy-media-archive-promo__link {
        display: block !important;
        width: 100% !important;
        margin: 14px auto 0 !important;
        text-align: center !important;
    }

    /* Remove the divider that originally followed the archive poster. */
    html body.idy-media-body .idy-media-archive-promo + .idy-proprietor-divider {
        display: none !important;
    }

    /* One divider closes the founder/archive opening band. */
    html body.idy-media-body .idy-proprietor-quote + .idy-proprietor-divider {
        grid-area: landmarkdivider !important;
        display: block !important;
        width: calc(100% - 44px) !important;
        max-width: none !important;
        height: 1px !important;
        margin: 48px auto 42px !important;
        justify-self: center !important;
        background: rgba(184, 115, 51, .30) !important;
        overflow: hidden !important;
    }

    html body.idy-media-body .idy-proprietor-quote + .idy-proprietor-divider img {
        display: none !important;
    }

    /* ---------------------------------------------------------
       LANDMARK BAND
       Preservation statement left, designation plaque right.
       --------------------------------------------------------- */
    html body.idy-media-body .idy-proprietor-sidebar__note {
        grid-area: preservation !important;
        width: 100% !important;
        max-width: 340px !important;
        margin: 0 auto !important;
        justify-self: center !important;
        align-self: center !important;
        font-size: 15px !important;
        line-height: 1.64 !important;
        text-align: center !important;
    }

    html body.idy-media-body .idy-proprietor-plaque {
        grid-area: plaque !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        justify-self: center !important;
        align-self: center !important;
    }

    html body.idy-media-body .idy-proprietor-plaque img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
    }

    /* One divider before the two video thumbnails. */
    html body.idy-media-body .idy-proprietor-medical-directory + .idy-proprietor-divider {
        grid-area: filmdivider !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 44px !important;
        margin: 20px 0 !important;
        padding: 0 !important;
        justify-self: stretch !important;
    }

    html body.idy-media-body .idy-proprietor-medical-directory + .idy-proprietor-divider img {
        display: block !important;
        width: min(220px, 31%) !important;
        max-width: 220px !important;
        height: auto !important;
        margin: auto !important;
    }

    /* ---------------------------------------------------------
       VIDEO BAND
       Equal 16:9 thumbnails in one row.
       --------------------------------------------------------- */
    html body.idy-media-body .idy-proprietor-medical-directory + .idy-proprietor-divider + .idy-proprietor-video-thumb {
        grid-area: videoone !important;
    }

    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb:last-child {
        grid-area: videotwo !important;
    }

    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        justify-self: center !important;
    }

    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb figure {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        object-fit: cover !important;
    }

    /* Remove the old divider that sat between the two videos. */
    html body.idy-media-body .idy-proprietor-video-thumb + .idy-proprietor-divider {
        display: none !important;
    }

    /* Main media collection starts beneath the introductory bands. */
    html body.idy-media-body .idy-media-grid--proprietor > .idy-proprietor-story,
    html body.idy-media-body .idy-media-story {
        display: block !important;
        width: 100% !important;
        max-width: 820px !important;
        order: 1 !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    html body.idy-media-body .idy-media-copy--above-player {
        width: 100% !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* ---------------------------------------------------------
       FOOTER — PORTRAIT TABLET ONLY
       Remove inherited grid dead space, then restore deliberate
       30px spacing between copy / buttons / divider.
       --------------------------------------------------------- */
    html body.idy-media-body .idy-visit-footer__top {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        row-gap: 0 !important;
        align-items: start !important;
    }

    html body.idy-media-body .idy-visit-footer__actions {
        padding-top: 30px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        justify-content: flex-start !important;
    }

    html body.idy-media-body .idy-visit-footer__rule {
        margin-top: 30px !important;
    }
}

/* =========================================================
   IDYLEASE PICTURES — LANDSCAPE TABLET FOOTER BUTTONS
   Page scoped. External CSS only.
   Applies only to landscape tablet widths through 1366px.
   Removes the inherited 180px desktop action offset and keeps
   the buttons in normal flow directly beneath the footer copy.
   ========================================================= */
@media screen and (min-width: 768px) and (max-width: 1366px) and (orientation: landscape) {
    html body.idy-media-body .idy-visit-footer__top {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
    }

    html body.idy-media-body .idy-visit-footer__actions {
        padding-top: 0 !important;
        margin: 28px 0 0 !important;
        justify-content: flex-start !important;
    }

    html body.idy-media-body .idy-visit-footer__rule {
        margin-top: 30px !important;
    }
}

/* =========================================================
   IDYLEASE PICTURES — PORTRAIT TABLET RISE MOTION
   Page scoped. External CSS only.
   Converts the Media page's inward left/right child movement
   to a vertical rise only in portrait tablet. Desktop, tablet
   landscape, phone and the shared reveal-motion.css are untouched.
   ========================================================= */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    html body.idy-media-body .idy-media-main .rz-inward-left,
    html body.idy-media-body .idy-media-main .rz-inward-right {
        transform: translate3d(0, 32px, 0) !important;
        transition:
            transform 1050ms cubic-bezier(.22,.61,.36,1),
            opacity 1050ms cubic-bezier(.22,.61,.36,1) !important;
    }

    html body.idy-media-body .idy-media-main .rz-inward-left.rz-visible,
    html body.idy-media-body .idy-media-main .rz-inward-right.rz-visible {
        transform: translate3d(0, 0, 0) !important;
    }
}

/* =========================================================
   IDYLEASE & NEWFOUNDLAND ON FILM
   Open editorial three-column row. The projects are composed
   as part of the page rather than enclosed in boxed cards.
   ========================================================= */
html body.idy-media-body .idy-film-locations {
    margin: 42px 0 44px;
    padding: 36px 0 40px;
    border-top: 1px solid rgba(184,115,51,.34);
    border-bottom: 1px solid rgba(184,115,51,.24);
}

html body.idy-media-body .idy-film-locations__header {
    max-width: 790px;
    margin: 0 0 30px;
}

html body.idy-media-body .idy-film-locations__header > span {
    display: block;
    margin: 0 0 8px;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: .20em;
    text-transform: uppercase;
    color: #b87333;
}

html body.idy-media-body .idy-film-locations__header h3 {
    margin: 0 0 12px;
    font-family: "Gilda Display", serif;
    font-size: clamp(29px, 3vw, 29px);
    font-weight: 400;
    line-height: 1.04;
    color: #2f2d29;
}

html body.idy-media-body .idy-film-locations__header p {
    max-width: 770px;
    margin: 0;
    font-size: 16px;
    line-height: 1.68;
    color: #625e57;
}

html body.idy-media-body .idy-film-locations__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
    padding-top: 26px;
    border-top: 1px solid rgba(47,45,41,.14);
}

html body.idy-media-body .idy-film-location-card {
    position: relative;
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    padding: 0 25px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

html body.idy-media-body .idy-film-location-card:first-child {
    padding-left: 0;
}

html body.idy-media-body .idy-film-location-card:last-child {
    padding-right: 0;
}

html body.idy-media-body .idy-film-location-card + .idy-film-location-card {
    border-left: 1px solid rgba(47,45,41,.14);
}

html body.idy-media-body .idy-film-location-card__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #2d2b27;
    text-decoration: none;
}

html body.idy-media-body .idy-film-location-card__media figure {
    position: absolute;
    inset: 0;
    margin: 0;
}

html body.idy-media-body .idy-film-location-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s cubic-bezier(.22,.61,.36,1), opacity .55s ease;
}

html body.idy-media-body a.idy-film-location-card__media:hover img,
html body.idy-media-body a.idy-film-location-card__media:focus-visible img {
    transform: scale(1.035);
    opacity: .88;
}

html body.idy-media-body .idy-film-location-card__play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 50%;
    background: rgba(25,24,22,.48);
    color: #fff;
    backdrop-filter: blur(3px);
}

html body.idy-media-body .idy-film-location-card__play i {
    margin-left: 3px;
    font-size: 15px;
}

html body.idy-media-body .idy-film-location-card__media--pending::after {
    content: "Video forthcoming";
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 9px;
    background: rgba(31,29,26,.78);
    font-family: "Barlow Condensed", sans-serif;
    font-size: 10px;
    line-height: 1;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff;
}

html body.idy-media-body .idy-film-location-card__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 18px 0 0;
}

html body.idy-media-body .idy-film-location-card__eyebrow {
    min-height: 0;
    margin: 0 0 5px;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: #b87333;
}

html body.idy-media-body .idy-film-location-card h4 {
    min-height: 0;
    margin: 0 0 5px;
    font-family: "Gilda Display", serif;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.08;
    color: #2f2d29;
}

html body.idy-media-body .idy-film-location-card h4 em {
    font-style: italic;
    font-weight: 400;
}

html body.idy-media-body .idy-film-location-card__project {
    min-height: 0;
    margin: 0 0 12px;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #57524b;
}

html body.idy-media-body .idy-film-location-card__description {
    flex: 1 1 auto;
    margin: 0;
    font-size: 14px;
    line-height: 1.58;
    color: #6c665e;
}

html body.idy-media-body .idy-film-location-card__action {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    margin-top: 18px;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: .13em;
    text-transform: uppercase;
    text-decoration: none;
    color: #2f2d29;
}

html body.idy-media-body a.idy-film-location-card__action:hover,
html body.idy-media-body a.idy-film-location-card__action:focus-visible {
    color: #b87333;
}

html body.idy-media-body .idy-film-location-card__action--pending {
    color: #888078;
}

@media screen and (max-width: 1024px) {
    html body.idy-media-body .idy-film-location-card {
        padding-right: 16px;
        padding-left: 16px;
    }

    html body.idy-media-body .idy-film-location-card__content {
        padding-top: 16px;
    }

    html body.idy-media-body .idy-film-location-card h4 {
        font-size: 20px;
    }

    html body.idy-media-body .idy-film-location-card__description {
        font-size: 13.5px;
    }
}

@media screen and (max-width: 767px) {
    html body.idy-media-body .idy-film-locations {
        margin: 34px 0 38px;
        padding: 30px 0 34px;
    }

    html body.idy-media-body .idy-film-locations__grid {
        grid-template-columns: 1fr;
        padding-top: 0;
        border-top: 0;
    }

    html body.idy-media-body .idy-film-location-card,
    html body.idy-media-body .idy-film-location-card:first-child,
    html body.idy-media-body .idy-film-location-card:last-child {
        padding: 26px 0 0;
    }

    html body.idy-media-body .idy-film-location-card + .idy-film-location-card {
        margin-top: 28px;
        border-top: 1px solid rgba(47,45,41,.14);
        border-left: 0;
    }

    html body.idy-media-body .idy-film-location-card h4,
    html body.idy-media-body .idy-film-location-card__eyebrow,
    html body.idy-media-body .idy-film-location-card__project {
        min-height: 0;
    }

    html body.idy-media-body .idy-film-location-card__content {
        padding: 18px 0 0;
    }
}

/* =========================================================
   FILM LOCATIONS — BATTERSHELL THUMBNAIL PARITY
   The pending Battershell item uses the same 16:9 media frame,
   image scaling and centered play overlay as the active videos.
   ========================================================= */
html body.idy-media-body button.idy-film-location-card__media {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    font: inherit;
    text-align: inherit;
    opacity: 1;
}

html body.idy-media-body .idy-film-location-card__media--pending {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    background: #2d2b27 !important;
    cursor: default;
}

html body.idy-media-body .idy-film-location-card__media--pending figure {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

html body.idy-media-body .idy-film-location-card__media--pending img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: 50% 50% !important;
}

/* The centered play mark supplies the visual cue; remove the competing badge. */
html body.idy-media-body .idy-film-location-card__media--pending::after {
    display: none !important;
    content: none !important;
}

html body.idy-media-body .idy-film-location-card__media--pending .idy-film-location-card__play {
    display: grid !important;
    opacity: 1 !important;
}


/* =========================================================
   IDYLEASE PICTURES — SIDEBAR DOCUMENTS
   One existing 265px sidebar rail for plaque, documents,
   dividers and video thumbnails. Portrait assets retain their
   natural height; only the outer width and left edge are shared.
   ========================================================= */
html body.idy-media-body .idy-proprietor-calendar,
html body.idy-media-body .idy-proprietor-medical-directory {
    display: block !important;
    width: 100% !important;
    max-width: 265px !important;
    height: auto !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
    justify-self: start !important;
    align-self: start !important;
}

html body.idy-media-body .idy-proprietor-calendar {
    margin-top: 30px !important;
}

html body.idy-media-body .idy-proprietor-medical-directory {
    margin-top: 25px !important;
}

html body.idy-media-body .idy-proprietor-calendar img,
html body.idy-media-body .idy-proprietor-medical-directory img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body.idy-media-body .idy-proprietor-calendar figcaption,
html body.idy-media-body .idy-proprietor-medical-directory figcaption {
    width: 100% !important;
    max-width: 265px !important;
    margin: 11px 0 0 !important;
    padding: 0 !important;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .12em;
    text-align: center;
    text-transform: uppercase;
    color: rgba(47,45,41,.62);
    box-sizing: border-box !important;
}

/* Portrait tablet keeps the documents centered beneath the plaque/text band,
   at the same width as one of the paired video thumbnails. */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    html body.idy-media-body .idy-proprietor-calendar {
        grid-area: calendar !important;
        width: calc((100% - 48px) / 2) !important;
        max-width: 386px !important;
        margin: 42px auto 0 !important;
        justify-self: center !important;
    }

    html body.idy-media-body .idy-proprietor-medical-directory {
        grid-area: medicaldirectory !important;
        width: calc((100% - 48px) / 2) !important;
        max-width: 386px !important;
        margin: 24px auto 0 !important;
        justify-self: center !important;
    }

    html body.idy-media-body .idy-proprietor-calendar figcaption,
    html body.idy-media-body .idy-proprietor-medical-directory figcaption {
        max-width: none !important;
    }
}

/* Phone: every element in this part of the sidebar uses the exact same
   265px rail and the exact same left edge. No centering, offsets or 16:9
   behavior are applied to the two portrait documents. */
@media screen and (max-width: 575px) {
    html body.idy-media-body .idy-proprietor-sidebar {
        justify-items: start !important;
    }

    html body.idy-media-body .idy-proprietor-plaque,
    html body.idy-media-body .idy-proprietor-sidebar__note,
    html body.idy-media-body .idy-proprietor-calendar,
    html body.idy-media-body .idy-proprietor-medical-directory,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-divider--secondary {
        width: 100% !important;
        max-width: 265px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        justify-self: start !important;
        box-sizing: border-box !important;
    }

    html body.idy-media-body .idy-proprietor-plaque img,
    html body.idy-media-body .idy-proprietor-calendar img,
    html body.idy-media-body .idy-proprietor-medical-directory img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
    }

    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb figure,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb img {
        width: 100% !important;
        max-width: 265px !important;
    }

    html body.idy-media-body .idy-proprietor-calendar {
        margin-top: 28px !important;
    }

    html body.idy-media-body .idy-proprietor-medical-directory {
        margin-top: 24px !important;
    }
}

/* =========================================================
   FILM LOCATIONS — EQUAL THUMBNAIL WIDTHS
   The middle card has padding on both sides while the outer cards
   release one outside edge. Extend the Battershell media frame just
   enough to match the visible width of the two neighboring thumbnails.
   ========================================================= */
@media screen and (min-width: 1025px) {
    html body.idy-media-body .idy-film-location-card:nth-child(2) .idy-film-location-card__media {
        width: calc(100% + 25px) !important;
        margin-left: -12.5px !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    html body.idy-media-body .idy-film-location-card:nth-child(2) .idy-film-location-card__media {
        width: calc(100% + 16px) !important;
        margin-left: -8px !important;
    }
}

/* =========================================================
   IDYLEASE MEDIA — TARGETED MOBILE / TABLET REVIEW
   Scope is limited to the three introductory video cards and
   the Idylease & Newfoundland on Film section. Existing page,
   sidebar, archive, navigation and footer layouts are untouched.
   ========================================================= */

/* Tablet: retain one balanced row of three introductory videos. */
@media screen and (min-width: 768px) and (max-width: 1366px) {
    html body.idy-media-body .idy-media-options-cluster > .idy-present-media-row {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 18px !important;
        width: 100% !important;
        align-items: start !important;
    }

    html body.idy-media-body .idy-present-media-row > .idy-present-media-card {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        text-decoration: none !important;
    }

    html body.idy-media-body .idy-present-media-row > .idy-present-media-card figure {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    html body.idy-media-body .idy-present-media-row > .idy-present-media-card img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        object-fit: cover !important;
    }

    html body.idy-media-body .idy-present-media-row > .idy-present-media-card strong {
        display: block !important;
        margin: 10px 0 0 !important;
        line-height: 1.28 !important;
    }

    html body.idy-media-body .idy-present-media-card__play {
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    /* The film-location projects remain one row on tablet. */
    html body.idy-media-body .idy-film-locations__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        align-items: stretch !important;
    }

    html body.idy-media-body .idy-film-location-card {
        min-width: 0 !important;
    }

    html body.idy-media-body .idy-film-location-card__media {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}

/* Portrait tablet: preserve three columns while tightening only the new media. */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    html body.idy-media-body .idy-media-options-cluster > .idy-present-media-row {
        gap: 14px !important;
    }

    html body.idy-media-body .idy-present-media-row > .idy-present-media-card strong {
        font-size: 13px !important;
    }

    html body.idy-media-body .idy-film-location-card {
        padding-right: 14px !important;
        padding-left: 14px !important;
    }

    html body.idy-media-body .idy-film-location-card:first-child {
        padding-left: 0 !important;
    }

    html body.idy-media-body .idy-film-location-card:last-child {
        padding-right: 0 !important;
    }

    html body.idy-media-body .idy-film-location-card h4 {
        font-size: 19px !important;
    }

    html body.idy-media-body .idy-film-location-card__description {
        font-size: 13px !important;
        line-height: 1.54 !important;
    }
}

/* Phones: stack only the two new/updated media groups. */
@media screen and (max-width: 767px) {
    html body.idy-media-body .idy-media-options-cluster > .idy-present-media-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 22px !important;
        width: 100% !important;
    }

    html body.idy-media-body .idy-present-media-row > .idy-present-media-card {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        text-decoration: none !important;
    }

    html body.idy-media-body .idy-present-media-row > .idy-present-media-card figure {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    html body.idy-media-body .idy-present-media-row > .idy-present-media-card img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        object-fit: cover !important;
    }

    html body.idy-media-body .idy-present-media-row > .idy-present-media-card strong {
        display: block !important;
        margin: 10px 0 0 !important;
        line-height: 1.28 !important;
    }

    html body.idy-media-body .idy-present-media-card__play,
    html body.idy-media-body .idy-film-location-card__play {
        width: 44px !important;
        height: 44px !important;
    }

    html body.idy-media-body .idy-film-locations__header {
        margin-bottom: 24px !important;
    }

    html body.idy-media-body .idy-film-locations__header h3 {
        font-size: 28px !important;
        line-height: 1.08 !important;
    }

    html body.idy-media-body .idy-film-locations__header p {
        font-size: 15px !important;
        line-height: 1.62 !important;
    }

    html body.idy-media-body .idy-film-location-card,
    html body.idy-media-body .idy-film-location-card:first-child,
    html body.idy-media-body .idy-film-location-card:last-child {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    html body.idy-media-body .idy-film-location-card__media {
        width: 100% !important;
        margin-left: 0 !important;
        aspect-ratio: 16 / 9 !important;
    }

    html body.idy-media-body .idy-film-location-card__description {
        font-size: 14px !important;
        line-height: 1.58 !important;
    }
}


/* =========================================================
   MOBILE — CENTER THE DOCUMENT BAND BETWEEN PLAQUE AND VIDEO
   In phone layouts, center the preservation note, the two portrait
   documents, and the divider that sits directly above the first video.
   Leave the video-thumbnail top spacing unchanged.
   ========================================================= */
@media screen and (max-width: 767px) {
    html body.idy-media-body .idy-proprietor-sidebar__note,
    html body.idy-media-body .idy-proprietor-calendar,
    html body.idy-media-body .idy-proprietor-medical-directory,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-divider--secondary {
        margin-left: auto !important;
        margin-right: auto !important;
        justify-self: center !important;
    }

    html body.idy-media-body .idy-proprietor-calendar figcaption,
    html body.idy-media-body .idy-proprietor-medical-directory figcaption {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-divider--secondary {
        display: flex !important;
        justify-content: center !important;
    }

    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-divider--secondary img {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* =========================================================
   MOBILE — CENTER COMPLETE PLAQUE-TO-VIDEO SIDEBAR SEQUENCE
   Centers the plaque, preservation note, portrait documents,
   divider and both video thumbnails without changing vertical spacing.
   ========================================================= */
@media screen and (max-width: 767px) {
    html body.idy-media-body .idy-proprietor-plaque,
    html body.idy-media-body .idy-proprietor-sidebar__note,
    html body.idy-media-body .idy-proprietor-calendar,
    html body.idy-media-body .idy-proprietor-medical-directory,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-divider--secondary,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb {
        width: 100% !important;
        max-width: 265px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        justify-self: center !important;
        align-self: start !important;
        box-sizing: border-box !important;
    }

    html body.idy-media-body .idy-proprietor-plaque img,
    html body.idy-media-body .idy-proprietor-calendar img,
    html body.idy-media-body .idy-proprietor-medical-directory img,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb figure,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb img {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* =========================================================
   TABLET PORTRAIT — LANDMARK/DOCUMENT BAND REFINEMENT
   Plaque left / preservation text right.
   Calendar and medical-directory documents side by side beneath.
   ========================================================= */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    html body.idy-media-body .idy-media-grid--proprietor > .idy-proprietor-sidebar {
        grid-template-areas:
            "portrait archive"
            "founder archive"
            "quote archive"
            "landmarkdivider landmarkdivider"
            "plaque preservation"
            "calendar medicaldirectory"
            "filmdivider filmdivider"
            "videoone videotwo" !important;
    }

    html body.idy-media-body .idy-proprietor-plaque {
        grid-area: plaque !important;
        max-width: 320px !important;
        margin: 0 auto 0 0 !important;
        justify-self: start !important;
        align-self: center !important;
    }

    html body.idy-media-body .idy-proprietor-sidebar__note {
        grid-area: preservation !important;
        max-width: 340px !important;
        margin: 0 0 0 auto !important;
        justify-self: end !important;
        align-self: center !important;
        text-align: left !important;
    }

    html body.idy-media-body .idy-proprietor-calendar {
        grid-area: calendar !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 34px auto 0 0 !important;
        justify-self: start !important;
        align-self: start !important;
    }

    html body.idy-media-body .idy-proprietor-medical-directory {
        grid-area: medicaldirectory !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 34px 0 0 auto !important;
        justify-self: end !important;
        align-self: start !important;
    }

    html body.idy-media-body .idy-proprietor-calendar figcaption,
    html body.idy-media-body .idy-proprietor-medical-directory figcaption {
        max-width: 320px !important;
    }
}


/* =========================================================
   MOBILE — FILM LOCATION CARD STACK PARITY
   Normalize cards 2 and 3 to the same internal spacing and
   stacked presentation as card 1.
   ========================================================= */
@media screen and (max-width: 767px) {
    html body.idy-media-body .idy-film-location-card,
    html body.idy-media-body .idy-film-location-card:first-child,
    html body.idy-media-body .idy-film-location-card:nth-child(2),
    html body.idy-media-body .idy-film-location-card:nth-child(3),
    html body.idy-media-body .idy-film-location-card:last-child {
        display: flex !important;
        flex-direction: column !important;
        padding: 26px 0 0 !important;
    }

    html body.idy-media-body .idy-film-location-card__media {
        width: 100% !important;
        margin: 0 !important;
    }

    html body.idy-media-body .idy-film-location-card__content {
        padding: 18px 0 0 !important;
    }

    html body.idy-media-body .idy-film-location-card__eyebrow {
        margin: 0 0 5px !important;
    }

    html body.idy-media-body .idy-film-location-card h4 {
        margin: 0 0 5px !important;
    }

    html body.idy-media-body .idy-film-location-card__project {
        margin: 0 0 12px !important;
    }

    html body.idy-media-body .idy-film-location-card__description {
        margin: 0 !important;
    }

    html body.idy-media-body .idy-film-location-card__action {
        margin-top: 18px !important;
    }
}


/* =========================================================
   MOBILE — FILM CARDS 2 + 3 NATURAL CONTENT FLOW
   Keep card 1 exactly as approved. Remove inherited flex growth
   from cards 2 and 3 so their action links follow their copy at
   the same distance as the first card.
   ========================================================= */
@media screen and (max-width: 767px) {
    html body.idy-media-body .idy-film-location-card:nth-child(2),
    html body.idy-media-body .idy-film-location-card:nth-child(3) {
        height: auto !important;
        min-height: 0 !important;
    }

    html body.idy-media-body .idy-film-location-card:nth-child(2) .idy-film-location-card__content,
    html body.idy-media-body .idy-film-location-card:nth-child(3) .idy-film-location-card__content {
        flex: 0 0 auto !important;
        min-height: 0 !important;
    }

    html body.idy-media-body .idy-film-location-card:nth-child(2) .idy-film-location-card__description,
    html body.idy-media-body .idy-film-location-card:nth-child(3) .idy-film-location-card__description {
        flex: 0 0 auto !important;
        min-height: 0 !important;
    }

    html body.idy-media-body .idy-film-location-card:nth-child(2) .idy-film-location-card__action,
    html body.idy-media-body .idy-film-location-card:nth-child(3) .idy-film-location-card__action {
        margin-top: 18px !important;
    }
}


/* =========================================================
   MOBILE — FULL-WIDTH LANDMARK / DOCUMENT / VIDEO SEQUENCE
   Match the plaque-through-video sequence to the full padded width
   used by the film-location videos below. Natural image proportions
   and all established vertical spacing remain unchanged.
   ========================================================= */
@media screen and (max-width: 767px) {
    html body.idy-media-body .idy-media-grid--proprietor > .idy-proprietor-sidebar {
        width: 100% !important;
        max-width: none !important;
        justify-items: stretch !important;
    }

    html body.idy-media-body .idy-proprietor-plaque,
    html body.idy-media-body .idy-proprietor-sidebar__note,
    html body.idy-media-body .idy-proprietor-calendar,
    html body.idy-media-body .idy-proprietor-medical-directory,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-divider--secondary,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        justify-self: stretch !important;
        box-sizing: border-box !important;
    }

    html body.idy-media-body .idy-proprietor-plaque img,
    html body.idy-media-body .idy-proprietor-calendar img,
    html body.idy-media-body .idy-proprietor-medical-directory img,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb figure,
    html body.idy-media-body .idy-proprietor-sidebar > .idy-proprietor-video-thumb img {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    html body.idy-media-body .idy-proprietor-plaque img,
    html body.idy-media-body .idy-proprietor-calendar img,
    html body.idy-media-body .idy-proprietor-medical-directory img {
        height: auto !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
    }

    html body.idy-media-body .idy-proprietor-sidebar__note,
    html body.idy-media-body .idy-proprietor-calendar figcaption,
    html body.idy-media-body .idy-proprietor-medical-directory figcaption {
        text-align: center !important;
    }
}
