#us-red-blue-map {
  max-width: 900px;
  margin: 0 auto;
}
.usmap-wrapper {
  font-family: inherit;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 30px #00000014;
}
.usmap-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0 14px;
  flex-wrap: wrap;
}
.usmap-legend .key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.usmap-legend .swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  outline: 1px solid #0001;
}
.usmap-tooltip {
  position: absolute;
  pointer-events: none;
  background: #121212;
  color: #fff;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  box-shadow: 0 6px 20px #0005;
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity 0.12s ease;
  white-space: nowrap;
}
.usmap svg {
  width: 100%;
  height: auto;
  display: block;
}
.state {
  stroke: #fff;
  stroke-width: 1;
}
.state:hover {
  filter: brightness(1.05);
  stroke: #111;
  stroke-width: 1.2;
}
.state.focus {
  outline: 2px solid #000;
}
.controls {
  display: flex;
  gap: 10px;
  margin: 10px 0;
  flex-wrap: wrap;
}
.controls button {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #f7f7f7;
  cursor: pointer;
  font-size: 14px;
}
.controls button.active {
  background: #e9f2ff;
  border-color: #bcd9ff;
}
.state-label {
  font-size: 10px;
  font-weight: 600;
  text-anchor: middle;
  pointer-events: none;
  fill: #111;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 2px;
}
