.scene-agx {
  --agx-violet: 185, 156, 231;
  --agx-cyan: 120, 215, 232;
  --agx-gold: 240, 179, 95;
  --agx-electric: 57, 168, 255;
}

.scene-agx .agx-media {
  background: #07090d;
}

.scene-agx .agx-media img {
  opacity: 0.56;
  filter: saturate(0.62) contrast(1.08) brightness(0.62);
}

.scene-agx.is-visible .agx-media img {
  opacity: 0.66;
}

#agx-relation-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.agx-field-labels {
  position: absolute;
  inset: auto clamp(1rem, 2vw, 2rem) clamp(1rem, 2vw, 2rem);
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-mono, monospace);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.agx-field-labels span:nth-child(2) {
  color: rgb(var(--agx-electric));
  text-shadow: 0 0 1.1rem rgba(var(--agx-electric), 0.72);
  text-align: center;
}

.agx-field-labels span:last-child {
  text-align: right;
}

.agx-copy {
  overflow: hidden;
}

.agx-copy::after {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -5rem;
  width: 11rem;
  aspect-ratio: 1;
  border: 1px solid rgba(var(--agx-violet), 0.38);
  border-radius: 50%;
  box-shadow:
    0 0 0 1.8rem rgba(var(--agx-cyan), 0.035),
    0 0 0 3.6rem rgba(var(--agx-gold), 0.025);
  pointer-events: none;
  transition: transform 900ms ease, border-color 900ms ease;
}

.scene-agx[data-agx-state="emergent"] .agx-copy::after {
  border-color: rgba(var(--agx-electric), 0.88);
  box-shadow:
    0 0 2.8rem rgba(var(--agx-electric), 0.22),
    0 0 0 1.8rem rgba(var(--agx-cyan), 0.045),
    0 0 0 3.6rem rgba(var(--agx-gold), 0.025);
  transform: scale(1.2);
}

.agx-trace {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.1rem;
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(var(--agx-violet), 0.26);
}

.agx-trace > p {
  display: grid;
  min-width: 4.25rem;
  margin: 0;
}

.agx-trace strong {
  color: #fff;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

.agx-trace > p span {
  margin-top: 0.3rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.agx-trace-list {
  display: flex;
  min-height: 2.4rem;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
}

.agx-trace-list i {
  display: block;
  width: 0.72rem;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 1rem currentColor;
  animation: agx-trace-breathe 2.8s ease-in-out infinite alternate;
}

.agx-trace-list i:nth-child(2n) {
  animation-delay: -1.1s;
}

.agx-trace-list i:nth-child(3n) {
  animation-delay: -2s;
}

.agx-follow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.2rem;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.agx-follow[hidden] {
  display: none;
}

.agx-follow span {
  color: rgb(var(--agx-violet));
  font-size: 1rem;
}

.agx-honesty {
  display: block;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.38);
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.scene-agx[data-agx-state="emergent"] .agx-honesty {
  color: rgba(var(--agx-electric), 0.78);
}

@keyframes agx-trace-breathe {
  from {
    opacity: 0.45;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 760px) {
  .scene-agx .agx-media {
    top: 5.25rem;
    bottom: 16rem;
    width: calc(100% - 2rem);
  }

  .scene-agx .scene-copy {
    align-self: end;
    margin-bottom: 1rem;
  }

  .agx-field-labels {
    font-size: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agx-trace-list i {
    animation: none;
  }
}
