/* DOF Map – frontend
 * Every colour/size is a CSS custom property set per map from its settings.
 * Themes can override any --wmb-* variable, e.g.  .wmb { --wmb-accent: #c00; }
 */

.wmb {
    --wmb-bg: transparent;
    --wmb-land: #ddd;
    --wmb-border: #fff;
    --wmb-border-width: 0.6px;
    --wmb-dim: 0.3;
    --wmb-font: inherit;
    --wmb-text: inherit;
    --wmb-panel-bg: #fff;
    --wmb-panel-text: #222;
    --wmb-panel-width: 460px;
    --wmb-accent: #1a73e8;
    --wmb-radius: 6px;
    --wmb-tooltip-bg: #111;
    --wmb-tooltip-text: #fff;
    --wmb-marker: #fff;
    --wmb-control-bg: #1a73e8;
    --wmb-control-text: #fff;
    --wmb-dropdown-radius: 4px;
    --wmb-dropdown-list-radius: 4px;
    --wmb-panel-dur: 320ms;
    --wmb-ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --wmb-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    position: relative;
    box-sizing: border-box;
    background: var(--wmb-bg);
    font-family: var(--wmb-font);
    color: var(--wmb-text);
    line-height: 1.5;
}
.wmb *,
.wmb *::before,
.wmb *::after {
    box-sizing: inherit;
}

/* ---------- stage & svg ---------- */

/* Positioning context for the overlays (panel, dropdown, legend), so the details section below doesn't move them. */
.wmb-main {
    position: relative;
}

.wmb-stage {
    position: relative;
    width: 100%;
    aspect-ratio: var(--wmb-aspect, 2);
    height: var(--wmb-height, auto);
    overflow: hidden;
}
.wmb-svg,
.wmb-svg > svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.wmb-svg > svg {
    overflow: hidden;
}
/* Clicking the map can focus the <svg> itself; don't let theme focus styles outline the whole map. */
.wmb-svg > svg:focus {
    outline: none;
}

.wmb path {
    fill: var(--wmb-fill, var(--wmb-land));
    stroke: var(--wmb-border);
    stroke-width: var(--wmb-border-width);
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    transform-box: fill-box;
    transform-origin: center;
    transition:
        fill 0.15s ease,
        opacity 0.45s ease,
        transform 0.3s var(--wmb-ease-spring),
        filter 0.3s ease;
}
.wmb path.is-removed {
    display: none;
}
.wmb path.is-inactive {
    --wmb-fill: var(--wmb-land);
    pointer-events: none;
}
.wmb path.is-clickable {
    cursor: pointer;
}
.wmb path.is-clickable:focus {
    outline: none;
}
.wmb path.is-clickable:focus-visible {
    stroke: var(--wmb-accent);
    stroke-width: 2px;
}

/* Hover / selected */
.wmb:not(.wmb--hover-none) path.is-clickable.is-hover,
.wmb path.is-selected {
    fill: var(--wmb-fill-hover, var(--wmb-fill, var(--wmb-land)));
}
.wmb:not(.wmb--hover-none) path.is-clickable.is-hover:not([class*="wmb-g-"]) {
    filter: brightness(1.12);
}

/* Click "pop": the country lifts off the map before the zoom starts. */
.wmb path.is-popped {
    transform: scale(1.04);
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}
.wmb.is-zoomed path.is-selected {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

/* Dim everything else while zoomed, or while hovering a legend entry. */
.wmb--dim-others.is-zoomed path:not(.is-selected),
.wmb[data-legend-hover] path:not(.is-legend-hover) {
    opacity: var(--wmb-dim);
}

/* ---------- loading ---------- */

.wmb-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    opacity: 0.35;
    animation: wmb-spin 0.8s linear infinite;
}

/* ---------- tooltip ---------- */

.wmb-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    padding: 6px 10px;
    border-radius: 4px;
    background: var(--wmb-tooltip-bg);
    color: var(--wmb-tooltip-text);
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    animation: wmb-fade-in 0.12s ease both;
}
.wmb-tooltip[hidden] {
    display: none;
}
.wmb-tooltip__muted {
    opacity: 0.65;
    font-size: 12px;
}

/* ---------- markers (HTML layer over the svg, constant size at any zoom) ---------- */

.wmb-markers {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}
.wmb-marker {
    position: absolute;
    width: 0;
    height: 0;
    color: var(--wmb-marker);
    text-decoration: none;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.wmb-markers.is-visible .wmb-marker {
    opacity: 1;
}
.wmb-marker__dot {
    position: absolute;
    left: -7px;
    top: -7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--wmb-marker);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
/* Label position around the dot: per marker (wmb-marker--{pos}); default top. --wmb-tx/--wmb-ty centre it on its axis. */
.wmb-marker__label {
    --wmb-tx: -50%;
    --wmb-ty: 0px;
    position: absolute;
    bottom: 12px;
    left: 0;
    transform: translate(var(--wmb-tx), var(--wmb-ty));
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    transition: opacity 0.15s ease;
}
.wmb-marker--bottom .wmb-marker__label {
    bottom: auto;
    top: 12px;
}
.wmb-marker--right .wmb-marker__label,
.wmb-marker--left .wmb-marker__label {
    bottom: auto;
    top: 0;
    --wmb-tx: 0px;
    --wmb-ty: -50%;
}
.wmb-marker--right .wmb-marker__label {
    left: 12px;
}
.wmb-marker--left .wmb-marker__label {
    left: auto;
    right: 12px;
}
.wmb-marker--top-right .wmb-marker__label,
.wmb-marker--top-left .wmb-marker__label {
    bottom: 6px;
    --wmb-tx: 0px;
}
.wmb-marker--bottom-right .wmb-marker__label,
.wmb-marker--bottom-left .wmb-marker__label {
    bottom: auto;
    top: 6px;
    --wmb-tx: 0px;
}
.wmb-marker--top-right .wmb-marker__label,
.wmb-marker--bottom-right .wmb-marker__label {
    left: 8px;
}
.wmb-marker--top-left .wmb-marker__label,
.wmb-marker--bottom-left .wmb-marker__label {
    left: auto;
    right: 8px;
}

/* "Show only on hover": label hidden until the dot is hovered or focused; it then sits above other markers. */
.wmb-marker.is-label-hover .wmb-marker__label {
    opacity: 0;
    pointer-events: none;
}
.wmb-marker.is-label-hover:hover,
.wmb-marker.is-label-hover:focus-visible {
    z-index: 1;
}
.wmb-marker.is-label-hover:hover .wmb-marker__label,
.wmb-marker.is-label-hover:focus-visible .wmb-marker__label {
    opacity: 1;
}
a.wmb-marker:hover .wmb-marker__label {
    text-decoration: underline;
}
.wmb-markers.is-animated.is-visible .wmb-marker__dot {
    animation: wmb-pin-drop 0.5s var(--wmb-ease-spring) var(--wmb-delay, 0ms) both;
}
.wmb-markers.is-animated.is-visible .wmb-marker__label {
    animation: wmb-label-in 0.35s var(--wmb-ease-out) calc(var(--wmb-delay, 0ms) + 150ms) both;
}

/* ---------- reset (back) button, shown while zoomed ---------- */

.wmb-reset {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--wmb-control-bg);
    color: var(--wmb-control-text);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.3s var(--wmb-ease-spring);
}
.wmb-reset::before,
.wmb-reset::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    margin: -1px 0 0 -7px;
    background: currentColor;
    transform: rotate(45deg);
}
.wmb-reset::after {
    transform: rotate(-45deg);
}
.wmb.is-zoomed .wmb-reset {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.wmb--narrow .wmb-reset,
.wmb.has-panel .wmb-reset {
    display: none;
}

/* ---------- info panel ---------- */

.wmb-panel {
    position: absolute;
    top: 24px;
    z-index: 5;
    width: var(--wmb-panel-width);
    max-width: calc(100% - 48px);
    /* --wmb-panel-height (setting) fixes the height; it never exceeds the map. Unset = fit content. */
    height: var(--wmb-panel-height, auto);
    max-height: min(var(--wmb-panel-height, calc(100% - 250px)), calc(100% - 48px));
    overflow: auto;
    padding: 34px 30px 30px;
    border-radius: var(--wmb-radius);
    background: var(--wmb-panel-bg);
    color: var(--wmb-panel-text);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity var(--wmb-panel-dur) var(--wmb-ease-out),
        transform var(--wmb-panel-dur) var(--wmb-ease-out),
        visibility 0s linear var(--wmb-panel-dur);
}
/* Thin, subtle scrollbar (the panel scrolls when its content is taller than the map). */
.wmb-panel {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, currentColor 25%, transparent) transparent;
}
.wmb-panel::-webkit-scrollbar {
    width: 6px;
}
.wmb-panel::-webkit-scrollbar-track {
    background: transparent;
    margin: 10px 0;
}
.wmb-panel::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background: color-mix(in srgb, currentColor 25%, transparent);
}
.wmb-panel::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, currentColor 45%, transparent);
}
.wmb-panel[hidden] {
    display: none;
}
.wmb-panel:focus {
    outline: none;
}
.wmb--panel-left .wmb-panel {
    left: 24px;
    transform-origin: top left;
}
.wmb--panel-right .wmb-panel {
    right: 24px;
    transform-origin: top right;
}

/* Start positions per animation style */
.wmb--anim-slide.wmb--panel-left .wmb-panel {
    transform: translateX(-24px) scale(0.98);
}
.wmb--anim-slide.wmb--panel-right .wmb-panel {
    transform: translateX(24px) scale(0.98);
}
.wmb--anim-scale .wmb-panel {
    transform: scale(0.92);
}
.wmb--anim-none .wmb-panel {
    transition: none;
}

.wmb-panel[data-state="open"] {
    opacity: 1;
    visibility: visible;
    transform: none !important;
    transition-delay: 0s;
}
.wmb-panel[data-state="closing"] {
    transition-duration: calc(var(--wmb-panel-dur) * 0.6);
}

/* Content reveals one block after another */
.wmb-panel.is-revealing .wmb-panel__body > * {
    animation: wmb-fade-up calc(var(--wmb-panel-dur) * 1.1) var(--wmb-ease-out) both;
    animation-delay: calc(60ms + var(--wmb-i, 0) * 45ms);
}
.wmb--anim-none .wmb-panel.is-revealing .wmb-panel__body > * {
    animation: none;
}

/* Switching country while open: quick cross-fade of the content */
.wmb-panel__body {
    transition: opacity 0.14s ease;
}
.wmb-panel.is-swapping .wmb-panel__body {
    opacity: 0;
}

.wmb-panel__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent !important;
    /* Default: the surrounding text colour, faded. Settings: closeColor / closeHoverColor / closeHoverBg. */
    color: var(--wmb-close, color-mix(in srgb, currentColor 50%, transparent)) !important;
    cursor: pointer;
    transition:
        color 0.15s ease,
        transform 0.25s var(--wmb-ease-spring),
        background 0.15s ease;
}
.wmb-panel__close:hover,
.wmb-panel__close:focus-visible {
    color: var(--wmb-close-hover, var(--wmb-close, currentColor));
    transform: rotate(90deg);
    background: var(--wmb-close-hover-bg, rgba(127, 127, 127, 0.12)) !important;
}
.wmb-panel__close::before,
.wmb-panel__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 1.5px;
    margin: -0.75px 0 0 -10px;
    background: currentColor !important;
    transform: rotate(45deg);
}
.wmb-panel__close::after {
    transform: rotate(-45deg);
}

.wmb-panel__logo {
    margin-bottom: 20px;
}
.wmb-panel__logo img {
    display: block;
    max-width: 180px;
    max-height: 70px;
    width: auto;
    height: auto;
}
.wmb-panel__title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 40px 16px 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    color: inherit;
}
/* Extra sections (e.g. a second organisation in the same country). */
.wmb-panel__title--section {
    margin-top: 40px;
}
.wmb-panel__logo--section {
    margin-top: 30px;
}
.wmb-panel__logo--section + .wmb-panel__title--section {
    margin-top: 0;
}
.wmb-panel__flag {
    width: 45px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.wmb-panel__text {
    font-size: 14px;
    text-align: justify;
}
.wmb-panel__text > :first-child {
    margin-top: 0;
}
.wmb-panel__text > :last-child {
    margin-bottom: 0;
}
.wmb-panel a {
    color: var(--wmb-accent);
}
/* Plain two-column table. Theme table styles (borders, stripes, backgrounds) are reset. */
.wmb-panel .wmb-panel__rows {
    width: 100%;
    margin: 4px 0 0;
    border: 0;
    border-collapse: collapse;
    background: transparent;
    font-size: 15px;
    line-height: 1.45;
    table-layout: auto;
}
.wmb-panel .wmb-panel__rows tr,
.wmb-panel .wmb-panel__rows th,
.wmb-panel .wmb-panel__rows td {
    border: 0;
    background: transparent;
}
.wmb-panel .wmb-panel__rows th,
.wmb-panel .wmb-panel__rows td {
    padding: 10px 16px 10px 0;
    color: inherit;
    font-size: inherit;
    text-align: left;
    vertical-align: top;
    word-break: normal;
    overflow-wrap: break-word; /* Only very long words (URLs) wrap. */
}
.wmb-panel .wmb-panel__rows th {
    font-weight: 400;
}
/* Label column: about a third of the width, never split mid-word. */
.wmb-panel .wmb-panel__rows th:first-child,
.wmb-panel .wmb-panel__rows td:first-child {
    width: 35%;
    overflow-wrap: normal;
    hyphens: none;
}
.wmb-panel .wmb-panel__rows td:last-child,
.wmb-panel .wmb-panel__rows th:last-child {
    padding-right: 0;
}
.wmb-panel .wmb-panel__rows a {
    color: var(--wmb-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.wmb-panel .wmb-panel__rows a:hover {
    text-decoration-thickness: 2px;
}
.wmb-panel__link {
    margin: 20px 0 0;
}
.wmb-button {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 4px;
    background: var(--wmb-accent);
    color: #fff !important;
    font-size: 13px;
    text-decoration: none;
    transition: filter 0.15s ease;
}
.wmb-button:hover {
    filter: brightness(1.1);
}

/* ---------- dropdown ---------- */

.wmb-dropdown {
    position: absolute;
    top: 24px;
    z-index: 4;
    width: 225px;
    max-height: calc(100% - 48px);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wmb-dropdown.wmb-pos-top-right {
    right: 24px;
}
.wmb-dropdown.wmb-pos-top-left {
    left: 24px;
}
.wmb-dropdown__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-radius: var(--wmb-dropdown-radius);
    background: var(--wmb-control-bg) !important;
    color: var(--wmb-control-text) !important;
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.wmb-caret {
    width: 0;
    height: 0;
    border: 4px solid transparent;
    border-top-color: currentColor;
    border-bottom: 0;
    transition: transform 0.25s var(--wmb-ease-out);
}
.wmb-dropdown[data-open="true"] .wmb-caret {
    transform: rotate(180deg);
}
.wmb-dropdown__list {
    margin: 0 !important;
    padding: 10px 8px;
    max-height: 400px;
    list-style: none;
    overflow: auto;
    border-radius: var(--wmb-dropdown-list-radius);
    background: var(--wmb-control-bg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
/* Scrollbar: thin, no arrows, in the dropdown text colour, inset from the rounded corners. */
.wmb-dropdown__list::-webkit-scrollbar {
    width: 10px;
}
.wmb-dropdown__list::-webkit-scrollbar-track {
    margin: 8px 0;
    background: transparent;
}
.wmb-dropdown__list::-webkit-scrollbar-thumb {
    /* The transparent border leaves a 4px visible thumb with space around it. */
    border: 3px solid transparent;
    border-radius: 10px;
    background: color-mix(in srgb, var(--wmb-control-text) 35%, transparent) padding-box;
}
.wmb-dropdown__list::-webkit-scrollbar-thumb:hover {
    background-color: color-mix(in srgb, var(--wmb-control-text) 60%, transparent);
}
.wmb-dropdown__list::-webkit-scrollbar-button {
    display: none;
}
/* Firefox (no ::-webkit-scrollbar). Kept out of Chrome, where it would override the rules above. */
@supports not selector(::-webkit-scrollbar) {
    .wmb-dropdown__list {
        scrollbar-width: thin;
        scrollbar-color: color-mix(in srgb, var(--wmb-control-text) 35%, transparent) transparent;
    }
}
.wmb-dropdown[data-open="false"] .wmb-dropdown__list {
    display: none;
}
.wmb-dropdown[data-open="true"] .wmb-dropdown__list {
    animation: wmb-list-in 0.22s var(--wmb-ease-out) both;
}
.wmb-dropdown__list li {
    margin: 0;
    padding: 0;
}
.wmb-dropdown__list button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    margin: 1px 0;
    padding: 7px 10px;
    border: 0;
    /* Inset highlight: the list padding keeps the hover background away from the edges. */
    border-radius: 4px;
    background: transparent;
    color: var(--wmb-control-text);
    font: inherit;
    font-size: 14px;
    text-align: left;
    opacity: 0.8;
    cursor: pointer;
    transition:
        opacity 0.12s ease,
        background 0.12s ease,
        padding 0.2s var(--wmb-ease-out);
}
.wmb-dropdown__list button:hover,
.wmb-dropdown__list button:focus-visible {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    padding-left: 14px;
    outline: none;
}
.wmb-dropdown__search {
    padding: 0 0 8px !important;
}
.wmb-dropdown__search input {
    width: 100%;
    margin: 0;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--wmb-control-text);
    font: inherit;
    font-size: 14px;
}
.wmb-dropdown__search input::placeholder {
    color: var(--wmb-control-text);
    opacity: 0.6;
}
.wmb-dropdown__search input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
}
.wmb-dropdown__list li[hidden] {
    display: none;
}

/* ---------- details below the map (accordion) ---------- */

.wmb-details {
    position: relative;
    margin-top: 24px;
    padding: 24px 0 8px;
    border-top: 1px solid rgba(127, 127, 127, 0.25);
    scroll-margin-top: var(--wmb-scroll-offset, 100px);
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.3s var(--wmb-ease-out),
        transform 0.3s var(--wmb-ease-out);
}
.wmb-details[hidden] {
    display: none;
}
.wmb-details[data-state="open"] {
    opacity: 1;
    transform: none;
}
.wmb-details[data-state="closing"] {
    transition-duration: 0.2s;
}
.wmb-details__body {
    transition: opacity 0.16s ease;
}
.wmb-details.is-swapping .wmb-details__body {
    opacity: 0;
}
.wmb-details.is-revealing .wmb-details__body > * {
    animation: wmb-fade-up 0.4s var(--wmb-ease-out) both;
    animation-delay: calc(var(--wmb-i, 0) * 50ms);
}
.wmb-details__close {
    position: absolute;
    top: 24px;
    right: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    /* Default: the surrounding text colour, faded. Settings: closeColor / closeHoverColor / closeHoverBg. */
    color: var(--wmb-close, color-mix(in srgb, currentColor 55%, transparent));
    cursor: pointer;
    transition:
        color 0.15s ease,
        transform 0.25s var(--wmb-ease-spring),
        background 0.15s ease;
}
.wmb-details__close:hover,
.wmb-details__close:focus-visible {
    color: var(--wmb-close-hover, var(--wmb-close, currentColor));
    transform: rotate(90deg);
    background: var(--wmb-close-hover-bg, rgba(127, 127, 127, 0.12));
}
.wmb-details__close::before,
.wmb-details__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 1.5px;
    margin: -0.75px 0 0 -10px;
    background: currentColor;
    transform: rotate(45deg);
}
.wmb-details__close::after {
    transform: rotate(-45deg);
}
.wmb-details__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 48px 16px 0;
}
.wmb-details__flag {
    width: 40px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.wmb-details__title {
    margin: 0;
    font-size: 30px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--wmb-accent);
}
.wmb-details__intro {
    margin: 0 0 20px;
}

/* Accordion: height animates with the grid-rows trick (0fr -> 1fr), no JS measuring. */
.wmb-accordion {
    border-top: 1px solid rgba(127, 127, 127, 0.25);
}
.wmb-acc {
    border-bottom: 1px solid rgba(127, 127, 127, 0.25);
}
.wmb-acc__heading {
    margin: 0;
    font-size: inherit;
}
.wmb-acc__toggle {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 16px 12px;
    border: 0;
    border-radius: 0;
    /* Settings: accTitleBg / accTitleText / accTitleHoverBg / accTitleHoverText. */
    background: var(--wmb-acc-bg, transparent);
    color: var(--wmb-acc-text, inherit);
    font: inherit;
    font-size: 18px;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition:
        color 0.15s ease,
        background 0.15s ease;
}
.wmb-acc__toggle:hover,
.wmb-acc__toggle:focus-visible {
    background: var(--wmb-acc-hover-bg, var(--wmb-acc-bg, transparent));
    color: var(--wmb-acc-hover-text, var(--wmb-accent));
    outline: none;
}
.wmb-acc__toggle:focus-visible .wmb-acc__title {
    text-decoration: underline;
}
.wmb-acc__icon {
    position: relative;
    flex: none;
    width: 14px;
    height: 14px;
    top: 1px;
}
.wmb-acc__icon::before,
.wmb-acc__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 14px;
    height: 2px;
    margin-top: -1px;
    background: currentColor;
    transition: transform 0.3s var(--wmb-ease-out);
}
.wmb-acc__icon::after {
    transform: rotate(90deg);
}
.wmb-acc.is-open .wmb-acc__icon::after {
    transform: rotate(0deg);
}
.wmb-acc__tag {
    flex: none;
    opacity: 0.7;
    font-size: 0.85em;
}
.wmb-acc__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s var(--wmb-ease-out);
}
.wmb-acc.is-open .wmb-acc__panel {
    grid-template-rows: 1fr;
}
.wmb-acc__inner {
    min-height: 0;
    overflow: hidden;
    padding: 0 8px 0 32px;
    opacity: 0;
    transition:
        opacity 0.25s ease,
        padding 0.35s var(--wmb-ease-out);
}
.wmb-acc.is-open .wmb-acc__inner {
    padding-block: 24px;
    opacity: 1;
}
.wmb-acc__inner > :first-child {
    margin-top: 0;
}
.wmb-acc__inner a:not(.wmb-button) {
    color: var(--wmb-accent);
}
.wmb-acc__link {
    margin: 16px 0 0;
}
.wmb-dropdown__list button[aria-pressed="true"] {
    opacity: 1;
    font-weight: 600;
}
.wmb-dropdown__list img {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

/* ---------- legend ---------- */

.wmb-legend {
    position: absolute;
    z-index: 3;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}
.wmb-legend.wmb-pos-bottom-right {
    right: 24px;
    bottom: 16px;
}
.wmb-legend.wmb-pos-bottom-left {
    left: 24px;
    bottom: 16px;
}
.wmb-legend.wmb-pos-top-right {
    right: 24px;
    top: 16px;
}
.wmb-legend.wmb-pos-top-left {
    left: 24px;
    top: 16px;
}
.wmb-legend li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    cursor: default;
}
.wmb-legend__dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    flex: none;
    transition: transform 0.2s var(--wmb-ease-spring);
}
.wmb-legend li:hover .wmb-legend__dot {
    transform: scale(1.3);
}

/* ---------- narrow layout (below the configured breakpoint) ---------- */

.wmb--narrow .wmb-main {
    display: flex;
    flex-direction: column;
}
.wmb--narrow .wmb-dropdown {
    position: relative;
    inset: auto;
    order: -1;
    width: auto;
    max-height: 50vh;
    margin: 0 16px 12px;
}
.wmb--narrow .wmb-panel {
    position: relative;
    inset: auto;
    order: 2;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    margin-top: 12px;
}
.wmb--narrow.wmb--anim-slide .wmb-panel {
    transform: translateY(16px);
}
.wmb--narrow .wmb-legend {
    position: relative;
    inset: auto;
    order: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
    margin-top: 12px;
}

/* ---------- admin editor states ---------- */

.wmb path.is-hidden-edit {
    opacity: 0.25;
}
.wmb path.is-edit-selected {
    stroke: var(--wmb-accent);
    stroke-width: 2.5px;
    fill: var(--wmb-fill-hover, var(--wmb-fill, var(--wmb-land)));
}
.wmb.is-placing svg {
    cursor: crosshair;
}
.wmb.is-placing svg path {
    cursor: crosshair;
}

/* ---------- keyframes ---------- */

@keyframes wmb-spin {
    to {
        transform: rotate(360deg);
    }
}
@keyframes wmb-fade-in {
    from {
        opacity: 0;
    }
}
@keyframes wmb-fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}
@keyframes wmb-list-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}
@keyframes wmb-pin-drop {
    0% {
        opacity: 0;
        transform: translateY(-18px) scale(0);
    }
    60% {
        opacity: 1;
        transform: translateY(0) scale(1.15);
    }
    100% {
        transform: none;
    }
}
@keyframes wmb-label-in {
    from {
        opacity: 0;
        transform: translate(var(--wmb-tx, -50%), calc(var(--wmb-ty, 0px) + 6px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .wmb *,
    .wmb *::before,
    .wmb *::after {
        animation-duration: 1ms !important;
        animation-delay: 0ms !important;
        transition-duration: 1ms !important;
        transition-delay: 0ms !important;
    }
}
