.atlas-page {
  --map-base: #efeee5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}
.atlas-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-block: 25px 28px;
}
.atlas-heading,
.header-actions,
.side-top,
.dialog-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.atlas-heading {
  justify-content: space-between;
}
.atlas-heading h1 {
  font-size: clamp(1.9rem, 3.6vw, 3.45rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--dark);
}
.atlas-workspace {
  isolation: isolate;
  flex: 1;
  min-height: 535px;
  display: flex;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}
#controls {
  width: 284px;
  flex: none;
  background: var(--paper);
  padding: 20px 18px 17px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 802;
}
.side-top {
  justify-content: space-between;
  margin: 0 2px 13px;
}
h2 {
  font-size: 25px;
  letter-spacing: -0.035em;
}
.control-title,
fieldset.overlays legend,
.totals h3 {
  font-size: 12px;
  font-weight: 680;
  color: var(--muted);
  letter-spacing: 0.025em;
}
fieldset {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.atlas-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#themes {
  display: grid;
  gap: 6px;
}
.theme {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 9px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 8px;
  position: relative;
}
.theme:hover {
  background: var(--page);
}
.theme:has(input:checked) {
  background: #e9eee4;
  border-color: #aeb8ab;
}
.theme input {
  position: absolute;
  opacity: 0;
  width: 1px;
}
.theme:focus-within {
  outline: 2px solid var(--rust);
}
.theme strong,
.theme small {
  display: block;
}
.theme strong {
  font-size: 13px;
  font-weight: 650;
}
.theme small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.swatch {
  width: 24px;
  height: 25px;
  flex: none;
  border: 0;
  clip-path: polygon(50% 0, 97% 24%, 97% 75%, 50% 100%, 3% 75%, 3% 24%);
}
.solar {
  background: linear-gradient(135deg, #f7d798 0 36%, #e8a34c 36% 68%, #a94c28 68%);
}
.coverage {
  background: linear-gradient(135deg, #c1dfce 0 36%, #69b4a0 36% 68%, #227967 68%);
}
.shortlist {
  background: linear-gradient(135deg, #d9d2ea 0 36%, #ab93c9 36% 68%, #785498 68%);
}
.indicator {
  margin-left: auto;
  width: 13px;
  height: 13px;
  border: 1px solid #a4b3ad;
  border-radius: 50%;
  flex: none;
}
.theme input:checked ~ .indicator {
  background: var(--leaf);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--leaf);
}
.control-title {
  margin: 23px 0 7px;
}
#period {
  padding: 9px 10px;
  width: 100%;
  border: 1px solid #bfcdc7;
  border-radius: 6px;
  background: var(--paper);
  font-size: 13px;
}
.overlays {
  margin: 24px 0;
}
.overlays legend {
  margin-bottom: 6px;
}
.overlays label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin: 8px 0;
  cursor: pointer;
}
.overlays input {
  accent-color: var(--leaf);
  width: 16px;
  height: 16px;
  margin: 0;
}
.totals {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 16px 1px 0;
}
dl {
  margin: 8px 0 0;
}
dl div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 3px 0;
  align-items: baseline;
}
dt {
  color: var(--muted);
  font-size: 12px;
}
dd {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.map-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--map-base);
}
#map {
  position: absolute;
  inset: 0;
  background: var(--map-base);
  font-family: inherit;
}
.location,
.legend,
.map-status {
  position: absolute;
  z-index: 600;
  background: var(--paper);
  border: 1px solid #cbd4ce;
  border-radius: 5px;
  box-shadow: 0 2px 10px #21352b12;
}
.location {
  left: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 5px;
  color: var(--leaf);
}
.location span {
  font: 24px/1 Arial;
}
.location select {
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 600;
  width: 147px;
  padding: 9px 0;
}
.legend {
  left: 16px;
  bottom: 24px;
  width: min(320px, calc(100% - 78px));
  padding: 13px 15px;
}
.legend h3 {
  font-size: 14px;
  letter-spacing: -0.01em;
}
.legend small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin: 2px 0 8px;
}
.ramp,
.ticks {
  display: flex;
}
.ramp {
  height: 9px;
  overflow: hidden;
  border-radius: 2px;
}
.ramp i {
  flex: 1;
}
.ticks {
  position: relative;
  height: 16px;
  font: 10px/1.7 var(--mono);
  font-variant-numeric: tabular-nums;
}
.ticks span {
  position: absolute;
  transform: translateX(-50%);
}
.leg-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  margin-top: 5px;
}
.chip {
  display: inline-block;
  width: 14px;
  height: 9px;
  border: 1px solid #0002;
  border-radius: 2px;
}
.legend .hint {
  border-top: 1px solid var(--line);
  padding-top: 7px;
  margin: 8px 0 0;
}
.map-status {
  top: 66px;
  left: 16px;
  padding: 7px 12px;
  font-size: 12px;
}
#map-state:empty {
  display: none;
}
#map canvas {
  max-width: none;
}
.leaflet-container {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
}
.leaflet-top.leaflet-right {
  top: 5px;
  right: 5px;
}
.leaflet-control-zoom.leaflet-bar,
.leaflet-control.home {
  border: 1px solid #bac8c0;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 2px 7px #263f331a;
}
.leaflet-control-zoom a,
.leaflet-control.home button {
  color: var(--ink);
  background: var(--paper);
}
.leaflet-control.home button {
  width: 31px;
  height: 31px;
  border: 0;
  font-size: 20px;
  padding: 0;
}
.leaflet-control-attribution {
  font-size: 10px !important;
}
.leaflet-control-attribution button {
  font: inherit;
  color: var(--leaf);
  background: none;
  border: 0;
  padding: 0;
}
.leaflet-control-scale {
  margin: 0 10px 4px !important;
}
.leaflet-control-scale-line {
  background: #ffffffe6;
  color: var(--ink);
  font-size: 10px;
  border-color: #546964;
}
.place-label {
  white-space: nowrap;
  width: max-content !important;
  height: auto !important;
  pointer-events: none;
  text-align: center;
}
.place-label span {
  display: block;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: #475a56;
  font-weight: 550;
  text-shadow:
    0 0 3px #fff,
    1px 1px 2px #fff,
    -1px -1px 2px #fff;
}
.place-label.sector span {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #354945;
  font-weight: 750;
}
.place-label.street-name span {
  font-size: 11px;
  color: #5f6a65;
  font-style: italic;
  font-weight: 450;
}
.leaflet-popup-content-wrapper {
  border-radius: 5px;
  background: var(--paper);
}
.leaflet-popup-content {
  margin: 15px 19px 14px;
  color: var(--ink);
  font: 13px/1.4 var(--sans);
}
.leaflet-popup-content h3 {
  margin: 0 0 3px;
  font-size: 16px;
  letter-spacing: -0.025em;
}
.leaflet-popup-content .sub {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.leaflet-popup-content dl div {
  gap: 12px;
}
.leaflet-popup-content dt,
.leaflet-popup-content dd {
  font-size: 12px;
}
.leaflet-popup-content dd {
  text-align: right;
}
.leaflet-popup-content p {
  font-size: 12px;
  margin: 8px 0 0;
}
.inspect {
  margin-top: 10px;
}
dialog {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  width: min(560px, 92vw);
  max-height: 82dvh;
  line-height: 1.55;
  padding: 23px 27px;
  box-shadow: 0 12px 80px #172f3340;
}
dialog::backdrop {
  background: #172a2466;
}
.dialog-top {
  justify-content: space-between;
}
.dialog-top button,
.side-top button {
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
}
dialog p {
  font-size: 14px;
  margin: 10px 0 16px;
}
dialog h3 {
  font-size: 15px;
  margin-top: 20px;
}
details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  font-size: 13px;
}
summary {
  font-weight: 600;
}
dialog a {
  color: var(--leaf);
  text-decoration: underline;
  text-underline-offset: 3px;
}
#mobile-layers,
#mobile-close {
  display: none;
}
@media (max-width: 740px) {
  .atlas-page .wrap {
    width: calc(100% - 28px);
  }
  .atlas-main {
    gap: 12px;
    padding-block: 16px;
  }
  .atlas-heading {
    flex-wrap: wrap;
    align-items: start;
  }
  .header-actions {
    gap: 8px;
  }
  .atlas-workspace {
    min-height: 460px;
  }
  #mobile-layers,
  #mobile-close {
    display: inline-flex;
  }
  #controls {
    display: none;
    position: absolute;
    inset: 0 auto 0 0;
    max-width: 88%;
    box-shadow: 6px 0 20px #17372c22;
  }
  #controls.open {
    display: flex;
  }
  .location {
    left: 10px;
    top: 10px;
  }
  .legend {
    left: 10px;
    bottom: 25px;
    width: min(290px, calc(100% - 65px));
  }
  .totals {
    margin-top: 12px;
  }
}
