.rag-visual {
  width: 100%;
  min-width: 0;
  align-self: center;
}

.rag-illustration {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  color: #202722;
}

.rag-illustration .rag-core-halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: rag-core-breathe 5.2s ease-in-out infinite;
}

.rag-illustration .rag-gear {
  transform-box: fill-box;
  transform-origin: center;
  animation: rag-gear-turn 24s linear infinite;
}

.rag-illustration .rag-chat,
.rag-illustration .rag-answer,
.rag-illustration .rag-automation {
  animation: rag-output-breathe 7s ease-in-out infinite;
}

.rag-illustration .rag-answer { animation-delay: -2.3s; }
.rag-illustration .rag-automation { animation-delay: -4.6s; }

.rag-illustration .rag-particle {
  transform-box: fill-box;
  offset-anchor: center;
  offset-rotate: 0deg;
  offset-path: path("M112 91 C166 91 183 128 225 167");
  animation: rag-travel 5.4s linear infinite;
  animation-delay: var(--delay, 0s);
}

.rag-illustration .rag-particle:nth-child(2) {
  offset-path: path("M112 91 C166 91 183 128 225 167");
}

.rag-illustration .rag-particle:nth-child(3),
.rag-illustration .rag-particle:nth-child(4) {
  offset-path: path("M132 207 C174 207 193 207 221 207");
}

.rag-illustration .rag-particle:nth-child(5) {
  offset-path: path("M112 326 C166 326 183 286 225 247");
}

.rag-illustration .rag-particle:nth-child(6) {
  offset-path: path("M331 167 C365 138 379 113 414 113");
}

.rag-illustration .rag-particle:nth-child(7) {
  offset-path: path("M336 207 C365 207 379 207 409 207");
}

.rag-illustration .rag-particle:nth-child(8) {
  offset-path: path("M331 247 C365 275 380 307 414 307");
}

@keyframes rag-travel {
  from { offset-distance: 0%; opacity: 0; }
  18% { opacity: .95; }
  82% { opacity: .95; }
  to { offset-distance: 100%; opacity: 0; }
}

@keyframes rag-core-breathe {
  0%, 100% { transform: scale(.97); opacity: .55; }
  50% { transform: scale(1.04); opacity: .95; }
}

@keyframes rag-gear-turn {
  to { transform: rotate(360deg); }
}

@keyframes rag-output-breathe {
  0%, 100% { opacity: .4; }
  42%, 68% { opacity: 1; }
}

body.aionics-site .hero.has-rag-visual .hero-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: center;
}

body.aionics-site .hero.has-rag-visual .hero-content {
  grid-column: auto;
  min-width: 0;
  max-width: 650px;
}

body.aionics-site .hero.has-rag-visual .rag-visual {
  max-width: 540px;
  justify-self: end;
}

body.aionics-site .training-hub-hero.has-rag-visual .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .6fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

body.aionics-site .training-hub-hero.has-rag-visual .hub-hero-copy {
  min-width: 0;
  text-align: left;
}

body.aionics-site .training-hub-hero.has-rag-visual .hub-hero-copy h1 {
  max-width: 680px;
  margin-inline: 0;
}

body.aionics-site .training-hub-hero.has-rag-visual .hub-hero-copy p {
  margin-inline: 0;
}

body.aionics-site .training-hub-hero.has-rag-visual .hub-meta {
  justify-content: flex-start;
}

body.aionics-site .training-hub-hero.has-rag-visual .rag-visual--small {
  width: 100%;
  max-width: 360px;
  justify-self: end;
}

@media (max-width: 820px) {
  body.aionics-site .hero.has-rag-visual .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  body.aionics-site .hero.has-rag-visual .rag-visual {
    width: min(100%, 540px);
    margin-inline: auto;
  }

  body.aionics-site .training-hub-hero.has-rag-visual .container {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  body.aionics-site .training-hub-hero.has-rag-visual .rag-visual--small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rag-illustration *,
  .rag-illustration *::before,
  .rag-illustration *::after {
    animation: none !important;
  }
  .rag-illustration .rag-particle {
    offset-distance: 0% !important;
  }
  .rag-illustration .rag-core-halo,
  .rag-illustration .rag-gear {
    transform: none !important;
  }
}
