html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

@keyframes aiGridRun {
  0% {
    background-position: 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 96px 96px, -96px 72px, 160px 0;
  }
}

@keyframes aiLogoRun {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ai-running-bg {
  isolation: isolate;
  position: relative;
}

.ai-running-bg::before {
  animation: aiGridRun 22s linear infinite;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.08) 1px, transparent 1px),
    linear-gradient(115deg, transparent 0 42%, rgba(251, 191, 36, 0.12) 42% 43%, transparent 43% 100%);
  background-size: 48px 48px, 48px 48px, 160px 160px;
  content: "";
  inset: 0;
  opacity: 0.75;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.ai-logo-rail {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  width: 100%;
}

.ai-logo-track {
  animation: aiLogoRun 24s linear infinite;
  display: flex;
  gap: 0.75rem;
  width: max-content;
}

.ai-logo-pill {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  color: #172033;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 900;
  gap: 0.5rem;
  letter-spacing: 0;
  min-height: 2.5rem;
  padding: 0.45rem 0.85rem;
}

.ai-logo-mark {
  align-items: center;
  background: #172033;
  border-radius: 0.8rem;
  color: #fff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  height: 1.65rem;
  justify-content: center;
  width: 1.65rem;
}

.ai-logo-pill:nth-child(3n) .ai-logo-mark {
  background: #10b981;
}

.ai-logo-pill:nth-child(3n + 2) .ai-logo-mark {
  background: #2563eb;
}

.ai-logo-pill:nth-child(4n) .ai-logo-mark {
  background: #f59e0b;
}

.ai-dark-rail .ai-logo-pill {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  color: #fff;
}

.ai-dark-rail .ai-logo-mark {
  background: rgba(255, 255, 255, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  .ai-running-bg::before,
  .ai-logo-track {
    animation: none;
  }
}
