/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4 */
.app-spm {
  --app-spm-ink: #1a1f2e;
  --app-spm-muted: #6b7285;
  --app-spm-paper: #f7f5f0;
  --app-spm-frame: #c8ceda;
  margin: 1.75rem 0 2.25rem;
  max-width: 100%;
}

.app-spm__canvas {
  position: relative;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(12, 30, 90, 0.05), transparent 55%),
    linear-gradient(180deg, #fbfaf7 0%, var(--app-spm-paper) 100%);
  border: 1px solid rgba(12, 30, 90, 0.1);
  border-radius: 2px;
  overflow: clip;
}

.app-spm__svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
}

.app-spm__inset-label,
.app-spm__legend text {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-spm__legend text {
  font-family: Manrope, "Proxima Nova", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.app-spm__state {
  cursor: pointer;
  transition: fill 160ms ease, opacity 160ms ease, filter 160ms ease;
  outline: none;
}

.app-spm__state:hover,
.app-spm__state:focus-visible {
  filter: brightness(1.08);
  stroke-width: 1.6;
}

.app-spm__state.is-highlighted:hover,
.app-spm__state.is-highlighted:focus-visible {
  filter: brightness(1.18);
}

.app-spm__tooltip {
  position: absolute;
  z-index: 2;
  min-width: 8rem;
  max-width: 16rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(12, 30, 90, 0.16);
  border-radius: 2px;
  background: rgba(247, 245, 240, 0.96);
  color: var(--app-spm-ink);
  box-shadow: 0 10px 28px rgba(12, 30, 90, 0.12);
  font-family: Manrope, "Proxima Nova", system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.35;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
}

.app-spm__tooltip strong {
  display: block;
  font-family: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.15rem;
}

.app-spm__caption {
  margin: 0.7rem 0 0;
  color: var(--app-spm-muted);
  font-family: Manrope, "Proxima Nova", system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .app-spm__legend {
    display: none;
  }

  .app-spm__caption {
    font-size: 0.85rem;
  }
}
