/* Mobile section spacing: keep stacked page sections compact at phone widths. */
@media (max-width:767px) {
    body.iarn-site-body .iarn-homepage > :is(.iarn-origin,.iarn-recognition,.iarn-involved,.iarn-adoptables,.iarn-news,.iarn-events),
    body.iarn-site-body .iarn-adopt2 > :is(.directory,.process,.adopt-who,.journal,.final),
    body.iarn-site-body .iarn-news-page > :is(.iarn-news-listing,.iarn-all-posts,.iarn-newsletter),
    body.iarn-site-body .iarn-report-page > :is(.iarn-ra-cases,.iarn-ra-document,.iarn-ra-form-section,.iarn-ra-livestock-feature,.iarn-ra-timeline),
    body.iarn-site-body .ih-help > :is(.ih-programs,.ih-directory,.ih-rehome,.ih-contact),
    body.iarn-site-body .iarn-gi > :is(.iarn-gi-main,.iarn-gi-other,.iarn-gi-final),
    body.iarn-site-body .iarn-foster > :is(.iarn-foster-intro,.iarn-foster-types,.iarn-foster-fospice,.iarn-foster-gallery,.iarn-foster-final),
    body.iarn-site-body .iarn-volunteer > :is(.ways,.real-life),
    body.iarn-site-body .iarn-giving-page > .iarn-donate-closing,
    body.iarn-site-body .iarn-contact-page > :is(.iarn-co-hero,.iarn-co-main,.iarn-co-bottom),
    body.iarn-site-body .iarn-lost > .hero,
    body.iarn-site-body .iarn-wsu > .wsu-section,
    body.iarn-site-body .iarn-media > .mk-section,
    body.iarn-site-body .iarn-awards-v2 > .pawtner,
    body.iarn-site-body .iarn-business > :is(.bp-hero,.bp-section,.bp-connect,.bp-closing),
    body.iarn-site-body .iarn-events-page > :is(.iarn-event-types,.iarn-events-featured,.iarn-calendar-section,.iarn-submit-event-section,.iarn-events-cta) {
        padding-top:32px !important;
        padding-bottom:32px !important;
    }
    body.iarn-site-body .iarn-adopt2:not(.iarn-animal-profile) > .wrap {padding-bottom:28px !important;}
    body.iarn-site-body .iarn-animal-profile > :is(.profile-body,.profile-facts-section,.profile-longform,.profile-apply-reminder,.profile-journey,.profile-close) {padding-top:32px !important;padding-bottom:32px !important;}
    body.iarn-site-body .iarn-volunteer > :is(.volunteer-opening,.vol-cta),
    body.iarn-site-body .iarn-awards-v2 > :is(.feature,.cards),
    body.iarn-site-body .iarn-business > .bp-impact {padding-bottom:32px !important;}
    body.iarn-site-body .iarn-footer {padding-top:32px !important;padding-bottom:32px !important;}
}

/* Brighter red preserves the homepage accent with readable contrast on dark panels. */
body.home .iarn-homepage .iarn-story-hero .iarn-story-copy h1 .iarn-hero-second-line em,
body.home .iarn-donation-medical-copy h3 {color:#f04464 !important;}

/* Keep the homepage adoption action readable on hover and keyboard focus. */
body.home .iarn-story-actions a.iarn-btn.iarn-btn-outline:hover,
body.home .iarn-story-actions a.iarn-btn.iarn-btn-outline:focus-visible {
    background:#fff !important;
    color:#a30d26 !important;
    border-color:#fff !important;
    opacity:1;
    text-decoration:none !important;
}
body.home .iarn-story-actions a.iarn-btn:focus-visible {
    outline:3px solid #fff;
    outline-offset:4px;
}
/* Preserve the newest, individually designed story. */
body.single-post:not(.postid-901161) .iarn-journal-cover {
    width:min(900px,calc(100% - 40px));
    margin:12px auto 38px;
}
body.single-post:not(.postid-901161) .iarn-journal-cover img {
    display:block;
    width:auto !important;
    height:auto !important;
    max-width:100%;
    max-height:440px;
    object-fit:contain;
    margin:auto;
}
body.single-post:not(.postid-901161) .iarn-journal-body figure:not(.iarn-imr-photo) {
    max-width:680px;
    margin:28px auto;
}
body.single-post:not(.postid-901161) .iarn-journal-body figure:not(.iarn-imr-photo) img {
    display:block;
    width:auto !important;
    max-width:100% !important;
    height:auto !important;
    max-height:440px !important;
    object-fit:contain !important;
    margin-inline:auto;
    border-radius:6px;
}
.iarn-journal-body .iarn-editorial-gallery {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:22px 16px;
    margin:32px 0 38px;
    clear:both;
}
body.single-post .iarn-journal-body .iarn-editorial-gallery figure.iarn-editorial-photo {
    width:100%;
    max-width:none;
    margin:0;
    min-width:0;
}
body.single-post .iarn-journal-body .iarn-editorial-gallery figure.iarn-editorial-photo img {
    width:100% !important;
    height:250px !important;
    max-height:250px !important;
    object-fit:contain !important;
    background:#f3f4f2;
}
.iarn-editorial-photo > a {display:block;}
.iarn-editorial-photo figcaption {font-size:13px;line-height:1.5;margin-top:9px;color:#4e5752;}
.iarn-editorial-photo figcaption p {font-size:inherit;line-height:inherit;margin:0;}
.iarn-journal-article .iarn-photo-open {
    display:block;
    width:fit-content;
    max-width:100%;
    margin-inline:auto;
    padding:0;
    border:0;
    border-radius:6px;
    background:transparent;
    color:inherit;
    cursor:zoom-in;
    line-height:0;
    box-shadow:none;
}
.iarn-journal-article .iarn-photo-open:hover {background:transparent;opacity:.94;}
.iarn-journal-article .iarn-photo-open:focus-visible {outline:3px solid #a30d26;outline-offset:4px;}
.iarn-editorial-gallery .iarn-photo-open {width:100%;}
.iarn-photo-viewer {
    width:min(1200px,calc(100vw - 32px));
    max-width:none;
    max-height:calc(100dvh - 24px);
    margin:auto;
    padding:0;
    border:0;
    border-radius:10px;
    background:#151b18;
    color:#fff;
    overflow:auto;
    box-shadow:0 20px 80px #0008;
}
.iarn-photo-viewer::backdrop {background:rgba(8,14,11,.88);}
.iarn-photo-viewer[open] {display:flex;flex-direction:column;}
.iarn-photo-viewer .iarn-photo-toolbar,
.iarn-photo-viewer .iarn-photo-navigation {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;flex-shrink:0;}
.iarn-photo-viewer button {
    min-width:44px;min-height:44px;
    padding:10px 16px;
    border:1px solid #79897f;
    border-radius:5px;
    background:#fff;
    color:#18231d !important;
    font-family:inherit;
    font-size:15px;
    font-weight:700;
    line-height:1.3;
    cursor:pointer;
}
.iarn-photo-viewer button:hover {background:#e4eee7;color:#18231d !important;}
.iarn-photo-viewer button:focus-visible {outline:3px solid #fff;outline-offset:3px;}
.iarn-photo-viewer figure {margin:0;padding:0 18px;min-height:0;}
.iarn-photo-viewer figure img {display:block;max-width:100%;width:auto;height:auto;max-height:calc(100dvh - 235px);object-fit:contain;margin:auto;}
.iarn-photo-viewer figcaption {color:#fff;font-size:15px;line-height:1.5;max-width:850px;margin:14px auto 0;overflow-wrap:anywhere;}
.iarn-photo-viewer .iarn-photo-counter {color:#d8e5dd;font-size:14px;margin:0;}
.iarn-photo-viewer .iarn-photo-navigation[hidden] {display:none;}
html.iarn-viewer-open {overflow:hidden;scrollbar-gutter:stable;}
@media(min-width:1200px) {
    .iarn-journal-body .iarn-editorial-gallery--many {grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 14px;}
    body.single-post .iarn-journal-body .iarn-editorial-gallery--many figure.iarn-editorial-photo img {height:200px !important;max-height:200px !important;}
}
@media(max-width:600px) {
    body.single-post:not(.postid-901161) .iarn-journal-cover img {max-height:320px;}
    body.single-post:not(.postid-901161) .iarn-journal-body figure:not(.iarn-imr-photo) img {max-height:380px !important;}
    .iarn-journal-body .iarn-editorial-gallery {gap:20px 12px;}
    body.single-post .iarn-journal-body .iarn-editorial-gallery figure.iarn-editorial-photo img {height:200px !important;max-height:200px !important;}
    .iarn-photo-viewer {width:calc(100vw - 16px);max-height:calc(100dvh - 16px);}
    .iarn-photo-viewer .iarn-photo-toolbar,.iarn-photo-viewer .iarn-photo-navigation {padding:10px 12px;}
    .iarn-photo-viewer figure {padding:0 12px;}
}
@media(max-width:420px) {
    .iarn-journal-body .iarn-editorial-gallery {grid-template-columns:1fr;}
    body.single-post .iarn-journal-body .iarn-editorial-gallery figure.iarn-editorial-photo img {height:auto !important;max-height:330px !important;}
}
@media print {
    .iarn-photo-viewer {display:none !important;}
    .iarn-editorial-photo {break-inside:avoid;}
}
