Heat the oil in a large heavy pot over a medium heat. Cook the onions and capsicum for 10 minutes until soft, then add the garlic for a minute.
Add the mince and break it up. Cook for 10 minutes until properly browned — not just grey. This is where a large part of the flavour comes from, so give it the time.
Add the cumin, paprika, oregano, cayenne and cocoa and **fry for a full minute**, stirring, until fragrant and toasty. Then stir in the tomato paste and cook another minute.
Add the tinned tomatoes, stock, coffee if using, and the brown sugar. Bring to a simmer.
Turn the heat right down and simmer **uncovered for 1 1/2 hours**, stirring only occasionally. It will reduce and darken considerably.
Add the drained beans and simmer a further 30 minutes, until thick enough that a spoon dragged through leaves a track.
Season well — it needs more salt than you expect after that long. Taste and adjust the cayenne.
Serve over rice with sour cream, cheese, coriander and a wedge of lime.