.cm-municipality-control{margin:.7rem 0;}
.cm-geography-hidden{display:none!important;}
.cm-municipality-map{position:relative;min-height:420px;overflow:hidden;}
.cm-municipality-map[hidden],.cm-municipality-summary[hidden],.cm-municipality-frost[hidden]{display:none!important;}
.cm-municipality-map > .cm-municipality-canvas{position:absolute!important;inset:0;}
.cm-municipality-frost{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(245,247,250,.72);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);text-align:center;pointer-events:auto;}
.cm-municipality-frost .analysis-frost-card{max-width:400px;}
.cm-municipality-frost .analysis-frost-title{font-weight:800;font-size:1.05rem;margin-bottom:8px;}
.cm-municipality-frost .analysis-frost-text{font-size:.9rem;line-height:1.5;}
@media(max-width:640px){
  .cm-municipality-map{min-height:360px;}
}
@media(prefers-color-scheme:dark){.cm-municipality-frost{background:rgba(15,23,42,.76);color:#f1f5f9;}}
html[data-theme="dark"] .cm-municipality-frost{background:rgba(15,23,42,.76);color:#f1f5f9;}
html[data-theme="light"] .cm-municipality-frost{background:rgba(245,247,250,.72);color:#111827;}

/* Shared geography switch: matches the office switcher in both themes. */
html body .segmented.segmented:is(.cm-municipality-control,.results-geography-control){
  width:fit-content !important;
  box-sizing:border-box !important;
  display:flex !important;
  margin-inline:auto !important;
  align-self:center !important;
  justify-self:center !important;
  flex-wrap:nowrap !important;
  gap:.28rem !important;
  padding:.28rem !important;
  border-radius:999px !important;
  border:1px solid rgba(148,163,184,.34) !important;
  background:rgba(248,250,252,.86) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82), 0 8px 22px rgba(15,23,42,.07) !important;
  max-width:100% !important;
  overflow:visible !important;
  -webkit-overflow-scrolling:touch !important;
  backdrop-filter:saturate(150%) blur(12px) !important;
}
html body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn{
  appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:1 0 auto !important;
  cursor:pointer !important;
  transform:none !important;
  min-height:2.35rem !important;
  padding:.58rem .95rem !important;
  border:1px solid transparent !important;
  border-radius:999px !important;
  background:transparent !important;
  color:#334155 !important;
  -webkit-text-fill-color:currentColor !important;
  font-weight:950 !important;
  font-size:.82rem !important;
  letter-spacing:-.012em !important;
  line-height:1.1 !important;
  white-space:nowrap !important;
  text-shadow:none !important;
  box-shadow:none !important;
  opacity:1 !important;
}
html body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:hover:not(:disabled){
  background:rgba(226,232,240,.74) !important;
  border-color:rgba(148,163,184,.38) !important;
  color:#0f172a !important;
}
html body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:is(.active,[aria-selected="true"],[aria-pressed="true"]){
  background:#0f172a !important;
  border-color:#0f172a !important;
  color:#fff !important;
  box-shadow:0 10px 24px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.14) !important;
}
html body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:disabled{
  color:#94a3b8 !important;
  background:transparent !important;
  border-color:transparent !important;
  opacity:.7 !important;
  cursor:not-allowed !important;
}
html body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:focus-visible{
  outline:3px solid rgba(14,165,233,.38) !important;
  outline-offset:2px !important;
}

/* Dark mode active/inactive segmented control, directly matching election-night. */
@media (prefers-color-scheme:dark){
  html:not([data-theme="light"]) body .segmented.segmented:is(.cm-municipality-control,.results-geography-control){
    background:rgba(15,23,42,.76) !important;
    border-color:rgba(148,163,184,.24) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06), 0 10px 26px rgba(0,0,0,.24) !important;
  }
  html:not([data-theme="light"]) body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn{
    color:#cbd5e1 !important;
    background:transparent !important;
  }
  html:not([data-theme="light"]) body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:hover:not(:disabled){
    background:rgba(51,65,85,.72) !important;
    border-color:rgba(148,163,184,.24) !important;
    color:#f8fafc !important;
  }
  html:not([data-theme="light"]) body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:is(.active,[aria-selected="true"],[aria-pressed="true"]){
    background:#f8fafc !important;
    border-color:rgba(255,255,255,.86) !important;
    color:#0f172a !important;
    box-shadow:0 12px 28px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.92) !important;
  }
}
html[data-theme="dark"] body .segmented.segmented:is(.cm-municipality-control,.results-geography-control),
html.dark body .segmented.segmented:is(.cm-municipality-control,.results-geography-control),
body.dark-mode .segmented.segmented:is(.cm-municipality-control,.results-geography-control),
body.theme-dark .segmented.segmented:is(.cm-municipality-control,.results-geography-control){
  background:rgba(15,23,42,.76) !important;
  border-color:rgba(148,163,184,.24) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06), 0 10px 26px rgba(0,0,0,.24) !important;
}
html[data-theme="dark"] body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn,
html.dark body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn,
body.dark-mode .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn,
body.theme-dark .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn{
  color:#cbd5e1 !important;
  background:transparent !important;
}
html[data-theme="dark"] body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:hover:not(:disabled),
html.dark body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:hover:not(:disabled),
body.dark-mode .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:hover:not(:disabled),
body.theme-dark .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:hover:not(:disabled){
  background:rgba(51,65,85,.72) !important;
  border-color:rgba(148,163,184,.24) !important;
  color:#f8fafc !important;
}
html[data-theme="dark"] body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:is(.active,[aria-selected="true"],[aria-pressed="true"]),
html.dark body .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:is(.active,[aria-selected="true"],[aria-pressed="true"]),
body.dark-mode .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:is(.active,[aria-selected="true"],[aria-pressed="true"]),
body.theme-dark .segmented.segmented:is(.cm-municipality-control,.results-geography-control) .seg-btn:is(.active,[aria-selected="true"],[aria-pressed="true"]){
  background:#f8fafc !important;
  border-color:rgba(255,255,255,.86) !important;
  color:#0f172a !important;
  box-shadow:0 12px 28px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.92) !important;
}

html body :is(.cm-municipality-control,.results-geography-control)[hidden]{display:none !important;}
