.demand-map-app {
  --demand-ink: #111;
  --demand-paper: #f5f3ed;
  --demand-panel: #fff;
  --demand-muted: #6e6e6b;
  --demand-line: rgba(17,17,17,.14);
  position: relative;
  overflow: hidden;
  padding: clamp(24px,5vw,64px);
  color: var(--demand-ink);
  background:
    radial-gradient(circle at 78% 18%,rgba(0,0,0,.075) 0 1px,transparent 2px) 0 0/22px 22px,
    linear-gradient(145deg,#fbfaf7,var(--demand-paper));
  border: 1px solid var(--demand-line);
  border-radius: 32px;
}

.demand-map-app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background: linear-gradient(90deg,transparent 49.8%,rgba(0,0,0,.035) 50%,transparent 50.2%),linear-gradient(transparent 49.8%,rgba(0,0,0,.035) 50%,transparent 50.2%);
  background-size: 96px 96px;
}

.demand-map-app > * { position: relative; }

.demand-map-intro { display:flex; align-items:end; justify-content:space-between; gap:30px; }
.demand-map-intro h2 { max-width:720px; font-size:clamp(44px,6vw,72px); line-height:.92; letter-spacing:-2.6px; }
.demand-map-intro p { max-width:680px; color:var(--demand-muted); line-height:1.7; }
.demand-map-toolbar { margin-top:44px; display:flex; justify-content:space-between; gap:20px; color:var(--demand-muted); font-size:11px; }
.demand-map-toolbar strong { color:var(--demand-ink); text-transform:uppercase; letter-spacing:1px; }
.demand-map-toolbar--areas { margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--demand-line); }

.demand-map-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(250px,320px);
  gap: clamp(18px,3vw,38px);
  align-items: start;
  margin-top: 18px;
}

.demand-map-visual {
  min-width: 0;
  margin: 0;
  padding: clamp(16px,3vw,30px);
  background: rgba(255,255,255,.72);
  border: 1px solid var(--demand-line);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.045);
}

.demand-map-canvas {
  position: relative;
  width: min(100%,520px);
  aspect-ratio: 600/920;
  margin: 0 auto;
}

.demand-map-canvas > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
}

.demand-map-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.demand-map-marker {
  --marker-size: 9px;
  position: absolute;
  left: var(--map-x);
  top: var(--map-y);
  z-index: 1;
  width: var(--marker-size);
  height: var(--marker-size);
  color: #111;
  pointer-events: auto;
  transform: translate(-50%,-50%);
  text-decoration: none;
}

.demand-map-marker__dot {
  position: absolute;
  inset: 0;
  display: block;
  background: #fbfaf7;
  border: 1.8px solid #111;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255,255,255,.65);
  transition: transform .18s ease,box-shadow .18s ease;
}

.demand-map-marker.is-public .demand-map-marker__dot {
  background: #111;
  border-color: #fff;
  box-shadow: 0 0 0 2px #111,0 0 0 6px rgba(17,17,17,.12);
}

.demand-map-marker__label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 4;
  width: max-content;
  max-width: 180px;
  padding: 7px 9px;
  color: #fff;
  background: #111;
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%,4px);
  transition: opacity .16s ease,transform .16s ease;
}

.demand-map-marker:hover,
.demand-map-marker.is-selected { z-index: 5; }
.demand-map-marker:hover .demand-map-marker__dot,
.demand-map-marker.is-selected .demand-map-marker__dot { transform: scale(1.35); box-shadow: 0 0 0 6px rgba(17,17,17,.12); }
.demand-map-marker:hover .demand-map-marker__label,
.demand-map-marker.is-selected .demand-map-marker__label { opacity: 1; transform: translate(-50%,0); }

.demand-map-visual figcaption {
  margin: 12px auto 0;
  max-width: 560px;
  color: var(--demand-muted);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}
.demand-map-visual figcaption a { color: inherit; }

.demand-map-key {
  position: sticky;
  top: 24px;
  padding: 26px;
  color: #fff;
  background: #111;
  border-radius: 22px;
  box-shadow: 0 24px 55px rgba(0,0,0,.11);
}
.demand-map-key .section-label { color: #8f8f8f; }
.demand-map-key__item { display:flex; align-items:center; gap:14px; margin-top:24px; }
.demand-map-key__item div { display:grid; gap:3px; }
.demand-map-key__item b { font-size:13px; }
.demand-map-key__item span { color:#999; font-size:10px; line-height:1.4; }
.demand-map-key__dot { width:12px; height:12px; flex:0 0 auto; display:block; background:#111; border:2px solid #fff; border-radius:50%; box-shadow:0 0 0 3px rgba(255,255,255,.12); }
.demand-map-key__dot.is-public { background:#fff; box-shadow:0 0 0 2px #111,0 0 0 4px #fff; }
.demand-map-summary { margin-top:28px; padding-top:22px; color:#c7c7c7; border-top:1px solid rgba(255,255,255,.15); font-family:"Cormorant Garamond",Georgia,serif; font-size:22px; line-height:1.08; }
.demand-map-key > a { margin-top:24px; display:inline-block; color:#fff; font-size:11px; font-weight:700; text-decoration:none; border-bottom:1px solid rgba(255,255,255,.35); }

.demand-map-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
  margin-top: 28px;
}

.demand-area-card {
  min-height: 188px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  color: inherit;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--demand-line);
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(0,0,0,.025);
  text-decoration: none;
  transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}

a.demand-area-card:hover {
  transform: translateY(-3px);
  border-color: rgba(17,17,17,.34);
  box-shadow: 0 18px 40px rgba(0,0,0,.065);
}

a.demand-area-card:focus-visible,
.demand-map-app input:focus-visible,
.demand-map-app select:focus-visible,
.demand-submit:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}

.demand-area-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demand-area-card__code,
.demand-area-card__pulse {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.demand-area-card__code {
  padding: 7px 9px;
  background: #111;
  color: #fff;
  border-radius: 999px;
}

.demand-area-card__pulse { color: var(--demand-muted); }
.demand-area-card__pulse::before { content:""; width:6px; height:6px; margin-right:6px; display:inline-block; background:#111; border-radius:50%; box-shadow:0 0 0 4px rgba(0,0,0,.08); }
.demand-area-card h3 { margin: 28px 0 0; font-size: clamp(27px,3vw,36px); line-height: .95; }
.demand-area-card__metric { margin: auto 0 0; color: var(--demand-muted); font-size: 12px; }
.demand-area-card__metric strong { margin-right: 6px; color: #111; font-family: "Cormorant Garamond",Georgia,serif; font-size: 34px; font-weight: 600; }
.demand-area-card__detail { margin: 8px 0 0; color: var(--demand-muted); font-size: 11px; line-height: 1.5; }

.demand-map-empty,
.demand-map-loading {
  grid-column: 1/-1;
  margin: 0;
  padding: 30px;
  color: var(--demand-muted);
  background: rgba(255,255,255,.72);
  border: 1px dashed var(--demand-line);
  border-radius: 18px;
  text-align: center;
}

.demand-signal-form {
  margin-top: 18px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1.1fr repeat(3,1fr) auto;
  gap: 12px;
  align-items: end;
  background: #111;
  border-radius: 20px;
}
.demand-signal-form[hidden] { display: none; }

.demand-field { min-width: 0; display: grid; gap: 7px; color: rgba(255,255,255,.72); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.demand-field input,
.demand-field select {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  color: #fff;
  background: #202020;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 11px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.demand-field select { color-scheme: dark; }
.demand-field input::placeholder { color: #838383; }

.demand-submit {
  min-height: 48px;
  padding: 0 18px;
  white-space: nowrap;
  color: #111;
  background: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}
.demand-submit:hover:not(:disabled) { background: #e7e4dc; }
.demand-submit:disabled { cursor: not-allowed; opacity: .58; }
.demand-honeypot { position: absolute!important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.demand-form-status { grid-column: 1/-1; min-height: 18px; margin: 0; color: #bdbdbd; font-size: 12px; }
.demand-form-status.is-error { color: #f3bebe; }
.demand-form-status.is-success { color: #c7e3d1; }
.demand-confirm { grid-column:1/-1; display:flex; align-items:flex-start; gap:8px; color:#aaa; font-size:11px; line-height:1.5; }
.demand-confirm input { margin-top:2px; accent-color:#fff; }

.local-demand-widget {
  margin:28px 0 0; padding: 34px;
  display:flex; align-items:center; justify-content:space-between; gap:36px;
  color: #fff;
  background: #171717;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
}
.local-demand-widget [data-demand-count] { display:block; font-family:"Cormorant Garamond",Georgia,serif; font-size:clamp(40px,5vw,62px); line-height:.9; }
.local-demand-widget [data-demand-copy] { margin:12px 0 0; color:#aaa; font-size:13px; line-height:1.6; }
.local-demand-widget[aria-busy="true"] { opacity: .72; }
.local-demand-widget h2 { margin-top:8px; font-size:clamp(36px,5vw,54px); }
.local-demand-widget .section-label { color:#989898; }
.local-demand-widget .button { flex:0 0 auto; color:#111; background:#fff; }

@media (max-width: 980px) {
  .demand-map-layout { grid-template-columns: minmax(0,1fr) minmax(220px,280px); }
  .demand-map-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .demand-signal-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .demand-submit { width: 100%; }
}

@media (max-width: 760px) {
  .demand-map-layout { grid-template-columns: 1fr; }
  .demand-map-key { position: static; }
}

@media (max-width: 620px) {
  .demand-map-app { padding: 20px; border-radius: 24px; }
  .demand-map-grid,
  .demand-signal-form { grid-template-columns: 1fr; }
  .demand-area-card { min-height: 168px; }
  .demand-submit { min-height: 50px; }
  .demand-map-intro,.local-demand-widget { align-items:stretch; flex-direction:column; }
  .demand-map-toolbar { align-items:flex-start; flex-direction:column; }
  .demand-map-visual { padding: 12px; border-radius: 18px; }
  .demand-map-marker__label { display:none; }
}

@media (prefers-reduced-motion: reduce) {
  .demand-area-card,
  .demand-map-marker__dot,
  .demand-map-marker__label { transition: none; }
}
