.entity-loop-section {
  padding: 8px 0 40px;
  position: relative;
  z-index: 1;
  background: transparent;
}

.entity-loop-kicker {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-500, #64748b);
  margin-bottom: 30px;
}

.entity-loop {
  --entity-loop-gap: 16px;
  --entity-loop-fade: #f8fafc;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.entity-loop--fade {
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%
  );
}

.entity-loop__container {
  width: 100%;
  overflow: hidden;
}

.entity-loop__track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.entity-loop__sequence {
  display: flex;
  align-items: stretch;
  gap: var(--entity-loop-gap);
  padding-right: var(--entity-loop-gap);
  flex-shrink: 0;
}

.entity-loop__card {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 12px 16px;
  min-width: 200px;
  max-width: 260px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--brand-200, #e2e8f0);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.entity-loop__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-50, #eff6ff);
  color: var(--accent-600, #2563eb);
}

.entity-loop__icon svg {
  width: 22px;
  height: 22px;
}

.entity-loop__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.entity-loop__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.entity-loop__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-900, #0f172a);
  line-height: 1.3;
}

.entity-loop__badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 9999px;
  line-height: 1.4;
  flex-shrink: 0;
}

.entity-loop__badge--ai {
  color: #5b21b6;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
}

.entity-loop__badge--regex {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

@media (max-width: 600px) {
  .entity-loop__card {
    min-width: 168px;
    max-width: 220px;
    padding: 10px 12px;
    gap: 10px;
  }

  .entity-loop__icon {
    width: 36px;
    height: 36px;
  }

  .entity-loop__icon svg {
    width: 20px;
    height: 20px;
  }

  .entity-loop__name {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entity-loop__track {
    flex-wrap: wrap;
    width: 100%;
    transform: none !important;
    justify-content: center;
    gap: var(--entity-loop-gap);
    padding: 0 16px 8px;
  }

  .entity-loop__sequence[aria-hidden='true'] {
    display: none;
  }

  .entity-loop__sequence {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding-right: 0;
  }

  .entity-loop--fade {
    -webkit-mask-image: none;
    mask-image: none;
  }
}
