Running rich means that too much fuel is getting into the combustion chambers, whether it is being commanded by your Honda Civic's emission or engine control unit (ECU) or a mechanical fault. Since your Honda Civic is running rich only at idle the first thing we want to make sure is that there aren't any mechanical faults like sticking injector(s), defective fuel pressure control valve or damaged EVAP. A smog technician should inspect any and all points of fuel entry to the intake manifold and combustion chambers.
If the problem appears to be with the emission control system, we'd want to make sure the engine coolant temperature sensor is sending the correct temperature signal (in voltage) to the ECU and that the throttle position sensor (which measures the angle your gas pedal is at) is telling the ECU that your Honda Civic is at idle and fuel delivery should be low. These two values will primarily tell the ECU to increase or decrease fuel.
If a fault exists with the EVAP system it to will cause high CO (rich fuel mixture) as well. The EVAP system is designed to introduce fuel tank fumes into the intake manifold as needed. Typically when off idle, as during idle would cause a rich fuel mixture.
A complete diagnosis would entail what is referred to a the "Fuel Feedback Test". This includes ensuring the oxygen sensors and over one dozen additional emission sensors and solenoids are working properly, your Honda Civic's emissions computer is receiving these signals, the ECU is computing the data properly and sending the correct signals back to, mainly the fuel injectors and other solenoids designed to control fuel delivery, by either increasing or decreasing the amount of fuel entering the intake manifold or combustion chambers.
Your Honda Civic's smog test failure diagnosis should include inspecting for high fuel pressure, air restrictions, leaking fuel injectors and the like. As mentioned a dirty air filter may restrict ample air from entering the combustion chambers. Though the ECU is programmed to compensate for minor air intake variances, the computer may not be able to adjust to a very dirty air filter. We should note, typically dirty air filters will produce high CO during idle and off idle conditions.
For a full list of What Causes A Rich Fuel Mixture visit:
What Causes a Rich Fuel Mixture?