:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  color: #18313f;
  background: #eef3f5;
  --ink: #102a3b;
  --teal: #087769;
  --line: #dce6ea;
  --muted: #627786;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
a {
  color: #147969;
}
button,
input,
select,
summary {
  touch-action: manipulation;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid #169bc2;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
svg {
  width: 20px;
  height: 20px;
  flex: none;
}
header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100% - 1120px) / 2));
  background: var(--ink);
  color: white;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.brand-name {
  display: inline-flex;
  font-family: "Avenir Next", "Trebuchet MS", ui-rounded, sans-serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1;
}
.brand-name strong { font-weight: 900; }
.brand-lockup { display: flex; flex-direction: column; }
.brandmark {
  display: grid;
  place-items: center;
  background: #e33b4e;
  border-radius: 9px;
  width: 36px;
  height: 36px;
  font-size: 27px;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 500;
  color: #bacbd7;
  margin-top: 3px;
}
.info {
  font-size: 13px;
  min-height: 44px;
}
.search-panel {
  padding: 22px 24px 16px;
  background: white;
  max-width: 1168px;
  margin: auto;
}
.search-main {
  max-width: 100%;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 7px;
}
.address-row {
  display: flex;
  gap: 8px;
}
.searchbox {
  display: flex;
  align-items: center;
  border: 1px solid #c8d5dc;
  border-radius: 7px;
  flex: 1;
  min-width: 0;
  background: #fff;
}
.searchbox input {
  border: 0;
  background: none;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  outline: 0;
  font-size: 16px;
}
.searchbox button {
  font-size: 24px;
  width: 44px;
  height: 44px;
}
.primary {
  background: var(--teal);
  color: white;
  border-radius: 7px;
  min-height: 46px;
  padding: 10px 24px;
  font-weight: 650;
}
.address-row > .primary {flex:0 0 auto;padding-inline:16px;}
.search-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  font-size: 14px;
  color: var(--teal);
  font-weight: 650;
}
.settings {
  border-top: 1px solid var(--line);
  margin-top: 6px;
}
.settings summary {
  cursor: pointer;
  padding: 14px 0 2px;
  font-weight: 650;
  font-size: 14px;
}
.settings summary span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 10px;
}
.settings[open] summary {
  padding-bottom: 18px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "model radius" "model buffer" "search search";
  gap: 12px;
}
.model-setting { grid-area: model; display: flex; flex-direction: column; min-width: 0; }
.radius-setting { grid-area: radius; min-width: 0; }
.buffer-setting { grid-area: buffer; min-width: 0; }
.search-setting { grid-area: search; min-width: 0; }
.model-setting .aircraft-picker { flex: 1; }

select {
  min-height: 44px;
  border: 1px solid #c9d6dc;
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  font-size: 14px;
}
.numberbox {
  display: flex;
  align-items: center;
  border: 1px solid #c9d6dc;
  border-radius: 6px;
  height: 44px;
  padding-right: 12px;
}
.numberbox input {
  border: 0;
  min-width: 0;
  width: 100%;
  padding: 10px;
  background: none;
}
.footprint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  margin-top: 16px;
  padding: 12px;
  background: #edf6f3;
  border-radius: 6px;
}
.footprint > span { font-size: 12px; line-height: 1.3; }
.footprint strong { font-size: 22px; white-space: nowrap; }
.footprint small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; line-height: 1.5; }
#suggestions {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px;
  margin-top: 5px;
}
#suggestions button {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: left;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
}
#suggestions button:hover {
  background: #eef6f3;
}
.workspace {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: white;
  border-top: 1px solid var(--line);
  max-width: 1600px;
  margin: auto;
}
#map {
  position: relative;
  flex: 0 0 50%;
  min-height: 280px;
  max-height: 560px;
  background: #e5eeec;
  overflow: hidden;
}
#mapCanvas {
  position: absolute;
  inset: 0;
}
.map-top {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 16px;
  right: 68px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.map-pill {
  max-width: calc(100% - 140px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #fffffff0;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: 0 2px 10px #102a3b15;
}
.map-top button {
  margin-left: auto;
  pointer-events: auto;
  font-size: 13px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 6px;
  white-space: nowrap;
}
.map-tools {
  position: absolute;
  z-index: 2;
  top: 66px;
  left: 16px;
  display: flex;
  gap: 6px;
}
.map-tools select,
.map-tools button {
  background: white;
  border: 1px solid #cbdadf;
  border-radius: 6px;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  box-shadow: 0 2px 8px #102a3b10;
}
.map-tools button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.map-tools select {
  width: 165px;
}
.tap-help {
  position: absolute;
  pointer-events: none;
  bottom: 34px;
  right: 12px;
  font-size: 12px;
  background: #fffffff0;
  color: #385566;
  padding: 5px 8px;
  border-radius: 4px;
}
#locationStatus {
  position: absolute;
  z-index: 2;
  bottom: 58px;
  left: 16px;
  font-size: 12px;
  background: #fffffff0;
  border-radius: 4px;
  max-width: 85%;
  padding: 5px 8px;
}
#locationStatus:empty {
  display: none;
}
#mapFallback {
  position: absolute;
  z-index: 3;
  bottom: 84px;
  left: 16px;
  background: #fff0d6;
  padding: 10px;
  border-radius: 5px;
  font-size: 13px;
  max-width: 80%;
}
.map-marker {
  width: 33px;
  height: 33px;
  background: #fff;
  color: var(--teal);
  border: 2px solid var(--teal);
  border-radius: 50%;
  font-weight: 750;
  font-size: 14px;
  box-shadow: 0 2px 8px #102a3b40;
}
.map-marker.selected {
  width: 40px;
  height: 40px;
  background: var(--teal);
  border-color: white;
  color: white;
}
.map-marker.muted {
  color: #6b7c85;
  border-color: #92a2ab;
  background: #f3f5f6;
}
.map-marker.excluded {background:#e4e9eb;color:#60747e;border-color:#81939d;}
.incident-marker {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid white;
  border-radius: 50%;
  background: #e43e4c;
  color: white;
  font-size: 24px;
  font-weight: 800;
}
.maplibregl-ctrl-attrib {
  font-size: 11px !important;
}
.maplibregl-ctrl-top-right {
  top: 8px;
}
.list-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f2f6f8;
  scrollbar-gutter: stable;
}
.list-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #fffffffa;
  backdrop-filter: blur(12px);
  padding: 14px max(22px, calc((100% - 1080px) / 2));
  border-bottom: 1px solid var(--line);
}
.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.tabs button {
  padding: 2px 0 12px;
  min-height: 38px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  border-bottom: 2px solid transparent;
}
.tabs button[aria-pressed="true"] {
  color: var(--teal);
  border-color: var(--teal);
}
.tabs span {
  font-size: 12px;
  background: #e9f0f2;
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 4px;
}
.filters {
  display: flex;
  gap: 12px;
}
.filters > div {
  flex: 1;
  max-width: 320px;
}
.filters label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.filters select {
  min-height: 38px;
  padding: 6px 10px;
  font-size: 13px;
}
#status {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 8px;
}
#status:empty {
  display: none;
}
#status.error {
  color: #934220;
  background: #fff0e8;
  border-radius: 5px;
  padding: 8px;
}
.list-content {
  max-width: 1124px;
  margin: auto;
  padding: 18px 22px 24px;
}
.candidate {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}
.candidate.active {
  border-color: #198b79;
  box-shadow: 0 0 0 1px #198b7910;
}
.candidate-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
}
.number {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #e2f3ed;
  color: var(--teal);
  font-weight: 800;
  flex: none;
  font-size: 15px;
}
.place-title {
  flex: 1;
  min-width: 0;
}
.place-title > strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 7px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #edf3f5;
  color: #4e6977;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.2;
  white-space: nowrap;
}
.badge svg {
  width: 15px;
  height: 15px;
}
.transport-badge {
  background: #eaf2fa;
  color: #34658a;
}
.distance {
  flex: none;
  min-width: 110px;
  text-align: right;
}
.distance > strong {
  display: block;
  font-size: 27px;
  letter-spacing: -1px;
  color: #173f50;
  line-height: 1.1;
}
.distance small {
  font-size: 16px;
  letter-spacing: 0;
  font-weight: 500;
}
.distance > span {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.score {
  text-align: center;
  border-left: 1px solid var(--line);
  padding-left: 16px;
  min-width: 55px;
  font-size: 22px;
  color: var(--teal);
  font-weight: 700;
}
.score small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.expand {
  color: #7d929d;
  margin-left: 3px;
}
.active .expand {
  transform: rotate(180deg);
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 20px 15px 67px;
}
.fit-label {
  font-size: 13px;
  color: #237567;
}
.candidate.buffer,
.candidate.excluded {
  background: #f4f6f7;
  border-color: #dfe5e9;
}
.candidate.buffer .candidate-head,
.candidate.buffer .card-bottom {
  opacity: 0.62;
}
.candidate.buffer .number,
.candidate.review .number,
.candidate.excluded .number {
  background: #e7ebed;
  color: #667c86;
}
.candidate.review .fit-label {
  color: #926227;
}
.candidate.buffer .fit-label,
.candidate.excluded .fit-label {
  color: #677981;
}
.candidate.review .score,
.candidate.buffer .score {
  color: #73858e;
}
.place-details {
  padding: 0 22px 18px 67px;
  border-top: 1px solid var(--line);
}
.coordinates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #436170;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
  margin: 12px 0;
}
.coordinates > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.coordinates button {
  min-width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
}
.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.detail-stats label {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.detail-stats strong {
  font-size: 19px;
}
.checks {
  padding-left: 18px;
  margin: 16px 0;
  color: #435f6d;
  font-size: 14px;
  line-height: 1.6;
}
.checks li {
  padding-left: 3px;
  margin-bottom: 5px;
}
.detail-actions {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
  margin-top: 15px;
}
.detail-actions button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #d3e1e6;
  border-radius: 6px;
  font-size: 13px;
  background: #f7fafb;
  min-width: 0;
  white-space: nowrap;
}
.detail-actions button[data-action=retry] {grid-column:1/-1;}
.detail-actions .save-button {
  color: var(--teal);
  background: #edf6f2;
  border-color: #cbe2d8;
}
.muted,
.source-line {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.route-line {
  font-size: 14px;
  color: #3b6378;
  line-height: 1.6;
}
.score-details {
  margin-top: 18px;
  font-size: 13px;
}
.score-details summary {
  cursor: pointer;
  color: var(--teal);
  font-weight: 600;
}
.score-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  max-width: 380px;
  margin: 14px 0;
}
.source-line {
  margin-bottom: 0;
}
.terrain-panel {
  margin-top: 16px;
  padding: 14px;
  background: #f3f7f6;
  border-radius: 7px;
}
.terrain-panel svg {
  display: block;
  width: min(100%, 480px);
  height: 145px;
}
.terrain-panel small {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  display: block;
}
.terrain-stats {
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.terrain-stats strong {
  font-size: 23px;
}
.terrain-stats span {
  font-size: 13px;
}
.group-heading,
#reviewSection > summary {
  font-size: 14px;
  font-weight: 650;
  color: #637a87;
  padding: 18px 2px 12px;
}
.group-heading span,
#reviewSection > summary span {
  margin-left: 6px;
  font-size: 12px;
}
#reviewSection > summary {
  cursor: pointer;
}
#reviewSection[open] {
  margin-bottom: 14px;
}
.empty-results {
  padding: 20px;
  line-height: 1.6;
  color: var(--muted);
  font-size: 15px;
  background: white;
  border: 1px dashed #cddbe2;
  border-radius: 9px;
}
.list-footer {
  text-align: center;
  font-size: 12px;
  color: #81939d;
  margin: 20px 0 0;
}
#inspection {
  background: #fff;
  border: 1px solid #b4cfd6;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
}
.inspection-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.3px;
  color: var(--muted);
  font-weight: 650;
}
h2 {
  font-size: 19px;
  margin: 5px 0 0;
}
.inspection-head button {
  min-height: 40px;
  min-width: 40px;
}
.inspection-metrics {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.inspection-metrics b {
  display: block;
  font-size: 17px;
  color: var(--ink);
  margin-top: 4px;
}
.reason-list {
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.5;
}
.reason-list li {
  margin: 12px 0;
}
.reason-list p {
  margin: 4px 0;
  color: var(--muted);
}
code {
  font-size: 11px;
  overflow-wrap: anywhere;
  background: #eef3f5;
  padding: 2px 5px;
  border-radius: 3px;
}
dialog {
  border: 0;
  border-radius: 12px;
  max-width: 650px;
  width: calc(100% - 30px);
  padding: 26px;
  color: var(--ink);
  box-shadow: 0 20px 100px #102a3b60;
}
dialog::backdrop {
  background: #102a3b99;
}
.dialoghead {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.iconbtn {
  min-height: 40px;
  min-width: 40px;
  font-size: 24px;
}
dialog p {
  font-size: 14px;
  line-height: 1.7;
}
.infogrid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 15px;
  font-size: 13px;
  line-height: 1.7;
  margin: 20px 0;
}
.infogrid span {
  color: var(--muted);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
@media (max-width: 700px) {
  header {
    height: 60px;
    padding: 0 16px;
  }
  .brand {
    font-size: 21px;
  }
  .brand small {
    font-size: 9px;
  }
  .brand-name { font-size: 24px; }
  .info {
    font-size: 12px;
  }
  .search-panel {
    padding: 16px;
  }
  .settings summary span {
    display: block;
    margin: 6px 0 0 15px;
  }
  .settings-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .footprint {
    flex-wrap: wrap;
    gap: 8px;
  }
  .footprint small {
    width: 100%;
  }
  .workspace {
    height: 100dvh;
  }
  #map {
    flex-basis: 44%;
    min-height: 260px;
    max-height: 440px;
  }
  .map-top {
    left: 10px;
    top: 10px;
  }
  .map-pill {
    max-width: calc(100% - 95px);
    font-size: 12px;
    padding: 9px;
  }
  .map-top button {
    font-size: 11px;
    padding: 9px 7px;
  }
  .map-tools {
    left: 10px;
    top: 55px;
    gap: 4px;
  }
  .map-tools select {
    width: 137px;
    font-size: 13px;
  }
  .map-tools button {
    padding: 7px 10px;
  }
  .tap-help {
    font-size: 10px;
    bottom: 29px;
    right: 6px;
    padding: 4px;
  }
  .list-toolbar {
    padding: 10px 14px;
  }
  .tabs {
    gap: 20px;
    margin-bottom: 9px;
  }
  .tabs button {
    font-size: 14px;
  }
  .filters {
    gap: 8px;
  }
  .filters select {
    font-size: 12px;
    padding: 5px 7px;
    min-height: 35px;
  }
  .filters label {
    font-size: 11px;
  }
  #status {
    font-size: 11px;
  }
  .list-content {
    padding: 12px 12px 24px;
  }
  .candidate-head {
    padding: 14px 12px;
    gap: 9px;
  }
  .number {
    width: 27px;
    height: 29px;
    font-size: 13px;
  }
  .place-title > strong {
    font-size: 15px;
    margin-bottom: 6px;
  }
  .badge {
    font-size: 11px;
    padding: 4px 6px;
    gap: 4px;
  }
  .badge svg {
    width: 14px;
    height: 14px;
  }
  .distance {
    min-width: 67px;
  }
  .distance > strong {
    font-size: 25px;
  }
  .distance small {
    font-size: 13px;
  }
  .distance > span {
    font-size: 10px;
  }
  .score {
    padding-left: 8px;
    min-width: 39px;
    font-size: 19px;
  }
  .expand {
    display: none;
  }
  .card-bottom {
    padding: 0 12px 12px 48px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 7px;
  }
  .fit-label {
    font-size: 12px;
  }
  .place-details {
    padding: 0 14px 16px;
  }
  .coordinates {
    font-size: 12px;
  }
  .detail-stats {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .checks {
    font-size: 13px;
  }
  .detail-actions button {
    font-size: 12px;
  }
  .infogrid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .infogrid span {
    margin-bottom: 10px;
  }
  .search-actions {
    align-items: flex-start;
  }
  .search-actions .text-button {
    font-size: 13px;
  }
  .maplibregl-ctrl-attrib {
    font-size: 10px !important;
  }
  .inspection-metrics {
    gap: 14px;
  }
  .reason-list {
    font-size: 13px;
  }
  .list-footer {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

#eligibilitySummary {
  font-size: 12px;
  color: #647c89;
  line-height: 1.5;
  margin-top: 8px;
}
#eligibilitySummary:empty {
  display: none;
}

.category-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.category-badges .badge {
  max-width: 100%;
}

#analysisNotice {
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 10px;
  margin-top: 8px;
  border-left: 3px solid #b07725;
  background: #fff6e7;
  color: #745014;
}

.transport-badge.pickup {
  color: #9a4e0a;
  background: #fff0db;
  border: 1px solid #f1c788;
}
.map-marker.recommended {
  background: #087769;
  border-color: #fff;
  color: #fff;
}
.map-marker.muted {
  background: #d4efdc;
  color: #164d36;
  border-color: #397851;
}
.infrastructure-marker {
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 7px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 0;
  box-shadow: 0 2px 6px #102b3a30;
  cursor: pointer;
}
.infrastructure-marker svg {
  display: block;
  width: 19px;
  height: 19px;
}
/* Layer controls share the map toolbar; the menu is anchored to its full width. */
.infrastructure-control {
  flex: 0 0 44px;
  width: 44px;
  margin: 0;
}
.infrastructure-control summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  list-style: none;
  background: white;
  border: 1px solid #cbdadf;
  border-radius: 6px;
  box-shadow: 0 2px 8px #102a3b10;
}
.infrastructure-control summary::-webkit-details-marker { display: none; }
.infrastructure-control[open] summary { background: var(--ink); color: white; }
.infrastructure-control svg { width: 20px; height: 20px; }
.layer-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(280px, 100%);
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 18px #102a3b25;
}
.layer-options label { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13px; margin: 0; }
.layer-options span { display: flex; }
.incident-address { display: flex; min-width: 0; max-width:min(460px,100%); align-items: stretch; background: #fffffff0; border-radius: 6px; box-shadow: 0 2px 10px #102a3b15; }
.incident-address .map-pill { flex: 1; min-width: 0; max-width: none; background: none; box-shadow: none; align-self: center; }
.map-top .incident-address button { flex: 0 0 44px; width: 44px; min-height: 44px; padding: 10px; margin: 0; display: grid; place-items: center; border-left: 1px solid var(--line); border-radius: 0 6px 6px 0; }
.map-tools button:disabled, .map-top button:disabled { opacity: .4; cursor: default; }
.incident-marker { padding: 0; line-height: 1; }
.incident-marker svg { width: 22px; height: 22px; display: block; }
.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner { max-width: min(360px, calc(100vw - 70px)); max-height: 150px; overflow-y: auto; }
.maplibregl-popup-content {
  font-family: inherit;
  max-width: 240px;
}
.maplibregl-popup-content p {
  margin: 6px 0;
}
.maplibregl-popup-content a {
  font-size: 12px;
}

/* Operational hierarchy: compact labels, fixed geometry and prominent distance. */
.candidate-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 0;
}
.candidate-row {display:grid;grid-template-columns:33px minmax(0,1fr);align-items:start;gap:14px;padding:18px 20px;}
.priority-rail {display:flex;flex-direction:column;align-items:center;gap:7px;}
.priority-rail .number {padding:0;cursor:pointer;}
.place-title {
  min-width: 0;
}
.place-title > strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.candidate.active .place-title > strong {
  white-space: normal;
  overflow: visible;
}
.size-metric {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  text-align: right;
  white-space: nowrap;
  color: #436170;
  border-left: 1px solid var(--line);
  padding-left: 12px;
}
.size-metric strong {
  font-size: 20px;
  display: block;
}
.size-metric small {
  font-size: 13px;
}
.size-copy {display:block;}
.size-metric .size-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.expand {
  display: none;
}
.card-bottom {
  display: block;
  padding-left: 67px;
  align-items: center;
  gap: 8px;
}
.card-bottom:empty {
  display: none;
}
.notice-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.card-bottom .notice-tags {min-width:0;}
.category-badges .access-tag {padding:5px 8px;line-height:1.2;}
.category-badges .badge,.category-badges .notice-tag,.saved-label,.transport-badge {white-space:nowrap;}
.notice-tags:empty {
  display: none;
}
.notice-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 5px;
  padding: 4px 7px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.notice-tag.warning {
  background: #fff0d8;
  color: #894606;
  border-color: #efd1a1;
}
.notice-tag.danger {
  background: #fce7e8;
  color: #9b2632;
  border-color: #eeb9be;
}
.notice-tag.neutral {
  background: #edf2f4;
  color: #49616e;
  border-color: #dce4e8;
}
#inspection .notice-tags {
  margin: 14px 0;
}
.candidate.saved-place {
  background: #edf6ff;
  border-color: #adcde5;
}
.saved-label {
  font-size: 12px;
  color: #315e82;
  font-weight: 600;
}
.candidate.review .number {
  background: #d4efdc;
  color: #164d36;
}
.map-marker.selected {
  box-shadow:
    0 0 0 3px #173644,
    0 3px 9px #102a3b44 !important;
  z-index: 2;
}
.map-marker {
  font-weight: 800;
  text-shadow: none !important;
}
.map-tools {
  right: 64px;
  flex-wrap: wrap;
}
.map-tools select {
  width: auto;
  max-width: 160px;
}
.map-tools .compass-select {
  width: 57px;
  min-width: 57px;
  padding: 7px;
}
@media (max-width: 700px) {
  .candidate-row {grid-template-columns:27px minmax(0,1fr);gap:9px;padding:16px 12px;}
  .candidate-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
  }
  .place-title {
    grid-column: 1;
    grid-row: 1;
  }
  .distance {
    grid-column: 2;
    grid-row: 1;
  }
  .size-metric {
    grid-column: 1/3;
    grid-row: 2;
    text-align: left;
    padding: 0;
    border: 0;
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
    align-items: baseline;
  }
  .size-metric strong {
    font-size: 16px;
  }
  .size-metric > span {
    font-size: 12px;
  }
  .card-bottom {
    padding: 0 12px 12px 48px;
  }
  .badge {
    font-size: 12px;
  }
  .filters label {
    font-size: 12px;
  }
  .filters select {
    font-size: 14px;
    min-height: 42px;
  }
  .map-tools select,
  .map-tools button {
    font-size: 13px;
    min-height: 40px;
  }
  .map-tools select {
    max-width: 130px;
  }
  .map-tools .compass-select {
    max-width: 57px;
  }
  .map-marker {
    min-width: 38px;
    min-height: 38px;
  }
  .place-title > strong {
    font-size: 16px;
  }
  .distance > span {
    font-size: 12px;
  }
}

@media (max-width: 700px) {
  .map-top { right: 52px; gap: 6px; }
  .incident-address { flex: 1; }
  .map-tools { right: 52px; gap: 4px; flex-wrap: nowrap; align-items: center; }
  .map-tools #mapStyle { flex: 1; min-width: 0; max-width: 140px; width: 90px; padding: 7px; }
  .map-tools #view3d { flex: 0 0 44px; padding: 7px; height: 44px; }
  .map-tools .compass-select { flex: 0 0 48px; min-width: 48px; width: 48px; height: 44px; padding: 6px; }
  .maplibregl-ctrl-top-right { top: 0; }
}
@media (max-width: 700px) and (max-height: 500px) {
  #map { min-height: 180px; flex-basis: 44%; }
}

/* Results adapt to their own available width, including the desktop side panel. */
.list-panel { container: results / inline-size; min-width: 0; }
.filters > div { min-width: 0; }
.filters select { width: 100%; min-width: 0; }
@container results (max-width: 520px) {
  .list-toolbar { padding: 12px 14px; }
  .list-content { padding: 14px; }
  .tabs { gap: 18px; }
  .tabs button { font-size: 14px; }
  .candidate-row {grid-template-columns:28px minmax(0,1fr);gap:9px;padding:16px 12px;}
  .candidate-head { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 0; }
  .place-title { grid-column: 1; grid-row: 1; }
  .place-title > strong { font-size: 16px; }
  .distance { grid-column: 2; grid-row: 1; }
  .size-metric { grid-column: 1 / 3; grid-row: 2; display: flex; align-items: center; justify-content:space-between; width:100%; gap: 8px; padding: 0; border: 0; text-align: left; }
  .size-metric strong { font-size: 16px; }
  .size-metric > span { font-size: 12px; }
  .card-bottom { padding: 0 12px 14px 49px; }
  .badge { font-size: 12px; }
  .category-badges :is(.badge,.notice-tag) {font-size:11px;padding:4px 6px;}
  .detail-stats { grid-template-columns: 1fr 1fr; }
}
/* Tablet portrait retains the full-width map above independently scrolling results. */
@media (min-width: 701px) and (max-width: 1023px) {
  #map { flex-basis: 48%; min-height: 320px; max-height: 520px; }
  .search-panel { padding: 20px 24px 16px; }
}
/* iPad landscape and desktop reserve the main workspace for the map. */
@media (min-width: 1024px) and (min-height: 600px) and (orientation: landscape) {
  .workspace { display: grid; grid-template-columns: minmax(0, 1fr) 400px; }
  #map { min-height: 0; max-height: none; height: 100%; }
  .list-panel { border-left: 1px solid var(--line); }
  .map-top { right: 64px; }
  .incident-address { max-width: min(460px,100%); }
  .map-tools { flex-wrap: nowrap; }

}
@media (min-width: 1440px) and (min-height: 600px) and (orientation: landscape) {
  .workspace { grid-template-columns: minmax(0, 1fr) 440px; }
}
@media (max-height: 599px) and (min-width: 701px) {
  #map { flex-basis: 48%; min-height: 210px; max-height: 300px; }
}

/* Consistent inset for dropdown indicators across browsers and screen sizes. */
select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23436170' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
}
#mapStyle { padding-right: 32px; }
#bearing { padding-right: 22px; background-position: right 6px center; background-size: 12px; }
@media (forced-colors: active) {
  select:not([multiple]) { appearance: auto; -webkit-appearance: auto; background-image: none; padding-right: 8px; }
}

@media (min-width: 1024px) and (min-height: 600px) and (orientation: landscape) {
  body {
    display: grid;
    grid-template-rows: 68px auto minmax(360px, 1fr);
    height: 100dvh;
  }
  header { padding-inline: max(24px, calc((100% - 1552px) / 2)); }
  .search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    column-gap: 28px;
    width: 100%;
    max-width: 1600px;
    padding: 16px 24px 12px;
    margin: 0 auto;
  }
  .search-main { min-width: 0; }
  .search-actions { margin-top: 4px; }
  .settings { margin-top: 0; padding-left: 24px; border-top: 0; border-left: 1px solid var(--line); }
  .settings summary { padding-top: 0; min-height: 44px; }
  .settings summary span { display: block; margin: 8px 0 0; line-height: 1.5; }

  .workspace { width: 100%; height: 100%; min-height: 0; }
  .map-top { top: 16px; }
  .map-tools { top: 72px; }
}

.aircraft-picker { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 68px; padding: 8px 12px; text-align: left; border: 1px solid #c9d6dc; border-radius: 7px; background: #f8fafb; }
.aircraft-picker img { width: 92px; height: 50px; object-fit: contain; }
.aircraft-picker span { min-width: 0; }
.aircraft-picker strong, .aircraft-picker small { display: block; }
.aircraft-picker small { margin-top: 4px; font-size: 11px; color: var(--muted); }
.aircraft-picker::after { content: '⌄'; margin-left: auto; color: var(--muted); }
#modelDialog { width: min(760px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); padding: 22px; overflow: auto; }
.aircraft-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.aircraft-dialog-head h2 { font-size: 20px; margin: 0; }
.aircraft-dialog-head button { width: 44px; height: 44px; font-size: 28px; }
.aircraft-groups h3 { font-size: 12px; letter-spacing: .1em; color: var(--muted); margin: 20px 0 10px; }
.aircraft-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.aircraft-option { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #f7f9fa; text-align: left; }
.aircraft-option img { display: block; width: 100%; height: 94px; object-fit: contain; margin-bottom: 10px; }
.aircraft-option strong { font-size: 14px; }
.aircraft-option[aria-pressed=true] { background: #e7f4f0; border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.brand small { font-size: 8px; letter-spacing: 1.2px; }
@media(max-width:520px) { .aircraft-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } #modelDialog { padding: 16px; } .aircraft-option img { height: 80px; } }
@media(min-width:1024px) and (min-height:600px) and (orientation:landscape) { .aircraft-picker { flex-wrap: wrap; justify-content: center; gap: 4px; padding: 8px; } .aircraft-picker img { width: 100%; height: 54px; } .aircraft-picker::after { display:none; } .aircraft-picker span { width:100%; text-align:center; } }

/* One model tile spans both numeric controls; identical order at every width. */
.model-setting .aircraft-picker { flex-direction: column; justify-content: center; gap: 5px; padding: 10px; }
.model-setting .aircraft-picker img { width: 100%; height: 62px; }
.model-setting .aircraft-picker span { width: 100%; text-align: center; }
.model-setting .aircraft-picker::after { display: none; }

.aircraft-option small { display:block; margin-top:5px; font-size:11px; color:var(--muted); }
.aircraft-filter { width:100%; }
.aircraft-legacy { margin-top:12px; }
.aircraft-legacy summary { font-size:12px; color:var(--muted); cursor:pointer; padding:8px 0; }


.quality-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px 12px; font-size:12px; line-height:1.5; }
.quality-grid dt { color:var(--muted); }
.quality-grid dd { margin:0; }

.context-panel { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: white; }
.context-panel summary { cursor: pointer; font-weight: 700; }
.context-panel code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 8px; }
.weather-meta { margin: 14px 0 10px; font-size: 12px; color: var(--muted); }
.weather-preview {float:right;max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:12px;color:var(--muted);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;}
.weather-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 10px; }
.weather-grid span { font-size: 12px; color: var(--muted); }
.weather-grid b { display: block; color: var(--ink); font-size: 15px; margin-top: 4px; }
.weather-stale { color: #985607; }
.weather-content > small { display: block; color: var(--muted); margin-bottom: 12px; }

.context-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; }
.context-actions .text-button { min-height:36px; padding:6px 0; font-size:13px; }
#networkStatus { font-size:12px; color:#985607; }

.search-here { position:absolute; z-index:2; bottom:42px; left:50%; transform:translateX(-50%); max-width:calc(100% - 40px); white-space:nowrap; background:var(--teal); color:white; min-height:44px; padding:10px 18px; border-radius:24px; font-size:13px; font-weight:700; box-shadow:0 3px 15px #102a3b40; }

.compare-toggle {display:grid;place-items:center;color:var(--muted);width:28px;height:24px;padding:0;border:1px solid transparent;border-radius:12px;font-size:9px;font-weight:800;letter-spacing:.35px;line-height:1;}
.compare-toggle[aria-pressed=true] {background:#e2f3ed;color:#087769;border-color:#087769;}
.navigation-options {border-top:1px solid var(--line);padding-top:12px;margin-top:14px;font-size:13px;}
.navigation-options summary {cursor:pointer;min-height:36px;}
.navigation-options div {display:flex;flex-wrap:wrap;gap:8px 18px;}
.navigation-options a {padding:10px 0;}
#compareDialog {max-width:980px;max-height:calc(100dvh - 32px);overflow:auto;}
#comparisonTable {overflow-x:auto;margin-top:18px;}
#comparisonTable table {border-collapse:collapse;width:100%;min-width:560px;font-size:13px;line-height:1.5;}
#comparisonTable th,#comparisonTable td {padding:14px 12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line);min-width:150px;}
#comparisonTable thead th {background:#edf6f3;}
#comparisonTable tbody th {font-weight:500;color:var(--muted);}
#comparisonTable small {display:block;color:var(--muted);}
#comparisonTable .text-button {display:flex;font-size:12px;margin-top:4px;}

#notesForm {margin-top:20px;} #notesForm input,#notesForm textarea {font:inherit;width:100%;border:1px solid var(--line);border-radius:6px;background:white;color:var(--ink);padding:10px;margin-bottom:16px;font-size:16px;}
.personal-notes {margin:14px 0;padding:14px;background:#edf6ff;border-radius:8px;font-size:13px;}
.personal-notes h3 {font-size:13px;margin:0 0 10px;}
.personal-notes p {margin:8px 0;}
.personal-notes b,.personal-notes span {display:block;white-space:pre-wrap;overflow-wrap:anywhere;}

.header-actions {display:flex;align-items:center;gap:16px;font-size:12px;} .header-actions button {min-height:44px;}
.method-metrics {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:18px 0;}
.method-metrics[hidden] {display:none;}
.national-inventory {display:grid;grid-template-columns:1fr auto;align-items:end;gap:2px 16px;margin:18px 0;padding:14px 16px;border:1px solid var(--line);border-radius:8px;background:#f7fafb;}
.national-inventory span,.national-inventory small {color:var(--muted);font-size:11px;}
.national-inventory strong {font-size:24px;line-height:1.1;font-variant-numeric:tabular-nums;}
.national-inventory b {grid-column:2;grid-row:1 / span 3;align-self:center;color:var(--teal);font-size:12px;white-space:nowrap;}
.method-metrics div {padding:10px 12px;border:1px solid var(--line);border-radius:7px;background:#f7fafb;}
.method-metrics dt {font-size:11px;color:var(--muted);}
.method-metrics dd {margin:4px 0 0;font-size:16px;font-weight:750;font-variant-numeric:tabular-nums;}
.method-metrics small {display:block;margin-top:3px;color:var(--muted);font-size:9px;line-height:1.25;}
:root[data-theme=night] {color-scheme:dark;--ink:#d9e7ef;--teal:#57c4aa;--line:#354b59;--muted:#a3b7c4;color:#d9e7ef;background:#101c25;}
[data-theme=night] header {background:#101c25;}
[data-theme=night] .brand,[data-theme=night] .brand-name {color:#fff;}
[data-theme=night] .method-metrics div {background:#192c38;}
[data-theme=night] .national-inventory {background:#192c38;}
[data-theme=night] :is(.search-panel,.workspace,.list-toolbar,.candidate,.context-panel,#inspection,dialog,.searchbox,.numberbox,select,.aircraft-picker,.aircraft-option,.layer-options,.infrastructure-control summary,.map-top button,.map-tools button,.map-pill,.incident-address,#locationStatus,.maplibregl-popup-content,#notesForm input,#notesForm textarea) {background:#192c38;color:#d9e7ef;border-color:#354b59;}
[data-theme=night] :is(.list-panel,body) {background:#101c25;}
[data-theme=night] :is(.distance>strong,.weather-grid b,.inspection-metrics b) {color:#e0edf3;}
[data-theme=night] :is(.number,.footprint,.compare-toggle[aria-pressed=true],.aircraft-option[aria-pressed=true]) {background:#1c483d;color:#8de4bd;}
[data-theme=night] :is(.candidate.saved-place,.personal-notes) {background:#1b354c;border-color:#416684;}
[data-theme=night] .saved-label {color:#9dc7eb;}
[data-theme=night] .notice-tag.warning,[data-theme=night] .transport-badge.pickup,[data-theme=night] #mapFallback {background:#48351c;color:#ffd28f;border-color:#896538;}
[data-theme=night] .notice-tag.danger {background:#4a252d;color:#ffb2bf;border-color:#a35866;}
[data-theme=night] .notice-tag.neutral {background:#293f4d;color:#c3d8e5;border-color:#466071;}
[data-theme=night] .transport-badge {background:#233f57;color:#b0d7f6;}
[data-theme=night] .category-badges .badge {background:#293f4d!important;color:#d4e5ee!important;border-left:2px solid var(--type-color);}
[data-theme=night] a {color:#79d2bd;}
[data-theme=night] .tabs span,[data-theme=night] code {background:#293f4d;color:#d4e5ee;}
[data-theme=night] .primary,[data-theme=night] .search-here {background:#298b75;color:white;}
[data-theme=night] #comparisonTable thead th {background:#1c483d;}
[data-theme=night] .maplibregl-ctrl-group {background:#d5dee2;}
[data-theme=night] .maplibregl-ctrl-attrib {background:#d5dee2;}
@media(max-width:400px){.header-actions{gap:8px;font-size:11px}.header-actions .info{font-size:11px}.brand{gap:8px}.brand-name{font-size:22px}}
@media(max-width:520px){.detail-actions{gap:4px}.detail-actions button{gap:4px;padding:7px 5px;font-size:11px}.detail-actions button svg{width:15px;height:15px}.method-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.national-inventory{grid-template-columns:1fr}.national-inventory b{grid-column:1;grid-row:auto;margin-top:6px}.weather-preview{max-width:62%;font-size:11px}}

#reportForm label {margin-top:16px;} #reportDescription {width:100%;font:inherit;padding:10px;border:1px solid var(--line);border-radius:6px;background:transparent;color:inherit;margin-bottom:8px;}

.profile-pending .candidate {opacity:.55;} .profile-pending .map-marker {background:#e6edef;color:#526976;border-color:#8499a3;}

#themeToggle {display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;padding:10px;border:1px solid #ffffff26;border-radius:50%;color:#e1ebf1;}
#themeToggle svg {width:21px;height:21px;}
#themeToggle:hover {background:#ffffff12;}

.location-button {display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;padding:11px;border:1px solid #b8d5cd;border-radius:7px;background:#edf6f3;color:#176b5a;}
.location-button svg {width:22px;height:22px;}
.location-button[aria-busy=true] svg {animation:location-pulse 1s ease-in-out infinite;}
@keyframes location-pulse {50% {opacity:.38;transform:scale(.88);}}
.search-actions {flex-wrap:wrap;margin-top:10px;}
#searchLocationStatus {font-size:12px;line-height:1.5;}
#searchLocationStatus:empty {display:none;}
#searchLocationStatus.error {color:#934220;flex-basis:100%;}
[data-theme=night] .location-button {background:#1c483d;color:#8de4bd;border-color:#417e6c;}
[data-theme=night] #searchLocationStatus.error {color:#ffd28f;}
@media(max-width:400px){.address-row{gap:6px}.address-row>.primary{padding-inline:12px}.location-button{flex-basis:44px;width:44px;height:46px}.searchbox input{padding-inline:11px}}
