:root{
  --bg:#f1f2f3; --card:#fff; --brand:#008fcc;
  --hq:#f56f3a; --plant:#36a7f0; --glass:#11a57e;
  --shadow:0 10px 24px rgba(0,0,0,.08);
}
#us-sites-map .wrap{max-width:90%;margin:auto;padding:0 16px;position:relative}
#us-sites-map svg{width:100%;height:auto;background:#fff;border-radius:18px;box-shadow:var(--shadow)}
.states{fill:#fff;stroke:#e5e7eb;stroke-width:.8}
.site{cursor:pointer;stroke:#fff;stroke-width:2}
.site.hq{fill:var(--hq)}
.site.plant{fill:var(--plant)}
.site.glass{fill:var(--glass)}
.popup{
  position:absolute;
  background:#fff;
  border-radius:12px;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  display:none;
  /* responsive width, auto height */
  max-width: 270px;
  inline-size: min(320px, calc(100vw - 32px));
}
.popup header{
  display:grid;
  grid-template-columns: 1fr auto; /* title | close button */
  align-items:start;
  gap:8px;
  padding:14px 16px 6px;
  font-weight:700;
}
.popup-title {
  /* margin: 0; */
  margin: 0 0 8px 0;
  text-align: left;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 10px 0 0 10px;
  /* padding: 10px 0; */
  color: #0f172a; /* adjust color */
}

#p-title{
  word-break: break-word;           /* break long tokens if needed */
  overflow-wrap: anywhere;
  line-height: 1.35;
  margin:0;
}
.popup .content{
  padding:0 16px 12px;
  color:#333;
}
.popup .content p{
  display: block;
  margin:.20rem 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.popup a{color:#fff;text-decoration:none}
.popup .cta{
  background:#008fcc;
  color:#fff;
  padding:12px 16px;
  border-radius:0 0 12px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* Close button */
.popup .close{
  border:0;
  background:transparent;
  font-size:20px;
  cursor:pointer;
  line-height:1;
}
.legend {
  display: flex;
  gap: 22px;
  align-items: center;
  margin: 18px auto 0;
  justify-content: center;
  color: #000; /* set text color to black */
}

.legend span {
  color: #000; /* ensure spans also have black text */
}

.legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-right: 6px;
}
.legend .hq i{background:var(--hq)}
.legend .plant i{background:var(--plant)}
.legend .glass i{background:var(--glass)}

.countries { fill: #e6e6e6; stroke: #999; stroke-width: .5px; }
.graticule { fill: none; stroke: #cfcfcf; stroke-width: .5px; stroke-opacity: .6; }
.site { fill: #0a58a5; pointer-events: all; cursor: pointer; }