:root { font-family: "Inter", system-ui, sans-serif; color: #142d2b; background: #f6f7f2; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
header { min-height: 70px; padding: 12px 24px; display: flex; gap: 24px; align-items: center; justify-content: space-between; background: #142d2b; color: #fff; }
.brand { font-size: 23px; font-weight: 750; letter-spacing: -.05em; flex: none; }
.brand span { color: #b8e39f; margin-right: 4px; }
button, input, textarea, select { font: inherit; }
button { border: 1px solid transparent; border-radius: 7px; background: #1f6255; color: white; padding: 8px 11px; font-weight: 650; cursor: pointer; }
button.secondary { background: white; border-color: #d2dfd9; color: #21463d; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 3px solid #ad7212; outline-offset: 2px; }
button:disabled { cursor: default; opacity: .5; }
input, select, textarea { width: 100%; padding: 8px 10px; background: #fff; border: 1px solid #becfc6; color: inherit; border-radius: 7px; }
header form { width: min(540px, 100%); display: flex; gap: 8px; }
header input { color: #142d2b; min-width: 0; }
main { display: grid; grid-template-columns: 336px minmax(0, 1fr); min-height: calc(100dvh - 70px); }
aside { padding: 22px; max-height: calc(100dvh - 70px); overflow: auto; }
h1 { margin: 12px 0 6px; font-size: 30px; line-height: 1.1; letter-spacing: -.045em; }
h2 { font-size: 16px; margin: 0; }
h3 { font-size: 14px; }
p, li, label { line-height: 1.5; }
.muted { color: #4d655d; font-size: 13px; }
section, details { border-top: 1px solid #d8e1d8; margin-top: 19px; padding-top: 15px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.section-title span { color: #4d655d; font-size: 12px; }
.site-picker, form label { display: grid; gap: 5px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0; }
#zones, #named-areas, #buildings, #drafts { display: grid; gap: 5px; }
#buildings { margin-top: 7px; max-height: 295px; overflow: auto; }
.item { display: flex; gap: 8px; justify-content: space-between; text-align: left; background: white; border-color: #d8e1d8; color: #183831; font-size: 13px; }
.item[aria-current="true"] { border-color: #3b806a; background: #e4f1e5; }
.item span { color: #526b62; font-size: 11px; font-weight: 500; white-space: nowrap; }
#editor { padding: 9px; margin-top: 10px; border: 1px solid #d7c085; background: #fff9e9; border-radius: 8px; }
#editor p { margin: 0 0 8px; font-size: 13px; }
#editor label + label { margin-top: 8px; }
#sources { font-size: 13px; padding-left: 20px; }
a { color: #155f63; }
summary { cursor: pointer; font-size: 13px; font-weight: 650; }
.map-shell { position: relative; min-height: 460px; background: #e0e8df; }
#map { position: absolute; inset: 0; background: #e0e8df; }
.map-controls, .map-key, .map-note { position: absolute; z-index: 1000; }
.map-controls { top: 14px; right: 14px; display: grid; gap: 5px; }
.map-controls button { background: white; border-color: #d3e0d8; color: #183831; box-shadow: 0 2px 7px #18383118; }
.map-key { bottom: 30px; left: 12px; display: flex; flex-wrap: wrap; gap: 11px; border-radius: 8px; padding: 9px 12px; color: #183831; background: white; border: 1px solid #d3e0d8; font-size: 12px; }
.map-key span { display: flex; align-items: center; gap: 5px; }
#provider { color: #4d655d; }
.map-key i { width: 11px; height: 11px; border: 2px solid; border-radius: 2px; }
.site-swatch { color: #225c52; background: #225c5228; }
.section-swatch { color: #2d785c; background: #8eddbd66; }
.parcel-swatch { color: #a35d1f; background: #f7cb8a77; }
.building-swatch { color: #135599; background: #4392d477; }
.map-note { top: 12px; left: 12px; max-width: 57%; margin: 0; border-radius: 7px; background: #fffbec; padding: 7px 9px; font-size: 12px; }
.map-note:empty, #status:empty { display: none; }
#status { position: fixed; z-index: 1100; bottom: 16px; right: 16px; max-width: min(430px, 88vw); margin: 0; padding: 9px 13px; background: #183831; color: white; font-size: 13px; border-radius: 8px; }
dialog { width: min(450px, calc(100% - 28px)); max-height: 85dvh; border: 1px solid #d3e0d8; border-radius: 16px; padding: 22px; color: inherit; }
dialog::backdrop { background: #142d2b8a; }
dialog h2 { font-size: 22px; }
dialog form { display: grid; gap: 10px; }
dialog .check { display: flex; align-items: center; }
dialog .check input { width: auto; }
.vertex { border: 2px solid #844b01; border-radius: 4px; background: #fff1c7; }
@media (max-width: 720px) {
  header { flex-wrap: wrap; gap: 9px; padding: 10px 14px; }
  header form { order: 1; width: 100%; }
  main { display: flex; flex-direction: column; }
  aside { max-height: none; padding: 16px; }
  .map-shell { order: -1; min-height: max(330px, 49dvh); }
}
#historical-choice { display: block; margin-top: 8px; font-size: 13px; }
#historical-choice[hidden] { display: none; }
#historical-choice input { width: auto; }

#dialog-status { margin: 10px 0 0; color: #8d370c; font-size: 13px; }
#dialog-status:empty { display: none; }

.map-address-layer {
  position: absolute; inset: 0; z-index: 650; overflow: hidden; pointer-events: none;
}
.map-address {
  position: absolute; top: 0; left: 0; visibility: hidden;
}
.map-address > span {
  display: block; width: max-content; transform: translate(-50%, -50%);
  color: #233d52b8; font: 600 11px/1.2 system-ui, sans-serif;
  text-shadow: 0 0 2px #fffe, 0 0 3px #fffc;
}
.map-address.building > span { color: #233d5299; }
.dark-map, .dark-map #map { background: #192229; }
.dark-map .leaflet-tile-pane { filter: invert(.9) hue-rotate(180deg) saturate(.65); }
.dark-map .map-controls button, .dark-map .map-key {
  color: #edf3f7; background: #202b35; border-color: #455865;
}
.dark-map #provider { color: #b7c8d4; }
.dark-map .map-address > span {
  color: #e4f0f9; text-shadow: 0 0 2px #18232e, 0 0 4px #18232e;
}
.dark-map .map-address.building > span { color: #d2e2ee; }

.building-addresses { padding-inline-start: 0; list-style: none; }
.building-addresses li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.address-directions {
  flex: 0 0 44px; min-height: 44px; display: grid; place-items: center;
  font-size: 22px; font-weight: 650; color: #854522; text-decoration: none; border-radius: 7px;
}
.address-directions:is(:hover, :focus-visible) { background: #fff1df; }
#inspection-report { margin-bottom: 9px; font-size: 13px; }
.inspection-panel { display: grid; gap: 12px; }
.inspection-panel > button { justify-self: start; }
.room-check fieldset { min-inline-size: 0; }
.check-branch, .check-step { margin: 0; padding: 0; border: 0; }
.check-step { margin-bottom: 12px; }
.room-check legend { margin-bottom: 6px; padding: 0; font-size: 14px; font-weight: 700; }
.check-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.check-choices label {
  display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 8px;
  border: 1px solid #becfc6; border-radius: 7px; cursor: pointer; line-height: 1.25;
}
.check-choices label:has(:checked) { background: #e4f1e5; border-color: #3b806a; }
.check-choices input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: #1f6255; }
.check-room { margin: 12px 0; padding: 10px; border: 1px solid #d3e0d8; border-radius: 8px; }
.check-counter { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; gap: 5px; align-items: end; }
.check-counter button { min-height: 42px; }
.check-fields > button { min-height: 44px; }
.check-lamp { display: grid; gap: 6px; margin-bottom: 10px; }
.check-lamp > button { justify-self: start; }
.check-status { margin: 0; color: #854522; font-size: 13px; }
.check-status:empty { display: none; }
.check-result ul { padding-inline-start: 20px; }
.check-result h3 { color: #854522; }
.inspection-report { resize: vertical; font-size: 13px; min-height: 170px; }

.sign-in-page { display: grid; place-items: center; min-height: 100dvh; padding: 20px; }
.sign-in-card { width: min(380px, 100%); padding: 25px; background: white; border: 1px solid #d8e1d8; border-radius: 14px; }
.sign-in-card .brand span { color: #1f6255; }
.sign-in-card form:not([hidden]) { display: grid; gap: 8px; margin-top: 14px; }
.sign-in-card form button { justify-self: start; }
#sign-in-status:empty { display: none; }
