:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #252a30;
  background: #fff;
  font-size: 14px;
  line-height: 1.45;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  min-height: 76px;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid #dce0e4;
}
header > div:first-child {
  display: flex;
  align-items: center;
  gap: 32px;
}
h1 {
  font-size: 17px;
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}
nav {
  display: flex;
  gap: 4px;
}
nav a {
  padding: 6px 10px;
  color: #616871;
  text-decoration: none;
  border-radius: 3px;
}
nav a[aria-current] {
  color: #20252b;
  background: #eef0f2;
  font-weight: 600;
}
nav a:hover {
  background: #f3f4f5;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: #525b65;
  margin: 0 0 10px;
}
.controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
label {
  font-size: 12px;
  font-weight: 500;
  display: grid;
  gap: 5px;
  color: #555e68;
}
select,
button,
input {
  font: inherit;
  color: #252a30;
  border: 1px solid #cbd0d5;
  border-radius: 4px;
  background: #fff;
}
select,
button {
  font-size: 13px;
  padding: 7px 10px;
  min-height: 34px;
}
button {
  cursor: pointer;
  background: #f7f8f9;
  font-weight: 500;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button:hover:enabled {
  background: #eaecef;
}
select:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #3c6fa6;
  outline-offset: 2px;
}
main {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100dvh - 76px);
  min-height: 560px;
}
aside {
  padding: 22px 20px;
  overflow: auto;
  background: #fff;
  border-right: 1px solid #dce0e4;
}
.total strong {
  font-size: 30px;
  line-height: 1.2;
  display: block;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.total span,
.counts span {
  display: block;
  color: #69717a;
  font-size: 12px;
  margin-top: 3px;
}
.counts {
  display: flex;
  gap: 38px;
  margin: 18px 0;
}
.counts strong {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#status {
  font-size: 12px;
  color: #626b75;
  line-height: 1.55;
  min-height: 36px;
}
#status.error {
  color: #a53030;
}
section {
  border-top: 1px solid #e5e7ea;
  margin-top: 20px;
  padding-top: 16px;
}
h2 {
  font-size: 13px;
  margin: 0 0 12px;
  font-weight: 600;
}
.legend p {
  font-size: 12px;
  margin: 7px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #555e68;
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
#details p {
  font-size: 12px;
  line-height: 1.6;
  color: #626b75;
}
#details code {
  font-size: 11px;
  word-break: break-all;
}
dl {
  display: grid;
  grid-template-columns: 1fr auto;
  font-size: 12px;
  gap: 8px;
}
dd {
  margin: 0;
  font-weight: 500;
}
.note {
  font-size: 11px;
  line-height: 1.6;
  color: #747c85;
  margin-top: 20px;
}
.api-link {
  font-size: 12px;
  color: #45657e;
}
#map {
  height: 100%;
  min-height: 400px;
  background: #e9ecef;
}
.leaflet-container {
  font: inherit;
}
.leaflet-tooltip {
  font-size: 12px;
  padding: 7px 9px;
}
.leaflet-interactive:focus {
  outline: 2px solid #252a30;
}
.leaflet-control-zoom {
  box-shadow: none !important;
  border: 1px solid #bfc5cc !important;
}
.leaflet-control-zoom a {
  color: #39424c !important;
}
@media (max-width: 760px) {
  header {
    padding: 12px 16px;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  header > div:first-child {
    justify-content: space-between;
    gap: 12px;
  }
  .controls {
    width: 100%;
    align-items: flex-end;
  }
  .controls label {
    flex: 1;
  }
  main {
    height: auto;
    display: flex;
    flex-direction: column-reverse;
    min-height: 0;
  }
  #map {
    height: 55dvh;
    min-height: 340px;
  }
  aside {
    padding: 20px;
    overflow: visible;
    border-right: 0;
    border-top: 1px solid #dce0e4;
  }
  .counts {
    margin: 14px 0;
  }
  .total strong {
    font-size: 28px;
  }
}

/* Full-width navigation stays above both the sidebar and Leaflet controls. */
header {
  height: 64px;
  min-height: 64px;
  padding: 12px 20px;
}
.page-tabs {
  position: relative;
  z-index: 1100;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: 44px;
  background: #fff;
  border-bottom: 1px solid #dce0e4;
}
.page-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: #59636e;
  text-decoration: none;
}
.page-tabs a + a {
  border-left: 1px solid #e5e7ea;
}
.page-tabs a[aria-current="page"] {
  background: #f5f6f7;
  border-bottom-color: #364859;
  color: #252a30;
  font-weight: 600;
}
.page-tabs a:hover {
  background: #eef0f2;
}
main {
  height: calc(100dvh - 108px);
}
@media (max-width: 760px) {
  header {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
  }
  header .controls {
    width: auto;
  }
  main {
    height: auto;
  }
  .page-tabs {
    height: 44px;
  }
}
