:root {
  --map-ink: #171b20;
  --map-paper: #f2efe6;
  --map-orange: #ff5a36;
  --map-blue: #315cff;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background: var(--map-paper);
  color: var(--map-ink);
}
.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.map-nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--map-ink);
  background: var(--map-paper);
}
.brand {
  color: var(--map-ink);
  text-decoration: none;
  font:
    700 22px "Space Grotesk",
    sans-serif;
  letter-spacing: -0.04em;
}
.brand span {
  color: var(--map-orange);
}
.brand i {
  color: var(--map-blue);
  font-style: normal;
}
.map-nav nav {
  display: flex;
  gap: 24px;
}
.map-nav nav a {
  color: var(--map-ink);
  text-decoration: none;
  font:
    600 13px "IBM Plex Mono",
    monospace;
  text-transform: uppercase;
}
.map-nav nav a.active {
  border-bottom: 3px solid var(--map-orange);
}

.map-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 32px 32px;
}
.map-heading {
  display: grid;
  grid-template-columns: 180px 1fr 420px;
  align-items: end;
  gap: 24px;
  border-bottom: 1px solid var(--map-ink);
  padding-bottom: 20px;
}
.section-no {
  font:
    600 12px "IBM Plex Mono",
    monospace;
  text-transform: uppercase;
}
.map-heading h1 {
  margin: 0;
  font:
    700 clamp(44px, 6vw, 82px) / 0.88 "Space Grotesk",
    sans-serif;
  letter-spacing: -0.06em;
}
.map-heading h1 em {
  color: var(--map-orange);
  font-family: "Instrument Serif", serif;
  font-weight: 400;
}
.map-heading p {
  margin: 0;
  max-width: 420px;
  line-height: 1.55;
}
.map-location {
  display: grid;
  gap: 8px;
  margin: 20px 0 8px;
  max-width: 520px;
  font-weight: 600;
}
.map-location > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}
.map-location :is(input, button) {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--map-ink);
  background: transparent;
  color: var(--map-ink);
  font: inherit;
}
.map-location input {
  font-size: 16px;
}
.map-location button[type="submit"] {
  background: var(--map-ink);
  color: white;
}
.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.map-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.map-chips::-webkit-scrollbar {
  display: none;
}
.map-chips button {
  min-height: 44px;
  border: 1px solid var(--map-ink);
  border-radius: 999px;
  background: transparent;
  padding: 0 16px;
  font:
    600 12px "IBM Plex Mono",
    monospace;
  white-space: nowrap;
  cursor: pointer;
}
.map-chips button.active {
  background: var(--map-ink);
  color: #fff;
}
.map-count {
  font:
    600 12px "IBM Plex Mono",
    monospace;
  white-space: nowrap;
}

.map-shell {
  height: min(690px, calc(100vh - 280px));
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  border: 1px solid var(--map-ink);
  overflow: hidden;
}
.map-canvas {
  position: relative;
  overflow: hidden;
  background: #dcd8ca;
  border-right: 1px solid var(--map-ink);
}
.leaflet-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Keep the familiar OSM geography, but make it a quiet editorial backdrop for
   inventory. The filter applies only to map tiles; controls and lot pins keep
   their accessible brand contrast. */
.leaflet-map .leaflet-tile-pane {
  filter: grayscale(0.62) sepia(0.18) saturate(0.62) contrast(0.92) brightness(1.08);
}
.leaflet-container {
  background: #ded9cb;
  font-family: "Space Grotesk", sans-serif;
}
.leaflet-control-zoom a,
.leaflet-bar a {
  border-bottom-color: var(--map-ink) !important;
  background: var(--map-paper) !important;
  color: var(--map-ink) !important;
}
.leaflet-bar {
  border: 1px solid var(--map-ink) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.leaflet-control-attribution {
  background: rgb(242 239 230 / 88%) !important;
  color: var(--map-ink) !important;
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--map-paper);
  color: var(--map-ink);
  box-shadow: 5px 5px 0 var(--map-orange);
}
.leaflet-popup-content-wrapper {
  border: 1px solid var(--map-ink);
  border-radius: 0;
}
.leaflet-popup-content {
  margin: 15px 16px;
  font-size: 14px;
  line-height: 1.45;
}
.leaflet-popup-content b {
  display: block;
  margin-bottom: 3px;
  font-size: 16px;
}
.leaflet-popup-content a {
  color: var(--map-ink);
  font-weight: 700;
  text-underline-offset: 3px;
}
.leaflet-container a.leaflet-popup-close-button {
  color: var(--map-ink);
}
.adverlot-map-pin {
  background: transparent;
  border: 0;
}
.adverlot-map-pin span {
  display: block;
  width: 30px;
  height: 30px;
  border: 2px solid var(--map-ink);
  border-radius: 50% 50% 50% 0;
  background: var(--map-orange);
  box-shadow: 3px 3px 0 rgb(23 27 32 / 28%);
  transform: rotate(-45deg);
  transition: transform 140ms ease, background-color 140ms ease;
}
.adverlot-map-pin span::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 9px;
  border-radius: 50%;
  background: var(--map-paper);
}
.adverlot-map-pin span.is-selected {
  background: var(--map-ink);
  box-shadow: 4px 4px 0 var(--map-orange);
  transform: rotate(-45deg) scale(1.13);
}
.map-list {
  background: var(--map-paper);
  overflow-y: auto;
}
.map-lot-list {
  display: grid;
}
.map-lot {
  display: grid;
  grid-template-columns: 112px 1fr;
  min-height: 142px;
  border: 0;
  border-bottom: 1px solid var(--map-ink);
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  padding: 12px;
  gap: 12px;
}
.map-lot.selected {
  background: #fff9ec;
  box-shadow: inset 5px 0 0 var(--map-orange);
}
.map-lot img {
  width: 112px;
  height: 118px;
  object-fit: cover;
}
.map-lot-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.map-lot small {
  font:
    600 10px "IBM Plex Mono",
    monospace;
  text-transform: uppercase;
}
.map-lot h2 {
  margin: 5px 0;
  font:
    700 19px/1.05 "Space Grotesk",
    sans-serif;
  letter-spacing: -0.03em;
}
.map-lot p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}
.map-lot strong {
  color: var(--map-orange);
  font:
    600 13px "IBM Plex Mono",
    monospace;
}
.map-loading,
.map-error {
  margin: 24px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .map-nav {
    height: 64px;
    padding: 0 16px;
  }
  .map-nav nav a:first-child {
    display: none;
  }
  .map-page {
    padding: 20px 12px 12px;
  }
  .map-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .map-heading h1 {
    font-size: 48px;
  }
  .map-heading p {
    font-size: 14px;
  }
  .map-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
    gap: 8px;
  }
  .map-chips {
    width: 100%;
  }
  .map-shell {
    height: calc(100dvh - 294px);
    min-height: 510px;
    grid-template-columns: 1fr;
    grid-template-rows: 56% 44%;
  }
  .map-canvas {
    border-right: 0;
    border-bottom: 1px solid var(--map-ink);
  }
  .map-list {
    min-height: 0;
  }
  .map-lot {
    grid-template-columns: 92px 1fr;
    min-height: 112px;
    padding: 8px;
  }
  .map-lot img {
    width: 92px;
    height: 96px;
  }
  .map-lot h2 {
    font-size: 16px;
  }
}
