/* map: treemap of IPv4 addresses per network (AS) / country. Tokens only; no brand hue.
   Tile fill = --strong mixed into --white by rank (both themes). Flags are content images. */
.map { min-width: 0; }
.map-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.map-tools .chip-btn { min-height: var(--target); height: auto; padding: 0 16px; font-size: .88rem; gap: 8px; }
.map-tools .chip-btn img { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; flex: 0 0 auto; }
.map-tools .chip-btn[aria-pressed="true"], .map-tools .chip-btn[aria-pressed="true"]:hover {
  background: var(--strong); color: var(--paper); border-color: var(--strong); }

.map-canvas { position: relative; width: 100%; max-width: 100%; height: clamp(360px, 62vw, 560px);
  overflow: hidden; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line);
  box-shadow: var(--shadow-card); }
.map-canvas[hidden] { display: none; }
.tm-svg { display: block; width: 100%; height: 100%; }

/* tiles */
.tm-r { fill: var(--white); stroke: var(--line); stroke-width: 1; transition: stroke var(--dur-hover) ease; }
.tm-l0 .tm-r { fill: color-mix(in srgb, var(--strong) 16%, var(--white)); }
.tm-l1 .tm-r { fill: color-mix(in srgb, var(--strong) 11%, var(--white)); }
.tm-l2 .tm-r { fill: color-mix(in srgb, var(--strong) 7%, var(--white)); }
.tm-l3 .tm-r { fill: color-mix(in srgb, var(--strong) 3%, var(--white)); }
.tm-other .tm-r { fill: var(--input); stroke-dasharray: 4 3; }
.tm-cc .tm-r { fill: var(--white); }
.tm-veil { fill: var(--paper); opacity: .74; pointer-events: none; }
.tm-cover, .tm-flag { pointer-events: none; }

.tm-t { fill: var(--text); font-family: inherit; font-weight: 500; pointer-events: none; }
.tm-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tm-strong { fill: var(--strong); font-weight: 800; }
.tm-dim { fill: var(--muted-ink); }

a.tm-tile { cursor: pointer; outline: none; }
a.tm-tile:hover .tm-r { stroke: var(--hair-2); stroke-width: 2; }
a.tm-tile:focus-visible .tm-r { stroke: var(--text); stroke-width: 3; }
.tm-static { cursor: default; }

/* summary line + foot */
.map-hint { min-height: 1.9em; margin-top: 12px; text-align: center; font-size: .9rem; font-weight: 600;
  color: var(--strong); line-height: 1.9; overflow-wrap: anywhere; }
.map-foot { margin-top: 4px; text-align: center; font-size: .84rem; color: var(--muted-ink); line-height: 1.9;
  overflow-wrap: anywhere; }
.map-foot bdi { font-family: var(--font-mono); font-weight: 700; color: var(--strong); }
.map-state:empty { display: none; }

@media (max-width: 560px) {
  .map-tools .chip-btn { flex: 1 1 0; justify-content: center; }
  .map-hint { font-size: .86rem; }
}
@media (prefers-reduced-motion: reduce) { .tm-r { transition: none; } }
