/* <m-care-city> — Care City explorer (components/m-care-city.js) */
m-care-city { display: block; }
.fig-bare:has(> m-care-city) { margin-top: 0; }
.cc {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px solid var(--fig-line);
}
.cc-title { margin: 0 0 16px; }
.cc-body { position: relative; width: 100%; --cc-accent: var(--slot-1); }

/* the map breaks out of the 720 column: to the figure width (lab, design
   system), or to the full viewport width inside a report .chapter */
.cc-stage { position: relative; left: 50%; width: 100cqw; aspect-ratio: 1672 / 941; transform: translateX(-50%); }
.chapter .cc-stage { width: var(--page-w, 100vw); }
.cc-viewport { position: absolute; inset: 0; overflow: hidden; background: var(--chart-wash); }
.cc-scene { position: absolute; inset: 0; isolation: isolate; }
.cc-scene > * { position: absolute; inset: 0; width: 100%; height: 100%; }

.cc-art { display: block; background: var(--cc-art) 50% / cover no-repeat; user-select: none; }
[data-theme="dark"] .cc-art { filter: invert() brightness(.94); }

.cc-wash, .cc-slot, .cc-tint { pointer-events: none; mix-blend-mode: screen; }
[data-theme="dark"] :is(.cc-wash, .cc-slot, .cc-tint) { mix-blend-mode: multiply; }
.cc-wash { background: var(--accent); opacity: .3; }
.cc-slot { background: var(--cc-accent); opacity: .85; }

.cc-scrim { background: var(--bg); opacity: 0; pointer-events: none; transition: opacity .45s; }
.cc-lift, .cc-tint { opacity: 0; pointer-events: none; transition: opacity .45s; }
.cc-tint { background: var(--cc-accent); }
.cc-scene.focused .cc-scrim { opacity: .55; }
.cc-scene.focused .cc-lift { opacity: 1; }
.cc-scene.focused .cc-tint { opacity: .85; }

.cc-hotspots { overflow: visible; }
.cc-hotspot { fill: transparent; stroke: none; cursor: pointer; pointer-events: visiblePainted; outline: none; }
.cc-hotspot:focus-visible { stroke: var(--ink); stroke-width: 2.5px; stroke-dasharray: 8 6; stroke-linejoin: round; }
.cc-marker { pointer-events: none; }
.cc-marker circle { fill: var(--ink); transition: fill .25s; }
.cc-marker text {
  fill: var(--bg);
  font-family: var(--font-mono); font-size: 18px; font-weight: 500;
  text-anchor: middle; dominant-baseline: central;
}
.cc-group.on .cc-marker circle { fill: var(--cc-accent); }
.cc-pin { pointer-events: none; opacity: 0; transition: opacity .25s; }
.cc-group.on .cc-pin { opacity: 1; }
.cc-pin rect { fill: var(--ink); }
.cc-pin text {
  fill: var(--bg);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em;
  text-anchor: middle; dominant-baseline: central;
}

.cc-hint {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  margin: 0; padding: 5px 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 1px solid var(--fig-line);
  pointer-events: none;
}

/* the card beside the active hospital */
.cc-panel {
  position: absolute; top: 22px; left: 22px; z-index: 6;
  width: min(300px, calc(100vw - 44px));
  margin: 0;
  pointer-events: none;
}
.cc-panel:empty { display: none; }
.cc-card {
  /* a light "paper" island in both themes, as in the live report */
  --bg: var(--paper);
  --ink: var(--paper-ink);
  --ink-rgb: var(--paper-ink-rgb);
  --muted: var(--paper-muted);
  position: relative;
  max-height: min(64vh, 520px);
  overflow: auto;
  padding: 0 0 6px;
  color: var(--ink);
  background: var(--bg);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
  pointer-events: auto;
}
.cc-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 24px; height: 24px;
  font-size: 13px; line-height: 1;
  color: var(--bg);
  background: color-mix(in srgb, var(--bg) 22%, transparent);
  border: none; border-radius: 50%;
  cursor: pointer;
}
.cc-close:hover { background: color-mix(in srgb, var(--bg) 38%, transparent); }
.cc-badge {
  display: flex; align-items: baseline; gap: 8px;
  width: 100%; margin: 0; padding: 10px 36px 0 12px;
  background: var(--cc-accent);
  font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--bg) 82%, transparent);
}
.cc-name {
  margin: 0; padding: 1px 36px 10px 12px;
  font-family: var(--font-mono); font-size: 18px; font-weight: 500; line-height: 1.15;
  color: var(--bg);
  background: var(--cc-accent);
}
.cc-summary {
  margin: 0; padding: 10px 12px 0;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.4;
  color: rgba(var(--ink-rgb), .9);
}
.cc-facts { margin: 6px 12px 2px; border-top: 1px solid rgba(var(--ink-rgb), .14); }
.cc-facts > div {
  display: grid; grid-template-columns: 96px 1fr; gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(var(--ink-rgb), .12);
}
.cc-facts dt {
  padding-top: 2px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.cc-facts dd { margin: 0; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.35; color: var(--ink); }
.cc-rupees { font-family: var(--font-mono); font-weight: 500; letter-spacing: .06em; color: var(--cc-accent); }

.cc-rule { margin-top: 14px; border-top: 1px solid var(--fig-line); }

/* narrow map (set by place()): the card sits in the flow under the map */
.cc-body.stacked .cc-panel { position: relative; inset: auto !important; width: 100%; margin-top: 12px; }
.cc-body.stacked .cc-card { max-height: none; box-shadow: none; border: 1px solid var(--fig-line); }

@container (width <= 640px) {
  .cc-facts > div { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-scrim, .cc-lift, .cc-tint, .cc-pin, .cc-marker circle { transition: none; }
}
