.market-switch { display:flex; align-items:center; gap:3px; margin-left:4px; padding:3px; border:1px solid var(--line); border-radius:8px; flex-shrink:0; }
.market-switch a { padding:7px 8px; min-width:30px; text-align:center; border-radius:5px; color:var(--muted); text-decoration:none; font-size:12px; font-weight:800; }
.market-switch a[aria-current="page"] { background:var(--accent); color:#071018; }
.market-switch a:focus-visible { outline:2px solid var(--schoolbus); outline-offset:3px; }
#activeMarketCity { color:var(--accent); }
#marketSwitchStatus:not(:empty) { position:fixed; top:78px; left:50%; transform:translateX(-50%); z-index:10001; background:var(--panel); color:var(--text); border:1px solid var(--warning); border-radius:8px; padding:12px; max-width:90vw; pointer-events:none; }
#marketReviewModal .modal-card { max-height:90dvh; overflow-y:auto; }
#parcelRegulatoryCard .ca-review-summary { font-size:11px; color:var(--muted); margin:10px 0; }
#parcelRegulatoryCard .ca-review-summary span { display:block; margin-top:5px; }
#caMappedContext { margin-top:12px; }
#caMappedContext summary { font-size:12px; cursor:pointer; }
.record-lookup-note { grid-column:1/-1; font-size:11px; line-height:1.5; color:var(--muted); }
.record-lookup-note button { margin-top:8px; margin-right:8px; }
.county-record-source { color:var(--accent); }
.county-record-source:focus-visible { outline:2px solid var(--schoolbus); outline-offset:3px; }
.density-layer-tools { padding:0 10px 12px; }
.density-layer-tools>button,.density-area-row button,.density-editor button,.density-selection button { border:1px solid var(--line-strong); border-radius:6px; background:var(--panel-2); color:var(--text); padding:8px 10px; cursor:pointer; min-height:36px; font:inherit; font-size:11px; }
.density-layer-tools p { color:var(--muted); font-size:11px; line-height:1.5; }
.density-area-row { display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin-top:7px; }
.density-area-row [data-density-zoom] { flex:1; min-width:100px; text-align:left; color:#f3b5a2; overflow-wrap:anywhere; }
.density-editor,.density-selection { position:absolute; bottom:30px; left:12px; z-index:110; width:360px; max-width:calc(100% - 24px); box-sizing:border-box; border:2px solid #953012; border-radius:10px; background:rgba(13,20,28,.97); box-shadow:0 5px 24px #0008; color:var(--text); padding:14px; }
.density-editor p { font-size:12px; line-height:1.5; margin:8px 0; }
.density-editor label { display:block; font-size:11px; margin:10px 0 5px; }
.density-editor input { width:100%; box-sizing:border-box; background:var(--panel-2); color:var(--text); border:1px solid var(--line-strong); border-radius:5px; padding:9px; font:inherit; font-size:14px; }
.density-buttons { display:flex; gap:7px; flex-wrap:wrap; margin-top:10px; }
.density-editor button:disabled,.density-selection button:disabled,.density-layer-tools button:disabled { opacity:.5; cursor:default; }
.density-editor button:focus-visible,.density-selection button:focus-visible,.density-map-label:focus-visible,.density-layer-tools button:focus-visible { outline:2px solid var(--schoolbus); outline-offset:2px; }
.density-error { color:#ffadb1; }
.density-map-label { position:absolute; transform:translate(-50%,-50%); border:2px solid #c65c3b; border-radius:7px; padding:5px 9px; background:rgba(62,20,8,.92); color:#fff; box-shadow:0 2px 6px #0007; font:700 14px/1.3 -apple-system,BlinkMacSystemFont,sans-serif; text-align:center; max-width:190px; width:max-content; overflow-wrap:anywhere; pointer-events:auto; cursor:pointer; }
@media(max-width:760px) { .density-editor,.density-selection { bottom:42px; padding:10px; }.density-editor button,.density-selection button { min-height:42px; }.density-editor input { font-size:16px; }.density-map-label { font-size:13px; max-width:155px; } }
@media(max-width:760px) { .market-switch { margin-left:auto; } .market-switch a { min-height:32px; display:grid; place-items:center; padding:3px 5px; } }

/* Compact regional labels; displaced names keep a line to their actual area. */
.density-map-label[data-density-scale="far"] { font-size:10px; line-height:1.15; padding:2px 4px; border-width:1px; border-radius:4px; max-width:125px; }
.density-map-label[data-density-scale="medium"] { font-size:11px; line-height:1.2; padding:3px 5px; border-width:1px; max-width:150px; }
.density-map-label[hidden],.density-label-connector[hidden] { display:none; }
.density-label-connector { position:absolute; height:1px; background:#f3b5a2; box-shadow:0 0 2px #3e1408; transform-origin:0 50%; pointer-events:none; }
.density-label-connector::before { content:""; position:absolute; left:-2px; top:-1px; width:4px; height:4px; border-radius:50%; background:#f3b5a2; }

/* Keep HQ labels legible over Hybrid imagery. */
.ca-hot-spot-label{text-shadow:0 1px 3px #000,1px 0 3px #000,-1px 0 3px #000}
.ca-hot-spot-popup{color:#17252f;max-width:270px}
.ca-hot-spot-popup p{margin:8px 0}
.ca-hot-spot-popup a{color:#135d87}

/* Regional city limits remain secondary to AHC targets and parcel highlights. */
.ca-city-tools{padding:0 10px 8px 30px;color:#8da2b5;font-size:11px;line-height:1.4}
.ca-city-tools p{margin:0 0 7px}
.ca-city-tools button{border:1px solid #354957;border-radius:6px;background:#15222c;color:#d9e7ef;padding:6px 9px;font:inherit;cursor:pointer}
.ca-city-popup{color:#17252f;max-width:260px;font:13px/1.4 -apple-system,BlinkMacSystemFont,sans-serif}
.ca-city-popup strong{display:block;border-left:5px solid;padding-left:8px;font-size:17px}
.ca-city-popup p{margin:7px 0}.ca-city-popup a{color:#135d87}

.ca-unincorporated-swatch{display:inline-block;width:12px;height:10px;margin-right:3px;background:#e2eaf23b;border:1px solid #e2eaf2;border-radius:2px;vertical-align:middle;}

.ca-value-key {display:grid;gap:5px;min-width:168px}
.ca-value-key strong {font-size:12px}
.ca-value-key small {font-size:10px;line-height:1.35;color:inherit}
.ca-value-bands {display:grid;grid-template-rows:repeat(6,auto);grid-auto-flow:column;gap:3px 10px;margin:3px 0}
.ca-value-bands span {display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:10px;font-variant-numeric:tabular-nums}
.ca-value-bands i {width:14px;height:8px;border-radius:2px;box-shadow:inset 0 0 0 1px #ffffff44}
#caValueTools[hidden],#caValueTools button[hidden] {display:none}
