/* Taxonomy archive header: separate renderer,
shared visual primitives. */
.pmdh--taxonomy .pmdh-summary__item,
.pmdh--taxonomy .pmdh-summary__details:hover{ box-shadow: none; }
.pmdh--taxonomy .pmdh__hero-grid--taxonomy {
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
}
.pmdh--taxonomy .pmdh__hero-copy--taxonomy {
    width: min(100%, 1180px);
    max-width: 1180px;
}
.pmdh--taxonomy .pmdh__title { max-width: 20ch; }
.pmdh-taxonomy-title__flag {
    display: inline-block;
    width: .88em;
    height: .88em;
    overflow: hidden;
    border-radius: 50%;
    vertical-align: -.08em;
    aspect-ratio: 1;
    flex: 0 0 .88em;
}
.pmdh-taxonomy-title__flag-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pmdh-taxonomy-count,
.pmdh--taxonomy .pmdh__action--share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: auto;
    min-width: 0;
    height: var(--pmdh-pill-height);
    min-height: var(--pmdh-pill-height);
    padding: 0 var(--pmdh-pill-pad-x);
    border: 1px solid var(--pmdh-glass-border);
    border-radius: var(--pmdh-radius);
    background: var(--pmdh-glass-background);
    color: #fff;
    -webkit-backdrop-filter: var(--pmdh-glass-filter);
    backdrop-filter: var(--pmdh-glass-filter);
    box-shadow: var(--pmdh-glass-shadow);
    font-size: var(--pmdh-font-size-md);
    font-weight: var(--pmdh-font-weight-semibold);
    line-height: 1;
}
.pmdh-taxonomy-count { margin-top: clamp(18px, 2.5vh, 28px); }
.pmdh--taxonomy .pmdh-taxonomy-count .pmdh-icon,
.pmdh--taxonomy .pmdh__action--share .pmdh-icon {
    width: 1em !important;
    height: 1em !important;
    min-width: 1em;
    font-size: inherit;
}
.pmdh--taxonomy .pmdh__intro--taxonomy {
    width: 100%;
    max-width: none;
    text-wrap: pretty;
}
.pmdh--taxonomy .pmdh__actions--count-1 { display: flex; }

@media (max-width: 620px) {
    .pmdh--taxonomy .pmdh__breadcrumbs {
        margin-bottom: 22px;
        font-size: var(--pmdh-font-size-breadcrumb);
        line-height: var(--pmdh-line-height-normal);
    }
    .pmdh--taxonomy .pmdh__title { max-width: 18ch; }
    .pmdh--taxonomy .pmdh__intro--taxonomy {
        margin-top: 22px;
        font-size: var(--pmdh-font-size-base);
        line-height: var(--pmdh-line-height-normal);
    }
    .pmdh--taxonomy .pmdh__action {
        width: auto;
        min-width: 0;
    }

    /* Inside the mobile details slide the summary no longer overlaps the hero,
       so its desktop stacking context is unnecessary and confuses axe 4.12
       background detection without changing the painted layout. */
    .pmdh--taxonomy .pmdh__hero-details .pmdh-summary {
        position: static;
        z-index: auto;
    }

    /* The button is the only interactive hit target; its decorative icon layers must not intercept taps. */
    .pmdh--taxonomy .pmdh-summary__details > * {
        pointer-events: none;
    }
    .pmdh--taxonomy .pmdh-summary__details .pmdh-summary__copy {
        flex: 1 1 auto;
        width: auto;
    }
    .pmdh--taxonomy .pmdh-summary__details-arrow {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

/* Native two-screen mobile taxonomy hero. */
.pmdh--taxonomy .pmdh-mobile-pager { display: none; }

@media (max-width: 620px) {
    .pmdh--taxonomy .pmdh__hero {
        height: clamp(520px, calc(100svh - 70px), 760px);
        min-height: 0;
        overflow: hidden;
    }
    .pmdh--taxonomy .pmdh__hero-grid--taxonomy {
        display: block;
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 0;
    }
    .pmdh--taxonomy .pmdh__hero-copy--taxonomy {
        display: flex;
        width: 100%;
        max-width: none;
        height: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .pmdh--taxonomy .pmdh__hero-copy--taxonomy::-webkit-scrollbar { display: none; }
    .pmdh--taxonomy .pmdh__hero-primary,
    .pmdh--taxonomy .pmdh__hero-details {
        width: 100%;
        min-width: 100%;
        height: 100%;
        min-height: 0;
        flex: 0 0 100%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
    .pmdh--taxonomy .pmdh__hero-primary {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        padding: 26px var(--pmdh-gutter) 76px;
    }
    .pmdh--taxonomy .pmdh__hero-primary .pmdh__breadcrumbs {
        width: 100%;
        margin: 0;
        font-size: var(--pmdh-font-size-breadcrumb);
        line-height: var(--pmdh-line-height-normal);
    }
    .pmdh--taxonomy .pmdh__hero-primary-content {
        align-self: center;
        width: 100%;
        min-width: 0;
        padding-bottom: 8px;
    }
    .pmdh--taxonomy .pmdh__hero-primary .pmdh__title {
        width: 100%;
        max-width: 18ch;
        margin: 0;
        text-wrap: balance;
        text-shadow: 0 3px 18px rgba(0, 0, 0, .28);
    }
    .pmdh--taxonomy .pmdh__hero-details {
        position: relative;
        z-index: 2;
        display: block;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 28px var(--pmdh-gutter) 78px;
        background: linear-gradient(180deg, rgba(2,24,43,.38), rgba(2,24,43,.58));
        color: #fff;
        overscroll-behavior-y: auto;
    }
    .pmdh--taxonomy .pmdh__hero-primary .pmdh__intro--taxonomy {
        margin-top: 18px;
    }
    .pmdh--taxonomy .pmdh__hero-primary .pmdh-taxonomy-count {
        max-width: 100%;
        margin-top: 18px;
    }
    .pmdh--taxonomy .pmdh__actions {
        display: flex;
        width: auto;
        margin-top: 24px;
    }
    .pmdh--taxonomy .pmdh__action--share {
        width: auto;
        max-width: 100%;
        height: var(--pmdh-pill-height) !important;
        min-height: var(--pmdh-pill-height) !important;
        border-color: var(--pmdh-glass-border);
        border-radius: var(--pmdh-radius);
        background: var(--pmdh-glass-background);
        color: #fff !important;
        -webkit-backdrop-filter: var(--pmdh-glass-filter);
        backdrop-filter: var(--pmdh-glass-filter);
        box-shadow: var(--pmdh-glass-shadow);
    }
    .pmdh--taxonomy .pmdh-mobile-pager {
        position: absolute;
        z-index: 8;
        left: 50%;
        bottom: 17px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        transform: translateX(-50%);
    }
    .pmdh--taxonomy .pmdh-mobile-pager__dot {
        display: grid;
        place-items: center;
        width: 24px;
        height: 24px;
        min-width: 24px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        box-shadow: none;
        text-decoration: none !important;
        transition: width .18s ease;
    }
    .pmdh--taxonomy .pmdh-mobile-pager__dot::before {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: rgba(255,255,255,.48);
        box-shadow: 0 0 0 1px rgba(0,0,0,.08);
        content: "";
        pointer-events: none;
        transition: width .18s ease, background .18s ease;
    }
    .pmdh--taxonomy .pmdh-mobile-pager__dot.is-active {
        width: 29px;
        background: transparent;
    }
    .pmdh--taxonomy .pmdh-mobile-pager__dot.is-active::before {
        width: 25px;
        background: #fff;
    }
}

@media (max-width: 620px) and (prefers-reduced-motion: reduce) {
    .pmdh--taxonomy .pmdh__hero-copy--taxonomy { scroll-behavior: auto; }
    .pmdh--taxonomy .pmdh-mobile-pager__dot,
    .pmdh--taxonomy .pmdh-mobile-pager__dot::before { transition: none; }
}
