/* Collaboration map v3: historical paper affiliations + separate current affiliations. */
#collaborations.collaboration-map-section .inner {
  width: min(100%, calc(100vw - 3rem));
  max-width: 96rem;
  margin-left: auto;
  margin-right: auto;
}

.collaboration-map-intro {
  max-width: 62rem;
  margin: 0 auto 1.25rem auto;
  color: rgba(0, 0, 0, 0.70);
}

.collaboration-map-canvas-wrap {
  width: 100%;
  max-width: 82rem;
  margin: 1rem auto 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.11);
  border-radius: 1.1rem;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,249,249,0.96));
}

#collaboration-map-canvas {
  display: block;
  width: 100%;
  height: auto;
  min-height: 20rem;
}

.collaboration-map-sphere {
  fill: rgba(0, 0, 0, 0.018);
  stroke: rgba(0, 0, 0, 0.10);
  stroke-width: 0.8;
}

.collaboration-map-country {
  fill: rgba(0, 0, 0, 0.055);
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 0.55;
}

.collaboration-map-node-group {
  cursor: pointer;
  outline: none;
}

.collaboration-map-historical-dot {
  fill: #5b7bd5;
  stroke: #ffffff;
  stroke-width: 1.7;
  opacity: 0.88;
  transition: opacity 150ms ease, stroke-width 150ms ease;
  pointer-events: none;
}

.collaboration-map-current-ring {
  fill: none;
  stroke: #263f79;
  stroke-width: 2.2;
  opacity: 0.9;
  pointer-events: none;
}

.collaboration-map-current-only-core {
  fill: #ffffff;
  stroke: #263f79;
  stroke-width: 1.4;
  pointer-events: none;
}

.collaboration-map-hit {
  fill: transparent;
  stroke: none;
}

.collaboration-map-node-group:hover .collaboration-map-historical-dot,
.collaboration-map-node-group:focus .collaboration-map-historical-dot,
.collaboration-map-node-group.is-active .collaboration-map-historical-dot,
.collaboration-map-node-group.is-selected .collaboration-map-historical-dot {
  opacity: 1;
  stroke: #222;
  stroke-width: 2.2;
}

.collaboration-map-node-group:hover .collaboration-map-current-ring,
.collaboration-map-node-group:focus .collaboration-map-current-ring,
.collaboration-map-node-group.is-selected .collaboration-map-current-ring {
  stroke-width: 3;
  opacity: 1;
}

.collaboration-map-bottom-panel {
  margin: 0.9rem auto 0.5rem auto;
  padding: 0.95rem 1.1rem;
  max-width: 72rem;
  min-height: 6rem;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  text-align: left;
}

.collaboration-map-bottom-panel h3 {
  margin: 0 0 0.3rem 0;
  font-size: 1.08rem;
}

.collaboration-map-bottom-panel h4 {
  margin: 0.8rem 0 0.35rem 0;
  font-size: 0.98rem;
}

.collaboration-detail-section + .collaboration-detail-section {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.collaboration-current-detail {
  border-left: 3px solid rgba(38, 63, 121, 0.55);
  padding-left: 0.85rem;
}

.collaboration-map-meta,
.collaboration-map-status {
  color: rgba(0, 0, 0, 0.62);
}

.collaboration-map-meta {
  margin: 0 0 0.55rem 0;
  font-size: 0.95rem;
}

.collaboration-map-status {
  min-height: 1.5rem;
  margin: 0.75rem auto 0 auto;
  font-size: 0.92rem;
}

.collaboration-map-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0.35rem auto 0.75rem auto;
  color: rgba(0, 0, 0, 0.62);
  font-size: 0.88rem;
}

.collaboration-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.collaboration-legend-dot,
.collaboration-legend-ring {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
}

.collaboration-legend-dot {
  background: #5b7bd5;
  border: 1px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.10);
}

.collaboration-legend-ring {
  background: #ffffff;
  border: 2px solid #263f79;
}

.collaboration-paper-list,
.collaboration-current-source-list {
  margin: 0.65rem 0 0 1.2rem;
}

.collaboration-paper-list li,
.collaboration-current-source-list li {
  margin-bottom: 0.45rem;
}

.collaboration-paper-list li span {
  color: rgba(0, 0, 0, 0.62);
  font-size: 0.9rem;
}

.collaboration-current-source-list {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.70);
}

@media screen and (max-width: 640px) {
  #collaborations.collaboration-map-section .inner {
    width: min(100%, calc(100vw - 1.5rem));
  }

  #collaboration-map-canvas {
    min-height: 15rem;
  }

  .collaboration-map-bottom-panel {
    text-align: left;
  }
}