/* Animals of the World | REHub 20.0 | Editorial customization v2.1
   Scoped to post/archive content; no header, navigation, logo or footer rules. */
body.aotw-publication, body.single-post {
    --aotw-green: #356845;
    --aotw-deep: #245237;
    --aotw-light: #eff5ed;
    --aotw-border: #d9e5d7;
    --aotw-ink: #181e19;
    --aotw-muted: #53635a;
}
body.aotw-publication.aotw-botanical:not(.dark_body) {
    background-color: #eef3eb !important;
    background-image: url('botanical.svg') !important;
    background-size: 440px 440px !important;
    background-repeat: repeat !important;
    background-position: center top !important;
    background-attachment: scroll !important;
}
body.aotw-publication.aotw-plain:not(.dark_body) {
    background: #eef3eb !important;
}
/* Two image-only columns stay paired, at their normal block width unless
   wide/full alignment is intentionally selected in the editor. */
body.single-post .rh-content-wrap .main-side.single :is(article.post, .post-inner-wrapper, .aotw-entry-content) > .wp-block-columns:has(> .wp-block-column:nth-child(2)):not(:has(> .wp-block-column:nth-child(3))):has(> .wp-block-column:first-child > .wp-block-image):has(> .wp-block-column:nth-child(2) > .wp-block-image):not(:has(> .wp-block-column > :not(.wp-block-image))) {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    align-items: start !important;
    gap: 10px !important;
}
body.single-post .rh-content-wrap .main-side.single :is(article.post, .post-inner-wrapper, .aotw-entry-content) > .wp-block-columns:has(> .wp-block-column:nth-child(2)):not(:has(> .wp-block-column:nth-child(3))):has(> .wp-block-column:first-child > .wp-block-image):has(> .wp-block-column:nth-child(2) > .wp-block-image):not(:has(> .wp-block-column > :not(.wp-block-image))) > .wp-block-column {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
}
body.single-post .main-side.single .wp-block-columns > .wp-block-column > .wp-block-image:not(.is-resized) img {
    max-width: 100% !important;
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
body.single-post .main-side.single .wp-block-gallery { --wp--style--unstable-gallery-gap: 8px; }
/* Standalone captions, not image-overlaid gallery captions. */
body.single-post .main-side.single :is(.wp-block-image, .wp-caption):not(.blocks-gallery-item):not(.wp-block-gallery .wp-block-image) > :is(figcaption,.wp-caption-text),
body.single-post .main-side.single .wp-block-gallery > figcaption {
    color: var(--aotw-muted) !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    text-align: center;
    padding: 0 16px !important;
    margin: 12px 0 24px !important;
}
body.single-post:not(.dark_body) .main-side.single .title_single_area h1,
body.single-post:not(.dark_body) #rh_p_l_fullwidth_opt .title_single_area h1 { color: #171c18 !important; }
body.single-post #rh_post_layout_inimage .title_single_area h1 { color: #fff !important; }
body.single-post:not(.dark_body) .main-side.single :is(article.post,.post-inner-wrapper,.aotw-entry-content) > .wp-block-separator:not(.is-style-dots) {
    width: 100% !important;
    max-width: none !important;
    background: none !important;
    border: 0 !important;
    border-top: 1px dashed #c7d8c7 !important;
    margin: 32px 0 !important;
}
body.single-post:not(.dark_body) .main-side.single .tags a {
    color: var(--aotw-deep) !important;
    background-color: var(--aotw-light) !important;
    border-color: var(--aotw-border) !important;
}
/* Sidebar background keeps widget text legible over landscape photographs.
   Standard widgets get padding; custom HTML/ad widths stay unchanged. */
body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar > .widget {
    background-color: #fff;
    border: 1px solid var(--aotw-border);
    padding: 0;
    border-radius: 3px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(32,61,40,.05);
}
body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar > .widget > :is(.title,.widget-title,h2,h3) {
    color: #233d2b !important;
    border-bottom-color: var(--aotw-border) !important;
}
body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar > .widget > .title::after { border-bottom-color: var(--aotw-green) !important; }
body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar :is(.widget_recent_comments,.widget_recent_entries,.widget_categories,.widget_archive,.widget_search) {
    color: var(--aotw-ink);
}
body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar :is(.widget_recent_comments,.widget_recent_entries,.widget_categories,.widget_archive) li a {
    color: var(--aotw-deep);
}

body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar > :is(.widget_recent_comments,.widget_recent_entries,.widget_categories,.widget_archive,.widget_search,.widget_meta,.widget_text:not(:has(.rehub_chimp)),.widget_block:not(:has(iframe))) {
    padding: 16px;
}
body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar .widget.tabs > ul > li {
    background-color: #e6eee3 !important;
    color: #244b32 !important;
}
body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar .widget.tabs > ul > li:is(.current,.active,.selected,:hover) {
    background-color: #356845 !important;
    color: #fff !important;
}
body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar .rehub_chimp {
    background: #315f40 !important;
    border-color: #315f40 !important;
    color: #fff !important;
    margin: 20px 0 0 !important;
}
body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar .rehub_chimp :is(h3,p,.chimp_subtitle) { color: #fff !important; }
body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar .rehub_chimp::before { background-color: #254b33 !important; }
body.aotw-publication:not(.dark_body) .rh-content-wrap > .sidebar :is(.rehub_chimp,.rehub_chimp_flat) #mc-embedded-subscribe {
    background: #244b32 !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.35) !important;
}
body.aotw-publication:not(.dark_body):not(.single-post) .rh-content-wrap .main-side article.blog_string {
    background-color: #fff;
    border-color: var(--aotw-border);
}
body.aotw-publication:not(.dark_body):not(.single-post) .rh-content-wrap .main-side article h2 a:hover { color: var(--aotw-green) !important; }
/* Alternative REHub reading layouts keep their native column/metadata structure. */
body.single-post:not(.dark_body) .rh-content-wrap > .main-side.single.post-readopt {
    background: #fff;
    border: 0 !important;
    padding: 20px;
}
body.single-post:not(.dark_body) .rh-content-wrap > .main-side.single.post-readopt > article > .feature-post-section {
    margin-inline: -20px !important;
}
body.single-post .main-side.single.post-readopt .wp-block-image:not(.alignleft):not(.alignright):not(.is-resized) img {
    max-width: 100%;
    height: auto !important;
}
/* Phones: article itself reaches screen edges. Text maintains a 16px gutter. */
@media (max-width: 767px) {
    body.single-post .rh-outer-wrap .rh-container:has(> .rh-content-wrap > .main-side.single > .rh-post-wrapper) {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    body.single-post .rh-content-wrap > .sidebar {
        box-sizing: border-box;
        padding-inline: 16px;
    }
    body.single-post .main-side.single .wp-block-gallery { --wp--style--unstable-gallery-gap: 5px; }
    body.single-post .main-side.single :is(.wp-block-image, .wp-caption):not(.blocks-gallery-item):not(.wp-block-gallery .wp-block-image) > :is(figcaption,.wp-caption-text),
    body.single-post .main-side.single .wp-block-gallery > figcaption { font-size: 16px !important; }
    body.single-post .rh-content-wrap .main-side.single :is(article.post,.post-inner-wrapper,.aotw-entry-content) > .wp-block-columns:has(> .wp-block-column:nth-child(2)):not(:has(> .wp-block-column:nth-child(3))):has(> .wp-block-column:first-child > .wp-block-image):has(> .wp-block-column:nth-child(2) > .wp-block-image):not(:has(> .wp-block-column > :not(.wp-block-image))) {
        gap: 6px !important;
    }
    body.single-post:not(.dark_body) .rh-content-wrap > .main-side.single.post-readopt { padding: 16px; border: 0 !important; }
    body.single-post:not(.dark_body) .rh-content-wrap > .main-side.single.post-readopt > article > .feature-post-section { margin-inline: -16px !important; }
}
/* Fixed reading progress with no document reflow or click interception. */
#aotw-reading-progress { position: fixed; z-index: 99999; top: 0; left: 0; right: 0; height: 4px; pointer-events: none; background: transparent; }
#aotw-reading-progress > span { display: block; width: 100%; height: 100%; background: #4e845a; transform: scaleX(0); transform-origin: left center; }
body.rtl #aotw-reading-progress > span { transform-origin: right center; }
body.admin-bar #aotw-reading-progress { top: 32px; }
@media (max-width: 782px) { body.admin-bar #aotw-reading-progress { top: 46px; } }
@media (max-width: 600px) { body.admin-bar #aotw-reading-progress { top: 0; } }
body.aotw-progress-active .rh-progress-bar { display: none !important; }

body.single-post #rh_wide_inimage .aotw-wide-photo {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}
body.single-post #rh_wide_inimage .aotw-wide-photo > img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    object-fit: contain !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Animals of the World 20.0.2: structural full-width article layout.
   The shell has zero side padding and zero border. Separate grid tracks
   establish the text gutter. Photographs span the outer tracks. */
body.single-post .main-side.single > .rh-post-wrapper.aotw-post-shell {
    --aotw-gutter: 25px;
    padding: 25px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    min-width: 0;
    overflow: visible !important;
}
body.single-post:not(.dark_body) .main-side.single > .rh-post-wrapper.aotw-post-shell {
    background: #fff !important;
}
body.single-post .main-side.single > .aotw-post-shell > article.post {
    display: grid !important;
    grid-template-columns: var(--aotw-gutter) minmax(0,1fr) var(--aotw-gutter);
    grid-auto-flow: row;
    align-items: start;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    border: 0 !important;
}
body.single-post .main-side.single > .aotw-post-shell > article.post > * {
    grid-column: 2;
    min-width: 0;
}
body.single-post .main-side.single > .aotw-post-shell > article.post > .aotw-entry-content {
    display: grid;
    grid-template-columns: var(--aotw-gutter) minmax(0,1fr) var(--aotw-gutter);
    grid-auto-flow: row;
    grid-column: 1 / -1;
    align-items: start;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
}
body.single-post .aotw-post-shell .aotw-entry-content > * {
    grid-column: 2;
    min-width: 0;
}
/* Footer/comments stay in the padded reading column. */
body.single-post .main-side.single > .aotw-post-shell > :not(article):not(script):not(style) {
    margin-inline: var(--aotw-gutter) !important;
    max-width: calc(100% - var(--aotw-gutter) - var(--aotw-gutter));
}
/* A featured image is a full-width track, not an oversized padded figure. */
body.single-post .main-side.single > .aotw-post-shell > article.post > :is(figure.top_featured_image,.aotw-featured-photo,.post_slider.media_slider) {
    grid-column: 1 / -1;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}
/* Standalone full-size photos, classic captions, native galleries and explicit
   wide/full media blocks. Manually resized/floated images retain their size. */
body.single-post .aotw-post-shell .aotw-entry-content > :is(.wp-block-gallery,.gallery),
body.single-post .aotw-post-shell .aotw-entry-content > :is(.wp-block-image,.wp-caption):not(.alignleft):not(.alignright):not(.is-resized):not(.size-thumbnail):not(:has(.alignleft,.alignright,.is-resized,.size-thumbnail)),
body.single-post .aotw-post-shell .aotw-entry-content > :is(.wp-block-columns,.wp-block-group,.wp-block-cover,.wp-block-video):is(.alignwide,.alignfull),
body.single-post .aotw-post-shell .aotw-entry-content > img:not(.alignleft):not(.alignright):not(.size-thumbnail) {
    grid-column: 1 / -1;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
/* Full width but natural aspect ratio; no borders on the photographs. */
body.single-post .main-side.single figure.top_featured_image img,
body.single-post .aotw-post-shell .aotw-entry-content > img:not(.alignleft):not(.alignright):not(.size-thumbnail),
body.single-post .aotw-post-shell .aotw-entry-content > :is(.wp-block-image,.wp-caption):not(.alignleft):not(.alignright):not(.is-resized):not(.size-thumbnail):not(:has(.alignleft,.alignright,.is-resized,.size-thumbnail)) img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    margin-inline: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
body.single-post .aotw-post-shell .aotw-entry-content > :is(.wp-block-image,.wp-caption):not(.alignleft):not(.alignright):not(.is-resized):not(.size-thumbnail):not(:has(.alignleft,.alignright,.is-resized,.size-thumbnail)) :is(figure,a:has(>img)) {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}
/* Remove picture-link border/radius when a Gutenberg gallery includes
   the linked media. Gallery crop, lightbox and caption behavior are native. */
body.single-post .aotw-post-shell .aotw-entry-content > :is(.wp-block-gallery,.gallery) :is(img,figure,a:has(>img)) {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
/* Preserve intentional old-style left/right floats with normal block flow.
   The fallback is only applied to content with explicitly floated images. */
body.single-post .aotw-post-shell article.post > .aotw-entry-content:has(> .alignleft,> .alignright,> .wp-block-image .alignleft,> .wp-block-image .alignright,> p > img.alignleft,> p > img.alignright) {
    display: flow-root !important;
    padding-inline: var(--aotw-gutter) !important;
}
body.single-post .aotw-post-shell .aotw-entry-content:has(> .alignleft,> .alignright,> .wp-block-image .alignleft,> .wp-block-image .alignright,> p > img.alignleft,> p > img.alignright) > :is(.wp-block-gallery,.gallery,.wp-block-image,.wp-caption):not(.alignleft):not(.alignright):not(.is-resized):not(.size-thumbnail):not(:has(.alignleft,.alignright,.is-resized,.size-thumbnail)) {
    width: calc(100% + var(--aotw-gutter) + var(--aotw-gutter)) !important;
    margin-inline: calc(0px - var(--aotw-gutter)) !important;
}
/* Compatibility with cached/older template markup. No visible card border. */
body.single-post .main-side.single > .rh-post-wrapper:not(.aotw-post-shell) {
    --aotw-gutter: 25px;
    padding-inline: var(--aotw-gutter) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
body.single-post .main-side.single > .rh-post-wrapper:not(.aotw-post-shell) > article.post {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}
body.single-post .main-side.single > .rh-post-wrapper:not(.aotw-post-shell) > article.post > figure.top_featured_image {
    width: calc(100% + var(--aotw-gutter) + var(--aotw-gutter)) !important;
    max-width: none !important;
    margin-inline: calc(0px - var(--aotw-gutter)) !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}
@media (max-width: 767px) {
    body.single-post .main-side.single > .rh-post-wrapper {
        --aotw-gutter: 16px !important;
    }
    body.single-post .main-side.single > .rh-post-wrapper.aotw-post-shell {
        padding: 20px 0 !important;
    }
    body.single-post .rh-container:has(> .rh-content-wrap > .main-side.single > .rh-post-wrapper) {
        width: 100% !important;
        padding-inline: 0 !important;
    }
    body.single-post .rh-content-wrap > .main-side.single:has(> .rh-post-wrapper) {
        width: 100% !important;
        min-width: 0;
    }
}
/* Regular article prose, 20px on mobile and desktop. Explicit Gutenberg font
   sizes and custom HTML widgets are preserved. */
body.single-post .aotw-entry-content {
    font-size: 20px;
    line-height: 1.65;
}
body.single-post .aotw-entry-content > :is(p,ul,ol,blockquote,dl):not([class*="-font-size"]):not([style*="font-size"]),
body.single-post .aotw-entry-content > :is(.wp-block-group,.wp-block-columns) :is(p,li,dt,dd):not([class*="-font-size"]):not([style*="font-size"]),
body.single-post .aotw-entry-content > :is(ul,ol):not([class*="-font-size"]) li,
body.single-post .aotw-entry-content > blockquote p:not([class*="-font-size"]):not([style*="font-size"]),
body.single-post article.post:not(:has(.aotw-entry-content)) > :is(p,ul,ol):not([class*="-font-size"]):not([style*="font-size"]) {
    font-size: 20px !important;
    line-height: 1.65 !important;
}
/* Underline highlights follow each wrapped line; link words stay the same
   color as the surrounding prose. Never target navigation or picture links. */
body.single-post .aotw-entry-content > :is(p,ul,ol,blockquote,dl) a:not(.wp-element-button):not(.wp-block-button__link):not(.button):not(.btn):not([role="button"]):not(:has(img,svg)),
body.single-post .aotw-entry-content > :is(.wp-block-group,.wp-block-columns) :is(p,li,dt,dd) a:not(.wp-element-button):not(.wp-block-button__link):not(.button):not(.btn):not([role="button"]):not(:has(img,svg)),
body.single-post article.post:not(:has(.aotw-entry-content)) > :is(p,ul,ol) a:not(.wp-element-button):not(.wp-block-button__link):not(.button):not(.btn):not([role="button"]):not(:has(img,svg)) {
    color: inherit !important;
    text-decoration-line: underline !important;
    text-decoration-style: solid !important;
    text-decoration-color: #83b59a !important;
    text-decoration-thickness: 3px !important;
    text-underline-offset: 4px !important;
    text-decoration-skip-ink: auto;
    transition: text-decoration-color .18s ease,background-color .18s ease;
}
body.single-post .aotw-entry-content > :is(p,ul,ol,blockquote,dl) a:not(.wp-element-button):not(.wp-block-button__link):not(.button):not(.btn):not([role="button"]):not(:has(img,svg)):is(:hover,:focus-visible),
body.single-post .aotw-entry-content > :is(.wp-block-group,.wp-block-columns) :is(p,li,dt,dd) a:not(.wp-element-button):not(.wp-block-button__link):not(.button):not(.btn):not([role="button"]):not(:has(img,svg)):is(:hover,:focus-visible) {
    text-decoration-color: #356845 !important;
    background-color: rgba(131,181,154,.15) !important;
}

body.single-post .main-side.single > .rh-post-wrapper:not(.aotw-post-shell) > article.post > :is(.wp-block-image,.wp-caption,.wp-block-gallery,.gallery):not(.alignleft):not(.alignright):not(.is-resized):not(.size-thumbnail):not(:has(.alignleft,.alignright,.is-resized,.size-thumbnail)) {
    width: calc(100% + var(--aotw-gutter) + var(--aotw-gutter)) !important;
    max-width: none !important;
    margin-inline: calc(0px - var(--aotw-gutter)) !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
body.single-post .main-side.single > .rh-post-wrapper:not(.aotw-post-shell) > article.post > :is(.wp-block-image,.wp-caption):not(.alignleft):not(.alignright):not(.is-resized):not(.size-thumbnail):not(:has(.alignleft,.alignright,.is-resized,.size-thumbnail)) img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
}
