How to assign costs on a navmesh?

I’m trying to generate a Recast navmesh with sidewalks and roads for pedestrian agents. Pedestrians will tend to walk on the sidewalk but will cross the road when necessary. To keep pedestrians on the sidewalk, I need to increase the cost of the roads.

The picture shows a singe road segment (highlighted) surrounded by sidewalks. The road segment has collision. The green is the navmesh overlay. The numbers represent the polygon cost.

How do I tell my Recast navmesh that this road segment costs more to traverse than the sidewalks around it?