cash costs per oz gold..are they based on produced or sold ounces?

Yes, cash costs are per oz sold.  To get a better idea of cash cost per oz produced look at the cost of production.  Cost of production is down significantly.