Configuration interaction and lanthanide crystal fields