.distribution-map {
    --map-water: var(--paper);
    --map-land: var(--wash);
    --map-coast: light-dark(#758b80, #8fada0);
    --map-lakeshore: light-dark(#d5dfd8, #3b5546);
    --map-band-1: light-dark(#d4e9dc, #355344);
    --map-band-2: light-dark(#a3d0bc, #496f55);
    --map-band-3: light-dark(#67b39b, #659171);
    --map-band-4: light-dark(#328b78, #8bb28f);
    --map-band-5: light-dark(#156653, #b2d1aa);
    --map-band-6: light-dark(#084839, #dcecca);
    margin-bottom: 0;
}
.distribution-map [hidden] { display: none; }
.distribution-map__views { position: absolute; z-index: 2; top: .75rem; right: .75rem; display: inline-flex; gap: .2rem; padding: .25rem; border: 1px solid var(--line-strong); border-radius: 8px; background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: 0 4px 16px #07110b1f; backdrop-filter: blur(10px); }
.distribution-map__views button { border: 0; border-radius: 5px; padding: .45rem .85rem; background: transparent; color: var(--muted); font-size: .75rem; }
.distribution-map__views button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 3px #0001; }
.distribution-map__canvas { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--map-water); }
.distribution-map__canvas svg { display: block; width: 100%; height: auto; }
.distribution-map__land { fill: var(--map-land); }
.distribution-map__region { fill: var(--band-color); stroke: var(--band-color); stroke-width: .65; stroke-linejoin: round; transition: opacity .15s; }
.distribution-map__region.is-muted { opacity: .12; }
.distribution-map [data-band="1"] { --band-color: var(--map-band-1); }
.distribution-map [data-band="2"] { --band-color: var(--map-band-2); }
.distribution-map [data-band="3"] { --band-color: var(--map-band-3); }
.distribution-map [data-band="4"] { --band-color: var(--map-band-4); }
.distribution-map [data-band="5"] { --band-color: var(--map-band-5); }
.distribution-map [data-band="6"] { --band-color: var(--map-band-6); }
.distribution-map__coast { fill: none; stroke: var(--map-coast); stroke-width: .9; opacity: .65; pointer-events: none; }
.distribution-map__lakes { fill: var(--map-water); stroke: var(--map-lakeshore); stroke-width: .45; pointer-events: none; }
.distribution-map__key { padding: .85rem 0 .55rem; }
.distribution-map__key-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: baseline; font-size: .75rem; }
.distribution-map__key-heading > p:first-child { margin: 0; font-weight: 600; }
.distribution-map__key-heading > p:first-child span { font-weight: 400; color: var(--muted); }
.distribution-map__key-heading > p:first-child .distribution-map__metric { font-weight: 600; color: var(--ink); }
.distribution-map__legend { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .35rem; margin: .65rem -.3rem .45rem; }
.distribution-map__legend button { min-width: 0; border: 1px solid transparent; border-radius: 6px; padding: .3rem .3rem .4rem; background: transparent; color: var(--ink-soft); text-align: center; font-size: .75rem; font-variant-numeric: tabular-nums; }
.distribution-map__legend button:hover, .distribution-map__legend button[aria-pressed="true"] { border-color: var(--line-strong); background: var(--wash); color: var(--ink); }
.distribution-map__swatch { display: block; height: 10px; margin-bottom: .4rem; border-radius: 3px; background: var(--band-color); }
.distribution-map__key-notes { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; }
.distribution-map__unshaded { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .62rem; }
.distribution-map__unshaded span { width: 24px; height: 10px; flex-shrink: 0; border-radius: 3px; background: var(--map-land); box-shadow: inset 0 0 0 1px var(--line-strong); }
.distribution-map__unshaded p { margin: 0; }
.distribution-map__scale-note { margin: 0; color: var(--muted); font-size: .62rem; }
.distribution-map__status { margin: 0; color: var(--muted); font-size: .62rem; font-weight: 400; text-align: right; }
.distribution-map__footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem .75rem; padding: .65rem 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .6rem; }
.distribution-map__footer p { margin: 0; }
.distribution-map__footer a { color: var(--muted); }
@media (max-width: 480px) {
    .distribution-map__key { padding-block: .8rem .5rem; }
    .distribution-map__views { top: .5rem; right: .5rem; }
    .distribution-map__views button { padding: .35rem .65rem; }
    .distribution-map__footer { padding-block: .6rem 0; }
    .distribution-map__legend { gap: .1rem; }
    .distribution-map__legend button { font-size: .65rem; padding-inline: .15rem; }
}
@media (prefers-reduced-motion: reduce) {
    .distribution-map__region { transition: none; }
}
