/* Summary cards */
.pmdh-summary {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: calc(100% - (var(--pmdh-gutter) * 2));
    margin: -40px var(--pmdh-gutter) 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.pmdh-summary__item {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
    min-height: 84px;
    padding: 1rem 1.2rem;
    border: 1px solid var(--pmdh-line);
    border-radius: var(--pmdh-radius);
    background: #fff;
    box-shadow: 0 12px 32px rgba(9, 42, 70, .11);
}
.pmdh-summary__details {
    appearance: none;
    grid-column: 4;
    width: 100%;
    color: var(--pmdh-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-color: #a9cdec;
    background: linear-gradient(135deg, #f4f9ff 0%, #e8f3ff 100%);
    box-shadow: 0 14px 36px rgba(8, 77, 141, .16);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.pmdh-summary__details .pmdh-summary__icon { background: var(--pmdh-blue); color: #fff; }
.pmdh-summary__details .pmdh-summary__label { color: var(--pmdh-blue-2); }
.pmdh-summary__details .pmdh-summary__value { color: var(--pmdh-navy); }
.pmdh-summary__details-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    color: var(--pmdh-blue);
    transition: transform .18s ease;
}.pmdh-summary__details:hover{
    border-color: #6ca9dc;
    background: linear-gradient(135deg, #edf7ff 0%, #dceeff 100%);
    box-shadow: 0 17px 40px rgba(8, 77, 141, .21);

    transform: translateY(-2px);
}.pmdh-summary__details:hover .pmdh-summary__details-arrow{ transform: translateX(3px); }
.pmdh-summary__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: var(--pmdh-radius);
    background: #eaf4ff;
    color: var(--pmdh-blue);
    font-size: var(--pmdh-icon-size-md);
}
.pmdh-summary__copy { min-width: 0; }
.pmdh-summary__label,
.pmdh-summary__value { display: block; }
.pmdh-summary__label { color: var(--pmdh-muted); font-size: var(--pmdh-font-size-xs); }
.pmdh-summary__value {
    margin-top: .18rem;
    color: var(--pmdh-text);
    font-size: var(--pmdh-font-size-md);
    line-height: var(--pmdh-line-height-snug);
    overflow-wrap: anywhere;
}
.pmdh-summary__value a { color: var(--pmdh-blue-2); text-decoration: none; }
.pmdh-summary__value a:hover { text-decoration: underline; }
.pmdh-summary__muted { color: var(--pmdh-muted); }
.pmdh-rating {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
    max-width: 100%;
    color: inherit !important;
    text-decoration: none !important;
}
.pmdh-rating__stars {
    display: inline-flex;
    align-items: center;
    gap: 0;
    color: #e6a700;
    line-height: 1;
}
.pmdh-rating__star {
    width: 1em;
    overflow: hidden;
    font-size: var(--pmdh-icon-size-md);
}
.pmdh-rating__star--half { opacity: .52; }
.pmdh-rating__star--empty { opacity: .18; }
.pmdh-rating__copy { display: block; line-height: var(--pmdh-line-height-snug); }.pmdh-rating--link:hover .pmdh-rating__copy{ text-decoration: underline; text-underline-offset: 2px; }
.pmdh-summary__address {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    max-width: 100%;
}
.pmdh-summary__address > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}
.pmdh-summary__address .pmdh-icon { font-size: inherit; }
.pmdh-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .32rem;
}
.pmdh-type-chip {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    max-width: 100%;
    padding: .22rem .46rem;
    border: 1px solid #d8e5f1;
    border-radius: var(--pmdh-radius);
    background: #f5f9fd;
    color: #244b70 !important;
    font-size: var(--pmdh-font-size-xs);
    line-height: var(--pmdh-line-height-tight);
    text-decoration: none !important;
}.pmdh-type-chip:hover{ border-color: #9fc5e9; background: #eaf4ff;  }
.pmdh-type-chip__icon { color: var(--pmdh-blue); font-size: var(--pmdh-icon-size-md); }


@media (max-width: 900px) {
    .pmdh-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pmdh-summary__details { grid-column: auto; grid-row: auto; }
}

@media (max-width: 620px) {
    .pmdh-summary { grid-template-columns: 1fr; margin-top: -30px; }
    .pmdh-summary__item { width: 100%; min-height: 72px; }
}
.pmdh-summary--territory .pmdh-summary__item { align-items: flex-start; min-height: 116px; }
.pmdh-summary--territory .pmdh-summary__details { align-items: center; }
.pmdh-summary--territory .pmdh-summary__copy { width: 100%; }
.pmdh-summary__facts { display: grid; gap: .28rem; margin: .42rem 0 0; }
.pmdh-summary__fact {
    display: grid;
    grid-template-columns: minmax(64px, .72fr) minmax(0, 1.28fr);
    gap: .45rem;
    margin: 0;
    padding: .13rem 0;
    border-radius: var(--pmdh-radius);
}
.pmdh-summary__fact dt,
.pmdh-summary__fact dd { min-width: 0; margin: 0; }
.pmdh-summary__fact dt { color: var(--pmdh-muted); font-size: var(--pmdh-font-size-2xs); line-height: var(--pmdh-line-height-snug); }
.pmdh-summary__fact dd { color: var(--pmdh-text); font-size: var(--pmdh-font-size-xs); line-height: var(--pmdh-line-height-snug); overflow-wrap: anywhere; }
.pmdh-summary__fact small { font-size: var(--pmdh-font-size-2xs); }
.pmdh-summary__fact--safe dd { color: var(--pmdh-success); }
.pmdh-summary__fact--warning dd { color: #8a5d00; }
.pmdh-summary__fact--danger dd { color: var(--pmdh-danger); }
.pmdh-summary__inherited { margin-left: .15em; color: var(--pmdh-blue); }
.pmdh-summary__source { display: block; margin-top: .38rem; color: var(--pmdh-muted); font-size: var(--pmdh-font-size-2xs); line-height: var(--pmdh-line-height-snug); }
.pmdh-currency-rates { margin: 0; padding: 0; list-style: none; }
.pmdh-currency-rates li { margin: 0; }

/* Native Popover API drawer. */
html:has(.pmdh-drawer:popover-open) { overflow: hidden; }
.pmdh-drawer[popover] {
    display: none;
    position: fixed;
    z-index: 2147483000;
    inset: 0 0 0 auto;
    width: min(570px, 100%);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
    border: 0;
    border-left: 1px solid var(--pmdh-glass-border);
    background: rgba(6,47,80,.68);
    color: #fff;
    -webkit-backdrop-filter: var(--pmdh-glass-filter);
    backdrop-filter: var(--pmdh-glass-filter);
    box-shadow: inset 1px 0 0 rgba(255,255,255,.14), -10px 0 28px rgba(1,18,32,.10);
    font-family: var(--pmdh-font-family);
    line-height: var(--pmdh-line-height-normal);
}
.pmdh-drawer[popover]:popover-open { display: block; }
.pmdh-drawer::backdrop {
    background: rgba(3,24,39,.28);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.pmdh-drawer__surface {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: hidden;
}
.pmdh-drawer:popover-open .pmdh-drawer__surface { animation: pmdh-drawer-in .22s ease both; }
@keyframes pmdh-drawer-in { from { transform: translateX(35px); opacity: .55; } to { transform: none; opacity: 1; } }
.pmdh-drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    min-height: 94px;
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid var(--pmdh-glass-border);
    background: transparent;
}
.pmdh-drawer__eyebrow { display: block; color: rgba(215,235,255,.78); font-size: var(--pmdh-font-size-xs); font-weight: var(--pmdh-font-weight-bold); letter-spacing: var(--pmdh-letter-spacing-wide); text-transform: uppercase; }
.pmdh-drawer__header h2 { margin: .22rem 0 0; color: #fff; font-size: var(--pmdh-font-size-xl); font-weight: var(--pmdh-font-weight-bold); line-height: var(--pmdh-line-height-tight); }
.pmdh-drawer__body {
    min-width: 0;
    min-height: 0;
    padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.30) transparent;
}
.pmdh-drawer__body::-webkit-scrollbar { width: 8px; height: 8px; }
.pmdh-drawer__body::-webkit-scrollbar-track { background: transparent; }
.pmdh-drawer__body::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(255,255,255,.30);
    background-clip: padding-box;
}
.pmdh-drawer__body--territory { padding: 0 0 calc(1rem + env(safe-area-inset-bottom)); }

.pmdh-passport-card {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    margin: 0;
    padding: .35rem 1rem .8rem;
}
.pmdh-passport-card__link {
    display: block;
    border-radius: 3px;
    cursor: zoom-in;
    line-height: 0;
}
.pmdh-passport-card__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 112px;
    max-height: 158px;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 9px 22px rgba(9, 42, 70, .16);
    transition: transform .16s ease, box-shadow .16s ease;
}
.pmdh-passport-card__link:hover .pmdh-passport-card__image {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(9, 42, 70, .21);
}
html:has(.pmdh-passport-modal[open]) { overflow: hidden; }
.pmdh-passport-modal {
    width: fit-content;
    max-width: calc(100vw - 2rem);
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}
.pmdh-passport-modal:not([open]) { display: none; }
.pmdh-passport-modal::backdrop {
    background: rgba(1, 18, 32, .78);
    backdrop-filter: blur(3px);
}
.pmdh-passport-modal__frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100vw - 2rem);
    max-height: calc(100dvh - 2rem);
}
.pmdh-passport-modal__image {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 2rem);
    max-height: calc(100dvh - 2rem);
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 22px 65px rgba(0,0,0,.42);
}
.pmdh-passport-modal,
.pmdh-passport-modal__frame,
.pmdh-passport-modal__image {
    cursor: zoom-out;
}
.pmdh-drawer__section {
    margin-bottom: .8rem;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--pmdh-radius);
    background: rgba(255,255,255,.065);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.pmdh-drawer__section:last-child { margin-bottom: 0; }
.pmdh-drawer__section h3,
.pmdh-country__group h3,
.pmdh-country__map h3 {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .8rem;
    color: var(--pmdh-navy);
    font-size: var(--pmdh-font-size-md);
    font-weight: var(--pmdh-font-weight-semibold);
}
.pmdh-drawer__section h3 { color: #fff; }
.pmdh-drawer__section h3 .pmdh-icon { color: #d7ebff; }
.pmdh-country__group h3 .pmdh-icon,
.pmdh-country__map h3 .pmdh-icon { color: var(--pmdh-blue); }
.pmdh-drawer__section dl,
.pmdh-country__group dl { margin: 0; }
.pmdh-drawer__row {
    display: grid;
    grid-template-columns: minmax(135px, .8fr) minmax(0, 1.2fr);
    gap: .8rem;
    padding: .72rem 0;
    border-top: 1px solid rgba(255,255,255,.12);
}
.pmdh-drawer__row:first-child { border-top: 0; }
.pmdh-drawer__row dt,
.pmdh-drawer__row dd { margin: 0; min-width: 0; }
.pmdh-drawer__row dt { display: flex; align-items: flex-start; gap: .42rem; color: rgba(255,255,255,.68); font-size: var(--pmdh-font-size-sm); }
.pmdh-drawer__row dt .pmdh-icon { color: #d7ebff; margin-top: .08rem; }
.pmdh-drawer__row dd { color: #fff; font-size: var(--pmdh-font-size-md); overflow-wrap: anywhere; }.pmdh-drawer__row a:not(.pmdh-idlink),
.pmdh-drawer__row a:not(.pmdh-idlink):hover{
    color: #d7ebff !important;
    text-decoration: none !important;
}
.pmdh-drawer__row--identifiers { grid-template-columns: 1fr; }
.pmdh-drawer__row--identifiers dd { margin-top: .25rem; }
.pmdh-drawer__link-list { display: grid; min-width: 0; max-width: 100%; gap: .4rem; }
.pmdh-drawer__link-list > span { display: flex; min-width: 0; max-width: 100%; flex-wrap: wrap; justify-content: space-between; gap: .3rem .6rem; }
.pmdh-distance { color: var(--pmdh-muted); font-size: var(--pmdh-font-size-sm); white-space: normal; overflow-wrap: anywhere; }
.pmdh-drawer .pmdh-distance { color: rgba(255,255,255,.60); }
.pmdh-drawer__empty { padding: 1rem; color: rgba(255,255,255,.68); }
.pmdh-drawer__note { display: block; margin-top: .22rem; color: rgba(255,255,255,.60); font-size: var(--pmdh-font-size-xs); line-height: var(--pmdh-line-height-snug); }

/* Shared territory body used by the place accordion and taxonomy drawer. */
.pmdh-country__body { width: 100%; padding: 0; }
.pmdh-country__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
    gap: 12px;
    width: 100%;
    padding: 12px;
    border-top: 1px solid #dbe6f0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    background: rgba(255,255,255,.94);
    box-shadow: none;
}
.pmdh-drawer__body--territory .pmdh-country__grid { border-top: 0; }
.pmdh-country__group,
.pmdh-country__map { min-width: 0; padding: 1rem; border: 1px solid #e2eaf1; border-radius: var(--pmdh-radius); background: #fff; }
.pmdh-country__row {
    display: grid;
    grid-template-columns: minmax(115px, .92fr) minmax(0, 1.08fr);
    gap: .7rem;
    padding: .55rem 0;
    border-top: 1px solid #edf1f5;
}
.pmdh-country__row:first-child { border-top: 0; }
.pmdh-country__row dt,
.pmdh-country__row dd { margin: 0; min-width: 0; }
.pmdh-country__row dt { display: flex; align-items: flex-start; gap: .4rem; color: var(--pmdh-muted); font-size: var(--pmdh-font-size-sm); }
.pmdh-country__row dt .pmdh-icon { flex: 0 0 auto; color: #6f86a0; margin-top: .1rem; }
.pmdh-country__label-text { min-width: 0; line-height: var(--pmdh-line-height-snug); overflow-wrap: anywhere; }
.pmdh-country__row dd { color: var(--pmdh-text); font-size: var(--pmdh-font-size-md); overflow-wrap: anywhere; }.pmdh-country__row a:not(.pmdh-idlink),
.pmdh-country__row a:not(.pmdh-idlink):hover{
    color: var(--pmdh-blue-2) !important;
    text-decoration: none !important;
}
.pmdh-country__inherited { display: inline; margin-left: .18em; color: var(--pmdh-blue); font-size: var(--pmdh-font-size-2xs); line-height: inherit; vertical-align: baseline; white-space: nowrap; }
.pmdh-country__row--safe,
.pmdh-country__row--warning,
.pmdh-country__row--danger,
.pmdh-country__row--neutral { margin: .18rem -.45rem; padding: .58rem .45rem; border-top-color: transparent; border-radius: var(--pmdh-radius); }
.pmdh-country__row--safe { background: rgba(24,133,91,.065); }
.pmdh-country__row--safe dt .pmdh-icon { color: #16855b; }
.pmdh-country__row--warning { background: rgba(190,128,0,.105); }
.pmdh-country__row--warning dt .pmdh-icon { color: #9c6700; }
.pmdh-country__row--danger { background: rgba(196,62,62,.115); box-shadow: inset 3px 0 0 rgba(196,62,62,.72); }
.pmdh-country__row--danger dt .pmdh-icon { color: var(--pmdh-danger); }
.pmdh-country__row--neutral { background: rgba(100,115,134,.055); }
.pmdh-country__map-frame {
    display: grid;
    place-items: center;
    min-height: 220px;
    padding: .7rem;
    overflow: hidden;
    border-radius: var(--pmdh-radius);
    background: linear-gradient(145deg, #f8fbfd, #eef5fa);
}
.pmdh-country__map-frame > * { max-width: 100%; }
.pmdh-country__map-frame img,
.pmdh-country__map-frame svg { display: block; width: 100% !important; height: auto !important; max-width: 100%; max-height: 260px !important; object-fit: contain; color: #8da9c2; fill: currentColor; }
.pmdh-country__map-frame .geosvg,
.pmdh-country__map-frame [class*="geosvg"] { width: 100% !important; max-width: 100% !important; }
.pmdh-country__note { display: flex; align-items: center; gap: .45rem; margin: 0; padding: .8rem 1.25rem 1.15rem; color: var(--pmdh-muted); font-size: var(--pmdh-font-size-xs); }
.pmdh-country__identifiers { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin: 4px 1.25rem 0; padding: .55rem 0 .35rem; border: 0; border-radius: 0; background: transparent; }
.pmdh-country__identifiers > span:first-child { color: var(--pmdh-muted); font-size: var(--pmdh-font-size-sm); }
.pmdh-idlinks { display: flex; flex-wrap: wrap; gap: .42rem; }
.pmdh-idlink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 37px;
    height: 32px;
    padding: 0 .42rem;
    border: 1px solid #d5e1ec;
    border-radius: var(--pmdh-radius);
    background: #f8fbfd;
    color: #3d5872 !important;
    font-size: var(--pmdh-font-size-2xs);
    font-weight: var(--pmdh-font-weight-bold);
    line-height: 1;
    text-decoration: none !important;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}.pmdh-idlink:hover{ transform: translateY(-1px); border-color: #91bbdf; background: #eaf4ff;  }
.pmdh-idlink--wikidata { color: #426b9b !important; }
.pmdh-idlink--geonames { color: #167d5a !important; }
.pmdh-idlink--unesco { color: #075aa4 !important; }
.pmdh-idlink--osm { color: #61752b !important; }

@media (max-width: 620px) {
    .pmdh-summary--territory .pmdh-summary__item { min-height: 0; }
    .pmdh-summary__fact { grid-template-columns: minmax(72px, .72fr) minmax(0, 1.28fr); }
    .pmdh-drawer__body { padding: .7rem; }
    .pmdh-drawer__body--territory { padding: 0 0 calc(.7rem + env(safe-area-inset-bottom)); }
    .pmdh-passport-card { padding: .25rem .85rem .65rem; }
    .pmdh-passport-card__image { max-width: 92px; max-height: 132px; }
    .pmdh-drawer__row,
    .pmdh-country__row { grid-template-columns: 1fr; gap: .28rem; }
    .pmdh-country__grid { grid-template-columns: 1fr; padding: 8px; }
    .pmdh-country__group,
    .pmdh-country__map { padding: .85rem; }
    .pmdh-country__identifiers { margin: 4px .85rem 0; }
    .pmdh-country__note { padding: .75rem .85rem 1rem; }
}

/* Compact multi-currency values and neutral editorial guide links. */
.pmdh-summary__currency-list {
    display: grid;
    gap: .14rem;
}
.pmdh-summary__currency-item {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}
.pmdh-summary__more {
    display: block;
    width: fit-content;
    margin: .2rem 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--pmdh-muted);
    font: inherit;
    font-size: var(--pmdh-font-size-2xs);
    font-weight: var(--pmdh-font-weight-semibold);
    line-height: var(--pmdh-line-height-snug);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.pmdh-summary__more::after { content: " >"; }.pmdh-summary__fact-link,
.pmdh-summary__fact-link:hover{
    color: inherit !important;
    font: inherit;
    text-decoration: none !important;
}
.pmdh-currency-rates--summary {
    display: grid;
    gap: .14rem;
}
.pmdh-country__value-list {
    display: grid;
    gap: .18rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pmdh-country__value-list li {
    position: relative;
    padding-left: .72rem;
}
.pmdh-country__value-list li::before {
    position: absolute;
    top: .55em;
    left: 0;
    width: .28rem;
    height: .28rem;
    border-radius: 50%;
    background: #91abc2;
    content: "";
}.pmdh-country__value-link,
.pmdh-country__value-link:hover{
    color: var(--pmdh-blue-2) !important;
    font: inherit;
    text-decoration: none !important;
}


/* Shared field hierarchy: labels are emphasized; rendered data remains regular. */
.pmdh-summary__label,
.pmdh-summary__fact dt,
.pmdh-drawer__row dt,
.pmdh-country__row dt,
.pmdh-country__identifiers > span:first-child {
    font-weight: var(--pmdh-font-weight-label);
}

.pmdh-summary__value,
.pmdh-summary__value a,
.pmdh-summary__muted,
.pmdh-summary__fact dd,
.pmdh-summary__fact-link,
.pmdh-summary__inherited,
.pmdh-summary__source,
.pmdh-rating,
.pmdh-type-chip,
.pmdh-drawer__row dd,
.pmdh-drawer__row dd > a:not(.pmdh-idlink),
.pmdh-drawer__note,
.pmdh-copy,
.pmdh-country__row dd,
.pmdh-country__row dd > a,
.pmdh-country__value-link,
.pmdh-country__inherited,
.pmdh-hours__list strong {
    font-weight: var(--pmdh-font-weight-value);
}

.pmdh-summary__value :is(strong, b),
.pmdh-summary__fact dd :is(strong, b),
.pmdh-drawer__row dd :is(strong, b),
.pmdh-country__row dd :is(strong, b) {
    font-weight: inherit;
}


.pmdh-mobile-details-slot { display: none; }

/* Shared hero-summary typography and glass presentation. */
.pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"]) {
    --pmdh-hero-summary-label-size: var(--pmdh-font-size-summary-label);
    --pmdh-hero-summary-value-size: var(--pmdh-font-size-summary-value);
    --pmdh-hero-summary-label-color: #fff;
    --pmdh-hero-summary-value-color: rgba(255,255,255,.66);
}

.pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"])
.pmdh-summary__label,
.pmdh-summary[data-pmdh-section="territory-summary"] .pmdh-summary__fact dt {
    color: var(--pmdh-hero-summary-label-color);
    font-size: var(--pmdh-hero-summary-label-size);
    line-height: var(--pmdh-line-height-tight);
}

.pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"])
.pmdh-summary__value,
.pmdh-summary[data-pmdh-section="territory-summary"]
:is(.pmdh-summary__fact dd, .pmdh-summary__fact-link) {
    color: var(--pmdh-hero-summary-value-color) !important;
    font-size: var(--pmdh-hero-summary-value-size);
    line-height: var(--pmdh-line-height-tight);
}

.pmdh-summary[data-pmdh-section="place-summary"]
:is(.pmdh-summary__value a, .pmdh-summary__address, .pmdh-rating) {
    color: var(--pmdh-hero-summary-value-color) !important;
}

.pmdh-summary[data-pmdh-section="territory-summary"]
.pmdh-summary__item:not(.pmdh-summary__details)
> .pmdh-summary__copy
> .pmdh-summary__label {
    display: none;
}


.pmdh-summary[data-pmdh-section="territory-summary"] .pmdh-summary__fact--safe :is(dd, .pmdh-summary__fact-link) {
    color: #9ee2bb !important;
}

.pmdh-summary[data-pmdh-section="territory-summary"] .pmdh-summary__fact--warning :is(dd, .pmdh-summary__fact-link) {
    color: #ffd37a !important;
}

.pmdh-summary[data-pmdh-section="territory-summary"] .pmdh-summary__fact--danger :is(dd, .pmdh-summary__fact-link) {
    color: #ffaaa7 !important;
}

.pmdh-summary[data-pmdh-section="territory-summary"]
:is(.pmdh-summary__fact small, .pmdh-summary__source, .pmdh-summary__more) {
    font-size: var(--pmdh-font-size-2xs);
    line-height: var(--pmdh-line-height-tight);
}

.pmdh-summary[data-pmdh-section="territory-summary"] .pmdh-summary__inherited {
    color: #d7ebff;
}

/* Place-type values stay readable but never exceed two visual rows in the hero strip. */
.pmdh-summary[data-pmdh-section="place-summary"] [data-pmdh-field="secondary-place-types"] .pmdh-summary__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pmdh-summary[data-pmdh-section="place-summary"] [data-pmdh-field="secondary-place-types"] .pmdh-type-chips {
    --pmdh-type-chip-row-height: 20px;
    display: flex;
    align-content: flex-start;
    gap: 4px;
    max-height: calc((2 * var(--pmdh-type-chip-row-height)) + 4px);
    overflow: hidden;
}

.pmdh-summary[data-pmdh-section="place-summary"] .pmdh-type-chip {
    box-sizing: border-box;
    min-width: 0;
    height: var(--pmdh-type-chip-row-height, 20px);
    max-width: 100%;
    padding: 0 .38rem;
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.09);
    color: var(--pmdh-hero-summary-value-color) !important;
    font-size: var(--pmdh-hero-summary-value-size);
    line-height: 1;
    white-space: nowrap;
}

.pmdh-summary[data-pmdh-section="place-summary"] .pmdh-type-chip > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pmdh-summary[data-pmdh-section="place-summary"] .pmdh-type-chip:hover {
    border-color: rgba(255,255,255,.32);
    background: rgba(255,255,255,.15);
}

.pmdh-summary[data-pmdh-section="place-summary"] .pmdh-type-chip__icon {
    flex: 0 0 auto;
    color: #d7ebff;
    font-size: var(--pmdh-icon-size-sm);
}

@media (min-width: 621px) {
    .pmdh--taxonomy .pmdh__hero {
        min-height: clamp(650px, 72vh, 910px);
    }

    .pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"]) {
        --pmdh-summary-strip-height: 84px;
        position: relative;
        isolation: isolate;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0;
        width: 100%;
        height: var(--pmdh-summary-strip-height);
        min-height: var(--pmdh-summary-strip-height);
        margin: calc(-1 * var(--pmdh-summary-strip-height)) 0 0;
        overflow: hidden;
        border: 0;
        border-top: 1px solid rgba(255,255,255,.16);
        border-bottom: 1px solid rgba(1,18,32,.24);
        border-radius: 0;
        background: transparent;
        -webkit-backdrop-filter: var(--pmdh-glass-filter);
        backdrop-filter: var(--pmdh-glass-filter);
        box-shadow: 0 -8px 28px rgba(1,18,32,.10);
    }

    .pmdh-summary[data-pmdh-section="territory-summary"] {
        --pmdh-summary-strip-height: 118px;
    }

    .pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"])::before {
        position: absolute;
        z-index: 0;
        inset: 0;
        pointer-events: none;
        background:
            linear-gradient(to right, transparent calc(25% - .5px), rgba(255,255,255,.16) calc(25% - .5px), rgba(255,255,255,.16) calc(25% + .5px), transparent calc(25% + .5px)),
            linear-gradient(to right, transparent calc(50% - .5px), rgba(255,255,255,.16) calc(50% - .5px), rgba(255,255,255,.16) calc(50% + .5px), transparent calc(50% + .5px)),
            linear-gradient(to right, transparent calc(75% - .5px), rgba(255,255,255,.16) calc(75% - .5px), rgba(255,255,255,.16) calc(75% + .5px), transparent calc(75% + .5px));
        content: "";
    }

    .pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"]) .pmdh-summary__item {
        position: relative;
        z-index: 1;
        width: auto;
        max-width: none;
        height: 100%;
        min-height: 0;
        padding: .72rem clamp(.78rem, 1.25vw, 1.3rem);
        gap: .78rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #fff;
        box-shadow: none;
    }

    .pmdh-summary[data-pmdh-section="territory-summary"] .pmdh-summary__item {
        align-items: center;
        padding-block: .58rem;
        overflow: hidden;
    }

    .pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"]) .pmdh-summary__details {
        grid-column: 4;
        color: #fff;
        transition: background-color .18s ease;
    }

    .pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"]) .pmdh-summary__details:hover {
        border: 0;
        background: rgba(255,255,255,.075);
        color: #fff;
        box-shadow: none;

        transform: none;
    }

    .pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"]) .pmdh-summary__icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: var(--pmdh-radius);
        background: rgba(255,255,255,.12);
        color: #fff;
        font-size: var(--pmdh-icon-size-md);
    }


    .pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"])
    :is(.pmdh-summary__muted, .pmdh-summary__more, .pmdh-summary__source) {
        color: rgba(255,255,255,.68);
    }

    .pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"]) .pmdh-summary__details-arrow {
        color: rgba(255,255,255,.90);
    }


    .pmdh-summary[data-pmdh-section="territory-summary"] :is(.pmdh-summary__copy, .pmdh-summary__facts) {
        min-width: 0;
    }

    .pmdh-summary[data-pmdh-section="territory-summary"] .pmdh-summary__facts {
        gap: .1rem;
        margin: 0;
    }

    .pmdh-summary[data-pmdh-section="territory-summary"] .pmdh-summary__fact {
        grid-template-columns: minmax(62px, .68fr) minmax(0, 1.32fr);
        align-items: start;
        gap: .45rem;
        padding: 0;
    }

    .pmdh-summary[data-pmdh-section="territory-summary"] :is(.pmdh-summary__currency-list, .pmdh-currency-rates--summary) {
        gap: 0;
    }

    .pmdh-summary[data-pmdh-section="territory-summary"] :is(.pmdh-summary__currency-item, .pmdh-currency-rates--summary li) {
        line-height: var(--pmdh-line-height-tight);
    }

    .pmdh-summary[data-pmdh-section="territory-summary"] .pmdh-summary__more {
        margin-top: .05rem;
        color: rgba(255,255,255,.50);
        font-weight: var(--pmdh-font-weight-medium);
    }
}

@media (min-width: 621px) and (max-width: 900px) {
    .pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"]) .pmdh-summary__item {
        padding-inline: .62rem;
        gap: .55rem;
    }

    .pmdh-summary:is([data-pmdh-section="place-summary"], [data-pmdh-section="territory-summary"]) .pmdh-summary__icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: var(--pmdh-radius);
        font-size: var(--pmdh-icon-size-md);
    }


    .pmdh-summary[data-pmdh-section="territory-summary"] {
        --pmdh-summary-strip-height: 138px;
    }

    .pmdh-summary[data-pmdh-section="territory-summary"] .pmdh-summary__fact {
        grid-template-columns: minmax(50px, .62fr) minmax(0, 1.38fr);
        gap: .3rem;
    }
}

/* The mobile second hero screen uses the same glass treatment for place and taxonomy summaries. */
@media (max-width: 620px) {
    .pmdh-mobile-details-slot {
        display: block;
        width: 100%;
    }

    .pmdh-mobile-details-slot .pmdh-summary {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        width: 100%;
        margin: 28px 0 0;
        overflow: hidden;
        border: 1px solid rgba(255,255,255,.16);
        border-radius: 0;
        background: transparent;
        -webkit-backdrop-filter: var(--pmdh-glass-filter);
        backdrop-filter: var(--pmdh-glass-filter);
        box-shadow: none;
    }

    .pmdh-mobile-details-slot .pmdh-summary__item {
        position: relative;
        width: 100%;
        max-width: 100%;
        min-height: 0;
        padding: .8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #fff;
        box-shadow: inset -1px -1px 0 rgba(255,255,255,.14);
    }

    .pmdh-mobile-details-slot .pmdh-summary__details {
        grid-column: auto;
        background: transparent;
        color: #fff;
        box-shadow: inset -1px -1px 0 rgba(255,255,255,.14);
    }

    .pmdh-mobile-details-slot .pmdh-summary__details:hover {
        border: 0;
        background: rgba(255,255,255,.075);
        color: #fff;
        box-shadow: inset -1px -1px 0 rgba(255,255,255,.14);
        transform: none;
    }

    .pmdh-mobile-details-slot .pmdh-summary__icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: var(--pmdh-radius);
        background: rgba(255,255,255,.12);
        color: #fff;
    }

    .pmdh-mobile-details-slot .pmdh-summary__copy {
        width: 100%;
    }

    .pmdh-mobile-details-slot .pmdh-summary__details-arrow {
        position: absolute;
        top: .85rem;
        right: .75rem;
        margin-left: 0;
        color: rgba(255,255,255,.90);
    }

    .pmdh-mobile-details-slot .pmdh-summary[data-pmdh-section="territory-summary"] .pmdh-summary__fact {
        grid-template-columns: 1fr;
        gap: .08rem;
    }
}

/* Weather replaces the secondary place-type slot when climate data is available. */
.pmdh-summary__weather {
    appearance: none;
    width: 100%;
    color: var(--pmdh-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.pmdh-summary__weather-value {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.pmdh-summary__weather-day-length {
    display: block;
    margin-top: .16rem;
    color: rgba(255,255,255,.66);
    font-size: var(--pmdh-font-size-2xs);
    line-height: var(--pmdh-line-height-tight);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.pmdh-summary__weather .pmdh-summary__details-arrow {
    opacity: .78;
}

@media (min-width: 621px) {
    .pmdh-summary[data-pmdh-section="place-summary"] .pmdh-summary__weather:hover {
        border: 0;
        background: rgba(255,255,255,.075);
        color: #fff;
        box-shadow: none;

        transform: none;
    }
    .pmdh-summary[data-pmdh-section="place-summary"] .pmdh-summary__weather:hover .pmdh-summary__details-arrow {
        transform: translateX(3px);
    }
}

@media (max-width: 620px) {
    .pmdh-mobile-details-slot .pmdh-summary__weather:hover {
        border: 0;
        background: rgba(255,255,255,.075);
        color: #fff;
        box-shadow: inset -1px -1px 0 rgba(255,255,255,.14);

        transform: none;
    }
}

/* Territory content only when it lives inside the side drawer.
   The attached place-detail country/region accordion intentionally keeps its existing light surface. */
.pmdh-drawer .pmdh-country__grid {
    border-top-color: rgba(255,255,255,.12);
    background: transparent;
}
.pmdh-drawer .pmdh-country__group,
.pmdh-drawer .pmdh-country__map {
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.065);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.pmdh-drawer .pmdh-country__group h3,
.pmdh-drawer .pmdh-country__map h3 { color: #fff; }
.pmdh-drawer .pmdh-country__group h3 .pmdh-icon,
.pmdh-drawer .pmdh-country__map h3 .pmdh-icon { color: #d7ebff; }
.pmdh-drawer .pmdh-country__row { border-top-color: rgba(255,255,255,.12); }
.pmdh-drawer .pmdh-country__row dt { color: rgba(255,255,255,.68); }
.pmdh-drawer .pmdh-country__row dt .pmdh-icon { color: #d7ebff; }
.pmdh-drawer .pmdh-country__row dd { color: #fff; }.pmdh-drawer .pmdh-country__row a:not(.pmdh-idlink),
.pmdh-drawer .pmdh-country__row a:not(.pmdh-idlink):hover,
.pmdh-drawer .pmdh-country__value-link,
.pmdh-drawer .pmdh-country__value-link:hover{ color: #d7ebff !important; }
.pmdh-drawer .pmdh-country__inherited { color: #b8dcff; }
.pmdh-drawer .pmdh-country__map-frame {
    background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
}
.pmdh-drawer .pmdh-country__map-frame img,
.pmdh-drawer .pmdh-country__map-frame svg { color: rgba(215,235,255,.68); fill: currentColor; }
.pmdh-drawer .pmdh-country__note,
.pmdh-drawer .pmdh-country__identifiers > span:first-child { color: rgba(255,255,255,.60); }
.pmdh-drawer .pmdh-idlink {
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color: #d7ebff !important;
}.pmdh-drawer .pmdh-idlink:hover{
    border-color: rgba(255,255,255,.46);
    background: rgba(255,255,255,.15);
}
