/* Responsive relationship map for RA-011. */
.citation-graph {
  margin: 3rem 0;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  border: 1px solid rgba(126, 142, 255, .24);
  border-radius: 1rem;
  background: radial-gradient(circle at 50% 45%, rgba(110, 82, 220, .12), transparent 18rem), rgba(8, 14, 29, .72);
}

.citation-graph > h2 { margin-top: 0; }
.citation-graph-intro { max-width: 46rem; }

.citation-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    ". paper ."
    "evidence center framework"
    "uncertainty center observatory";
  gap: 1rem 1.25rem;
  align-items: stretch;
  margin-top: 1.5rem;
}

.citation-node {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 7.5rem;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: .85rem;
  background: rgba(255,255,255,.035);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.citation-node small {
  color: #aeb7d2;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.citation-node strong { margin-top: .25rem; line-height: 1.3; }
.citation-node span { margin-top: .4rem; color: #c6cde1; font-size: .87rem; line-height: 1.45; }

.citation-node:hover,
.citation-node:focus-visible {
  border-color: rgba(160, 138, 255, .72);
  background: rgba(127, 95, 229, .09);
  box-shadow: 0 12px 32px rgba(20, 14, 54, .28);
  outline: none;
}

.citation-node[aria-current="true"] {
  border-color: rgba(170, 148, 255, .82);
  background: linear-gradient(145deg, rgba(119, 83, 213, .22), rgba(38, 31, 82, .45));
  box-shadow: 0 16px 42px rgba(53, 34, 110, .25);
}

.citation-node[aria-current="true"]::after {
  content: "Current article";
  position: absolute;
  top: .65rem;
  right: .7rem;
  color: #c7b8ff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.node-paper { grid-area: paper; }
.node-evidence { grid-area: evidence; }
.node-center { grid-area: center; }
.node-framework { grid-area: framework; }
.node-uncertainty { grid-area: uncertainty; }
.node-observatory { grid-area: observatory; }

.citation-relationship {
  margin: 1.25rem 0 0;
  color: #aeb7d2;
  font-size: .85rem;
}

@media (min-width: 761px) {
  .node-paper::after,
  .node-evidence::after,
  .node-framework::before,
  .node-uncertainty::after,
  .node-observatory::before {
    content: "";
    position: absolute;
    background: rgba(151, 127, 239, .42);
    pointer-events: none;
  }

  .node-paper::after { left: 50%; bottom: -1.05rem; width: 1px; height: 1.05rem; }
  .node-evidence::after,
  .node-uncertainty::after { right: -1.3rem; top: 50%; width: 1.3rem; height: 1px; }
  .node-framework::before,
  .node-observatory::before { left: -1.3rem; top: 50%; width: 1.3rem; height: 1px; }
}

@media (max-width: 760px) {
  .citation-map {
    grid-template-columns: 1fr;
    grid-template-areas:
      "center"
      "paper"
      "evidence"
      "uncertainty"
      "framework"
      "observatory";
  }

  .citation-node { min-height: auto; }
  .citation-node[aria-current="true"]::after { position: static; margin-top: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .citation-node { transition: none; }
}
