/* Map styling is contained here so existing calculators and page layouts keep their appearance. */
.viz-embed:has(.native-map),.viz-embed:has(.nm-loading){height:auto!important;min-height:0!important;aspect-ratio:auto!important;padding:0!important;background:transparent!important}
.viz-lazy:has(.native-map){height:auto!important;aspect-ratio:auto!important;position:relative!important;overflow:visible!important}
.native-map{--nm-ink:#1c3d5a;--nm-gold:#b58a39;--nm-line:#deded6;container-type:inline-size;background:#fffefa;color:var(--nm-ink);border:1px solid var(--nm-line);border-radius:16px;box-shadow:0 8px 28px #183b5710;overflow:visible;font:15px/1.45 'Libre Franklin',Arial,sans-serif;text-align:left;isolation:isolate}
.native-map *,.nm-share *{box-sizing:border-box}.native-map [hidden],.nm-share [hidden]{display:none!important}
.native-map button,.native-map input,.native-map select,.nm-share button,.nm-share input,.nm-share textarea{font:inherit;min-height:44px;color:#1c3d5a;border:1px solid #c9cec9;border-radius:7px;background:white;padding:7px 10px;max-width:100%}
.native-map button,.nm-share button{cursor:pointer}.native-map button:disabled{opacity:.45;cursor:default}
.native-map :is(button,a,input,select,summary):focus-visible,.nm-share :is(button,a,input,textarea,summary):focus-visible{outline:3px solid #b8862f;outline-offset:3px}
.nm-heading{display:flex;justify-content:space-between;align-items:start;gap:12px;padding:15px 17px 9px}.nm-heading h3{font:600 25px/1.15 'Newsreader',Georgia,serif;margin:0;color:#1c3d5a;letter-spacing:-.3px}.nm-heading p{margin:5px 0 0;font-size:14px;color:#43515B}.nm-heading button{flex:0 0 auto;font-size:13px}
.nm-toolbar{display:flex;gap:9px;flex-wrap:wrap;padding:0 17px 10px;border-bottom:1px solid var(--nm-line)}.nm-toolbar label{flex:1 1 140px;min-width:0;font-size:14px;font-weight:600;position:relative;display:flex;flex-direction:column;gap:4px}.nm-toolbar :is(input,select){width:100%;font-weight:400;font-size:14px}.nm-view-picker{flex-basis:100%!important}.nm-results{position:absolute;top:100%;left:0;min-width:250px;max-width:min(330px,85vw);background:white;border:1px solid #cacdc4;border-radius:8px;box-shadow:0 12px 30px #1427392b;z-index:8;max-height:260px;overflow:auto}.nm-results button{width:100%;display:block;text-align:left;border:0;border-bottom:1px solid #e5e5de;border-radius:0;font-size:14px}.nm-results button:hover{background:#f4f0e4}
.nm-baseline{padding:6px 17px;background:#f6f2e8}.nm-baseline label{display:flex;align-items:center;gap:12px;font-size:14px}.nm-baseline output{font-weight:700}.nm-baseline input{flex:1;min-width:65px;accent-color:#1c3d5a;border:0;padding:0}
.nm-reading{display:grid;grid-template-columns:minmax(0,1fr) 240px;padding:8px 15px 10px;gap:16px;min-height:340px;height:min(450px,calc(100svh - 220px))}.nm-stage{position:relative;min-height:210px;min-width:0;overflow:hidden;background:#fffefa}.nm-map{width:100%;height:100%;display:block;touch-action:pan-y}.nm-shapes path[data-id]{stroke:#fff;stroke-width:.65;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .12s}.nm-shapes path[data-id]:hover{stroke:#596b7a;stroke-width:1.6}.nm-shapes path[data-id]:focus{outline:none;stroke:#bc8a33;stroke-width:3}.nm-shapes path.nm-selected-shape{stroke:#bd8527;stroke-width:3.2}.nm-zoom{position:absolute;left:4px;bottom:5px;display:flex;gap:5px}.nm-zoom button{font-size:22px;min-width:44px;padding:3px 10px;box-shadow:0 2px 8px #14293c14}.nm-tooltip{position:absolute;left:5px;right:5px;top:5px;background:#1c3d5a;color:white;border-radius:6px;padding:8px 10px;pointer-events:none;font-size:14px}
.nm-key{border-left:1px solid var(--nm-line);padding:9px 0 0 15px;font-size:14px;overflow:auto}.nm-key strong[data-legend-title]{font-size:14px;display:block;line-height:1.35}.nm-gradient{height:10px;border-radius:6px;margin:10px 0 6px}.nm-ticks{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#47545d}.nm-ticks span{max-width:34%}.nm-ticks span:last-child{text-align:right}.nm-ticks span:nth-child(2){text-align:center}.nm-color-note{font-size:12px;line-height:1.4;color:#59616a;margin:8px 0}.nm-categories{list-style:none;padding:0;margin:8px 0;display:grid;grid-template-columns:1fr;gap:3px;font-size:12px}.nm-categories li{display:flex;align-items:center;gap:6px}.nm-categories span{display:inline-block;width:13px;height:13px;border:1px solid #0002;flex:0 0 auto}.nm-selection{border-top:1px solid #e1dfd8;padding-top:8px;font-weight:600;font-size:13px;margin:10px 0}.nm-selected h4{font:600 24px/1.15 'Newsreader',Georgia,serif;margin:9px 0 3px}.nm-selected p{font-size:13px;margin:4px 0;color:#43515B}.nm-value{display:block;font:600 31px/1.15 'Newsreader',Georgia,serif;margin:12px 0 6px}.nm-selected a{display:inline-block;color:#1c3d5a;text-decoration:underline;margin-top:10px;min-height:32px}.nm-help{font-size:14px;color:#43515B}
.nm-actions{padding:9px 16px;display:flex;gap:7px;flex-wrap:wrap;border-top:1px solid #e0dfd8}.nm-actions button{font-size:14px}.nm-actions [data-action=share]{background:#1c3d5a;color:white;border-color:#1c3d5a}.nm-details{padding:0 16px 9px;font-size:14px}.nm-details summary{cursor:pointer;min-height:44px;padding:10px 0}.nm-details p{margin:8px 0}.nm-table{max-height:330px;overflow:auto;margin-top:12px}.nm-table table{width:100%;border-collapse:collapse;font-size:13px}.nm-table th,.nm-table td{text-align:left;padding:8px;border-bottom:1px solid #dfded8}.nm-table th{position:sticky;top:0;background:#f4f1e7}.nm-table button{font-size:13px;min-height:35px;border:0;text-decoration:underline}.nm-footer{font-size:12px!important;line-height:1.4;color:#43515B;padding:9px 16px;margin:0!important;border-top:1px solid #e0dfd8}.nm-live{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}.nm-resume,.nm-loading,.nm-failure{display:block;width:100%;padding:24px;border:1px solid #d5d8d4;background:#faf8f0;color:#1c3d5a;border-radius:12px;min-height:220px}.nm-resume{cursor:pointer;font:600 20px 'Newsreader',Georgia,serif}.nm-failure a{display:inline-block;margin:15px}
@container(max-width:620px){.nm-reading{display:flex;flex-direction:column;height:auto;min-height:0;gap:5px}.nm-stage{height:clamp(230px,calc(100svh - 340px),370px);min-height:230px}.nm-key{border-left:0;border-top:1px solid var(--nm-line);padding:8px 0;overflow:visible}.nm-key .nm-selected{display:grid;grid-template-columns:1fr 1fr;gap:3px 10px}.nm-selected h4,.nm-selected a{grid-column:1/-1}.nm-value{font-size:28px;margin:4px 0}.nm-key .nm-selection{margin:7px 0;padding:0;border:0}.nm-help{margin:6px 0}.nm-categories{grid-template-columns:repeat(2,minmax(0,1fr))}.nm-heading h3{font-size:23px}.nm-heading button{font-size:12px;padding:6px}.nm-toolbar label{flex-basis:120px}.nm-color-note{margin:5px 0}.nm-key .nm-ticks span{max-width:33%}.nm-key .nm-gradient{margin:5px 0}}
.native-map.nm-expanded{position:fixed;inset:8px;z-index:15000;overflow:auto;box-shadow:0 0 0 15px #142b43bc;container-type:normal}.nm-expanded .nm-reading{height:calc(100svh - 250px);min-height:380px;grid-template-columns:minmax(0,1fr) 300px}.nm-expanded .nm-heading{padding-top:12px}.nm-expanded .nm-toolbar label{flex:1 1 180px}.nm-expanded .nm-view-picker{flex-basis:260px!important}
.nm-share{width:min(1020px,94vw);max-height:92svh;overflow:auto;border:1px solid #d4d9d9;border-radius:16px;padding:22px;background:#fffefa;color:#1c3d5a;font:15px/1.5 'Libre Franklin',Arial,sans-serif}.nm-share::backdrop{background:#182d44a8}.nm-share-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.nm-share h2{font:600 30px 'Newsreader',Georgia,serif;margin:0}.nm-share img{display:block;width:100%;height:auto;border:1px solid #dddcd4;border-radius:8px}.nm-share-actions{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}.nm-share-actions a,.nm-share nav a{display:inline-block;background:#1c3d5a;color:white;text-decoration:none;padding:10px 14px;min-height:44px;border-radius:7px}.nm-share nav{display:flex;gap:10px}.nm-share label{display:block;margin:12px 0;font-weight:600}.nm-share input,.nm-share textarea{display:block;width:100%;font-weight:400}.nm-private-note{background:#f3efde;padding:10px 14px;border-radius:7px}.nm-preview-banner{padding:8px 20px;background:#efe7d2;color:#304657;font:14px/1.4 Arial,sans-serif;text-align:center}.nm-preview-banner a{color:inherit;text-decoration:underline}
@media(max-width:650px){.nm-expanded .nm-reading{display:flex;flex-direction:column;height:auto}.nm-expanded .nm-stage{height:48svh}.nm-expanded .nm-key{border-left:0}.nm-heading{padding:12px 10px 8px}.nm-toolbar,.nm-actions{padding-left:10px;padding-right:10px}.nm-share{padding:15px}.nm-share-actions>*{flex:1 1 160px}}
@media(prefers-reduced-motion:reduce){.native-map *{transition:none!important}}
/* A compact reading area keeps title, geography and key in one laptop view. */
.nm-reading{height:clamp(260px,calc(100svh - 340px),350px);min-height:260px;grid-template-columns:minmax(0,1fr) 200px}
@container(min-width:440px) and (max-width:620px){.nm-reading{display:grid;grid-template-columns:minmax(0,1fr) 155px;height:clamp(260px,calc(100svh - 360px),320px);gap:10px}.nm-stage{height:100%;min-height:0}.nm-key{border-top:0;border-left:1px solid var(--nm-line);padding:5px 0 0 10px;overflow:auto}.nm-categories{grid-template-columns:1fr}.nm-key .nm-selected{display:block}.nm-heading h3{font-size:21px}}
@container(max-width:439px){.nm-reading{display:flex;height:auto;min-height:0;gap:8px}.nm-stage{height:clamp(205px,calc(100svh - 440px),280px);min-height:205px;order:2}.nm-key{order:1;padding:5px 0;border:0}.nm-key .nm-selection,.nm-key .nm-help{display:none}.nm-key .nm-selected{display:none}.nm-heading h3{font-size:21px}.nm-color-note{font-size:12px}.nm-categories{grid-template-columns:repeat(2,minmax(0,1fr));font-size:11px}.nm-heading{gap:8px}.nm-toolbar label{flex-basis:100px}}
.nm-mobile-selection{display:none;padding:8px 12px;border-top:1px solid #deded6;font-size:14px}.nm-mobile-selection p{margin:4px 0}
@container(max-width:439px){.nm-mobile-selection{display:block}}
.native-map.nm-expanded .nm-reading{display:grid;height:calc(100svh - 260px);min-height:280px;grid-template-columns:minmax(0,1fr) 260px}.nm-expanded .nm-stage{height:100%}
@media(max-width:650px){.native-map.nm-expanded .nm-reading{display:flex;height:auto}.nm-expanded .nm-stage{height:35svh;order:2}.nm-expanded .nm-key{order:1;overflow:visible}.nm-expanded .nm-selected{display:none}}
@media(max-width:650px){.nm-expanded .nm-heading h3{font-size:21px}.nm-expanded .nm-heading button{font-size:12px;padding:6px}.nm-expanded .nm-toolbar label:not(.nm-view-picker){flex:1 1 110px}.nm-expanded .nm-toolbar .nm-view-picker{flex-basis:100%!important}.nm-expanded .nm-stage{height:28svh;min-height:190px}.nm-expanded .nm-key{padding:3px 0}.nm-expanded .nm-key .nm-selection,.nm-expanded .nm-key .nm-help{display:none}.nm-expanded .nm-mobile-selection{display:block}.nm-expanded .nm-color-note{font-size:12px;margin:5px 0}.nm-expanded .nm-reading{padding-top:5px;gap:5px}}
@media(max-width:650px){.nm-expanded .nm-categories{grid-template-columns:repeat(2,minmax(0,1fr));font-size:12px;gap:3px 9px}}

/* Review corrections: context is visible before selection; geographic outlines remain legible. */
.nm-context{font-size:12px;line-height:1.4;margin:0 16px 8px;padding:8px 10px;border-left:3px solid #b58a39;background:#f3efdf;color:#3d4c56}
.nm-shapes path[data-id]{stroke:#7d929d;stroke-width:.45}
.nm-shapes path[data-id].nm-selected-shape{stroke:#bd8527;stroke-width:3.2}
.nm-table button,.nm-selected a{min-height:44px}
@container(max-width:439px){.nm-context{font-size:11px;margin:0 10px 5px;padding:5px 8px}.nm-marker{display:none}.nm-toolbar{gap:5px}.nm-toolbar label{font-size:12px}.nm-heading{padding-top:9px}}
@media(max-width:650px){.nm-expanded .nm-marker{display:none}.nm-expanded .nm-context{font-size:11px;padding:5px 8px;margin-bottom:4px}.nm-expanded .nm-stage{height:24svh;min-height:175px}}
.nm-selected .nm-selected-context{padding:7px;border-left:3px solid #b58a39;background:#f3efdf;color:#3d4c56}.nm-selected-context:empty{display:none}.hero-map-svg path:focus-visible{outline:none;stroke:#fff;stroke-width:4;filter:drop-shadow(0 0 2px #1c3d5a);opacity:1}

/* Give geography more room on desktop while retaining the compact mobile view. */
@media(min-width:1100px){.maprow:has(.viz-lazy){grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr)}}
@container(min-width:621px){.nm-reading{height:clamp(300px,calc(100svh - 330px),420px);grid-template-columns:minmax(0,1fr) 200px}}
.nm-unavailable{max-width:720px;margin:8vh auto;padding:32px;background:#fffefa;color:#1c3d5a;border:1px solid #deded6;border-radius:16px;font:17px/1.6 Arial,sans-serif}.nm-unavailable h1{font:600 32px Georgia,serif}.nm-unavailable a{display:inline-block;padding:10px 0;color:#1c3d5a}
/* Map annotations keep their compact type inside editorial page layouts. */
.native-map .nm-context{font-size:14px;line-height:1.45}
.native-map .nm-color-note{font-size:12px;line-height:1.4}
.native-map .nm-help{font-size:14px;line-height:1.45}
.nm-key{scrollbar-gutter:stable}
@container(max-width:439px){.native-map .nm-context{font-size:12px;line-height:1.4}.nm-stage{max-height:260px}}
/* Preserve the existing calculator while keeping long district names in bounds. */
.dc-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.dc-field{min-width:0}.dc-field select{min-width:0;max-width:100%}.dc-levy input[type=range]{box-sizing:border-box;margin-left:0;margin-right:0}
@media(max-width:700px){.dc-controls{grid-template-columns:minmax(0,1fr)}}
