@font-face {
  font-family: "Work Sans";
  src: url("assets/work-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ink: #101010;
  --text: #242424;
  --muted: #535353;
  --line: #d4d4d4;
  --paper: #fff;
  --sans: "Work Sans", Helvetica, Arial, sans-serif;
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.45;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button {
  border: 0;
  background: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #1a1a1a;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
[hidden] {
  display: none !important;
}
svg.icon {
  width: 19px;
  height: 19px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
button [data-icon] {
  display: inline-flex;
}
.sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  top: 8px;
  left: 12px;
  padding: 10px;
  background: white;
  z-index: 10000;
}
.mast {
  color: var(--ink);
  background: var(--paper);
}
.mast-inner,
.shell {
  width: min(100%, 112rem);
  margin: auto;
  padding-inline: clamp(1rem, 3vw, 3rem);
}
.mast-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.3rem;
  padding-block: 0.25rem;
  gap: 1rem;
  position: relative;
}
.mast-inner::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline: clamp(1rem, 3vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  color: #101010;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.055em;
  text-decoration: none;
}
.wordmark:hover,
.guide-btn:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}
.guide-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.4rem;
  padding: 0.3rem 0;
  font-size: 0.9375rem;
  color: var(--text);
}
.guide-btn svg {
  width: 1rem;
  height: 1rem;
}
#share-open {
  position: relative;
  min-height: 34px;
  padding: 0.25rem 0.6rem;
  border: 1px solid #cebee8;
  border-radius: 0.3rem;
  background: #eee8fa;
  color: #56378b;
  font-size: 0.875rem;
  font-weight: 600;
}
#share-open:hover {
  background: #e3d9f6;
  text-decoration: none;
}
@media (pointer: coarse) {
  #share-open::after {
    content: "";
    position: absolute;
    inset: -5px 0;
  }
}
.mast-actions,
.share-actions {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 2vw, 1.5rem);
}
.dialog-body.share-body {
  display: grid;
  gap: 0.65rem;
  padding-block-start: 1rem;
}
.share-body input {
  width: 100%;
  min-width: 0;
  padding: 0.55rem;
  font: inherit;
  border: 1px solid #888;
  border-radius: 3px;
}
#share-copy {
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.8rem;
  border-radius: 3px;
}
@media (max-width: 520px) {
  .mast-inner {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .mast-actions {
    gap: 0.65rem;
    flex-wrap: wrap;
  }
  .share-extra {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .mast-actions .guide-btn {
    font-size: 0.875rem;
    gap: 0.25rem;
  }
  #share-open {
    padding-inline: 0.6rem;
  }
}
@media (max-width: 420px) {
  #share-open [data-icon],
  #guide-open [data-icon] {
    display: none;
  }
  #share-open {
    min-width: 44px;
    justify-content: center;
  }
}
@media (max-width: 380px) {
  html:not(.map-page-expanded) #fullscreen-label {
    display: none;
  }
  html:not(.map-page-expanded) #fullscreen-map {
    width: 44px;
    padding-inline: 0;
  }
  .views button {
    padding-inline: 0.35rem;
  }
  .mast-inner {
    padding-inline: 0.75rem;
  }
  .mast-inner::after {
    inset-inline: 0.75rem;
  }
  .mast-inner,
  .mast-actions {
    gap: 0.375rem;
  }
  .mast-actions .guide-btn {
    font-size: 0.8125rem;
  }
  #reset-view [data-icon] {
    display: none;
  }
  #share-open {
    padding-inline: 0.25rem;
    font-size: 0.8125rem;
  }
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  padding: clamp(1.35rem, 2.2vw, 2.3rem) 0 1.3rem;
}
.intro h1 {
  color: var(--ink);
  margin: 0;
  font-size: clamp(2.25rem, 1.1rem + 3.1vw, 4.2rem);
  font-weight: 650;
  letter-spacing: -0.067em;
  line-height: 1.04;
  text-wrap: balance;
}
.subtitle {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}
.update {
  flex-shrink: 0;
  text-align: right;
}
#update-toggle {
  display: none;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}
.status i {
  width: 0.45rem;
  height: 0.45rem;
  background: currentColor;
  border-radius: 50%;
}
.updated {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.12rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.updated dt {
  text-align: left;
}
.updated dd {
  margin: 0;
  color: var(--ink);
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 26vw, 420px);
  height: clamp(540px, calc(100dvh - 220px), 1100px);
  min-height: 0;
  border: 1px solid #dedede;
  border-radius: 2px;
  overflow: hidden;
  background: white;
}
.map-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  background: #c7dbe0;
}
#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #c7dbe0;
}
.leaflet-container {
  font-family: var(--sans);
  font-size: 0.8125rem;
}
.leaflet-tile-pane {
  filter: grayscale(0.75) saturate(0.57) contrast(0.73) brightness(1.17);
}
.streets-ready .leaflet-tile-pane {
  opacity: 0.92;
}
#map.streets-ready {
  background: #fff;
}
.streets-ready .leaflet-context-pane,
.streets-ready .leaflet-context-labels-pane {
  visibility: hidden;
}
.boundaries-visible .leaflet-tile-pane {
  opacity: 0.57;
}
.leaflet-control-attribution {
  font: 11px var(--sans) !important;
  max-width: 95%;
  color: #565656 !important;
  background: #fffffff2 !important;
}
.leaflet-control-attribution a {
  color: #363636 !important;
}
.leaflet-bottom.leaflet-right {
  max-width: 85%;
}
.leaflet-control-scale {
  margin-bottom: 4px !important;
  margin-left: 12px !important;
}
.leaflet-control-scale-line {
  font: 10px var(--sans);
  background: #ffffffc9;
  color: #363636;
  border-color: #565656;
}
.views,
.control-group,
.map-key {
  background: #ffffff;
  box-shadow: 0 2px 8px #18352b23;
  border: 1px solid #dedede;
}
.views {
  position: absolute;
  z-index: 1;
  top: 16px;
  left: 16px;
  display: flex;
  padding: 3px;
  border-radius: 7px;
}
.views button {
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 0.8125rem;
  font-weight: 650;
}
.views svg {
  width: 16px;
  height: 16px;
}
.views button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.views button[aria-pressed="false"]:hover,
.control-group button:hover {
  background: #f4f4f4;
}
.map-tools {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  gap: 8px;
}
.control-group {
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.control-group button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1;
}
.control-group button + button {
  border-top: 1px solid var(--line);
}
.control-group button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.map-key {
  position: absolute;
  bottom: 25px;
  left: 16px;
  padding: 9px 12px 10px;
  border-radius: 6px;
  max-width: calc(100% - 32px);
}
.key-title {
  font-size: 0.75rem;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 5px;
}
.icon-tiny {
  padding: 2px;
  color: #565656;
}
.icon-tiny svg {
  width: 14px;
  height: 14px;
}
.key-items {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 13px;
}
.key-unit,
.party-name {
  display: flex;
  align-items: center;
  gap: 6px;
}
.key-unit {
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
}
.swatch {
  height: 9px;
  width: 9px;
  background: var(--party);
  border: 1px solid #0002;
  display: inline-block;
  border-radius: 50%;
  flex: none;
}
.map-note {
  position: absolute;
  pointer-events: none;
  top: 69px;
  left: 16px;
  max-width: calc(100% - 80px);
  padding: 6px 9px;
  background: #fffdf0ed;
  border: 1px solid #d5c694;
  border-radius: 4px;
  font-size: 0.75rem;
}
.map-label {
  background: transparent;
  border: 0;
  text-shadow:
    0 1px 3px #fff,
    1px 0 3px white;
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
  color: #363636;
  pointer-events: none;
}
.leaflet-tooltip.booth-tip {
  border: 0;
  padding: 8px 10px;
  border-radius: 5px;
  box-shadow: 0 3px 8px #102b3029;
  font-family: var(--sans);
}
.booth-tip strong {
  display: block;
  font-size: 0.875rem;
}
.booth-tip span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 2px;
}
.panel {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #dedede;
  background: #fff;
}
.panel-head {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-title,
.dialog-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.panel-title > span {
  color: #363636;
}
.panel-title h2 {
  font-size: 1.375rem;
  line-height: 1.1;
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.8px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dedede;
  border-radius: 5px;
  background: #ffffff;
  padding: 0 10px;
  margin-top: 15px;
}
.search-field:focus-within {
  outline: 2px solid #1a1a1a;
  outline-offset: 1px;
}
.search-field svg {
  width: 17px;
  color: #565656;
}
.search-field input {
  width: 100%;
  height: 40px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.875rem;
  outline: none;
}
.search-field input:focus-visible {
  outline: none;
}
.search-field input::-webkit-search-cancel-button {
  display: none;
}
.search-field button {
  font-size: 1.4375rem;
  color: #565656;
  padding: 0 3px;
}
.panel-body {
  padding: 18px 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #bec8bf transparent;
  flex: 1;
}
.panel-body:focus:not(:focus-visible) {
  outline: 0;
}
.summary-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.stat + .stat {
  border-left: 1px solid var(--line);
  padding-left: 17px;
}
.stat b {
  display: block;
  font: 600 2.1rem/1.05 var(--sans);
  color: var(--ink);
  letter-spacing: -0.6px;
}
.stat span,
.small {
  font-size: 0.8125rem;
  color: var(--muted);
}
.stat span {
  display: block;
  margin-top: 6px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 17px;
}
.section-head h3,
.info-title {
  margin: 0;
  font-size: 0.9375rem;
  letter-spacing: -0.2px;
}
.unit {
  font-size: 0.75rem;
  color: var(--muted);
}
.ribbon {
  display: flex;
  gap: 2px;
  height: 8px;
  margin: 12px 0;
  border-radius: 2px;
  overflow: hidden;
  background: #eef1ec;
}
.ribbon i {
  background: var(--party);
  min-width: 1px;
}
.party-row,
.result-row {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #dedede;
  padding: 9px 1px;
  font-size: 0.875rem;
  min-height: 33px;
}
.party-row:hover,
.result-row:hover {
  background: #f4f4f4;
}
.party-row .num,
.result-row .end {
  margin-left: auto;
}
.num,
.numbers,
.data-count,
.pct,
.tally {
  font-variant-numeric: tabular-nums;
}
.party-row .num {
  font-size: 0.875rem;
  font-weight: 650;
}
.row-chevron {
  color: #7a857c;
  display: inline-flex;
}
.row-chevron svg {
  width: 14px;
  height: 14px;
}
.all-booths,
.more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1px solid #dedede;
  border-radius: 5px;
  color: #101010;
  background: #f4f4f4;
  margin-top: 12px;
  min-height: 38px;
  font-size: 0.875rem;
  font-weight: 650;
}
.all-booths:hover,
.more:hover {
  background: #f4f4f4;
}
.all-booths svg {
  width: 16px;
}
.list-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 12px 0 7px;
}
.list-summary h3 {
  font-size: 1.0625rem;
  margin: 0;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  background: #f5f5f5;
  border: 1px solid #999;
  border-radius: 4px;
  font-weight: 650;
  font-size: 1rem;
}
.back:hover {
  background: #eaeaea;
  border-color: var(--ink);
}
.back svg {
  width: 1.25rem;
  height: 1.25rem;
}
.select-wrap {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  margin: 9px 0;
}
.select-wrap select,
.result-tabs select {
  display: block;
  width: 100%;
  font-weight: 500;
  border: 1px solid #dedede;
  border-radius: 4px;
  padding: 7px 26px 7px 8px;
  background-color: white;
  color: var(--ink);
  font-size: 0.875rem;
}
.result-row {
  padding: 10px 1px;
}
.result-row strong,
.result-row small {
  display: block;
}
.result-row strong {
  font-size: 0.875rem;
  font-weight: 650;
}
.result-row small {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1px;
}
.result-row .text {
  min-width: 0;
}
.result-row .end {
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.result-row .end small {
  font-weight: 400;
}
.empty,
.loading,
.detail-note {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}
.detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.icon-btn {
  border: 1px solid #dedede;
  border-radius: 4px;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  font-size: 1.3125rem;
}
.icon-btn svg {
  width: 16px;
}
.detail-name {
  font: 650 1.875rem/1.12 var(--sans);
  letter-spacing: -0.6px;
  margin: 12px 0 5px;
  color: var(--ink);
}
.seat-names {
  font-weight: 650;
  color: #363636;
  font-size: 0.8125rem;
}
.address {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px 0 14px;
}
.address svg {
  width: 15px;
  height: 17px;
  margin-top: 1px;
}
.lead-box {
  border-left: 4px solid var(--party);
  background: #f4f4f4;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lead-box small,
.lead-box span {
  display: block;
}
.lead-box small {
  font-size: 0.75rem;
  color: var(--muted);
}
.lead-box strong {
  font-size: 1rem;
}
.lead-box b {
  font-size: 1.4375rem;
  letter-spacing: -0.7px;
}
.vote-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 15px;
}
.vote-stats span {
  font-size: 0.75rem;
  color: var(--muted);
}
.vote-stats b {
  display: block;
  font-size: 1rem;
  color: var(--ink);
  font-weight: 650;
}
.result-tabs {
  margin: 12px 0;
}
.result-tabs label {
  font-size: 0.8125rem;
  font-weight: 650;
}
.result-tabs select {
  margin-top: 4px;
}
.breakdown {
  width: 100%;
  border-spacing: 0;
  font-size: 0.8125rem;
}
.breakdown th {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.breakdown td {
  border-bottom: 1px solid #dedede;
  padding: 7px 0;
  vertical-align: top;
}
.vote-shares tbody tr {
  background: linear-gradient(to right, var(--party) 0% var(--share), #ececec var(--share) 100%) left
    bottom 0.3rem / 100% 4px no-repeat;
}
.vote-shares tbody td {
  padding-bottom: 0.95rem;
  border-bottom: 0;
}
.breakdown th:first-child,
.breakdown td:first-child {
  text-align: left;
}
.breakdown th:not(:first-child),
.breakdown td:not(:first-child) {
  text-align: right;
  white-space: nowrap;
  padding-left: 8px;
}
.candidate {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.candidate .swatch {
  width: 7px;
  height: 7px;
}
.candidate-name {
  font-size: 0.8125rem;
  font-weight: 600;
}
.candidate small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}
.booth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.75rem;
  margin-top: 14px;
}
.booth-links a {
  color: #363636;
}
.detail-note {
  background: #f4f4f4;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 0.8125rem;
}
.pref {
  margin-top: 14px;
}
.pref summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 650;
  padding: 8px 0;
}
.muted {
  color: var(--muted);
}
footer {
  margin: 12px 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #565656;
  font-size: 0.75rem;
}
footer a {
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
.source-dot {
  background: #809383;
  height: 6px;
  width: 6px;
  margin-right: 4px;
}
dialog {
  max-width: min(520px, calc(100vw - 28px));
  width: 100%;
  max-height: 85dvh;
  padding: 0;
  color: var(--text);
  border: 1px solid #dedede;
  border-radius: 2px;
  box-shadow: 0 18px 80px #15281e45;
}
dialog::backdrop {
  background: #10221bc2;
}
.dialog-head {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  padding: 16px 21px;
  z-index: 1;
}
.dialog-head h2 {
  font: 650 1.75rem/1.15 var(--sans);
  margin: 0;
}
.dialog-body {
  padding: 0 21px 16px;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.dialog-body h3 {
  font-size: 1rem;
  margin: 18px 0 4px;
}
.dialog-body p {
  margin: 3px 0 12px;
}
.full-key {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
}
.full-key .key-unit {
  font-size: 0.8125rem;
}
.dialog-body a {
  color: #363636;
}
@media (min-width: 1750px) {
  .panel-head,
  .panel-body {
    padding-inline: 24px;
  }
}
@media (max-width: 800px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 292px;
  }
  .panel-head,
  .panel-body {
    padding-inline: 14px;
  }

  .key-items {
    gap: 4px 7px;
  }
  .map-key {
    left: 10px;
    max-width: calc(100% - 20px);
  }
}
@media (max-width: 680px), (pointer: coarse) and (max-height: 520px) and (max-width: 960px) {
  .mast-inner {
    min-height: 2.8rem;
  }
  .intro {
    display: block;
    padding: 1.1rem 0 0.9rem;
  }
  .update {
    text-align: left;
    margin-top: 0.55rem;
  }
  .update-line {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-family: system-ui, sans-serif;
    gap: 0.55rem;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .update-line .status {
    flex: none;
    gap: 0.3rem;
    font-size: 0.8125rem;
  }
  #update-toggle,
  .brief-clock {
    display: inline-flex;
    align-items: center;
  }
  #update-toggle {
    min-height: 44px;
    flex: none;
    gap: 0.55rem;
    padding: 0 0.2rem;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
  }
  #update-toggle:focus-visible {
    outline-offset: -3px;
  }
  .brief-clock {
    gap: 0.2rem;
  }
  .brief-clock time {
    color: var(--ink);
  }
  .update-line .brief-icon {
    display: none;
  }
  .update-chevron {
    width: 0.45rem;
    height: 0.45rem;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: translateY(-0.1rem) rotate(45deg);
    margin-left: 0.1rem;
  }
  #update-toggle[aria-expanded="true"] .update-chevron {
    transform: translateY(0.1rem) rotate(225deg);
  }
  .updated {
    width: fit-content;
    margin-top: 0;
  }
  .update:has(#update-toggle[aria-expanded="false"]) .updated {
    display: none;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .map-card {
    height: auto;
    flex: none;
  }
  .panel {
    border: 0;
    border-top: 1px solid #dedede;
  }
  .panel-head {
    padding: 16px;
  }
  .panel-body {
    padding: 14px 16px 19px;
    overflow: visible;
  }
  .panel-title h2 {
    font-size: 1.3125rem;
  }
  .search-field {
    margin-top: 10px;
  }
  .views {
    left: 11px;
    top: 11px;
  }
  .map-tools {
    right: 11px;
    top: 11px;
  }
  .map-note {
    top: 132px;
    left: 11px;
  }
  .map-key {
    padding: 7px 9px;
    bottom: 22px;
  }
  .key-title,
  .key-unit {
    font-size: 0.6875rem;
  }
  .key-items {
    gap: 2px 8px;
  }
  .key-items .swatch {
    width: 7px;
    height: 7px;
  }
  .key-items {
    margin-top: 2px;
  }
  .key-title .icon-tiny {
    height: 16px;
    padding: 0 2px;
  }
  .summary-stats .stat b {
    font-size: 2rem;
  }
  footer {
    align-items: start;
    flex-direction: column;
    gap: 3px;
    font-size: 0.6875rem;
  }
  .detail-name {
    font-size: 2.0625rem;
  }
  .panel {
    scroll-margin-top: 8px;
  }
  .panel-title svg {
    width: 18px;
  }
  .leaflet-control-attribution {
    font-size: 10px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0s !important;
  }
}
.map-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  container: map / inline-size;
}
.map-stage {
  position: relative;
  flex: 1;
  min-height: 0;
}
.map-bar {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem 0.7rem;
  padding: 0.4rem 0.65rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.metric-switch,
.geography-switch {
  display: inline-flex;
  gap: 2px;
  align-items: stretch;
}
.map-navigation,
.map-view-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.map-navigation {
  justify-content: space-between;
}
.map-view-actions button,
#close-fullscreen-results {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
}
.map-view-actions .icon {
  width: 1rem;
  height: 1rem;
}
#fullscreen-settings {
  display: none;
}
.map-view-actions button:hover,
#close-fullscreen-results:hover {
  background: #f2f2f2;
}
#booth-controls,
.booth-control {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
#booth-controls {
  flex-wrap: wrap;
  column-gap: 0.9rem;
  font-size: 0.875rem;
}
.size-label,
#size-help summary {
  display: flex;
  align-items: center;
}
#size-help summary {
  cursor: pointer;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  list-style: none;
}
#size-help summary::-webkit-details-marker {
  display: none;
}
#size-help summary span {
  display: grid;
  place-items: center;
  height: 1rem;
  width: 1rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1;
}
#size-help[open] summary span {
  background: var(--ink);
  color: white;
}
.size-help-card {
  position: absolute;
  right: 0.45rem;
  top: 100%;
  width: min(21rem, calc(100% - 0.9rem));
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 4px 14px #0002;
  font-size: 0.875rem;
}
.size-help-card h3,
.size-help-card dl,
.size-help-card dd {
  margin: 0;
}
.size-help-card h3 {
  font-size: 1rem;
}
.size-help-card dl > div {
  margin-top: 0.55rem;
  padding-inline-start: 0.65rem;
  border-inline-start: 2px solid var(--line);
}
.size-help-card [aria-current="true"] {
  border-color: var(--ink);
}
.size-help-card dt {
  font-weight: 650;
}
.size-help-card dd {
  color: var(--muted);
}
#booth-controls select {
  padding: 0.33rem 0.2rem;
  min-height: 2.1rem;
  max-width: 11rem;
  min-width: 0;
  background-color: white;
  border: 1px solid var(--line);
  border-radius: 3px;
}
#booth-controls #map-party {
  width: 11rem;
  padding-inline-start: 1.45rem;
  background-image: radial-gradient(circle at 0.75rem 50%, var(--selected-colour, #879088) 0 0.27rem, transparent 0.31rem);
}
#map-party option {
  color: var(--option-ink, var(--ink));
}
@supports (appearance: base-select) and selector(::picker(select)) {
  #booth-controls #map-party,
  #map-party::picker(select) {
    appearance: base-select;
  }
  #booth-controls #map-party {
    padding-inline: 0.5rem;
    align-items: center;
    background-image: none;
  }
  #map-party::picker(select) {
    max-width: calc(100vw - 1rem);
    width: max-content;
    max-height: min(23rem, 55dvh);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0.2rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: white;
    box-shadow: 0 3px 12px #0002;
    font: inherit;
  }
  #map-party option,
  #map-party selectedcontent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  #map-party option {
    padding: 0.45rem 0.5rem;
    color: var(--ink);
  }
  #map-party option:checked {
    font-weight: 650;
  }
  #map-party > button,
  #map-party selectedcontent {
    min-width: 0;
  }
  #map-party selectedcontent span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
.size-key,
.size-example {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.size-key {
  gap: 0.85rem;
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
  padding-top: 0.35rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.size-example i {
  width: var(--diameter);
  height: var(--diameter);
  border: 1px solid #555;
  border-radius: 50%;
}
.empty-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1px solid #68716a;
  border-radius: 50%;
}
.metric-switch button,
.geography-switch button {
  border: 0;
  border-radius: 2px;
  background: white;
  color: #474747;
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 2.25rem;
  padding: 0.35rem 0.6rem;
  line-height: 1.22;
}
.metric-switch button:hover,
.geography-switch button:hover {
  background: #f2f2f2;
}
.metric-switch button[aria-pressed="true"] {
  background: #171717;
  color: white;
  font-weight: 600;
}
.map-card .control-group button:focus-visible {
  outline-offset: -3px;
}
.key-items button.key-unit {
  padding: 0;
}
.key-items button.key-unit:hover {
  text-decoration: underline;
}
.geography-switch button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.geography-switch button[aria-pressed="true"] {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: 650;
}
.geography-switch svg {
  height: 1rem;
  width: 1rem;
}
.map-tools {
  justify-items: end;
}
.control-group #boundary {
  width: auto;
  padding: 0 9px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 650;
}
#boundary svg {
  width: 15px;
  height: 15px;
}
.district-links {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 9px 0;
}
.district-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  font-weight: 650;
  color: #363636;
  background: #f4f4f4;
  border: 1px solid #dedede;
  border-radius: 5px;
  padding: 5px 8px;
}
.district-link:hover {
  background: #f4f4f4;
}
.district-link svg {
  width: 15px;
  height: 15px;
}
.electorate-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 9px 0 13px;
}
.count-progress {
  border-radius: 3px;
  height: 6px;
  background: #f4f4f4;
  overflow: hidden;
}
.count-progress i {
  display: block;
  height: 100%;
  background: #1a1a1a;
}
.seat-summary {
  margin: 12px 0;
}
.seat-summary p {
  font-size: 0.8125rem;
  margin: 5px 0;
  color: var(--muted);
}
.district-lead {
  margin-top: 12px;
}
.district-lead strong {
  display: block;
}
.district-label {
  background: none;
  border: 0;
  text-align: center;
  white-space: nowrap;
  font: 700 12px/18px var(--sans);
  color: #101010;
  letter-spacing: 0.1px;
  text-shadow:
    1.4px 0 1px white,
    -1.4px 0 1px white,
    0 1.4px 1px white,
    0 -1.4px 1px white,
    0 0 5px white;
  pointer-events: none;
}

.count-context {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0.4rem 0 0;
  text-wrap: pretty;
}
.search-field input {
  font-size: 1rem;
  min-height: 2.65rem;
  height: auto;
}
.party-row,
.result-row strong,
.candidate-name,
.breakdown {
  font-size: 0.9375rem;
}
.breakdown th,
.candidate small,
.unit,
.stat span,
.key-title,
.key-unit,
.result-row small,
.small,
.updated,
.details-caption {
  font-size: 0.8125rem;
}
.candidate-name {
  line-height: 1.3;
}
.stat b,
.vote-stats b,
.lead-box b {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
}
.map-key,
.views,
.control-group,
.search-field,
.all-booths,
.district-link {
  border-radius: 3px;
}
.search-field {
  background: #fff;
}
.result-context-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  padding: 0.25rem 0;
}
.result-context-link:hover {
  color: #444;
}
.outcome-note {
  padding: 0.7rem 0;
  margin: 0.4rem 0 0.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}
.outcome-note p {
  margin: 0 0 0.35rem;
}
@container map (max-width:38rem) {
  .booth-control {
    display: grid;
    grid-template-rows: minmax(1.65rem, auto) minmax(2.75rem, auto);
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 0.1rem;
  }
  .booth-control > label {
    display: flex;
    align-items: center;
  }
  #booth-controls select {
    width: 100%;
    max-width: none;
    font-size: 1rem;
    height: 100%;
    min-height: 44px;
  }
  #booth-controls #map-party {
    width: 100%;
  }
  #booth-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    padding-block: 0.2rem;
    border-top: 1px solid var(--line);
    font-size: 0.8125rem;
    gap: 0.3rem;
  }
  .map-bar {
    display: grid;
    justify-content: stretch;
    gap: 0.12rem;
    padding: 0.25rem 0.45rem;
  }
  .metric-switch,
  .geography-switch {
    display: flex;
    flex-wrap: wrap;
  }
  .metric-switch button,
  .geography-switch button,
  .map-view-actions button {
    font-size: 0.8125rem;
    padding: 0.35rem 0.55rem;
    min-height: 44px;
  }
  .metric-switch {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    border-top: 1px solid #e3e3e3;
    padding-top: 0.1rem;
  }
  .metric-switch button {
    min-height: 2.65rem;
    text-wrap: balance;
  }
}
@media (max-width: 680px), (pointer: coarse) and (max-height: 520px) and (max-width: 960px) {
  .map-stage {
    flex: none;
    height: 67vh;
    height: 67svh;
  }
  .map-key {
    position: static;
    max-width: none;
    box-shadow: none;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: 0.45rem 0.8rem;
  }
  .map-key .key-title,
  .map-key .key-unit {
    font-size: 0.75rem;
  }
  .map-key .key-unit,
  .map-key .icon-tiny {
    min-height: 24px;
  }
  .map-tools .control-group button,
  .map-tools .control-group #boundary {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }
  #boundary svg {
    width: 19px;
    height: 19px;
  }
  .boundary-label {
    display: none;
  }
  .summary-stats .stat b {
    font-size: 1.85rem;
  }
}
@media (max-width: 380px) {
  .key-items {
    gap: 0.2rem 0.45rem;
  }
  .metric-switch button {
    font-size: 0.8rem;
    padding-inline: 0.35rem;
  }
}
@media (min-width: 410px) and (max-width: 460px) {
  .update-line,
  #update-toggle {
    gap: 0.18rem;
  }
  .update-line .status {
    font-size: 0.75rem;
  }
  #update-toggle {
    padding-inline: 0;
  }
  .brief-clock {
    gap: 0.125rem;
  }
}
@media (max-width: 409px) {
  .update-line .brief-label {
    display: none;
  }
  .update-line .brief-icon {
    display: inline-flex;
  }
  .update-line .brief-icon svg {
    width: 0.85rem;
    height: 0.85rem;
  }
  .update-line,
  #update-toggle {
    gap: 0.4rem;
  }
}
@media (max-width: 365px) {
  .update-line,
  #update-toggle {
    gap: 0.18rem;
  }
  .update-line .status {
    font-size: 0.75rem;
    gap: 0.2rem;
  }
  .update-line .status i {
    display: none;
  }
  #update-toggle {
    padding-inline: 0;
  }
  .brief-clock {
    gap: 0.1rem;
  }
  .update-line .brief-icon svg {
    width: 0.75rem;
  }
  .views button svg {
    display: none;
  }
}

.map-page-expanded,
.map-page-expanded body {
  overflow: hidden;
  overscroll-behavior: none;
}
.map-page-expanded .workspace {
  position: fixed;
  z-index: 1000;
  inset: var(--visible-top, 0px) 0 auto;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  height: 100vh;
  height: var(--visible-height, 100dvh);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  border: 0;
  border-radius: 0;
}
.map-page-expanded .workspace.results-open {
  grid-template-columns: minmax(0, 1fr) clamp(20rem, 32vw, 26rem);
}
.map-page-expanded .map-stage {
  flex: 1;
  height: auto;
}
.map-page-expanded .panel-body {
  min-height: 0;
  overflow-y: auto;
}
#close-fullscreen-results {
  margin-left: auto;
}
@media (max-width: 680px), (pointer: coarse) and (max-height: 520px) and (max-width: 960px) {
  #booth-controls select {
    min-height: 44px;
    height: 44px;
  }
  #booth-controls #circle-size {
    appearance: none;
    padding-inline: 0.5rem 1.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23242424' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 0.65rem auto;
    background-position: right 0.6rem center;
  }
  #map-party::picker-icon {
    content: "";
    flex: none;
    width: 0.45rem;
    height: 0.45rem;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: translate(-0.1rem, -0.1rem) rotate(45deg);
  }
  .map-navigation .geography-switch button,
  .map-view-actions button,
  #close-fullscreen-results {
    min-width: 44px;
    min-height: 44px;
  }
  .map-page-expanded .workspace.results-open {
    grid-template-columns: minmax(0, 1fr);
  }
  .map-page-expanded .panel {
    position: absolute;
    z-index: 4;
    inset: auto env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    height: 67%;
    border-radius: 0.6rem 0.6rem 0 0;
    box-shadow: 0 -3px 16px #0002;
  }
  .map-page-expanded .panel-head {
    padding: 0.45rem 0.85rem;
  }
  .map-page-expanded .count-context {
    display: none;
  }
  .map-page-expanded .search-field {
    margin-top: 0.25rem;
  }
  .map-page-expanded .search-field input {
    font-size: 1rem;
  }
  .map-page-expanded #key-items,
  .map-page-expanded #size-key {
    display: none;
  }
  .map-page-expanded .map-key {
    padding: 0 0.8rem;
  }
  .map-page-expanded #key-open {
    width: 44px;
    height: 44px;
  }
  .map-page-expanded .map-bar {
    display: grid;
    justify-content: stretch;
    padding: 0.25rem 0.45rem;
  }
  .map-page-expanded .map-navigation {
    flex-wrap: wrap;
  }
  .map-page-expanded .map-view-actions {
    width: 100%;
  }
  .map-page-expanded #fullscreen-settings {
    display: inline-flex;
    margin-right: auto;
  }
  .map-page-expanded .geography-switch {
    order: 1;
  }
  .map-page-expanded .workspace:not(.settings-open) :is(.geography-switch, #booth-controls, #count-controls) {
    display: none;
  }
}
@media (orientation: landscape) and (pointer: coarse) and (max-height: 520px) and (max-width: 960px) {
  .map-page-expanded .panel {
    inset: calc(3.4rem + env(safe-area-inset-top)) env(safe-area-inset-right) env(safe-area-inset-bottom) auto;
    width: min(24rem, 55%);
    height: auto;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
  }
}
@media (max-width: 350px) {
  #booth-controls select {
    font-family: system-ui, sans-serif;
  }
  #booth-controls #circle-size {
    padding-inline: 0.3rem 1.05rem;
    background-position: right 0.3rem center;
  }
  @supports (appearance: base-select) and selector(::picker(select)) {
    #booth-controls #map-party {
      padding-inline: 0.3rem;
      column-gap: 0.2rem;
    }
    #map-party selectedcontent {
      gap: 0.25rem;
    }
  }
}
@container map (max-width: 30rem) {
  #count-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
  }
  #count-controls button {
    min-height: 44px;
  }
}
