* { box-sizing: border-box }
body { margin: 0; background: #f5f6f1; color: #20362e; font: 1rem/1.5 "Segoe UI", sans-serif }
header { background: #153c30 }
nav, main { max-width: 60rem; margin: auto; padding: 1rem 1.25rem }
nav, .actions, .rooms > div { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem }
nav a { color: white }
.brand { margin-right: auto; font-size: 1.3rem; font-weight: 700; text-decoration: none }
main { padding-bottom: 4rem }
h1 { margin: 1.5rem 0 0; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1 }
fieldset, .preview { margin: 1.5rem 0; padding: 1.2rem; min-width: 0; background: white; border: 1px solid #b8c8bc; border-radius: .7rem }
legend, h2 { font-size: 1.25rem; font-weight: 650 }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem }
.grid label { display: block; margin-bottom: .3rem }
input:not([type=checkbox]), select { width: 100%; padding: .6rem; font: inherit; border: 1px solid #82958b; border-radius: .3rem; background: white }
.rooms { grid-column: 1/-1; margin: 0; padding: 0; border: 0 }
.rooms legend { font: inherit; margin-bottom: .4rem }
button { background: #176247; border: 0; color: white; font: inherit; font-weight: 600; padding: .7rem 1rem; border-radius: .4rem; cursor: pointer }
.actions a { color: #17533e }
.errorlist { color: #922b21 }
dt { font-weight: 600 }
dd { margin: 0 0 .55rem; overflow-wrap: anywhere }
@media (max-width: 38rem) { .grid { grid-template-columns: 1fr } nav { gap: .75rem } .brand { width: 100% } }
[hidden] { display: none !important }
body { background: #f3f5f2 }
main { max-width: 62rem }
h1 { letter-spacing: -.035em }
h1 + p, small { color: #475f53 }
.filter-card { padding: clamp(1rem, 3vw, 1.75rem); margin: 1rem 0; border: 1px solid #d5dfd7; border-radius: 1rem; background: white; box-shadow: 0 2px 6px #18362408 }
.filter-card h2 { margin: 0 0 1rem; letter-spacing: -.02em }
.filter-card label[for] { display: block; font-weight: 550; margin-bottom: .35rem }
.city-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr)); gap: .75rem }
.city-row select { width: 100% }
.checks { margin: 1rem 0 0; padding: 0; border: 0; min-width: 0 }
.checks legend { font-size: 1rem; font-weight: 650; margin-bottom: .45rem }
.checks .any { display: inline-flex; margin-bottom: .55rem; font-weight: 600 }
.checks label { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .45rem .65rem; line-height: 1.25; border: 1px solid #d8e2db; border-radius: .5rem; cursor: pointer; overflow-wrap: anywhere }
.checks label:has(:checked) { background: #e7f2eb; border-color: #8db69c; color: #16472e }
input[type=checkbox] { accent-color: #176247; flex: none }
#id_sites, #id_rooms { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%, 10rem),1fr)); gap: .4rem }
#id_boroughs, #id_districts {
    column-count: 2;
    column-gap: 1rem;
}
#id_boroughs > *, #id_districts > * {
    break-inside: avoid;
    margin: 0 0 .4rem;
}
@media (max-width: 40rem) {
    #id_boroughs, #id_districts { column-count: 1 }
}
.district-scroll { max-height: 21rem; overflow-y: auto; padding: .15rem .35rem .2rem .15rem; scrollbar-gutter: stable }
.sources { margin: 0 0 1rem }
#sites-help { display: block; margin-top: .35rem }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%) }
.grid > *, .city-row > * { min-width: 0 }
:focus-visible { outline: 2px solid #236f55; outline-offset: 2px }

.floor-controls { grid-column: 1 / -1; min-width: 0 }
.floor-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem }
.floor-exclusions { display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; width: fit-content; max-width: 100%; margin-top: .75rem }
.grid .floor-exclusions label { display: flex; margin: 0 }
