.catalog-view-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0 16px;
}
.catalog-view-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(6, 38, 74, .11);
  border-radius: 14px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 8px 24px rgba(6, 38, 74, .06);
}
.catalog-view-toggle button {
  min-width: 76px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}
.catalog-view-toggle button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
}
.catalog-view.map-mode .catalog-grid {
  display: none;
}
.public-map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .7fr);
  gap: 18px;
  min-height: 540px;
}
.public-map-stage,
.public-map-panel {
  border: 1px solid rgba(6, 38, 74, .1);
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 16px 44px rgba(6, 38, 74, .08);
}
.public-map-stage {
  min-height: 540px;
  overflow: hidden;
}
.public-map-panel {
  padding: 22px;
  align-self: start;
}
.public-map-panel > .eyebrow,
.map-selected-card > .eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.public-map-panel h2 {
  margin: 0 0 9px;
  color: var(--navy);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.12;
}
.public-map-panel > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.public-map-shell {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background: #eef1ed;
}
.public-map-canvas {
  position: absolute;
  inset: 0;
}
.public-map-project-context {
  display: flex;
  flex-direction: column;
  min-height: 540px;
  height: 100%;
  background: #eef1ed;
}
.public-map-project-context iframe {
  width: 100%;
  flex: 1 1 auto;
  min-height: 460px;
  border: 0;
}
.public-map-project-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: var(--navy);
  background: #fff;
  font-size: 12px;
}
.public-map-project-footer a { color: var(--navy); font-weight: 800; }
.map-context-choices { margin-top: 16px; }
.map-context-choices h3 { margin: 0 0 10px; font-size: 13px; color: var(--navy); }
.map-context-choices .map-location-properties { max-height: 260px; }

.public-map-canvas .maplibregl-canvas {
  outline: none;
}
.public-map-status {
  pointer-events: none;
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 50%;
  max-width: min(88%, 520px);
  padding: 10px 14px;
  border: 1px solid rgba(6, 38, 74, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  color: var(--navy);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 28px rgba(6, 38, 74, .12);
  transform: translateX(-50%);
}
.public-map-status[hidden] {
  display: none;
}
.public-map-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 8px 22px rgba(6, 38, 74, .28);
  cursor: pointer;
}
.public-map-marker span {
  font-size: 11px;
  font-weight: 900;
}
.public-map-marker.selected {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 0 0 5px rgba(215, 170, 79, .22), 0 10px 24px rgba(6, 38, 74, .28);
}
.public-map-marker.grouped {
  width: 44px;
  height: 44px;
}
.public-map-marker:focus-visible {
  outline: 3px solid rgba(215, 170, 79, .8);
  outline-offset: 4px;
}
.public-map-caption {
  position: absolute;
  z-index: 4;
  right: 12px;
  bottom: 42px;
  left: 12px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .92);
  color: #5c6874;
  font-size: 10px;
  line-height: 1.4;
  pointer-events: none;
}
.public-map-attribution {
  position: absolute;
  z-index: 4;
  right: 10px;
  bottom: 10px;
  margin: 0;
  padding: 6px 8px;
  display: flex;
  gap: 6px;
  align-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  font-size: 9px;
  line-height: 1.2;
}
.public-map-attribution a {
  color: #4f5d6c;
  text-decoration: none;
}
.public-map-attribution a:hover,
.public-map-attribution a:focus-visible {
  text-decoration: underline;
}
.public-map-shell .maplibregl-ctrl-top-right {
  top: 8px;
  right: 8px;
}
.public-map-shell .maplibregl-ctrl-group {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(6, 38, 74, .14);
}
.public-map-empty {
  min-height: 540px;
  padding: clamp(34px, 7vw, 88px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background:
    linear-gradient(rgba(6, 38, 74, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 38, 74, .03) 1px, transparent 1px),
    linear-gradient(180deg, #faf9f5, #f1f2ee);
  background-size: 44px 44px, 44px 44px, auto;
}
.map-empty-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(6, 38, 74, .12);
  border-radius: 16px;
  background: #fff;
  color: var(--navy);
  font-size: 25px;
  box-shadow: 0 12px 30px rgba(6, 38, 74, .08);
}
.public-map-empty h2 {
  max-width: 600px;
  margin: 22px 0 10px;
  color: var(--navy);
  font-size: clamp(25px, 3.2vw, 42px);
  line-height: 1.04;
}
.public-map-empty p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.public-map-empty button,
.map-list-return,
.map-selected-card button {
  min-height: 42px;
  margin-top: 18px;
  padding: 0 16px;
  border: 1px solid rgba(6, 38, 74, .14);
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}
.map-list-return {
  width: 100%;
}
.map-coverage-note {
  margin-top: 18px;
  padding: 12px 13px;
  display: grid;
  gap: 4px;
  border-left: 3px solid var(--gold);
  border-radius: 9px;
  background: rgba(215, 170, 79, .1);
}
.map-coverage-note.warning {
  border-left-color: #a35f21;
  background: rgba(163, 95, 33, .08);
}
.map-coverage-note strong {
  color: var(--navy);
  font-size: 12px;
}
.map-coverage-note span {
  color: #66717d;
  font-size: 11px;
  line-height: 1.45;
}
.map-selected-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(6, 38, 74, .1);
  border-radius: 15px;
  background: #fff;
}
.map-selected-card h3 {
  margin: 4px 0 6px;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.18;
}
.map-selected-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.map-selected-card .map-selected-price {
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
}
.map-location-group {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(6, 38, 74, .1);
  border-radius: 15px;
  background: rgba(6, 38, 74, .035);
}
.map-location-group-title {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}
.map-location-properties {
  max-height: min(42vh, 420px);
  display: grid;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.map-location-property {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(6, 38, 74, .12);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  text-align: left;
}
.map-location-property span {
  font-size: 12px;
  font-weight: 800;
}
.map-location-property strong {
  font-size: 11px;
}
.map-location-property[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(215, 170, 79, .18);
}
.map-location-property:focus-visible {
  outline: 3px solid rgba(215, 170, 79, .65);
  outline-offset: 2px;
}
.map-location-group-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .public-map-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .public-map-stage,
  .public-map-shell,
  .public-map-empty {
    min-height: 58vh;
  }
  .public-map-panel {
    order: -1;
  }
}

@media (max-width: 640px) {
  .catalog-view-toolbar {
    margin: 7px 0 12px;
  }
  .catalog-view-toggle {
    width: 100%;
  }
  .catalog-view-toggle button {
    flex: 1;
  }
  .public-map-workspace {
    gap: 12px;
  }
  .public-map-panel {
    padding: 16px;
    border-radius: 17px;
  }
  .public-map-stage,
  .public-map-shell,
  .public-map-empty {
    min-height: 52vh;
    border-radius: 17px;
  }
  .public-map-empty {
    padding: 28px 22px;
  }
  .public-map-empty h2 {
    font-size: 28px;
  }
}
/* Smart Discovery V1: the shared BAI card vocabulary, without changing inventory. */
.public-map-workspace { gap:16px; align-items:start; }
.public-map-stage { position:sticky; top:100px; min-height:620px; }
.public-map-shell { min-height:620px; }
.public-map-panel { padding:18px; max-height:620px; overflow:auto; }
.public-map-panel h2 { font-size:18px; line-height:1.3; }
.public-map-panel > p:not(.eyebrow) { font-size:12px; }
.public-map-marker,.public-map-marker.grouped {
  width:auto; height:auto; min-width:40px; min-height:34px; max-width:190px;
  display:flex; flex-direction:column; gap:1px; padding:8px 12px;
  border:2px solid #fff; border-radius:11px; color:#fff;
  background:var(--navy,#06264a); box-shadow:0 3px 12px #06264a35;
  font-family:inherit; text-align:center;
}
.public-map-marker span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; line-height:1.25; }
.public-map-marker small { font-size:9px; font-weight:600; max-width:160px; }
.public-map-marker.marker-project { border-color:var(--gold,#d7aa4f); }
.public-map-marker.marker-shared { background:#fff; color:var(--navy,#06264a); border-color:var(--navy,#06264a); }
.public-map-marker.selected { background:var(--gold,#d7aa4f); color:var(--navy,#06264a); z-index:3; }
.map-selected-card { position:relative; margin:0 0 18px; padding:0; overflow:hidden; border-color:var(--gold,#d7aa4f); }
.map-preview-image { display:block; width:100%; height:120px; object-fit:contain; background:#f4f5f3; }
.map-preview-copy { padding:15px; }
.map-preview-copy > .eyebrow { margin:0 0 6px; color:var(--navy,#06264a); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; }
.map-preview-copy h3 { font-size:18px; margin:0 0 8px; }
.map-selected-card .map-selected-price { font-size:19px; }
.map-selected-card .map-preview-basis { margin:2px 0 8px; font-size:11px; color:var(--navy,#06264a); }
.map-preview-facts { display:flex; flex-wrap:wrap; gap:5px 12px; padding:0; margin:10px 0 0; list-style:none; font-size:11px; color:var(--muted,#536678); }
.map-selected-card button[data-map-open] { margin-top:12px; min-height:40px; background:var(--navy,#06264a); color:#fff; }
.map-selected-card .map-preview-close { position:absolute; top:6px; right:6px; min-height:32px; width:32px; margin:0; padding:0; border-radius:50%; background:#fff; font-size:22px; box-shadow:0 2px 8px #06264a20; }
.map-location-group { margin:0 0 18px; padding:10px; }
.map-location-properties { max-height:180px; }
.map-coverage-note { padding:8px 10px; margin-top:12px; }
.public-map-workspace button:focus-visible { outline:3px solid var(--gold,#d7aa4f); outline-offset:3px; }
@media(max-width:820px) {
 .public-map-stage { position:relative; top:auto; min-height:52vh; }
 .public-map-shell { min-height:52vh; }
 .public-map-panel { order:initial; max-height:none; }
 .public-map-panel:has(.map-selected-card) { display:grid; grid-template-columns:minmax(0,1fr); }
 .map-selected-card { display:flex; max-height:235px; margin-bottom:12px; }
 .map-preview-image { width:100px; height:auto; max-height:235px; object-fit:contain; }
 .map-preview-copy { min-width:0; padding:12px; overflow:auto; }
 .map-preview-copy h3 { font-size:16px; padding-right:15px; }
 .map-context-choices .map-location-properties { max-height:135px; }
 .public-map-marker,.public-map-marker.grouped { max-width:155px; padding:7px 9px; }
 .public-map-marker span { font-size:11px; }
}

.public-map-panel > .nearby-map-panel { margin-top:16px; padding:14px 0 0; border:0; border-top:1px solid #06264a1a; border-radius:0; box-shadow:none; }
.public-map-panel:has(.map-selected-card) > .map-location-group { margin-bottom:14px; }

.map-location-group summary,.map-context-choices summary,.map-coverage-details summary { cursor:pointer; color:var(--navy,#06264a); font-size:12px; font-weight:800; line-height:1.5; }
.map-context-choices summary { margin-bottom:10px; }
.map-location-group summary { margin:0; }
.map-location-group[open] summary { margin-bottom:10px; }
.map-coverage-details > p { color:var(--muted,#536678); font-size:12px; line-height:1.5; }
.map-coverage-details summary { font-size:13px; }

@media(min-width:821px) {
 .map-selected-card { display:flex; max-height:260px; }
 .map-preview-image { flex:0 0 88px; width:88px; height:auto; max-height:260px; }
 .map-preview-copy { min-width:0; overflow:auto; padding:13px; }
 .map-preview-copy h3 { padding-right:18px; font-size:17px; }
 .map-selected-card .map-selected-price { font-size:18px; }
}
